|
|
@ -734,13 +734,23 @@ void COperationDialog::copyInstaller()
|
|
|
|
|
|
|
|
|
|
|
|
if (!newInstallerFullPath.isEmpty())
|
|
|
|
if (!newInstallerFullPath.isEmpty())
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
QString srcDir = config->getSrcServerDirectory();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (srcDir.isEmpty()) srcDir = config->getInstallerCurrentDirPath();
|
|
|
|
|
|
|
|
|
|
|
|
// always copy new installers
|
|
|
|
// always copy new installers
|
|
|
|
CFilesCopier copier(this);
|
|
|
|
CFilesCopier copier(this);
|
|
|
|
copier.setIncludeFilter(config->getInstallerRequiredFiles());
|
|
|
|
copier.setIncludeFilter(config->getInstallerRequiredFiles());
|
|
|
|
|
|
|
|
#ifdef Q_OS_WIN32
|
|
|
|
copier.addFile(oldInstallerFullPath);
|
|
|
|
copier.addFile(oldInstallerFullPath);
|
|
|
|
copier.setSourceDirectory(config->getSrcServerDirectory().isEmpty() ? QApplication::applicationDirPath():config->getSrcServerDirectory());
|
|
|
|
#endif
|
|
|
|
|
|
|
|
copier.setSourceDirectory(srcDir);
|
|
|
|
copier.setDestinationDirectory(config->getInstallationDirectory());
|
|
|
|
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
|
|
|
|
// copied file
|
|
|
|
oldInstallerFullPath = config->getInstallationDirectory() + "/" + QFileInfo(oldInstallerFullPath).fileName();
|
|
|
|
oldInstallerFullPath = config->getInstallationDirectory() + "/" + QFileInfo(oldInstallerFullPath).fileName();
|
|
|
@ -754,6 +764,7 @@ void COperationDialog::copyInstaller()
|
|
|
|
// rename new installer with final name
|
|
|
|
// rename new installer with final name
|
|
|
|
QFile::rename(oldInstallerFullPath, newInstallerFullPath);
|
|
|
|
QFile::rename(oldInstallerFullPath, newInstallerFullPath);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
// create menu directory if defined
|
|
|
|
// create menu directory if defined
|
|
|
|
QString path = config->getMenuDirectory();
|
|
|
|
QString path = config->getMenuDirectory();
|
|
|
|