Ghini / ghini.desktop

plant collections manager (desktop version)
http://ghini.github.io/
GNU General Public License v2.0
24 stars 14 forks source link

let ghini-on-a-stick use the stick as home #376

Closed mfrasca closed 6 years ago

mfrasca commented 6 years ago

Expected behaviour

when running ghini-on-a-stick, all configurations should consider the stick as the home, the attachment point for all relative paths.

Actual behaviour

as it is now, run your trusted ghini-on-a-stick on a new computer computer, and it will tell you that this is the first time you're using it.

Opinions and suggestions

ghini-on-a-stick is just the pre-packaged ghini, before NSIS compresses it for distribution. We do not prepare it separately, and I don't think I would like to do that. There is one step that is performed after NSIS compression, namely copying win_gtk.bat to the same directory as the ghini executable. the initializing ghini could test for presence of that file next to itself, and if found, compute the paths correspondingly.

mfrasca commented 6 years ago

can we use the __file__ automatic variable, to distinguish whether running in a virtual environment, in an installed package, or from a stick?

there doesn't seem to be much difference, and the differences are mostly a matter of choice at the moment of installing or copying. I think all we can do is to check if the drive is removable media. I would not want to add dependencies though, and all hints go through win32, which we don't use yet.

mfrasca commented 6 years ago

after letting NSIS pack the compiled software for the installer, we create an Appdata directory. if the running ghini finds it in the main_dir, it concludes it's running on a USB stick. had to alter the configuration logic, replacing any leading appdata string with a .