-
Notifications
You must be signed in to change notification settings - Fork 438
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Mac app release #865
Add Mac app release #865
Conversation
.github/scripts/build_mac.sh
Outdated
#!/bin/bash | ||
# Usage: | ||
# | ||
# $ sh .github/scripts/build_mac.sh |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Eventually I'd like to run this on CI but there are complexities with setting certificated and GitHub doesn't yet support ARM, so I plan to build the releases myself in the meantime.
@@ -0,0 +1 @@ | |||
# AppBuilder |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd like to eventually extract it out but let's iterate on it as part of the Livebook repo in the meantime.
.github/scripts/build_mac.sh
Outdated
# $ open ./test/support/notebooks/basic.livemd | ||
set -e | ||
|
||
sh app_builder/scripts/bootstrap-mac.sh |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ideally we'd use off the shelf Mac builds hosted by the OTP team (or Hex team, etc) but let's build them ourselves in the meantime.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we keep said script in the same .github folder then? 🤔 Or do we want to provide it long term?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My thinking was it is generic and thus more appropriate for app_builder
which we'll eventually extract out but yeah, since it is ideally short lived, Livebook's .github folder is perhaps a better place indeed. Will change it!
.github/scripts/build_mac.sh
Outdated
# $ sh .github/scripts/build_mac.sh | ||
# $ open _build/app_prod/rel/Livebook.app | ||
# $ open livebook://github.com/livebook-dev/livebook/blob/main/test/support/notebooks/basic.livemd | ||
# $ open ./test/support/notebooks/basic.livemd |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Those are so cool.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome stuff! Some comments inline!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Amazing job! 🤠
<true/> | ||
<key>com.apple.security.cs.allow-unsigned-executable-memory</key> | ||
<true/> | ||
<key>com.apple.security.cs.allow-dyld-environment-variables</key> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see you using this entitlement but not setting the DYLD_LIBRARY_PATH
environment variable. How do you ensure the wx and other libraries are found when starting? Or does this assume the user has installed Erlang independently?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
both wx & openssl are statically compiled so I believe we don't even need this entitlement for them. I though I'd leave it though in case someone has a notebook that Mix installs a dependency with native code that would take advantage of it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The static build is definitely very cool, the way to go. Just the build time and the nifs are troubling. Would be cool to have a repository of pre-built binaries for erlang on different platforms and versions. Having different versions available would also make building the mobile apps easier as they could fetch the correct runtime matching your local erlang version that is used to compile the beam files.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, a repository of builds for different targets is sorely needed. :) We need it, elixir-desktop needs it, burrito needs it too! (cc @doawoo @QuinnWilton). I think it would be ideal to have as many official builds as possible. OTP team is keen with moving forward with erlang/otp#5036 so we'd at least have Mac ones (just x86_64 until GitHub adds ARM workers though). I believe they would be keen to have builds for popular Linux distros too. Or maybe there's one Linux build with as many things statically compiled as possible so that it works on all distros. (Or, you know, actually two, one against gcc and one against musl)
💚 💙 💜 💛 ❤️ |
Demo:
demo_720p.mov