Open ghutchis opened 12 months ago
will you be assigning this to a particular individual?
No, although you seem to be the first interested in helping, so thanks very much for the offer.
I don't know if it's easier to create a new installer that combines Avogadro + Miniforge, etc. .. I don't know much about NSIS since I don't use Windows.
Couldn't we just bundle with the Python installer on Windows and execute it via the command line rather than bundling miniconda?
If I'm choosing between the official Python installer and miniconda, I'd go with a miniforge install because it will make installing other packages and setting up environments easier.
As to how it's installed, I don't care - only that it be optional since some people may already have Python installed on Windows.
I am not sure if I am right, but from what I have searched, I would need the NSIS script used in Avogadro's NSIS installer (which i cant find) and then I might be able to add the miniforge installation conditions within it, although i am not sure yet , as i have tried to install miniforge with simple nsis scripts but failed.
Do you want a NSIS script (.nsi file) that includes the Miniconda installer (this script downloads the Miniconda installer (Miniconda3-latest-Windows-x86_64.exe) and installs it silently (/S) to the specified directory (/D=C:\Miniconda3) We could then adjust the paths as per requirements) or do you want to add Miniconda's Scripts and base directories to the PATH in the system registry while instillation itself .
I would want an NSIS script that offers the option to the user to install Miniconda (the default) .. potentially /S to a specified directory (default = C:\Miniconda3) during installation of Avogadro.
I don't know enough about NSIS to know how to do that (e.g., do you modify the Avogadro .nsi script or create a new script that loads both installers).
I would love working on this issue! Could you please assign it to me?
I have figured out a way by using the nsDialogs plugins but am not able to find the existing script file through which the current feature has to be added.
@ghutchis sir how would we test it as the (.exe) file is directly created with the required functionalities as I have build it with a custom script .
This issue has been mentioned on Avogadro Discussion. There might be relevant details there:
Just want to make a note that these days it's also possible to install miniforge
on Windows (or at least, get the installer) using
winget install CondaForge.Miniforge3
And indeed installing via winget both downloads and installs miniforge in non-interactive mode. So the Avogadro installer would simply need to execute the above command and nothing more, if that's possible.
@ghutchis Is there an existing .nsi script? No one seems to be able to find it, myself included. If it doesn't exist, how is the Windows installer currently being prepared? I've searched through a lot of the repo and found nothing...
The other option is that rather than the suggestion to install Python coming at install time, the user is instead prompted on first launch, since there was the idea to have a "Setup Python environment" dialog pop up anyway.
Even if it happens in the installer, it will still be necessary to have an option in the GUI somewhere (maybe in "Python Settings") to do the same thing, so that people who choose no at install time and then change their mind don't have to reinstall.
Right now, it's handled by cpack
with options in the avogadroapp
repo, e.g.:
https://github.com/OpenChemistry/avogadroapp/blob/master/cmake/AvogadroCPackOptions.cmake.in
I agree that it's probably a nice idea to have it prompt in the first launch, although I can imagine in a lab setting, it might be better to have it in both places.
If the command is run more than once, what happens to the previous install?
Many features in Avogadro2 expect to find Python in the path.
This would be much easier on Windows if there was a
miniconda
build, for example, for most users.Someone should examine how to bundle our NSIS installer with Miniconda: https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Windows-x86_64.exe
For example, it seems like it's possible https://github.com/conda-forge/miniforge?tab=readme-ov-file#non-interactive-install