datalad / datalad-gooey

A graphical user interface for DataLad (datalad.org)
https://docs.datalad.org/projects/gooey
Other
4 stars 6 forks source link

Can't install on Windows for non-admin user #425

Open federkamm opened 1 year ago

federkamm commented 1 year ago

Is it a new bug?

I did not find an existing issue about my problem

What is the problem?

I have a domain User account and a local Admin account. I wan't to Install Gooey using the Windows installer for my User account. When I run the installer, it asks me for my Admin account and then it installs Gooey into my Admin account only. As User I can't run it because I don't have access to the C:\Users\admin\AppData\Local\datalad.org folder.

I can probably somehow "hack" it, by messing around with file permissions, but I would prefer a way to install it to my User account right away.

What steps will reproduce the problem?

On Windows:

Additional context

No response

How did you install the App?

System information

Windows 11

welcome[bot] commented 1 year ago

Welcome Banner (Image: CC-BY license, The Turing Way Community, & Scriberia. Zenodo. http://doi.org/10.5281/zenodo.3332808) Hi there, and thank you for filing an issue. We're excited to have your input and welcome your idea! :blush:

adswa commented 1 year ago

hi @federkamm, thanks for opening up this issue. Let me tag @christian-monch who has build the Windows installer and might have more insights on what we can do to change this

adswa commented 1 year ago

Another ping to @christian-monch in case the first was missed

christian-monch commented 10 months ago

TLDR;

We can relatively easily build a windows-installer that just installs datalad-gooey and all its execution dependencies, i.e. python and datalad. This installer would not take care of git and git-annex, those tools have to be present on the machine for datalad-gooey to run properly. That means: git and git-annex would have to be installed by someone with admin-privileges.

Non-admin datalad-gooey installation on Windows

A non-admin installation of datalad-gooey on Windows should have the following properties:

  1. Executable without admin-privileges
  2. Yields a working gooey instance
  3. Does not interfere with system-wide installed git- and git-annex components
  4. Should also work if the installing user has admin privileges
Option 1: a gooey-only installer for Windows

The current datalad-gooey-installer requires admin privileges because of bundled git- and git-annex-installers. Therefore a new "gooey-only"-installer, that does not execute a git- and a git-annex-installer during the datalad-gooey-installation process could be successfully executed by a non-admin user. But because datalad-gooey requires git and git-annex, this scenario would require that git and git-annex are installed on the system by other means (usually someone with admin privileges has to install them).

Option 2: a user-local installation of git- and git-annex

A user-local installation is an installation that lives completely in the <UserHome>\AppData\Local-directory. Writing into the user-local directories does not require admin privileges. The current datalad-gooey-installer for Windows already installs some components in the user-local directories, i.e. datalad-gooey, datalad, and the python interpreter. But git and git-annex are not installed in the user-local directories. If they could also be installed there, the complete installation process can be executed by non-admin users.

The following steps have to be taken to implement Option 2:

  1. Replace the bundled git-installer with the portable-git-installer. This allows git to be installed user-local.
  2. Ensure that the bundled git-annex installer does not request admin privileges. This requires a change in the source code of git-annex, as described here: https://github.com/datalad/git-annex/issues/176. git-annex can already be installed user-local.
  3. Instruct the bundled git- and git-annex-installer to install git and git-annex in the user-local directories.

The resulting datalad-gooey-installer would install datalad-gooey, all its dependencies, and git and git-annex in the user-local directories and would not require admin privileges to do so.

####### Pros:

Non-admin installation, known git and git-annex versions, no interference with system-wide installed git or git-annex components.

####### Cons:

The fixed git and git-annex versions might be outdated one have to be kept in a reasonably current "release-window". (BTW: this holds for the current installer as well).

The way forward

Since option 2 cannot be fully implemented until a git-annex-installer that does not require admin privileges is available I would propose providing a "gooey-only"-installer in addition to the full datalad-gooey-installer. That would allow non-admin users to sucessfully install and execute datalad-gooey on machines on which git and git-annex are available.

When https://github.com/datalad/git-annex/issues/176 is resolved, we will build a full datalad-gooey-installer that will be executable with or without admin-privileges and will install all code into user-local directories.

WDYT?

adswa commented 10 months ago

Since option 2 cannot be fully implemented until a git-annex-installer that does not require admin privileges is available I would propose providing a "gooey-only"-installer in addition to the full datalad-gooey-installer. That would allow non-admin users to sucessfully install and execute datalad-gooey on machines on which git and git-annex are available.

When https://github.com/datalad/git-annex/issues/176 is resolved, we will build a full datalad-gooey-installer that will be executable with or without admin-privileges and will install all code into user-local directories.

WDYT?

Thanks for the detailed write-up. I agree!