mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-11-17 04:51:52 +00:00
Changed: Don't copy twice the same file under other platforms than Windows
This commit is contained in:
parent
b860ae4428
commit
31efed9b17
1 changed files with 13 additions and 2 deletions
|
@ -734,13 +734,23 @@ void COperationDialog::copyInstaller()
|
|||
|
||||
if (!newInstallerFullPath.isEmpty())
|
||||
{
|
||||
QString srcDir = config->getSrcServerDirectory();
|
||||
|
||||
if (srcDir.isEmpty()) srcDir = config->getInstallerCurrentDirPath();
|
||||
|
||||
// always copy new installers
|
||||
CFilesCopier copier(this);
|
||||
copier.setIncludeFilter(config->getInstallerRequiredFiles());
|
||||
#ifdef Q_OS_WIN32
|
||||
copier.addFile(oldInstallerFullPath);
|
||||
copier.setSourceDirectory(config->getSrcServerDirectory().isEmpty() ? QApplication::applicationDirPath():config->getSrcServerDirectory());
|
||||
#endif
|
||||
copier.setSourceDirectory(srcDir);
|
||||
copier.setDestinationDirectory(config->getInstallationDirectory());
|
||||
copier.exec();
|
||||
|
||||
if (!copier.exec()) return;
|
||||
|
||||
#ifdef Q_OS_WIN32
|
||||
// only happens under Windows in Debug or when migrating
|
||||
|
||||
// copied file
|
||||
oldInstallerFullPath = config->getInstallationDirectory() + "/" + QFileInfo(oldInstallerFullPath).fileName();
|
||||
|
@ -754,6 +764,7 @@ void COperationDialog::copyInstaller()
|
|||
// rename new installer with final name
|
||||
QFile::rename(oldInstallerFullPath, newInstallerFullPath);
|
||||
}
|
||||
#endif
|
||||
|
||||
// create menu directory if defined
|
||||
QString path = config->getMenuDirectory();
|
||||
|
|
Loading…
Reference in a new issue