Page 1 of 2

XnView portable version with Ghostscript

Posted: Wed Feb 25, 2015 11:13 am
by cday
Is there a way to put an XnView ZIP version on a USB memory stick and then add Ghostscript to provide PDF support, for example?

The answer seems to be no...

If it isn’t currently possible, could a minor change to the xnview.exe code, so that when it fails to find the path to Ghostscript where it currently looks [the registry?] it looks in an alternative, specified, location provide a simple solution?

[A folder ‘gs’ in the xnview folder, or beside the xnview folder, into which Ghostscript could be extracted, or certain files copied :?: ]

Re: XnView portable version with Ghostscript

Posted: Wed Feb 25, 2015 11:19 am
by xnview
you can set XNVIEW_GS_DLL/XNVIEW_GS_LIB variable

Re: XnView portable version with Ghostscript

Posted: Wed Feb 25, 2015 12:05 pm
by cday
xnview wrote:you can set XNVIEW_GS_DLL/XNVIEW_GS_LIB variable
Thanks, still looking for those variables, in XnView, GS or Windows?

The idea is to create a USB drive that could be plugged into any computer, for example in a public library, where the drive letter could change and access to system files may be locked...

Files on the USB drive could be edited easily, but would GS still function if the drive letter changed?

A change in the xnview code to also look for GhostScript in an alternative, relative, location before displaying the 'not found' message would provide a fully portable solution?

Re: XnView portable version with Ghostscript

Posted: Wed Feb 25, 2015 1:47 pm
by xnview
environment variable of windows

Re: XnView portable version with Ghostscript

Posted: Thu Feb 26, 2015 10:17 am
by cday
xnview wrote: you can set XNVIEW_GS_DLL/XNVIEW_GS_LIB variable
xnview wrote:environment variable of windows
Not generally accessible on public computers for security reasons...

The ideal would be to be able to plug a USB drive with XnView ZIP and Ghostscript on it into any computer and have it work immediately...

Irfanview provides a means to set a custom path to Ghostscript, but it is necessary to set up the full path every time, a pain for me and a larger obstacle for others. And Irfanview isn’t XnView... :wink:

Could xnview, before displaying the ‘Ghostscript not found’ message, check for the presence of Ghostscript on the USB drive?

Re: XnView portable version with Ghostscript

Posted: Thu Feb 26, 2015 1:05 pm
by xnview
check for example a gs subfolder in the Addon folder??

Re: XnView portable version with Ghostscript

Posted: Thu Feb 26, 2015 1:08 pm
by cday
xnview wrote:check for example a gs subfolder in the Addon folder??
Yes, anything like that which would work... :D

Re: XnView portable version with Ghostscript

Posted: Fri Feb 27, 2015 9:26 am
by xnview
cday wrote:
xnview wrote:check for example a gs subfolder in the Addon folder??
Yes, anything like that which would work... :D
ok, i'll add Plugins\gs subolder checking

Re: XnView portable version with Ghostscript

Posted: Sun Mar 01, 2015 9:23 am
by tboy
I will add some wishes here as they are related to portability.

Will be good if "Resent files list" ( in "Small toolbar" in XnView Classic) can accept relative pats.
Options dialog accept relative paths, so I hope it's not a hard work to make this for "Resent files list" too.

For example XnViewMP accepts relative pats in same list,
but there is a small bug that has to be corrected - Folder tree is NOT updated to current folder if we open a relative path.

Re: XnView portable version with Ghostscript

Posted: Wed Mar 18, 2015 8:39 am
by cday
cday wrote:Is there a way to put an XnView ZIP version on a USB memory stick and then add Ghostscript to provide PDF support?
xnview wrote:ok, i'll add Plugins\gs subfolder checking
Thanks for XnView 2.32 but so far I have had no success with it... :wink:

If the GS files are placed in X:\xnview\plugins\gs the error message is 'Format of the file could not be determined...' even with the ini file in the XnView folder and 'Display all image file types' enabled.

If the GS files are placed in \gs\gs9.15 as on my desktop, the error message is 'Ghostscript not found...'

Only relative paths on the usb drive are used and there is no dependency on any other file or variable??

Am I missing something :?:

Re: XnView portable version with Ghostscript

Posted: Wed Mar 18, 2015 1:11 pm
by omniplex
cday wrote:Am I missing something :?:
Dunno, but I'm missing something. There is a Portable Apps ghostscript 9.15. So if you have U:\really\weird\apps\XnViewPortable the application directory of XnView would be U:\really\weird\apps\XnViewPortable\App\XnView, and ghostscript should be in U:\really\weird\apps\TBD1\App\TBD2. What are you up to with a special U:\really\weird\apps\XnViewPortable\App\XnView\plugins\gs folder?

Re: XnView portable version with Ghostscript

Posted: Wed Mar 18, 2015 1:52 pm
by cday
omniplex wrote:There is a Portable Apps ghostscript 9.15. So if you have U:\really\weird\apps\XnViewPortable the application directory of XnView would be U:\really\weird\apps\XnViewPortable\App\XnView, and ghostscript should be in U:\really\weird\apps\TBD1\App\TBD2.
I would rather use a standard XnView ZIP with standard Ghostscript to create something that could be plugged into a public computer and work immediately... I did look at Portable Apps but that didn't work for me even after searching the forum, but XnView remains my first choice.
What are you up to with a ... plugins\gs folder?
Have you read the earlier posts of the thread? :wink:

Re: XnView portable version with Ghostscript

Posted: Wed Mar 18, 2015 2:16 pm
by omniplex
cday wrote:Have you read the earlier posts of the thread? :wink:
Not really, but you can create your own XnViewPortable.ini in the directory of XnViewPortable.exe, and (untested) that INI can define its own startup environment in an [Environment] section. -

Just in case, do you test the 32bits version of GhostScript? It's a major headache, looking at my "start GS" script, it might need GS=gswin32 GSC=gswin32c and a temporary entry for its gostscript\bin subdirectory at the end of the PATH.

Re: XnView portable version with Ghostscript

Posted: Wed Mar 18, 2015 2:30 pm
by cday
omniplex wrote:... you can create your own XnViewPortable.ini in the directory of XnViewPortable.exe, and (untested) that INI can define its own startup environment in an [Environment] section.
I'd rather use a standard XnView ZIP if possible for simplicity, and I'm thinking that if the changes needed are easy to make they could later be incorporated in XnViewMP as well...
omniplex wrote:... do you test the 32bits version of GhostScript? It's a major headache, looking at my "start GS" script, it might need GS=gswin32 GSC=gswin32c and a temporary entry for its gostscript\bin subdirectory at the end of the PATH.
Yes, GS 32-bit for XnView 32-bit...

I'm hoping for a response from Pierre on the immediate issue when he has time... :?:

Re: XnView portable version with Ghostscript

Posted: Thu Mar 19, 2015 9:52 am
by xnview
cday wrote: If the GS files are placed in X:\xnview\plugins\gs the error message is 'Format of the file could not be determined...' even with the ini file in the XnView folder and 'Display all image file types' enabled.
You have all the files of gs9.15 folder in Plugins\gs?