diff --git a/GlosSIConfig/Resource.rc b/GlosSIConfig/Resource.rc index 1fd04a0..8deee0e 100644 --- a/GlosSIConfig/Resource.rc +++ b/GlosSIConfig/Resource.rc @@ -51,8 +51,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 0,0,0,7002809 - PRODUCTVERSION 0,0,0,7002809 + FILEVERSION 0,0,0,0006017 + PRODUCTVERSION 0,0,0,0006017 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -69,12 +69,12 @@ BEGIN BEGIN VALUE "CompanyName", "Peter Repukat - FlatspotSoftware" VALUE "FileDescription", "GlosSI - Config" - VALUE "FileVersion", "0.0.0.7ae28a9" + VALUE "FileVersion", "0.0.0.00e6d17" VALUE "InternalName", "GlosSIConfig" VALUE "LegalCopyright", "Copyright (C) 2021 Peter Repukat - FlatspotSoftware" VALUE "OriginalFilename", "GlosSIConfig.exe" VALUE "ProductName", "GlosSi" - VALUE "ProductVersion", "0.0.0.7ae28a9" + VALUE "ProductVersion", "0.0.0.00e6d17" END END BLOCK "VarFileInfo" @@ -162,6 +162,30 @@ END + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/GlosSIConfig/UIModel.cpp b/GlosSIConfig/UIModel.cpp index 0e111aa..7529f1b 100644 --- a/GlosSIConfig/UIModel.cpp +++ b/GlosSIConfig/UIModel.cpp @@ -147,7 +147,7 @@ bool UIModel::isInSteam(QVariant shortcut) bool UIModel::addToSteam(QVariant shortcut) { - QDir appDir = QDir::current(); + QDir appDir = QGuiApplication::applicationDirPath(); const auto map = shortcut.toMap(); const auto name = map["name"].toString(); const auto maybeLaunchPath = map["launchPath"].toString(); @@ -174,10 +174,20 @@ bool UIModel::addToSteam(QVariant shortcut) auto maybeIcon = map["icon"].toString(); if (maybeIcon.isEmpty()) { if (launch && !maybeLaunchPath.isEmpty()) - vdfshortcut.icon.value = maybeLaunchPath.toStdString(); + vdfshortcut.icon.value = + "\"" + ( + is_windows_ + ? QString(maybeLaunchPath).replace(QRegularExpression("\/"), "\\").toStdString() + : maybeLaunchPath.toStdString() + ) + "\""; } else { - vdfshortcut.icon.value = maybeIcon.toStdString(); + vdfshortcut.icon.value = + "\"" + ( + is_windows_ + ? QString(maybeIcon).replace(QRegularExpression("\/"), "\\").toStdString() + : maybeIcon.toStdString() + ) + "\""; } // Add installed locally and GlosSI tag VDFParser::ShortcutTag locallyTag;