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 Windows version? #186

Open
sgargbugreporter opened this issue Nov 6, 2016 · 5 comments
Open

Portable Windows version? #186

sgargbugreporter opened this issue Nov 6, 2016 · 5 comments

Comments

@sgargbugreporter
Copy link

I installed this on my Linux machine and it seems to work great. Thanks.

Wondering if there is a version that I can install on a flash drives and run from a Windows machine?

Use case: conference folks provide their own PC and one generally cannot install random software on such computers.

@dannyedel
Copy link
Owner

CCing @projekter, who maintains the Windows port and can give more accurate information.


Disclaimer: I don't use Windows productively, so this information is based on my experiments in VMs and likely incomplete.


Thanks for suggesting this. I agree that this might be useful. From a security standpoint, the conference-hosting folks allowing you to run arbitrary binaries is only marginally less bad than allowing you to install them, but let's give them the benefit of the doubt and assume they wipe the hard drives (or at least the user profile) every now and then : )

That said, the main issue is that dspdfviewer needs to find the libraries and data files (font definitions, character mappings, etc) at runtime. I'm not 100% sure how this is done, but I believe that their search paths are relative to the main executable binary (dspdfviewer.exe).

As a workaround, you could try copying the installed folder (c:/program files/dspdfviewer) onto the USB stick, and see if the binary inside launches on another computer which does not have the registry entries (and probably assigns a different mount point to the stick than your initial PC). From what I can tell, the registry entries are mainly required for _un_installation. I am sure that no registry queries are written into the source code, so it should™ be portable, as long as Qt or poppler do not have a path hardcoded at build time, which is a safe assumption in my opinion.

When testing on the secondary computer, also try the PDFs from #99 and #173 (initial PDF only, the second one with two swapped symbols is a known upstream bug) since these alerted us to the issue with the data files.

@projekter
Copy link
Contributor

Indeed, the installer does not create any registry entries (apart from the one registering the uninstaller) and is nothing but an extractor which can be used to comfortably create shortcuts. So it is possible to simply copy the whole structure that is created by the installer to another directory. Depending on your needs, it might also be enough to just copy the executable:

  • You might not need the help file, and if you don't do an installation, you don't need the uninstaller.
  • If English is the only language you need, you can drop the Translations folder.
  • If you don't use Unicode characters (which normally is no problem for English texts, including all math and what you can think of, but might be for foreign languages), you don't need the share folder.
  • After you have read all of them, you might also exclude the License folder :-).

I might well prepare a zip archive in the future if there is need for this. I decided for the installer, since I feel it is more comfortable, but I am aware of the highly-emotional debate about whether archives are "better"/"give more control".

@projekter
Copy link
Contributor

Sorry that it took so long for such a trivial thing, but now I've found a peaceful minute to create an archive, which I also added to the latest release. I have chosen the zip format, as it can be read by Windows natively, though it is considerably worse in compressing compared to 7zip, which is used by the setup internally. Therefore, the archive is almost double in size compared to the setup. Hope this helps.

@dannyedel
Copy link
Owner

I included the portable zip in the installation instructions in bc53aa6.

@projekter Does this look okay to you?


@sgargbugreporter Did you get a chance to test the zip?

@projekter
Copy link
Contributor

That's perfectly fine.

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

3 participants