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