mirror of
https://port.numenaute.org/aleajactaest/khanat-code-old.git
synced 2024-12-26 18:40:54 +00:00
Merge with develop
This commit is contained in:
parent
f888b9f3bf
commit
4fc06a0c63
5 changed files with 32 additions and 14 deletions
|
@ -676,7 +676,7 @@ bool CConfigFile::shouldCreateDesktopShortcut() const
|
|||
|
||||
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
|
||||
|
@ -687,7 +687,7 @@ bool CConfigFile::shouldCreateMenuShortcut() const
|
|||
|
||||
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
|
||||
|
@ -749,7 +749,7 @@ QStringList CConfigFile::getInstallerRequiredFiles() const
|
|||
#if _MSC_VER == 1900
|
||||
// VC++ 2015
|
||||
files << "msvcp140.dll";
|
||||
files << "msvcr140.dll";
|
||||
files << "vcrunrime140.dll";
|
||||
#elif _MSC_VER == 1800
|
||||
// VC++ 2013
|
||||
files << "msvcp120.dll";
|
||||
|
|
|
@ -119,9 +119,8 @@ void CMigrateDialog::accept()
|
|||
// check free disk space
|
||||
qint64 freeSpace = NLMISC::CSystemInfo::availableHDSpace(m_dstDirectory.toUtf8().constData());
|
||||
|
||||
const CServer &server = CConfigFile::getInstance()->getServer();
|
||||
|
||||
if (freeSpace < server.dataUncompressedSize)
|
||||
// compare with exact size of current directory
|
||||
if (freeSpace < getDirectorySize(m_currentDirectory, true))
|
||||
{
|
||||
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;
|
||||
|
|
|
@ -282,6 +282,24 @@ bool resolveLink(const QWidget &window, const QString &pathLink, QString &pathOb
|
|||
|
||||
#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)
|
||||
{
|
||||
// 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 resolveLink(const QWidget &window, const QString &pathLink, QString &pathObj);
|
||||
QString appendLinkExtension(const QString &link);
|
||||
|
||||
QString getVersionFromExecutable(const QString &path);
|
||||
|
||||
|
|
|
@ -104,22 +104,22 @@
|
|||
<message>
|
||||
<location filename="../src/installdialog.cpp" line="185"/>
|
||||
<source>Unable to write in directory</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation>In das Verzeichnis konnte nicht geschrieben werden</translation>
|
||||
</message>
|
||||
<message>
|
||||
<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>
|
||||
<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>
|
||||
<location filename="../src/installdialog.cpp" line="191"/>
|
||||
<source>Directory not empty</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation>Verzeichnist ist nicht leer</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/installdialog.cpp" line="191"/>
|
||||
<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>
|
||||
</context>
|
||||
<context>
|
||||
|
@ -175,22 +175,22 @@
|
|||
<message>
|
||||
<location filename="../src/migratedialog.cpp" line="154"/>
|
||||
<source>Unable to write in directory</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation>Kann nicht in dieses Verzeichnis schreiben</translation>
|
||||
</message>
|
||||
<message>
|
||||
<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>
|
||||
<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>
|
||||
<location filename="../src/migratedialog.cpp" line="160"/>
|
||||
<source>Directory not empty</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation>Verzeichnis ist nicht leer</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/migratedialog.cpp" line="160"/>
|
||||
<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>
|
||||
</context>
|
||||
<context>
|
||||
|
|
Loading…
Reference in a new issue