mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-11-10 09:19:01 +00:00
Changed: Update Add/Remove program
This commit is contained in:
parent
b7c634fd72
commit
19aeadc732
2 changed files with 32 additions and 0 deletions
|
@ -975,6 +975,37 @@ bool COperationDialog::createAddRemoveEntry()
|
||||||
return true;
|
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()
|
bool COperationDialog::deleteAddRemoveEntry()
|
||||||
{
|
{
|
||||||
#ifdef Q_OS_WIN
|
#ifdef Q_OS_WIN
|
||||||
|
|
|
@ -107,6 +107,7 @@ protected:
|
||||||
bool createClientMenuShortcut(const QString &profileId);
|
bool createClientMenuShortcut(const QString &profileId);
|
||||||
|
|
||||||
bool createAddRemoveEntry();
|
bool createAddRemoveEntry();
|
||||||
|
bool updateAddRemoveEntry();
|
||||||
bool deleteAddRemoveEntry();
|
bool deleteAddRemoveEntry();
|
||||||
|
|
||||||
void addComponentsServers();
|
void addComponentsServers();
|
||||||
|
|
Loading…
Reference in a new issue