mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-11-17 13:01:42 +00:00
Changed: Don't try to copy Installer several times (if it fails once, it'll fail forever)
This commit is contained in:
parent
0086afcee9
commit
24511485d0
3 changed files with 11 additions and 4 deletions
|
@ -25,7 +25,7 @@
|
|||
CConfigFile *CConfigFile::s_instance = NULL;
|
||||
|
||||
CConfigFile::CConfigFile(QObject *parent):QObject(parent), m_version(-1),
|
||||
m_defaultServerIndex(0), m_defaultProfileIndex(0), m_use64BitsClient(false), m_shouldUninstallOldClient(true)
|
||||
m_defaultServerIndex(0), m_defaultProfileIndex(0), m_installerCopied(false), m_use64BitsClient(false), m_shouldUninstallOldClient(true)
|
||||
{
|
||||
s_instance = this;
|
||||
|
||||
|
@ -945,8 +945,8 @@ OperationStep CConfigFile::getInstallNextStep() const
|
|||
}
|
||||
}
|
||||
|
||||
// current installer more recent than installed one
|
||||
if (compareInstallersVersion() == 1) return CopyInstaller;
|
||||
// current installer more recent than installed one and not already copied
|
||||
if (!m_installerCopied && compareInstallersVersion() == 1) return CopyInstaller;
|
||||
|
||||
// no default profile
|
||||
if (profile.id.isEmpty())
|
||||
|
@ -992,7 +992,7 @@ OperationStep CConfigFile::getInstallNextStep() const
|
|||
// current installer more recent than installed one
|
||||
switch (compareInstallersVersion())
|
||||
{
|
||||
// current installer more recent, copy it
|
||||
// current installer more recent, should be already copied
|
||||
case 1: break;
|
||||
|
||||
// current installer older, launch the more recent installer
|
||||
|
|
|
@ -57,6 +57,9 @@ public:
|
|||
|
||||
QString getLanguage() const { return m_language; }
|
||||
|
||||
bool getInstallerCopied() const { return m_installerCopied; }
|
||||
void setInstallerCopied(bool copied) { m_installerCopied = copied; }
|
||||
|
||||
int getProfilesCount() const;
|
||||
CProfile getProfile(int i = -1) const;
|
||||
CProfile getProfile(const QString &id) const;
|
||||
|
@ -145,6 +148,7 @@ private:
|
|||
int m_version;
|
||||
int m_defaultServerIndex;
|
||||
int m_defaultProfileIndex;
|
||||
bool m_installerCopied;
|
||||
|
||||
CServers m_servers;
|
||||
CProfiles m_profiles;
|
||||
|
|
|
@ -791,6 +791,9 @@ void COperationDialog::copyInstaller()
|
|||
#endif
|
||||
|
||||
createShortcut(shortcut, name, executable, "", icon, "");
|
||||
|
||||
// installer already copied, don't need to copy it again
|
||||
config->setInstallerCopied(true);
|
||||
}
|
||||
|
||||
emit done();
|
||||
|
|
Loading…
Reference in a new issue