Update for the Windows Installer #2128

pull da2ce7 wants to merge 1 commits into bitcoin:master from da2ce7:nsi_update changing 1 files +40 −35
  1. da2ce7 commented at 1:34 AM on December 26, 2012: none

    I have taken the time to try and make the windows installer a bit more sold, as it didn't work well with my windows system (where I run as a low-privileged user, and manually approve any escalation of privileges).

    The main changes involve changing from the 'local user' settings to the 'local system,' and requiring admin privileges to install. (of course any user will be able to run Bitcoin without being an admin still).

    Of-course this will need more testing.

  2. BitcoinPullTester commented at 1:51 AM on December 26, 2012: none

    Automatic sanity-testing: PASSED, see http://jenkins.bluematt.me/pull-tester/233b122177528f1e6758890b77ba93e0b114a3c6 for binaries and test log.

  3. in share/setup.nsi:None in 233b122177 outdated
       8 | +
    
       9 |  # General Symbol Definitions
      10 | -!define REGKEY "SOFTWARE\$(^Name)"
    
      11 | +!define REGKEY "SOFTWARE\${NAME}"
    
      12 |  !define VERSION 0.7.99
      13 | +!define PRODUCT_VERSION 0.7.99.0
    
    


    Diapolo commented at 3:46 PM on December 26, 2012:

    This change would create another place that needs to be edited by hand for official releases, I'm not sure if core devs ACK this one. Perhaps you could mention in https://github.com/bitcoin/bitcoin/blob/master/doc/release-process.txt#L6 that there are then 2 lines, which need to be edited.


    gavinandresen commented at 4:10 PM on December 26, 2012:

    !define PRODUCT_VERSION "${VERSION}.0" ... would save us a little typing and another potential source of bugs.


    da2ce7 commented at 6:59 AM on December 27, 2012:

    Agreed. Updating now.

  4. Diapolo commented at 3:48 PM on December 26, 2012: none

    I like the introduction of that variable, which holds the value Bitcoin, I'm unsure about the switch from local user to local machine. What is the benefit here? I also think NOT requiring Admin privileges is far more user friendly, as perhaps some use the client on machines, where they simply have none.

    Edit: Can you have a look at #993 while you are working on this :)?

  5. in share/setup.nsi:None in 233b122177 outdated
      84 | @@ -82,24 +85,25 @@ Section -Main SEC0000
      85 |  SectionEnd
      86 |  
      87 |  Section -post SEC0001
      88 | -    WriteRegStr HKCU "${REGKEY}" Path $INSTDIR
    
      89 | +    WriteRegStr HKLM "${REGKEY}" Path $INSTDIR
    
      90 |      SetOutPath $INSTDIR
      91 |      WriteUninstaller $INSTDIR\uninstall.exe
      92 |      !insertmacro MUI_STARTMENU_WRITE_BEGIN Application
      93 | +    SetShellVarContext all
    
    


    Diapolo commented at 3:49 PM on December 26, 2012:

    What is this one doing?


    da2ce7 commented at 6:59 AM on December 27, 2012:

    It tells the uninstaller to uninstall the start menu items from the All Users location, not the (default) user local location.

  6. gavinandresen commented at 4:14 PM on December 26, 2012: contributor

    Can you write up a test plan?

    Something like:

    Test installing on top of an old installation, and then uninstalling. EXPECT: all installed files and registry entries removed (but data directory: blockchain and wallet files: left intact).

    Note for testers: Run regedit and look for registry keys {....???....} to verify.

    Test installing a new version, then installing an old version on top. EXPECT: ... etc...

    Test: install as non-privileged user EXPECT: ... etc ...

    Test: install as admin, run as admin EXPECT: ... etc ...

    Test: install as admin, login as another user EXPECT: ... ??? ...

  7. da2ce7 commented at 7:08 AM on December 27, 2012: none

    @Diapolo Yes, having user local installs would be great. However to provide that functionally the nsi install scripts are much more complicated than what we have now.

    Ideally the installer will only as for permissions as it needs them. (For example a user local install will not require any escalation of privileges). Unlike an all-user install, that would escalate to admin.

    Unfortunately, making a nsi installer that provides that sort of functional is quite hard.

  8. luke-jr commented at 7:11 AM on December 27, 2012: member

    I'm not sure user-local installs are a real concern, considering that it'd be a pretty bad idea to use Bitcoin on a system where anyone else has administrative controls...

  9. da2ce7 commented at 2:18 AM on December 29, 2012: none

    Is it possible for the build bot to create the nsi installers?

  10. Diapolo commented at 10:41 PM on December 30, 2012: none

    We have no build bot (Gitian), which handles this nsi stuff AFAIK.

  11. BitcoinPullTester commented at 8:29 AM on January 3, 2013: none

    Automatic sanity-testing: PASSED, see http://jenkins.bluematt.me/pull-tester/44e2863c7d0d9cb3d50803d776cb97993b06860b for binaries and test log.

  12. sipa commented at 12:46 AM on January 6, 2013: member

    Ping me here, and I'll do a gitian build of your branch.

  13. BitcoinPullTester commented at 4:52 AM on January 24, 2013: none

    Automatic sanity-testing: PASSED, see http://jenkins.bluematt.me/pull-tester/44e2863c7d0d9cb3d50803d776cb97993b06860b for binaries and test log.

  14. qubez commented at 8:47 AM on January 24, 2013: none

    Vista and after support %LOCALAPPDATA%, which is the non-roaming data store (on XP and prior NT-based OS, the corresponding local data is %USERPROFILE%\Local Settings\Application Data).

    As an example of use, this is where Google Chrome installs it's program and user data. Google doesn't care about your admin's silly "install program" policies or writing software that is Microsoft compliant, they are more than happy to install to and execute from this user-writable data store.

    As an aside, Bitcoin stores user data in the wrong location:

    To reduce exposure to "evil system admin" and make Bitcoin not break the enterprise environment, we must consider that %APPDATA% is a ROAMING profile location - when a domain controller is configured for roaming profiles (log into a different computer and your files are there too) all program data stored in this tree is replicated to the remote profile store.

    This creates two problems: -Replicating gigs of "roaming" blockchain and using up user's quota, -Copying the wallet all over the network to other computers that the domain user logs in to.

    A wise Bitcoin would use the non-roaming directory if %APPDATA%\Bitcoin is not present, or even better, migrate if it is.

  15. jgarzik commented at 4:57 PM on May 30, 2013: contributor

    Rather than hardcoding the decision, can we ask -- as some installers do -- whether to install for (a) current user or (b) all users?

  16. da2ce7 commented at 12:42 AM on May 31, 2013: none

    @jgarzik I'm not sure how to do that. However this pull request is better than the broken behavior that the current installer has on some windows environments.

  17. goldbit89 commented at 6:17 AM on May 31, 2013: none

    @da2ce7 so is the pull request going to be a admin only install or will it be a multi-user or current user install only?

  18. da2ce7 commented at 9:30 AM on May 31, 2013: none

    Only the Administrator will be able to make changes to the Bitcoin install files. (Install, Update, Remove) However all users will be able to use bitcoin, and have their own interdependent %APPDATA% user files (Wallet, Blockchain).

  19. jgarzik commented at 6:30 PM on June 19, 2013: contributor

    ACK changes conceptually. Let's get this tested, especially on multiple Windows versions.

  20. updated windows installer script c80efe1325
  21. da2ce7 commented at 7:45 AM on July 12, 2013: none

    Rebased.

  22. in share/setup.nsi:None in c80efe1325
       9 |  # General Symbol Definitions
      10 | -!define REGKEY "SOFTWARE\$(^Name)"
    
      11 | +!define REGKEY "SOFTWARE\${NAME}"
    
      12 |  !define VERSION 0.8.2
      13 | +!define PRODUCT_VERSION "${VERSION}.0"
    
      14 |  !define COMPANY "Bitcoin project"
    


    Diapolo commented at 11:05 AM on July 12, 2013:

    After looking into https://github.com/bitcoin/bitcoin/blob/master/src/qt/res/bitcoin-qt.rc I would vote for harmonizing some strings and replacing this with just Bitcoin as we also use it in bitcoin.cpp as QApplication::setOrganizationName("Bitcoin");.

  23. in share/setup.nsi:None in c80efe1325
      10 | -!define REGKEY "SOFTWARE\$(^Name)"
    
      11 | +!define REGKEY "SOFTWARE\${NAME}"
    
      12 |  !define VERSION 0.8.2
      13 | +!define PRODUCT_VERSION "${VERSION}.0"
    
      14 |  !define COMPANY "Bitcoin project"
      15 |  !define URL http://www.bitcoin.org/
    


    Diapolo commented at 11:07 AM on July 12, 2013:

    Can this be just bitcoin.org perhaps, as we are using QApplication::setOrganizationDomain("bitcoin.org"); in bitcoin.cpp?

  24. in share/setup.nsi:None in c80efe1325
      65 |  VIAddVersionKey CompanyName "${COMPANY}"
      66 |  VIAddVersionKey CompanyWebsite "${URL}"
      67 | -VIAddVersionKey FileVersion "${VERSION}"
    
      68 | +VIAddVersionKey FileVersion ${VERSION}
    
      69 |  VIAddVersionKey FileDescription ""
      70 |  VIAddVersionKey LegalCopyright ""
    


    Diapolo commented at 11:12 AM on July 12, 2013:

    Should be changed to 2009-2013 The Bitcoin developers to match the source and even bitcoin-qt.exe metadata IMHO :).

  25. BitcoinPullTester commented at 11:21 AM on July 20, 2013: none

    Automatic sanity-testing: PASSED, see http://jenkins.bluematt.me/pull-tester/c80efe132575f2ca65479d784f18f5c6e6d478ec for binaries and test log. This test script verifies pulls every time they are updated. It, however, dies sometimes and fails to test properly. If you are waiting on a test, please check timestamps to verify that the test.log is moving at http://jenkins.bluematt.me/pull-tester/current/ Contact BlueMatt on freenode if something looks broken.

  26. in share/setup.nsi:None in c80efe1325
      47 | @@ -45,21 +48,21 @@ Var StartMenuGroup
      48 |  !insertmacro MUI_LANGUAGE English
      49 |  
      50 |  # Installer attributes
      51 | -OutFile bitcoin-0.8.2-win32-setup.exe
    
      52 | -InstallDir $PROGRAMFILES\Bitcoin
    
      53 | +OutFile ${NAME}-${VERSION}-win32-setup.exe
    
    


    luke-jr commented at 12:02 PM on August 20, 2013:

    This changes the output filename to capitalized, but there is no corresponding capitalization expected by the gitian yml.

  27. gavinandresen commented at 1:12 AM on October 21, 2013: contributor

    Needs a rebase and a test plan written and tested on at least two versions of Windows (oldest we support and newest).

  28. laanwj commented at 2:45 PM on November 11, 2013: member

    Closing this pull as it has been inactive for a long time. I also don't really like requiring admin rights to install, this has always annoyed me for other software in the rare cases I had to use windows.

    In any case: please ping me or open a new pull request with a rebased version if anyone still wants to get this merged in some form.

  29. laanwj closed this on Nov 11, 2013

  30. DrahtBot locked this on Sep 8, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-17 09:16 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me