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

Portable Mode (Windows) #160

Open
smaragdus opened this issue Mar 19, 2019 · 9 comments
Open

Portable Mode (Windows) #160

smaragdus opened this issue Mar 19, 2019 · 9 comments

Comments

@smaragdus
Copy link

Currently (as of version 1.5.0) ksnip saves program settings in Windows registry:

HKEY_CURRENT_USER\Software\ksnip\ksnip

I would highly appreciate if there is an option to save settings not in Windows registry but in a configuration file inside program folder (next to the executable- ksnip.exe). There are numerous ways to trigger portable mode, I will suggest a few:

  • command-line argument - if the executable is started with a special parameter, for example:
    ksnip.exe -portable
    settings are not saved in Windows registry but in a configuration file (CONF, CONFIG, INI, JSON, XML, etc) inside program folder;

  • portable flag - on program start ksnip checks program folder for portable flag, for example:
    Portable (without extension) or Portable.txt
    and if such file is present settings are saved not in Windows registry but in a configuration file in program folder;

  • empty sub-folder - on program start ksnip checks program folder for a specific sub-folder, for example:
    data, settings, etc
    and if such sub-folder is present settings are saved not in Windows registry but in a configuration file in this sub-folder inside program folder;

Any option to use ksnip in portable mode would be fine for me but I prefer methods 2 and 3 (portable flag and empty sub-folder).

For me portable mode will add some more flexibility to Windows version of ksnip- it would be easier to transfer the program from machine to machine and it will also be easier to backup the program. More, there are people (like me) who prefer portable programs which do not touch Windows registry.

@DamirPorobic
Copy link
Member

Flags are ok for Linux users but I've got the feeling most of the Windows users struggle with them or simply miss them by always starting the application via GUI.

The config on Linux and MacOS is just a single file and it's loaded by Qt. I think I remember that you can tell Qt from where to load the config, so we could first check for a config file next to the executable (which is only relevant for Windows I believe) if we find one there, we load it, if don't, we load the default thing. We should document such an option in the readme or the wiki.

@smaragdus
Copy link
Author

@DamirPorobic

I suppose that there may be some advanced Windows users who would enjoy an option to use the program in portable mode. If such an option is implemented you may add a simple 'ReadMe' text file in the archive which explains the procedure how to run the program in portable mode. The majority of Windows users will just run the executable (or the installer if there is installer in the future).

If you implement an option to run the program in portable mode I may write a short review about the program in a forum dedicated to portable freeware.

Off-topic- I have several reliable screen capture programs for Windows yet I decided to test ksnip because it looks very promising, it is open source and cross platform. Thank you for your good work and for releasing Windows version that really works.

@nolddor
Copy link

nolddor commented Dec 10, 2019

+1
Hope to see this feature implemented soon.

Thank for your awesome work!

@DamirPorobic
Copy link
Member

Should not be that complicated to implement. We read the config from a text file and we could check first locally, relative to the binary and when we find nothing there, we could check the standard location.

Unfortunately, I'm busy with personal stuff, any PR are welcome.

@DamirPorobic DamirPorobic added this to To do in v1.9.0 via automation Dec 16, 2020
@DamirPorobic DamirPorobic removed this from To do in v1.9.0 May 26, 2021
@tom-vb
Copy link

tom-vb commented Nov 24, 2021

Hi, is this feature implemented?, in that case how to activate it?

@DamirPorobic
Copy link
Member

Not yet. Your best bet is the zip package but it's not fully portable, the config is written in the registry but you can give it a try, it doesn't require any installation though.

@smaragdus
Copy link
Author

@DamirPorobic

I hope that you have not discarded the implementation of an option to save settings in configuration file in stead of in Windows registry, which, beside other advantages would also facilitate testing- when settings are isolated the user would be able to test different versions (stable, unstable) with different settings and even one and the same version with different settings.

Regards

@DamirPorobic
Copy link
Member

@smaragdus nothing was discarded, I just didn't find time to look into this. It might be as simple as changing this type from native to ini https://doc.qt.io/qt-5/qsettings.html#Format-enum

Maybe somebody else has time to look into it.

@SimoLRepo
Copy link

SimoLRepo commented May 9, 2024

Is this feature still expected? The topic has not been updated since 2021.

For the moment, for my personal needs, I decided to create a Launcher that cleans up the traces once the software is closed. Unfortunately, it is impossible to adapt the paths of the stickers because empty lines are added in addition to the paths in the settings. Would it be possible to configure the software so that it automatically searches for all vector files in a given folder without manually adding them one at a time and one by line in the appropriate registry key? Thank you.

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

No branches or pull requests

5 participants