@echo off
::
:: TeamCall CA NetTSPI
:: windows-installer.bat
::
:: Copyright (c) 2006, 2009, 2017, 2022 by ilink Kommunikationssysteme GmbH.  All Rights Reserved.
::
:: Requirement: java.exe needs to be on the search path.
::


:: java executable used for running the IzPack installer
:: (needs to be on the search path)
set JAVA_BIN=java.exe


set DEBUGOPTIONS=-DSTACKTRACE=true
:: Use this for debugging:
::set DEBUGOPTIONS=-DTRACE=true -DSTACKTRACE=true

:: "%~dp0" expands to the folder of this batch file
set LOG_FILE=""%~dp0"\CANetTSPI-install.log"

:: Unlike bash, the Windows batch processor does not expand wildcards in arguments.
:: So we use the following to determine the exact name of the installer jar file:
for %%A in ("%~dp0"\ca_nettspi_install*.jar) do (
    set INSTALLER=%%A
)

"%JAVA_BIN%" %DEBUGOPTIONS% -jar "%INSTALLER%" > "%LOG_FILE%"

