1
+ <!-- EXTERNAL_PROPERTIES: TargetFramework;BANNERLORD_GAME_DIR;BANNERLORD_STABLE_DIR;BANNERLORD_BETA_DIR;GITHUB_ACTIONS;MSBuildThisFileDirectory;OverrideGameVersion-->
2
+ <Project >
3
+
4
+ <!-- Development Variables-->
5
+ <PropertyGroup >
6
+ <IronPythonVersion >3.4.0</IronPythonVersion >
7
+ <Version >$(IronPythonVersion).1</Version >
8
+
9
+ <!-- Harmony Version-->
10
+ <HarmonyVersion >2.2.1</HarmonyVersion >
11
+ <HarmonyExtensionsVersion >3.1.0.61</HarmonyExtensionsVersion >
12
+ <HarmonyAnalyzerVersion >1.0.1.44</HarmonyAnalyzerVersion >
13
+ <ButterLibVersion >2.1.13</ButterLibVersion >
14
+ <!-- BuildResources Version-->
15
+ <BuildResourcesVersion >1.0.1.68</BuildResourcesVersion >
16
+ <BUTRSharedVersion >2.0.0.86</BUTRSharedVersion >
17
+ <BUTRModuleManagerVersion >4.0.118</BUTRModuleManagerVersion >
18
+ </PropertyGroup >
19
+
20
+ <PropertyGroup >
21
+ <Authors >BUTR Team</Authors >
22
+ <Company ></Company >
23
+ <Product >IronPython Support for Bannerlord</Product >
24
+ </PropertyGroup >
25
+
26
+ <PropertyGroup >
27
+ <IsMinimal >true</IsMinimal >
28
+ <IsMinimal Condition =" $(Configuration.Contains('Minimal'))" >true</IsMinimal >
29
+ <IsStable >false</IsStable >
30
+ <IsStable Condition =" $(Configuration.Contains('Stable'))" >true</IsStable >
31
+ <IsBeta >false</IsBeta >
32
+ <IsBeta Condition =" $(Configuration.Contains('Beta'))" >true</IsBeta >
33
+ </PropertyGroup >
34
+
35
+ <PropertyGroup >
36
+ <SGVFile >$([System.IO.File]::ReadAllText($(MSBuildThisFileDirectory)/../supported-game-versions.txt))</SGVFile >
37
+ </PropertyGroup >
38
+ <ItemGroup >
39
+ <SGVItem Include =" $([System.Text.RegularExpressions.Regex]::Split($(SGVFile), `\r\n|\r|\n`))" />
40
+ </ItemGroup >
41
+
42
+ <PropertyGroup Condition =" $(OverrideGameVersion) == ''" >
43
+ <GameVersionFallback >e1.1.0</GameVersionFallback >
44
+ <!-- Parsing supported-game-versions.txt -->
45
+ <SGVLineCount >$([System.Text.RegularExpressions.Regex]::Split($(SGVFile), `\r\n|\r|\n`).Length)</SGVLineCount >
46
+ <SGVLastEntryIndex >$([MSBuild]::Subtract($(SGVLineCount), 1))</SGVLastEntryIndex >
47
+ <!-- First enrty is Beta, second Stable, last Minimal -->
48
+ <FirstLine Condition =" '$(SGVLineCount)' > 0" >$([System.Text.RegularExpressions.Regex]::Split($(SGVFile), `\r\n|\r|\n`)[0])</FirstLine >
49
+ <SecondLine Condition =" '$(SGVLineCount)' > 1" >$([System.Text.RegularExpressions.Regex]::Split($(SGVFile), `\r\n|\r|\n`)[1])</SecondLine >
50
+ <LastLine Condition =" '$(SGVLineCount)' > 0" >$([System.Text.RegularExpressions.Regex]::Split($(SGVFile), `\r\n|\r|\n`)[$(SGVLastEntryIndex)])</LastLine >
51
+
52
+ <SecondLine Condition =" '$(SecondLine)' == ''" >$(FirstLine)</SecondLine >
53
+ <LastLine Condition =" '$(LastLine)' == ''" >$(SecondLine)</LastLine >
54
+ <!-- -->
55
+ <GameBetaVersion >$(FirstLine)</GameBetaVersion >
56
+ <GameStableVersion >$(SecondLine)</GameStableVersion >
57
+ <GameMinimalVersion >$(LastLine)</GameMinimalVersion >
58
+ <!-- -->
59
+ <GameVersionWithPrefix Condition =" $(IsMinimal)" >$(GameMinimalVersion)</GameVersionWithPrefix >
60
+ <GameVersionWithPrefix Condition =" $(IsStable)" >$(GameStableVersion)</GameVersionWithPrefix >
61
+ <GameVersionWithPrefix Condition =" $(IsBeta)" >$(GameBetaVersion)</GameVersionWithPrefix >
62
+ <GameVersionWithPrefix Condition =" $(GameVersionWithPrefix) == ''" >$(GameVersionFallback)</GameVersionWithPrefix >
63
+ <!-- -->
64
+ <GameVersion >$(GameVersionWithPrefix.Substring(1))</GameVersion >
65
+ </PropertyGroup >
66
+ <PropertyGroup Condition =" $(OverrideGameVersion) != ''" >
67
+ <GameVersionWithPrefix >$(OverrideGameVersion)</GameVersionWithPrefix >
68
+ <GameVersion >$(GameVersionWithPrefix.Substring(1))</GameVersion >
69
+ </PropertyGroup >
70
+ <PropertyGroup >
71
+ <GameVersionFlat >$([System.String]::Copy('$(GameVersion)').Replace('.',''))</GameVersionFlat >
72
+ <GameVersionConstant >e$(GameVersionFlat)</GameVersionConstant >
73
+ </PropertyGroup >
74
+
75
+ <PropertyGroup >
76
+ <!-- Bannerlord's Root Folder. Leave empty if you want it to be tried to be autoresolved.-->
77
+ <GameFolder Condition =" $(IsStable)" >$(BANNERLORD_STABLE_DIR)</GameFolder >
78
+ <GameFolder Condition =" $(IsBeta)" >$(BANNERLORD_BETA_DIR)</GameFolder >
79
+ <GameFolder Condition =" $(GameFolder) == ''" >$(BANNERLORD_GAME_DIR)</GameFolder >
80
+ </PropertyGroup >
81
+
82
+ <!-- Automatic Path Resolution-->
83
+ <PropertyGroup >
84
+ <!-- Windows-->
85
+ <!-- Get from Registry (not working with dotnet right now)-->
86
+ <GameFolder Condition =" !Exists($(GameFolder)) AND $(OS) == 'Windows_NT'" >$(registry:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Steam App 261550@InstallLocation)</GameFolder >
87
+ <!-- Set a default value if registry value is missing-->
88
+ <GameFolder Condition =" !Exists($(GameFolder)) AND $(OS) == 'Windows_NT'" >C:\Program Files (x86)\Steam\steamapps\common\Mount & Blade II Bannerlord</GameFolder >
89
+ <!-- Unix-->
90
+ <GameFolder Condition =" !Exists($(GameFolder)) AND $(OS) == 'Unix'" >~/.steam/root/steamapps/common/Mount & Blade II Bannerlord</GameFolder >
91
+ </PropertyGroup >
92
+
93
+
94
+ <!-- GitHub Actions-->
95
+ <PropertyGroup Condition =" $(GITHUB_ACTIONS) == 'true'" >
96
+ <ContinuousIntegrationBuild >true</ContinuousIntegrationBuild >
97
+ </PropertyGroup >
98
+ <!-- NuGet SorceLink-->
99
+ <PropertyGroup >
100
+ <PublishRepositoryUrl >true</PublishRepositoryUrl >
101
+ <IncludeSymbols >true</IncludeSymbols >
102
+ <SymbolPackageFormat >snupkg</SymbolPackageFormat >
103
+ <AllowedOutputExtensionsInPackageBuildOutputFolder >$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder >
104
+ </PropertyGroup >
105
+ <!-- SorceLink-->
106
+ <PropertyGroup >
107
+ <Deterministic >true</Deterministic >
108
+ <EmbedUntrackedSources >true</EmbedUntrackedSources >
109
+ </PropertyGroup >
110
+ <!-- SorceLink-->
111
+ <ItemGroup >
112
+ <PackageReference Include =" Microsoft.SourceLink.GitHub" Version =" 1.1.1" PrivateAssets =" All" />
113
+ </ItemGroup >
114
+ <!-- CI Builds-->
115
+ <ItemGroup Condition =" $(TargetFramework) == 'net472' AND $(OS) != 'Windows_NT'" >
116
+ <PackageReference Include =" Microsoft.NETFramework.ReferenceAssemblies" Version =" 1.0.2" >
117
+ <PrivateAssets >all</PrivateAssets >
118
+ <IncludeAssets >runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets >
119
+ </PackageReference >
120
+ </ItemGroup >
121
+
122
+ <ItemGroup Condition =" '$(GITHUB_ACTIONS)' != 'true'" >
123
+ <PackageReference Include =" BUTR.Harmony.Analyzer" Version =" $(HarmonyAnalyzerVersion)" >
124
+ <PrivateAssets >all</PrivateAssets >
125
+ <IncludeAssets >runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets >
126
+ </PackageReference >
127
+ </ItemGroup >
128
+
129
+ </Project >
0 commit comments