Skip to content
This repository was archived by the owner on Aug 11, 2025. It is now read-only.
This repository was archived by the owner on Aug 11, 2025. It is now read-only.

[Feature] Build for macOS #1

@HongyuS

Description

@HongyuS

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=true as argument to the dotnet publish command;
  • 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=true to 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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions