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

Updater: Embed Updater app within the main app bundle on macOS #10428

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

OatmealDome
Copy link
Member

@OatmealDome OatmealDome commented Feb 2, 2022

This PR embeds Dolphin Updater.app within the Dolphin.app bundle. It is inserted into the Dolphin.app/Contents/Helpers folder, which is one of the canonical locations to place helper apps. In addition, if a separate Dolphin Updater.app is found during the auto-update cleanup, it is removed.

The goal here is to be able to ship a single app bundle to simplify installation. Users may not copy the Updater app from the DMG for whatever reason, preventing Dolphin's auto-update mechanism from working.

The buildbot configuration needs to be updated as well: dolphin-emu/sadm#153. When merging, that PR should be merged right before this PR is merged.

BuildMacOSUniversalBinary.py Outdated Show resolved Hide resolved
"-DMACOS_CODE_SIGNING_IDENTITY_UPDATER="
+ config["codesign_identity"],
'-DMACOS_CODE_SIGNING="ON"'
'-DMACOS_CODE_SIGNING="OFF"'
Copy link
Contributor

Choose a reason for hiding this comment

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

Does code signing not work with the updater in the bundle?

Copy link
Member Author

Choose a reason for hiding this comment

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

The final universal bundle is codesigned below, so codesigning the individual bundles is a pointless operation.

BuildMacOSUniversalBinary.py Outdated Show resolved Hide resolved
Source/Core/UICommon/AutoUpdate.cpp Outdated Show resolved Hide resolved
Source/Core/UICommon/AutoUpdate.cpp Outdated Show resolved Hide resolved
Source/Core/UICommon/AutoUpdate.cpp Outdated Show resolved Hide resolved
Source/Core/UICommon/AutoUpdate.cpp Outdated Show resolved Hide resolved
Source/Core/UICommon/AutoUpdate.cpp Outdated Show resolved Hide resolved
@OatmealDome OatmealDome marked this pull request as ready for review June 5, 2022 07:26
@OatmealDome
Copy link
Member Author

OK, I tested the updater locally and it was able to update itself to the latest development build fine. I also submitted the latest build of this PR to the notary service and it was accepted.

I think this is ready for further review now.

Copy link
Contributor

@Dentomologist Dentomologist left a comment

Choose a reason for hiding this comment

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

The code to move the updater inside the Dolphin.app bundle is in BuildMacOSUniversalBinary.py, which is only run when making a Universal build. Single-architecture builds leave the updater in the old location.

That won't affect users downloading builds from the website, but anyone building from source on an Intel mac will have their updater deleted the next time Dolphin checks for an update. It would also break updating for regular users if/when we start releasing ARM-only builds.

@OatmealDome
Copy link
Member Author

Yeah, I put it in there because I couldn't figure out a good way to force CMake to recopy the bundle when Dolphin Updater.app was recompiled/changed but Dolphin.app was not... Maybe I can figure something out.

@OatmealDome OatmealDome marked this pull request as draft July 8, 2022 22:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants