view setup.cmd @ 25:5a5a7de27eb4

ExifWasher -> JpegWasher
author David Barts <n5jrn@me.com>
date Thu, 16 Apr 2020 19:41:29 -0700
parents cd2ca4727b7f
children 4076f1bbf21d
line wrap: on
line source

@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