Page MenuHomePhabricator

[CMAKE] Use a NSIS custom template
ClosedPublic

Authored by Fabien on Nov 14 2019, 10:36.

Details

Summary

This allow to use the exact same installation process than the one from
autotools. This uses the same template adapted to work with cmake/cpack.
The installed components are also almost identical.

It is slightly improved over the original template to output a better
selection of the documentation (no CMakeLists.txt is included for
example) and a Bitcoin ABC icon for the uninstaller instead of windows
default uninstall icon.

The name and location of the template are requirements from the CPack NSIS generator.
It expects this template to have this exact name and be located in the CMake module path.

Test Plan

Build for a Windows target:

ninja package

Run the installer, check the start menu links, run the uninstaller.

Diff Detail

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

Event Timeline

Fabien planned changes to this revision.Nov 14 2019, 10:37

This diff is complete, working and ready to review, but I want to check first is the output of the gitian build is deterministic on CI

Fabien requested review of this revision.Nov 14 2019, 10:53

Note to reviewers: this fixes the determinism issue on windows installer as expected (see builds #5027 and 5028)

Fabien retitled this revision from [WIP][CMAKE] Use a NSIS custom template to [CMAKE] Use a NSIS custom template.Nov 14 2019, 13:41
deadalnix requested changes to this revision.Nov 17 2019, 22:51

This isn't a really a change request per se, but I don't understand how the template come to be used, considering it is not referenced anywhere.

cmake/modules/NSIS.template.in
180 ↗(On Diff #14127)

Why not share/setup.cmake.in to keep it all together?

This revision now requires changes to proceed.Nov 17 2019, 22:51
Fabien requested review of this revision.Nov 18 2019, 07:15
Fabien edited the summary of this revision. (Show Details)
Fabien added inline comments.
cmake/modules/NSIS.template.in
180 ↗(On Diff #14127)

The CPack NSIS module expects the template with this name in the module path, this is why it is not referenced anywhere.
I can put it in the share folder at the cost of expanding the cmake module path, but I'm not sure it's worth it. The name is harcoded and cannot be changed.
I will add this note to the summary.

deadalnix added inline comments.
cmake/modules/NSIS.template.in
180 ↗(On Diff #14127)

This is retarded...

This revision is now accepted and ready to land.Nov 20 2019, 14:17
This revision was automatically updated to reflect the committed changes.