Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows installer #49

Open
ravage84 opened this issue Dec 17, 2018 · 7 comments
Open

Windows installer #49

ravage84 opened this issue Dec 17, 2018 · 7 comments

Comments

@ravage84
Copy link

ravage84 commented Dec 17, 2018

Hi Ted,

The about page on the product website of QuickHash states:

No installation needed making it portable and easy to run or delete after use.
...
No installation. No wizards. No registration. Just double click and use, instantly (or Linux users can also use Debian packages to install if they wish)

I agree, it is very nice to not need to execute an installer/installation wizard to be able to use a small tool such as QuickHash.
Nonetheless, in a business environment it can be mandatory to pre-install tools or at least make the permanent installation of a tool throughout several machines more convenient. This is where an installater/installation wizard comes in.

Because I felt it would be even cooler for QuickHash to provide such an installer (for Windows at least), because I have some experience in creating installation scripts with NSIS (Nullsoft Scriptable Install System) and because just for fun, I created an NSIS based installer script for QuickHash.

Actually, I provided two variants. They are pretty much the same but they install QuickHash into different folders (by default):

  1. the program files, e.g. ``C:\C:\Program Files (x86)\QuickHash" Windows installer installing into program files #51
  2. the local app data folder, e.g. "C:\Users\Ravage\AppData\Local\QuickHash" Windows installer installing into AppData/Local #50

Problem with the first is, that QuickHash tries to write the UI state into an XML file within the same folder, which doesn't work because of missing write privileges on that folder.
Thus, currently only the second installer works without problems.

Let me know, if you want to include the installer script into QuickHash.
It was fun fiddling around, anyway.

@tedsmith
Copy link
Owner

tedsmith commented Dec 20, 2018 via email

@ravage84
Copy link
Author

No problem. If you want me to send you the precompiled installers from both version or need help compiling them, just say so. You can also reach me by mail or Skype.

@darealshinji
Copy link
Collaborator

Problem with the first is, that QuickHash tries to write the UI state into an XML file within the same folder, which doesn't work because of missing write privileges on that folder.

This is default behavior on Windows and Mac if the filename wasn't set. On Linux it's saved as a hidden file in the user's directory.
aa12cd8
http://wiki.lazarus.freepascal.org/TXMLPropStorage

I don't know if the filename can be set for each OS in a dynamic way inside unit2.pas. My suggestion would be something like $HOME/.config/QuickHash/PropStorage.xml on Mac and Linux and %LocalAppData%\QuickHash\PropStorage.xml on Windows (with a fallback check of %AppData% if you really want to support XP).

@ravage84
Copy link
Author

My suggestion would be something like $HOME/.config/QuickHash/PropStorage.xml on Mac and Linux and %LocalAppData%\QuickHash\PropStorage.xml on Windows (with a fallback check of %AppData% if you really want to support XP).

@darealshinji sounds reasonable.

@darealshinji

This comment has been minimized.

@ravage84
Copy link
Author

@darealshinji

Weird, it doesn't seem to save the configuration. It always remains the same:

Could you create a issue for that?

By the way, using the following code seems to help to save the file in a specific user directory:

Can we move this discussion to a separate issue?

@darealshinji
Copy link
Collaborator

Can we move this discussion to a separate issue?

#57

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants