mirror of
https://port.numenaute.org/aleajactaest/khanat-code-old.git
synced 2024-12-24 01:38:45 +00:00
Changed: Update Add/Remove program
This commit is contained in:
parent
8c130079a6
commit
d4fc69c0e4
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