datalad / git-annex

A non-official clone of git-annex established for DataLad purposes. No PRs will be merged, but could be used to test perspective git-annex patches. Official git-annex repository: https://git.kitenet.net/index.cgi/git-annex.git/
14 stars 3 forks source link

Can we get a non-admin git-annex Windows installer? #176

Open adswa opened 10 months ago

adswa commented 10 months ago

This is in the context of https://github.com/datalad/datalad-gooey/issues/425.

Git for Windows can be installed on non-admin User accounts. Users do not have to know an administrator password, and the installation defaults to (something like) C:\Users\<non-admin-username>\AppData\Local\Programs\Git.

The git-annex installer, hower, requires administrative rights and wants to be installed under C:\Program Files\Git, which belongs to the admin account of the system. It also searches for a Git installation only under C:\Program Files\Git an complains if it can't find it there.

git-annex-warning

It would be nice to allow non-admin users an installation, and to have the installation location belong to the non-admin user performing it.

I'm not sure, however, if this is the right repository for this feature request, or if it needs to be issues to git-annex directly. @christian-monch has figured how how to create an installer for DataLad-gooey without admin privileges, and he might have useful insights how a git-annex installer could have the same.

christian-monch commented 10 months ago

IMHO, it would suffice to change line upstream/master/Build/NullSoftInstaller.hs#144 from

requestExecutionLevel Admin

to

requestExecutionLevel User

This would allow executing the installer as non-admin user. If the user selects an installation directory to which he has write-permissions, the installation should succeed.

Question to all developer here: where should I propose a PR? In this repo or in the upstream repo?

yarikoptic commented 10 months ago

@joeyh WDYT?

christian-monch commented 10 months ago

IMHO, it would suffice to change line upstream/master/Build/NullSoftInstaller.hs#144 from

requestExecutionLevel Admin

to

requestExecutionLevel User

[...]

On second thought, that is probably not sufficient. A non-admin installer would need a method to specify an installation directory (probably with a pre-set <user>\AppData\Local\git-annex-value) and adapt the PATH accordingly.