annotate setup.cmd @ 60:d0b83fc1d62a default tip

Remember our input directory on a per-invocation basis.
author David Barts <n5jrn@me.com>
date Sun, 26 Jul 2020 15:14:03 -0700
parents 6999afa6fff3
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
22
cd2ca4727b7f Builds under Windows.
davidb
parents:
diff changeset
1 @echo off
cd2ca4727b7f Builds under Windows.
davidb
parents:
diff changeset
2 rem -*- coding: windows-1252 -*-
cd2ca4727b7f Builds under Windows.
davidb
parents:
diff changeset
3
cd2ca4727b7f Builds under Windows.
davidb
parents:
diff changeset
4 rem Basic directory stuff, edit as needed.
cd2ca4727b7f Builds under Windows.
davidb
parents:
diff changeset
5 set JAVA_TOOL_OPTIONS=-Dfile.encoding=UTF8
cd2ca4727b7f Builds under Windows.
davidb
parents:
diff changeset
6 set JRE_HOME=C:\Program Files\Java\jdk1.8.0_241
cd2ca4727b7f Builds under Windows.
davidb
parents:
diff changeset
7 set KOTLIN_HOME=C:\Users\David Barts\java\kotlin-compiler-1.3.71\kotlinc
cd2ca4727b7f Builds under Windows.
davidb
parents:
diff changeset
8 set ANT_HOME=C:\Users\David Barts\java\apache-ant-1.10.7
cd2ca4727b7f Builds under Windows.
davidb
parents:
diff changeset
9 set EXIV2_HOME=C:\Users\David Barts\Downloads\exiv2-0.27.2-2017msvc64\exiv2-0.27.2-2017msvc64
42
4076f1bbf21d Got ant winapp working!
davidb
parents: 22
diff changeset
10 set LAUNCH4J_HOME=C:\Program Files (x86)\Launch4j
44
6999afa6fff3 Update Building instructions; minor build system bug fixes.
David Barts <davidb@stashtea.com>
parents: 42
diff changeset
11 set OSDEP_HOME=..\Osdep
22
cd2ca4727b7f Builds under Windows.
davidb
parents:
diff changeset
12
cd2ca4727b7f Builds under Windows.
davidb
parents:
diff changeset
13 rem For each directory, fix PATH if needed.
cd2ca4727b7f Builds under Windows.
davidb
parents:
diff changeset
14 call :fixpath "%JRE_HOME%"
cd2ca4727b7f Builds under Windows.
davidb
parents:
diff changeset
15 call :fixpath "%KOTLIN_HOME%"
cd2ca4727b7f Builds under Windows.
davidb
parents:
diff changeset
16 call :fixpath "%ANT_HOME%"
cd2ca4727b7f Builds under Windows.
davidb
parents:
diff changeset
17 exit/b 0
cd2ca4727b7f Builds under Windows.
davidb
parents:
diff changeset
18
cd2ca4727b7f Builds under Windows.
davidb
parents:
diff changeset
19 rem The rest of this file probably won't need changing.
cd2ca4727b7f Builds under Windows.
davidb
parents:
diff changeset
20
cd2ca4727b7f Builds under Windows.
davidb
parents:
diff changeset
21 rem Subroutine to fix up path, if needed. So we don't mindlessly grow
cd2ca4727b7f Builds under Windows.
davidb
parents:
diff changeset
22 rem PATH.
cd2ca4727b7f Builds under Windows.
davidb
parents:
diff changeset
23 :fixpath
cd2ca4727b7f Builds under Windows.
davidb
parents:
diff changeset
24 set bindir=%~1\bin
cd2ca4727b7f Builds under Windows.
davidb
parents:
diff changeset
25 if not exist "%bindir%\" goto amf
cd2ca4727b7f Builds under Windows.
davidb
parents:
diff changeset
26 set p2=%path%
cd2ca4727b7f Builds under Windows.
davidb
parents:
diff changeset
27 :loop
cd2ca4727b7f Builds under Windows.
davidb
parents:
diff changeset
28 for /f "tokens=1* delims=;" %%A in ("%p2%") do (
cd2ca4727b7f Builds under Windows.
davidb
parents:
diff changeset
29 set first=%%A
cd2ca4727b7f Builds under Windows.
davidb
parents:
diff changeset
30 set rest=%%B
cd2ca4727b7f Builds under Windows.
davidb
parents:
diff changeset
31 )
cd2ca4727b7f Builds under Windows.
davidb
parents:
diff changeset
32 if "%first%"=="%bindir%" goto amf
cd2ca4727b7f Builds under Windows.
davidb
parents:
diff changeset
33 if "%rest%"=="" goto notfound
cd2ca4727b7f Builds under Windows.
davidb
parents:
diff changeset
34 set p2=%rest%
cd2ca4727b7f Builds under Windows.
davidb
parents:
diff changeset
35 goto loop
cd2ca4727b7f Builds under Windows.
davidb
parents:
diff changeset
36 :notfound
cd2ca4727b7f Builds under Windows.
davidb
parents:
diff changeset
37 echo Adding "%bindir%" to PATH.
cd2ca4727b7f Builds under Windows.
davidb
parents:
diff changeset
38 set path=%bindir%;%path%
cd2ca4727b7f Builds under Windows.
davidb
parents:
diff changeset
39 :amf
cd2ca4727b7f Builds under Windows.
davidb
parents:
diff changeset
40 set bindir=
cd2ca4727b7f Builds under Windows.
davidb
parents:
diff changeset
41 set p2=
cd2ca4727b7f Builds under Windows.
davidb
parents:
diff changeset
42 set first=
cd2ca4727b7f Builds under Windows.
davidb
parents:
diff changeset
43 set rest=
cd2ca4727b7f Builds under Windows.
davidb
parents:
diff changeset
44 exit/b 0