Skip to content
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

Update for the Windows Installer #2128

Closed
wants to merge 1 commit into from
Closed

Conversation

da2ce7
Copy link

@da2ce7 da2ce7 commented Dec 26, 2012

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.

@BitcoinPullTester
Copy link

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

!define VERSION 0.7.99
!define PRODUCT_VERSION 0.7.99.0
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed. Updating now.

@Diapolo
Copy link

Diapolo commented Dec 26, 2012

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 :)?

SetOutPath $INSTDIR
WriteUninstaller $INSTDIR\uninstall.exe
!insertmacro MUI_STARTMENU_WRITE_BEGIN Application
SetShellVarContext all
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is this one doing?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@gavinandresen
Copy link
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: ... ??? ...

@da2ce7
Copy link
Author

da2ce7 commented Dec 27, 2012

@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.

@luke-jr
Copy link
Member

luke-jr commented Dec 27, 2012

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...

@da2ce7
Copy link
Author

da2ce7 commented Dec 29, 2012

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

@Diapolo
Copy link

Diapolo commented Dec 30, 2012

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

@BitcoinPullTester
Copy link

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

@sipa
Copy link
Member

sipa commented Jan 6, 2013

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

@BitcoinPullTester
Copy link

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

@qubez
Copy link

qubez commented Jan 24, 2013

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.

@jgarzik
Copy link
Contributor

jgarzik commented May 30, 2013

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

@da2ce7
Copy link
Author

da2ce7 commented May 31, 2013

@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.

@goldbit89
Copy link

@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?

@da2ce7
Copy link
Author

da2ce7 commented May 31, 2013

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).

@jgarzik
Copy link
Contributor

jgarzik commented Jun 19, 2013

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

@da2ce7
Copy link
Author

da2ce7 commented Jul 12, 2013

Rebased.

!define VERSION 0.8.2
!define PRODUCT_VERSION "${VERSION}.0"
!define COMPANY "Bitcoin project"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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");.

@BitcoinPullTester
Copy link

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.

@@ -45,21 +48,21 @@ Var StartMenuGroup
!insertmacro MUI_LANGUAGE English

# Installer attributes
OutFile bitcoin-0.8.2-win32-setup.exe
InstallDir $PROGRAMFILES\Bitcoin
OutFile ${NAME}-${VERSION}-win32-setup.exe
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@gavinandresen
Copy link
Contributor

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

@laanwj
Copy link
Member

laanwj commented Nov 11, 2013

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.

@laanwj laanwj closed this Nov 11, 2013
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Sep 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants