Merge with develop

--HG--
branch : compatibility-develop
hg/compatibility-develop
kervala 8 years ago
commit c3c377e4a6

@ -72,9 +72,6 @@ INelContext::~INelContext()
CInstanceCounterLocalManager::releaseInstance(); CInstanceCounterLocalManager::releaseInstance();
// uninit some systems stuff
CSystemUtils::uninit();
_NelContext = NULL; _NelContext = NULL;
*(_getInstance()) = NULL; *(_getInstance()) = NULL;
} }
@ -94,9 +91,6 @@ void INelContext::contextReady()
// set numeric locale to C to avoid the use of decimal separators different of a dot // set numeric locale to C to avoid the use of decimal separators different of a dot
char *locale = setlocale(LC_NUMERIC, "C"); char *locale = setlocale(LC_NUMERIC, "C");
// init some systems stuff
CSystemUtils::init();
// register any pending thinks // register any pending thinks
// register local instance counter in the global instance counter manager // register local instance counter in the global instance counter manager

@ -1148,6 +1148,7 @@ void prelogInit()
Driver->setSwapVBLInterval(0); Driver->setSwapVBLInterval(0);
// initialize system utils class // initialize system utils class
CSystemUtils::init();
CSystemUtils::setWindow(Driver->getDisplay()); CSystemUtils::setWindow(Driver->getDisplay());
CLoginProgressPostThread::getInstance().step(CLoginStep(LoginStep_VideoModeSetupHighColor, "login_step_video_mode_setup_high_color")); CLoginProgressPostThread::getInstance().step(CLoginStep(LoginStep_VideoModeSetupHighColor, "login_step_video_mode_setup_high_color"));

@ -556,6 +556,7 @@ void release()
// restore screensaver state // restore screensaver state
CSystemUtils::enableScreensaver(LastScreenSaverEnabled); CSystemUtils::enableScreensaver(LastScreenSaverEnabled);
CSystemUtils::uninit();
// release PACS primitives // release PACS primitives
deletePrimitiveBlocks(); deletePrimitiveBlocks();
@ -663,9 +664,6 @@ void release()
NLGUI::CDBManager::release(); NLGUI::CDBManager::release();
CWidgetManager::release(); CWidgetManager::release();
#if FINAL_VERSION #if FINAL_VERSION
// openURL ("http://ryzom.com/exit/"); // openURL ("http://ryzom.com/exit/");
#endif #endif

@ -307,7 +307,16 @@ QString CConfigFile::getDesktopDirectory() const
QString CConfigFile::getMenuDirectory() const QString CConfigFile::getMenuDirectory() const
{ {
return QStandardPaths::writableLocation(QStandardPaths::ApplicationsLocation) + "/" + QApplication::applicationName(); QString applicationLocation;
#ifdef O_OS_MAC
// QStandardPaths::ApplicationsLocation returns read-only location so fix it, will be installed in ~/Applications
applicationLocation = QStandardPaths::writableLocation(QStandardPaths::HomeLocation) + "/Applications";
#else
applicationLocation = QStandardPaths::writableLocation(QStandardPaths::ApplicationsLocation);
#endif
return applicationLocation + "/" + QApplication::applicationName();
} }
bool CConfigFile::has64bitsOS() bool CConfigFile::has64bitsOS()

@ -91,6 +91,8 @@
bool Set7zFileAttrib(const QString &filename, uint32 fileAttributes) bool Set7zFileAttrib(const QString &filename, uint32 fileAttributes)
{ {
if (filename.isEmpty()) return false;
bool attrReadOnly = (fileAttributes & FILE_ATTRIBUTE_READONLY) != 0; bool attrReadOnly = (fileAttributes & FILE_ATTRIBUTE_READONLY) != 0;
bool attrHidden = (fileAttributes & FILE_ATTRIBUTE_HIDDEN) != 0; bool attrHidden = (fileAttributes & FILE_ATTRIBUTE_HIDDEN) != 0;
bool attrSystem = (fileAttributes & FILE_ATTRIBUTE_SYSTEM) != 0; bool attrSystem = (fileAttributes & FILE_ATTRIBUTE_SYSTEM) != 0;
@ -114,7 +116,7 @@ bool Set7zFileAttrib(const QString &filename, uint32 fileAttributes)
#ifdef Q_OS_WIN #ifdef Q_OS_WIN
SetFileAttributesW((wchar_t*)filename.utf16(), windowsAttributes); SetFileAttributesW((wchar_t*)filename.utf16(), windowsAttributes);
#else #else
const char *name = filename.toUtf8().constData(); std::string name = filename.toUtf8().constData();
mode_t current_umask = umask(0); // get and set the umask mode_t current_umask = umask(0); // get and set the umask
umask(current_umask); // restore the umask umask(current_umask); // restore the umask
@ -122,9 +124,9 @@ bool Set7zFileAttrib(const QString &filename, uint32 fileAttributes)
struct stat stat_info; struct stat stat_info;
if (lstat(name, &stat_info) != 0) if (lstat(name.c_str(), &stat_info) != 0)
{ {
nlwarning("Unable to get file attributes for %s", name); nlwarning("Unable to get file attributes for %s", name.c_str());
return false; return false;
} }
@ -137,13 +139,13 @@ bool Set7zFileAttrib(const QString &filename, uint32 fileAttributes)
{ {
if (S_ISREG(stat_info.st_mode)) if (S_ISREG(stat_info.st_mode))
{ {
chmod(name, stat_info.st_mode & mask); chmod(name.c_str(), stat_info.st_mode & mask);
} }
else if (S_ISDIR(stat_info.st_mode)) else if (S_ISDIR(stat_info.st_mode))
{ {
// user/7za must be able to create files in this directory // user/7za must be able to create files in this directory
stat_info.st_mode |= (S_IRUSR | S_IWUSR | S_IXUSR); stat_info.st_mode |= (S_IRUSR | S_IWUSR | S_IXUSR);
chmod(name, stat_info.st_mode & mask); chmod(name.c_str(), stat_info.st_mode & mask);
} }
} }
} }
@ -156,7 +158,7 @@ bool Set7zFileAttrib(const QString &filename, uint32 fileAttributes)
// octal!, clear write permission bits // octal!, clear write permission bits
stat_info.st_mode &= ~0222; stat_info.st_mode &= ~0222;
chmod(name, stat_info.st_mode & mask); chmod(name.c_str(), stat_info.st_mode & mask);
} }
#endif #endif

@ -69,12 +69,6 @@ Just follow the different steps and make your choice between the options presen
</item> </item>
<item> <item>
<widget class="QFrame" name="advancedFrame"> <widget class="QFrame" name="advancedFrame">
<property name="frameShape">
<enum>QFrame::StyledPanel</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Raised</enum>
</property>
<layout class="QVBoxLayout" name="advancedMainLayout"> <layout class="QVBoxLayout" name="advancedMainLayout">
<property name="spacing"> <property name="spacing">
<number>6</number> <number>6</number>

@ -57,12 +57,6 @@ p, li { white-space: pre-wrap; }
</item> </item>
<item> <item>
<widget class="QFrame" name="configurationFrame"> <widget class="QFrame" name="configurationFrame">
<property name="frameShape">
<enum>QFrame::StyledPanel</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Raised</enum>
</property>
<layout class="QHBoxLayout" name="configurationLayout" stretch="1,0,0"> <layout class="QHBoxLayout" name="configurationLayout" stretch="1,0,0">
<property name="leftMargin"> <property name="leftMargin">
<number>0</number> <number>0</number>

@ -66,12 +66,6 @@ Just press Continue button and follow the different steps until everything is do
</item> </item>
<item> <item>
<widget class="QFrame" name="advancedFrame"> <widget class="QFrame" name="advancedFrame">
<property name="frameShape">
<enum>QFrame::StyledPanel</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Raised</enum>
</property>
<layout class="QVBoxLayout" name="advancedMainLayout"> <layout class="QVBoxLayout" name="advancedMainLayout">
<property name="spacing"> <property name="spacing">
<number>6</number> <number>6</number>

Loading…
Cancel
Save