Page MenuHomePhabricator

[CMAKE] Add the background image to the dist directory
ClosedPublic

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

Details

Summary

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

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

jasonbcox requested changes to this revision.Nov 7 2019, 19:19
jasonbcox added a subscriber: jasonbcox.
jasonbcox added inline comments.
cmake/modules/ImageHelper.cmake
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)

ditto

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.
cmake/modules/ImageHelper.cmake
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 added inline comments.
cmake/modules/ImageHelper.cmake
45 ↗(On Diff #13923)

Ok, I see.

This revision is now accepted and ready to land.Nov 7 2019, 19:54