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) #402
Comments
The program folder would be which exactly? The folder containing pdfarranger.py? |
I should have been more clear and specific I guess- by program folder I mean the one which contains the executable- Regards |
It sounds good, but let's wrap it in an |
Yes, I forgot to say that I meant portable mode on Windows OS. |
Consider Parallels/Wine/WLS users in dual mode and I have no clue what os.name reactos uses ? Its common to include portable.dat or other flaglet in an executable directory to signal data files are stored locally e.g. not relative to "home" or "usr" having config.ini local seems to be adequate enough signal. |
@jeromerobert I think @GitHubRulesOK has a point here. Why do you think limiting this function to os.name == 'nt' would be necessary? Maybe it's really fine to just check for this file in any case. |
As far as I know the only Windows Python interpreter which may have Storing configuration within the application folder will be considered as dirty everywhere else than on Windows. |
I agree. However, we are not actively writing to this directory, just checking if a file exists there and using it in case it does. I don't see how that would be a problem on any OS but maybe I'm missing something? |
This comment has been minimized.
This comment has been minimized.
I think we do. Quoting smaragdus: if |
Correction to my statement: We are not actively creating ini files in the application directory. If someone else deliberately did so, we are writing to it, that is true. I'd consider this an acceptable edge case, but if you are more comfortable limiting this to |
I just created a new label and this issue is the first to test it: I think this issue is a good starter, well defined and a reasonable addition to PDF Arranger. Unfortunately I'm not interested in implementing it myself because I would not benefit from it and my time is limited. I would, however, give guidance to new contributors interested in implementing and testing this. (The automated exe builds will make the latter quite simple, even for beginners, thanks Jerome!) (This does not mean that "old" contributors should avoid implementing and closing this, of course.) |
Excuse for being late to this discussion, but as a long time user of portable Windows software, it's my opinion that PDFArranger cannot call itself portable on Windows if it writes settings to '%APPDATA%'. The current version available is misleadingly labelled "Portable" when it's simply a no-installer package. Case in point, should a user extract that version to a USB drive, run the program on computer A, then close it and move it to computer B, all previous settings will be unavailable, as they would have been left behind -- which makes it pointless to even write them in such case. If there's a problem with writing anything to the program folder, a viable alternative would be to write settings to a custom (sub?)folder (e.g., |
@midaspt
or more portable but drive root still needs to be defined so still not perfect.
You need to add the AppData folder in pdfarranger folder so for above example its found as other portable roaming app use switches like @smaragdus I cant login to Portable Freeware those silly captcha questions are too obtuse. perhaps you could add above suggestion |
@GitHubRulesOK: The issue here is PDFArranger is distributed with a pre-compiled executable, as is normal with Windows programs -- not in a py file that is invoked as a parameter passed to the Python executable -- so those solutions don't really apply. Moreover, most Windows users are not at all accustomed to such a way of running programs; one usually just runs whatever executable the program is contained in. Mind you, it would be no big trouble to pass CLI parameters to an executable to make it truly portable, which could be easily done with a batch file, for instance -- one of the many options that are part of a toolset used to make applications portable. In case this interests anyone, take a look at PortableFreeware.com forums... |
@smaragdus @midaspt The build found here should work as suggested: |
@kbengs |
The issue should close automatically if/when the PR gets merged, so just leave it open. |
Can confirm, tried it without getting any visible unwanted artifacts in '%APPDATA%' -- settings were written to 'config.ini' in program folder as expected. |
@kbengs thank you. Just 2 remarks/questions about your PR (I write here rather than in the PR because it should be of interest to all those who participate in this issue.).
As this is behavior change I think it should be in 1.9.0 and not 1.8.1, so I would prefer to keep that PR on hold until 1.8.1 is released. |
To clarify... I think we need both "no-install" and "portable" mode. The default behavior of the zip will be either "no-install", either "portable" (I guess we can't have both). With your PR we'll have the "portable" mode by default. To switch to the "no-install" mode the user will just have to delete the It's fine with me (as a user), but I wonder if this is a common behavior among Windows applications. |
In portable circles and I have been using them since the 1960's when they were in ones back pocket, then onto floppies in ones shirt pocket, the aim is to leave no footprint on the device (even if windows prefetch and reg mui is recording their usage) |
Remark 1: Good point, I think that would be unexpected. I think we should always check if Remark 2: We could mention in |
FYI, this is the normal behavior of most Windows portable apps. |
Hmmm I was pleased to download win32.zip artifact however on run it says it wont work on my win32 suggesting I need to install Windows 64 on this 32 bit machine ! Did I miss a note on limitations since I could not see one? If its only win 64 then I suggest the file be called win64 |
C'mon 32bit windows is an extreme edge case by now, just reinstall in 64 bits and move on |
@dreua I can install in millliseconds on 64bits in sandbox no need for portable |
I will not work on a 32-bit Windows version, but contributions are welcome. |
I respectfully suggest the build be tagged Win64 to reduce user expectations, but thanks for the build that those without a fast 64bit sandbox can use on a USB stick |
As of version 1.7.0 PDF Arranger is not exactly portable as it saves its configuration file (
config.ini
) in AppData:C:\Users\User\AppData\Roaming\pdfarranger\config.ini
My request- when PDF Arranger starts it should check whether its program folder contains the configuration file (
config.ini
) and if it is there it should use it (load data from and save data to this configuration file, not using AppData for the configuration file, but the program folder instead).This small change would make PDF Arranger truly portable (not writing outside its own folder) and I suppose that this feature will not be hard to be implemented.
The text was updated successfully, but these errors were encountered: