@echo off

rem   Licensed to the Apache Software Foundation (ASF) under one or more
rem   contributor license agreements.  See the NOTICE file distributed with
rem   this work for additional information regarding copyright ownership.
rem   The ASF licenses this file to You under the Apache License, Version 2.0
rem   (the "License"); you may not use this file except in compliance with
rem   the License.  You may obtain a copy of the License at
rem
rem       http://www.apache.org/licenses/LICENSE-2.0
rem
rem   Unless required by applicable law or agreed to in writing, software
rem   distributed under the License is distributed on an "AS IS" BASIS,
rem   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
rem   See the License for the specific language governing permissions and
rem   limitations under the License.

rem   =====================================================
rem   Environment variables that can be defined externally:
rem
rem   JMETER_BIN - JMeter bin directory (must end in \)
rem   JM_LAUNCH - java.exe (default) or javaw.exe
rem   JVM_ARGS - additional java options, e.g. -Dprop=val
rem   JM_START - set this to "start" to launch JMeter in a separate window
rem              this is used by the jmeterw.cmd script.
rem
rem   =====================================================

rem Minimal version to run JMeter
set MINIMAL_VERSION=1.6.0

for /f "tokens=3" %%g in ('java -version 2^>^&1 ^| findstr /i "version"') do (
    rem @echo Debug Output: %%g
    set JAVAVER=%%g
)
set JAVAVER=%JAVAVER:"=%
if not defined JAVAVER (
    @echo Not able to find Java executable or version. Please check your Java installation.
    set ERRORLEVEL=2-NO_JAVA
    goto pause
)
rem @echo JAVAVER %JAVAVER%
for /f "delims=. tokens=1-3" %%v in ("%JAVAVER%") do (
    set current_minor=%%w
)

for /f "delims=. tokens=1-3" %%v in ("%MINIMAL_VERSION%") do (
    set minimal_minor=%%w
)

if not defined current_minor (
    @echo Not able to find Java executable or version. Please check your Java installation.
    set ERRORLEVEL=2-NO_JAVA
    goto pause
)
rem @echo Debug: CURRENT=%current_minor% - MINIMAL=%minimal_minor%
if %current_minor% LSS %minimal_minor% (
    @echo Error: Java version is too lower to run JMeter. Needs at least Java greater or equal to %MINIMAL_VERSION%
    set ERRORLEVEL=3-JAVA_TOO_LOWER
    goto pause
)

if .%JM_LAUNCH% == . set JM_LAUNCH=java.exe

if not "%OS%"=="Windows_NT" goto win9xStart
:winNTStart
@setlocal

rem Need to check if we are using the 4NT shell...
if "%eval[2+2]" == "4" goto setup4NT

if exist jmeter.bat goto winNT1
if .%JMETER_BIN% == . set JMETER_BIN=%~dp0

:winNT1
rem On NT/2K grab all arguments at once
set JMETER_CMD_LINE_ARGS=%*
goto doneStart

:setup4NT
set JMETER_CMD_LINE_ARGS=%$
goto doneStart

:win9xStart
rem Slurp the command line arguments.  This loop allows for an unlimited number of
rem arguments (up to the command line limit, anyway).

set JMETER_CMD_LINE_ARGS=

:setupArgs
if %1a==a goto doneStart
set JMETER_CMD_LINE_ARGS=%JMETER_CMD_LINE_ARGS% %1
shift
goto setupArgs

:doneStart
rem This label provides a place for the argument list loop to break out
rem and for NT handling to skip to.

rem The following link describes the -XX options:
rem http://www.oracle.com/technetwork/java/javase/tech/vmoptions-jsp-140102.html
rem http://java.sun.com/developer/TechTips/2000/tt1222.html has some more descriptions
rem Unfortunately TechTips no longer seem to be available

rem See the unix startup file for the rationale of the following parameters,
rem including some tuning recommendations
set HEAP=-Xms512m -Xmx512m
set NEW=-XX:NewSize=128m -XX:MaxNewSize=128m
set SURVIVOR=-XX:SurvivorRatio=8 -XX:TargetSurvivorRatio=50%
set TENURING=-XX:MaxTenuringThreshold=2
rem Java 8 remove Permanent generation, don't settings the PermSize
if %current_minor% LEQ "8" (
    rem Increase MaxPermSize if you use a lot of Javascript in your Test Plan :
    set PERM=-XX:PermSize=64m -XX:MaxPermSize=128m
)

set CLASS_UNLOAD=-XX:+CMSClassUnloadingEnabled
rem set DEBUG=-verbose:gc -XX:+PrintTenuringDistribution

rem Always dump on OOM (does not cost anything unless triggered)
set DUMP=-XX:+HeapDumpOnOutOfMemoryError

rem Additional settings that might help improve GUI performance on some platforms
rem See: http://java.sun.com/products/java-media/2D/perf_graphics.html

set DDRAW=
rem  Setting this flag to true turns off DirectDraw usage, which sometimes helps to get rid of a lot of rendering problems on Win32.
rem set DDRAW=%DDRAW% -Dsun.java2d.noddraw=true

rem  Setting this flag to false turns off DirectDraw offscreen surfaces acceleration by forcing all createVolatileImage calls to become createImage calls, and disables hidden acceleration performed on surfaces created with createImage .
rem set DDRAW=%DDRAW% -Dsun.java2d.ddoffscreen=false

rem Setting this flag to true enables hardware-accelerated scaling.
rem set DDRAW=%DDRAW% -Dsun.java2d.ddscale=true

rem Server mode
rem Collect the settings defined above
set ARGS=%DUMP% %HEAP% %NEW% %SURVIVOR% %TENURING% %PERM% %CLASS_UNLOAD% %DDRAW%

%JM_START% %JM_LAUNCH% %ARGS% %JVM_ARGS% -jar "%JMETER_BIN%ApacheJMeter.jar" %JMETER_CMD_LINE_ARGS%

rem If the errorlevel is not zero, then display it and pause

if NOT errorlevel 0 goto pause
if errorlevel 1 goto pause

goto end

:pause
echo errorlevel=%ERRORLEVEL%
pause

:end

@echo off

rem   Licensed to the Apache Software Foundation (ASF) under one or more
rem   contributor license agreements.  See the NOTICE file distributed with
rem   this work for additional information regarding copyright ownership.
rem   The ASF licenses this file to You under the Apache License, Version 2.0
rem   (the "License"); you may not use this file except in compliance with
rem   the License.  You may obtain a copy of the License at
rem
rem       http://www.apache.org/licenses/LICENSE-2.0
rem
rem   Unless required by applicable law or agreed to in writing, software
rem   distributed under the License is distributed on an "AS IS" BASIS,
rem   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
rem   See the License for the specific language governing permissions and
rem   limitations under the License.

rem   =====================================================
rem   Environment variables that can be defined externally:
rem
rem   JMETER_BIN - JMeter bin directory (must end in \)
rem   JM_LAUNCH - java.exe (default) or javaw.exe
rem   JVM_ARGS - additional java options, e.g. -Dprop=val
rem   JM_START - set this to "start" to launch JMeter in a separate window
rem              this is used by the jmeterw.cmd script.
rem
rem   =====================================================

rem Minimal version to run JMeter
set MINIMAL_VERSION=1.6.0

for /f "tokens=3" %%g in ('java -version 2^>^&1 ^| findstr /i "version"') do (
    rem @echo Debug Output: %%g
    set JAVAVER=%%g
)
set JAVAVER=%JAVAVER:"=%
if not defined JAVAVER (
    @echo Not able to find Java executable or version. Please check your Java installation.
    set ERRORLEVEL=2
    goto pause
)
rem @echo JAVAVER %JAVAVER%
for /f "delims=. tokens=1-3" %%v in ("%JAVAVER%") do (
    set current_minor=%%w
)

for /f "delims=. tokens=1-3" %%v in ("%MINIMAL_VERSION%") do (
    set minimal_minor=%%w
)

if not defined current_minor (
    @echo Not able to find Java executable or version. Please check your Java installation.
    set ERRORLEVEL=2
    goto pause
)
rem @echo Debug: CURRENT=%current_minor% - MINIMAL=%minimal_minor%
if %current_minor% LSS %minimal_minor% (
    @echo Error: Java version -- %JAVAVER% -- is too low to run JMeter. Needs a Java version greater than or equal to %MINIMAL_VERSION%
    set ERRORLEVEL=3
    goto pause
)

if .%JM_LAUNCH% == . set JM_LAUNCH=java.exe

if not "%OS%"=="Windows_NT" goto win9xStart
:winNTStart
@setlocal

rem Need to check if we are using the 4NT shell...
if "%eval[2+2]" == "4" goto setup4NT

if exist jmeter.bat goto winNT1
if .%JMETER_BIN% == . set JMETER_BIN=%~dp0

:winNT1
rem On NT/2K grab all arguments at once
set JMETER_CMD_LINE_ARGS=%*
goto doneStart

:setup4NT
set JMETER_CMD_LINE_ARGS=%$
goto doneStart

:win9xStart
rem Slurp the command line arguments.  This loop allows for an unlimited number of
rem arguments (up to the command line limit, anyway).

set JMETER_CMD_LINE_ARGS=

:setupArgs
if %1a==a goto doneStart
set JMETER_CMD_LINE_ARGS=%JMETER_CMD_LINE_ARGS% %1
shift
goto setupArgs

:doneStart
rem This label provides a place for the argument list loop to break out
rem and for NT handling to skip to.

rem The following link describes the -XX options:
rem http://www.oracle.com/technetwork/java/javase/tech/vmoptions-jsp-140102.html
rem http://java.sun.com/developer/TechTips/2000/tt1222.html has some more descriptions
rem Unfortunately TechTips no longer seem to be available

rem See the unix startup file for the rationale of the following parameters,
rem including some tuning recommendations
set HEAP=-Xms512m -Xmx512m
set NEW=-XX:NewSize=128m -XX:MaxNewSize=128m
set SURVIVOR=-XX:SurvivorRatio=8 -XX:TargetSurvivorRatio=50%
set TENURING=-XX:MaxTenuringThreshold=2
rem Java 8 remove Permanent generation, don't settings the PermSize
if %current_minor% LEQ "8" (
    rem Increase MaxPermSize if you use a lot of Javascript in your Test Plan :
    set PERM=-XX:PermSize=64m -XX:MaxPermSize=128m
)

set CLASS_UNLOAD=-XX:+CMSClassUnloadingEnabled
rem set DEBUG=-verbose:gc -XX:+PrintTenuringDistribution

rem Always dump on OOM (does not cost anything unless triggered)
set DUMP=-XX:+HeapDumpOnOutOfMemoryError

rem Additional settings that might help improve GUI performance on some platforms
rem See: http://java.sun.com/products/java-media/2D/perf_graphics.html

set DDRAW=
rem  Setting this flag to true turns off DirectDraw usage, which sometimes helps to get rid of a lot of rendering problems on Win32.
rem set DDRAW=%DDRAW% -Dsun.java2d.noddraw=true

rem  Setting this flag to false turns off DirectDraw offscreen surfaces acceleration by forcing all createVolatileImage calls to become createImage calls, and disables hidden acceleration performed on surfaces created with createImage .
rem set DDRAW=%DDRAW% -Dsun.java2d.ddoffscreen=false

rem Setting this flag to true enables hardware-accelerated scaling.
rem set DDRAW=%DDRAW% -Dsun.java2d.ddscale=true

rem Server mode
rem Collect the settings defined above
set ARGS=%DUMP% %HEAP% %NEW% %SURVIVOR% %TENURING% %PERM% %CLASS_UNLOAD% %DDRAW%

%JM_START% %JM_LAUNCH% %ARGS% %JVM_ARGS% -jar "%JMETER_BIN%ApacheJMeter.jar" %JMETER_CMD_LINE_ARGS%

rem If the errorlevel is not zero, then display it and pause

if NOT errorlevel 0 goto pause
if errorlevel 1 goto pause

goto end

:pause
echo errorlevel=%ERRORLEVEL%
pause

:end

Fix errorlevel bugs; show detected version.

git-svn-id: 5ccfe34f605a6c2f9041ff2965ab60012c62539a@1589877 13f79535-47bb-0310-9956-ffa450edef68


cd ..\mongodb
rd mongodata 2>nul
md mongodata
start mongod.exe --dbpath mongodata --smallfiles
ping 1.1.1.111 -n 1 -w 2000 > nul

:: we run only debug tests cause release not working properly(appcrash)
:: because assert(expr) just removes expr and behavior changes
cd ..\bin\Win32\Debug
test-libmongoc.exe -p
if ERRORLEVEL 1 (
  set ret=%errorlevel%
  goto :ret
)

cd ..\..\x64\Debug
test-libmongoc.exe -p
if ERRORLEVEL 1 (
  set ret=%errorlevel%
  goto :ret
)

:ret

cd ..\..\..\build
taskkill /F /T /IM mongod.exe 2>nul
:: notice here we are always returning 0 to prevent the build to be broken and stop our test failures collector in Jenkins
exit /b 0

cd ..\mongodb
rd mongodata 2>nul
md mongodata
start mongod.exe --dbpath mongodata --smallfiles
ping 1.1.1.111 -n 1 -w 2000 > nul

:: we run only debug tests cause release not working properly(appcrash)
:: because assert(expr) just removes expr and behavior changes
cd ..\bin\Win32\Debug
:: TEST DISABLED UNTIL MONGO GUYS PROVIDE INSTRUCTIONS TO RUN THEM
::test-libmongoc.exe -p
if ERRORLEVEL 1 (
  set ret=%errorlevel%
  goto :ret
)

cd ..\..\x64\Debug
::test-libmongoc.exe -p
if ERRORLEVEL 1 (
  set ret=%errorlevel%
  goto :ret
)

:ret

cd ..\..\..\build
taskkill /F /T /IM mongod.exe 2>nul
:: notice here we are always returning 0 to prevent the build to be broken and stop our test failures collector in Jenkins
exit /b 0

Disable tests

Disable tests


echo off
rem Name:      make.bat
rem Purpose:   Batch file to run nmake
rem Author:    Anton van Wezenbeek
rem Copyright: (c) 2011 Anton van Wezenbeek

nmake -f makefile.vc WXWIN=c:\wxwidgets-2.9.2

echo off
rem Name:      make.bat
rem Purpose:   Batch file to run nmake
rem Author:    Anton van Wezenbeek
rem Copyright: (c) 2011 Anton van Wezenbeek

nmake -f makefile.vc WXWIN=c:\wxwidgets-2.9.3-rc1

use wxwidgets 2.9.3 release candidate

use wxwidgets 2.9.3 release candidate


"%WIX%\bin\heat.exe" dir "..\..\..\..\..\Java" -ag -sfrag -dr "APPLICATIONFOLDER" -cg JavaFilesGroup -var var.JavaPath -out ..\..\..\javaFiles.wxs
powershell -Command "(gc ..\..\..\javaFiles.wxs) -replace '<Component ', '<Component Win64=\"yes\" ' | Out-File ..\..\..\javaFiles.wxs" -encoding UTF8

Add a script to harvest the java files and create the wxs file


@echo off

setlocal EnableDelayedExpansion

rem Needed environmental variables:
rem PLAT: Windows platform-Win32 (i.e. x86) or x64 (i.e. x86-64)
rem CONF: Configuration Type, Release or Debug
rem VSVER: Visual C++ version used

rem Check the environemental variables...
if /i "%PLAT%" == "Win32" goto PLAT_OK
if /i "%PLAT%" == "x64" goto PLAT_OK
if /i "%PLAT%" == "x86" (
   set PLAT=Win32
   goto PLAT_OK
)
if /i "%PLAT%" == "x86-64" (
   set PLAT=x64
   goto PLAT_OK
)
goto ERR_PLAT

:PLAT_OK
if "%VSVER%" == "9" goto VSVER_OK
if "%VSVER%" == "10" goto VSVER_OK
if "%VSVER%" == "11" goto VSVER_OK
goto ERR_VSVER
:VSVER_OK
if /i "%CONF%" == "Release" goto CONF_OK
if /i "%CONF%" == "Debug" goto CONF_OK
goto ERR_CONF
:CONF_OK
if "%BASEDIR%" == "" goto ERR_BASEDIR
if not exist %BASEDIR% goto ERR_BASEDIR

if "%PKG_CONFIG_PATH%" == "" goto ERR_PKGCONFIG
if not exist %PKG_CONFIG_PATH%\gobject-2.0.pc goto ERR_PKGCONFIG

if "%MINGWDIR%" == "" goto ERR_MINGWDIR
if not exist %MINGWDIR%\bin\gcc.exe goto ERR_MINGWDIR

set CC=cl
set BINDIR=%CD%\vs%VSVER%\%CONF%\%PLAT%\bin
set INCLUDE=%BASEDIR%\include\glib-2.0;%BASEDIR%\lib\glib-2.0\include;%INCLUDE%
set LIB=%BINDIR%;%BASEDIR%\lib;%LIB%
set PATH=%BINDIR%;%BASEDIR%\bin;%PATH%;%MINGWDIR%\bin
set PYTHONPATH=%BASEDIR%\lib\gobject-introspection;%BINDIR%

echo Setup .bat for generating ATK .gir's...

rem =================================================================================================
rem Begin setup of atk_gir.bat to create Atk-1.0.gir
rem (The ^^ is necessary to span the command to multiple lines on Windows cmd.exe!)
rem =================================================================================================

echo echo Generating Atk-1.0.gir...> atk_gir.bat
echo @echo on>> atk_gir.bat
echo.>> atk_gir.bat
rem ================================================================
rem Setup the command line flags to g-ir-scanner for Atk-1.0.gir...
rem ================================================================
echo python %BASEDIR%\bin\g-ir-scanner --verbose -I..\.. --add-include-path=..\.. ^^>> atk_gir.bat
echo --namespace=Atk --nsversion=1.0 --include=GObject-2.0 ^^>> atk_gir.bat
echo --no-libtool --pkg=glib-2.0 --library=atk-1-vs%VSVER% ^^>> atk_gir.bat
echo --reparse-validate --add-include-path=%BASEDIR%\share\gir-1.0 ^^>> atk_gir.bat
echo  --pkg-export atk --warn-all --c-include "atk/atk.h" ^^>> atk_gir.bat
echo -I..\.. -DATK_DISABLE_DEPRECATED -DATK_COMPILATION -DATK_LOCALEDIR=\"/dummy/share/locale\" ^^>> atk_gir.bat
echo --filelist=atk_list ^^>> atk_gir.bat
echo -o Atk-1.0.gir>> atk_gir.bat
echo.>> atk_gir.bat

echo Completed setup of .bat for generating Atk-1.0.gir.
echo.>> atk_gir.bat

rem ===================================================
rem Finish setup of atk_gir.bat to create Atk-1.0.gir
rem ===================================================

rem =======================
rem Now generate the .gir's
rem =======================
CALL atk_gir.bat

rem Clean up the .bat for generating the .gir files...
del atk_gir.bat

rem Now compile the generated .gir files
%BASEDIR%\bin\g-ir-compiler --includedir=. --debug --verbose Atk-1.0.gir -o Atk-1.0.typelib

rem Copy the generated .girs and .typelibs to their appropriate places

mkdir ..\..\build\win32\vs%VSVER%\%CONF%\%PLAT%\share\gir-1.0
move /y *.gir %BASEDIR%\share\gir-1.0\

mkdir ..\..\build\win32\vs%VSVER%\%CONF%\%PLAT%\lib\girepository-1.0
move /y *.typelib %BASEDIR%\lib\girepository-1.0\

goto DONE

:ERR_PLAT
echo You need to specify a valid Platform [set PLAT=Win32 or PLAT=x64]
goto DONE
:ERR_VSVER
echo You need to specify your Visual Studio version [set VSVER=9 or VSVER=10 or VSVER=11]
goto DONE
:ERR_CONF
echo You need to specify a valid Configuration [set CONF=Release or CONF=Debug]
goto DONE
:ERR_BASEDIR
echo You need to specify a valid BASEDIR.
goto DONE
:ERR_PKGCONFIG
echo You need to specify a valid PKG_CONFIG_PATH
goto DONE
:ERR_MINGWDIR
echo You need to specify a valid MINGWDIR, where a valid gcc installation can be found.
goto DONE
:DONE

build: Add gengir.bat to build introspection for ATK.

This adds a Windows .bat file to build the introspection files for ATK,
which requires:
-An MSVC-built version of ATK
-A valid build of gobject-introspection, preferably done with MSVC.
-A MinGW GCC installation to run the pre-processor during the dumping
 stage*
-A Python installation
-Properly configured set of pkg-config (.pc) files for GLib and its deps.

This does not require a MSYS/Cygwin/BASH shell installed on the Windows
system

*Note that the generated and built dumper program is still compiled and
 linked with the Microsoft compiler.


@echo off
rem ----------------------------------------------------------------------------
rem
rem This variable should be set to the directory where is installed ProActive
rem

IF NOT DEFINED PA_SCHEDULER set PA_SCHEDULER=%CD%\..\..

rem ----------------------------------------------------------------------------

if NOT DEFINED JAVA_HOME goto javahome
if "%JAVA_HOME%" == "" goto javahome

rem ----
rem Set up the classpath using classes dir or jar files
rem

IF DEFINED CLASSPATHEXT (
	SET CLASSPATH=%CLASSPATHEXT%
) ELSE (
	SET CLASSPATH=.
)

rem Jars needed by the scheduler not included in the ProActive.jar jarindex
set ADD_JARS="client.jar derby.jar derbytools.jar isorelax.jar js.jar msv.jar ProActive_resource-manager.jar ProActive_scheduler.jar ProActive_tests.jar relaxngDatatype.jar rngpack-1.1a.jar script-api.jar script-js.jar xsdlib.jar"

rem Check if classes exists and is not empty
IF EXIST "%PA_SCHEDULER%\classes\scheduler" (
	SET CLASSPATH=%CLASSPATH%;%PA_SCHEDULER%\classes\resource-manager;%PA_SCHEDULER%\classes\scheduler
	SET JARS=%PA_SCHEDULER%\lib\
	FOR %%j IN ("%PA_SCHEDULER%\lib\*.jar") DO SET JARS=!JARS!;%%j
rem Use jar index to avoid 'command too long'
	SET JARS=!JARS!;%PA_SCHEDULER%\lib\ProActive\ProActive.jar
	FOR %%j IN ("%PA_SCHEDULER%\lib\common\*.jar") DO SET JARS=!JARS!;%%j
) ELSE (
	SET JARS=!JARS!;%PA_SCHEDULER%\dist\lib\ProActive.jar
	FOR %%j IN (%ADD_JARS%) DO SET JARS=!JARS!;%PA_SCHEDULER%\dist\lib\%%j
)

SET CLASSPATH=%CLASSPATH%;%JARS%

set JAVA_CMD="%JAVA_HOME%\bin\java.exe" -Dproactive.home="%PA_SCHEDULER%" -Dpa.scheduler.home="%PA_SCHEDULER%" -Dpa.rm.home="%PA_SCHEDULER%" -Djava.security.manager -Djava.security.policy="%PA_SCHEDULER%\config\scheduler.java.policy" -Dlog4j.configuration="%PA_SCHEDULER%/config/scheduler-log4j"

rem Adding java tools to the path
SET OK=1
FOR /F "delims=;" %%i IN ("%PATH%") DO (
IF /I "%%i" == "%JAVA_HOME%\bin" SET OK=0
)
IF /I %OK%==1 SET PATH=%JAVA_HOME%\bin;%PATH%

goto end

:javahome
echo.
echo The environment variable JAVA_HOME must be set the current jdk distribution
echo installed on your computer.
echo Use
echo    set JAVA_HOME=<the directory where is the JDK>
goto end

:end

@echo off
rem ----------------------------------------------------------------------------
rem
rem This variable should be set to the directory where is installed ProActive
rem

IF NOT DEFINED PA_SCHEDULER set PA_SCHEDULER=%CD%\..\..

rem ----------------------------------------------------------------------------

if NOT DEFINED JAVA_HOME goto javahome
if "%JAVA_HOME%" == "" goto javahome

rem ----
rem Set up the classpath using classes dir or jar files
rem

IF DEFINED CLASSPATHEXT (
	SET CLASSPATH=%CLASSPATHEXT%
) ELSE (
	SET CLASSPATH=.
)

rem Jars needed by the scheduler not included in the ProActive.jar jarindex
set ADD_JARS="client.jar derby.jar derbytools.jar isorelax.jar js.jar msv.jar ProActive_resource-manager.jar ProActive_scheduler.jar ProActive_tests.jar relaxngDatatype.jar rngpack-1.1a.jar script-api.jar script-js.jar xsdlib.jar"

rem Check if classes exists and is not empty
IF EXIST "%PA_SCHEDULER%\classes\scheduler" (
	SET CLASSPATH=%CLASSPATH%;%PA_SCHEDULER%\classes\resource-manager;%PA_SCHEDULER%\classes\scheduler
	SET JARS=%PA_SCHEDULER%\lib\
	FOR %%j IN ("%PA_SCHEDULER%\lib\*.jar") DO SET JARS=!JARS!;%%j
rem Use jar index to avoid 'command too long'
	SET JARS=!JARS!;%PA_SCHEDULER%\lib\ProActive\ProActive.jar
	FOR %%j IN ("%PA_SCHEDULER%\lib\common\*.jar") DO SET JARS=!JARS!;%%j
) ELSE (
	SET JARS=!JARS!;%PA_SCHEDULER%\dist\lib\ProActive.jar
	FOR %%j IN (%ADD_JARS%) DO SET JARS=!JARS!;%PA_SCHEDULER%\dist\lib\%%j
)

SET CLASSPATH=%CLASSPATH%;%JARS%

set JAVA_CMD="%JAVA_HOME%\bin\java.exe" -Dproactive.home="%PA_SCHEDULER%" -Dpa.scheduler.home="%PA_SCHEDULER%" -Dpa.rm.home="%PA_SCHEDULER%" -Djava.security.manager -Djava.security.policy="%PA_SCHEDULER%\config\scheduler.java.policy" -Dlog4j.configuration="file:///%PA_SCHEDULER%/config/scheduler-log4j"

rem Adding java tools to the path
SET OK=1
FOR /F "delims=;" %%i IN ("%PATH%") DO (
IF /I "%%i" == "%JAVA_HOME%\bin" SET OK=0
)
IF /I %OK%==1 SET PATH=%JAVA_HOME%\bin;%PATH%

goto end

:javahome
echo.
echo The environment variable JAVA_HOME must be set the current jdk distribution
echo installed on your computer.
echo Use
echo    set JAVA_HOME=<the directory where is the JDK>
goto end

:end

fix log4j file config url

fix log4j file config url

git-svn-id: 27916816d6cfa57849e9a885196bf7392b80e1ac@10096 28e8926c-6b08-0410-baaa-805c5e19b8d6


curl -sSf https://static.rust-lang.org/dist/rust-1.30.0-i686-pc-windows-msvc.exe -o rust.exe
rust.exe /VERYSILENT /NORESTART /DIR="C:\Rust"
set PATH=%PATH%;C:\Rust\bin

curl -sSf http://releases.llvm.org/%LLVM_VERSION%/LLVM-%LLVM_VERSION%-win32.exe -o LLVM.exe
7z x LLVM.exe -oC:\LLVM
set PATH=%PATH%;C:\LLVM\bin
set LIBCLANG_PATH=C:\LLVM\bin

curl -sSf https://static.rust-lang.org/dist/rust-1.36.0-i686-pc-windows-msvc.exe -o rust.exe
rust.exe /VERYSILENT /NORESTART /DIR="C:\Rust"
set PATH=%PATH%;C:\Rust\bin

curl -sSf http://releases.llvm.org/%LLVM_VERSION%/LLVM-%LLVM_VERSION%-win32.exe -o LLVM.exe
7z x LLVM.exe -oC:\LLVM
set PATH=%PATH%;C:\LLVM\bin
set LIBCLANG_PATH=C:\LLVM\bin

Update Appveyor CI

Update Appveyor CI


call %~dp0pg_env.bat

@echo.
@echo Initialising database cluster, deleting previous copy if it exists, at:
@echo   %pg_data%
@echo.

rmdir %pg_data% /s /q
mkdir %pg_data%
:: Doesn't accept PGPASSWORD but can be given a file containing the password.
initdb -D %pg_data% -U postgres -A md5 -E UTF-8 --pwfile=%~dp0.pgpass

@echo.
@echo Finished initialising database cluster.
@echo.
@echo Starting up and loading JUNO database into the cluster.
@echo.

pg_ctl start -w -l %pg_data%\test_log.txt
psql -d postgres -c "DROP DATABASE IF EXISTS openclinica;"
psql -d postgres -c "CREATE DATABASE openclinica;"
psql -d openclinica -f %~dp0demo_dbs\juno_openclinica.backup

@echo.
@echo Finished loading JUNO.
@echo.
@echo Building DataMart database.
@echo.

:: These are setup steps from the "Basic" instructions.
@SET pg_database_old=%PGDATABASE%
@SET PGDATABASE=openclinica
psql -c "CREATE ROLE openclinica_select NOSUPERUSER INHERIT NOCREATEDB NOCREATEROLE;"
psql -c "GRANT CONNECT ON DATABASE openclinica to openclinica_select;
psql -c "GRANT USAGE ON SCHEMA public to openclinica_select;"
psql -c "GRANT SELECT ON ALL TABLES IN SCHEMA public to openclinica_select;"
@SET PGDATABASE=%pg_database_old%
call setup_sqldatamart.bat

@echo.
@echo Finished building DataMart.
@echo.
@echo Exporting JUNO schema to a backup file for diffing.
@echo.

:: Copies the tables and views from the schema as tables.
@SET target_schema_name=the_juno_diabetes_study
@SET export_views_in_schema=TRUE
@SET target_schema_name_alias=%target_schema_name%_t
@SET export_func=openclinica_fdw.dm_copy_schema_to_tables_for_export
@SET test_output_path=%~dp0test_output
@SET export_file_path=%test_output_path%\%target_schema_name%.backup
@SET pg_database_old=%PGDATABASE%
@SET PGDATABASE=openclinica_fdw_db

del /F /Q %export_file_path%

psql -f %~dp0util_dm_copy_schema_to_tables_for_export.sql
psql -c "SELECT %export_func%($s$%target_schema_name%$s$);" -P pager
pg_dump -w -O -x -F c -f %export_file_path% -n %target_schema_name_alias%
psql -c "DROP SCHEMA %target_schema_name_alias% CASCADE;" -P pager
psql -c "DROP FUNCTION %export_func%(text, text, boolean);" -P pager
psql -d postgres -c "DROP DATABASE IF EXISTS %target_schema_name%;"
psql -d postgres -c "CREATE DATABASE %target_schema_name%;"

@SET PGDATABASE=%target_schema_name%
pg_restore -d %target_schema_name% %export_file_path%
psql -c "ALTER SCHEMA %target_schema_name_alias% RENAME TO %target_schema_name%" -P pager
pg_dump -w -O -x -F p -f %export_file_path% -n %target_schema_name%
@SET PGDATABASE=%pg_database_old%
psql -d postgres -c "DROP DATABASE IF EXISTS %target_schema_name%;"

@echo.
@echo While this console is open, the server will be running at %PGHOST% %PGPORT%
@echo.
@echo Connect with: call pg_env.bat ^& psql -d openclinica_fdw_db
@echo - List JUNO matviews: \pset pager off \dm the_juno_diabetes_study.*
@echo - Or use the kdiff script to inspect differences.
@echo - View PostgreSQL log file at: %pg_data%\test_log.txt
@echo.

pause

call %~dp0pg_env.bat

@echo.
@echo Initialising database cluster, deleting previous copy if it exists, at:
@echo   %pg_data%
@echo.

rmdir %pg_data% /s /q
mkdir %pg_data%
:: Doesn't accept PGPASSWORD but can be given a file containing the password.
initdb -D %pg_data% -U postgres -A md5 -E UTF-8 --pwfile=%~dp0.pgpass

@echo.
@echo Finished initialising database cluster.
@echo.
@echo Starting up and loading JUNO database into the cluster.
@echo.

pg_ctl start -w -l %pg_data%\test_log.txt
psql -d postgres -c "DROP DATABASE IF EXISTS openclinica;"
psql -d postgres -c "CREATE DATABASE openclinica;"
psql -d openclinica -f %~dp0demo_dbs\juno_openclinica.backup

@echo.
@echo Finished loading JUNO.
@echo.
@echo Building DataMart database.
@echo.

:: These are setup steps from the "Basic" instructions.
@SET pg_database_old=%PGDATABASE%
@SET PGDATABASE=openclinica
psql -c "CREATE ROLE openclinica_select NOSUPERUSER INHERIT NOCREATEDB NOCREATEROLE;"
psql -c "GRANT CONNECT ON DATABASE openclinica to openclinica_select;
psql -c "GRANT USAGE ON SCHEMA public to openclinica_select;"
psql -c "GRANT SELECT ON ALL TABLES IN SCHEMA public to openclinica_select;"
@SET PGDATABASE=%pg_database_old%
call setup_sqldatamart.bat

@echo.
@echo Finished building DataMart.
@echo.
@echo Exporting JUNO schema to a backup file for diffing.
@echo.

:: Copies the tables and views from the schema as tables.
@SET target_schema_name=the_juno_diabetes_study
@SET export_views_in_schema=TRUE
@SET target_schema_name_alias=%target_schema_name%_t
@SET export_func=openclinica_fdw.dm_copy_schema_to_tables_for_export
@SET test_output_path=%~dp0test_output
@SET export_file_path=%test_output_path%\%target_schema_name%.backup
@SET pg_database_old=%PGDATABASE%
@SET PGDATABASE=openclinica_fdw_db

if not exist %test_output_path% mkdir %test_output_path%
if exist %export_file_path% del /F /Q %export_file_path%

psql -f %~dp0util_dm_copy_schema_to_tables_for_export.sql
psql -c "SELECT %export_func%($s$%target_schema_name%$s$);" -P pager
pg_dump -w -O -x -F c -f %export_file_path% -n %target_schema_name_alias%
psql -c "DROP SCHEMA %target_schema_name_alias% CASCADE;" -P pager
psql -c "DROP FUNCTION %export_func%(text, text, boolean);" -P pager
psql -d postgres -c "DROP DATABASE IF EXISTS %target_schema_name%;"
psql -d postgres -c "CREATE DATABASE %target_schema_name%;"

@SET PGDATABASE=%target_schema_name%
pg_restore -d %target_schema_name% %export_file_path%
psql -c "ALTER SCHEMA %target_schema_name_alias% RENAME TO %target_schema_name%" -P pager
pg_dump -w -O -x -F p -f %export_file_path% -n %target_schema_name%
@SET PGDATABASE=%pg_database_old%
psql -d postgres -c "DROP DATABASE IF EXISTS %target_schema_name%;"

@echo.
@echo While this console is open, the server will be running at %PGHOST% %PGPORT%
@echo.
@echo Connect with: call pg_env.bat ^& psql -d openclinica_fdw_db
@echo - List JUNO matviews: \pset pager off \dm the_juno_diabetes_study.*
@echo - Or use the kdiff script to inspect differences.
@echo - View PostgreSQL log file at: %pg_data%\test_log.txt
@echo.

pause

fix: create test output folder if it doesn't exist already

if the folder didn't exist, the step for creating a db_dump will fail.


@echo off
setlocal enabledelayedexpansion

pushd %1

set attempts=5
set counter=0

:retry
set /a counter+=1
echo Attempt %counter% out of %attempts%

cmd /c npm install https://github.com/projectkudu/KuduScript/tarball/99816ade95addbfa6cfae7d74b7b616e2eebf772
IF %ERRORLEVEL% NEQ 0 goto error

goto end

:error
if %counter% GEQ %attempts% goto :lastError
goto retry

:lastError
popd
echo An error has occured during npm install.
exit /b 1

:end
popd
echo Finished successfully.
exit /b 0

@echo off
setlocal enabledelayedexpansion

pushd %1

set attempts=5
set counter=0

:retry
set /a counter+=1
echo Attempt %counter% out of %attempts%

cmd /c npm install https://github.com/projectkudu/KuduScript/tarball/3bf82c59679bd6539651cf5751246f34e6fd6a56
IF %ERRORLEVEL% NEQ 0 goto error

goto end

:error
if %counter% GEQ %attempts% goto :lastError
goto retry

:lastError
popd
echo An error has occured during npm install.
exit /b 1

:end
popd
echo Finished successfully.
exit /b 0

Allow Verbose output from Deployment Script Fixes #624


nuget pack

nuget push FSharp.Data.1.0.6.nupkg

nuget pack

nuget push FSharp.Data.1.0.8.nupkg

Update publish script

Update publish script


@echo off
REM This is an example script to run ExtractSubcatchmentResults.py and
REM adap2shp.py in order to produce a shapefile of SWMM subcatchment
REM simulation results.
REM Syntax:
REM 	python ExtractSubcatchmentResults.py [INFILE.wkt] [INFILE.rpt] [OUTFILE.wkt]
REM 	python adap2shp.py [INFILE_subcatchments.asc] [INFILE.wkt] [OUTFILE.shp] 'epsg:XXXX'

REM Activate conda environment (with necessary packages installed)
REM (here called 'gistoswmm5')
call activate gistoswmm5

REM Example of running ExtractSubcatchmentResults.py
REM '^' is used only to split long lines here
python "../utils/ExtractSubcatchmentResults.py"^
 "../demo_catchment/out/SWMM_in/demo_catchment_adap_subcatchments_attr.wkt"^
 "../demo_catchment/out/SWMM_out/demo_catchment_adap.rpt"^
 "../demo_catchment/out/SWMM_results/demo_catchment_adap_subcatchment_runoffs.wkt"

REM Example of running adap2shp.py
REM '^' is used only to split long lines here
python "../utils/adap2shp.py"^
 "../demo_catchment/out/SWMM_in/demo_catchment_adap_subcatchments.asc"^
 "../demo_catchment/out/SWMM_results/demo_catchment_adap_subcatchment_runoffs.wkt"^
 "../demo_catchment/out/SWMM_results/demo_catchment_adap_subcatchment_runoffs.shp"^
 "epsg:3879"

REM Deactivate conda environment
call deactivate

REM Wait for user input before closing terminal
pause

@echo off
REM This is an example script to run ExtractSubcatchmentResults.py and
REM adap2shp.py in order to produce a shapefile of SWMM subcatchment
REM simulation results.
REM Syntax:
REM 	python ExtractSubcatchmentResults.py [INFILE.wkt] [INFILE.rpt] [OUTFILE.wkt]
REM 	python adap2shp.py [INFILE_subcatchments.asc] [INFILE.wkt] [OUTFILE.shp] 'epsg:XXXX'

REM Activate conda environment (with necessary packages installed)
REM (here called 'gistoswmm5')
call conda activate gistoswmm5

REM Example of running ExtractSubcatchmentResults.py
REM '^' is used only to split long lines here
python "../utils/ExtractSubcatchmentResults.py"^
 "../demo_catchment/out/SWMM_in/demo_catchment_adap_subcatchments_attr.wkt"^
 "../demo_catchment/out/SWMM_out/demo_catchment_adap.rpt"^
 "../demo_catchment/out/SWMM_results/demo_catchment_adap_subcatchment_runoffs.wkt"

REM Example of running adap2shp.py
REM '^' is used only to split long lines here
python "../utils/adap2shp.py"^
 "../demo_catchment/out/SWMM_in/demo_catchment_adap_subcatchments.asc"^
 "../demo_catchment/out/SWMM_results/demo_catchment_adap_subcatchment_runoffs.wkt"^
 "../demo_catchment/out/SWMM_results/demo_catchment_adap_subcatchment_runoffs.shp"^
 "epsg:3879"

REM Deactivate conda environment
call conda deactivate

REM Wait for user input before closing terminal
pause

Replace run_ExtractSubcatchmentResults.bat


@echo off

rmdir /s /q "%USERPROFILE%/zpm-cache" 2>NUL
rmdir /s /q "%USERPROFILE%/zpm-install" 2>NUL

mkdir "%USERPROFILE%/zpm-install"
cd "%USERPROFILE%/zpm-install"

if exist "premake5.zip" del /q "premake5.zip"

if defined GH_TOKEN (
    powershell -command "Invoke-WebRequest -Uri https://github.com/premake/premake-core/releases/download/v5.0.0-alpha11/premake-5.0.0-alpha11-windows.zip -OutFile premake5.zip -Headers @{'Authorization'='token %GH_TOKEN%'}"
) else (
    powershell -command "Invoke-WebRequest -Uri https://github.com/premake/premake-core/releases/download/v5.0.0-alpha11/premake-5.0.0-alpha11-windows.zip -OutFile premake5.zip"
)
echo Finished downloading premake...

powershell -command "Expand-Archive premake5.zip -DestinationPath ."

git clone https://github.com/Zefiros-Software/ZPM.git ./zpm

echo Finished cloning ZPM...

if defined GH_TOKEN (
    premake5.exe --github-token=%GH_TOKEN% --file=zpm/zpm.lua install-zpm
) else (
    premake5.exe --file=zpm/zpm.lua install-zpm
)

rmdir /s /q "%USERPROFILE%/zpm-install"

echo ZPM is installed, however a restart is required!

if defined APPVEYOR (
    @powershell -NoProfile -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin"
    choco install git.install
)

@echo off
setlocal
rmdir /s /q "%USERPROFILE%/zpm-cache" 2>NUL
rmdir /s /q "%USERPROFILE%/zpm-install" 2>NUL

mkdir "%USERPROFILE%/zpm-install"
cd "%USERPROFILE%/zpm-install"

if exist "premake5.zip" del /q "premake5.zip"

if defined GH_TOKEN (
    powershell -command "Invoke-WebRequest -Uri https://github.com/premake/premake-core/releases/download/v5.0.0-alpha11/premake-5.0.0-alpha11-windows.zip -OutFile premake5.zip -Headers @{'Authorization'='token %GH_TOKEN%'}"
) else (
    powershell -command "Invoke-WebRequest -Uri https://github.com/premake/premake-core/releases/download/v5.0.0-alpha11/premake-5.0.0-alpha11-windows.zip -OutFile premake5.zip"
)
echo Finished downloading premake...

powershell -command "Expand-Archive premake5.zip -DestinationPath ."

git clone https://github.com/Zefiros-Software/ZPM.git ./zpm

echo Finished cloning ZPM...

if defined GH_TOKEN (
    premake5.exe --github-token=%GH_TOKEN% --file=zpm/zpm.lua install-zpm
) else (
    premake5.exe --file=zpm/zpm.lua install-zpm
)

rmdir /s /q "%USERPROFILE%/zpm-install"

echo ZPM is installed, however a restart is required!

if defined APPVEYOR (
    @powershell -NoProfile -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin"
    choco install git.install
)

Update install-zpm.bat

Update install-zpm.bat


call mvn package
jpackage --input .\target\ --main-jar mtg-workstation-%1.jar --name mtg-workstation --win-dir-chooser --win-menu --win-shortcut --icon src\main\resources\icon\icon.ico --app-version %1

Add script to generate installer

Add script to generate installer


@echo off
setlocal
call :Main "%~f0" "%~dp0" "%~dp0.."
goto :eof

:Main
set script_path=%~f1
set script_dir=%~f2
set repo_dir=%~f3
set build_dir=%repo_dir%\_build

if exist "%build_dir%" (
    rd /s /q "%build_dir%"
)

mkdir "%build_dir%"
cd /d "%build_dir%"
cmake -G "Visual Studio 14 2015 Win64" ..

Create batch file for Windows

Create batch file for Windows


@echo off
REM *************************GO-LICENSE-START********************************
REM Copyright 2014 ThoughtWorks, Inc.
REM
REM Licensed under the Apache License, Version 2.0 (the "License");
REM you may not use this file except in compliance with the License.
REM You may obtain a copy of the License at
REM
REM    http://www.apache.org/licenses/LICENSE-2.0
REM
REM Unless required by applicable law or agreed to in writing, software
REM distributed under the License is distributed on an "AS IS" BASIS,
REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
REM See the License for the specific language governing permissions and
REM limitations under the License.
REM *************************GO-LICENSE-END**********************************

REM ######################SETUP SCRIPT ############################
REM   Set up the script before running the gauge tests
REM
REM
REM ##############################################################

echo extract the server and agent
UNZIP -o target/zip/go-server*.zip -d target
UNZIP -o target/zip/go-agent*.zip -d target
REGEDIT /S /C WindowsSupport/ie-securitysettings.reg

echo copying the test addon
rmdir /s /q target\go-server-%GO_VERSION%\addons
mkdir target\go-server-%GO_VERSION%\addons
copy target\test-addon\test-addon-*.jar target\go-server-%GO_VERSION%\addons
dir target\go-server-%GO_VERSION%\addons

echo copying the example plugins, except yum repo poller, because it is bundled
del target\go-plugins-dist\yum-repo-exec-poller.jar
mkdir target\go-server-%GO_VERSION%\plugins\external
copy target\go-plugins-dist\*.jar target\go-server-%GO_VERSION%\plugins\external

echo  modify twist properties
ren src\\test\\java\\twist.properties twist.firefox.properties
ren src\\test\\java\\twist.win.properties twist.properties

echo Done
exit %errorlevel%

@echo off
REM *************************GO-LICENSE-START********************************
REM Copyright 2014 ThoughtWorks, Inc.
REM
REM Licensed under the Apache License, Version 2.0 (the "License");
REM you may not use this file except in compliance with the License.
REM You may obtain a copy of the License at
REM
REM    http://www.apache.org/licenses/LICENSE-2.0
REM
REM Unless required by applicable law or agreed to in writing, software
REM distributed under the License is distributed on an "AS IS" BASIS,
REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
REM See the License for the specific language governing permissions and
REM limitations under the License.
REM *************************GO-LICENSE-END**********************************

REM ######################SETUP SCRIPT ############################
REM   Set up the script before running the gauge tests
REM
REM
REM ##############################################################

echo extract the server and agent
UNZIP -o target/zip/go-server*.zip -d target
UNZIP -o target/zip/go-agent*.zip -d target
REGEDIT /S /C WindowsSupport/ie-securitysettings.reg

echo copying the test addon
rmdir /s /q target\go-server-%GO_VERSION%\addons
mkdir target\go-server-%GO_VERSION%\addons
copy target\test-addon\test-addon-*.jar target\go-server-%GO_VERSION%\addons
dir target\go-server-%GO_VERSION%\addons

echo copying the example plugins, except yum repo poller, because it is bundled
mkdir target\go-server-%GO_VERSION%\plugins\external
copy target\go-plugins-dist\*.jar target\go-server-%GO_VERSION%\plugins\external

echo  modify twist properties
ren src\\test\\java\\twist.properties twist.firefox.properties
ren src\\test\\java\\twist.win.properties twist.properties

echo Done
exit %errorlevel%

Fix specs

Fix specs


git add -A
git commit -m "......39"
git push origin master
echo "done"
echo "dakmaz done"

Update calis.bat

Update calis.bat

dakmaz done olsun


@echo off

setlocal

@echo Installing "CryptoARM Local CA" certificate
certutil -addstore -user root %~dp0\root.pem

REM ####Current user
setlocal ENABLEDELAYEDEXPANSION
set certpath=%~dp0root.pem
set certName=CryptoARM Local CA

FOR /D %%P IN ("%appdata%\Mozilla\Firefox\Profiles\*") DO (
"%~dp0certutil\win32\certutil.exe" -D -n "!certName!" -d sql:"%%P"
"%~dp0certutil\win32\certutil.exe" -D -n "!certName!" -d dbm:"%%P"

"%~dp0certutil\win32\certutil.exe" -A -n "!certName!" -i "%certpath%" -t "C,c,c", -d sql:"%%P"
"%~dp0certutil\win32\certutil.exe" -A -n "!certName!" -i "%certpath%" -t "C,c,c", -d dbm:"%%P"
)
setlocal DISABLEDELAYEDEXPANSION

REM #### eof
exit /B 0

@echo off

setlocal

@echo Installing "CryptoARM Local CA" certificate
certutil -addstore -user root "%~dp0\root.pem"

REM ####Current user
setlocal ENABLEDELAYEDEXPANSION
set certpath=%~dp0root.pem
set certName=CryptoARM Local CA

FOR /D %%P IN ("%appdata%\Mozilla\Firefox\Profiles\*") DO (
"%~dp0certutil\win32\certutil.exe" -D -n "!certName!" -d sql:"%%P"
"%~dp0certutil\win32\certutil.exe" -D -n "!certName!" -d dbm:"%%P"

"%~dp0certutil\win32\certutil.exe" -A -n "!certName!" -i "%certpath%" -t "C,c,c", -d sql:"%%P"
"%~dp0certutil\win32\certutil.exe" -A -n "!certName!" -i "%certpath%" -t "C,c,c", -d dbm:"%%P"
)
setlocal DISABLEDELAYEDEXPANSION

REM #### eof
exit /B 0

fix comand

fix comand


CALL procdump -ma CESService7.exe c:\ProcDumpFiles

CALL procdump -ma CESCustomCrawlers7.exe c:\ProcDumpFiles

CALL procdump -ma CESConverter7.exe c:\ProcDumpFiles

CALL msg * "Please contact Coveo support, Too much memory is used by the service.""

DEL "%~f0"

REM Line 11 is to make sure the script deletes itself after beign executed to avoid multiple Dumps

Update ScriptThatDontKillCes.bat

Update ScriptThatDontKillCes.bat

added a command to delete the script after his execution


@echo off
:: Windows SDK for Windows 7 (7.0) should be installed first.
:: And the "%VS90COMNTOOLS%" enviornment variable should be set correctly.
:: NOTE: For Python 3.3, MSVC 10 is required for building.

:: Configuration
set PYTHON26_X86="F:\Langs\Python26\python.exe"
set PYTHON26_X64="F:\Langs\Python26_x64\python.exe"
set PYTHON33_X86="F:\Langs\Python33\python.exe"
set PYTHON33_X64="F:\Langs\Python33_x64\python.exe"

:: Clean
:: if exist pyastyle\build rmdir /s /q pyastyle\build > NUL

call :buildExtension %PYTHON26_X86%
call :buildExtension %PYTHON26_X64%
call :buildExtension %PYTHON33_X86%
call :buildExtension %PYTHON33_X64%
goto done

:buildExtension

setlocal

if not exist %~1 (
    echo Python executable "%~1" cannot be found.
    goto buildExtensionReturn
)

set PY_PRINT_VERSION=%~1 -c "import sys;print('.'.join(map(lambda x: str(x), sys.version_info[:2])))"
set PY_PRINT_32OR64=%~1 -c "import struct;print(8 * struct.calcsize('P'))"
for /f "tokens=*" %%i in ('%PY_PRINT_VERSION%') do set PY_VERSION=%%i
for /f "tokens=*" %%i in ('%PY_PRINT_32OR64%') do set PY_32OR64=%%i

if "%PY_32OR64%" == "32" (
    set PY_BUILD_ARCH=32
)

if "%PY_32OR64%" == "64" (
    set PY_BUILD_ARCH=-amd64
)

set PY_VERSION_OK=0
set MSSdk=
set DISTUTILS_USE_SDK=

if "%PY_VERSION%" == "2.6" (
    set PY_VERSION_OK=1
    set PY_VERSION_MAJOR=2

    set MSSdk=1
    set DISTUTILS_USE_SDK=1

    if "%PY_32OR64%" == "32" (
        call "%VS90COMNTOOLS%\vcvars32.bat"
    )

    if "%PY_32OR64%" == "64" (
        call "%VS90COMNTOOLS%\vcvars64.bat"
    )
)

if "%PY_VERSION%" == "3.3" (
    set PY_VERSION_OK=1
    set PY_VERSION_MAJOR=3
)

if "%PY_VERSION_OK%" == "0" (
    echo "Invalid python version: %PY_VERSION%"
    goto buildExtensionReturn
)

set OUTPUT_FILE=pyastyle\build\lib.win%PY_BUILD_ARCH%-%PY_VERSION%\pyastyle.pyd
set TARGET_DIR=..\pyastyle\python%PY_VERSION_MAJOR%\_win%PY_32OR64%\

cd pyastyle
:: Compilation
%~1 setup.py build --compiler=msvc
cd ..

if not exist %TARGET_DIR% mkdir %TARGET_DIR%
copy /y %OUTPUT_FILE% %TARGET_DIR%
echo "Finished building extension for Python %PY_VERSION% (%PY_32OR64%bit)"

:buildExtensionReturn
endlocal
goto :eof

:done

@echo off
:: Windows SDK for Windows 7 (7.0) should be installed first.
:: And the "%VS90COMNTOOLS%" enviornment variable should be set correctly.
:: NOTE: For Python 3.3, MSVC 10 is required for building.

:: Configuration
set PYTHON26_X86="F:\Langs\Python26\python.exe"
set PYTHON26_X64="F:\Langs\Python26_x64\python.exe"
set PYTHON33_X86="F:\Langs\Python33\python.exe"
set PYTHON33_X64="F:\Langs\Python33_x64\python.exe"

:: Clean
:: if exist pyastyle\build rmdir /s /q pyastyle\build > NUL

call :buildExtension %PYTHON26_X86%
call :buildExtension %PYTHON26_X64%
call :buildExtension %PYTHON33_X86%
call :buildExtension %PYTHON33_X64%
goto done

:buildExtension

setlocal

if not exist %~1 (
    echo Python executable "%~1" cannot be found.
    goto buildExtensionReturn
)

set PY_PRINT_VERSION=%~1 -c "import sys;print('.'.join(map(lambda x: str(x), sys.version_info[:2])))"
set PY_PRINT_32OR64=%~1 -c "import struct;print(8 * struct.calcsize('P'))"
for /f "tokens=*" %%i in ('%PY_PRINT_VERSION%') do set PY_VERSION=%%i
for /f "tokens=*" %%i in ('%PY_PRINT_32OR64%') do set PY_32OR64=%%i

if "%PY_32OR64%" == "32" (
    set PY_BUILD_ARCH=32
)

if "%PY_32OR64%" == "64" (
    set PY_BUILD_ARCH=-amd64
)

set PY_VERSION_OK=0
set MSSdk=
set DISTUTILS_USE_SDK=

if "%PY_VERSION%" == "2.6" (
    set PY_VERSION_OK=1
    set PY_VERSION_MAJOR=2

    set MSSdk=1
    set DISTUTILS_USE_SDK=1

    if "%PY_32OR64%" == "32" (
        call "%VS90COMNTOOLS%\vcvars32.bat"
    )

    if "%PY_32OR64%" == "64" (
        call "%VS90COMNTOOLS%\vcvars64.bat"
    )
)

if "%PY_VERSION%" == "3.3" (
    set PY_VERSION_OK=1
    set PY_VERSION_MAJOR=3
)

if "%PY_VERSION_OK%" == "0" (
    echo "Invalid python version: %PY_VERSION%"
    goto buildExtensionReturn
)

set OUTPUT_FILE=pyastyle\build\lib.win%PY_BUILD_ARCH%-%PY_VERSION%\pyastyle.pyd
set TARGET_DIR=..\pyastyle\python%PY_VERSION_MAJOR%\_win%PY_32OR64%\

cd pyastyle
:: Compilation
%~1 setup.py build --compiler=msvc
cd ..

if not exist %TARGET_DIR% mkdir %TARGET_DIR%
copy /y %OUTPUT_FILE% %TARGET_DIR%
echo Finished building extension for Python %PY_VERSION% (%PY_32OR64%bit)
echo.

:buildExtensionReturn
endlocal
goto :eof

:done

Fix build script echo command

Fix build script echo command


@if "%_echo%" neq "on" echo off
setlocal EnableDelayedExpansion

if /I [%1] == [-?] goto Usage

echo Stop VBCSCompiler.exe execution.
for /f "tokens=2 delims=," %%F in ('tasklist /nh /fi "imagename eq VBCSCompiler.exe" /fo csv') do taskkill /f /PID %%~F

if [%1] == [-all] (
  echo Cleaning entire working directory ...
  call git clean -xdf
  exit /b !ERRORLEVEL!
)

call %~dp0run.cmd clean %*
exit /b %ERRORLEVEL%

:Usage
echo.
echo Repository cleaning script.
echo.
echo Options:
echo     -b     - Deletes the binary output directory.
echo     -p     - Deletes the repo-local nuget package directory.
echo     -c     - Deletes the user-local nuget package cache.
echo     -all   - Combines all of the above.
echo.
echo If no option is specified then clean.cmd -b is implied.

exit /b 1

@if "%_echo%" neq "on" echo off
setlocal EnableDelayedExpansion

if /I [%1] == [-?] goto Usage

echo Stop VBCSCompiler.exe execution.
for /f "tokens=2 delims=," %%F in ('tasklist /nh /fi "imagename eq VBCSCompiler.exe" /fo csv') do taskkill /f /PID %%~F

if [%1] == [-all] (
  echo Cleaning entire working directory ...
  call git clean -xdf
  exit /b !ERRORLEVEL!
)

if [%1]==[] set __args=-b
call %~dp0run.cmd clean %__args% %*
exit /b %ERRORLEVEL%

:Usage
echo.
echo Repository cleaning script.
echo.
echo Options:
echo     -b     - Deletes the binary output directory.
echo     -p     - Deletes the repo-local nuget package directory.
echo     -c     - Deletes the user-local nuget package cache.
echo     -all   - Combines all of the above.
echo.
echo If no option is specified then clean.cmd -b is implied.

exit /b 1

fix clean.cmd when no option is provided (#893)


@echo off
pushd "%~dp0"
for %%i in (Debug Release) do "%SystemRoot%\Microsoft.NET\Framework\v4.0.30319\msbuild" /target:Clean /p:Configuration=%%i src\NCrontab.sln
popd

Clean script can simply delegate to build script


:: make python default
ftype pyfile=C:\Python36-x64\python.exe "%%1"
assoc .py=pyfile

:: install qpm
powershell -Command "Invoke-WebRequest https://storage.googleapis.com/www.qpm.io/download/latest/windows_amd64/qpm.exe -OutFile C:\projects\qpm.exe"

:: install qpmx
choco install qpmx %EXTRA_PKG%

:: except winrt -> qtifw
echo %PLATFORM% | findstr /C:"winrt" > nul || (
	set EXTRA_MODULES=qt.tools.ifw.30;%EXTRA_MODULES%
)

:: prepare installer script
echo qtVersion = "%QT_VER%"; > %~dp0\tmp.qs
powershell -File %~dp0\replace.ps1 %~dp0\tmp.qs %~dp0\qt-installer-script.qs

if "%IS_LTS%" == "true" (
	echo prefix = "qt."; >> %~dp0\qt-installer-script.qs
) else (
	echo prefix = "qt.qt5."; >> %~dp0\qt-installer-script.qs
)

if "%PLATFORM%" == "msvc2017_64" set PACKAGE=win64_msvc2017_64
if "%PLATFORM%" == "winrt_x64_msvc2017" set PACKAGE=win64_msvc2017_winrt_x64
if "%PLATFORM%" == "winrt_x86_msvc2017" set PACKAGE=win64_msvc2017_winrt_x86
if "%PLATFORM%" == "winrt_armv7_msvc2017" set PACKAGE=win64_msvc2017_winrt_armv7
if "%PLATFORM%" == "msvc2015_64" set PACKAGE=win64_msvc2015_64
if "%PLATFORM%" == "msvc2015" set PACKAGE=win32_msvc2015
if "%PLATFORM%" == "mingw53_32" (
	set PACKAGE=win32_mingw53
	set EXTRA_MODULES=qt.tools.win32_mingw530;%EXTRA_MODULES%
)
if "%PLATFORM%" == "static" set PACKAGE=src

echo platform = "%PACKAGE%"; >> %~dp0\qt-installer-script.qs
echo extraMods = []; >> %~dp0\qt-installer-script.qs
for %%x in (%EXTRA_MODULES%) do (
	echo extraMods.push("%%x"^); >> %~dp0\qt-installer-script.qs
)
type %~dp0\qt-installer-script-base.qs >> %~dp0\qt-installer-script.qs

:: update and install Qt modules
powershell -Command "Invoke-WebRequest https://download.qt.io/official_releases/online_installers/qt-unified-windows-x86-online.exe -OutFile C:\projects\qtinst.exe"
C:\projects\qtinst.exe --script %~dp0\qt-installer-script.qs --addTempRepository https://install.skycoder42.de/qtmodules/windows_x86 --verbose > C:\projects\installer.log || (
	type C:\projects\installer.l
	exit \B 1
)

:: build static qt
if "%PLATFORM%" == "static" (
	%~dp0\setup-qt-static.bat || exit \B 1
)

:: mingw32 make workaround
if "%PLATFORM%" == "mingw53_32" (
	copy C:\projects\Qt\Tools\mingw530_32\bin\mingw32-make.exe C:\projects\Qt\Tools\mingw530_32\bin\make.exe
)

if "%PLATFORM%" == "msvc2017_64" set PACKAGE=win64_msvc2017_64
if "%PLATFORM%" == "winrt_x64_msvc2017" set PACKAGE=win64_msvc2017_winrt_x64
if "%PLATFORM%" == "winrt_x86_msvc2017" set PACKAGE=win64_msvc2017_winrt_x86
if "%PLATFORM%" == "winrt_armv7_msvc2017" set PACKAGE=win64_msvc2017_winrt_armv7
if "%PLATFORM%" == "msvc2015_64" set PACKAGE=win64_msvc2015_64
if "%PLATFORM%" == "msvc2015" set PACKAGE=win32_msvc2015
if "%PLATFORM%" == "mingw53_32" (
	set PACKAGE=win32_mingw53
	set EXTRA_MODULES=qt.tools.win32_mingw530;%EXTRA_MODULES%
)
if "%PLATFORM%" == "static" set PACKAGE=src

:: build static qt
if "%PLATFORM%" == "static" (
	%~dp0\setup-qt-static.bat || exit \B 1
)

:: mingw32 make workaround
if "%PLATFORM%" == "mingw53_32" (
	copy C:\projects\Qt\Tools\mingw530_32\bin\mingw32-make.exe C:\projects\Qt\Tools\mingw530_32\bin\make.exe
)

Update setup.bat

Update setup.bat


echo off
IF EXIST dist del /Q dist\*.*

if "%1"=="" goto default_value:
set pythonexe="%1"
%pythonexe% setup.py write_version
goto custom_python:

:default_value:
IF NOT EXIST c:\Python34 GOTO checkinstall64:

:checkinstall:
IF EXIST c:\Python34vir GOTO nexta:
mkdir c:\Python34vir

:nexta:
IF EXIST c:\Python34vir\install GOTO fullsetupa:
c:\Python34\Scripts\virtualenv c:\Python34vir\install --system-site-packages
if %errorlevel% neq 0 exit /b %errorlevel%

:fullsetupa:
echo #######################################################
c:\Python34vir\install\Scripts\python -u setup.py install
if %errorlevel% neq 0 exit /b %errorlevel%
echo #######################################################

:checkinstall64:
IF EXIST c:\Python34_64vir GOTO nextb:
mkdir c:\Python34_64vir

:nextb:
IF EXIST c:\Python34_64vir\install GOTO fullsetupb:
c:\Python34_x64\Scripts\virtualenv c:\Python34_64vir\install --system-site-packages
if %errorlevel% neq 0 exit /b %errorlevel%

:fullsetupb:
echo #######################################################
c:\Python34_64vir\install\Scripts\python -u setup.py install
if %errorlevel% neq 0 exit /b %errorlevel%
echo #######################################################

:setup34:
IF NOT EXIST c:\Python34 GOTO utpy34_64:
set pythonexe="c:\Python34\python"
%pythonexe% setup.py write_version
%pythonexe% setup.py clean_pyd
%pythonexe% setup.py build bdist_wininst --plat-name=win-amd64
if %errorlevel% neq 0 exit /b %errorlevel%
echo #######################################################

:utpy34_64:
set pythonexe="c:\Python34_x64\python"
%pythonexe% setup.py write_version
%pythonexe% -u setup.py clean_space
if %errorlevel% neq 0 exit /b %errorlevel%
%pythonexe% -u setup.py unittests
if %errorlevel% neq 0 exit /b %errorlevel%
echo #######################################################

:setup34_x64_msi_wheel:
set pythonexe="c:\Python34_x64\python"
:custom_python:
%pythonexe% setup.py clean_pyd
%pythonexe% setup.py sdist --formats=gztar,zip --verbose
if %errorlevel% neq 0 exit /b %errorlevel%
%pythonexe% setup.py bdist_wininst --plat-name=win-amd64
if %errorlevel% neq 0 exit /b %errorlevel%
%pythonexe% setup.py bdist_msi
if %errorlevel% neq 0 exit /b %errorlevel%
%pythonexe% setup.py bdist_wheel
if %errorlevel% neq 0 exit /b %errorlevel%
echo #######################################################

:documentation:
%pythonexe% -u setup.py build_sphinx
if %errorlevel% neq 0 exit /b %errorlevel%
echo #######################################################

:copyfiles:
if not exist dist\html mkdir dist\html
xcopy /E /C /I /Y _doc\sphinxdoc\build\html dist\html
if exist _doc\sphinxdoc\build\latex xcopy /E /C /I /Y _doc\sphinxdoc\build\latex\*.pdf dist\html
if %errorlevel% neq 0 exit /b %errorlevel%

echo off
IF EXIST dist del /Q dist\*.*

if "%1"=="" goto default_value:
set pythonexe="%1"
%pythonexe% setup.py write_version
goto custom_python:

:default_value:
IF NOT EXIST c:\Python34 GOTO checkinstall64:

:checkinstall:
IF EXIST c:\Python34vir GOTO nexta:
mkdir c:\Python34vir

:nexta:
IF EXIST c:\Python34vir\install GOTO fullsetupa:
c:\Python34\Scripts\virtualenv c:\Python34vir\install --system-site-packages
if %errorlevel% neq 0 exit /b %errorlevel%

:fullsetupa:
echo #######################################################
c:\Python34vir\install\Scripts\python -u setup.py install
if %errorlevel% neq 0 exit /b %errorlevel%
echo #######################################################

:checkinstall64:
IF EXIST c:\Python34_64vir GOTO nextb:
mkdir c:\Python34_64vir

:nextb:
IF EXIST c:\Python34_64vir\install GOTO fullsetupb:
c:\Python34_x64\Scripts\virtualenv c:\Python34_64vir\install --system-site-packages
if %errorlevel% neq 0 exit /b %errorlevel%

:fullsetupb:
echo #######################################################
c:\Python34_64vir\install\Scripts\python -u setup.py install
if %errorlevel% neq 0 exit /b %errorlevel%
echo #######################################################

:setup34:
IF NOT EXIST c:\Python34 GOTO utpy34_64:
set pythonexe="c:\Python34\python"
%pythonexe% setup.py write_version
%pythonexe% setup.py clean_pyd
%pythonexe% setup.py build bdist_wininst --plat-name=win-amd64
if %errorlevel% neq 0 exit /b %errorlevel%
echo #######################################################

:utpy34_64:
set pythonexe="c:\Python34_x64\python"
:custom_python:
%pythonexe% setup.py write_version
%pythonexe% -u setup.py clean_space
if %errorlevel% neq 0 exit /b %errorlevel%
%pythonexe% -u setup.py unittests
if %errorlevel% neq 0 exit /b %errorlevel%
echo #######################################################

%pythonexe% setup.py clean_pyd
%pythonexe% setup.py sdist --formats=gztar,zip --verbose
if %errorlevel% neq 0 exit /b %errorlevel%
%pythonexe% setup.py bdist_wininst --plat-name=win-amd64
if %errorlevel% neq 0 exit /b %errorlevel%
%pythonexe% setup.py bdist_msi
if %errorlevel% neq 0 exit /b %errorlevel%
%pythonexe% setup.py bdist_wheel
if %errorlevel% neq 0 exit /b %errorlevel%
echo #######################################################

:documentation:
%pythonexe% -u setup.py build_sphinx
if %errorlevel% neq 0 exit /b %errorlevel%
echo #######################################################

:copyfiles:
if not exist dist\html mkdir dist\html
xcopy /E /C /I /Y _doc\sphinxdoc\build\html dist\html
if exist _doc\sphinxdoc\build\latex xcopy /E /C /I /Y _doc\sphinxdoc\build\latex\*.pdf dist\html
if %errorlevel% neq 0 exit /b %errorlevel%

update build_setup_help_on_windows.bat to run unit tests on Anaconda, WinPython


conda create -n t4Monitor --file requirements-conda.txt -y
activate t4Monitor
pip install -r requirements-common.txt
pip install --no-index --find-links=local pycairo

pip install -r requirements-common.txt
pip install --no-index --find-links=local pycairo
python setup.py build
python setup.py install

Update install_win

Update install_win


echo ON

if "%PY3K%" == "1" (
  2to3 --output-dir=engine\SCons3 -W -n engine\SCons
  rmdir engine\SCons /s /q
  move engine\SCons3 engine/SCons
  2to3 -w -n script\scons
  2to3 -w -n script\sconsign
  2to3 -w -n script\scons-time
  powershell -Command "Get-Content ".\setup.py" | select -First 49" > setup.back
  more +54 setup.py >> setup.back
  del setup.py
  move setup.back setup.py
)

"%PYTHON%" setup.py install --standard-lib
if errorlevel 1 exit 1

echo ON

if "%PY3K%" == "1" (
  2to3 --output-dir=engine\SCons3 -W -n engine\SCons
  rmdir engine\SCons /s /q
  move engine\SCons3 engine/SCons
  powershell -Command "Get-Content ".\script\scons" | select -First 58" > script\scons.back
  more +64 script\scons >> script\scons.back
  del script\scons
  move script\scons.back script\scons
  2to3 -w -n script\scons
  2to3 -w -n script\sconsign
  2to3 -w -n script\scons-time
  powershell -Command "Get-Content ".\setup.py" | select -First 49" > setup.back
  more +54 setup.py >> setup.back
  del setup.py
  move setup.back setup.py
)

"%PYTHON%" setup.py install --standard-lib
if errorlevel 1 exit 1

Update bld.bat

Update bld.bat


:: get_IPMI_SDR_info.bat
:: get_IPMI_SDR_info
::
:: Auther: luke.chen@aicipc.com.tw
:: Progream: get_IPMI_SDR_info every 3 sec
:: Lincese: CC0
:: History: 2021-07-20T13:34:04
:: note: init

@ECHO OFF

:: Get Date & Time
set hh=%time:~0,2%
if "%time:~0,1%"==" " set hh=0%hh:~1,1%
set day=%date:~10,4%-%date:~4,2%-%date:~7,2%
set dayHM=%day%_%hh%%time:~3,2%

:: Remove old log
:: del /Q log_*.txt

:: Set parameter
set ipaddr=192.168.11.11
set sleeptime=3
set /a count=0

:: Get user parameter
if not "%1" == "" set ipaddr=%1
if not "%2" == "" set sleeptime=%2

:: Set log file name
set logname=log_%ipaddr%_%dayHM%.txt

:: Create log
echo. > %logname%

:loop

    :: count add one
    set /a count+=1

    :: Get Date & Time
    set hh=%time:~0,2%
    if "%time:~0,1%"==" " set hh=0%hh:~1,1%
    set day=%date:~10,4%-%date:~4,2%-%date:~7,2%
    set dayHMS=%day%_%hh%:%time:~3,2%:%time:~6,2%

    :: Show and log: ipaddr & count
    echo ==== %ipaddr% (%count%) ====
    echo ==== %ipaddr% (%count%) ==== >> %logname%

    :: Show and log: date & time
    echo %dayHMS%
    echo.
    echo %dayHMS% >> %logname%
    echo. >> %logname%

    :: Get BMC SDR
    :: echo ipmitool -I lanplus -H %ipaddr% -U admin -P admin sdr
    ipmitool -I lanplus -H %ipaddr% -U admin -P admin sdr
    ipmitool -I lanplus -H %ipaddr% -U admin -P admin sdr >> %logname%

    ::
    echo.
    echo. >> %logname%

    :: Sleep %sleeptime% sec (default: 3 sec)
    ping 127.0.0.1 -w 1000 -n %sleeptime% > nul

goto loop

:: get_IPMI_SDR_info.bat
:: get_IPMI_SDR_info
::
:: Auther: luke.chen@aicipc.com.tw
:: Progream: get_IPMI_SDR_info every 10 sec
:: Lincese: CC0
:: History: 2021-07-20T13:34:04
:: note: init
:: History: 2021-07-20T16:46:25
:: note: Change default to get local IPMI SDR
:: History: 2021-07-20T17:29:25
:: note: Add elist

@ECHO OFF

:: Get Date & Time
set hh=%time:~0,2%
if "%time:~0,1%"==" " set hh=0%hh:~1,1%
set day=%date:~10,4%-%date:~4,2%-%date:~7,2%
set dayHM=%day%_%hh%%time:~3,2%

:: Remove old log
:: del /Q log_*.txt

:: Set parameter
set ipaddr=localhost
set remote=-I lanplus -H %ipaddr% -U admin -P admin
set sleeptime=4
set /a count=0

:: Get user parameter
if not "%1" == "" (
    set ipaddr=%1
    set remote=-I lanplus -H %1 -U admin -P admin
) else (
    set remote=%1
)
if not "%2" == "" set sleeptime=%2

:: Set log file name
set logname=log_%ipaddr%_%dayHM%.txt

:: Create log
echo. > %logname%

:loop

    :: count add one
    set /a count+=1

    :: Get Date & Time
    set hh=%time:~0,2%
    if "%time:~0,1%"==" " set hh=0%hh:~1,1%
    set day=%date:~10,4%-%date:~4,2%-%date:~7,2%
    set dayHMS=%day%_%hh%:%time:~3,2%:%time:~6,2%

    :: Show and log: ipaddr & count
    echo ==== %ipaddr% (%count%) ====
    echo ==== %ipaddr% (%count%) ==== >> %logname%

    :: Show and log: date & time
    echo %dayHMS%
    echo.
    echo %dayHMS% >> %logname%
    echo. >> %logname%

    :: Get BMC SDR
    echo --- SDR ---
    echo --- SDR ---  >> %logname%
    ipmitool %remote% sdr
    ipmitool %remote% sdr >> %logname%
    echo.
    echo. >> %logname%

    :: Get BMC SEL elist
    echo --- SEL elist ---
    echo --- SEL elist ---  >> %logname%
    ipmitool %remote% sel elist
    ipmitool %remote% sel elist >> %logname%
    echo.
    echo. >> %logname%

    :: Sleep %sleeptime% sec (default: 3 sec)
    ping 127.0.0.1 -w 1000 -n %sleeptime% > nul

goto loop

Change default to get local IPMI SDR & SEL elist

Change default to get local IPMI SDR & SEL elist


set /p ver=<VERSION
set sourceUrl=-s https://www.nuget.org/api/v2/package

dotnet nuget push artifacts/Es.Logging.%ver%.nupkg %sourceUrl%
dotnet nuget push artifacts/Es.Logging.Console.%ver%.nupkg %sourceUrl%
dotnet nuget push artifacts/Es.Logging.NLog.%ver%.nupkg %sourceUrl%
dotnet nuget push artifacts/Es.Logging.Log4.%ver%.nupkg %sourceUrl%
dotnet nuget push artifacts/Es.Microsoft.Logging.%ver%.nupkg %sourceUrl%

set /p ver=<VERSION
set sourceUrl=-s https://www.nuget.org/api/v2/package

dotnet nuget push artifacts/Es.Microsoft.Log.%ver%.nupkg %sourceUrl%

fix nuget_push script

fix nuget_push script


:: setup variables which are used in Visual Studio project.
@echo off
call setup_environment.bat > nul

set BOOST_DIR=c:\libraries\boost\boost_1_52_0
set FREEIMAGELIB_DIR=c:\libraries\FreeImage\%FreeImage_VERSION%
::set AIMP_PLUGINS_DIR=%ProgramFiles%\AIMP3\Plugins
set AIMP_PLUGINS_DIR=c:\AIMP\AIMP3.60.1421_beta1\Plugins
set AIMP_CONTROL_SUBPATH=\aimp_control
::for API 3.55- it should be set AIMP_CONTROL_SUBPATH=\

:: setup variables which are used in Visual Studio project.
@echo off
call setup_environment.bat > nul

set BOOST_DIR=c:\libraries\boost\boost_1_52_0
set FREEIMAGELIB_DIR=c:\libraries\FreeImage\%FreeImage_VERSION%
::set AIMP_PLUGINS_DIR=%ProgramFiles%\AIMP3\Plugins
set AIMP_PLUGINS_DIR=c:\AIMP\AIMP3.60.1422_beta2\Plugins
set AIMP_CONTROL_SUBPATH=\aimp_control
::for API 3.55- it should be set AIMP_CONTROL_SUBPATH=\

move to 1422 beta 2.

move to 1422 beta 2.


@echo off

SET ASM=%1

if NOT X%PROCESSOR_ARCHITECTURE% == X goto defined

echo Processor Architecture Undefined: defaulting to X86

goto X86

:defined

if %PROCESSOR_ARCHITECTURE% == x86 goto X86

if %PROCESSOR_ARCHITECTURE% == IA64 goto IA64

if %PROCESSOR_ARCHITECTURE% == AMD64 goto AMD64

echo Processor Architecture Unrecognized: defaulting to X86

:X86
echo Auto Configuring for X86

SET TARGET=VC-WIN32
if x%ASM% == xno-asm goto compile
SET ASM=nasm

goto compile

:IA64

echo Auto Configuring for IA64
SET TARGET=VC-WIN64I

goto compile

:AMD64

echo Auto Configuring for AMD64
SET TARGET=VC-WIN64A
if x%ASM% == xno-asm goto compile
SET ASM=nasm

:compile

perl Configure %TARGET% fipscheck
pause

echo on

perl util\mkfiles.pl >MINFO
@if ERRORLEVEL 1 goto error
perl util\mk1mf.pl dll %ASM% %TARGET% >ms\ntdll.mak
@if ERRORLEVEL 1 goto error

nmake -f ms\ntdll.mak clean
nmake -f ms\ntdll.mak
nmake -f ms\ntdll.mak install
@if ERRORLEVEL 1 goto error

@echo.
@echo.
@echo.
@echo ***************************
@echo ****FIPS BUILD SUCCESS*****
@echo ***************************

@goto end

:error

@echo.
@echo.
@echo.
@echo ***************************
@echo ****FIPS BUILD FAILURE*****
@echo ***************************

:end

@echo off

SET ASM=%1

if NOT X%PROCESSOR_ARCHITECTURE% == X goto defined

echo Processor Architecture Undefined: defaulting to X86

goto X86

:defined

if %PROCESSOR_ARCHITECTURE% == x86 goto X86

if %PROCESSOR_ARCHITECTURE% == IA64 goto IA64

if %PROCESSOR_ARCHITECTURE% == AMD64 goto AMD64

echo Processor Architecture Unrecognized: defaulting to X86

:X86
echo Auto Configuring for X86

SET TARGET=VC-WIN32
if x%ASM% == xno-asm goto compile
SET ASM=nasm

goto compile

:IA64

echo Auto Configuring for IA64
SET TARGET=VC-WIN64I

goto compile

:AMD64

echo Auto Configuring for AMD64
SET TARGET=VC-WIN64A
if x%ASM% == xno-asm goto compile
SET ASM=nasm

:compile

if x%ASM% == xno-asm SET EXARG=no-asm
perl Configure %TARGET% %EXARG% fipscheck
pause

echo on

perl util\mkfiles.pl >MINFO
@if ERRORLEVEL 1 goto error
perl util\mk1mf.pl dll %ASM% %TARGET% >ms\ntdll.mak
@if ERRORLEVEL 1 goto error

nmake -f ms\ntdll.mak clean
nmake -f ms\ntdll.mak
nmake -f ms\ntdll.mak install
@if ERRORLEVEL 1 goto error

@echo.
@echo.
@echo.
@echo ***************************
@echo ****FIPS BUILD SUCCESS*****
@echo ***************************

@goto end

:error

@echo.
@echo.
@echo.
@echo ***************************
@echo ****FIPS BUILD FAILURE*****
@echo ***************************

:end

Add no-asm argument to Configure if needed.


@echo off

rem by Lieven Paulissen, based on Guido Tack's mzn-gecode.bat

setlocal
minizinc -Glinear -b mip %*

add mzn-g12mip.bat for windows users

add mzn-g12mip.bat for windows users


@echo off

rem ----------------------------------------------------------------------------
rem Copyright 2022 WSO2, Inc. http://www.wso2.org

rem Licensed under the Apache License, Version 2.0 (the "License");
rem you may not use this file except in compliance with the License.
rem You may obtain a copy of the License at

rem     http://www.apache.org/licenses/LICENSE-2.0

rem Unless required by applicable law or agreed to in writing, software
rem distributed under the License is distributed on an "AS IS" BASIS,
rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
rem See the License for the specific language governing permissions and
rem limitations under the License.

rem ----------------------------------------------------------------------------
rem Main Script for the WSO2 Carbon Server

rem Environment Variable Prequisites

rem    CARBON_HOME   	Home of WSO2 Carbon installation. If not set I will  try
rem                    	to figure it out.
rem    NASHORN_VERSION   	OpenJDK Nashorn Version

rem    ASM_VERSION   	ASM Util, Commons Version.

rem -----------------------------------------------------------------------------

set NASHORN_VERSION=15.3
set ASM_VERSION=9.2

SETLOCAL ENABLEDELAYEDEXPANSION

rem ----- Only set CARBON_HOME if not already set ----------------------------
:checkServer
setlocal enabledelayedexpansion
rem %~sdp0 is expanded pathname of the current script under NT with spaces in the path removed
if "%CARBON_HOME%"=="" set CARBON_HOME=%~sdp0..
SET curDrive=%cd:~0,1%
SET wsasDrive=%CARBON_HOME:~0,1%
if not "%curDrive%" == "%wsasDrive%" %wsasDrive%:

rem find CARBON_HOME if it does not exist due to either an invalid value passed
rem by the user or the %0 problem on Windows 9x
if not exist "%CARBON_HOME%\bin\version.txt" goto noServerHome

IF EXIST "%CARBON_HOME%\repository\components\lib\nashorn-core-*.jar" (
  for /f "delims=" %%i in ('dir /s /b %CARBON_HOME%\repository\components\lib\nashorn-core-*.jar') do set "location=%%i"
  for %%j in (!location!!) do set "full_artifact_name=%%~nxj"
  for /f "tokens=3 delims=-" %%k in ("!full_artifact_name!") do set "artifact_name=%%k"
  for /f "tokens=1,2 delims=." %%l in ("!artifact_name!") do set "LOCAL_NASHORN_VERSION=%%l.%%m"

  IF %NASHORN_VERSION%==!LOCAL_NASHORN_VERSION!  (
    echo Nashorn library exists. No need to download.
  ) ELSE (
    echo Required Nashorn library not found. Remove existing library : !full_artifact_name!
    del !location!
    echo Downloading required Nashorn library : nashorn-core-%NASHORN_VERSION%
	curl https://repo1.maven.org/maven2/org/openjdk/nashorn/nashorn-core/%NASHORN_VERSION%/nashorn-core-%NASHORN_VERSION%.jar -o %CARBON_HOME%/repository/components/lib/nashorn-core-%NASHORN_VERSION%.jar
    echo Nashorn library updated.
  )
) ELSE (
  echo Nashorn library not found. Starting to download.....
  curl https://repo1.maven.org/maven2/org/openjdk/nashorn/nashorn-core/%NASHORN_VERSION%/nashorn-core-%NASHORN_VERSION%.jar -o %CARBON_HOME%/repository/components/lib/nashorn-core-%NASHORN_VERSION%.jar
  echo Nashorn download completed. Downloaded version : nashorn-core-%NASHORN_VERSION%
)

IF EXIST "%CARBON_HOME%\repository\components\lib\asm-util-*.jar" (
  for /f "delims=" %%i in ('dir /s /b %CARBON_HOME%\repository\components\lib\asm-util-*.jar') do set "location=%%i"
  for %%j in (!location!!) do set "full_artifact_name=%%~nxj"
  for /f "tokens=3 delims=-" %%k in ("!full_artifact_name!") do set "artifact_name=%%k"
  for /f "tokens=1,2 delims=." %%l in ("!artifact_name!") do set "LOCAL_ASM_VERSION=%%l.%%m"

  IF %ASM_VERSION%==!LOCAL_ASM_VERSION!  (
    echo ASM-Util library exists. No need to download.
  ) ELSE (
    echo Required ASM-Util library not found. Remove existing library : !full_artifact_name!
    del !location!
    echo Downloading required ASM-Util library : asm-util-%ASM_VERSION%
	  curl https://repo1.maven.org/maven2/org/ow2/asm/asm-util/%ASM_VERSION%/asm-util-%ASM_VERSION%.jar -o %CARBON_HOME%/repository/components/lib/asm-util-%ASM_VERSION%.jar
    echo ASM-Util library updated.
  )
) ELSE (
  echo ASM-Util library not found. Starting to download.....
  curl https://repo1.maven.org/maven2/org/ow2/asm/asm-util/%ASM_VERSION%/asm-util-%ASM_VERSION%.jar -o %CARBON_HOME%/repository/components/lib/asm-util-%ASM_VERSION%.jar
  echo ASM-Util download completed. Downloaded version : asm-util-%ASM_VERSION%%
)
echo Enable Adaptive Script successfully finished.
goto end

:noServerHome
echo CARBON_HOME is set incorrectly or CARBON could not be located. Please set CARBON_HOME.
goto end

:end
ENDLOCAL

@echo off
rem ----------------------------------------------------------------------------
rem Copyright (c) 2022, WSO2 Inc. (http://www.wso2.com).
rem
rem WSO2 Inc. licenses this file to you under the Apache License,
rem Version 2.0 (the "License"); you may not use this file except
rem in compliance with the License.
rem You may obtain a copy of the License at
rem
rem http://www.apache.org/licenses/LICENSE-2.0
rem
rem Unless required by applicable law or agreed to in writing,
rem software distributed under the License is distributed on an
rem "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
rem KIND, either express or implied.  See the License for the
rem specific language governing permissions and limitations
rem under the License.

rem ----------------------------------------------------------------------------
rem Adaptive Authentication Script for the WSO2 Carbon Server

rem Environment Variable Prequisites

rem    CARBON_HOME   	Home of WSO2 Carbon installation. If not set I will  try
rem                    	to figure it out.
rem    NASHORN_VERSION   	OpenJDK Nashorn Version

rem    ASM_VERSION   	ASM Util, Commons Version.

rem -----------------------------------------------------------------------------

set NASHORN_VERSION=15.3
set ASM_VERSION=9.2

SETLOCAL ENABLEDELAYEDEXPANSION

rem ----- Only set CARBON_HOME if not already set ----------------------------
:checkServer
setlocal enabledelayedexpansion
rem %~sdp0 is expanded pathname of the current script under NT with spaces in the path removed
if "%CARBON_HOME%"=="" set CARBON_HOME=%~sdp0..
SET curDrive=%cd:~0,1%
SET wsasDrive=%CARBON_HOME:~0,1%
if not "%curDrive%" == "%wsasDrive%" %wsasDrive%:

rem find CARBON_HOME if it does not exist due to either an invalid value passed
rem by the user or the %0 problem on Windows 9x
if not exist "%CARBON_HOME%\bin\version.txt" goto noServerHome

IF EXIST "%CARBON_HOME%\repository\components\lib\nashorn-core-*.jar" (
  for /f "delims=" %%i in ('dir /s /b %CARBON_HOME%\repository\components\lib\nashorn-core-*.jar') do set "location=%%i"
  for %%j in (!location!!) do set "full_artifact_name=%%~nxj"
  for /f "tokens=3 delims=-" %%k in ("!full_artifact_name!") do set "artifact_name=%%k"
  for /f "tokens=1,2 delims=." %%l in ("!artifact_name!") do set "LOCAL_NASHORN_VERSION=%%l.%%m"

  IF %NASHORN_VERSION%==!LOCAL_NASHORN_VERSION!  (
    echo Nashorn library exists. No need to download.
  ) ELSE (
    echo Required Nashorn library not found. Remove existing library : !full_artifact_name!
    del !location!
    echo Downloading required Nashorn library : nashorn-core-%NASHORN_VERSION%
	curl https://repo1.maven.org/maven2/org/openjdk/nashorn/nashorn-core/%NASHORN_VERSION%/nashorn-core-%NASHORN_VERSION%.jar -o %CARBON_HOME%/repository/components/lib/nashorn-core-%NASHORN_VERSION%.jar
    echo Nashorn library updated.
  )
) ELSE (
  echo Nashorn library not found. Starting to download.....
  curl https://repo1.maven.org/maven2/org/openjdk/nashorn/nashorn-core/%NASHORN_VERSION%/nashorn-core-%NASHORN_VERSION%.jar -o %CARBON_HOME%/repository/components/lib/nashorn-core-%NASHORN_VERSION%.jar
  echo Nashorn download completed. Downloaded version : nashorn-core-%NASHORN_VERSION%
)

IF EXIST "%CARBON_HOME%\repository\components\lib\asm-util-*.jar" (
  for /f "delims=" %%i in ('dir /s /b %CARBON_HOME%\repository\components\lib\asm-util-*.jar') do set "location=%%i"
  for %%j in (!location!!) do set "full_artifact_name=%%~nxj"
  for /f "tokens=3 delims=-" %%k in ("!full_artifact_name!") do set "artifact_name=%%k"
  for /f "tokens=1,2 delims=." %%l in ("!artifact_name!") do set "LOCAL_ASM_VERSION=%%l.%%m"

  IF %ASM_VERSION%==!LOCAL_ASM_VERSION!  (
    echo ASM-Util library exists. No need to download.
  ) ELSE (
    echo Required ASM-Util library not found. Remove existing library : !full_artifact_name!
    del !location!
    echo Downloading required ASM-Util library : asm-util-%ASM_VERSION%
	  curl https://repo1.maven.org/maven2/org/ow2/asm/asm-util/%ASM_VERSION%/asm-util-%ASM_VERSION%.jar -o %CARBON_HOME%/repository/components/lib/asm-util-%ASM_VERSION%.jar
    echo ASM-Util library updated.
  )
) ELSE (
  echo ASM-Util library not found. Starting to download.....
  curl https://repo1.maven.org/maven2/org/ow2/asm/asm-util/%ASM_VERSION%/asm-util-%ASM_VERSION%.jar -o %CARBON_HOME%/repository/components/lib/asm-util-%ASM_VERSION%.jar
  echo ASM-Util download completed. Downloaded version : asm-util-%ASM_VERSION%%
)
echo Enable Adaptive Script successfully finished.
goto end

:noServerHome
echo CARBON_HOME is set incorrectly or CARBON could not be located. Please set CARBON_HOME.
goto end

:end
ENDLOCAL

Fix license header

Fix license header


@echo off

REM ---------------------------------------------------------------------------
REM   Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
REM
REM   Licensed under the Apache License, Version 2.0 (the "License");
REM   you may not use this file except in compliance with the License.
REM   You may obtain a copy of the License at
REM
REM   http://www.apache.org/licenses/LICENSE-2.0
REM
REM   Unless required by applicable law or agreed to in writing, software
REM   distributed under the License is distributed on an "AS IS" BASIS,
REM   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
REM   See the License for the specific language governing permissions and
REM   limitations under the License.

rem ---------------------------------------------------------------------------
rem Main Script for WSO2 Carbon
rem
rem Environment Variable Prequisites
rem
rem   CARBON_HOME   Home of CARBON installation. If not set I will  try
rem                   to figure it out.
rem
rem   RUNTIME_HOME  Home of WSO2 Carbon Runtime.
rem
rem   JAVA_HOME       Must point at your Java Development Kit installation.
rem
rem   JAVA_OPTS       (Optional) Java runtime options used when the commands
rem                   is executed.
rem ---------------------------------------------------------------------------

rem ----- if JAVA_HOME is not set we're not happy ------------------------------
:checkJava

if "%JAVA_HOME%" == "" goto noJavaHome
if not exist "%JAVA_HOME%\bin\java.exe" goto noJavaHome
goto checkServer

:noJavaHome
echo "You must set the JAVA_HOME variable before running CARBON."
goto end

rem ----- Only set CARBON_HOME if not already set ----------------------------
:checkServer
rem %~sdp0 is expanded pathname of the current script under NT with spaces in the path removed
if "%CARBON_HOME%"=="" set CARBON_HOME=%~sdp0..\..\..
SET curDrive=%cd:~0,1%
SET wsasDrive=%CARBON_HOME:~0,1%
if not "%curDrive%" == "%wsasDrive%" %wsasDrive%:

rem ----- Only set RUNTIME_HOME if not already set ----------------------------
:setRuntimeHome
if "%RUNTIME_HOME%"=="" set RUNTIME_HOME=%~sdp0..
rem --- derive RUNTIME NAME from the RUNTIME_HOME path.
cd /d %RUNTIME_HOME%
set path1=%cd%
cd ..
set path2=%cd%
call set "RUNTIME=%%path1:%path2%\=%%"

rem find CARBON_HOME if it does not exist due to either an invalid value passed
rem by the user or the %0 problem on Windows 9x
if not exist "%CARBON_HOME%\bin\kernel-version.txt" goto noServerHome

goto updateClasspath

:noServerHome
echo CARBON_HOME is set incorrectly or CARBON_HOME could not be located. Please set CARBON_HOME.
goto end

rem ----- update classpath -----------------------------------------------------
:updateClasspath

setlocal EnableDelayedExpansion
cd %RUNTIME_HOME%
set CARBON_CLASSPATH=
FOR %%C in ("%CARBON_HOME%\bin\bootstrap\*.jar") DO set CARBON_CLASSPATH=!CARBON_CLASSPATH!;".\bin\bootstrap\%%~nC%%~xC"

set CARBON_CLASSPATH="%JAVA_HOME%\lib\tools.jar";%CARBON_CLASSPATH%;

FOR %%D in ("%CARBON_HOME%\bin\bootstrap\commons-lang*.jar") DO set CARBON_CLASSPATH=!CARBON_CLASSPATH!;".\bin\bootstrap\%%~nD%%~xD"

rem ----- Process the input command -------------------------------------------

rem Slurp the command line arguments. This loop allows for an unlimited number
rem of arguments (up to the command line limit, anyway).

:setupArgs
if ""%1""=="""" goto doneStart

if ""%1""==""-run""     goto commandLifecycle
if ""%1""==""--run""    goto commandLifecycle
if ""%1""==""run""      goto commandLifecycle

if ""%1""==""-restart""  goto commandLifecycle
if ""%1""==""--restart"" goto commandLifecycle
if ""%1""==""restart""   goto commandLifecycle

if ""%1""==""debug""    goto commandDebug
if ""%1""==""-debug""   goto commandDebug
if ""%1""==""--debug""  goto commandDebug

if ""%1""==""version""   goto commandVersion
if ""%1""==""-version""  goto commandVersion
if ""%1""==""--version"" goto commandVersion

shift
goto setupArgs

rem ----- commandVersion -------------------------------------------------------
:commandVersion
shift
type "%CARBON_HOME%\bin\kernel-version.txt"
goto end

rem ----- commandDebug ---------------------------------------------------------
:commandDebug
shift
set DEBUG_PORT=%1
if "%DEBUG_PORT%"=="" goto noDebugPort
if not "%JAVA_OPTS%"=="" echo Warning !!!. User specified JAVA_OPTS will be ignored, once you give the --debug option.
set JAVA_OPTS=-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=%DEBUG_PORT%
echo Please start the remote debugging client to continue...
goto findJdk

:noDebugPort
echo Please specify the debug port after the --debug option
goto end

rem ----- commandLifecycle -----------------------------------------------------
:commandLifecycle
goto findJdk

:doneStart
if "%OS%"=="Windows_NT" @setlocal
if "%OS%"=="WINNT" @setlocal

rem ---------- Handle the SSL Issue with proper JDK version --------------------
rem find the version of the jdk
:findJdk

set CMD=RUN %*

:checkJdk16
"%JAVA_HOME%\bin\java" -version 2>&1 | findstr /r "1.[8]" >NUL
IF ERRORLEVEL 1 goto unknownJdk
goto jdk16

:unknownJdk
echo Starting WSO2 Carbon (in unsupported JDK)
echo [ERROR] CARBON is supported only on JDK 1.8
goto jdk16

:jdk16
goto runServer

rem ----------------- Execute The Requested Command ----------------------------

:runServer
cd %RUNTIME_HOME%

rem ---------- Add jars to classpath ----------------

set CARBON_CLASSPATH="%CARBON_HOME%\bin\bootstrap\*";"%CARBON_CLASSPATH%"

set JAVA_ENDORSED="%CARBON_HOME%\bin\bootstrap\endorsed";"%JAVA_HOME%\jre\lib\endorsed";"%JAVA_HOME%\lib\endorsed"

set CMD_LINE_ARGS=-Xbootclasspath/a:%CARBON_XBOOTCLASSPATH% -Xms256m -Xmx1024m -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath="%RUNTIME_HOME%\logs\heap-dump.hprof" -Dcom.sun.management.jmxremote -classpath %CARBON_CLASSPATH% %JAVA_OPTS% -Djava.endorsed.dirs=%JAVA_ENDORSED% -Dcarbon.home="%CARBON_HOME%" -Dwso2.runtime.path="%RUNTIME_HOME%" -Dwso2.runtime="%RUNTIME%" -Djava.command="%JAVA_HOME%\bin\java" -Djava.opts="%JAVA_OPTS%" -Djava.io.tmpdir="%CARBON_HOME%\tmp" -Dcarbon.classpath=%CARBON_CLASSPATH% -Dfile.encoding=UTF8

:runJava
echo JAVA_HOME environment variable is set to %JAVA_HOME%
echo CARBON_HOME environment variable is set to %CARBON_HOME%
echo RUNTIME_HOME environment variable is set to %RUNTIME_HOME%
echo RUNTIME environment variable is set to %RUNTIME%
"%JAVA_HOME%\bin\java" %CMD_LINE_ARGS% org.wso2.carbon.launcher.Main %CMD%
if "%ERRORLEVEL%"=="121" goto runJava
:end
goto endlocal

:endlocal

:END

@echo off

REM ---------------------------------------------------------------------------
REM   Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
REM
REM   Licensed under the Apache License, Version 2.0 (the "License");
REM   you may not use this file except in compliance with the License.
REM   You may obtain a copy of the License at
REM
REM   http://www.apache.org/licenses/LICENSE-2.0
REM
REM   Unless required by applicable law or agreed to in writing, software
REM   distributed under the License is distributed on an "AS IS" BASIS,
REM   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
REM   See the License for the specific language governing permissions and
REM   limitations under the License.

rem ---------------------------------------------------------------------------
rem Main Script for WSO2 Carbon
rem
rem Environment Variable Prequisites
rem
rem   CARBON_HOME   Home of CARBON installation. If not set I will  try
rem                   to figure it out.
rem
rem   RUNTIME_HOME  Home of WSO2 Carbon Runtime.
rem
rem   JAVA_HOME       Must point at your Java Development Kit installation.
rem
rem   JAVA_OPTS       (Optional) Java runtime options used when the commands
rem                   is executed.
rem ---------------------------------------------------------------------------

rem ----- if JAVA_HOME is not set we're not happy ------------------------------
:checkJava

if "%JAVA_HOME%" == "" goto noJavaHome
if not exist "%JAVA_HOME%\bin\java.exe" goto noJavaHome
goto checkServer

:noJavaHome
echo "You must set the JAVA_HOME variable before running CARBON."
goto end

rem ----- Only set CARBON_HOME if not already set ----------------------------
:checkServer
rem %~sdp0 is expanded pathname of the current script under NT with spaces in the path removed
if "%CARBON_HOME%"=="" set CARBON_HOME=%~sdp0..\..\..
SET curDrive=%cd:~0,1%
SET wsasDrive=%CARBON_HOME:~0,1%
if not "%curDrive%" == "%wsasDrive%" %wsasDrive%:

rem ----- Only set RUNTIME_HOME if not already set ----------------------------
:setRuntimeHome
if "%RUNTIME_HOME%"=="" set RUNTIME_HOME=%~sdp0..
rem --- derive RUNTIME NAME from the RUNTIME_HOME path.
cd /d %RUNTIME_HOME%
set path1=%cd%
cd ..
set path2=%cd%
call set "RUNTIME=%%path1:%path2%\=%%"

rem find CARBON_HOME if it does not exist due to either an invalid value passed
rem by the user or the %0 problem on Windows 9x
if not exist "%CARBON_HOME%\bin\kernel-version.txt" goto noServerHome

goto updateClasspath

:noServerHome
echo CARBON_HOME is set incorrectly or CARBON_HOME could not be located. Please set CARBON_HOME.
goto end

rem ----- update classpath -----------------------------------------------------
:updateClasspath

setlocal EnableDelayedExpansion
cd %RUNTIME_HOME%
set CARBON_CLASSPATH=
FOR %%C in ("%CARBON_HOME%\bin\bootstrap\*.jar") DO set CARBON_CLASSPATH=!CARBON_CLASSPATH!;".\bin\bootstrap\%%~nC%%~xC"

set CARBON_CLASSPATH="%JAVA_HOME%\lib\tools.jar";%CARBON_CLASSPATH%;

FOR %%D in ("%CARBON_HOME%\bin\bootstrap\commons-lang*.jar") DO set CARBON_CLASSPATH=!CARBON_CLASSPATH!;".\bin\bootstrap\%%~nD%%~xD"

rem ----- Process the input command -------------------------------------------

rem Slurp the command line arguments. This loop allows for an unlimited number
rem of arguments (up to the command line limit, anyway).

:setupArgs
if ""%1""=="""" goto doneStart

if ""%1""==""-run""     goto commandLifecycle
if ""%1""==""--run""    goto commandLifecycle
if ""%1""==""run""      goto commandLifecycle

if ""%1""==""-restart""  goto commandLifecycle
if ""%1""==""--restart"" goto commandLifecycle
if ""%1""==""restart""   goto commandLifecycle

if ""%1""==""debug""    goto commandDebug
if ""%1""==""-debug""   goto commandDebug
if ""%1""==""--debug""  goto commandDebug

if ""%1""==""version""   goto commandVersion
if ""%1""==""-version""  goto commandVersion
if ""%1""==""--version"" goto commandVersion

shift
goto setupArgs

rem ----- commandVersion -------------------------------------------------------
:commandVersion
shift
type "%CARBON_HOME%\bin\kernel-version.txt"
goto end

rem ----- commandDebug ---------------------------------------------------------
:commandDebug
shift
set DEBUG_PORT=%1
if "%DEBUG_PORT%"=="" goto noDebugPort
if not "%JAVA_OPTS%"=="" echo Warning !!!. User specified JAVA_OPTS will be ignored, once you give the --debug option.
set JAVA_OPTS=-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=%DEBUG_PORT%
echo Please start the remote debugging client to continue...
goto findJdk

:noDebugPort
echo Please specify the debug port after the --debug option
goto end

rem ----- commandLifecycle -----------------------------------------------------
:commandLifecycle
goto findJdk

:doneStart
if "%OS%"=="Windows_NT" @setlocal
if "%OS%"=="WINNT" @setlocal

rem ---------- Handle the SSL Issue with proper JDK version --------------------
rem find the version of the jdk
:findJdk

set CMD=RUN %*

:checkJdk16
"%JAVA_HOME%\bin\java" -version 2>&1 | findstr /r "1.[8]" >NUL
IF ERRORLEVEL 1 goto unknownJdk
goto jdk16

:unknownJdk
echo Starting WSO2 Carbon (in unsupported JDK)
echo [ERROR] CARBON is supported only on JDK 1.8
goto jdk16

:jdk16
goto runServer

rem ----------------- Execute The Requested Command ----------------------------

:runServer
cd %RUNTIME_HOME%

rem ---------- Add jars to classpath ----------------

set CARBON_CLASSPATH="%CARBON_HOME%\bin\bootstrap\*";%CARBON_CLASSPATH%

set JAVA_ENDORSED="%CARBON_HOME%\bin\bootstrap\endorsed";"%JAVA_HOME%\jre\lib\endorsed";"%JAVA_HOME%\lib\endorsed"

set CMD_LINE_ARGS=-Xbootclasspath/a:%CARBON_XBOOTCLASSPATH% -Xms256m -Xmx1024m -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath="%RUNTIME_HOME%\logs\heap-dump.hprof" -Dcom.sun.management.jmxremote -classpath %CARBON_CLASSPATH% %JAVA_OPTS% -Djava.endorsed.dirs=%JAVA_ENDORSED% -Dcarbon.home="%CARBON_HOME%" -Dwso2.runtime.path="%RUNTIME_HOME%" -Dwso2.runtime="%RUNTIME%" -Djava.command="%JAVA_HOME%\bin\java" -Djava.opts="%JAVA_OPTS%" -Djava.io.tmpdir="%CARBON_HOME%\tmp" -Dcarbon.classpath=%CARBON_CLASSPATH% -Dfile.encoding=UTF8

:runJava
echo JAVA_HOME environment variable is set to %JAVA_HOME%
echo CARBON_HOME environment variable is set to %CARBON_HOME%
echo RUNTIME_HOME environment variable is set to %RUNTIME_HOME%
echo RUNTIME environment variable is set to %RUNTIME%
"%JAVA_HOME%\bin\java" %CMD_LINE_ARGS% org.wso2.carbon.launcher.Main %CMD%
if "%ERRORLEVEL%"=="121" goto runJava
:end
goto endlocal

:endlocal

:END

Fix incorrect double quotes in classpath

Resolves #1550