-
Notifications
You must be signed in to change notification settings - Fork 38.7k
Build System: Use PACKAGE_TARNAME in NSIS script #7603
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Concept ACK. |
|
Concept ACK. |
|
Looks like gitian is happy with this |
share/setup.nsi.in
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, if we're parametrizing executable names anyway I'd prefer to be able to customize the entire name, e.g. have a @BITCOIN_QT_NAME@, and set that to @PACKAGE_TARNAME@-qt somewhere higher in the build system.
There's been talk of getting rid of the -qt suffix for the user interface in the past, so having it hard-coded in as few places as possible would be a step forward.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree that that would be useful. Unfortunately my familiarity with autoconf is limited enough that I'm not fully comfortable implementing that myself. Maybe someone else could do that as another pull request?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fine with me.
|
@theuni I suppose this is ok with you? |
ad8ca48 to
2b7dd04
Compare
|
I just rebased against latest master, and added a 2nd commit which removes the wxwidgets stuff as @laanwj and @MarcoFalke requested. |
|
Ooh neat, I'm assigned. I guess I should take that as a hint and fix my mail filters so I'm not missing pings :) Agree with @laanwj wrt avoiding hard-coding filenames. The names are already set in the top Makefile as @BITCOIN_QT_BIN@ and @BITCOIN_WIN_INSTALLER@, we just need to modify BITCOIN_QT_BIN to not include a path. I'll work up a quick change for that. |
|
@JeremyRand Can you please take the top two commits from https://github.com/theuni/bitcoin/tree/7603 ? You can squash the NSIS one into your own. After that, I'm good with this. We can't use BITCOIN_QT_BIN/BITCOIN_WIN_INSTALLER as I said above because they're not yet defined. I added new vars and used them in one place to ensure that everything stays synced up. |
|
@theuni Is it okay if I modify the 4 lines at theuni@411a71f#diff-67e997bcfdac55191033d57a16d1408aR17 to use PACKAGE_TARNAME instead of hardcoding the "bitcoin" substring on those lines? |
|
@JeremyRand I'd prefer not. The naming there should be the canonical definition, so it really shouldn't depend on anything else. |
|
@theuni Hmm, in the use cases for changing these variables that I personally deal with (i.e. Namecoin) it's pretty much a given that when PACKAGE_TARNAME is changed, the binary filenames are going to change accordingly as well. Is there a use case I'm not seeing, where it's likely that PACKAGE_TARNAME and the prefix of the binary filenames will be different? (I admit that I'm not particularly familiar with the variety of customizations that people might make to the build scripts.) |
|
Well the idea would be to keep as much flexibility as possible, so to be able to configure various names separately from each other. |
|
@laanwj Yes, agreed that flexibility is important here. However, is there a loss in flexibility if a forked project has to change "$PACKAGE_TARNAME" to something else in the four binary name variables, rather than changing "bitcoin" to something else in the same variables? I'm definitely not arguing that those four variables should be removed, I just think it makes sense for their default values to be dependent on PACKAGE_TARNAME since that seems to be a common configuration. Any forked project that wants the binary filename prefixes to be something other than PACKAGE_TARNAME can change them just as easily as changing them away from being "bitcoin". So I don't see a loss of flexibility -- am I missing something? |
|
The loss in flexibility appears when someone changes PACKAGE_TARNAME and is surprised all the binaries changed their name, too. So, has to go back and adjust the names of the binaries... I think 644e6de is an uncontroversial improvement (after squash), which can be merged right now. If you really want to refactor PACKAGE_TARNAME, I'd prefer to do this in another pull. |
|
I agree with @MarcoFalke. @JeremyRand While it's obviously nice if our changes make life easier for other projects, our first priority has to be to our own. There are plenty of scenarios where the 2 values could become out of sync, and forks may or may not wish to switch when we do. So inevitably, there's going to be some patching down the road. I'd rather not create something that appears to be a contract to downstreams in the process. |
|
@theuni @MarcoFalke Okay, sounds good, you've convinced me. I'll add the suggested commits to this PR when I have a few minutes (I'm traveling today). |
Unfortunately, the target namees defined at the Makefile.am level can't be used for *.in substitution. So these new defines will have to stay synced up with those targets. Using the new variables for the deploy targets in the main Makefile.am will ensure that they stay in sync, otherwise build tests will fail.
Replaces the hardcoded string "bitcoin" with the autoconf variable PACKAGE_TARNAME; fixes bitcoin#7265. Places where I chose not to replace: 1. bitcoin.ico wasn't replaced because it doesn't seem to be relevant to the build system and its filename never affects the end user. 2. InstallDir wasn't replaced because the current text has an uppercase B, and I'm not sure of a good way to capitalize the result of PACKAGE_TARNAME. 3. A comment in the Main Installer section wasn't replaced because comments don't ever face the end user. 4. The registry value "URL:Bitcoin" wasn't replaced for the same reason as InstallDir. 5. Startup shortcut wasn't replaced for the same reason as InstallDir. All other appearances of "bitcoin" were replaced with PACKAGE_TARNAME, except for the bin names, which were instead replaced with the new bin name autoconf variables.
The NSIS script tried to delete wxwidgets-based executables/locales. These files are ancient, and presumably no users have them anymore, so we can simplify the NSIS script by removing those lines.
2b7dd04 to
0528e30
Compare
|
There we go. Hopefully I did the requested squash correctly. |
|
utACK 0528e30 |
|
Looks much better now! |
Build system improvements Includes commits cherry-picked from the following upstream PRs: - bitcoin/bitcoin#6978 - Only the first commit (second is for QT) - bitcoin/bitcoin#7059 - bitcoin/bitcoin#7603 - Only the first commit (the rest are for QT) - bitcoin/bitcoin#7954 - bitcoin/bitcoin#8314 - Only the second commit (first is for QT) - bitcoin/bitcoin#8504 - Only the first commit (second was undoing something we didn't have) - bitcoin/bitcoin#8520 - bitcoin/bitcoin#8563 - bitcoin/bitcoin#8249 - bitcoin/bitcoin#9156 - bitcoin/bitcoin#9831 - bitcoin/bitcoin#9789 - bitcoin/bitcoin#10766 Part of #2074.
Build system improvements Includes commits cherry-picked from the following upstream PRs: - bitcoin/bitcoin#6978 - Only the first commit (second is for QT) - bitcoin/bitcoin#7059 - bitcoin/bitcoin#7603 - Only the first commit (without the `BITCOIN_QT_BIN` variable; the rest are for QT) - bitcoin/bitcoin#7954 - bitcoin/bitcoin#8314 - Only the second commit (first is for QT) - bitcoin/bitcoin#8504 - Only the first commit (second was undoing something we didn't have) - bitcoin/bitcoin#8520 - bitcoin/bitcoin#8563 - bitcoin/bitcoin#8249 - bitcoin/bitcoin#9156 - bitcoin/bitcoin#9831 - bitcoin/bitcoin#9789 - bitcoin/bitcoin#10766 Part of #2074.
Build system improvements Includes commits cherry-picked from the following upstream PRs: - bitcoin/bitcoin#6978 - Only the first commit (second is for QT) - bitcoin/bitcoin#7059 - bitcoin/bitcoin#7603 - Only the first commit (without the `BITCOIN_QT_BIN` variable; the rest are for QT) - bitcoin/bitcoin#7954 - bitcoin/bitcoin#8314 - Only the second commit (first is for QT) - bitcoin/bitcoin#8504 - Only the first commit (second was undoing something we didn't have) - bitcoin/bitcoin#8520 - bitcoin/bitcoin#8563 - bitcoin/bitcoin#8249 - bitcoin/bitcoin#9156 - bitcoin/bitcoin#9831 - bitcoin/bitcoin#9789 - bitcoin/bitcoin#10766 Part of #2074.
Build system improvements Includes commits cherry-picked from the following upstream PRs: - bitcoin/bitcoin#6978 - Only the first commit (second is for QT) - bitcoin/bitcoin#7059 - bitcoin/bitcoin#7603 - Only the first commit (without the `BITCOIN_QT_BIN` variable; the rest are for QT) - bitcoin/bitcoin#7954 - bitcoin/bitcoin#8314 - Only the second commit (first is for QT) - bitcoin/bitcoin#8504 - Only the first commit (second was undoing something we didn't have) - bitcoin/bitcoin#8520 - bitcoin/bitcoin#8563 - bitcoin/bitcoin#8249 - bitcoin/bitcoin#9156 - bitcoin/bitcoin#9831 - bitcoin/bitcoin#9789 - bitcoin/bitcoin#10766 Part of #2074. # Conflicts: # configure.ac # src/Makefile.am # src/Makefile.gtest.include # src/Makefile.test.include # zcutil/build.sh
This PR replaces the hardcoded string "bitcoin" in the NSIS script with the autoconf variable PACKAGE_TARNAME; fixes #7265 .
Places where I chose not to replace:
All other appearances of "bitcoin" in the NSIS script were replaced.