Merge with develop
--HG-- branch : compatibility-develop
This commit is contained in:
commit
ac9dcd663d
16 changed files with 82 additions and 55 deletions
|
@ -48,7 +48,7 @@ public:
|
||||||
/// Constructor
|
/// Constructor
|
||||||
CPacsClient()
|
CPacsClient()
|
||||||
{
|
{
|
||||||
// No connexion
|
// No connection
|
||||||
_Server=NULL;
|
_Server=NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -567,7 +567,7 @@ static TCallbackItem PacsCallbackArray[] =
|
||||||
|
|
||||||
inline bool CPacsClient::connect ()
|
inline bool CPacsClient::connect ()
|
||||||
{
|
{
|
||||||
// Create a connexion
|
// Create a connection
|
||||||
_Server = new CCallbackClient;
|
_Server = new CCallbackClient;
|
||||||
|
|
||||||
// Look up for PACS service
|
// Look up for PACS service
|
||||||
|
|
|
@ -1211,6 +1211,12 @@ void prelogInit()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (bitmaps.empty())
|
||||||
|
{
|
||||||
|
// check if an icon is present in same directory as executable
|
||||||
|
addRyzomIconBitmap(Args.getProgramPath(), bitmaps);
|
||||||
|
}
|
||||||
|
|
||||||
if (bitmaps.empty())
|
if (bitmaps.empty())
|
||||||
{
|
{
|
||||||
// check if an icon is present in current directory
|
// check if an icon is present in current directory
|
||||||
|
|
|
@ -203,8 +203,7 @@ void CBarManager::initInGame()
|
||||||
i++;
|
i++;
|
||||||
nlassert(i==MaxTeamMember);
|
nlassert(i==MaxTeamMember);
|
||||||
|
|
||||||
|
// *** create connection to the Local Output database
|
||||||
// *** create connexion to the Local Output database
|
|
||||||
for(i=0;i<_EntryBars[TeamMemberType].size();i++)
|
for(i=0;i<_EntryBars[TeamMemberType].size();i++)
|
||||||
{
|
{
|
||||||
// don't connect FOCUS, since not setuped by SERVER
|
// don't connect FOCUS, since not setuped by SERVER
|
||||||
|
@ -214,6 +213,7 @@ void CBarManager::initInGame()
|
||||||
"PRESENT",
|
"PRESENT",
|
||||||
"HP", "SAP", "STA", "");
|
"HP", "SAP", "STA", "");
|
||||||
}
|
}
|
||||||
|
|
||||||
for(i=0;i<_EntryBars[AnimalType].size();i++)
|
for(i=0;i<_EntryBars[AnimalType].size();i++)
|
||||||
{
|
{
|
||||||
// don't connect STA, SAP and FOCUS for animal, since they don't have
|
// don't connect STA, SAP and FOCUS for animal, since they don't have
|
||||||
|
@ -223,6 +223,7 @@ void CBarManager::initInGame()
|
||||||
"STATUS",
|
"STATUS",
|
||||||
"HP", "", "", "");
|
"HP", "", "", "");
|
||||||
}
|
}
|
||||||
|
|
||||||
nlassert(_EntryBars[TargetType].size()==1);
|
nlassert(_EntryBars[TargetType].size()==1);
|
||||||
_EntryBars[TargetType][0].connectDB(
|
_EntryBars[TargetType][0].connectDB(
|
||||||
"SERVER:TARGET:BARS:",
|
"SERVER:TARGET:BARS:",
|
||||||
|
@ -243,7 +244,7 @@ void CBarManager::initInGame()
|
||||||
_EntryScoreFlags[TargetType]= HpFlag | SapFlag | StaFlag | FocusFlag; // all
|
_EntryScoreFlags[TargetType]= HpFlag | SapFlag | StaFlag | FocusFlag; // all
|
||||||
|
|
||||||
|
|
||||||
// *** create connexion for User Bar mgt
|
// *** create connection for User Bar mgt
|
||||||
// user now can only manage 4 scores
|
// user now can only manage 4 scores
|
||||||
nlctassert(SCORES::NUM_SCORES==4);
|
nlctassert(SCORES::NUM_SCORES==4);
|
||||||
// Input max values
|
// Input max values
|
||||||
|
@ -308,7 +309,7 @@ void CBarManager::addEntry(TEntryType type, uint entryId, uint dataSetId)
|
||||||
// Add me to list of entries
|
// Add me to list of entries
|
||||||
CBarDataEntry &bde= entryArray[entryId];
|
CBarDataEntry &bde= entryArray[entryId];
|
||||||
bde.DataSetId= dataSetId;
|
bde.DataSetId= dataSetId;
|
||||||
// Add the entry connexion to map by DataSetId
|
// Add the entry connection to map by DataSetId
|
||||||
CBarDataUID &barUID= _UIDBars[dataSetId];
|
CBarDataUID &barUID= _UIDBars[dataSetId];
|
||||||
barUID.EntryId[type].insert(entryId);
|
barUID.EntryId[type].insert(entryId);
|
||||||
|
|
||||||
|
@ -340,7 +341,7 @@ void CBarManager::delEntry(TEntryType type, uint entryId)
|
||||||
{
|
{
|
||||||
// then unconnect this from the map by UID
|
// then unconnect this from the map by UID
|
||||||
_UIDBars[dataSetId].EntryId[type].erase(entryId);
|
_UIDBars[dataSetId].EntryId[type].erase(entryId);
|
||||||
// if no more connexion are made to this UID
|
// if no more connection are made to this UID
|
||||||
if(_UIDBars[dataSetId].noMoreEntry())
|
if(_UIDBars[dataSetId].noMoreEntry())
|
||||||
{
|
{
|
||||||
// erase it
|
// erase it
|
||||||
|
|
|
@ -173,7 +173,7 @@ private:
|
||||||
class CBarDataUID
|
class CBarDataUID
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
/* What connexion are valid. empty() in each case if not, else the index in the array of entries
|
/* What connection are valid. empty() in each case if not, else the index in the array of entries
|
||||||
* NB: this is a set because some time, a bar data may be connected to multiple entries of same type
|
* NB: this is a set because some time, a bar data may be connected to multiple entries of same type
|
||||||
* This typically happens when you dismiss the team member 0 'Paul' while you have a team member 1 'Pierre':
|
* This typically happens when you dismiss the team member 0 'Paul' while you have a team member 1 'Pierre':
|
||||||
* because of the server array shift, there will be a short time where TeamMember0= TeamMember1= Pierre
|
* because of the server array shift, there will be a short time where TeamMember0= TeamMember1= Pierre
|
||||||
|
@ -207,7 +207,7 @@ private:
|
||||||
TUIDToDatas _UIDBars;
|
TUIDToDatas _UIDBars;
|
||||||
|
|
||||||
|
|
||||||
// *** Data sorted by connexion Id (duplication for faster access...)
|
// *** Data sorted by connection Id (duplication for faster access...)
|
||||||
class CBarDataEntry
|
class CBarDataEntry
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
|
@ -390,7 +390,7 @@ void CLuaIHMRyzom::RegisterRyzomFunctions( NLGUI::CLuaState &ls )
|
||||||
mt.setValue("__newindex", luaClientCfgNewIndex);
|
mt.setValue("__newindex", luaClientCfgNewIndex);
|
||||||
globals.setNil("__cfmt"); // remove temp metatable
|
globals.setNil("__cfmt"); // remove temp metatable
|
||||||
|
|
||||||
ls.registerFunc( "getUI", getUI );
|
ls.registerFunc("getUI", getUI);
|
||||||
ls.registerFunc("validMessageBox", validMessageBox);
|
ls.registerFunc("validMessageBox", validMessageBox);
|
||||||
ls.registerFunc("getUICaller", getUICaller);
|
ls.registerFunc("getUICaller", getUICaller);
|
||||||
ls.registerFunc("getUI", getUI);
|
ls.registerFunc("getUI", getUI);
|
||||||
|
|
|
@ -828,7 +828,7 @@ void updateGameQuitting()
|
||||||
// if want quiting, and if server stalled, quit now
|
// if want quiting, and if server stalled, quit now
|
||||||
if(game_exit_request)
|
if(game_exit_request)
|
||||||
{
|
{
|
||||||
// abort until 10 seconds if connexion lost
|
// abort until 10 seconds if connection lost
|
||||||
if(!NetMngr.getConnectionQuality())
|
if(!NetMngr.getConnectionQuality())
|
||||||
{
|
{
|
||||||
if(!firstTimeLostConnection)
|
if(!firstTimeLostConnection)
|
||||||
|
@ -839,7 +839,7 @@ void updateGameQuitting()
|
||||||
firstTimeLostConnection= 0;
|
firstTimeLostConnection= 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// if connexion lost until 10 seconds
|
// if connection lost until 10 seconds
|
||||||
if(firstTimeLostConnection && T1-firstTimeLostConnection > 10000)
|
if(firstTimeLostConnection && T1-firstTimeLostConnection > 10000)
|
||||||
{
|
{
|
||||||
game_exit= true;
|
game_exit= true;
|
||||||
|
|
|
@ -539,7 +539,7 @@ bool CClientEditionModule::onProcessModuleMessage(IModuleProxy *senderModuleProx
|
||||||
|
|
||||||
if (operationName == "ADV_CONN")
|
if (operationName == "ADV_CONN")
|
||||||
{
|
{
|
||||||
CEditor::connexionMsg("");
|
CEditor::connectionMsg("");
|
||||||
CClientMessageAdventureUserConnection bodyConnection;
|
CClientMessageAdventureUserConnection bodyConnection;
|
||||||
nlRead(message,serial,bodyConnection);
|
nlRead(message,serial,bodyConnection);
|
||||||
onRingAccessUpdated(0, bodyConnection.RingAccess);
|
onRingAccessUpdated(0, bodyConnection.RingAccess);
|
||||||
|
@ -1048,7 +1048,7 @@ void CClientEditionModule::startScenario(class NLNET::IModuleProxy * proxy, bool
|
||||||
|
|
||||||
this->connectAnimationModePlay();
|
this->connectAnimationModePlay();
|
||||||
|
|
||||||
CEditor::connexionMsg("");
|
CEditor::connectionMsg("");
|
||||||
|
|
||||||
if (_CharMode == TCharMode::Dm)
|
if (_CharMode == TCharMode::Dm)
|
||||||
{
|
{
|
||||||
|
@ -1069,7 +1069,7 @@ void CClientEditionModule::startScenario(class NLNET::IModuleProxy * proxy, bool
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
CEditor::connexionMsg("uiR2EDR2StartTestError");
|
CEditor::connectionMsg("uiR2EDR2StartTestError");
|
||||||
requestReconnection();
|
requestReconnection();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1190,12 +1190,8 @@ void CClientEditionModule::startingScenario(class NLNET::IModuleProxy * /* serve
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
CEditor::connectionMsg(connectionState);
|
||||||
|
|
||||||
CEditor::connexionMsg(connectionState);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CClientEditionModule::requestStartScenario()
|
bool CClientEditionModule::requestStartScenario()
|
||||||
|
@ -1204,7 +1200,7 @@ bool CClientEditionModule::requestStartScenario()
|
||||||
|
|
||||||
BOMB_IF(_ServerEditionProxy == NULL, "Server Edition Module not connected", return false);
|
BOMB_IF(_ServerEditionProxy == NULL, "Server Edition Module not connected", return false);
|
||||||
|
|
||||||
CEditor::connexionMsg("uimR2EDGoToDMMode");
|
CEditor::connectionMsg("uimR2EDGoToDMMode");
|
||||||
|
|
||||||
R2::getEditor().getLua().executeScriptNoThrow("r2.Version.save(\"save/r2_buffer.dat\")");
|
R2::getEditor().getLua().executeScriptNoThrow("r2.Version.save(\"save/r2_buffer.dat\")");
|
||||||
CShareServerEditionItfProxy proxy(_ServerEditionProxy);
|
CShareServerEditionItfProxy proxy(_ServerEditionProxy);
|
||||||
|
|
|
@ -724,7 +724,7 @@ void CDynamicMapClient::onEditionModeConnected( uint32 userSlotId, uint32 /* adv
|
||||||
_EditionModule->getCurrentScenario()->setSessionType(st_edit);
|
_EditionModule->getCurrentScenario()->setSessionType(st_edit);
|
||||||
scenarioUpdated(highLevel, willTP, initialActIndex); // handle by CEditor.cpp that call _EditionModule->updateScenario(highLevel);
|
scenarioUpdated(highLevel, willTP, initialActIndex); // handle by CEditor.cpp that call _EditionModule->updateScenario(highLevel);
|
||||||
|
|
||||||
CEditor::connexionMsg("");
|
CEditor::connectionMsg("");
|
||||||
//_EditionModule->requestSetPioneerRight( TPioneerRight::DM);
|
//_EditionModule->requestSetPioneerRight( TPioneerRight::DM);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -778,13 +778,13 @@ void CDynamicMapClient::onResetEditionMode()
|
||||||
void CDynamicMapClient::onTestModeConnected()
|
void CDynamicMapClient::onTestModeConnected()
|
||||||
{
|
{
|
||||||
//H_AUTO(R2_CDynamicMapClient_onTestModeConnected)
|
//H_AUTO(R2_CDynamicMapClient_onTestModeConnected)
|
||||||
CEditor::connexionMsg("");
|
CEditor::connectionMsg("");
|
||||||
}
|
}
|
||||||
|
|
||||||
void CDynamicMapClient::onTestModeDisconnected(TSessionId /* sessionId */, uint32 /* lasAct */, TScenarioSessionType /* sessionType */)
|
void CDynamicMapClient::onTestModeDisconnected(TSessionId /* sessionId */, uint32 /* lasAct */, TScenarioSessionType /* sessionType */)
|
||||||
{
|
{
|
||||||
//H_AUTO(R2_CDynamicMapClient_onTestModeDisconnected)
|
//H_AUTO(R2_CDynamicMapClient_onTestModeDisconnected)
|
||||||
CEditor::connexionMsg("uimR2EDGoToEditingMode");
|
CEditor::connectionMsg("uimR2EDGoToEditingMode");
|
||||||
}
|
}
|
||||||
|
|
||||||
CObject* CDynamicMapClient::getCurrentScenarioHighLevel()
|
CObject* CDynamicMapClient::getCurrentScenarioHighLevel()
|
||||||
|
|
|
@ -2425,7 +2425,7 @@ void CEditor::setMode(TMode mode)
|
||||||
// set new mode in lua
|
// set new mode in lua
|
||||||
_Env.setValue("Mode", "GoingToDM");
|
_Env.setValue("Mode", "GoingToDM");
|
||||||
setUIMode(3);
|
setUIMode(3);
|
||||||
connexionMsg(_ConnexionMsg); // update connexion window
|
connectionMsg(_ConnectionMsg); // update connection window
|
||||||
::IgnoreEntityDbUpdates = false;
|
::IgnoreEntityDbUpdates = false;
|
||||||
::initContextualCursor();
|
::initContextualCursor();
|
||||||
nlassert(CDisplayerBase::ObjCount == 0);
|
nlassert(CDisplayerBase::ObjCount == 0);
|
||||||
|
@ -2437,7 +2437,7 @@ void CEditor::setMode(TMode mode)
|
||||||
// set new mode in lua
|
// set new mode in lua
|
||||||
_Env.setValue("Mode", "BackToEditing");
|
_Env.setValue("Mode", "BackToEditing");
|
||||||
setUIMode(3);
|
setUIMode(3);
|
||||||
connexionMsg(_ConnexionMsg); // update connexion window
|
connectionMsg(_ConnectionMsg); // update connection window
|
||||||
::IgnoreEntityDbUpdates = true;
|
::IgnoreEntityDbUpdates = true;
|
||||||
::initContextualCursor();
|
::initContextualCursor();
|
||||||
resetPlotItems();
|
resetPlotItems();
|
||||||
|
@ -2449,7 +2449,7 @@ void CEditor::setMode(TMode mode)
|
||||||
// set new mode in lua
|
// set new mode in lua
|
||||||
_Env.setValue("Mode", "AnimationModeLoading");
|
_Env.setValue("Mode", "AnimationModeLoading");
|
||||||
setUIMode(3);
|
setUIMode(3);
|
||||||
connexionMsg(_ConnexionMsg); // update connexion window
|
connectionMsg(_ConnectionMsg); // update connection window
|
||||||
// ::IgnoreEntityDbUpdates = true;
|
// ::IgnoreEntityDbUpdates = true;
|
||||||
::initContextualCursor();
|
::initContextualCursor();
|
||||||
resetPlotItems();
|
resetPlotItems();
|
||||||
|
@ -2461,7 +2461,7 @@ void CEditor::setMode(TMode mode)
|
||||||
// set new mode in lua
|
// set new mode in lua
|
||||||
_Env.setValue("Mode", "AnimationModeWaitingForLoading");
|
_Env.setValue("Mode", "AnimationModeWaitingForLoading");
|
||||||
setUIMode(3);
|
setUIMode(3);
|
||||||
connexionMsg(_ConnexionMsg); // update connexion window
|
connectionMsg(_ConnectionMsg); // update connection window
|
||||||
// ::IgnoreEntityDbUpdates = true;
|
// ::IgnoreEntityDbUpdates = true;
|
||||||
::initContextualCursor();
|
::initContextualCursor();
|
||||||
resetPlotItems();
|
resetPlotItems();
|
||||||
|
@ -2513,7 +2513,7 @@ void CEditor::setMode(TMode mode)
|
||||||
//set new mode in lua
|
//set new mode in lua
|
||||||
_Env.setValue("Mode", "AnimationModeGoingToDM");
|
_Env.setValue("Mode", "AnimationModeGoingToDM");
|
||||||
setUIMode(3);
|
setUIMode(3);
|
||||||
connexionMsg(_ConnexionMsg); // update connexion window
|
connectionMsg(_ConnectionMsg); // update connection window
|
||||||
::IgnoreEntityDbUpdates = false;
|
::IgnoreEntityDbUpdates = false;
|
||||||
::initContextualCursor();
|
::initContextualCursor();
|
||||||
resetPlotItems();
|
resetPlotItems();
|
||||||
|
@ -6408,11 +6408,11 @@ NLMISC::CAABBox CEditor::getSelectBox(CEntityCL &entity) const
|
||||||
}
|
}
|
||||||
|
|
||||||
// *********************************************************************************************************
|
// *********************************************************************************************************
|
||||||
void CEditor::connexionMsg(const std::string &stringId)
|
void CEditor::connectionMsg(const std::string &stringId)
|
||||||
{
|
{
|
||||||
//H_AUTO(R2_CEditor_connexionMsg)
|
//H_AUTO(R2_CEditor_connectionMsg)
|
||||||
CHECK_EDITOR
|
CHECK_EDITOR
|
||||||
getEditor()._ConnexionMsg = stringId;
|
getEditor()._ConnectionMsg = stringId;
|
||||||
// ignore if current ui desktop is not the third
|
// ignore if current ui desktop is not the third
|
||||||
if (getUI().getMode() != 3) return;
|
if (getUI().getMode() != 3) return;
|
||||||
// show the connection window
|
// show the connection window
|
||||||
|
@ -6489,7 +6489,7 @@ void CEditor::connect()
|
||||||
{
|
{
|
||||||
R2::getEditor().setMode(CEditor::GoingToEditionMode);
|
R2::getEditor().setMode(CEditor::GoingToEditionMode);
|
||||||
}
|
}
|
||||||
CEditor::connexionMsg("uimR2EDGoToEditingMode");
|
CEditor::connectionMsg("uimR2EDGoToEditingMode");
|
||||||
}
|
}
|
||||||
catch (const std::exception& e)
|
catch (const std::exception& e)
|
||||||
{
|
{
|
||||||
|
|
|
@ -527,8 +527,8 @@ public:
|
||||||
CInstance *getInstanceUnderPos(float x, float y, float distSelection, bool &isPlayerUnderCursor);
|
CInstance *getInstanceUnderPos(float x, float y, float distSelection, bool &isPlayerUnderCursor);
|
||||||
// helper : test intersection between an entity and a ray
|
// helper : test intersection between an entity and a ray
|
||||||
static float preciseEntityIntersectionTest(CEntityCL &entity, const NLMISC::CVector &worldRayStart, const NLMISC::CVector &worldRayDir);
|
static float preciseEntityIntersectionTest(CEntityCL &entity, const NLMISC::CVector &worldRayStart, const NLMISC::CVector &worldRayDir);
|
||||||
// Tmp show the connexion window and display a msg in it. An empty msg will close the window
|
// Tmp show the connection window and display a msg in it. An empty msg will close the window
|
||||||
static void connexionMsg(const std::string &stringId);
|
static void connectionMsg(const std::string &stringId);
|
||||||
TEntityCustomSelectBoxMap &getEntityCustomSelectBoxMap() { return _EntityCustomSelectBoxMap; }
|
TEntityCustomSelectBoxMap &getEntityCustomSelectBoxMap() { return _EntityCustomSelectBoxMap; }
|
||||||
// from a pointer on an entity, retrieve its local selection bbox (possibly redefined in r2_ui_custom_boxes_data.lua
|
// from a pointer on an entity, retrieve its local selection bbox (possibly redefined in r2_ui_custom_boxes_data.lua
|
||||||
const NLMISC::CAABBox &getLocalSelectBox(CEntityCL &entity) const;
|
const NLMISC::CAABBox &getLocalSelectBox(CEntityCL &entity) const;
|
||||||
|
@ -955,7 +955,7 @@ private:
|
||||||
|
|
||||||
bool _ClearingContent;
|
bool _ClearingContent;
|
||||||
|
|
||||||
std::string _ConnexionMsg;
|
std::string _ConnectionMsg;
|
||||||
static std::string _ScenarioToLoadWhenEntreringIntoAnimation;
|
static std::string _ScenarioToLoadWhenEntreringIntoAnimation;
|
||||||
static bool _IsStartingScenario; // the scenario is an animation scenario launch from the ring access point
|
static bool _IsStartingScenario; // the scenario is an animation scenario launch from the ring access point
|
||||||
|
|
||||||
|
|
|
@ -639,20 +639,28 @@ bool CConfigFile::foundTemporaryFiles(const QString &directory) const
|
||||||
QStringList filter;
|
QStringList filter;
|
||||||
filter << "*.string_cache";
|
filter << "*.string_cache";
|
||||||
|
|
||||||
|
// certificate should be in gamedev.bnp now
|
||||||
|
filter << "*.pem";
|
||||||
|
|
||||||
|
// only .ref files should be there
|
||||||
|
filter << "exedll*.bnp";
|
||||||
|
|
||||||
if (dir.exists("packedsheets.bnp"))
|
if (dir.exists("packedsheets.bnp"))
|
||||||
{
|
{
|
||||||
filter << "*.packed_sheets";
|
filter << "*.packed_sheets";
|
||||||
filter << "*.packed";
|
filter << "*.packed";
|
||||||
filter << "*.pem";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// temporary files
|
// temporary files
|
||||||
if (!dir.entryList(filter, QDir::Files).isEmpty()) return true;
|
if (!dir.entryList(filter, QDir::Files).isEmpty()) return true;
|
||||||
|
|
||||||
// fonts directory is not needed anymore
|
// temporary directories
|
||||||
if (dir.exists("fonts.bnp") && !dir.cd("fonts")) return true;
|
QStringList dirs = dir.entryList(QDir::Dirs | QDir::NoDotAndDotDot);
|
||||||
|
|
||||||
return false;
|
// fonts directory is not needed anymore if fonts.bnp exists
|
||||||
|
if (!dir.exists("fonts.bnp")) dirs.removeAll("fonts");
|
||||||
|
|
||||||
|
return !dirs.isEmpty();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CConfigFile::shouldCreateDesktopShortcut() const
|
bool CConfigFile::shouldCreateDesktopShortcut() const
|
||||||
|
|
|
@ -91,7 +91,7 @@ void CDownloader::startTimer()
|
||||||
{
|
{
|
||||||
stopTimer();
|
stopTimer();
|
||||||
|
|
||||||
m_timer->setInterval(5000);
|
m_timer->setInterval(30000);
|
||||||
m_timer->setSingleShot(true);
|
m_timer->setSingleShot(true);
|
||||||
m_timer->start();
|
m_timer->start();
|
||||||
}
|
}
|
||||||
|
|
|
@ -60,12 +60,21 @@ bool CFilesCleaner::exec()
|
||||||
filter << "*.packed";
|
filter << "*.packed";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// only .ref files should be there
|
||||||
|
filter << "exedll*.bnp";
|
||||||
|
|
||||||
// temporary files
|
// temporary files
|
||||||
QStringList files = dir.entryList(filter, QDir::Files);
|
QStringList files = dir.entryList(filter, QDir::Files);
|
||||||
|
|
||||||
|
// temporary directories
|
||||||
|
QStringList dirs = dir.entryList(QDir::Dirs | QDir::NoDotAndDotDot);
|
||||||
|
|
||||||
|
// fonts directory is not needed anymore if fonts.bnp exists
|
||||||
|
if (!dir.exists("fonts.bnp")) dirs.removeAll("fonts");
|
||||||
|
|
||||||
if (m_listener)
|
if (m_listener)
|
||||||
{
|
{
|
||||||
m_listener->operationInit(0, files.size());
|
m_listener->operationInit(0, files.size() + dirs.size());
|
||||||
m_listener->operationStart();
|
m_listener->operationStart();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -80,13 +89,20 @@ bool CFilesCleaner::exec()
|
||||||
++filesCount;
|
++filesCount;
|
||||||
}
|
}
|
||||||
|
|
||||||
// fonts directory is not needed anymore if fonts.bnp exists
|
foreach(const QString &d, dirs)
|
||||||
if (dir.exists("fonts.bnp") && dir.cd("fonts"))
|
{
|
||||||
|
if (dir.cd(d))
|
||||||
{
|
{
|
||||||
dir.removeRecursively();
|
dir.removeRecursively();
|
||||||
|
dir.cdUp();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_listener) m_listener->operationSuccess(files.size());
|
if (m_listener) m_listener->operationProgress(filesCount, d);
|
||||||
|
|
||||||
|
++filesCount;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (m_listener) m_listener->operationSuccess(files.size() + dirs.size());
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -71,7 +71,10 @@ COperationDialog::COperationDialog(QWidget *parent):QDialog(parent), m_aborting(
|
||||||
connect(this, SIGNAL(fail(QString)), SLOT(onProgressFail(QString)));
|
connect(this, SIGNAL(fail(QString)), SLOT(onProgressFail(QString)));
|
||||||
connect(this, SIGNAL(done()), SLOT(onDone()));
|
connect(this, SIGNAL(done()), SLOT(onDone()));
|
||||||
|
|
||||||
setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
|
adjustSize();
|
||||||
|
|
||||||
|
// fix height
|
||||||
|
setFixedHeight(height());
|
||||||
|
|
||||||
raise();
|
raise();
|
||||||
}
|
}
|
||||||
|
|
|
@ -238,6 +238,9 @@ bool createLink(const QString &link, const QString &name, const QString &executa
|
||||||
file.write(data.toUtf8());
|
file.write(data.toUtf8());
|
||||||
file.close();
|
file.close();
|
||||||
|
|
||||||
|
// set executable flags to .desktop
|
||||||
|
QFile::setPermissions(path, QFile::permissions(path) | QFile::ExeGroup | QFile::ExeUser | QFile::ExeOther);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -9,12 +9,12 @@
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>400</width>
|
<width>505</width>
|
||||||
<height>106</height>
|
<height>106</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||||
<horstretch>0</horstretch>
|
<horstretch>0</horstretch>
|
||||||
<verstretch>0</verstretch>
|
<verstretch>0</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
|
@ -25,12 +25,6 @@
|
||||||
<height>106</height>
|
<height>106</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="maximumSize">
|
|
||||||
<size>
|
|
||||||
<width>400</width>
|
|
||||||
<height>106</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
<string>Ryzom Installer</string>
|
<string>Ryzom Installer</string>
|
||||||
</property>
|
</property>
|
||||||
|
|
Loading…
Reference in a new issue