22
|
1 @echo off
|
|
2 rem -*- coding: windows-1252 -*-
|
|
3
|
|
4 rem Basic directory stuff, edit as needed.
|
|
5 set JAVA_TOOL_OPTIONS=-Dfile.encoding=UTF8
|
|
6 set JRE_HOME=C:\Program Files\Java\jdk1.8.0_241
|
|
7 set KOTLIN_HOME=C:\Users\David Barts\java\kotlin-compiler-1.3.71\kotlinc
|
|
8 set ANT_HOME=C:\Users\David Barts\java\apache-ant-1.10.7
|
|
9 set EXIV2_HOME=C:\Users\David Barts\Downloads\exiv2-0.27.2-2017msvc64\exiv2-0.27.2-2017msvc64
|
42
|
10 set LAUNCH4J_HOME=C:\Program Files (x86)\Launch4j
|
22
|
11
|
|
12 rem For each directory, fix PATH if needed.
|
|
13 call :fixpath "%JRE_HOME%"
|
|
14 call :fixpath "%KOTLIN_HOME%"
|
|
15 call :fixpath "%ANT_HOME%"
|
|
16 exit/b 0
|
|
17
|
|
18 rem The rest of this file probably won't need changing.
|
|
19
|
|
20 rem Subroutine to fix up path, if needed. So we don't mindlessly grow
|
|
21 rem PATH.
|
|
22 :fixpath
|
|
23 set bindir=%~1\bin
|
|
24 if not exist "%bindir%\" goto amf
|
|
25 set p2=%path%
|
|
26 :loop
|
|
27 for /f "tokens=1* delims=;" %%A in ("%p2%") do (
|
|
28 set first=%%A
|
|
29 set rest=%%B
|
|
30 )
|
|
31 if "%first%"=="%bindir%" goto amf
|
|
32 if "%rest%"=="" goto notfound
|
|
33 set p2=%rest%
|
|
34 goto loop
|
|
35 :notfound
|
|
36 echo Adding "%bindir%" to PATH.
|
|
37 set path=%bindir%;%path%
|
|
38 :amf
|
|
39 set bindir=
|
|
40 set p2=
|
|
41 set first=
|
|
42 set rest=
|
|
43 exit/b 0
|