SteamTarget: Also handle only config-file name as launch arg

...as well as absolute paths
pull/130/head
Peter Repukat 3 years ago
parent f657dd6c4c
commit ed785c23b2

@ -216,11 +216,6 @@
<ItemGroup>
<ResourceCompile Include="Resource.rc" />
</ItemGroup>
<ItemGroup>
<Font Include="Roboto-Regular.ttf">
<DeploymentContent>true</DeploymentContent>
</Font>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>

@ -140,7 +140,4 @@
<Filter>Resource Files</Filter>
</ResourceCompile>
</ItemGroup>
<ItemGroup>
<Font Include="Roboto-Regular.ttf" />
</ItemGroup>
</Project>

@ -51,8 +51,8 @@ END
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 0,0,0,0333006
PRODUCTVERSION 0,0,0,0333006
FILEVERSION 0,0,0,0657006
PRODUCTVERSION 0,0,0,0657006
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
@ -69,12 +69,12 @@ BEGIN
BEGIN
VALUE "CompanyName", "Peter Repukat - FlatspotSoftware"
VALUE "FileDescription", "GlosSI - SteamTarget"
VALUE "FileVersion", "0.0.0.c333bd6"
VALUE "FileVersion", "0.0.0.f657dd6"
VALUE "InternalName", "GlosSITarget"
VALUE "LegalCopyright", "Copyright (C) 2021 Peter Repukat - FlatspotSoftware"
VALUE "OriginalFilename", "GlosSITarget.exe"
VALUE "ProductName", "GlosSI"
VALUE "ProductVersion", "0.0.0.c333bd6"
VALUE "ProductVersion", "0.0.0.f657dd6"
END
END
BLOCK "VarFileInfo"
@ -299,6 +299,22 @@ END

@ -42,8 +42,20 @@ inline struct Window {
inline void Parse(const std::string& arg1)
{
std::filesystem::path path(arg1);
if (path.has_extension() && !std::filesystem::exists(path)) {
path = std::filesystem::temp_directory_path()
.parent_path()
.parent_path()
.parent_path();
path /= "Roaming";
path /= "GlosSI";
path /= "Targets";
path /= arg1;
}
std::ifstream json_file;
json_file.open(arg1);
json_file.open(path);
if (!json_file.is_open()) {
spdlog::error("Couldn't open settings file {}", arg1);
return;

Loading…
Cancel
Save