mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-11-26 17:16:20 +00:00
Changed: Update Add/Remove program
--HG-- branch : develop
This commit is contained in:
parent
7b6dd8f031
commit
50d73127cb
2 changed files with 32 additions and 0 deletions
|
@ -975,6 +975,37 @@ bool COperationDialog::createAddRemoveEntry()
|
|||
return true;
|
||||
}
|
||||
|
||||
bool COperationDialog::updateAddRemoveEntry()
|
||||
{
|
||||
CConfigFile *config = CConfigFile::getInstance();
|
||||
|
||||
const CServer &server = config->getServer();
|
||||
|
||||
QString oldInstallerFilename = server.clientFilenameOld;
|
||||
QString newInstallerFilename = server.installerFilename;
|
||||
|
||||
if (!oldInstallerFilename.isEmpty() && !newInstallerFilename.isEmpty())
|
||||
{
|
||||
QString oldInstallerFullPath = config->getSrcServerDirectory() + "/" + oldInstallerFilename;
|
||||
QString newInstallerFullPath = config->getInstallationDirectory() + "/" + newInstallerFilename;
|
||||
|
||||
if (QFile::exists(newInstallerFullPath))
|
||||
{
|
||||
#ifdef Q_OS_WIN
|
||||
QSettings settings("HKEY_CURRENT_USER\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\Ryzom", QSettings::NativeFormat);
|
||||
QStringList versionTokens = QApplication::applicationVersion().split('.');
|
||||
|
||||
settings.setValue("DisplayVersion", QApplication::applicationVersion());
|
||||
settings.setValue("EstimatedSize", getDirectorySize(config->getInstallationDirectory()));
|
||||
settings.setValue("MajorVersion", versionTokens[0].toInt());
|
||||
settings.setValue("MinorVersion", versionTokens[1].toInt());
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool COperationDialog::deleteAddRemoveEntry()
|
||||
{
|
||||
#ifdef Q_OS_WIN
|
||||
|
|
|
@ -107,6 +107,7 @@ protected:
|
|||
bool createClientMenuShortcut(const QString &profileId);
|
||||
|
||||
bool createAddRemoveEntry();
|
||||
bool updateAddRemoveEntry();
|
||||
bool deleteAddRemoveEntry();
|
||||
|
||||
void addComponentsServers();
|
||||
|
|
Loading…
Reference in a new issue