datalad / datalad-gooey

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

Migrate installer release workflow here #258

Closed mih closed 1 year ago

mih commented 1 year ago

Currently at https://github.com/christian-monch/datalad-gooey-windows-installer

adswa commented 1 year ago

ping @christian-monch

Manukapp commented 1 year ago

Attempting to use windows installer from Windows 10 powershell.

First failed installation Error:

 Collecting git+https://github.com/datalad/datalad-gooey.git@
ERROR: The URL 'git+https://github.com/datalad/datalad-gooey.git@' has an empty revision (after @) which is not supported. Include a revision after @ or remove @ from the URL.
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'datalad_gooey'
makensis : The term 'makensis' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At C:\Users\Leo\Desktop\Gooey\datalad-gooey-windows-installer\build_windows_installer.ps1:45 char:1
+ makensis windows-installer-amd64.nsi
+ ~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (makensis:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

Move-Item : Cannot find path 'C:\Users\Leo\AppData\Local\Temp\datalad-gooey-installer-amd64.exe' because it does not exist.
At C:\Users\Leo\Desktop\Gooey\datalad-gooey-windows-installer\build_windows_installer.ps1:48 char:1
+ Move-Item datalad-gooey-installer-amd64.exe $start_dir\datalad-gooey- ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (C:\Users\Leo\Ap...aller-amd64.exe:String) [Move-Item], ItemNotFoundException
    + FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.MoveItemCommand

Solution, removing @ operator. Changing from:

line 26 in build_windows_installer.ps1 .\sources\python39\python.exe -m pip install "git+https://github.com/datalad/datalad-gooey.git@$Revision"

To: `.\sources\python39\python.exe -m pip install "git+https://github.com/datalad/datalad-gooey.git"

Second failed installation

makensis : The term 'makensis' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At C:\Users\Leo\Desktop\Gooey\datalad-gooey-windows-installer\build_windows_installer.ps1:45 char:1
+ makensis windows-installer-amd64.nsi
+ ~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (makensis:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

Move-Item : Cannot find path 'C:\Users\Leo\AppData\Local\Temp\datalad-gooey-installer-amd64.exe' because it does not exist.
At C:\Users\Leo\Desktop\Gooey\datalad-gooey-windows-installer\build_windows_installer.ps1:48 char:1
+ Move-Item datalad-gooey-installer-amd64.exe $start_dir\datalad-gooey- ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (C:\Users\Leo\Ap...aller-amd64.exe:String) [Move-Item], ItemNotFoundException
    + FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.MoveItemCommand

Researched about NSIS, didn't manage to find a python library for it (was hopeful about bdist_nsi), so installed it manually from its website.

Following this, changed:

Line 45 in build_windows_installer.ps1 makensis windows-installer-amd64.nsi

To: $makensis = "C:\Program Files (x86)\NSIS\makensis.exe" & $makensis windows-installer-amd64.nsi

Successfully ran the installer (datalad-gooey-installer-amd64.exe), which goes through the Git and git-annex (re-)installation. Unfortunately, when I run Datalad Gooey app, it does not execute. See video:

Gooey_installer.webm