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>
This commit is contained in:
+55
-93
@@ -1,61 +1,74 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<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>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Release</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{CE3FFBAB-946E-9569-CCAA-9CFA2D5C11F3}</ProjectGuid>
|
||||
<TargetFramework>net35</TargetFramework>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>MSCO</RootNamespace>
|
||||
<AssemblyName>MSCO</AssemblyName>
|
||||
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<TargetFrameworkProfile>Unity Full v3.5</TargetFrameworkProfile>
|
||||
<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>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>none</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</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" />
|
||||
<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>F:\SteamLibrary\steamapps\common\My Summer Car\mysummercar_Data\Managed\UnityEngine.dll</HintPath>
|
||||
<HintPath>$(MscManaged)\UnityEngine.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="Assembly-CSharp-firstpass">
|
||||
<HintPath>F:\SteamLibrary\steamapps\common\My Summer Car\mysummercar_Data\Managed\Assembly-CSharp-firstpass.dll</HintPath>
|
||||
<HintPath>$(MscManaged)\Assembly-CSharp-firstpass.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="Assembly-CSharp">
|
||||
<HintPath>F:\SteamLibrary\steamapps\common\My Summer Car\mysummercar_Data\Managed\Assembly-CSharp.dll</HintPath>
|
||||
<HintPath>$(MscManaged)\Assembly-CSharp.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="cInput">
|
||||
<HintPath>F:\SteamLibrary\steamapps\common\My Summer Car\mysummercar_Data\Managed\cInput.dll</HintPath>
|
||||
<HintPath>$(MscManaged)\cInput.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="PlayMaker">
|
||||
<HintPath>F:\SteamLibrary\steamapps\common\My Summer Car\mysummercar_Data\Managed\PlayMaker.dll</HintPath>
|
||||
<HintPath>$(MscManaged)\PlayMaker.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="0Harmony">
|
||||
@@ -63,75 +76,24 @@
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Compile Include="MoneySync.cs" />
|
||||
<Compile Include="WheelSpin.cs" />
|
||||
<Compile Include="DamageSync.cs" />
|
||||
<Compile Include="WorldVarSync.cs" />
|
||||
<Compile Include="TrafficSync.cs" />
|
||||
<Compile Include="HingeSync.cs" />
|
||||
<Compile Include="ControlSync.cs" />
|
||||
<Compile Include="Toasts.cs" />
|
||||
<Compile Include="PlayerNeeds.cs" />
|
||||
<Compile Include="Favorites.cs" />
|
||||
<Compile Include="Bootstrap.cs" />
|
||||
<Compile Include="Commands.cs" />
|
||||
<Compile Include="MscoLog.cs" />
|
||||
<Compile Include="ItemSpawner.cs" />
|
||||
<Compile Include="Cheats.cs" />
|
||||
<Compile Include="InputLock.cs" />
|
||||
<Compile Include="Overlays.cs" />
|
||||
<Compile Include="SafetyPatches.cs" />
|
||||
<Compile Include="SceneCache.cs" />
|
||||
<Compile Include="UiTheme.cs" />
|
||||
<Compile Include="VehicleStateSync.cs" />
|
||||
<Compile Include="Branding.cs" />
|
||||
<Compile Include="DiscordPresence.cs" />
|
||||
<Compile Include="DoorSync.cs" />
|
||||
<Compile Include="FsmSync.cs" />
|
||||
<Compile Include="JoinLinks.cs" />
|
||||
<Compile Include="LobbyUI.cs" />
|
||||
<Compile Include="MenuHelper.cs" />
|
||||
<Compile Include="MenuInputBlocker.cs" />
|
||||
<Compile Include="MiniJson.cs" />
|
||||
<Compile Include="PerfStats.cs" />
|
||||
<Compile Include="FsmDump.cs" />
|
||||
<Compile Include="VehicleAdmin.cs" />
|
||||
<Compile Include="WorldAdmin.cs" />
|
||||
<Compile Include="OilCheck.cs" />
|
||||
<Compile Include="PacketReader.cs" />
|
||||
<Compile Include="ModApi.cs" />
|
||||
<Compile Include="ModLoader.cs" />
|
||||
<Compile Include="MenuBranding.cs" />
|
||||
<Compile Include="MSCO.cs" />
|
||||
<Compile Include="MultiplayerManager.cs" />
|
||||
<Compile Include="NetSession.cs" />
|
||||
<Compile Include="ObjectSync.cs" />
|
||||
<Compile Include="Passenger.cs" />
|
||||
<Compile Include="GameCharacter.cs" />
|
||||
<Compile Include="SaveSync.cs" />
|
||||
<Compile Include="ServerBrowser.cs" />
|
||||
<Compile Include="SteamLobby.cs" />
|
||||
<Compile Include="VehicleFx.cs" />
|
||||
<Compile Include="WinHttp.cs" />
|
||||
<Compile Include="WorldSync.cs" />
|
||||
<EmbeddedResource Include="menu-logo.png">
|
||||
<LogicalName>MSCO.menu-logo.png</LogicalName>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="logo.png">
|
||||
<LogicalName>MSCO.logo.png</LogicalName>
|
||||
</EmbeddedResource>
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="RemotePlayer.cs" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
|
||||
<!-- Zum Testen: MSCO.dll direkt in den Spielordner (My Summer Car\MSCO) - läuft das Spiel, ist sie gesperrt -->
|
||||
<Target Name="CopyToGame" AfterTargets="Build">
|
||||
<Copy SourceFiles="$(TargetPath)" DestinationFolder="F:\SteamLibrary\steamapps\common\My Summer Car\MSCO" ContinueOnError="true" Condition="Exists('F:\SteamLibrary\steamapps\common\My Summer Car')" />
|
||||
<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 (nur mit Release-Token, siehe release.ps1) -->
|
||||
|
||||
<!-- 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 Command="powershell -NoProfile -ExecutionPolicy Bypass -File "$(MSBuildProjectDirectory)\release.ps1" -Product mod -File "$(TargetPath)"" ContinueOnError="true" />
|
||||
<Exec Condition="'$(OS)' == 'Windows_NT'" Command="powershell -NoProfile -ExecutionPolicy Bypass -File "$(MSBuildProjectDirectory)\release.ps1" -Product mod -File "$(TargetPath)"" ContinueOnError="true" />
|
||||
<Exec Condition="'$(OS)' != 'Windows_NT'" Command="pwsh -NoProfile -File "$(MSBuildProjectDirectory)/release.ps1" -Product mod -File "$(TargetPath)"" ContinueOnError="true" />
|
||||
</Target>
|
||||
</Project>
|
||||
</Project>
|
||||
|
||||
Reference in New Issue
Block a user