732c583cf17c2fe2c6b991e14d250bfb0c717ba1Mark Offutt@echo off
98f2f99895b90678253d7e9c81ed0eea655e2d91Laszlo Hordosset "EXECUTABLE=%cd%\launcher.bat"
98f2f99895b90678253d7e9c81ed0eea655e2d91Laszlo Hordos
98f2f99895b90678253d7e9c81ed0eea655e2d91Laszlo Hordosrem Check that target executable exists
98f2f99895b90678253d7e9c81ed0eea655e2d91Laszlo Hordosif exist "%EXECUTABLE%" goto execOK
98f2f99895b90678253d7e9c81ed0eea655e2d91Laszlo Hordosecho Cannot find "%EXECUTABLE%"
98f2f99895b90678253d7e9c81ed0eea655e2d91Laszlo Hordosecho This file is needed to run this program
98f2f99895b90678253d7e9c81ed0eea655e2d91Laszlo Hordosgoto end
98f2f99895b90678253d7e9c81ed0eea655e2d91Laszlo Hordos:execOK
98f2f99895b90678253d7e9c81ed0eea655e2d91Laszlo Hordos
98f2f99895b90678253d7e9c81ed0eea655e2d91Laszlo Hordosrem Get remaining unshifted command line arguments and save them in the
98f2f99895b90678253d7e9c81ed0eea655e2d91Laszlo Hordosset CMD_LINE_ARGS=
98f2f99895b90678253d7e9c81ed0eea655e2d91Laszlo Hordos:setArgs
98f2f99895b90678253d7e9c81ed0eea655e2d91Laszlo Hordosif ""%1""=="""" goto doneSetArgs
98f2f99895b90678253d7e9c81ed0eea655e2d91Laszlo Hordosset CMD_LINE_ARGS=%CMD_LINE_ARGS% %1
98f2f99895b90678253d7e9c81ed0eea655e2d91Laszlo Hordosshift
98f2f99895b90678253d7e9c81ed0eea655e2d91Laszlo Hordosgoto setArgs
98f2f99895b90678253d7e9c81ed0eea655e2d91Laszlo Hordos:doneSetArgs
98f2f99895b90678253d7e9c81ed0eea655e2d91Laszlo Hordos
4c8a0a5b93bca43d2d6912bb3954c54ccc1f8bb2Jake Feaselrem Only set OPENIDM_OPTS if not already set
4c8a0a5b93bca43d2d6912bb3954c54ccc1f8bb2Jake Feaselif not "%OPENIDM_OPTS%" == "" goto noOpenIDMOpts
4c8a0a5b93bca43d2d6912bb3954c54ccc1f8bb2Jake Feaselset OPENIDM_OPTS=${openidm.options} -Dfile.encoding=UTF-8
4c8a0a5b93bca43d2d6912bb3954c54ccc1f8bb2Jake Feasel:noOpenIDMOpts
4c8a0a5b93bca43d2d6912bb3954c54ccc1f8bb2Jake Feasel
732c583cf17c2fe2c6b991e14d250bfb0c717ba1Mark Offuttrem Make sure to remove any spaces and replace with semi-colon
732c583cf17c2fe2c6b991e14d250bfb0c717ba1Mark Offuttset OPENIDM_OPTS_SERVICE=%OPENIDM_OPTS: =;%
732c583cf17c2fe2c6b991e14d250bfb0c717ba1Mark Offutt
98f2f99895b90678253d7e9c81ed0eea655e2d91Laszlo Hordosrem set SERVER_START_PARAMS="-c;bin/launcher.json"
98f2f99895b90678253d7e9c81ed0eea655e2d91Laszlo Hordosset CP=bin/launcher.jar;bin/felix.jar
732c583cf17c2fe2c6b991e14d250bfb0c717ba1Mark Offuttrem JAVA_OPTS_SERVICE will be fed to the prunmgr.exe which requires all semi-colon delimiters
732c583cf17c2fe2c6b991e14d250bfb0c717ba1Mark Offuttset JAVA_OPTS_SERVICE=%OPENIDM_OPTS_SERVICE%;-Djava.util.logging.config.file=conf\logging.properties;-Dlogback.configurationFile=conf\logging-config.xml;
98f2f99895b90678253d7e9c81ed0eea655e2d91Laszlo Hordosrem Enable debugging uncomment the line below
732c583cf17c2fe2c6b991e14d250bfb0c717ba1Mark Offuttrem set JAVA_OPTS_SERVICE=%JAVA_OPTS_SERVICE%;-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005;
98f2f99895b90678253d7e9c81ed0eea655e2d91Laszlo Hordos
98f2f99895b90678253d7e9c81ed0eea655e2d91Laszlo Hordoscall "%EXECUTABLE%" /install %CMD_LINE_ARGS%
98f2f99895b90678253d7e9c81ed0eea655e2d91Laszlo Hordosgoto :EOF
98f2f99895b90678253d7e9c81ed0eea655e2d91Laszlo Hordos
98f2f99895b90678253d7e9c81ed0eea655e2d91Laszlo Hordos:end
98f2f99895b90678253d7e9c81ed0eea655e2d91Laszlo Hordosexit /b 1