Skip to content

Commit 90899f6

Browse files
committed
Make KSPBT_ManagedRelativePath private
and use an absolute path in the compile action.
1 parent 6e879b7 commit 90899f6

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

.github/actions/compile/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,5 +80,5 @@ runs:
8080
working-directory: ${{ inputs.working-directory }}
8181
run: >
8282
dotnet msbuild -m:1 -p:Configuration=${{ inputs.build-configuration }}
83-
-p:KSPBT_ManagedRelativePath=KSP_x64_Data/Managed ${{ inputs.solution-file-path }}
83+
-p:KSPBT_ManagedPath=${{ env.KSP_ROOT }}/KSP_x64_Data/Managed ${{ inputs.solution-file-path }}
8484
${{ runner.debug && '-v:diagnostic' }}

KSPCommon.props

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,10 @@
6868
</ItemDefinitionGroup>
6969

7070
<!--Parse KSP platform-specific paths -->
71-
<PropertyGroup Condition=" '$(KSPBT_ManagedRelativePath)' == '' ">
72-
<KSPBT_ManagedRelativePath Condition=" $([MSBuild]::IsOsPlatform('Windows')) ">KSP_x64_Data/Managed</KSPBT_ManagedRelativePath>
73-
<KSPBT_ManagedRelativePath Condition=" $([MSBuild]::IsOsPlatform('OSX')) ">KSP.app/Contents/Resources/Data/Managed</KSPBT_ManagedRelativePath>
74-
<KSPBT_ManagedRelativePath Condition=" $([MSBuild]::IsOsPlatform('Linux')) ">KSP_Data/Managed</KSPBT_ManagedRelativePath>
71+
<PropertyGroup Condition=" '$(_KSPBT_ManagedRelativePath)' == '' ">
72+
<_KSPBT_ManagedRelativePath Condition=" $([MSBuild]::IsOsPlatform('Windows')) ">KSP_x64_Data/Managed</_KSPBT_ManagedRelativePath>
73+
<_KSPBT_ManagedRelativePath Condition=" $([MSBuild]::IsOsPlatform('OSX')) ">KSP.app/Contents/Resources/Data/Managed</_KSPBT_ManagedRelativePath>
74+
<_KSPBT_ManagedRelativePath Condition=" $([MSBuild]::IsOsPlatform('Linux')) ">KSP_Data/Managed</_KSPBT_ManagedRelativePath>
7575
</PropertyGroup>
7676

7777
<PropertyGroup>

KSPCommon.targets

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
<!-- Relative path that must exist for a path to be a valid KSP Install-->
66
<PropertyGroup>
7-
<KSPBT_GameIdentifier>$(KSPBT_ManagedRelativePath)/Assembly-CSharp.dll</KSPBT_GameIdentifier>
7+
<KSPBT_GameIdentifier>$(_KSPBT_ManagedRelativePath)/Assembly-CSharp.dll</KSPBT_GameIdentifier>
88
<KSPBT_GameRootSource Condition="'$(KSPBT_GameRoot)' != ''">property</KSPBT_GameRootSource>
99
</PropertyGroup>
1010

@@ -49,7 +49,7 @@
4949

5050
<!-- Calculate KSPBT_ManagedPath -->
5151
<PropertyGroup Condition=" '$(KSPBT_ManagedPath)' == ''">
52-
<KSPBT_ManagedPath>$(KSPBT_GameRoot)/$(KSPBT_ManagedRelativePath)</KSPBT_ManagedPath>
52+
<KSPBT_ManagedPath>$(KSPBT_GameRoot)/$(_KSPBT_ManagedRelativePath)</KSPBT_ManagedPath>
5353
</PropertyGroup>
5454

5555
<!-- Prevent the compiler from acquiring or referencing any external reference assemblies -->

0 commit comments

Comments
 (0)