-
Notifications
You must be signed in to change notification settings - Fork 387
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
Installer: identity directory defaults to %APPDATA%\Storj\Identity\Storagenode #3216
Conversation
<DirectorySearch Id='search1' Path='[PersonalFolder]' /> | ||
<DirectorySearch Id='search2' Path='[AppDataFolder]\Storj\Identity\storagenode'/> | ||
</Property> | ||
<SetDirectory Action="SetIdentityDir" Id="IDENTITYDIR" Value="[STORJ_DEFAULTIDENTITYDIR]" Sequence="first">STORJ_DEFAULTIDENTITYDIR</SetDirectory> |
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 did more testing and I found that only this statement is enough to replace the above 5 lines:
<SetDirectory Action="SetIdentityDir" Id="IDENTITYDIR" Value="[AppDataFolder]Storj\Identity\Storagenode" Sequence="first">NOT Installed</SetDirectory>
Not that:
- The previous time I suggested this, I missed the
Sequence="first"
argument (that you correctly found that must be used). Without it, theIDENTITYDIR
was reset to the default value when the Install button was clicked, although the user may have selected another value in the dialog. - We don't need the
\
after[AppDataFolder]
as its value already ends with\
.
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.
The DirectorySearch lines are meant to make sure we open an existing directory. If the default identity files location does not exist, personal folder is used as a fallback. But maybe that's not what we want?
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.
Oh!!! This is so good. I had no idea we can actually do it. Forget what I am saying then :)
<Property Id="STORJ_STORAGEDIR">STORAGEDIR</Property> | ||
<Property Id="STORJ_STORAGE">1.0</Property> | ||
<Property Id="STORJ_BANDWIDTH">2.0</Property> | ||
<Property Id="STORJ_IDENTITYDIR">IDENTITYDIR</Property> |
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.
nit: let's move this back to its original location - between the INSTALLFOLDER
and STORAGEDIR
properties.
What: default value in the Identity Folder dialog of the Windows Installer points to %APPDATA%\Storj\Identity\Storagenode
Why: because it is the default location for identity tool to generate new storage node identity. Currently, the default is set to the root of the largest drive, which requires the user to always navigate to the location of their identity.
Acceptance criteria:
Please describe the tests: no test
Please describe the performance impact: none
Code Review Checklist (to be filled out by reviewer)