mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-11-17 04:51:52 +00:00
Changed: Use getInstallerCurrentFilePath() instead of QApplication::applicationFilePath()
--HG-- branch : develop
This commit is contained in:
parent
0101cdfacf
commit
48f013a86e
5 changed files with 6 additions and 12 deletions
|
@ -492,11 +492,6 @@ QString CConfigFile::getParentDirectory()
|
|||
return current.absolutePath();
|
||||
}
|
||||
|
||||
QString CConfigFile::getApplicationDirectory()
|
||||
{
|
||||
return QApplication::applicationDirPath();
|
||||
}
|
||||
|
||||
QString CConfigFile::getOldInstallationDirectory()
|
||||
{
|
||||
// HKEY_CURRENT_USER/SOFTWARE/Nevrax/RyzomInstall/InstallId=1917716796 (string)
|
||||
|
@ -818,7 +813,7 @@ QStringList CConfigFile::getInstallerRequiredFiles() const
|
|||
#endif
|
||||
|
||||
// include current executable
|
||||
files << QFileInfo(QApplication::applicationFilePath()).fileName();
|
||||
files << QFileInfo(getInstallerCurrentFilePath()).fileName();
|
||||
#elif defined(Q_OS_MAC)
|
||||
// everything is in a directory
|
||||
files << "Ryzom Installer.app";
|
||||
|
@ -827,7 +822,7 @@ QStringList CConfigFile::getInstallerRequiredFiles() const
|
|||
files << "ryzom_installer.png";
|
||||
|
||||
// include current executable
|
||||
files << QFileInfo(QApplication::applicationFilePath()).fileName();
|
||||
files << QFileInfo(getInstallerCurrentFilePath()).fileName();
|
||||
#endif
|
||||
|
||||
return files;
|
||||
|
@ -875,7 +870,7 @@ OperationStep CConfigFile::getInstallNextStep() const
|
|||
if (!isRyzomInstalledIn(currentDirectory))
|
||||
{
|
||||
// Ryzom is in the same directory as Ryzom Installer
|
||||
currentDirectory = getApplicationDirectory();
|
||||
currentDirectory = getInstallerCurrentDirPath();
|
||||
|
||||
if (!isRyzomInstalledIn(currentDirectory))
|
||||
{
|
||||
|
|
|
@ -90,7 +90,6 @@ public:
|
|||
// default directories
|
||||
static QString getCurrentDirectory();
|
||||
static QString getParentDirectory();
|
||||
static QString getApplicationDirectory();
|
||||
static QString getOldInstallationDirectory();
|
||||
static QString getNewInstallationDirectory();
|
||||
static QString getOldInstallationLanguage();
|
||||
|
|
|
@ -180,7 +180,7 @@ int main(int argc, char *argv[])
|
|||
// copy installer and required files to TEMP directory
|
||||
if (QDir().mkdir(tempPath) && copyInstallerFiles(config.getInstallerRequiredFiles(), tempPath))
|
||||
{
|
||||
QString tempFile = tempPath + "/" + QFileInfo(QApplication::applicationFilePath()).fileName();
|
||||
QString tempFile = tempPath + "/" + QFileInfo(getInstallerCurrentFilePath()).fileName();
|
||||
|
||||
// launch copy in TEMP directory with same arguments
|
||||
if (QProcess::startDetached(tempFile, QApplication::arguments())) return 0;
|
||||
|
|
|
@ -38,7 +38,7 @@ CMigrateDialog::CMigrateDialog():QDialog()
|
|||
if (!CConfigFile::getInstance()->isRyzomInstalledIn(m_currentDirectory))
|
||||
{
|
||||
// Ryzom is in the same directory as Ryzom Installer
|
||||
m_currentDirectory = CConfigFile::getInstance()->getApplicationDirectory();
|
||||
m_currentDirectory = CConfigFile::getInstance()->getInstallerCurrentDirPath();
|
||||
|
||||
if (!CConfigFile::getInstance()->isRyzomInstalledIn(m_currentDirectory))
|
||||
{
|
||||
|
|
|
@ -729,7 +729,7 @@ void COperationDialog::copyInstaller()
|
|||
|
||||
// rename old client to installer
|
||||
|
||||
QString oldInstallerFullPath = QApplication::applicationFilePath();
|
||||
QString oldInstallerFullPath = config->getInstallerCurrentFilePath();
|
||||
QString newInstallerFullPath = config->getInstallerInstalledFilePath();
|
||||
|
||||
if (!newInstallerFullPath.isEmpty())
|
||||
|
|
Loading…
Reference in a new issue