Page MenuHomePhabricator

[CMAKE] Use a NSIS custom template
ClosedPublic

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

Details

Reviewers
deadalnix
Group Reviewers
Restricted Project
Commits
rABCb0d68c3ce535: [CMAKE] Use a NSIS custom template
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
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

Fabien created this revision.Thu, Nov 14, 10:36
Herald added a reviewer: Restricted Project. · View Herald TranscriptThu, Nov 14, 10:36
Fabien planned changes to this revision.Thu, Nov 14, 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.Thu, Nov 14, 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.Thu, Nov 14, 13:41
deadalnix requested changes to this revision.Sun, Nov 17, 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.Sun, Nov 17, 22:51
Fabien requested review of this revision.Mon, Nov 18, 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 accepted this revision.Wed, Nov 20, 14:17
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.Wed, Nov 20, 14:17
This revision was automatically updated to reflect the committed changes.