This repository was archived by the owner on Aug 11, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 18
This repository was archived by the owner on Aug 11, 2025. It is now read-only.
[Feature] Build for macOS #1
Copy link
Copy link
Open
Description
Since Avalonia UI is cross-platform, it is possible to distribute the program for macOS.
I took some time to look into this, and found out that Ryujinx has a set of build scripts to do this. So I copied and pasted them into my fork, and with only a few changes, it just works!
Modifications I made:
- All libs needed by this app are already universal binaries (both x86_64 and arm64e), so I removed the python script to do this;
- To make the folder structure more straightforward, I added
PublishSingleFile=trueas argument to thedotnet publishcommand; - To make the app independent from external .Net Runtime, I also added
--self-contained true; - The self-contained Avalonia UI app is too big, so I added
PublishTrimmed=trueto reduce binary size.
The output macOS App Bundle has folder structure like this:
Audio.app
└── Contents
├── Frameworks
│ ├── libAvaloniaNative.dylib
│ ├── libHarfBuzzSharp.dylib
│ └── libSkiaSharp.dylib
├── Info.plist
├── MacOS
│ └── Audio
├── PkgInfo
├── Resources
│ └── Icon.icns
└── _CodeSignature
└── CodeResources
Usage:
cd /path/to/<directory of Audio.sln>
# chmod +x ./distribution/macos/create_macos_build.sh
# chmod +x ./distribution/macos/create_app_bundle.sh
./distribution/macos/create_macos_build.sh
The app will be in ./distribution/macos/publish/
Please refer to the scripts in this commit for more information.
Here is a binary file if anyone wants to test it:
raztools-audio-macos-universal.7z.zip
Metadata
Metadata
Assignees
Labels
No labels