-
Notifications
You must be signed in to change notification settings - Fork 65
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
Fix macOS launcher app. #293
Conversation
FreeCAD uses argv[0] to determine PREFIX information, not the environment variables. This commit corrects argv[0] to match the FreeCAD binary.
@adrianinsaval FreeCAD uses argv[0] to determine the home environment. None of the environment variables seems to have a significant effect on the ability to launch. I confirmed that this worked with the weekly build by:
|
Ubuntu CI build fails:
|
Yes, but nothing related to the Ubuntu build was modified in this commit. It should be addressed as a separate issue. |
@chennes Could you merge this change? If you want to build and test the change:
A file After merging, someone will need to manually re-trigger the weekly build to get a working build for |
@adrianinsaval @FreeCAD/maintainers This bug is preventing the macOS weekly builds from running and generating issues on FreeCAD main repo. I request that this change be reviewed and merged to get weekly builds back on track. |
sigh This fixed the Intel builds, but not the Apple Silicon builds. In order to run the Apple Silicon build I had to first execute |
After some investigation, here's what I have found. Both apps are unsigned, so they prompt the user to permit them to be run. After being granted, the Intel version runs but the Apple Silicon version does not, instead suggesting the program be moved to the Trash. Comparing the attributes on each of the versions reveals the following:
Bytes 12 and 13 of the
Now the Apple Silicon version will run. I am unsure why these attributes differ between the Intel and Apple Silicon version, but whatever the cause is, that's what's preventing the Apple Silicon version from running. |
Running The issue is tied to the Signing the image with a valid developer key would eliminate the issue. |
Thanks for the sluething @oursland! |
Is it normal for projects to sign their development weeklies? And/or to do it as part of their CI process? I manually sign our releases so that the signing key never leaves my direct control. |
I don't know what "normal" is, but PrusaSlicer signs all their publicly released alpha, beta, and RC releases. They may go months with no release, but then might have releases every 3-7 days for a couple of months as they approach releases. You might be able to nose around their Github to see if they handle it automatically as part of their CI process. https://github.com/prusa3d/PrusaSlicer/releases |
Indeed. It is fairly standard for an organization to sign all artifacts that go out for distribution. Apple supports different approaches with TestFlight to manage test and beta builds. The more common approach used in applications that are not on the App Store is to provide the signed app as a downloadable file. GitHub supports the automated import of a signing key with a workflow. This can then be used to sign the application from the command line. |
Sadly, tonight's build, 38553, for arm still shows as damaged. Running
|
This is due to a difference in behaviors of macOS' Gatekeeper quarantine. For unknown architectures, as the old shell script launcher was, the application would be assumed to be Intel. For Intel architecture, a quarantined The correct approach to resolve this issue would be to sign the weekly images. I am currently at a robotics conference, but once my role in the conference has concluded I will look at how to employ the GitHub workflow to sign the |
For those of you looking for the fix: |
FreeCAD uses argv[0] to determine PREFIX information, not the environment variables. This commit corrects argv[0] to match the FreeCAD binary.