This is (for now) a modest step-by-step tutorial about creating a MacOS desktop application with Ruby.
I used Traveling Ruby and Platypus, so it doesn't need any system dependencies to run because it downloads Ruby executables and installs gems in the application bundle.
(I'll try to make it more detailed and add more features in the future).
Tested on Apple M3
1
You have your Ruby application inside a example
folder
2
Create a ruby2pack.rb
file outside example
and fill it with this gist https://gist.github.com/josephschito/96c0e385cb803f3778fb4c40226e64f5
3
From IRB require that file with require ./ruby2pack
and run Ruby2Pack.new(source_path: 'example', ruby_version: '3.3.0', platform: 'osx-arm64', rel: '20240215').run
.
Test your application execution by running ./dist/osx-arm64-3.3.0-20240215/run
4
Download Platypus from https://github.com/sveinbjornt/Platypus/releases
and run it
5
Follow the image instructions and then press [Create App]
THE END
That's it! 🎉
Top comments (2)
I was able to follow these instructions successfully to package a Glimmer DSL for LibUI desktop application as a native MacOS Sonoma 14.4.1 desktop application on my M2 Chip MacBook Pro.
Thank you for sharing.
Awesome! I need to try this soon! 🤩