diff setup.cmd @ 22:cd2ca4727b7f

Builds under Windows.
author davidb
date Thu, 16 Apr 2020 11:10:39 -0700
parents
children 4076f1bbf21d
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/setup.cmd	Thu Apr 16 11:10:39 2020 -0700
@@ -0,0 +1,42 @@
+@echo off
+rem -*- coding: windows-1252 -*-
+
+rem Basic directory stuff, edit as needed.
+set JAVA_TOOL_OPTIONS=-Dfile.encoding=UTF8
+set JRE_HOME=C:\Program Files\Java\jdk1.8.0_241
+set KOTLIN_HOME=C:\Users\David Barts\java\kotlin-compiler-1.3.71\kotlinc
+set ANT_HOME=C:\Users\David Barts\java\apache-ant-1.10.7
+set EXIV2_HOME=C:\Users\David Barts\Downloads\exiv2-0.27.2-2017msvc64\exiv2-0.27.2-2017msvc64
+
+rem For each directory, fix PATH if needed.
+call :fixpath "%JRE_HOME%"
+call :fixpath "%KOTLIN_HOME%"
+call :fixpath "%ANT_HOME%"
+exit/b 0
+
+rem The rest of this file probably won't need changing.
+
+rem Subroutine to fix up path, if needed. So we don't mindlessly grow
+rem PATH.
+:fixpath
+set bindir=%~1\bin
+if not exist "%bindir%\" goto amf
+set p2=%path%
+:loop
+	for /f "tokens=1* delims=;" %%A in ("%p2%") do (
+		set first=%%A
+		set rest=%%B
+	)
+	if "%first%"=="%bindir%" goto amf
+	if "%rest%"=="" goto notfound
+	set p2=%rest%
+	goto loop
+:notfound
+echo Adding "%bindir%" to PATH.
+set path=%bindir%;%path%
+:amf
+set bindir=
+set p2=
+set first=
+set rest=
+exit/b 0