-
Notifications
You must be signed in to change notification settings - Fork 53
Expand file tree
/
Copy pathSts2PathDiscovery.props
More file actions
47 lines (40 loc) · 2.7 KB
/
Sts2PathDiscovery.props
File metadata and controls
47 lines (40 loc) · 2.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
<Project>
<!--
Fills Sts2Path and Sts2DataDir when not set (e.g. no local.props).
Override via local.props or MSBuild /p:Sts2Path=...
-->
<!-- OS Detection -->
<PropertyGroup>
<IsLinux>false</IsLinux>
<IsOSX>false</IsOSX>
<IsLinux Condition="$([MSBuild]::IsOSPlatform('Linux'))">true</IsLinux>
<IsOSX Condition="$([MSBuild]::IsOSPlatform('OSX'))">true</IsOSX>
</PropertyGroup>
<!-- Default -->
<PropertyGroup Condition="'$(IsLinux)' != 'true' And '$(IsOSX)' != 'true'">
<!-- Try getting uninstall location first -->
<RegistrySts2Path>$([MSBuild]::GetRegistryValueFromView('HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Steam App 2868840', 'InstallLocation', '', RegistryView.Registry64, RegistryView.Registry32))</RegistrySts2Path>
<AutoSteamPath>$(registry:HKEY_CURRENT_USER\Software\Valve\Steam@SteamPath)\steamapps</AutoSteamPath>
<SteamLibraryPath Condition="'$(SteamLibraryPath)' == '' and Exists('$(AutoSteamPath)/common/Slay the Spire 2')">$(AutoSteamPath)</SteamLibraryPath>
<SteamLibraryPath Condition="'$(SteamLibraryPath)' == ''">C:/Program Files (x86)/Steam/steamapps</SteamLibraryPath>
<Sts2Path Condition="'$(Sts2Path)' == '' and Exists('$(SteamLibraryPath)/common/Slay the Spire 2')">$(SteamLibraryPath)/common/Slay the Spire 2</Sts2Path>
<Sts2Path Condition="'$(Sts2Path)' == '' and Exists('$(RegistrySts2Path)/data_sts2_windows_x86_64')">$(RegistrySts2Path)</Sts2Path>
<Sts2Path Condition="'$(Sts2Path)' == ''">$(SteamLibraryPath)/common/Slay the Spire 2</Sts2Path>
<ModsPath>$(Sts2Path)/mods/</ModsPath>
<Sts2DataDir>$(Sts2Path)/data_sts2_windows_x86_64</Sts2DataDir>
</PropertyGroup>
<!-- Linux -->
<PropertyGroup Condition="'$(IsLinux)' == 'true'">
<SteamLibraryPath Condition="'$(SteamLibraryPath)' == ''">$(HOME)/.local/share/Steam/steamapps</SteamLibraryPath>
<Sts2Path Condition="'$(Sts2Path)' == ''">$(SteamLibraryPath)/common/Slay the Spire 2</Sts2Path>
<ModsPath>$(Sts2Path)/mods/</ModsPath>
<Sts2DataDir>$(Sts2Path)/data_sts2_linuxbsd_x86_64</Sts2DataDir>
</PropertyGroup>
<!-- macOS -->
<PropertyGroup Condition="'$(IsOSX)' == 'true'">
<SteamLibraryPath Condition="'$(SteamLibraryPath)' == ''">$(HOME)/Library/Application Support/Steam/steamapps</SteamLibraryPath>
<Sts2Path Condition="'$(Sts2Path)' == ''">$(SteamLibraryPath)/common/Slay the Spire 2</Sts2Path>
<ModsPath>$(Sts2Path)/SlayTheSpire2.app/Contents/MacOS/mods/</ModsPath>
<Sts2DataDir>$(Sts2Path)/SlayTheSpire2.app/Contents/Resources/data_sts2_macos_x86_64</Sts2DataDir>
</PropertyGroup>
</Project>