84N/A
84N/A@echo off
84N/Arem CDDL HEADER START
84N/Arem
84N/Arem The contents of this file are subject to the terms of the
84N/Arem Common Development and Distribution License, Version 1.0 only
84N/Arem (the "License"). You may not use this file except in compliance
84N/Arem with the License.
84N/Arem
84N/Arem You can obtain a copy of the license at
84N/Arem trunk/opends/resource/legal-notices/OpenDS.LICENSE
84N/Arem or https://OpenDS.dev.java.net/OpenDS.LICENSE.
84N/Arem See the License for the specific language governing permissions
84N/Arem and limitations under the License.
84N/Arem
84N/Arem When distributing Covered Code, include this CDDL HEADER in each
84N/Arem file and include the License file at
84N/Arem trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable,
84N/Arem add the following below this CDDL HEADER, with the fields enclosed
873N/Arem by brackets "[]" replaced with your own identifying information:
84N/Arem Portions Copyright [yyyy] [name of copyright owner]
84N/Arem
84N/Arem CDDL HEADER END
84N/Arem
84N/Arem
5072N/Arem Copyright 2006-2010 Sun Microsystems, Inc.
5728N/Arem Portions Copyright 2011-2012 ForgeRock AS
84N/A
84N/Asetlocal
84N/A
1895N/Arem check that the path does not contain the ^% character which breaks
1895N/Arem the batch files.
1920N/Afor %%i in (%~sf0) do set NON_ESCAPED=%%~dPsi..
1920N/A
1920N/A
1895N/AFOR /F "tokens=1-2* delims=%%" %%1 IN ("%NON_ESCAPED%") DO (
1895N/Aif NOT "%%2" == "" goto invalidPath)
1895N/A
1920N/Afor %%i in (%~sf0) do set DIR_HOME=%%~dPsi.
1920N/A
3824N/Aset INSTALL_ROOT=%DIR_HOME%
6302N/Aif "%INSTANCE_ROOT%" == "" (
6302N/A set INSTANCE_ROOT=%INSTALL_ROOT%
3824N/A)
6302N/A
5728N/Aset CUR_DIR=%CD%
3842N/Acd /d %INSTALL_ROOT%
6302N/Acd /d %INSTANCE_ROOT%
3824N/Aset INSTANCE_ROOT=%CD%
3842N/Acd /d %CUR_DIR%
84N/A
2976N/Aset SCRIPT_NAME=setup
2650N/A
2976N/Arem Set environment variables and test java
2976N/Aset SCRIPT_UTIL_CMD=set-full-environment-and-test-java
3824N/Acall "%INSTALL_ROOT%\lib\_script-util.bat"
2976N/Aif NOT %errorlevel% == 0 exit /B %errorlevel%
84N/A
2976N/Aif "%~1" == "" goto callLaunch
2976N/Agoto callJava
2650N/A
1895N/A:invalidPath
5612N/Aecho Error: The current path contains a %% character. OpenDJ cannot
1895N/Aecho be installed on a path containing this character.
1895N/Apause
1895N/Agoto end
1895N/A
2549N/A:callLaunch
5636N/A"%INSTALL_ROOT%\lib\winlauncher.exe" launch "%OPENDJ_JAVA_BIN%" %OPENDJ_JAVA_ARGS% %SCRIPT_NAME_ARG% org.opends.quicksetup.installer.SetupLauncher
2549N/Agoto end
2549N/A
2549N/A:callJava
5636N/A"%OPENDJ_JAVA_BIN%" %OPENDJ_JAVA_ARGS% %SCRIPT_NAME_ARG% org.opends.quicksetup.installer.SetupLauncher %*
1777N/A
1777N/Arem return part
1777N/Aif %errorlevel% == 50 goto version
5072N/Aif NOT %errorlevel% == 0 exit /B %errorlevel%
828N/Agoto end
84N/A
1777N/A:version
1777N/Arem version information was requested. Return code should be 0.
1777N/Aexit /B 0
1777N/A
84N/A:end