mirror of
https://github.com/riperiperi/FreeSO
synced 2026-08-13 20:26:13 -04:00
101 lines
5.3 KiB
XML
101 lines
5.3 KiB
XML
<Project>
|
|
<Import Project="Sdk.props" Sdk="Microsoft.NET.Sdk" />
|
|
|
|
<PropertyGroup>
|
|
<OutputType>Exe</OutputType>
|
|
<TargetFramework>net9.0</TargetFramework>
|
|
<RootNamespace>FSO.Unix</RootNamespace>
|
|
<AssemblyName>FreeSO</AssemblyName>
|
|
<ApplicationIcon>fso.ico</ApplicationIcon>
|
|
<PublishReadyToRun>false</PublishReadyToRun>
|
|
<PublishSingleFile>true</PublishSingleFile>
|
|
<TieredPGO>true</TieredPGO>
|
|
<_EnableMacOSCodeSign>false</_EnableMacOSCodeSign>
|
|
<PublishAot>false</PublishAot>
|
|
<PublishTrimmed>false</PublishTrimmed>
|
|
</PropertyGroup>
|
|
|
|
<ItemGroup>
|
|
<Content Include="fso.ico" />
|
|
<EmbeddedResource Include="Icon.bmp">
|
|
<LogicalName>Icon.bmp</LogicalName>
|
|
</EmbeddedResource>
|
|
</ItemGroup>
|
|
|
|
<!-- macOS-only items: Info.plist and Icon.icns -->
|
|
<ItemGroup Condition="$(RuntimeIdentifier.StartsWith('osx'))">
|
|
<None Include="Info.plist">
|
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
|
</None>
|
|
<None Include="Icon.icns">
|
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
|
</None>
|
|
<EmbeddedResource Include="Icon.icns">
|
|
<LogicalName>Icon.icns</LogicalName>
|
|
</EmbeddedResource>
|
|
</ItemGroup>
|
|
|
|
<ItemGroup>
|
|
<PackageReference Include="MonoGame.Framework.DesktopGL" Version="3.8.5" />
|
|
<PackageReference Include="System.IO.FileSystem.Primitives" Version="4.3.0" />
|
|
<ProjectReference Include="..\FSO.Patcher.Unix\FSO.Patcher.Unix.csproj" />
|
|
<ProjectReference Include="..\tso.client\FSO.Client.csproj" />
|
|
<ProjectReference Include="..\tso.common\FSO.Common.csproj" />
|
|
</ItemGroup>
|
|
|
|
<ItemGroup>
|
|
<PackageReference Include="SixLabors.ImageSharp" Version="3.1.11" />
|
|
</ItemGroup>
|
|
|
|
<Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" />
|
|
|
|
<Target Name="UpdaterPublish" BeforeTargets="Publish">
|
|
<Exec Command="dotnet publish ../FSO.Patcher.Unix -c Release -r $(RuntimeIdentifier) -o "$(PublishDir)"" />
|
|
</Target>
|
|
|
|
<!-- Override SDK target to prevent it from deleting native dylibs on repeated publishes -->
|
|
<Target Name="_IncrementalCleanPublishDirectory" />
|
|
|
|
<Target Name="CreateMacAppBundle" AfterTargets="Publish" Condition=" '$(RuntimeIdentifier)' == 'osx-arm64' ">
|
|
<RemoveDir Directories="$(PublishDir)/FreeSO.app" />
|
|
|
|
<Exec Command="sleep 2" />
|
|
|
|
<MakeDir Directories="$(PublishDir)/FreeSO.app/Contents/MacOS" />
|
|
<MakeDir Directories="$(PublishDir)/FreeSO.app/Contents/Resources" />
|
|
|
|
<Exec Command="codesign --force -s - "$(PublishDir)/FreeSO"" Condition="'$(ForceSign)' == 'true'"/>
|
|
|
|
<Copy SourceFiles="$(PublishDir)/FreeSO" DestinationFolder="$(PublishDir)/FreeSO.app/Contents/MacOS" />
|
|
<Copy SourceFiles="$(PublishDir)/update" DestinationFolder="$(PublishDir)/FreeSO.app/Contents/MacOS" />
|
|
<Copy SourceFiles="$(PublishDir)/libSDL2-2.0.0.dylib" DestinationFolder="$(PublishDir)/FreeSO.app/Contents/MacOS" />
|
|
<Copy SourceFiles="$(PublishDir)/libopenal.dylib" DestinationFolder="$(PublishDir)/FreeSO.app/Contents/MacOS" />
|
|
<Copy SourceFiles="$(PublishDir)/libMono.Unix.dylib" DestinationFolder="$(PublishDir)/FreeSO.app/Contents/MacOS" />
|
|
<Copy SourceFiles="$(PublishDir)/libe_sqlite3.dylib" DestinationFolder="$(PublishDir)/FreeSO.app/Contents/MacOS" Condition="Exists('$(PublishDir)/libe_sqlite3.dylib')" />
|
|
|
|
<ItemGroup>
|
|
<GameContent Include="$(PublishDir)/Content/**" />
|
|
</ItemGroup>
|
|
|
|
<Copy SourceFiles="@(GameContent)" DestinationFiles="@(GameContent->'$(PublishDir)/FreeSO.app/Contents/MacOS/Content/%(RecursiveDir)%(Filename)%(Extension)')" SkipUnchangedFiles="true" />
|
|
<Copy SourceFiles="$(PublishDir)/version.json" DestinationFolder="$(PublishDir)/FreeSO.app/Contents/MacOS" />
|
|
|
|
<!-- Clean up existing symlink/folder if present -->
|
|
<RemoveDir Directories="$(PublishDir)/FreeSO.app/Contents/Resources/Content" />
|
|
|
|
<!-- Create symlink because Monogame has code that only searches bundles apps Content in /Resources -->
|
|
<!-- But our application is built to look in the root Application folder /MacOS/Content -->
|
|
<Exec Command="ln -s ../MacOS/Content "$(PublishDir)/FreeSO.app/Contents/Resources/Content"" />
|
|
|
|
<Copy SourceFiles="Icon.icns" DestinationFolder="$(PublishDir)/FreeSO.app/Contents/Resources" />
|
|
<Copy SourceFiles="Info.plist" DestinationFolder="$(PublishDir)/FreeSO.app/Contents" />
|
|
|
|
<Exec Command="chmod +x "$(PublishDir)/FreeSO.app/Contents/MacOS/FreeSO"" />
|
|
<Exec Command="chmod +x "$(PublishDir)/FreeSO.app/Contents/MacOS/update"" />
|
|
<Exec Command="chmod +x "$(PublishDir)/FreeSO.app/Contents/MacOS/libSDL2-2.0.0.dylib"" />
|
|
<Exec Command="chmod +x "$(PublishDir)/FreeSO.app/Contents/MacOS/libopenal.dylib"" />
|
|
<Exec Command="chmod +x "$(PublishDir)/FreeSO.app/Contents/MacOS/libMono.Unix.dylib"" />
|
|
<Exec Command="chmod +x "$(PublishDir)/FreeSO.app/Contents/MacOS/libe_sqlite3.dylib"" Condition="Exists('$(PublishDir)/FreeSO.app/Contents/MacOS/libe_sqlite3.dylib')" />
|
|
</Target>
|
|
|
|
</Project>
|