comparison src/pstoedit-5-use_gs_env.patch @ 4183:cc549d1865cb

pstoedit: use GS environment var if set in windows * src/pstoedit-5-use_gs_env.patch: new file * installer-files/cmdshell.bat, installer-files/octave-firsttime.vbs, installer-files/octave.bat, installer-files/octave.vbs: set GS env var to gs.exe * dist-files.mk: added pstoedit-5-use_gs_env.patc
author John D
date Fri, 05 Aug 2016 21:24:58 -0400
parents
children 8d61de83cf90
comparison
equal deleted inserted replaced
4182:be6b10b6faf5 4183:cc549d1865cb
1 diff -ur pstoedit-3.70.orig/src/callgs.cpp pstoedit-3.70/src/callgs.cpp
2 --- pstoedit-3.70.orig/src/callgs.cpp 2016-07-27 13:04:53.173499210 -0400
3 +++ pstoedit-3.70/src/callgs.cpp 2016-07-27 13:56:54.686649091 -0400
4 @@ -364,7 +364,15 @@
5 } else {
6 if (verbose) errstream<< "nothing found in gsview32.ini file - using find_gs to lookup latest version of Ghostscript in registry " << endl;
7 static char buf[1000];
8 - if (find_gs(buf, sizeof(buf), 550 /* min ver*/ , getPstoeditsetDLLUsage() , gsregbase)) {
9 +
10 +
11 + gstocall = getenv("GS");
12 +
13 + if(gstocall) {
14 + if (verbose)
15 + errstream << "GS is set to:" << gstocall << endl;
16 +
17 + } else if (find_gs(buf, sizeof(buf), 550 /* min ver*/ , getPstoeditsetDLLUsage() , gsregbase)) {
18 if (verbose) {
19 (void)dumpgsvers(gsregbase);
20 if (getPstoeditsetDLLUsage()) errstream << "Latest GS DLL is " << buf << endl;