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

Generate a "Portable App" version for Windows in addition to the installer. #19

Open
nickbnf opened this issue Nov 1, 2011 · 4 comments
Labels

Comments

@nickbnf
Copy link
Owner

nickbnf commented Nov 1, 2011

No description provided.

@sylfabre
Copy link

+1

@nickbnf
Copy link
Owner Author

nickbnf commented Sep 11, 2014

Sure, but can you explain exactly what should be done? I'm not very familiar with Windows...

@sylfabre
Copy link

@nickbnf Something like notepad++
http://notepad-plus-plus.org/download/v6.6.9.html

You can download a zipped file. Once uncompressed you can use the software without installation.
But I've never developed a software on windows so I don't know what must be done to have a "portable app" :-(

@fretep
Copy link

fretep commented Sep 12, 2014

The idea of portable software is to be executable without modification to the system you are running on. That would mean not adding registry keys (which glogg does), but much more importantly, not saving the configuration file into the local user profile. This way, lets say you have 600 servers to manage like I do, you don't have 600 different configurations scattered all over the place and you can save highlighting rules and regex filters that work everywhere just by running the program off a file share.

Most programs that support running in a portable mode do this by looking in the executable directory for the configuration file, and if it exists, then use the configuration file from there, otherwise if the configuration file isn't with the executable, then run in normal mode saving the configuration into the user profile.

The reason you wouldn't just always save the configuration file with the executable is if the program is installed under "C:\Program Files" you won't have permission unless the user is elevated. This doesn't typically apply to portable applications because they are running off USB drive or network share.

I'd imagine the changes required to support this would be trivial, as I think in gloggs case, the only things you need to worry about is the location of the configuration file and registry changes. I did look at the code a while ago to see what the deal was with the registry change, from memory it looked to be creating the registry key as part of creating the configuration file when it doesn't exist and then never used again, so there isn't any need for the registry key. I'm not sure how hard it would be to change the location of the configuration file with QT (I am going off memory that you use QT, so I hope I've got that right).

A quick look around shows a few people discussing portable apps with QSettings:
http://stackoverflow.com/questions/7962292/qsettings-how-to-save-to-current-working-directory
https://code.google.com/p/texworks/issues/detail?id=95
http://www.qtcentre.org/threads/37101-QSettings-setPath-don-t-work

Hope that helps.
Peter

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

No branches or pull requests

3 participants