mirror of
https://github.com/claunia/romrepomgr.git
synced 2025-12-16 19:24:51 +00:00
[App] Create bundle when publishing for macOS.
This commit is contained in:
BIN
RomRepoMgr/Assets/RomRepoMgr.icns
Normal file
BIN
RomRepoMgr/Assets/RomRepoMgr.icns
Normal file
Binary file not shown.
@@ -61,4 +61,39 @@
|
||||
<LastGenOutput>Localization.Designer.cs</LastGenOutput>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
|
||||
<Target Name="CreateMacAppBundle" AfterTargets="Publish" Condition="'$(RuntimeIdentifier)' == 'osx-x64' Or '$(RuntimeIdentifier)' == 'osx-arm64'">
|
||||
<!-- Create Directory Structure -->
|
||||
<MakeDir Directories="
|
||||
$(PublishDir)MacPackage/RomRepoMgr.app/Contents/MacOS;
|
||||
$(PublishDir)MacPackage/RomRepoMgr.app/Contents/Resources" />
|
||||
|
||||
<!-- Copy Executable -->
|
||||
<Copy SourceFiles="$(PublishDir)RomRepoMgr" DestinationFiles="$(PublishDir)MacPackage/RomRepoMgr.app/Contents/MacOS/RomRepoMgr" />
|
||||
|
||||
<!-- Copy .dylib files -->
|
||||
<ItemGroup>
|
||||
<DylibFiles Include="$(PublishDir)**\*.dylib" />
|
||||
</ItemGroup>
|
||||
<Copy SourceFiles="@(DylibFiles)" DestinationFolder="$(PublishDir)MacPackage/RomRepoMgr.app/Contents/MacOS\%(RecursiveDir)" />
|
||||
|
||||
<!-- Copy Icon (optional) -->
|
||||
<Copy SourceFiles="Assets/RomRepoMgr.icns" DestinationFiles="$(PublishDir)MacPackage/RomRepoMgr.app/Contents/Resources/RomRepoMgr.icns" />
|
||||
|
||||
<!-- Generate Info.plist -->
|
||||
<WriteLinesToFile File="$(PublishDir)MacPackage/RomRepoMgr.app/Contents/Info.plist" Lines="
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleName</key><string>RomRepoMgr</string>
|
||||
<key>CFBundleIdentifier</key><string>es.natportillo.romrepomgr</string>
|
||||
<key>CFBundleVersion</key><string>1.0</string>
|
||||
<key>CFBundleExecutable</key><string>RomRepoMgr</string>
|
||||
<key>CFBundleIconFile</key><string>RomRepoMgr.icns</string>
|
||||
<key>NSHumanReadableCopyright</key><string>© 2025 Nat Portillo.</string>
|
||||
</dict>
|
||||
</plist>" Overwrite="true" />
|
||||
</Target>
|
||||
|
||||
</Project>
|
||||
|
||||
Reference in New Issue
Block a user