Merge with develop

--HG--
branch : compatibility-develop
This commit is contained in:
kervala 2016-09-28 23:55:21 +02:00
commit ac9dcd663d
16 changed files with 82 additions and 55 deletions

View file

@ -48,7 +48,7 @@ public:
/// Constructor
CPacsClient()
{
// No connexion
// No connection
_Server=NULL;
}
@ -567,7 +567,7 @@ static TCallbackItem PacsCallbackArray[] =
inline bool CPacsClient::connect ()
{
// Create a connexion
// Create a connection
_Server = new CCallbackClient;
// Look up for PACS service

View file

@ -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())
{
// check if an icon is present in current directory

View file

@ -203,8 +203,7 @@ void CBarManager::initInGame()
i++;
nlassert(i==MaxTeamMember);
// *** create connexion to the Local Output database
// *** create connection to the Local Output database
for(i=0;i<_EntryBars[TeamMemberType].size();i++)
{
// don't connect FOCUS, since not setuped by SERVER
@ -214,6 +213,7 @@ void CBarManager::initInGame()
"PRESENT",
"HP", "SAP", "STA", "");
}
for(i=0;i<_EntryBars[AnimalType].size();i++)
{
// don't connect STA, SAP and FOCUS for animal, since they don't have
@ -223,6 +223,7 @@ void CBarManager::initInGame()
"STATUS",
"HP", "", "", "");
}
nlassert(_EntryBars[TargetType].size()==1);
_EntryBars[TargetType][0].connectDB(
"SERVER:TARGET:BARS:",
@ -243,7 +244,7 @@ void CBarManager::initInGame()
_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
nlctassert(SCORES::NUM_SCORES==4);
// Input max values
@ -308,7 +309,7 @@ void CBarManager::addEntry(TEntryType type, uint entryId, uint dataSetId)
// Add me to list of entries
CBarDataEntry &bde= entryArray[entryId];
bde.DataSetId= dataSetId;
// Add the entry connexion to map by DataSetId
// Add the entry connection to map by DataSetId
CBarDataUID &barUID= _UIDBars[dataSetId];
barUID.EntryId[type].insert(entryId);
@ -340,7 +341,7 @@ void CBarManager::delEntry(TEntryType type, uint entryId)
{
// then unconnect this from the map by UID
_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())
{
// erase it

View file

@ -173,7 +173,7 @@ private:
class CBarDataUID
{
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
* 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
@ -207,7 +207,7 @@ private:
TUIDToDatas _UIDBars;
// *** Data sorted by connexion Id (duplication for faster access...)
// *** Data sorted by connection Id (duplication for faster access...)
class CBarDataEntry
{
public:

View file

@ -828,7 +828,7 @@ void updateGameQuitting()
// if want quiting, and if server stalled, quit now
if(game_exit_request)
{
// abort until 10 seconds if connexion lost
// abort until 10 seconds if connection lost
if(!NetMngr.getConnectionQuality())
{
if(!firstTimeLostConnection)
@ -839,7 +839,7 @@ void updateGameQuitting()
firstTimeLostConnection= 0;
}
// if connexion lost until 10 seconds
// if connection lost until 10 seconds
if(firstTimeLostConnection && T1-firstTimeLostConnection > 10000)
{
game_exit= true;

View file

@ -539,7 +539,7 @@ bool CClientEditionModule::onProcessModuleMessage(IModuleProxy *senderModuleProx
if (operationName == "ADV_CONN")
{
CEditor::connexionMsg("");
CEditor::connectionMsg("");
CClientMessageAdventureUserConnection bodyConnection;
nlRead(message,serial,bodyConnection);
onRingAccessUpdated(0, bodyConnection.RingAccess);
@ -1048,7 +1048,7 @@ void CClientEditionModule::startScenario(class NLNET::IModuleProxy * proxy, bool
this->connectAnimationModePlay();
CEditor::connexionMsg("");
CEditor::connectionMsg("");
if (_CharMode == TCharMode::Dm)
{
@ -1069,7 +1069,7 @@ void CClientEditionModule::startScenario(class NLNET::IModuleProxy * proxy, bool
}
else
{
CEditor::connexionMsg("uiR2EDR2StartTestError");
CEditor::connectionMsg("uiR2EDR2StartTestError");
requestReconnection();
}
@ -1190,12 +1190,8 @@ void CClientEditionModule::startingScenario(class NLNET::IModuleProxy * /* serve
}
CEditor::connexionMsg(connectionState);
CEditor::connectionMsg(connectionState);
}
}
bool CClientEditionModule::requestStartScenario()
@ -1204,7 +1200,7 @@ bool CClientEditionModule::requestStartScenario()
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\")");
CShareServerEditionItfProxy proxy(_ServerEditionProxy);

View file

@ -724,7 +724,7 @@ void CDynamicMapClient::onEditionModeConnected( uint32 userSlotId, uint32 /* adv
_EditionModule->getCurrentScenario()->setSessionType(st_edit);
scenarioUpdated(highLevel, willTP, initialActIndex); // handle by CEditor.cpp that call _EditionModule->updateScenario(highLevel);
CEditor::connexionMsg("");
CEditor::connectionMsg("");
//_EditionModule->requestSetPioneerRight( TPioneerRight::DM);
}
@ -778,13 +778,13 @@ void CDynamicMapClient::onResetEditionMode()
void CDynamicMapClient::onTestModeConnected()
{
//H_AUTO(R2_CDynamicMapClient_onTestModeConnected)
CEditor::connexionMsg("");
CEditor::connectionMsg("");
}
void CDynamicMapClient::onTestModeDisconnected(TSessionId /* sessionId */, uint32 /* lasAct */, TScenarioSessionType /* sessionType */)
{
//H_AUTO(R2_CDynamicMapClient_onTestModeDisconnected)
CEditor::connexionMsg("uimR2EDGoToEditingMode");
CEditor::connectionMsg("uimR2EDGoToEditingMode");
}
CObject* CDynamicMapClient::getCurrentScenarioHighLevel()

View file

@ -2425,7 +2425,7 @@ void CEditor::setMode(TMode mode)
// set new mode in lua
_Env.setValue("Mode", "GoingToDM");
setUIMode(3);
connexionMsg(_ConnexionMsg); // update connexion window
connectionMsg(_ConnectionMsg); // update connection window
::IgnoreEntityDbUpdates = false;
::initContextualCursor();
nlassert(CDisplayerBase::ObjCount == 0);
@ -2437,7 +2437,7 @@ void CEditor::setMode(TMode mode)
// set new mode in lua
_Env.setValue("Mode", "BackToEditing");
setUIMode(3);
connexionMsg(_ConnexionMsg); // update connexion window
connectionMsg(_ConnectionMsg); // update connection window
::IgnoreEntityDbUpdates = true;
::initContextualCursor();
resetPlotItems();
@ -2449,7 +2449,7 @@ void CEditor::setMode(TMode mode)
// set new mode in lua
_Env.setValue("Mode", "AnimationModeLoading");
setUIMode(3);
connexionMsg(_ConnexionMsg); // update connexion window
connectionMsg(_ConnectionMsg); // update connection window
// ::IgnoreEntityDbUpdates = true;
::initContextualCursor();
resetPlotItems();
@ -2461,7 +2461,7 @@ void CEditor::setMode(TMode mode)
// set new mode in lua
_Env.setValue("Mode", "AnimationModeWaitingForLoading");
setUIMode(3);
connexionMsg(_ConnexionMsg); // update connexion window
connectionMsg(_ConnectionMsg); // update connection window
// ::IgnoreEntityDbUpdates = true;
::initContextualCursor();
resetPlotItems();
@ -2513,7 +2513,7 @@ void CEditor::setMode(TMode mode)
//set new mode in lua
_Env.setValue("Mode", "AnimationModeGoingToDM");
setUIMode(3);
connexionMsg(_ConnexionMsg); // update connexion window
connectionMsg(_ConnectionMsg); // update connection window
::IgnoreEntityDbUpdates = false;
::initContextualCursor();
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
getEditor()._ConnexionMsg = stringId;
getEditor()._ConnectionMsg = stringId;
// ignore if current ui desktop is not the third
if (getUI().getMode() != 3) return;
// show the connection window
@ -6489,7 +6489,7 @@ void CEditor::connect()
{
R2::getEditor().setMode(CEditor::GoingToEditionMode);
}
CEditor::connexionMsg("uimR2EDGoToEditingMode");
CEditor::connectionMsg("uimR2EDGoToEditingMode");
}
catch (const std::exception& e)
{

View file

@ -527,8 +527,8 @@ public:
CInstance *getInstanceUnderPos(float x, float y, float distSelection, bool &isPlayerUnderCursor);
// helper : test intersection between an entity and a ray
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
static void connexionMsg(const std::string &stringId);
// Tmp show the connection window and display a msg in it. An empty msg will close the window
static void connectionMsg(const std::string &stringId);
TEntityCustomSelectBoxMap &getEntityCustomSelectBoxMap() { return _EntityCustomSelectBoxMap; }
// 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;
@ -955,7 +955,7 @@ private:
bool _ClearingContent;
std::string _ConnexionMsg;
std::string _ConnectionMsg;
static std::string _ScenarioToLoadWhenEntreringIntoAnimation;
static bool _IsStartingScenario; // the scenario is an animation scenario launch from the ring access point

View file

@ -639,20 +639,28 @@ bool CConfigFile::foundTemporaryFiles(const QString &directory) const
QStringList filter;
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"))
{
filter << "*.packed_sheets";
filter << "*.packed";
filter << "*.pem";
}
// temporary files
if (!dir.entryList(filter, QDir::Files).isEmpty()) return true;
// fonts directory is not needed anymore
if (dir.exists("fonts.bnp") && !dir.cd("fonts")) return true;
// temporary directories
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

View file

@ -91,7 +91,7 @@ void CDownloader::startTimer()
{
stopTimer();
m_timer->setInterval(5000);
m_timer->setInterval(30000);
m_timer->setSingleShot(true);
m_timer->start();
}

View file

@ -60,12 +60,21 @@ bool CFilesCleaner::exec()
filter << "*.packed";
}
// only .ref files should be there
filter << "exedll*.bnp";
// temporary 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)
{
m_listener->operationInit(0, files.size());
m_listener->operationInit(0, files.size() + dirs.size());
m_listener->operationStart();
}
@ -80,13 +89,20 @@ bool CFilesCleaner::exec()
++filesCount;
}
// fonts directory is not needed anymore if fonts.bnp exists
if (dir.exists("fonts.bnp") && dir.cd("fonts"))
foreach(const QString &d, dirs)
{
if (dir.cd(d))
{
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;
}

View file

@ -71,7 +71,10 @@ COperationDialog::COperationDialog(QWidget *parent):QDialog(parent), m_aborting(
connect(this, SIGNAL(fail(QString)), SLOT(onProgressFail(QString)));
connect(this, SIGNAL(done()), SLOT(onDone()));
setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
adjustSize();
// fix height
setFixedHeight(height());
raise();
}

View file

@ -238,6 +238,9 @@ bool createLink(const QString &link, const QString &name, const QString &executa
file.write(data.toUtf8());
file.close();
// set executable flags to .desktop
QFile::setPermissions(path, QFile::permissions(path) | QFile::ExeGroup | QFile::ExeUser | QFile::ExeOther);
return true;
}

View file

@ -9,12 +9,12 @@
<rect>
<x>0</x>
<y>0</y>
<width>400</width>
<width>505</width>
<height>106</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
@ -25,12 +25,6 @@
<height>106</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>400</width>
<height>106</height>
</size>
</property>
<property name="windowTitle">
<string>Ryzom Installer</string>
</property>