Skip to content

Conversation

@fanquake
Copy link
Member

Implements #18128 (mostly). From discussion on that issue we've got 3 ACKs (to move from .dmg to .zip), 1 ~0 and 1 NACK. So I've opened this PR to give a better overview of what the changes might actually look like.

Gitian builds currently work, however I haven't tested the signer, and that likely needs some additional changes. As mentioned we can drop quite a few packages from depends. There's some commits here that can cleaned up, squashed or dropped.

If you're compiling macOS, make appbundle will (as before) build a dynamically linked Bitcoin Core.app. make deploy will still build a statically linked dist/Bitcoin Core.app and will now also create a dist/Bitcoin-Core.zip.

Compiling on Linux there has never been a make appbundle rule, and with these changes, make deploy now behaves the same as on macOS. The make deploydir rule has been removed.

Initially I was unconvinced (of a swap from .dmg to .zip), however I have come around after looking at these changes. If there is not agreement that "this is the way", then I'll revive #18151 and fix it up to include xorriso in depends etc.

@jonasschnelli
Copy link
Contributor

Gitian Build seems to work: https://bitcoin.jonasschnelli.ch/gitian/build/142
Maybe the ZIP filename could still contain the phrase "macOS" or "osx".

Conceptual, I'm currently ~0 (I commented on the concept before).
I think it is nice to simplify the build system (probably makes it much easier for guix). Though, I'm currently unsure if this slightly worsens the UX for macOS users. If it does, should we reduce the UX to simplify the build-system (is that an acceptable tradeoff)?

However, if there is a difference in user experience between a zip and a dmg, it is probably marginal.

@maflcko
Copy link
Member

maflcko commented May 26, 2020

Is there any "official" mac documention or user surveys that suggest which one is the recommended or preferred way?

@dongcarl
Copy link
Contributor

Concept ACK! Great to see the amount of code we can remove.


(probably makes it much easier for guix).

Just to make myself clear, I am for this change because it is a great simplification for a marginal difference in user experience and not because of anything specific to Guix (my current implementation of the Guix macOS build is already able to build the dmg). ☺️

@Sjors
Copy link
Member

Sjors commented May 27, 2020

Concept ACK

You can add a symlink to /Applications to the archive and call it "Drag Here" (so it appears on the right).
Schermafbeelding 2020-05-27 om 18 29 17

With that it's close enough to what macOS users are used to, with a nice reduction in dependencies and complexity.

You could also keep the .DS_Store and .background folder around for full branding and a nicer layout, but that's pretty marginal.

Another nice thing about zip files is that Safari automatically unzips them after download.

@DrahtBot
Copy link
Contributor

DrahtBot commented May 27, 2020

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

Conflicts

Reviewers, this pull request conflicts with the following ones:

If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

@fanquake
Copy link
Member Author

You could also keep the .DS_Store and .background folder around for full branding and a nicer layout, but that's pretty marginal.

"Keeping that around" would mostly defeat the point of these changes.

@Sjors
Copy link
Member

Sjors commented May 28, 2020

"Keeping that around" would mostly defeat the point of these changes.

It still gets rid of genisoimage and libdmg-hfsplus, but indeed .DS_Store and .background require a lof of tools themselves. Just the symlink should get us close enough to the original UX.

@fanquake fanquake force-pushed the macdeploy_zip_instead_of_dmg branch from 17d2ee1 to 88fd25d Compare May 29, 2020 02:10
@fanquake
Copy link
Member Author

Pushed a few more removals, updated the descriptors and fixed whitespace.

Is there any "official" mac documention or user surveys that suggest which one is the recommended or preferred way?

The Apple documentation is mainly focused on using Xcode and App Store distribution: https://help.apple.com/xcode/mac/current/#/devac02c5ab8. There is a section on distribution outside the App Store: https://help.apple.com/xcode/mac/current/#/dev033e997ca, however I couldn't quickly find any mention of using .dmgs. There are some instructions on "macOS installer packages" (.pkg): https://help.apple.com/xcode/mac/current/#/deve51ce7c3d.

There seem to be at least some companies that are using a combination of .dmg and .zip for distribution. i.e: Sublime Merge is distributed as a .zip, while Sublime Text is a .dmg.

Just the symlink should get us close enough to the original UX.

I'm not aware of any projects that are using a symlink inside a .zip approach. The Bitcoin Core GUI is mostly designed for power users of bitcoin, and I think the intersection of power users, and people who don't know how to handle a .zip file would be very small.

Also, as far as I'm aware, you can open and use an app bundle from any directory on macOS, and it makes little to no difference to how the app actually runs?

@Sjors
Copy link
Member

Sjors commented May 29, 2020

I'm not aware of any projects that are using a symlink inside a .zip approach

That's because most projects use a DMG with a symlink and background image. We have a good reason to avoid that, namely to make deterministic builds easier. Even as an experienced macOS user, I find the symlink useful; it saves me from opening a new Finder window, navigating to Applications and then dragging between two windows. And it's a trivial thing to add.

Also, as far as I'm aware, you can open and use an app bundle from any directory on macOS, and it makes little to no difference to how the app actually runs?

Whenever I deal with applications that don't have an installer or a symlink, I very often make the mistake of running it from the Download folder. That works, until I accidentally clean up the download folder. There's no obvious alternative folder to drag the program to.

When downloading an upgrade there's an additional risk that a user doesn't replace the original version. The first time they might double click on the download and run the new version. Second time they might use command + space and launch the old version.

echo $(OSX_VOLNAME) >$@

if BUILD_DARWIN
$(OSX_DMG): $(OSX_APP_BUILT) $(OSX_PACKAGING) $(OSX_BACKGROUND_IMAGE)
Copy link
Member Author

Choose a reason for hiding this comment

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

One possible simplification after this change, would be to make the otool and installnametool checks no longer cross-compiling dependent. Then we should be able to have a single OSX_ZIP rule, and drop the need for BUILD_DARWIN.

@luke-jr
Copy link
Member

luke-jr commented Jun 3, 2020

Can we add the ZIP and remove the DMG in two steps?

IMO it'd be nice to build both for 0.21, but only distribute the ZIP. That way if it causes too much problems/confusion we can just change it back without rebuilds/etc.

@fanquake
Copy link
Member Author

I might come back to this in future, but closing for now as I've made some changes to the existing macdeploy process. Any discussion should continue in #18128.

@fanquake fanquake closed this Nov 13, 2020
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Feb 15, 2022
@fanquake fanquake deleted the macdeploy_zip_instead_of_dmg branch September 14, 2023 10:27
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants