Merge with develop
--HG-- branch : compatibility-develop
This commit is contained in:
commit
c5881e9f11
5 changed files with 32 additions and 14 deletions
|
@ -676,7 +676,7 @@ bool CConfigFile::shouldCreateDesktopShortcut() const
|
||||||
|
|
||||||
QString shortcut = profile.getClientDesktopShortcutFullPath();
|
QString shortcut = profile.getClientDesktopShortcutFullPath();
|
||||||
|
|
||||||
return !shortcut.isEmpty() && !NLMISC::CFile::isExists(qToUtf8(shortcut));
|
return !shortcut.isEmpty() && !NLMISC::CFile::isExists(qToUtf8(appendLinkExtension(shortcut)));
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CConfigFile::shouldCreateMenuShortcut() const
|
bool CConfigFile::shouldCreateMenuShortcut() const
|
||||||
|
@ -687,7 +687,7 @@ bool CConfigFile::shouldCreateMenuShortcut() const
|
||||||
|
|
||||||
QString shortcut = profile.getClientMenuShortcutFullPath();
|
QString shortcut = profile.getClientMenuShortcutFullPath();
|
||||||
|
|
||||||
return !shortcut.isEmpty() && !NLMISC::CFile::isExists(qToUtf8(shortcut));
|
return !shortcut.isEmpty() && !NLMISC::CFile::isExists(qToUtf8(appendLinkExtension(shortcut)));
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CConfigFile::shouldCopyInstaller() const
|
bool CConfigFile::shouldCopyInstaller() const
|
||||||
|
@ -749,7 +749,7 @@ QStringList CConfigFile::getInstallerRequiredFiles() const
|
||||||
#if _MSC_VER == 1900
|
#if _MSC_VER == 1900
|
||||||
// VC++ 2015
|
// VC++ 2015
|
||||||
files << "msvcp140.dll";
|
files << "msvcp140.dll";
|
||||||
files << "msvcr140.dll";
|
files << "vcrunrime140.dll";
|
||||||
#elif _MSC_VER == 1800
|
#elif _MSC_VER == 1800
|
||||||
// VC++ 2013
|
// VC++ 2013
|
||||||
files << "msvcp120.dll";
|
files << "msvcp120.dll";
|
||||||
|
|
|
@ -119,9 +119,8 @@ void CMigrateDialog::accept()
|
||||||
// check free disk space
|
// check free disk space
|
||||||
qint64 freeSpace = NLMISC::CSystemInfo::availableHDSpace(m_dstDirectory.toUtf8().constData());
|
qint64 freeSpace = NLMISC::CSystemInfo::availableHDSpace(m_dstDirectory.toUtf8().constData());
|
||||||
|
|
||||||
const CServer &server = CConfigFile::getInstance()->getServer();
|
// compare with exact size of current directory
|
||||||
|
if (freeSpace < getDirectorySize(m_currentDirectory, true))
|
||||||
if (freeSpace < server.dataUncompressedSize)
|
|
||||||
{
|
{
|
||||||
QMessageBox::StandardButton res = QMessageBox::warning(this, tr("Not enough free disk space"), tr("You don't have enough free space on this disk, please make more space or choose a directory on another disk."));
|
QMessageBox::StandardButton res = QMessageBox::warning(this, tr("Not enough free disk space"), tr("You don't have enough free space on this disk, please make more space or choose a directory on another disk."));
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -282,6 +282,24 @@ bool resolveLink(const QWidget &window, const QString &pathLink, QString &pathOb
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
QString appendLinkExtension(const QString &link)
|
||||||
|
{
|
||||||
|
QString extension;
|
||||||
|
|
||||||
|
#ifdef Q_OS_WIN32
|
||||||
|
extension = ".lnk";
|
||||||
|
#elif Q_OS_MAC
|
||||||
|
// TODO
|
||||||
|
#else
|
||||||
|
extension = ".desktop";
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// already the good extension
|
||||||
|
if (link.indexOf(extension) > -1) return link;
|
||||||
|
|
||||||
|
return link + extension;
|
||||||
|
}
|
||||||
|
|
||||||
QString getVersionFromExecutable(const QString &path)
|
QString getVersionFromExecutable(const QString &path)
|
||||||
{
|
{
|
||||||
// launch executable with --version argument
|
// launch executable with --version argument
|
||||||
|
|
|
@ -52,6 +52,7 @@ wchar_t* qToWide(const QString &str);
|
||||||
|
|
||||||
bool createLink(const QString &link, const QString &name, const QString &executable, const QString &arguments, const QString &icon, const QString &workingDir);
|
bool createLink(const QString &link, const QString &name, const QString &executable, const QString &arguments, const QString &icon, const QString &workingDir);
|
||||||
bool resolveLink(const QWidget &window, const QString &pathLink, QString &pathObj);
|
bool resolveLink(const QWidget &window, const QString &pathLink, QString &pathObj);
|
||||||
|
QString appendLinkExtension(const QString &link);
|
||||||
|
|
||||||
QString getVersionFromExecutable(const QString &path);
|
QString getVersionFromExecutable(const QString &path);
|
||||||
|
|
||||||
|
|
|
@ -104,22 +104,22 @@
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/installdialog.cpp" line="185"/>
|
<location filename="../src/installdialog.cpp" line="185"/>
|
||||||
<source>Unable to write in directory</source>
|
<source>Unable to write in directory</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation>In das Verzeichnis konnte nicht geschrieben werden</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/installdialog.cpp" line="185"/>
|
<location filename="../src/installdialog.cpp" line="185"/>
|
||||||
<source>You don't have the permission to write in this directory with your current user account, please choose another directory.</source>
|
<source>You don't have the permission to write in this directory with your current user account, please choose another directory.</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation>Du hast nicht die Berechtigungen, um mit deinem derzeitigen Benutzer-Konto in dieses Verzeichnis zu schreiben, bitte wähle ein anderes Verzeichnis.</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/installdialog.cpp" line="191"/>
|
<location filename="../src/installdialog.cpp" line="191"/>
|
||||||
<source>Directory not empty</source>
|
<source>Directory not empty</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation>Verzeichnist ist nicht leer</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/installdialog.cpp" line="191"/>
|
<location filename="../src/installdialog.cpp" line="191"/>
|
||||||
<source>This directory is not empty, please choose another one.</source>
|
<source>This directory is not empty, please choose another one.</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation>Dieses Verzeichnis ist nicht leer, bitte wähle ein anderes.</translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
|
@ -175,22 +175,22 @@
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/migratedialog.cpp" line="154"/>
|
<location filename="../src/migratedialog.cpp" line="154"/>
|
||||||
<source>Unable to write in directory</source>
|
<source>Unable to write in directory</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation>Kann nicht in dieses Verzeichnis schreiben</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/migratedialog.cpp" line="154"/>
|
<location filename="../src/migratedialog.cpp" line="154"/>
|
||||||
<source>You don't have the permission to write in this directory with your current user account, please choose another directory.</source>
|
<source>You don't have the permission to write in this directory with your current user account, please choose another directory.</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation>Du hast nicht die Berechtigungen, mit deinem derzeitigen Benutzer-Konto in dieses Verzeichnis zu schreiben, bitte wähle ein anderes Verzeichnis.</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/migratedialog.cpp" line="160"/>
|
<location filename="../src/migratedialog.cpp" line="160"/>
|
||||||
<source>Directory not empty</source>
|
<source>Directory not empty</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation>Verzeichnis ist nicht leer</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/migratedialog.cpp" line="160"/>
|
<location filename="../src/migratedialog.cpp" line="160"/>
|
||||||
<source>This directory is not empty, please choose another one.</source>
|
<source>This directory is not empty, please choose another one.</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation>Dieses Verzeichnis ist nicht leer, bitte wähle ein anderes.</translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
|
|
Loading…
Reference in a new issue