forked from sepluginloader/ClientPluginTemplate
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDirectory.Build.props
More file actions
73 lines (58 loc) · 4.4 KB
/
Copy pathDirectory.Build.props
File metadata and controls
73 lines (58 loc) · 4.4 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
<Project>
<!-- Folders overridable by Directory.Build.props.user -->
<PropertyGroup>
<!-- Folder containing SpaceEngineers.exe (empty = auto-detect from Steam) -->
<Bin64></Bin64>
<!-- Pulsar plugin loader folder used for automatic deployment (empty = auto-detect) -->
<Pulsar></Pulsar>
</PropertyGroup>
<!-- Plugin version (committed, shared by all contributors) -->
<Import Project="$(MSBuildThisFileDirectory)Version.Build.props" />
<!-- Local developer overrides for the folders above; ignored by Git (*.user).
Copy the first PropertyGroup of this file into Directory.Build.props.user,
wrapped into a top-level Project element, and fill in your local paths there.
Running setup.py writes that file for you. -->
<Import Project="$(MSBuildThisFileDirectory)Directory.Build.props.user"
Condition="Exists('$(MSBuildThisFileDirectory)Directory.Build.props.user')" />
<!-- Repository root (this file lives in it). Used instead of $(SolutionDir), so it
resolves whether the build is driven from the solution or a single project.
$(MSBuildThisFileDirectory) ends with a directory separator. -->
<PropertyGroup>
<RepoRoot>$(MSBuildThisFileDirectory)</RepoRoot>
<PathSeparator Condition="$([MSBuild]::IsOSPlatform('Windows'))">\</PathSeparator>
<PathSeparator Condition="!$([MSBuild]::IsOSPlatform('Windows'))">/</PathSeparator>
</PropertyGroup>
<PropertyGroup Condition="$([MSBuild]::IsOSPlatform('Windows'))">
<SteamPath Condition="'$(SteamPath)' == ''">$(registry:HKEY_CURRENT_USER\SOFTWARE\Valve\Steam@SteamPath)</SteamPath>
<!-- Steam fills in InstallLocation for game apps (244850) only, it is left empty
for tool apps like the Dedicated Server (298740). -->
<SteamGameDir Condition="'$(SteamGameDir)' == ''">$(registry:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Steam App 244850@InstallLocation)</SteamGameDir>
<Pulsar Condition="'$(Pulsar)' == '' and '$(APPDATA)' != ''">$(APPDATA)\Pulsar</Pulsar>
</PropertyGroup>
<PropertyGroup Condition="!$([MSBuild]::IsOSPlatform('Windows')) and '$(HOME)' != ''">
<SteamPath Condition="'$(SteamPath)' == '' and Exists('$(HOME)/.steam/steam/steamapps')">$(HOME)/.steam/steam</SteamPath>
<SteamPath Condition="'$(SteamPath)' == '' and Exists('$(HOME)/.local/share/Steam/steamapps')">$(HOME)/.local/share/Steam</SteamPath>
<SteamPath Condition="'$(SteamPath)' == '' and Exists('$(HOME)/.var/app/com.valvesoftware.Steam/.local/share/Steam/steamapps')">$(HOME)/.var/app/com.valvesoftware.Steam/.local/share/Steam</SteamPath>
<Pulsar Condition="'$(Pulsar)' == '' and '$(XDG_CONFIG_HOME)' != ''">$(XDG_CONFIG_HOME)/Pulsar</Pulsar>
<Pulsar Condition="'$(Pulsar)' == ''">$(HOME)/.config/Pulsar</Pulsar>
</PropertyGroup>
<!-- Locate the Steam library folder holding the game, so non-default libraries work too -->
<PropertyGroup>
<SteamLibVdf Condition="'$(SteamPath)' != ''">$(SteamPath)/steamapps/libraryfolders.vdf</SteamLibVdf>
<SteamLibVdfText Condition="'$(SteamLibVdf)' != '' and Exists('$(SteamLibVdf)')">$([System.IO.File]::ReadAllText('$(SteamLibVdf)'))</SteamLibVdfText>
<!-- Captures the "path" of the library block which lists the given app ID -->
<SteamLibRx>(?s)^.*?"path"\s+"([^"]*)"(?:(?!"path").)*?"</SteamLibRx>
<SteamGameLibRx>$(SteamLibRx)244850".*$</SteamGameLibRx>
<SteamGameDir Condition="'$(SteamGameDir)' == '' and $([System.Text.RegularExpressions.Regex]::IsMatch('$(SteamLibVdfText)', '$(SteamGameLibRx)'))">$([System.Text.RegularExpressions.Regex]::Replace('$(SteamLibVdfText)', '$(SteamGameLibRx)', '$1'))/steamapps/common/SpaceEngineers</SteamGameDir>
<Bin64 Condition="'$(Bin64)' == '' and '$(SteamGameDir)' != ''">$([System.IO.Path]::GetFullPath('$(SteamGameDir)/Bin64'))</Bin64>
</PropertyGroup>
<!-- Last resort: default Steam library layout (also covers SteamCMD installs) -->
<PropertyGroup Condition="!$([MSBuild]::IsOSPlatform('Windows')) and '$(HOME)' != ''">
<Bin64 Condition="'$(Bin64)' == ''">$(HOME)/.steam/steam/steamapps/common/SpaceEngineers/Bin64</Bin64>
</PropertyGroup>
<!-- Bin64 with a trailing directory separator, for use in HintPath -->
<PropertyGroup>
<Bin64Dir>$(Bin64)</Bin64Dir>
<Bin64Dir Condition="'$(Bin64Dir)' != '' and !HasTrailingSlash('$(Bin64Dir)')">$(Bin64Dir)$(PathSeparator)</Bin64Dir>
</PropertyGroup>
</Project>