XnView portable version with Ghostscript

Ask for help and post your question on how to use XnView Classic.

Moderators: XnTriq, helmut, xnview

cday
XnThusiast
Posts: 3973
Joined: Sun Apr 29, 2012 9:45 am
Location: Cheltenham, U.K.

XnView portable version with Ghostscript

Post 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 :?: ]
User avatar
xnview
Author of XnView
Posts: 43327
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: XnView portable version with Ghostscript

Post by xnview »

you can set XNVIEW_GS_DLL/XNVIEW_GS_LIB variable
Pierre.
cday
XnThusiast
Posts: 3973
Joined: Sun Apr 29, 2012 9:45 am
Location: Cheltenham, U.K.

Re: XnView portable version with Ghostscript

Post 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?
User avatar
xnview
Author of XnView
Posts: 43327
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: XnView portable version with Ghostscript

Post by xnview »

environment variable of windows
Pierre.
cday
XnThusiast
Posts: 3973
Joined: Sun Apr 29, 2012 9:45 am
Location: Cheltenham, U.K.

Re: XnView portable version with Ghostscript

Post 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?
User avatar
xnview
Author of XnView
Posts: 43327
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: XnView portable version with Ghostscript

Post by xnview »

check for example a gs subfolder in the Addon folder??
Pierre.
cday
XnThusiast
Posts: 3973
Joined: Sun Apr 29, 2012 9:45 am
Location: Cheltenham, U.K.

Re: XnView portable version with Ghostscript

Post by cday »

xnview wrote:check for example a gs subfolder in the Addon folder??
Yes, anything like that which would work... :D
User avatar
xnview
Author of XnView
Posts: 43327
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: XnView portable version with Ghostscript

Post 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
Pierre.
tboy
Posts: 99
Joined: Wed Jan 26, 2005 11:44 pm

Re: XnView portable version with Ghostscript

Post 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.
cday
XnThusiast
Posts: 3973
Joined: Sun Apr 29, 2012 9:45 am
Location: Cheltenham, U.K.

Re: XnView portable version with Ghostscript

Post 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 :?:
User avatar
omniplex
Posts: 127
Joined: Thu Feb 10, 2011 1:52 pm
Location: Hamburg
Contact:

Re: XnView portable version with Ghostscript

Post 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?
cday
XnThusiast
Posts: 3973
Joined: Sun Apr 29, 2012 9:45 am
Location: Cheltenham, U.K.

Re: XnView portable version with Ghostscript

Post 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:
User avatar
omniplex
Posts: 127
Joined: Thu Feb 10, 2011 1:52 pm
Location: Hamburg
Contact:

Re: XnView portable version with Ghostscript

Post 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.
cday
XnThusiast
Posts: 3973
Joined: Sun Apr 29, 2012 9:45 am
Location: Cheltenham, U.K.

Re: XnView portable version with Ghostscript

Post 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... :?:
User avatar
xnview
Author of XnView
Posts: 43327
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: XnView portable version with Ghostscript

Post 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?
Pierre.
Post Reply