XnView portable version with Ghostscript

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

Moderators: XnTriq, xnview

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

XnView portable version with Ghostscript

Postby cday » Wed Feb 25, 2015 11:13 am

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: 28086
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: XnView portable version with Ghostscript

Postby xnview » Wed Feb 25, 2015 11:19 am

you can set XNVIEW_GS_DLL/XNVIEW_GS_LIB variable
Pierre.

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

Re: XnView portable version with Ghostscript

Postby cday » Wed Feb 25, 2015 12:05 pm

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: 28086
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: XnView portable version with Ghostscript

Postby xnview » Wed Feb 25, 2015 1:47 pm

environment variable of windows
Pierre.

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

Re: XnView portable version with Ghostscript

Postby cday » Thu Feb 26, 2015 10:17 am

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: 28086
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: XnView portable version with Ghostscript

Postby xnview » Thu Feb 26, 2015 1:05 pm

check for example a gs subfolder in the Addon folder??
Pierre.

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

Re: XnView portable version with Ghostscript

Postby cday » Thu Feb 26, 2015 1:08 pm

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: 28086
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: XnView portable version with Ghostscript

Postby xnview » Fri Feb 27, 2015 9:26 am

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: 81
Joined: Wed Jan 26, 2005 11:44 pm

Re: XnView portable version with Ghostscript

Postby tboy » Sun Mar 01, 2015 9:23 am

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: 1561
Joined: Sun Apr 29, 2012 9:45 am
Location: Cheltenham, U.K.

Re: XnView portable version with Ghostscript

Postby cday » Wed Mar 18, 2015 8:39 am

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: 123
Joined: Thu Feb 10, 2011 1:52 pm
Location: Hamburg
Contact:

Re: XnView portable version with Ghostscript

Postby omniplex » Wed Mar 18, 2015 1:11 pm

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: 1561
Joined: Sun Apr 29, 2012 9:45 am
Location: Cheltenham, U.K.

Re: XnView portable version with Ghostscript

Postby cday » Wed Mar 18, 2015 1:52 pm

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: 123
Joined: Thu Feb 10, 2011 1:52 pm
Location: Hamburg
Contact:

Re: XnView portable version with Ghostscript

Postby omniplex » Wed Mar 18, 2015 2:16 pm

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: 1561
Joined: Sun Apr 29, 2012 9:45 am
Location: Cheltenham, U.K.

Re: XnView portable version with Ghostscript

Postby cday » Wed Mar 18, 2015 2:30 pm

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: 28086
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: XnView portable version with Ghostscript

Postby xnview » Thu Mar 19, 2015 9:52 am

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.


Return to “Classic - General Support”

Who is online

Users browsing this forum: No registered users and 2 guests