mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-12-29 20:30:54 +00:00
Changed: Return language selected in old installer
--HG-- branch : develop
This commit is contained in:
parent
0943b2889c
commit
43b658e815
1 changed files with 10 additions and 18 deletions
|
@ -413,7 +413,6 @@ QString CConfigFile::getOldInstallationDirectory()
|
|||
|
||||
QString CConfigFile::getOldInstallationLanguage()
|
||||
{
|
||||
// HKEY_CURRENT_USER/SOFTWARE/Nevrax/RyzomInstall/InstallId=1917716796 (string)
|
||||
#if defined(Q_OS_WIN)
|
||||
// NSIS previous official installer
|
||||
#ifdef Q_OS_WIN64
|
||||
|
@ -426,23 +425,21 @@ QString CConfigFile::getOldInstallationLanguage()
|
|||
if (settings.contains("Language"))
|
||||
{
|
||||
QString languageCode = settings.value("Language").toString();
|
||||
// 1036 = French
|
||||
return "";
|
||||
}
|
||||
|
||||
return "en";
|
||||
#elif defined(Q_OS_MAC)
|
||||
return "/Applications/Ryzom.app";
|
||||
#else
|
||||
return QStandardPaths::writableLocation(QStandardPaths::HomeLocation) + "/.ryzom";
|
||||
// 1036 = French (France), 1033 = English (USA), 1031 = German
|
||||
if (languageCode == "1036") return "fr";
|
||||
if (languageCode == "1031") return "de";
|
||||
if (languageCode == "1033") return "en";
|
||||
}
|
||||
#endif
|
||||
|
||||
return "";
|
||||
}
|
||||
|
||||
QString CConfigFile::getNewInstallationLanguage()
|
||||
{
|
||||
// HKEY_CURRENT_USER/SOFTWARE/Nevrax/RyzomInstall/InstallId=1917716796 (string)
|
||||
#if defined(Q_OS_WIN)
|
||||
// NSIS previous official installer
|
||||
// NSIS new official installer
|
||||
#ifdef Q_OS_WIN64
|
||||
// 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);
|
||||
|
@ -454,14 +451,9 @@ QString CConfigFile::getNewInstallationLanguage()
|
|||
{
|
||||
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
|
||||
|
||||
return "";
|
||||
}
|
||||
|
||||
QString CConfigFile::getNewInstallationDirectory()
|
||||
|
|
Loading…
Reference in a new issue