dannyedel / dspdfviewer

Dual-Screen PDF Viewer for latex-beamer
http://dspdfviewer.danny-edel.de
GNU General Public License v2.0
217 stars 27 forks source link

Portable Windows version? #186

Open sgargbugreporter opened 7 years ago

sgargbugreporter commented 7 years ago

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 commented 7 years ago

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 commented 7 years ago

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:

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 commented 7 years ago

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 commented 7 years ago

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

@projekter Does this look okay to you?


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

projekter commented 7 years ago

That's perfectly fine.