# HG changeset patch # User John D # Date 1470446698 14400 # Node ID cc549d1865cb85ff3c78c6bf99c9814930ba0791 # Parent be6b10b6faf509b94796bd2e9192f2c9bed4593a 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 diff -r be6b10b6faf5 -r cc549d1865cb dist-files.mk --- a/dist-files.mk Fri Aug 05 21:24:57 2016 -0400 +++ b/dist-files.mk Fri Aug 05 21:24:58 2016 -0400 @@ -558,6 +558,7 @@ pstoedit-2-gs.patch \ pstoedit-3-nosecapi.patch \ pstoedit-4-winlibemf.patch \ + pstoedit-5-use_gs_env.patch \ pstoedit.mk \ pthread-stubs.mk \ pthreads-test.c \ diff -r be6b10b6faf5 -r cc549d1865cb installer-files/cmdshell.bat --- a/installer-files/cmdshell.bat Fri Aug 05 21:24:57 2016 -0400 +++ b/installer-files/cmdshell.bat Fri Aug 05 21:24:58 2016 -0400 @@ -7,6 +7,7 @@ set PATH=%OCTAVE_HOME%bin;%PATH% set TERM=cygwin +set GS=gs.exe %OCTAVE_HOME%\bin\bash.exe diff -r be6b10b6faf5 -r cc549d1865cb installer-files/octave-firsttime.vbs --- a/installer-files/octave-firsttime.vbs Fri Aug 05 21:24:57 2016 -0400 +++ b/installer-files/octave-firsttime.vbs Fri Aug 05 21:24:58 2016 -0400 @@ -13,6 +13,9 @@ ' set terminal type wshSystemEnv("TERM") = "cygwin" +wshSystemEnv("GNUTERM") = "windows" + +wshSystemEnv("GS") = "gs.exe" ' set Qt plugin directory wshSystemEnv("QT_PLUGIN_PATH") = OctavePath & "\plugins" diff -r be6b10b6faf5 -r cc549d1865cb installer-files/octave.bat --- a/installer-files/octave.bat Fri Aug 05 21:24:57 2016 -0400 +++ b/installer-files/octave.bat Fri Aug 05 21:24:58 2016 -0400 @@ -15,6 +15,7 @@ set TERM=cygwin set GNUTERM=windows +set GS=gs.exe Rem Check for args to see if we are told to start GUI Rem with the --force-gui option or not (--no-gui) diff -r be6b10b6faf5 -r cc549d1865cb installer-files/octave.vbs --- a/installer-files/octave.vbs Fri Aug 05 21:24:57 2016 -0400 +++ b/installer-files/octave.vbs Fri Aug 05 21:24:58 2016 -0400 @@ -15,6 +15,8 @@ wshSystemEnv("TERM") = "cygwin" wshSystemEnv("GNUTERM") = "windows" +wshSystemEnv("GS") = "gs.exe" + ' set Qt plugin directory wshSystemEnv("QT_PLUGIN_PATH") = OctavePath & "\plugins" diff -r be6b10b6faf5 -r cc549d1865cb src/pstoedit-5-use_gs_env.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/pstoedit-5-use_gs_env.patch Fri Aug 05 21:24:58 2016 -0400 @@ -0,0 +1,20 @@ +diff -ur pstoedit-3.70.orig/src/callgs.cpp pstoedit-3.70/src/callgs.cpp +--- pstoedit-3.70.orig/src/callgs.cpp 2016-07-27 13:04:53.173499210 -0400 ++++ pstoedit-3.70/src/callgs.cpp 2016-07-27 13:56:54.686649091 -0400 +@@ -364,7 +364,15 @@ + } else { + if (verbose) errstream<< "nothing found in gsview32.ini file - using find_gs to lookup latest version of Ghostscript in registry " << endl; + static char buf[1000]; +- if (find_gs(buf, sizeof(buf), 550 /* min ver*/ , getPstoeditsetDLLUsage() , gsregbase)) { ++ ++ ++ gstocall = getenv("GS"); ++ ++ if(gstocall) { ++ if (verbose) ++ errstream << "GS is set to:" << gstocall << endl; ++ ++ } else if (find_gs(buf, sizeof(buf), 550 /* min ver*/ , getPstoeditsetDLLUsage() , gsregbase)) { + if (verbose) { + (void)dumpgsvers(gsregbase); + if (getPstoeditsetDLLUsage()) errstream << "Latest GS DLL is " << buf << endl;