summaryrefslogtreecommitdiff
path: root/lib/gssetgs.bat
blob: 8317261adaa39bd3ebf283a412c305bf2d8dc0e0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
@echo off

rem Set default values for GS (gs with graphics window) and GSC
rem (console mode gs) if the user hasn't set them.
rem if 64-bit version is available, prefer that.

if NOT %GS%/==/ goto :gsset
if EXIST %~dp0..\bin\gswin32.exe set GS=%~dp0..\bin\gswin32
if EXIST %~dp0..\bin\gswin64.exe set GS=%~dp0..\bin\gswin64
if %GS/==/ set GS=gswin32
:gsset

if NOT %GSC%/==/ goto :gscset
if EXIST %~dp0..\bin\gswin32c.exe set GSC=%~dp0..\bin\gswin32c
if EXIST %~dp0..\bin\gswin64c.exe set GSC=%~dp0..\bin\gswin64c
if %GSC%/==/ set GSC=gswin32c
:gscset