Page MenuHomePhabricator

[CMAKE] Add the background image to the dist directory

Authored by Fabien on Nov 5 2019, 15:18.



This diff generates the background image to be added to the OSX dist
directory. This background image will later be used as the background
for the OSX installer (DMG image).

This background file is expected to be a multi-resolution TIFF image. In
order to allow to change the package name easily, it is constructed from
a SVG file template which is configured at build time.

This SVG file is then converted to multiple DPI raster images, which are
finally concatenated into a single final background TIFF file.

This image transformation process requires several steps, and will
differ between a cross compilation and a native compilation due to the
different tool being available. This diff only support cross
compilation, native platform support will be added later.

Depends on D4380.

Test Plan
ninja osx-deploydir

Check the background.tiff file is added to the dist directory (under
a dedicated .background directory).
Open the TIFF file and check it contains 2 images with different (x2
ratio) resolutions.

Diff Detail

rABC Bitcoin ABC
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

Fabien created this revision.Nov 5 2019, 15:18
Herald added a reviewer: Restricted Project. · View Herald TranscriptNov 5 2019, 15:18
jasonbcox requested changes to this revision.Nov 7 2019, 19:19
jasonbcox added a subscriber: jasonbcox.
jasonbcox added inline comments.
45 ↗(On Diff #13923)

Shouldn't CMAKE_SYSTEM_NAME not match "Linux" rather than "Darwin" for the error message to be true?

69 ↗(On Diff #13923)


This revision now requires changes to proceed.Nov 7 2019, 19:19
Fabien requested review of this revision.Nov 7 2019, 19:42
Fabien added inline comments.
45 ↗(On Diff #13923)

Hum, no ?
The test check that we building for OSX (i.e. Darwin), and not cross compiling, so we are running on native OSX.

Then if we fall into this case, the error messages states that it is only supported on Linux, because the only supported build hosts for now (and for some time I think) are OSX and Linux. One can argue that there is some support for windows but it is through WSL or cygwin/mingw which identify as being Linux. Further more if some other host platform is used, then the message remains valid: the tools are only tested valid on Linux.

jasonbcox accepted this revision.Nov 7 2019, 19:54
jasonbcox added inline comments.
45 ↗(On Diff #13923)

Ok, I see.

This revision is now accepted and ready to land.Nov 7 2019, 19:54
This revision was automatically updated to reflect the committed changes.