|
5 | 5 | <!-- NuGet dependencies -->
|
6 | 6 | <ItemGroup>
|
7 | 7 | <!-- For GenerateKSPVersionFile -->
|
8 |
| - <PackageReference Include="JsonPoke" Version="1.2.0" Condition="@(KSPVersionFile) != ''"/> |
| 8 | + <PackageReference Include="JsonPoke" Version="1.2.0" Condition="'@(KSPVersionFile)' != ''"/> |
9 | 9 | </ItemGroup>
|
10 | 10 |
|
11 | 11 | <!--Custom Targets-->
|
|
41 | 41 | <Target Name="CKANInstallScriptGen">
|
42 | 42 | <ItemGroup>
|
43 | 43 | <_CKANCompatibleVersionItems Include="$(CKANCompatibleVersions.Split(' '))"/>
|
44 |
| - <_CKANDependency Include="%(Reference.CKANIdentifier)" Condition="%(Reference.CKANVersion) == ''"/> |
45 |
| - <_CKANDependency Include="%(Reference.CKANIdentifier)=%(Reference.CKANVersion)" Condition="%(Reference.CKANVersion) != ''"/> |
| 44 | + <_CKANDependency Include="%(Reference.CKANIdentifier)" Condition="'%(Reference.CKANVersion)' == ''"/> |
| 45 | + <_CKANDependency Include="%(Reference.CKANIdentifier)=%(Reference.CKANVersion)" Condition="'%(Reference.CKANVersion)' != ''"/> |
46 | 46 | <_CKANDependency Include="@(CKANDependency)"/>
|
47 | 47 | </ItemGroup>
|
48 | 48 | <PropertyGroup>
|
|
53 | 53 | <_CKANCommands Include="compat add --gamedir "$(KSPROOT)" %(_CKANCompatibleVersionItems.Identity)"
|
54 | 54 | Condition=" '$(CKANCompatibleVersions)' != '' "/>
|
55 | 55 |
|
56 |
| - <_CKANCommands Include="install --no-recommends --gamedir "$(KSPROOT)" $(CKANDependencyList)" Condition="$(CKANDependencyList) != ''"/> |
| 56 | + <_CKANCommands Include="install --no-recommends --gamedir "$(KSPROOT)" $(CKANDependencyList)" Condition="'$(CKANDependencyList)' != ''"/> |
57 | 57 | </ItemGroup>
|
58 | 58 | <Message Text="Writing CKAN commands to $(CKANCommandFile)"/>
|
59 | 59 | <Message Text="@(_CKANCommands, '%0a')" Importance="Low"/>
|
|
77 | 77 | <Target Name="GetRequiredExternalTools">
|
78 | 78 | <ItemGroup>
|
79 | 79 | <CKANDependencyList Include="%(Reference.CKANIdentifier)"/>
|
80 |
| - <RequiredExternalTool Include="CKAN" Condition="@(CKANDependencyList) != ''"/> |
| 80 | + <RequiredExternalTool Include="CKAN" Condition="'@(CKANDependencyList)' != ''"/> |
81 | 81 | </ItemGroup>
|
82 | 82 | <Message Text="@(RequiredExternalTool)" Importance="high"/>
|
83 | 83 | </Target>
|
|
113 | 113 | Condition="'$(GenerateKSPAssemblyDependencyAttributes)' == 'true'">
|
114 | 114 | <ItemGroup>
|
115 | 115 | <Reference Update="%(Reference.identity)" Condition="'%(Reference.CKANIdentifier)%(Reference.KSPAssemblyName)' != ''">
|
116 |
| - <KSPAssemblyName Condition="%(Reference.KSPAssemblyName) == ''">$([System.String]::Copy('%(Reference.identity)').Split(',')[0])</KSPAssemblyName> |
117 |
| - <KSPAssemblyVersion Condition="%(Reference.KSPAssemblyVersion) == ''">%(Reference.CKANVersion)</KSPAssemblyVersion> |
118 |
| - <KSPAssemblyVersion Condition="%(Reference.KSPAssemblyVersion) == ''">0.0.0</KSPAssemblyVersion> |
| 116 | + <KSPAssemblyName Condition="'%(Reference.KSPAssemblyName)' == ''">$([System.String]::Copy('%(Reference.identity)').Split(',')[0])</KSPAssemblyName> |
| 117 | + <KSPAssemblyVersion Condition="'%(Reference.KSPAssemblyVersion)' == ''">%(Reference.CKANVersion)</KSPAssemblyVersion> |
| 118 | + <KSPAssemblyVersion Condition="'%(Reference.KSPAssemblyVersion)' == ''">0.0.0</KSPAssemblyVersion> |
119 | 119 | </Reference>
|
120 | 120 | </ItemGroup>
|
121 | 121 | <ItemGroup>
|
122 |
| - <AssemblyAttribute Include="KSPAssemblyDependency" Condition="%(Reference.KSPAssemblyName) != ''"> |
| 122 | + <AssemblyAttribute Include="KSPAssemblyDependency" Condition="'%(Reference.KSPAssemblyName)' != ''"> |
123 | 123 | <_Parameter1>%(Reference.KSPAssemblyName)</_Parameter1>
|
124 | 124 | <_Parameter1_TypeName>System.String</_Parameter1_TypeName>
|
125 | 125 | <_Parameter2>$([System.String]::Copy('%(Reference.KSPAssemblyVersion)').Split('.')[0])</_Parameter2>
|
|
144 | 144 | <Target Name="GenerateKSPVersionFile" AfterTargets="Build" Inputs="@(KSPVersionFile);$(FileVersion)" Outputs="%(KSPVersionFile.destination)">
|
145 | 145 | <ItemGroup>
|
146 | 146 | <KSPVersionFile Update="@(KSPVersionFile)">
|
147 |
| - <Name Condition="%(KSPVersionFile.Name) == ''">$(ProjectName)</Name> |
148 |
| - <Version Condition="%(KSPVersionFile.Version) == ''">$(FileVersion.Split(`.`)[0]).$(FileVersion.Split(`.`)[1]).$(FileVersion.Split(`.`)[2])</Version> |
| 147 | + <Name Condition="'%(KSPVersionFile.Name)' == ''">$(ProjectName)</Name> |
| 148 | + <Version Condition="'%(KSPVersionFile.Version)' == ''">$(FileVersion.Split(`.`)[0]).$(FileVersion.Split(`.`)[1]).$(FileVersion.Split(`.`)[2])</Version> |
149 | 149 | </KSPVersionFile>
|
150 | 150 | </ItemGroup>
|
151 | 151 | <ReadLinesFromFile File="%(KSPVersionFile.identity)" Condition="Exists('@(KSPVersionFile)')">
|
152 | 152 | <Output TaskParameter="Lines" ItemName="_JSONLines"/>
|
153 | 153 | </ReadLinesFromFile>
|
154 | 154 | <PropertyGroup>
|
155 | 155 | <_JSON>@(_JSONLines, '%0a')</_JSON>
|
156 |
| - <_JSON Condition="@(_JSONLines) == ''">{}</_JSON> |
| 156 | + <_JSON Condition="'@(_JSONLines)' == ''">{}</_JSON> |
157 | 157 | </PropertyGroup>
|
158 | 158 | <JsonPoke Content="$(_JSON)" Query="$.NAME" RawValue="'%(KSPVersionFile.Name)'">
|
159 | 159 | <Output TaskParameter="Content" PropertyName="_JSON"/>
|
160 | 160 | </JsonPoke>
|
161 | 161 | <JsonPoke Content="$(_JSON)" Query="$.VERSION" RawValue="'%(KSPVersionFile.Version)'">
|
162 | 162 | <Output TaskParameter="Content" PropertyName="_JSON"/>
|
163 | 163 | </JsonPoke>
|
164 |
| - <JsonPoke Content="$(_JSON)" Query="$.URL" RawValue="'%(KSPVersionFile.URL)'" Condition="%(KSPVersionFile.URL) != ''"> |
| 164 | + <JsonPoke Content="$(_JSON)" Query="$.URL" RawValue="'%(KSPVersionFile.URL)'" Condition="'%(KSPVersionFile.URL)' != ''"> |
165 | 165 | <Output TaskParameter="Content" PropertyName="_JSON"/>
|
166 | 166 | </JsonPoke>
|
167 |
| - <JsonPoke Content="$(_JSON)" Query="$.DOWNLOAD" RawValue="'%(KSPVersionFile.Download)'" Condition="%(KSPVersionFile.Download) != ''"> |
| 167 | + <JsonPoke Content="$(_JSON)" Query="$.DOWNLOAD" RawValue="'%(KSPVersionFile.Download)'" Condition="'%(KSPVersionFile.Download)' != ''"> |
168 | 168 | <Output TaskParameter="Content" PropertyName="_JSON"/>
|
169 | 169 | </JsonPoke>
|
170 |
| - <JsonPoke Content="$(_JSON)" Query="$.KSP_VERSION" RawValue="'%(KSPVersionFile.KSP_Version)'" Condition="%(KSPVersionFile.KSP_Version) != ''"> |
| 170 | + <JsonPoke Content="$(_JSON)" Query="$.KSP_VERSION" RawValue="'%(KSPVersionFile.KSP_Version)'" Condition="'%(KSPVersionFile.KSP_Version)' != ''"> |
171 | 171 | <Output TaskParameter="Content" PropertyName="_JSON"/>
|
172 | 172 | </JsonPoke>
|
173 |
| - <JsonPoke Content="$(_JSON)" Query="$.KSP_VERSION_MIN" RawValue="'%(KSPVersionFile.KSP_Version_Min)'" Condition="%(KSPVersionFile.KSP_Version_Min) != ''"> |
| 173 | + <JsonPoke Content="$(_JSON)" Query="$.KSP_VERSION_MIN" RawValue="'%(KSPVersionFile.KSP_Version_Min)'" Condition="'%(KSPVersionFile.KSP_Version_Min)' != ''"> |
174 | 174 | <Output TaskParameter="Content" PropertyName="_JSON"/>
|
175 | 175 | </JsonPoke>
|
176 |
| - <JsonPoke Content="$(_JSON)" Query="$.KSP_VERSION_MAX" Value="'%(KSPVersionFile.KSP_Version_Max)'" Condition="%(KSPVersionFile.KSP_Version_Max) != ''"> |
| 176 | + <JsonPoke Content="$(_JSON)" Query="$.KSP_VERSION_MAX" Value="'%(KSPVersionFile.KSP_Version_Max)'" Condition="'%(KSPVersionFile.KSP_Version_Max)' != ''"> |
177 | 177 | <Output TaskParameter="Content" PropertyName="_JSON"/>
|
178 | 178 | </JsonPoke>
|
179 | 179 | <WriteLinesToFile File="%(KSPVersionFile.Destination)" Lines="$(_JSON)" Overwrite="true"/>
|
|
0 commit comments