Skip to content
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

Build for Apple Silicon #1743

Merged
merged 110 commits into from Jan 26, 2024
Merged

Build for Apple Silicon #1743

merged 110 commits into from Jan 26, 2024

Conversation

rhinoella
Copy link
Contributor

@rhinoella rhinoella commented Dec 1, 2023

This PR introduces a GitHub workflow for apple silicon. This specific workflow is to be used on intel GH runners, as it is configured to crossbuild. Currently there is no codesigning step, so in order to open the application, you will have to run these commands first:

# Run in the folder with the app bundle

xattr -rd com.apple.quarantine dissolve-gui.app
xattr -rd com.apple.quarantine dissolve-gui.app/Contents/MacOS/dissolve-gui
chmod +x dissolve-gui.app/Contents/MacOS/dissolve-gui

You may have to right click + 'Open' the first time in order to bypass security.

Notes

  • The bundle ships with the necessary shared dependencies (.dylib) in the bundle
  • Currently, FTGL must be downloaded by the user using homebrew: brew install ftgl

@rhinoella rhinoella marked this pull request as ready for review January 24, 2024 15:57
Comment on lines 114 to 125
install_name_tool -change /usr/local/opt/ftgl/lib/libftgl.2.dylib @rpath/libftgl.2.dylib bin/dissolve-gui.app/Contents/MacOS/dissolve-gui

cd ../

# Deploy Conan dependencies for ease
mkdir deploy && cd deploy
conan install .. -g deploy -s arch=armv8

# Copy over ftgl so it can be shipped with the bundle
mkdir ftgl
cp $(brew --prefix ftgl)/lib/libftgl.2.dylib ftgl
cp $(brew --prefix ftgl)/lib/libftgl.2.1.3.dylib ftgl
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Regarding the rename and copy, would it be slightly neater to make our ftgl dir (at the end of the stage), copy the libs, and then apply install_name_tool?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I actually realised its best to remove the install_name_tool call as it will not work without notorisation!

.github/workflows/continuous.yml Outdated Show resolved Hide resolved
rhinoella and others added 2 commits January 26, 2024 10:03
Co-authored-by: Tristan Youngs <tristan.youngs@stfc.ac.uk>
@rhinoella rhinoella merged commit 3add928 into develop Jan 26, 2024
9 checks passed
@rhinoella rhinoella deleted the apple-silicon branch January 26, 2024 14:11
rprospero added a commit that referenced this pull request Mar 11, 2024
Co-authored-by: Spitz <noella.spitz@ndw2544mac.isis.cclrc.ac.uk>
Co-authored-by: Adam Washington <adam.washington@stfc.ac.uk>
Co-authored-by: Tristan Youngs <tristan.youngs@stfc.ac.uk>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants