Page MenuHomePhabricator

[CMAKE] Build the OSX DMG image

Authored by Fabien on Oct 31 2019, 15:02.


Group Reviewers
Restricted Project

This diff adds a couple targets:

  • osx-deploydir: this is the dmg directory before being an image

(equivalent to autotools deploydir).

  • osx-dmg: the osx installation image (equivalent to autotools


These targets can run on native OSX as well as Linux when

Test Plan

On both Linux (cross compilation) and OSX (native):

ninja osx-deploydir

There should be a dist directory at the root of the build directory.
Compare the content with the dist from an autotool deploydir cross
build (cross compilation only !).
Note: there is a PkgInfo file created by autotools under
dist/ which is not included with the cmake
build. This file is redundant with the application bundle metadata and
can be safely removed.

ninja osx-dmg

Install using the DMG. Check the software runs after installation. Check
it uninstalls as expected.

Note 1: On OSX, building the DMG will overwrite the dist directory
(which can be rebuilt if needed by using the osx-deploydir target

Note 2: the low resolution background file generated on native OSX has a
bad rendering of the text on my Sierra test machine. The same occurs
with autotools and seems to be a bug from rsvg-convert. I cannot
reproduce the issue when converting the image from Linux.

Diff Detail

rABC Bitcoin ABC
Lint OK
No Unit Test Coverage
Build Status
Buildable 7936
Build 13875: Bitcoin ABC Buildbot (legacy)
Build 13874: arc lint + arc unit

Event Timeline

Fabien created this revision.Oct 31 2019, 15:02
Herald added a reviewer: Restricted Project. · View Herald TranscriptOct 31 2019, 15:02
deadalnix requested changes to this revision.Nov 2 2019, 17:29

This is a very large diff. You may want to split it up in more logical chunks, such as generating the different variation of the png. This would make review easier, and ensure that parts of it that are good do not end up blocked by arts that are not.


I don't think this really hep readibility to put every one of them on their own line. Some of these arguement go together, like -f png so grouping them make things more readable.


And strip.


Is there a reason these aren't just referred as background.svg and alike ? AFAIK, generated file are going into CMAKE_CURRENT_BINARY_DIR by default.

This revision now requires changes to proceed.Nov 2 2019, 17:29
Fabien planned changes to this revision.Nov 4 2019, 08:59

Will split for better readability.

Fabien added inline comments.Nov 5 2019, 08:57

Generally speaking, the inputs are relative to CMAKE_CURRENT_SOURCE_DIR and the outputs to CMAKE_CURRENT_BINARY_DIR.
Here we are using custom commands where the files will be both the output then the input during the transformation workflow, so it sounded more natural to use absolute path to avoid confusion.

Fabien abandoned this revision.Nov 18 2019, 12:24

Has been split in several diffs.