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> <ItemGroup>
<ResourceCompile Include="Resource.rc" /> <ResourceCompile Include="Resource.rc" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<Font Include="Roboto-Regular.ttf">
<DeploymentContent>true</DeploymentContent>
</Font>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets"> <ImportGroup Label="ExtensionTargets">
</ImportGroup> </ImportGroup>

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

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

@ -42,8 +42,20 @@ inline struct Window {
inline void Parse(const std::string& arg1) 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; std::ifstream json_file;
json_file.open(arg1); json_file.open(path);
if (!json_file.is_open()) { if (!json_file.is_open()) {
spdlog::error("Couldn't open settings file {}", arg1); spdlog::error("Couldn't open settings file {}", arg1);
return; return;

Loading…
Cancel
Save