TissueEngineeringLab / MyoFInDer

Python interface for automatic calculation of the fusion index in muscle cell cultures
https://tissueengineeringlab.github.io/MyoFInDer/
GNU General Public License v3.0
4 stars 1 forks source link

Read application folder from registry #43

Closed WeisLeDocto closed 6 months ago

WeisLeDocto commented 6 months ago

After switching to the WiX backend in #40, the key paths useful for MyoFInDer to run on Windows are now stored in the registry. However, the __main__.py file of the module still assumes a fixed location for the application folder (namely C:\Users\<User>\AppData\Local\MyoFInDer). This is not desirable, as users are now free to change the installation location while installing.

This PR adds a new -f or --app-folder command-line argument for specifying MyoFInDer the location of the application folder, where it will store the log and settings file. This setting only has an influence on these two files.

In addition, the myofinder.wxs configuration file for WiX was updated to now include the location of the installation folder in MyoFInDer's registry. Finally, the myofinder.cpp source file was updated so that it now reads the location of the installation folder from the registry, and specifies it to MyoFInDer using the --app-folder command line argument.

As a bonus, the command-line arguments parsing in myofinder.cpp was improved, switching from C-style code to C++ style.