Files
MSCO/MSCO.csproj
MrMahoandClaude Opus 5.5 fe08fa5213 Release from Windows or Mac
- MSCO.csproj is SDK-style now (net35 via Microsoft.NETFramework.ReferenceAssemblies):
  builds with "dotnet build -c Release" on Windows and macOS; game DLL folder via
  MSC_MANAGED / -p:MscManaged (default: the game folder). Output verified identical
  in structure (references, types, methods, resources) to the old project.
- release.ps1 works with Windows PowerShell 5.1 and PowerShell 7: secrets in DPAPI files
  on Windows, in the macOS keychain on a Mac (file with chmod 600 on Linux); cross-platform
  RSA/password input; release target calls pwsh on non-Windows
- RELEASING.md: how to release and how to set up the Mac

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 21:22:04 +02:00

100 lines
4.7 KiB
XML

<Project Sdk="Microsoft.NET.Sdk">
<!--
MSCO (Unity 5 / Mono, .NET 3.5). Baut mit dem normalen .NET SDK - unter Windows und auch auf dem Mac (nur zum
Bauen/Veröffentlichen, das Spiel gibt es nur für Windows): dotnet build -c Release
Die Spiel-DLLs (UnityEngine, Assembly-CSharp, PlayMaker, cInput) kommen aus dem Spielordner. Woanders (z.B. Mac):
den Ordner "mysummercar_Data/Managed" dorthin kopieren und MSC_MANAGED (Umgebungsvariable) oder
-p:MscManaged=<ordner> setzen. Release-Builds laden neue Versionen automatisch hoch (release.ps1).
-->
<PropertyGroup>
<TargetFramework>net35</TargetFramework>
<OutputType>Library</OutputType>
<AssemblyName>MSCO</AssemblyName>
<RootNamespace>MSCO</RootNamespace>
<LangVersion>13</LangVersion>
<Nullable>disable</Nullable>
<ImplicitUsings>disable</ImplicitUsings>
<!-- Versionsangaben stehen in Properties/AssemblyInfo.cs (aus MSCO.ModVersion) -->
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<Configuration Condition=" '$(Configuration)' == '' ">Release</Configuration>
<!-- Ausgabe wie bisher: bin\Release\MSCO.dll (ohne Unterordner net35) -->
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<AppendRuntimeIdentifierToOutputPath>false</AppendRuntimeIdentifierToOutputPath>
<DebugType Condition=" '$(Configuration)' == 'Release' ">none</DebugType>
<Optimize Condition=" '$(Configuration)' == 'Release' ">true</Optimize>
<ProduceReferenceAssembly>false</ProduceReferenceAssembly>
<GenerateDocumentationFile>false</GenerateDocumentationFile>
<NoWarn>$(NoWarn);CS1591;NU1702</NoWarn>
<!-- Spielordner und dessen Managed-Ordner (überschreibbar) -->
<GamePath Condition=" '$(GamePath)' == '' ">F:\SteamLibrary\steamapps\common\My Summer Car</GamePath>
<MscManaged Condition=" '$(MscManaged)' == '' and '$(MSC_MANAGED)' != '' ">$(MSC_MANAGED)</MscManaged>
<MscManaged Condition=" '$(MscManaged)' == '' ">$(GamePath)\mysummercar_Data\Managed</MscManaged>
</PropertyGroup>
<ItemGroup>
<!-- .NET-3.5-Referenzen ohne installiertes Targeting Pack (auch auf dem Mac) -->
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.3" PrivateAssets="all" />
</ItemGroup>
<ItemGroup>
<!-- Beispiel-Mods sind eigene Projekte -->
<Compile Remove="examples/**" />
<None Remove="examples/**" />
<EmbeddedResource Remove="examples/**" />
</ItemGroup>
<ItemGroup>
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
<Reference Include="UnityEngine">
<HintPath>$(MscManaged)\UnityEngine.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Assembly-CSharp-firstpass">
<HintPath>$(MscManaged)\Assembly-CSharp-firstpass.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Assembly-CSharp">
<HintPath>$(MscManaged)\Assembly-CSharp.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="cInput">
<HintPath>$(MscManaged)\cInput.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="PlayMaker">
<HintPath>$(MscManaged)\PlayMaker.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="0Harmony">
<HintPath>lib\0Harmony.dll</HintPath>
<Private>False</Private>
</Reference>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="menu-logo.png">
<LogicalName>MSCO.menu-logo.png</LogicalName>
</EmbeddedResource>
<EmbeddedResource Include="logo.png">
<LogicalName>MSCO.logo.png</LogicalName>
</EmbeddedResource>
</ItemGroup>
<!-- Zum Testen: MSCO.dll direkt in den Spielordner (My Summer Car\MSCO) - läuft das Spiel, ist sie gesperrt -->
<Target Name="CopyToGame" AfterTargets="Build" Condition="Exists('$(GamePath)\MSCO')">
<Copy SourceFiles="$(TargetPath)" DestinationFolder="$(GamePath)\MSCO" ContinueOnError="true" />
</Target>
<!-- Release-Build: neue Version automatisch auf den Keymaster laden (Token + Signier-Schlüssel, siehe release.ps1) -->
<Target Name="MscoRelease" AfterTargets="Build" Condition="'$(Configuration)' == 'Release'">
<Exec Condition="'$(OS)' == 'Windows_NT'" Command="powershell -NoProfile -ExecutionPolicy Bypass -File &quot;$(MSBuildProjectDirectory)\release.ps1&quot; -Product mod -File &quot;$(TargetPath)&quot;" ContinueOnError="true" />
<Exec Condition="'$(OS)' != 'Windows_NT'" Command="pwsh -NoProfile -File &quot;$(MSBuildProjectDirectory)/release.ps1&quot; -Product mod -File &quot;$(TargetPath)&quot;" ContinueOnError="true" />
</Target>
</Project>