When trying to launch xnconvert to convert PDF to png, xnconvert needs to use Ghostscript. However, using the PortableApps version of both apps on the same drive, xnconvert doesn't seem to find Ghostscript. A trace with Process Monitor shows...
PATH NOT FOUND
C:\Program Files (x86)\bitfarm-Archiv\gs10.04.0\bin\gsdll64.dll
For some reason it keeps trying to get gsdll64.dll in the above directory, instead of %PAL:PortableAppsDir%\CommonFiles\Ghostscript\App\
Is this a bug in the PortableApps implementation or a bug in xnconvert?
I've tried to adjust the launcher ini file to the following and it doesn't work:
[Activate]
Ghostscript=find
Registry=false
[Environment]
CustomGSDirectory=%PAL:PortableAppsDir%\CommonFiles\Ghostscript\App\
xnconvert_GS_DLL=%CustomGSDirectory%\bin\gsdll64.dll
xnconvert_GS_LIB=%CustomGSDirectory%\bin;%CustomGSDirectory%\lib;%CustomGSDirectory%\fonts
PATH=%PAL:PortableAppsDir%\CommonFiles\Ghostscript\bin;%PAL:PortableAppsDir%\CommonFiles\Ghostscript\lib;%PATH%
I also tried installing Ghostscript on the host computer, and then it works. It references the correct dll in C:\Program Files\gs\gs10.05.1\bin
But I would ideally like it to run completely on the portable version of Ghostscript, so that the drive is computer independent.
I can confirm the issue. I'll take a look at it later tomorrow.
Sometimes, the impossible can become possible, if you're awesome!
This is fixed in today's release of Ghostscript Portable 10.05.1. Turns out I made a packaging error in the last version a few weeks ago which broke Ghostscript usage with any app. Thanks for reporting.
Sometimes, the impossible can become possible, if you're awesome!
I'm still getting the same error. Even after uninstalling xnconvert and deleting the Ghostscript and doing a fresh install. Is there anything else that should be cleared out? I can confirm that the Ghostscript Program Files directory isn't in my system's path.
How can you tell in XnConvert itself that it can't find it? Is there something the app shows?
We don't actually configure the app to use Ghostscript. The XnConvertPortable.exe launcher creates those custom environment variables (GS_DLL, GS_LIB, xnconvert_GS_DLL, xnconvert_GS_LIB) and populates them. I can confirm that it is correctly setting those up as expected.
That said, I think it may be because I added 64-bit support to XnConvert but didn't update all the code to support both. Try opening up the XnConvertPortable.ini file within XnConvertPortable\App\AppInfo\Launcher and changing the two gsdll32.dll entries within Environment to gsdll64.dll. Let me know if that gets it working.
Sometimes, the impossible can become possible, if you're awesome!
Here is all the combinations I have tried...
[Environment]
GS_DLL=%PAL:PortableAppsDir%\CommonFiles\Ghostscript\bin\gsdll64.dll
GS_LIB=%PAL:PortableAppsDir%\CommonFiles\Ghostscript\lib;%PAL:PortableAppsDir%\CommonFiles\Ghostscript\fonts
xnconvert_GS_DLL=%PAL:PortableAppsDir%\CommonFiles\Ghostscript\bin\gsdll64.dll
xnconvert_GS_LIB=%PAL:PortableAppsDir%\CommonFiles\Ghostscript\bin;%PAL:PortableAppsDir%\CommonFiles\Ghostscript\lib;%PAL:PortableAppsDir%\CommonFiles\Ghostscript\fonts
PATH=%PAL:PortableAppsDir%\CommonFiles\Ghostscript\bin;%PAL:PortableAppsDir%\CommonFiles\Ghostscript\lib;%PATH%
[Environment]
CustomGSDirectory=%PAL:PortableAppsDir%\CommonFiles\Ghostscript\App\
xnconvert_GS_DLL=%CustomGSDirectory%\bin\gsdll64.dll
xnconvert_GS_LIB=%CustomGSDirectory%\bin;%CustomGSDirectory%\lib;%CustomGSDirectory%\fonts
PATH=%PAL:PortableAppsDir%\CommonFiles\Ghostscript\bin;%PAL:PortableAppsDir%\CommonFiles\Ghostscript\lib;%PATH%
[Environment]
GS_DLL=%CustomGSDirectory%\bin\gsdll32.dll
GS_LIB=%CustomGSDirectory%\bin;%CustomGSDirectory%\lib;%CustomGSDirectory%\fonts
xnconvert_GS_DLL=%CustomGSDirectory%\bin\gsdll32.dll
xnconvert_GS_LIB=%CustomGSDirectory%\bin;%CustomGSDirectory%\lib;%CustomGSDirectory%\fonts
[Environment]
CustomGSDirectory=%PAL:PortableAppsDir%\CommonFiles\Ghostscript
GS_DLL=%CustomGSDirectory%\bin\gsdll32.dll
GS_LIB=%CustomGSDirectory%\bin;%CustomGSDirectory%\lib;%CustomGSDirectory%\fonts
xnconvert_GS_DLL=%CustomGSDirectory%\bin\gsdll32.dll
xnconvert_GS_LIB=%CustomGSDirectory%\bin;%CustomGSDirectory%\lib;%CustomGSDirectory%\fonts
[Environment]
CustomGSDirectory=%PAL:PortableAppsDir%\CommonFiles\Ghostscript
GS_DLL=%CustomGSDirectory%\bin\gsdll32.dll
GS_LIB=%CustomGSDirectory%\bin;%CustomGSDirectory%\lib;%CustomGSDirectory%\fonts
xnconvert_GS_DLL=%CustomGSDirectory%\bin\gsdll32.dll
xnconvert_GS_LIB=%CustomGSDirectory%\bin;%CustomGSDirectory%\lib;%CustomGSDirectory%\fonts
PATH=%PAL:PortableAppsDir%\CommonFiles\Ghostscript\bin;%PAL:PortableAppsDir%\CommonFiles\Ghostscript\lib;%PATH%
[Environment]
CustomGSDirectory=%PAL:PortableAppsDir%\CommonFiles\Ghostscript
xnconvert_GS_DLL=%CustomGSDirectory%\bin\gsdll32.dll
xnconvert_GS_LIB=%CustomGSDirectory%\bin;%CustomGSDirectory%\lib;%CustomGSDirectory%\fonts
[Environment]
CustomGSDirectory=%PAL:PortableAppsDir%\CommonFiles\Ghostscript
xnconvert_GS_DLL=%CustomGSDirectory%\bin\gsdll64.dll
xnconvert_GS_LIB=%CustomGSDirectory%\bin;%CustomGSDirectory%\lib;%CustomGSDirectory%\fonts
[Environment]
CustomGSDirectory=%PAL:PortableAppsDir%\CommonFiles\Ghostscript
GS_DLL=%CustomGSDirectory%\bin\gsdll32.dll
GS_LIB=%CustomGSDirectory%\bin;%CustomGSDirectory%\lib;%CustomGSDirectory%\fonts
[Environment]
CustomGSDirectory=%PAL:PortableAppsDir%\CommonFiles\Ghostscript
GS_DLL=%CustomGSDirectory%\bin\gsdll64.dll
GS_LIB=%CustomGSDirectory%\bin;%CustomGSDirectory%\lib;%CustomGSDirectory%\fonts
[Environment]
CustomGSDirectory=%PAL:PortableAppsDir%\CommonFiles\Ghostscript
GS_DLL=%CustomGSDirectory%\bin\gsdll32.dll
GS_LIB=%CustomGSDirectory%\bin;%CustomGSDirectory%\lib;%CustomGSDirectory%\fonts
xnconvert_GS_DLL=%CustomGSDirectory%\bin\gsdll32.dll
xnconvert_GS_LIB=%CustomGSDirectory%\bin;%CustomGSDirectory%\lib;%CustomGSDirectory%\fonts
[Environment]
GS_DLL=%CustomGSDirectory%\bin\gsdll32.dll
GS_LIB=%CustomGSDirectory%\bin;%CustomGSDirectory%\lib;%CustomGSDirectory%\fonts
xnconvert_GS_DLL=%CustomGSDirectory%\bin\gsdll32.dll
xnconvert_GS_LIB=%CustomGSDirectory%\bin;%CustomGSDirectory%\lib;%CustomGSDirectory%\fonts
32-Bit Version tries to load (via P:\PortableApps\XnConvertPortable\App\XnConvert\xnconvert.exe)
P:\PortableApps\XnConvertPortable\App\XnConvert\Plugins\gs\bin\gsdll32.dll - PATH NOT FOUND
64-bit Version tries to load (via P:\PortableApps\XnConvertPortable\XnConvertPortable.exe)
C:\Program Files (x86)\bitfarm-Archiv\gs10.04.0\bin\gsdll64.dll - PATH NOT FOUND
Not sure why it's looking in (x86) Program Files but for the 64-bit of Ghostscript.
Tried all of these combinations with the two following settings:
[Activate]
Ghostscript=find
Registry=true
[Activate]
Ghostscript=find
Registry=false
How can you tell in XnConvert itself that it can't find it? Is there something the app shows?
Sometimes, the impossible can become possible, if you're awesome!
Not that I can see... there isn't a plug-in info screen or anything.