|
|
@ -413,7 +413,6 @@ QString CConfigFile::getOldInstallationDirectory()
|
|
|
|
|
|
|
|
|
|
|
|
QString CConfigFile::getOldInstallationLanguage()
|
|
|
|
QString CConfigFile::getOldInstallationLanguage()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
// HKEY_CURRENT_USER/SOFTWARE/Nevrax/RyzomInstall/InstallId=1917716796 (string)
|
|
|
|
|
|
|
|
#if defined(Q_OS_WIN)
|
|
|
|
#if defined(Q_OS_WIN)
|
|
|
|
// NSIS previous official installer
|
|
|
|
// NSIS previous official installer
|
|
|
|
#ifdef Q_OS_WIN64
|
|
|
|
#ifdef Q_OS_WIN64
|
|
|
@ -426,23 +425,21 @@ QString CConfigFile::getOldInstallationLanguage()
|
|
|
|
if (settings.contains("Language"))
|
|
|
|
if (settings.contains("Language"))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
QString languageCode = settings.value("Language").toString();
|
|
|
|
QString languageCode = settings.value("Language").toString();
|
|
|
|
// 1036 = French
|
|
|
|
|
|
|
|
return "";
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return "en";
|
|
|
|
// 1036 = French (France), 1033 = English (USA), 1031 = German
|
|
|
|
#elif defined(Q_OS_MAC)
|
|
|
|
if (languageCode == "1036") return "fr";
|
|
|
|
return "/Applications/Ryzom.app";
|
|
|
|
if (languageCode == "1031") return "de";
|
|
|
|
#else
|
|
|
|
if (languageCode == "1033") return "en";
|
|
|
|
return QStandardPaths::writableLocation(QStandardPaths::HomeLocation) + "/.ryzom";
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return "";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
QString CConfigFile::getNewInstallationLanguage()
|
|
|
|
QString CConfigFile::getNewInstallationLanguage()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
// HKEY_CURRENT_USER/SOFTWARE/Nevrax/RyzomInstall/InstallId=1917716796 (string)
|
|
|
|
|
|
|
|
#if defined(Q_OS_WIN)
|
|
|
|
#if defined(Q_OS_WIN)
|
|
|
|
// NSIS previous official installer
|
|
|
|
// NSIS new official installer
|
|
|
|
#ifdef Q_OS_WIN64
|
|
|
|
#ifdef Q_OS_WIN64
|
|
|
|
// use WOW6432Node in 64 bits (64 bits OS and 64 bits Installer) because Ryzom old installer was in 32 bits
|
|
|
|
// use WOW6432Node in 64 bits (64 bits OS and 64 bits Installer) because Ryzom old installer was in 32 bits
|
|
|
|
QSettings settings("HKEY_LOCAL_MACHINE\\Software\\WOW6432Node\\Nevrax\\Ryzom", QSettings::NativeFormat);
|
|
|
|
QSettings settings("HKEY_LOCAL_MACHINE\\Software\\WOW6432Node\\Nevrax\\Ryzom", QSettings::NativeFormat);
|
|
|
@ -454,14 +451,9 @@ QString CConfigFile::getNewInstallationLanguage()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
return QDir::fromNativeSeparators(settings.value("Ryzom Install Path").toString());
|
|
|
|
return QDir::fromNativeSeparators(settings.value("Ryzom Install Path").toString());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// check default directory if registry key not found
|
|
|
|
|
|
|
|
return CConfigFile::has64bitsOS() ? "C:/Program Files (x86)/Ryzom" : "C:/Program Files/Ryzom";
|
|
|
|
|
|
|
|
#elif defined(Q_OS_MAC)
|
|
|
|
|
|
|
|
return "/Applications/Ryzom.app";
|
|
|
|
|
|
|
|
#else
|
|
|
|
|
|
|
|
return QStandardPaths::writableLocation(QStandardPaths::HomeLocation) + "/.ryzom";
|
|
|
|
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return "";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
QString CConfigFile::getNewInstallationDirectory()
|
|
|
|
QString CConfigFile::getNewInstallationDirectory()
|
|
|
|