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

Make Imhex buildable for MacOS arm64 #1414

Merged
merged 5 commits into from
Nov 11, 2023
Merged

Conversation

iTrooz
Copy link
Collaborator

@iTrooz iTrooz commented Nov 11, 2023

This PR helps with #1109 but does not fix it

This PR only fix minor things in ImHex, and adds build Dockerfiles to allow you to obtain a .app folder with MacOS arm64 code (currently packaged in an ISO file)

What still needs to be done (in another PR):

  • Package the .app in a dmg (apparently the current packaging doesn't work on some setups (e.g. @StArBoY-Works)

  • Sign it
    Context: MacOS wants all arm64 code to be signed (but it does not need to be a key associated with a Developer ID AFAIK). Right now the binaries seems to be signed, but the signature are invalidated by the install_name_tool command invoked after. This command seems to be invoked from

    add_custom_command(TARGET imhex_all POST_BUILD COMMAND ${CMAKE_INSTALL_NAME_TOOL} -add_rpath "@executable_path/../Frameworks/" $<TARGET_FILE:main>)
    and https://github.com/WerWolv/ImHex/blob/5171bea0bf64befb000fc1a0a354e34a6004f891/cmake/modules/PostprocessBundle.cmake
    Example warning message: /usr/bin/install_name_tool: warning: changes being made to the file will invalidate the code signature in: /mnt/ImHex/build/imhex.app/Contents/MacOS/plugins/script_loader.hexplug

@iTrooz iTrooz enabled auto-merge (squash) November 11, 2023 11:55
@iTrooz
Copy link
Collaborator Author

iTrooz commented Nov 11, 2023

@iTrooz iTrooz merged commit d3a7e84 into WerWolv:master Nov 11, 2023
14 checks passed
@iTrooz iTrooz deleted the macos_arm_pr branch November 11, 2023 19:52
@iTrooz iTrooz mentioned this pull request Nov 14, 2023
WerWolv added a commit that referenced this pull request Nov 16, 2023
I said I'll do it in #1414

Warning: the output zip does not pass SIP (System Integrity Protection),
and I have no plan to do it for now. So if someone here has a Mac, feel
free to to try to fix the problem (which is probably our build system)

Link #1109

---------

Co-authored-by: Nik <[email protected]>
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.

1 participant