mirror of
https://port.numenaute.org/aleajactaest/khanat-code-old.git
synced 2024-11-26 08:46:19 +00:00
Changed: Always copy installer if different, see #279
This commit is contained in:
parent
51cff76ce2
commit
0cb718f37b
1 changed files with 17 additions and 15 deletions
|
@ -713,8 +713,7 @@ void COperationDialog::copyInstaller()
|
||||||
QString oldInstallerFullPath = QApplication::applicationFilePath();
|
QString oldInstallerFullPath = QApplication::applicationFilePath();
|
||||||
QString newInstallerFullPath = config->getInstallationDirectory() + "/" + newInstallerFilename;
|
QString newInstallerFullPath = config->getInstallationDirectory() + "/" + newInstallerFilename;
|
||||||
|
|
||||||
if (!QFile::exists(newInstallerFullPath))
|
// always copy new installers
|
||||||
{
|
|
||||||
CFilesCopier copier(this);
|
CFilesCopier copier(this);
|
||||||
copier.setIncludeFilter(config->getInstallerRequiredFiles());
|
copier.setIncludeFilter(config->getInstallerRequiredFiles());
|
||||||
copier.addFile(oldInstallerFullPath);
|
copier.addFile(oldInstallerFullPath);
|
||||||
|
@ -728,9 +727,12 @@ void COperationDialog::copyInstaller()
|
||||||
// rename old filename if different
|
// rename old filename if different
|
||||||
if (oldInstallerFullPath != newInstallerFullPath)
|
if (oldInstallerFullPath != newInstallerFullPath)
|
||||||
{
|
{
|
||||||
|
// delete previous installer
|
||||||
|
QFile::remove(newInstallerFullPath);
|
||||||
|
|
||||||
|
// rename new installer with final name
|
||||||
QFile::rename(oldInstallerFullPath, newInstallerFullPath);
|
QFile::rename(oldInstallerFullPath, newInstallerFullPath);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// create menu directory if defined
|
// create menu directory if defined
|
||||||
QString path = config->getMenuDirectory();
|
QString path = config->getMenuDirectory();
|
||||||
|
|
Loading…
Reference in a new issue