@if "%SCM_TRACE_LEVEL%" NEQ "4" @echo off

:: ----------------------
:: KUDU Deployment Script
:: Version: 0.2.2
:: ----------------------

:: Prerequisites
:: -------------

:: Verify node.js installed
where node 2>nul >nul
IF %ERRORLEVEL% NEQ 0 (
  echo Missing node.js executable, please install node.js, if already installed make sure it can be reached from current environment.
  goto error
)

:: Setup
:: -----

setlocal enabledelayedexpansion

SET ARTIFACTS=%~dp0%..\artifacts

IF NOT DEFINED DEPLOYMENT_SOURCE (
  SET DEPLOYMENT_SOURCE=%~dp0%.
)

IF NOT DEFINED DEPLOYMENT_TARGET (
  SET DEPLOYMENT_TARGET=%ARTIFACTS%\wwwroot
)

IF NOT DEFINED NEXT_MANIFEST_PATH (
  SET NEXT_MANIFEST_PATH=%ARTIFACTS%\manifest

  IF NOT DEFINED PREVIOUS_MANIFEST_PATH (
    SET PREVIOUS_MANIFEST_PATH=%ARTIFACTS%\manifest
  )
)

IF NOT DEFINED KUDU_SYNC_CMD (
  :: Install kudu sync
  echo Installing Kudu Sync
  call npm install kudusync -g --silent
  IF !ERRORLEVEL! NEQ 0 goto error

  :: Locally just running "kuduSync" would also work
  SET KUDU_SYNC_CMD=%appdata%\npm\kuduSync.cmd
)
goto Deployment

:: Utility Functions
:: -----------------

:SelectNodeVersion

IF DEFINED KUDU_SELECT_NODE_VERSION_CMD (
  :: The following are done only on Windows Azure Websites environment
  call %KUDU_SELECT_NODE_VERSION_CMD% "%DEPLOYMENT_SOURCE%" "%DEPLOYMENT_TARGET%" "%DEPLOYMENT_TEMP%"
  IF !ERRORLEVEL! NEQ 0 goto error

  IF EXIST "%DEPLOYMENT_TEMP%\__nodeVersion.tmp" (
    SET /p NODE_EXE=<"%DEPLOYMENT_TEMP%\__nodeVersion.tmp"
    IF !ERRORLEVEL! NEQ 0 goto error
  )

  IF EXIST "%DEPLOYMENT_TEMP%\__npmVersion.tmp" (
    SET /p NPM_JS_PATH=<"%DEPLOYMENT_TEMP%\__npmVersion.tmp"
    IF !ERRORLEVEL! NEQ 0 goto error
  )

  IF NOT DEFINED NODE_EXE (
    SET NODE_EXE=node
  )

  SET NPM_CMD="!NODE_EXE!" "!NPM_JS_PATH!"
) ELSE (
  SET NPM_CMD=npm
  SET NODE_EXE=node
)

goto :EOF

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: Deployment
:: ----------

:Deployment
echo Handling node.js deployment.

echo 1. Select node version
call :SelectNodeVersion

echo 2. Install npm packages
IF EXIST "%DEPLOYMENT_TARGET%\package.json" (
  echo Calling !NPM_CMD! install --production
  pushd "%DEPLOYMENT_TARGET%"
  call :ExecuteCmd !NPM_CMD! install --production -d
  IF !ERRORLEVEL! NEQ 0 goto error
  popd
)

echo 3. Install bower packages
IF EXIST "%DEPLOYMENT_TARGET%\bower.json" (
  pushd "%DEPLOYMENT_TARGET%"
  call :ExecuteCmd bower install
  IF !ERRORLEVEL! NEQ 0 goto error
  popd
)

echo 4. Grunt build
IF EXIST %DEPLOYMENT_TARGET%\Gruntfile.js (
  pushd %DEPLOYMENT_TARGET%
  call :ExecuteCmd grunt build
  call :ExecuteCmd grunt
  IF !ERRORLEVEL! NEQ 0 goto error
  popd
)

echo 5. KuduSync
IF /I "%IN_PLACE_DEPLOYMENT%" NEQ "1" (
  call :ExecuteCmd "%KUDU_SYNC_CMD%" -v 50 -f "%DEPLOYMENT_SOURCE%" -t "%DEPLOYMENT_TARGET%" -n "%NEXT_MANIFEST_PATH%" -p "%PREVIOUS_MANIFEST_PATH%" -i ".git;.hg;.deployment;deploy.cmd"
  IF !ERRORLEVEL! NEQ 0 goto error
)

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

:: Post deployment stub
IF DEFINED POST_DEPLOYMENT_ACTION call "%POST_DEPLOYMENT_ACTION%"
IF !ERRORLEVEL! NEQ 0 goto error

goto end

:: Execute command routine that will echo out when error
:ExecuteCmd
setlocal
set _CMD_=%*
call %_CMD_%
if "%ERRORLEVEL%" NEQ "0" echo Failed exitCode=%ERRORLEVEL%, command=%_CMD_%
exit /b %ERRORLEVEL%

:error
endlocal
echo An error has occurred during web site deployment.
call :exitSetErrorLevel
call :exitFromFunction 2>nul

:exitSetErrorLevel
exit /b 1

:exitFromFunction
()

:end
endlocal
echo Finished successfully.

@if "%SCM_TRACE_LEVEL%" NEQ "4" @echo off

:: ----------------------
:: KUDU Deployment Script
:: Version: 0.2.2
:: ----------------------

:: Prerequisites
:: -------------

:: Verify node.js installed
where node 2>nul >nul
IF %ERRORLEVEL% NEQ 0 (
  echo Missing node.js executable, please install node.js, if already installed make sure it can be reached from current environment.
  goto error
)

:: Setup
:: -----

setlocal enabledelayedexpansion

SET ARTIFACTS=%~dp0%..\artifacts

IF NOT DEFINED DEPLOYMENT_SOURCE (
  SET DEPLOYMENT_SOURCE=%~dp0%.
)

IF NOT DEFINED DEPLOYMENT_TARGET (
  SET DEPLOYMENT_TARGET=%ARTIFACTS%\wwwroot
)

IF NOT DEFINED NEXT_MANIFEST_PATH (
  SET NEXT_MANIFEST_PATH=%ARTIFACTS%\manifest

  IF NOT DEFINED PREVIOUS_MANIFEST_PATH (
    SET PREVIOUS_MANIFEST_PATH=%ARTIFACTS%\manifest
  )
)

IF NOT DEFINED KUDU_SYNC_CMD (
  :: Install kudu sync
  echo Installing Kudu Sync
  call npm install kudusync -g --silent
  IF !ERRORLEVEL! NEQ 0 goto error

  :: Locally just running "kuduSync" would also work
  SET KUDU_SYNC_CMD=%appdata%\npm\kuduSync.cmd
)
goto Deployment

:: Utility Functions
:: -----------------

:SelectNodeVersion

IF DEFINED KUDU_SELECT_NODE_VERSION_CMD (
  :: The following are done only on Windows Azure Websites environment
  call %KUDU_SELECT_NODE_VERSION_CMD% "%DEPLOYMENT_SOURCE%" "%DEPLOYMENT_TARGET%" "%DEPLOYMENT_TEMP%"
  IF !ERRORLEVEL! NEQ 0 goto error

  IF EXIST "%DEPLOYMENT_TEMP%\__nodeVersion.tmp" (
    SET /p NODE_EXE=<"%DEPLOYMENT_TEMP%\__nodeVersion.tmp"
    IF !ERRORLEVEL! NEQ 0 goto error
  )

  IF EXIST "%DEPLOYMENT_TEMP%\__npmVersion.tmp" (
    SET /p NPM_JS_PATH=<"%DEPLOYMENT_TEMP%\__npmVersion.tmp"
    IF !ERRORLEVEL! NEQ 0 goto error
  )

  IF NOT DEFINED NODE_EXE (
    SET NODE_EXE=node
  )

  SET NPM_CMD="!NODE_EXE!" "!NPM_JS_PATH!"
) ELSE (
  SET NPM_CMD=npm
  SET NODE_EXE=node
)

goto :EOF

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: Deployment
:: ----------

:Deployment
echo Handling node.js deployment.

echo 1. Select node version
call :SelectNodeVersion

echo 2. Install npm packages
IF EXIST "package.json" (
  echo Calling !NPM_CMD! install --production
  pushd "%DEPLOYMENT_TARGET%"
  call :ExecuteCmd !NPM_CMD! install --production -d
  IF !ERRORLEVEL! NEQ 0 goto error
  popd
)

echo 3. Install bower packages
IF EXIST "bower.json" (
  pushd "%DEPLOYMENT_TARGET%"
  call :ExecuteCmd bower install
  IF !ERRORLEVEL! NEQ 0 goto error
  popd
)

echo 4. Gulp build
IF EXIST "gulpfile.js (
  pushd "%DEPLOYMENT_TARGET%"
  call :ExecuteCmd grunt build
  call :ExecuteCmd grunt
  IF !ERRORLEVEL! NEQ 0 goto error
  popd
)

echo 5. KuduSync
IF /I "%IN_PLACE_DEPLOYMENT%" NEQ "1" (
  call :ExecuteCmd "%KUDU_SYNC_CMD%" -v 50 -f "%DEPLOYMENT_SOURCE%" -t "%DEPLOYMENT_TARGET%" -n "%NEXT_MANIFEST_PATH%" -p "%PREVIOUS_MANIFEST_PATH%" -i ".git;.hg;.deployment;deploy.cmd"
  IF !ERRORLEVEL! NEQ 0 goto error
)

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

:: Post deployment stub
IF DEFINED POST_DEPLOYMENT_ACTION call "%POST_DEPLOYMENT_ACTION%"
IF !ERRORLEVEL! NEQ 0 goto error

goto end

:: Execute command routine that will echo out when error
:ExecuteCmd
setlocal
set _CMD_=%*
call %_CMD_%
if "%ERRORLEVEL%" NEQ "0" echo Failed exitCode=%ERRORLEVEL%, command=%_CMD_%
exit /b %ERRORLEVEL%

:error
endlocal
echo An error has occurred during web site deployment.
call :exitSetErrorLevel
call :exitFromFunction 2>nul

:exitSetErrorLevel
exit /b 1

:exitFromFunction
()

:end
endlocal
echo Finished successfully.

fix kudu

fix kudu


@echo off
setlocal

cd "%~dp0"

if '%Configuration%' == '' if not '%1' == '' set Configuration=%1
if '%Configuration%' == '' set Configuration=Debug

dotnet tool update coverlet.console --tool-path packages
dotnet tool update dotnet-reportgenerator-globaltool --tool-path packages

if exist bld\coverage rd /s /q bld\coverage
md bld\coverage

packages\coverlet "JeremyAnsel.ColorQuant.Tests\bin\%Configuration%\netcoreapp3.0\JeremyAnsel.ColorQuant.Tests.dll" --target "dotnet" --targetargs "test -f netcoreapp3.0 --no-build" --output "bld\coverage\results-netcoreapp3.0.xml" --format opencover --use-source-link
if %ERRORLEVEL% neq 0 exit /b %ERRORLEVEL%

packages\coverlet "JeremyAnsel.ColorQuant.Tests\bin\%Configuration%\net452\JeremyAnsel.ColorQuant.Tests.dll" --target "dotnet" --targetargs "test -f net452 --no-build" --output "bld\coverage\results-net452.xml" --format opencover --use-source-link
if %ERRORLEVEL% neq 0 exit /b %ERRORLEVEL%

packages\reportgenerator -reports:"bld\coverage\results-netcoreapp3.0.xml;bld\coverage\results-net452.xml" -reporttypes:Html;Badges -targetdir:bld\coverage -verbosity:Info
if %ERRORLEVEL% neq 0 exit /b %ERRORLEVEL%

@echo off
setlocal

cd "%~dp0"

if '%Configuration%' == '' if not '%1' == '' set Configuration=%1
if '%Configuration%' == '' set Configuration=Debug

dotnet tool update coverlet.console --tool-path packages
dotnet tool update dotnet-reportgenerator-globaltool --tool-path packages

if exist bld\coverage rd /s /q bld\coverage
md bld\coverage

packages\coverlet "JeremyAnsel.ColorQuant.Tests\bin\%Configuration%\netcoreapp3.0\JeremyAnsel.ColorQuant.Tests.dll" --target "dotnet" --targetargs "test -f netcoreapp3.0 --no-build" --output "bld\coverage\results-netcoreapp3.0.xml" --format opencover
if %ERRORLEVEL% neq 0 exit /b %ERRORLEVEL%

packages\coverlet "JeremyAnsel.ColorQuant.Tests\bin\%Configuration%\net452\JeremyAnsel.ColorQuant.Tests.dll" --target "dotnet" --targetargs "test -f net452 --no-build" --output "bld\coverage\results-net452.xml" --format opencover
if %ERRORLEVEL% neq 0 exit /b %ERRORLEVEL%

packages\reportgenerator -reports:"bld\coverage\results-netcoreapp3.0.xml;bld\coverage\results-net452.xml" -reporttypes:Html;Badges -targetdir:bld\coverage -verbosity:Info
if %ERRORLEVEL% neq 0 exit /b %ERRORLEVEL%

Update run-tests.cmd

Update run-tests.cmd


REM  install Anaconda 2018.2 in C:\anaconda3 (without VS, without PATH)
REM  Start->Anaconda3->Anaconda-Prompt

pip install numpy==1.16.0
pip install pyqt5==5.11.3
pip install hdf5plugin
pip install silx

pip install srxraylib
pip install syned
pip install wofry

pip install oasys-canvas-core
pip install oasys-widget-core

pip install oasys1

REM
REM   try: python -m oasys.canvas -l4 --force-discovery
REM   Oasys should start (with no add-ons)
REM
REM  If it works, use the install_addons_windows.bat file to install manually the addons
REM
REM  ** IMPORTANT: DO NOT USE THE ADD-ONS MENU IN THE OASYS MENU -- DO NOT UPGRADE ADDONS USING THE OASYS MENU ***

REM  install Anaconda 2018.2 in C:\anaconda3 (without VS, without PATH)
REM  Start->Anaconda3->Anaconda-Prompt

pip install numpy==1.16.0

pip install pyqt5==5.11.3

pip install hdf5plugin

pip install silx

pip install srxraylib

pip install syned

pip install wofry

pip install oasys-canvas-core

pip install oasys-widget-core

pip install oasys1

conda install -c conda-forge xraylib=3.3.0

REM
REM   try: python -m oasys.canvas -l4 --force-discovery
REM   Oasys should start (with no add-ons)
REM
REM  If it works, use the install_addons_windows.bat file to install manually the addons
REM
REM  ** IMPORTANT: DO NOT USE THE ADD-ONS MENU IN THE OASYS MENU -- DO NOT UPGRADE ADDONS USING THE OASYS MENU ***

Update install_oasys_windows.bat

Update install_oasys_windows.bat


@echo off

set PYTHON=%~1
set PATH=%PYTHON%;%PYTHON%\Scripts;%PATH%

python -m pytest
python -m flake8

set PYTHON=%~1
set PATH=%PYTHON%;%PYTHON%\Scripts;%PATH%

pytest
flake8

Use pytest and flake8 commands.

Use pytest and flake8 commands.


@REM ----------------------------------------------------------------------------
@REM Licensed to the Apache Software Foundation (ASF) under one
@REM or more contributor license agreements.  See the NOTICE file
@REM distributed with this work for additional information
@REM regarding copyright ownership.  The ASF licenses this file
@REM to you under the Apache License, Version 2.0 (the
@REM "License"); you may not use this file except in compliance
@REM with 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,
@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 ----------------------------------------------------------------------------
@REM Maven2 Start Up Batch script
@REM
@REM Required ENV vars:
@REM JAVA_HOME - location of a JDK home dir
@REM
@REM Optional ENV vars
@REM M2_HOME - location of maven2's installed home dir
@REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands
@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a key stroke before ending
@REM MAVEN_OPTS - parameters passed to the Java VM when running Maven
@REM     e.g. to debug Maven itself, use
@REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
@REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files
@REM ----------------------------------------------------------------------------

@REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on'
@echo off
@REM set title of command window
title %0
@REM enable echoing my setting MAVEN_BATCH_ECHO to 'on'
@if "%MAVEN_BATCH_ECHO%" == "on"  echo %MAVEN_BATCH_ECHO%

@REM set %HOME% to equivalent of $HOME
if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%")

@REM Execute a user defined script before this one
if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre
@REM check for pre script, once with legacy .bat ending and once with .cmd ending
if exist "%HOME%\mavenrc_pre.bat" call "%HOME%\mavenrc_pre.bat"
if exist "%HOME%\mavenrc_pre.cmd" call "%HOME%\mavenrc_pre.cmd"
:skipRcPre

@setlocal

set ERROR_CODE=0

@REM To isolate internal variables from possible post scripts, we use another setlocal
@setlocal

@REM ==== START VALIDATION ====
if not "%JAVA_HOME%" == "" goto OkJHome

echo.
echo Error: JAVA_HOME not found in your environment. >&2
echo Please set the JAVA_HOME variable in your environment to match the >&2
echo location of your Java installation. >&2
echo.
goto error

:OkJHome
if exist "%JAVA_HOME%\bin\java.exe" goto init

echo.
echo Error: JAVA_HOME is set to an invalid directory. >&2
echo JAVA_HOME = "%JAVA_HOME%" >&2
echo Please set the JAVA_HOME variable in your environment to match the >&2
echo location of your Java installation. >&2
echo.
goto error

@REM ==== END VALIDATION ====

:init

@REM Find the project base dir, i.e. the directory that contains the folder ".mvn".
@REM Fallback to current working directory if not found.

set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR%
IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir

set EXEC_DIR=%CD%
set WDIR=%EXEC_DIR%
:findBaseDir
IF EXIST "%WDIR%"\.mvn goto baseDirFound
cd ..
IF "%WDIR%"=="%CD%" goto baseDirNotFound
set WDIR=%CD%
goto findBaseDir

:baseDirFound
set MAVEN_PROJECTBASEDIR=%WDIR%
cd "%EXEC_DIR%"
goto endDetectBaseDir

:baseDirNotFound
set MAVEN_PROJECTBASEDIR=%EXEC_DIR%
cd "%EXEC_DIR%"

:endDetectBaseDir

IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig

@setlocal EnableExtensions EnableDelayedExpansion
for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a
@endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS%

:endReadAdditionalConfig

SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe"
set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar"
set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain

set DOWNLOAD_URL="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.4.2/maven-wrapper-0.4.2.jar"
FOR /F "tokens=1,2 delims==" %%A IN (%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties) DO (
    IF "%%A"=="wrapperUrl" SET DOWNLOAD_URL=%%B
)

@REM Extension to allow automatically downloading the maven-wrapper.jar from Maven-central
@REM This allows using the maven wrapper in projects that prohibit checking in binary data.
if exist %WRAPPER_JAR% (
    echo Found %WRAPPER_JAR%
) else (
    echo Couldn't find %WRAPPER_JAR%, downloading it ...
	echo Downloading from: %DOWNLOAD_URL%

    powershell -Command "&{"^
		"$webclient = new-object System.Net.WebClient;"^
		"if (-not ([string]::IsNullOrEmpty('%MVNW_WRAPPER_AUTH_USERNAME%') -and [string]::IsNullOrEmpty('%MVNW_WRAPPER_AUTH_PASSWORD%'))) {"^
		"$webclient.Credentials = new-object System.Net.NetworkCredential('%MVNW_WRAPPER_AUTH_USERNAME%', '%MVNW_WRAPPER_AUTH_PASSWORD%');"^
		"}"^
		"$webclient.DownloadFile('%DOWNLOAD_URL%', '%WRAPPER_JAR%')"^
		"}"
    echo Finished downloading %WRAPPER_JAR%
)
@REM End of extension

%MAVEN_JAVA_EXE% %JVM_CONFIG_MAVEN_PROPS% %MAVEN_OPTS% %MAVEN_DEBUG_OPTS% -classpath %WRAPPER_JAR% "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %*
if ERRORLEVEL 1 goto error
goto end

:error
set ERROR_CODE=1

:end
@endlocal & set ERROR_CODE=%ERROR_CODE%

if not "%MAVEN_SKIP_RC%" == "" goto skipRcPost
@REM check for post script, once with legacy .bat ending and once with .cmd ending
if exist "%HOME%\mavenrc_post.bat" call "%HOME%\mavenrc_post.bat"
if exist "%HOME%\mavenrc_post.cmd" call "%HOME%\mavenrc_post.cmd"
:skipRcPost

@REM pause the script if MAVEN_BATCH_PAUSE is set to 'on'
if "%MAVEN_BATCH_PAUSE%" == "on" pause

if "%MAVEN_TERMINATE_CMD%" == "on" exit %ERROR_CODE%

exit /B %ERROR_CODE%

@REM ----------------------------------------------------------------------------
@REM Licensed to the Apache Software Foundation (ASF) under one
@REM or more contributor license agreements.  See the NOTICE file
@REM distributed with this work for additional information
@REM regarding copyright ownership.  The ASF licenses this file
@REM to you under the Apache License, Version 2.0 (the
@REM "License"); you may not use this file except in compliance
@REM with 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,
@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 ----------------------------------------------------------------------------
@REM Maven2 Start Up Batch script
@REM
@REM Required ENV vars:
@REM JAVA_HOME - location of a JDK home dir
@REM
@REM Optional ENV vars
@REM M2_HOME - location of maven2's installed home dir
@REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands
@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a key stroke before ending
@REM MAVEN_OPTS - parameters passed to the Java VM when running Maven
@REM     e.g. to debug Maven itself, use
@REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
@REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files
@REM ----------------------------------------------------------------------------

@REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on'
@echo off
@REM set title of command window
title %0
@REM enable echoing my setting MAVEN_BATCH_ECHO to 'on'
@if "%MAVEN_BATCH_ECHO%" == "on"  echo %MAVEN_BATCH_ECHO%

@REM set %HOME% to equivalent of $HOME
if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%")

@REM Execute a user defined script before this one
if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre
@REM check for pre script, once with legacy .bat ending and once with .cmd ending
if exist "%HOME%\mavenrc_pre.bat" call "%HOME%\mavenrc_pre.bat"
if exist "%HOME%\mavenrc_pre.cmd" call "%HOME%\mavenrc_pre.cmd"
:skipRcPre

@setlocal

set ERROR_CODE=0

@REM To isolate internal variables from possible post scripts, we use another setlocal
@setlocal

@REM ==== START VALIDATION ====
if not "%JAVA_HOME%" == "" goto OkJHome

echo.
echo Error: JAVA_HOME not found in your environment. >&2
echo Please set the JAVA_HOME variable in your environment to match the >&2
echo location of your Java installation. >&2
echo.
goto error

:OkJHome
if exist "%JAVA_HOME%\bin\java.exe" goto init

echo.
echo Error: JAVA_HOME is set to an invalid directory. >&2
echo JAVA_HOME = "%JAVA_HOME%" >&2
echo Please set the JAVA_HOME variable in your environment to match the >&2
echo location of your Java installation. >&2
echo.
goto error

@REM ==== END VALIDATION ====

:init

@REM Find the project base dir, i.e. the directory that contains the folder ".mvn".
@REM Fallback to current working directory if not found.

set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR%
IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir

set EXEC_DIR=%CD%
set WDIR=%EXEC_DIR%
:findBaseDir
IF EXIST "%WDIR%"\.mvn goto baseDirFound
cd ..
IF "%WDIR%"=="%CD%" goto baseDirNotFound
set WDIR=%CD%
goto findBaseDir

:baseDirFound
set MAVEN_PROJECTBASEDIR=%WDIR%
cd "%EXEC_DIR%"
goto endDetectBaseDir

:baseDirNotFound
set MAVEN_PROJECTBASEDIR=%EXEC_DIR%
cd "%EXEC_DIR%"

:endDetectBaseDir

IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig

@setlocal EnableExtensions EnableDelayedExpansion
for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a
@endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS%

:endReadAdditionalConfig

SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe"
set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar"
set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain

set DOWNLOAD_URL="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.4.2/maven-wrapper-0.4.2.jar"
FOR /F "tokens=1,2 delims==" %%A IN ("%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties") DO (
    IF "%%A"=="wrapperUrl" SET DOWNLOAD_URL=%%B
)

@REM Extension to allow automatically downloading the maven-wrapper.jar from Maven-central
@REM This allows using the maven wrapper in projects that prohibit checking in binary data.
if exist %WRAPPER_JAR% (
    echo Found %WRAPPER_JAR%
) else (
    echo Couldn't find %WRAPPER_JAR%, downloading it ...
	echo Downloading from: %DOWNLOAD_URL%

    powershell -Command "&{"^
		"$webclient = new-object System.Net.WebClient;"^
		"if (-not ([string]::IsNullOrEmpty('%MVNW_WRAPPER_AUTH_USERNAME%') -and [string]::IsNullOrEmpty('%MVNW_WRAPPER_AUTH_PASSWORD%'))) {"^
		"$webclient.Credentials = new-object System.Net.NetworkCredential('%MVNW_WRAPPER_AUTH_USERNAME%', '%MVNW_WRAPPER_AUTH_PASSWORD%');"^
		"}"^
		"$webclient.DownloadFile('%DOWNLOAD_URL%', '%WRAPPER_JAR%')"^
		"}"
    echo Finished downloading %WRAPPER_JAR%
)
@REM End of extension

%MAVEN_JAVA_EXE% %JVM_CONFIG_MAVEN_PROPS% %MAVEN_OPTS% %MAVEN_DEBUG_OPTS% -classpath %WRAPPER_JAR% "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %*
if ERRORLEVEL 1 goto error
goto end

:error
set ERROR_CODE=1

:end
@endlocal & set ERROR_CODE=%ERROR_CODE%

if not "%MAVEN_SKIP_RC%" == "" goto skipRcPost
@REM check for post script, once with legacy .bat ending and once with .cmd ending
if exist "%HOME%\mavenrc_post.bat" call "%HOME%\mavenrc_post.bat"
if exist "%HOME%\mavenrc_post.cmd" call "%HOME%\mavenrc_post.cmd"
:skipRcPost

@REM pause the script if MAVEN_BATCH_PAUSE is set to 'on'
if "%MAVEN_BATCH_PAUSE%" == "on" pause

if "%MAVEN_TERMINATE_CMD%" == "on" exit %ERROR_CODE%

exit /B %ERROR_CODE%

use quoted string for filepath

use quoted string for filepath

to avoid 'file not found' message from Windows if path contains a space


@echo off

set VERSION="0.4.3"
set PYTHON="C:\Python26\python.exe"
set MAKENSIS="H:\developement\nsis\makensis.exe"

cd ..\..\interfaces\desktop
rem %PYTHON% setup.py py2exe

cd ..\..\dist\nsis
%MAKENSIS% make_installer.nsi

cd ..\..\
mkdir output
mkdir output\%VERSION%
move alfanousInstaller.exe output\%VERSION%\alfanousInstallerV%VERSION%.exe
rmdir /s /q interfaces\desktop\dist

echo "end."
pause

@echo off

set VERSION="0.7"
set PYTHON="C:\Python27\python.exe"
set MAKENSIS="C:\Programmes\NSIS\makensis.exe"
set ALFANOUSDESKTOP="..\..\src\alfanous-desktop"
set OUTPUTFOLDER="..\..\output"

rem Compile AlfanousDesktop to a binary executable file
%PYTHON% %ALFANOUSDESKTOP%\setup.py py2exe

rem Build the installer
%MAKENSIS% make_installer.nsi

rem Copy the new generated installer to output folder
mkdir %OUTPUTFOLDER%\%VERSION%
move alfanousInstaller.exe %OUTPUTFOLDER%\%VERSION%\alfanousInstallerV%VERSION%.exe
rmdir /s /q .\dist

echo "end."
pause

update the bat script for nsis installer generating

Former-commit-id: 12978aef1f8748b76e73e6de2c7bcad3d2da0e27


if "%ACC%" == "" goto emptyacc
if "%SEPARATOR%" == "" goto noseparator
set ACC=%ACC%%SEPARATOR%%1
goto end

:noseparator
set ACC=%ACC% %1
goto end

:emptyacc
set ACC=%1
goto end

:end

if not defined ACC goto emptyacc
if "%SEPARATOR%" == "" goto noseparator
set ACC=%ACC%%SEPARATOR%%1
goto end

:noseparator
set ACC=%ACC% %1
goto end

:emptyacc
set ACC=%1
goto end

:end

Support = signs in accumulator.

Support = signs in accumulator.


@if defined ELIXIR_CLI_ECHO (@echo on) else (@echo off)
setlocal
if    ""%1""==""""       goto documentation
if /I ""%1""==""--help"" goto documentation
if /I ""%1""==""-h""     goto documentation
if /I ""%1""==""/h""     goto documentation
if    ""%1""==""/?""     goto documentation
goto parseopts

:documentation
echo Usage: %~nx0 [options] [.exs file] [data]
echo.
echo   -e COMMAND                  Evaluates the given command (*)
echo   -r FILE                     Requires the given files/patterns (*)
echo   -S SCRIPT                   Finds and executes the given script in PATH
echo   -pr FILE                    Requires the given files/patterns in parallel (*)
echo   -pa PATH                    Prepends the given path to Erlang code path (*)
echo   -pz PATH                    Appends the given path to Erlang code path (*)
echo.
echo   --app APP                   Starts the given app and its dependencies (*)
echo   --cookie COOKIE             Sets a cookie for this distributed node
echo   --detached                  Starts the Erlang VM detached from console
echo   --erl SWITCHES              Switches to be passed down to Erlang (*)
echo   --help, -h                  Prints this message and exits
echo   --hidden                    Makes a hidden node
echo   --logger-otp-reports BOOL   Enables or disables OTP reporting
echo   --logger-sasl-reports BOOL  Enables or disables SASL reporting
echo   --name NAME                 Makes and assigns a name to the distributed node
echo   --no-halt                   Does not halt the Erlang VM after execution
echo   --sname NAME                Makes and assigns a short name to the distributed node
echo   --version, -v               Prints Elixir version and exits
echo   --werl                      Uses Erlang's Windows shell GUI
echo.
echo ** Options marked with (*) can be given more than once
echo ** Options given after the .exs file or -- are passed down to the executed code
echo ** Options can be passed to the Erlang runtime using ELIXIR_ERL_OPTIONS or --erl
goto end

:parseopts

rem Parameters for Erlang
set parsErlang=

rem Make sure we keep a copy of all parameters
set allPars=%*

rem Get the original path name from the batch file
set originPath=%~dp0

rem Optional parameters before the "-extra" parameter
set beforeExtra=

rem Option which determines whether or not to use werl vs erl
set useWerl=0

rem Designates which mode / Elixir component to run as
set runMode="elixir"

rem Recursive loop called for each parameter that parses the cmd line parameters
:startloop
set par="%1"
shift
if "%par%"=="" (
  rem if no parameters defined
  goto expand_erl_libs
)
if "%par%"=="""" (
  rem if no parameters defined - special case for parameter that is already quoted
  goto expand_erl_libs
)
rem ******* EXECUTION OPTIONS **********************
if "%par%"==""--werl"" (set useWerl=1)
if "%par%"==""+iex"" (set runMode="iex")
rem ******* ELIXIR PARAMETERS **********************
rem Note: we don't have to do anything with options that don't take an argument
if """"=="%par:-e=%"      (shift)
if """"=="%par:-r=%"      (shift)
if """"=="%par:-pr=%"     (shift)
if """"=="%par:-pa=%"     (shift)
if """"=="%par:-pz=%"     (shift)
if """"=="%par:--app=%"   (shift)
if """"=="%par:--remsh=%" (shift)
rem ******* ERLANG PARAMETERS **********************
if """"=="%par:--detached=%"            (set parsErlang=%parsErlang% -detached)
if """"=="%par:--hidden=%"              (set parsErlang=%parsErlang% -hidden)
if """"=="%par:--cookie=%"              (set parsErlang=%parsErlang% -setcookie %1 && shift)
if """"=="%par:--sname=%"               (set parsErlang=%parsErlang% -sname %1 && shift)
if """"=="%par:--name=%"                (set parsErlang=%parsErlang% -name %1 && shift)
if """"=="%par:--logger-otp-reports=%"  (set parsErlang=%parsErlang% -logger handle_otp_reports %1 && shift)
if """"=="%par:--logger-sasl-reports=%" (set parsErlang=%parsErlang% -logger handle_sasl_reports %1 && shift)
if """"=="%par:--erl=%"                 (set "beforeExtra=%beforeExtra% %~1" && shift)
goto:startloop

rem ******* assume all pre-params are parsed ********************
:expand_erl_libs
rem ******* expand all ebin paths as Windows does not support the ..\*\ebin wildcard ********************
setlocal enabledelayedexpansion
set ext_libs=
for  /d %%d in ("%originPath%..\lib\*.") do (
  set ext_libs=!ext_libs! -pa "%%~fd\ebin"
)
setlocal disabledelayedexpansion

:run
if not %runMode% == "iex" (
  set beforeExtra=-noshell -s elixir start_cli %beforeExtra%
)
if %useWerl% equ 1 (
  start werl.exe %ext_libs% %ELIXIR_ERL_OPTIONS% %parsErlang% %beforeExtra% -extra %*
) else (
  erl.exe %ext_libs% %ELIXIR_ERL_OPTIONS% %parsErlang% %beforeExtra% -extra %*
)
:end
endlocal

@if defined ELIXIR_CLI_ECHO (@echo on) else (@echo off)
setlocal
if    ""%1""==""""       goto documentation
if /I ""%1""==""--help"" goto documentation
if /I ""%1""==""-h""     goto documentation
if /I ""%1""==""/h""     goto documentation
if    ""%1""==""/?""     goto documentation
goto parseopts

:documentation
echo Usage: %~nx0 [options] [.exs file] [data]
echo.
echo   -e COMMAND                  Evaluates the given command (*)
echo   -r FILE                     Requires the given files/patterns (*)
echo   -S SCRIPT                   Finds and executes the given script in PATH
echo   -pr FILE                    Requires the given files/patterns in parallel (*)
echo   -pa PATH                    Prepends the given path to Erlang code path (*)
echo   -pz PATH                    Appends the given path to Erlang code path (*)
echo.
echo   --app APP                   Starts the given app and its dependencies (*)
echo   --cookie COOKIE             Sets a cookie for this distributed node
echo   --detached                  Starts the Erlang VM detached from console
echo   --erl SWITCHES              Switches to be passed down to Erlang (*)
echo   --help, -h                  Prints this message and exits
echo   --hidden                    Makes a hidden node
echo   --logger-otp-reports BOOL   Enables or disables OTP reporting
echo   --logger-sasl-reports BOOL  Enables or disables SASL reporting
echo   --name NAME                 Makes and assigns a name to the distributed node
echo   --no-halt                   Does not halt the Erlang VM after execution
echo   --sname NAME                Makes and assigns a short name to the distributed node
echo   --version, -v               Prints Elixir version and exits
echo   --werl                      Uses Erlang's Windows shell GUI
echo.
echo ** Options marked with (*) can be given more than once
echo ** Options given after the .exs file or -- are passed down to the executed code
echo ** Options can be passed to the Erlang runtime using ELIXIR_ERL_OPTIONS or --erl
goto end

:parseopts

rem Parameters for Erlang
set parsErlang=

rem Make sure we keep a copy of all parameters
set allPars=%*

rem Get the original path name from the batch file
set originPath=%~dp0

rem Optional parameters before the "-extra" parameter
set beforeExtra=

rem Option which determines whether to use werl or erl
set useWerl=0

rem Designates which mode / Elixir component to run as
set runMode="elixir"

rem Recursive loop called for each parameter that parses the cmd line parameters
:startloop
set par="%1"
shift
if "%par%"=="" (
  rem if no parameters defined
  goto expand_erl_libs
)
if "%par%"=="""" (
  rem if no parameters defined - special case for parameter that is already quoted
  goto expand_erl_libs
)
rem ******* EXECUTION OPTIONS **********************
if "%par%"==""--werl"" (set useWerl=1)
if "%par%"==""+iex"" (set runMode="iex")
rem ******* ELIXIR PARAMETERS **********************
rem Note: we don't have to do anything with options that don't take an argument
if """"=="%par:-e=%"      (shift)
if """"=="%par:-r=%"      (shift)
if """"=="%par:-pr=%"     (shift)
if """"=="%par:-pa=%"     (shift)
if """"=="%par:-pz=%"     (shift)
if """"=="%par:--app=%"   (shift)
if """"=="%par:--remsh=%" (shift)
rem ******* ERLANG PARAMETERS **********************
if """"=="%par:--detached=%"            (set parsErlang=%parsErlang% -detached)
if """"=="%par:--hidden=%"              (set parsErlang=%parsErlang% -hidden)
if """"=="%par:--cookie=%"              (set parsErlang=%parsErlang% -setcookie %1 && shift)
if """"=="%par:--sname=%"               (set parsErlang=%parsErlang% -sname %1 && shift)
if """"=="%par:--name=%"                (set parsErlang=%parsErlang% -name %1 && shift)
if """"=="%par:--logger-otp-reports=%"  (set parsErlang=%parsErlang% -logger handle_otp_reports %1 && shift)
if """"=="%par:--logger-sasl-reports=%" (set parsErlang=%parsErlang% -logger handle_sasl_reports %1 && shift)
if """"=="%par:--erl=%"                 (set "beforeExtra=%beforeExtra% %~1" && shift)
goto:startloop

rem ******* assume all pre-params are parsed ********************
:expand_erl_libs
rem ******* expand all ebin paths as Windows does not support the ..\*\ebin wildcard ********************
setlocal enabledelayedexpansion
set ext_libs=
for  /d %%d in ("%originPath%..\lib\*.") do (
  set ext_libs=!ext_libs! -pa "%%~fd\ebin"
)
setlocal disabledelayedexpansion

:run
if not %runMode% == "iex" (
  set beforeExtra=-noshell -s elixir start_cli %beforeExtra%
)
if %useWerl% equ 1 (
  start werl.exe %ext_libs% %ELIXIR_ERL_OPTIONS% %parsErlang% %beforeExtra% -extra %*
) else (
  erl.exe %ext_libs% %ELIXIR_ERL_OPTIONS% %parsErlang% %beforeExtra% -extra %*
)
:end
endlocal

Rephrase useWerl option in elixir.bat (#8559)


echo ON

conda build toolchain -c statiskit -c conda-forge
if %errorlevel% neq 0 exit /b %errorlevel%
conda install toolchain --use-local -c statiskit -c conda-forge
if %errorlevel% neq 0 exit /b %errorlevel%
activate %CONDA_DEFAULT_ENV%
if %errorlevel% neq 0 exit /b %errorlevel%

conda build boost_build -c statiskit -c conda-forge
if %errorlevel% neq 0 exit /b %errorlevel%
conda install boost_build --use-local -c statiskit -c conda-forge
if %errorlevel% neq 0 exit /b %errorlevel%

conda build libboost_python -c statiskit -c conda-forge
if %errorlevel% neq 0 exit /b %errorlevel%
conda install libboost_python --use-local -c statiskit -c conda-forge
if %errorlevel% neq 0 exit /b %errorlevel%

conda build python-scons -c statiskit
if %errorlevel% neq 0 exit /b %errorlevel%
conda install python-scons --use-local -c statiskit -c conda-forge
if %errorlevel% neq 0 exit /b %errorlevel%

conda build python-parse -c statiskit
if %errorlevel% neq 0 exit /b %errorlevel%
conda install python-parse --use-local -c statiskit -c conda-forge
if %errorlevel% neq 0 exit /b %errorlevel%

Create bld.bat

Create bld.bat


rem /*##############################################################################
rem
rem     Copyright (C) 2011 HPCC Systems.
rem
rem     All rights reserved. This program is free software: you can redistribute it and/or modify
rem     it under the terms of the GNU Affero General Public License as
rem     published by the Free Software Foundation, either version 3 of the
rem     License, or (at your option) any later version.
rem
rem     This program is distributed in the hope that it will be useful,
rem     but WITHOUT ANY WARRANTY; without even the implied warranty of
rem     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
rem     GNU Affero General Public License for more details.
rem
rem     You should have received a copy of the GNU Affero General Public License
rem     along with this program.  If not, see <http://www.gnu.org/licenses/>.
rem ############################################################################## */
set SENTINEL="eclccserver.sentinel"
:start
start /wait eclccserver
if exist %SENTINEL% (
    sleep 5
    goto start
)

exit 0

rem /*##############################################################################
rem
rem     Copyright (C) 2011 HPCC Systems.
rem
rem     All rights reserved. This program is free software: you can redistribute it and/or modify
rem     it under the terms of the GNU Affero General Public License as
rem     published by the Free Software Foundation, either version 3 of the
rem     License, or (at your option) any later version.
rem
rem     This program is distributed in the hope that it will be useful,
rem     but WITHOUT ANY WARRANTY; without even the implied warranty of
rem     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
rem     GNU Affero General Public License for more details.
rem
rem     You should have received a copy of the GNU Affero General Public License
rem     along with this program.  If not, see <http://www.gnu.org/licenses/>.
rem ############################################################################## */
set SENTINEL=eclccserver.sentinel
:start
start /wait eclccserver
if exist %SENTINEL% (
    sleep 5
    goto start
)

exit 0

Fix #420 Remove quotes from Sentinel filenames

Double quotes around sentinel filenames in the start/stop.bat files
are being passed on to the Windows CreateFile() api, which fails and
the components do not start.
Removed double quotes to eliminate the problem, and tested to ensure
specification of filespecs (including filespecs with embedded spaces)
works correctly

Signed-off-by: William Whitehead <9d69611803ea426c9da0f43b4e04fcc22652476d@lexisnexis.com>


@echo off

SET cleanParameter=clean
SET cleanAllParamter=cleanAll

SET firstParameter=%1
if %firstParameter% EQU %cleanAllParamter% (
	echo "cleanAll not implemented"
) else if %firstParameter% EQU %cleanParameter% (
	echo "clean not implemented"
) else (
	goto:createProject
)

pause
goto:eof

::--------------------------------------------------------
::-- Function section starts below here
::--------------------------------------------------------

:createProject
SET mypath=%~dp0
set platformsFolder=platforms
set platformName=%*

set folder=%mypath%\%platformsFolder%\%platformName%

if not exist %folder% (mkdir %folder%)

cd %folder%

rem call cmake
cmake.exe %mypath% -G%platformName%

cd %mypath%
goto:eof

@echo off

SET cleanParameter=clean
SET cleanAllParamter=cleanAll
SET mypath=%~dp0
set platformsFolder=projects

SET firstParameter=%1
if %firstParameter% EQU %cleanAllParamter% (
	goto:cleanAll
) else if %firstParameter% EQU %cleanParameter% (
	goto:clean
) else (
	goto:createProject
)

pause
goto:eof

::--------------------------------------------------------
::-- Function section starts below here
::--------------------------------------------------------

:createProject

set platformName=%*

set folder=%mypath%\%platformsFolder%\%platformName%

if not exist %folder% (mkdir %folder%)

cd %folder%

rem call cmake
cmake.exe %mypath% -G%platformName%

cd %mypath%
goto:eof

:cleanAll
RMDIR /S /Q "%mypath%\%platformsFolder%"
goto:eof

:clean
set platformName=%2
set folder=%mypath%\%platformsFolder%\%platformName%
if not exist %folder% (goto:eof)

RMDIR /S /Q %folder%
goto:eof

add clean and cleanAll functions in projectCreator.bat


@echo off
REM This file is part of the Zephir.
REM
REM (c) Zephir Team <team@zephir-lang.com>
REM
REM For the full copyright and license information, please view the LICENSE
REM file that was distributed with this source code.
cls

if "%PHP_PEAR_PHP_BIN%" neq "" (
	set PHPBIN=%PHP_PEAR_PHP_BIN%
) else set PHPBIN=php

SET mypath=%~dp0
echo %mypath:~0,-1%
"%PHPBIN%" "%mypath%\zephir" %*

@echo off
rem This file is part of the Zephir.
rem
rem (c) Zephir Team <team@zephir-lang.com>
rem
rem For the full copyright and license information, please view the LICENSE
rem file that was distributed with this source code.
cls

if "%PHP_PEAR_PHP_BIN%" neq "" (
	set PHPBIN=%PHP_PEAR_PHP_BIN%
) else set PHPBIN=php

SET mypath=%~dp0
echo %mypath:~0,-1%
"%PHPBIN%" "%mypath%\zephir" %*

Correct code style for batch file

Correct code style for batch file


@echo off
SET CURDIR=%CD%

Set /P version=Enter release version number (e.g. 1.2.3):
If "%version%"=="" goto :err
goto:noerr

:err
echo No release version entered
goto:end

:noerr
SET SRC=https://metageta.googlecode.com/svn/trunk
SET DST=https://metageta.googlecode.com/svn/tags/%version%

svn copy %SRC% %DST% -m "Tagging version %version%"
svn checkout --depth=empty %DST% %TEMP%\metageta-%version%
cd %TEMP%\metageta-%version%
svn propset displayversion %version% .
svn propset version %version%.$Revision$ .
svn commit -m "Updating version properties %version%"
cd %CURDIR%
del /f /q %TEMP%\metageta-%version%

:end
pause

@echo off
SET CURDIR=%CD%

Set /P version=Enter release version number (e.g. 1.2.3):
If "%version%"=="" goto :err
goto:noerr

:err
echo No release version entered
goto:end

:noerr
SET SRC=https://metageta.googlecode.com/svn/trunk
SET DST=https://metageta.googlecode.com/svn/tags/%version%

rmdir /s /q %TEMP%\metageta-%version% > nul 2>&1
svn copy %SRC% %DST% -m "Tagging version %version%"
svn checkout --depth=empty %DST% %TEMP%\metageta-%version%
cd %TEMP%\metageta-%version%
svn propset displayversion %version% .
svn propset version %version%.$Revision$ .
svn commit -m "Updating version properties %version%"
cd %CURDIR%
rem Sleep for 3 seconds
ping 127.0.0.1 -n 3 > nul 2>&1
rmdir /s /q %TEMP%\metageta-%version%

:end
pause

Fix tag_new_release.bat

Fix tag_new_release.bat


::
:: Author      : luke1987515@hotmail.com
:: Time        : 2020-07-20 18:31
:: Description : Remove bootable disk
:: Time        : 2018-07-10 09:12
:: Description : Add select disk after clear disk attributes fail
:: Time        : 2018-07-03 09:50
:: Description : Add offline
:: Time        : 2018-07-02 14:37
:: Description : Add clean
:: Time        : 2018-06-08 13:50
:: Description : Auto disk online tool
@echo off

:: Get Device list number
wmic diskdrive get Index > disk_list.tmp
echo. > disk_list_num.tmp
for /F "skip=1 tokens=1* delims=" %%A in ('type disk_list.tmp') DO (
    echo %%A  >> disk_list_num.tmp
)

:: Get bootable Device number
wmic path Win32_DiskPartition where "Bootable=True" get DiskIndex > boot_disk.tmp
echo. > boot_disk_num.tmp
for /F "skip=1 tokens=1* delims=" %%A in ('type boot_disk.tmp') DO (
    echo %%A >> boot_disk_num.tmp
)

:: Remove bootable number from Device list number
type disk_list_num.tmp > no_boot_disk_num.tmp
for /F "usebackq" %%A in (boot_disk_num.tmp) do (
    findstr /v %%A no_boot_disk_num.tmp > no_boot_disk.tmp
	type no_boot_disk.tmp > no_boot_disk_num.tmp
)

:: Generate diskpart_conf file
echo. > diskpart_conf.tmp

set exist_list=0
set count=0

:: (for /F "usebackq eol= " %%a in ("file.tmp") do break) && echo has data || echo empty
(for /F "usebackq eol= " %%A in (no_boot_disk_num.tmp) do break) && set exist_list=1 || echo "No useable disk in System."

if %exist_list% == 1 (
    FOR /F "usebackq" %%i IN (no_boot_disk_num.tmp) DO (
      echo select disk %%i                      >> diskpart_conf.tmp
      echo offline disk noerr                   >> diskpart_conf.tmp
      echo attributes disk clear readonly noerr >> diskpart_conf.tmp
      echo select disk %%i                      >> diskpart_conf.tmp
      echo online disk noerr                    >> diskpart_conf.tmp
      echo clean                                >> diskpart_conf.tmp
      echo convert mbr noerr                    >> diskpart_conf.tmp
      set /A count=count+1
    )
) else (
    echo "No useable disk in System."
)

:: Do convent to MBR
if %exist_list% == 1 (
    echo.
    echo "Find %count% HDD!"
	echo "Find %count% HDD!"
    echo "Find %count% HDD!"
	echo "Start convent to MBR..."
	::diskpart /s diskpart_conf.tmp
    diskpart /s diskpart_conf.tmp
	echo "%count% useable disk in System."
) else (
    echo "No useable disk in System."
)

:: Delete tmp file
del /Q disk_list.tmp
del /Q disk_list_num.tmp

del /Q boot_disk.tmp
del /Q boot_disk_num.tmp

del /Q no_boot_disk.tmp
del /Q no_boot_disk_num.tmp

del /Q diskpart_conf.tmp

:: Run IOmeter
:: iometer.exe /c "60HDD_test.icf" /r "results_2018-06-08.csv"

:: Run FIO
:: fio_script.bat
:: Run 108 Disk in fio
:: 2020-07-08T09:02:04

:: Get Date & Time
set hh=%time:~0,2%
if "%time:~0,1%"==" " set hh=0%hh:~1,1%
set dt=%date:~0,4%-%date:~5,2%-%date:~8,2%_%hh%%time:~3,2%%time:~6,2%

:: Remove old fio
echo. > test.fio
echo. > test.log
del *.fio
del *.log

:: Create fio results_%dt%.csv
echo terse_version_3;fio_version;jobname;groupid;error;read_kb;read_bandwidth;read_iops;read_runtime_ms;read_slat_min;read_slat_max;read_slat_mean;read_slat_dev;read_clat_min;read_clat_max;read_clat_mean;read_clat_dev;read_clat_pct01;read_clat_pct02;read_clat_pct03;read_clat_pct04;read_clat_pct05;read_clat_pct06;read_clat_pct07;read_clat_pct08;read_clat_pct09;read_clat_pct10;read_clat_pct11;read_clat_pct12;read_clat_pct13;read_clat_pct14;read_clat_pct15;read_clat_pct16;read_clat_pct17;read_clat_pct18;read_clat_pct19;read_clat_pct20;read_tlat_min;read_lat_max;read_lat_mean;read_lat_dev;read_bw_min;read_bw_max;read_bw_agg_pct;read_bw_mean;read_bw_dev;write_kb;write_bandwidth;write_iops;write_runtime_ms;write_slat_min;write_slat_max;write_slat_mean;write_slat_dev;write_clat_min;write_clat_max;write_clat_mean;write_clat_dev;write_clat_pct01;write_clat_pct02;write_clat_pct03;write_clat_pct04;write_clat_pct05;write_clat_pct06;write_clat_pct07;write_clat_pct08;write_clat_pct09;write_clat_pct10;write_clat_pct11;write_clat_pct12;write_clat_pct13;write_clat_pct14;write_clat_pct15;write_clat_pct16;write_clat_pct17;write_clat_pct18;write_clat_pct19;write_clat_pct20;write_tlat_min;write_lat_max;write_lat_mean;write_lat_dev;write_bw_min;write_bw_max;write_bw_agg_pct;write_bw_mean;write_bw_dev;cpu_user;cpu_sys;cpu_csw;cpu_mjf;cpu_minf;iodepth_1;iodepth_2;iodepth_4;iodepth_8;iodepth_16;iodepth_32;iodepth_64;lat_2us;lat_4us;lat_10us;lat_20us;lat_50us;lat_100us;lat_250us;lat_500us;lat_750us;lat_1000us;lat_2ms;lat_4ms;lat_10ms;lat_20ms;lat_50ms;lat_100ms;lat_250ms;lat_500ms;lat_750ms;lat_1000ms;lat_2000ms;lat_over_2000ms;disk_name;disk_read_iops;disk_write_iops;disk_read_merges;disk_write_merges;disk_read_ticks;write_ticks;disk_queue_time;disk_util > results_%dt%.csv

:: Generate fio config
set rtime=30
:: set bs_list=1K 2K 4K 8K 16K 32K 64K 128K 256K 512K 1M 2M 4M 8M 16M 32M 64M 128M 256M 512M 1G 2G 4G
set bs_list=4K 8K 16K 32K 64K 128K 256K 512K
:: set rw_list=randread randwrite read write
set rw_list=read write
:: set QD_list=1 2 4 8 16 32 64 128 256 512
set QD_list=1 2 3 4
set NJ_list=1 2 3 4

for %%b in (%bs_list%) do (
    for %%r in (%rw_list%) do (
        for %%q in (%QD_list%) do (
            for %%n in (%NJ_list%) do (

                echo [global]        >> bs%%b_%%r_QD%%q_NJ%%n.fio
                echo ioengine=psync  >> bs%%b_%%r_QD%%q_NJ%%n.fio
                echo thread          >> bs%%b_%%r_QD%%q_NJ%%n.fio
                echo bs=%%b          >> bs%%b_%%r_QD%%q_NJ%%n.fio
                echo rw=%%r          >> bs%%b_%%r_QD%%q_NJ%%n.fio
                echo iodepth=%%q     >> bs%%b_%%r_QD%%q_NJ%%n.fio
                echo numjobs=%%n     >> bs%%b_%%r_QD%%q_NJ%%n.fio
                echo time_based      >> bs%%b_%%r_QD%%q_NJ%%n.fio
                echo runtime=%rtime% >> bs%%b_%%r_QD%%q_NJ%%n.fio
                echo group_reporting >> bs%%b_%%r_QD%%q_NJ%%n.fio

                FOR /F "usebackq" %%i IN (no_boot_disk_num.tmp) DO (
                    echo [bs%%b_%%r_QD%%q_NJ%%n]        >> bs%%b_%%r_QD%%q_NJ%%n.fio
                    echo filename=\\.\PHYSICALDRIVE%%i  >> bs%%b_%%r_QD%%q_NJ%%n.fio
                )

                fio bs%%b_%%r_QD%%q_NJ%%n.fio --output-format=terse --output=bs%%b_%%r_QD%%q_NJ%%n.log
                type bs%%b_%%r_QD%%q_NJ%%n.log    >> results_%dt%.csv
            )
        )
    )
)

::
:: Author      : luke1987515@hotmail.com
:: Time        : 2020-07-20 18:31
:: Description : Remove bootable disk
:: Time        : 2018-07-10 09:12
:: Description : Add select disk after clear disk attributes fail
:: Time        : 2018-07-03 09:50
:: Description : Add offline
:: Time        : 2018-07-02 14:37
:: Description : Add clean
:: Time        : 2018-06-08 13:50
:: Description : Auto disk online tool
@echo off

:: Get Device list number
wmic diskdrive get Index > disk_list.tmp
echo. > disk_list_num.tmp
for /F "skip=1 tokens=1* delims=" %%A in ('type disk_list.tmp') DO (
    echo %%A  >> disk_list_num.tmp
)

:: Get bootable Device number
wmic path Win32_DiskPartition where "Bootable=True" get DiskIndex > boot_disk.tmp
echo. > boot_disk_num.tmp
for /F "skip=1 tokens=1* delims=" %%A in ('type boot_disk.tmp') DO (
    echo %%A >> boot_disk_num.tmp
)

:: Remove bootable number from Device list number
type disk_list_num.tmp > no_boot_disk_num.tmp
for /F "usebackq" %%A in (boot_disk_num.tmp) do (
    findstr /v /rc:"^ *%%A *$" no_boot_disk_num.tmp > no_boot_disk.tmp
	type no_boot_disk.tmp > no_boot_disk_num.tmp
)

:: Generate diskpart_conf file
echo. > diskpart_conf.tmp

set exist_list=0
set count=0

:: (for /F "usebackq eol= " %%a in ("file.tmp") do break) && echo has data || echo empty
(for /F "usebackq eol= " %%A in (no_boot_disk_num.tmp) do break) && set exist_list=1 || echo "No useable disk in System."

if %exist_list% == 1 (
    FOR /F "usebackq" %%i IN (no_boot_disk_num.tmp) DO (
      echo select disk %%i                      >> diskpart_conf.tmp
      echo offline disk noerr                   >> diskpart_conf.tmp
      echo attributes disk clear readonly noerr >> diskpart_conf.tmp
      echo select disk %%i                      >> diskpart_conf.tmp
      echo online disk noerr                    >> diskpart_conf.tmp
      echo clean                                >> diskpart_conf.tmp
      echo convert mbr noerr                    >> diskpart_conf.tmp
      set /A count=count+1
    )
) else (
    echo "No useable disk in System."
)

:: Do convent to MBR
if %exist_list% == 1 (
    echo.
    echo "Find %count% HDD!"
	echo "Find %count% HDD!"
    echo "Find %count% HDD!"
	echo "Start convent to MBR..."
	::diskpart /s diskpart_conf.tmp
    diskpart /s diskpart_conf.tmp
	echo "%count% useable disk in System."
) else (
    echo "No useable disk in System."
)

:: Delete tmp file
del /Q disk_list.tmp
del /Q disk_list_num.tmp

del /Q boot_disk.tmp
del /Q boot_disk_num.tmp

del /Q no_boot_disk.tmp
del /Q no_boot_disk_num.tmp

del /Q diskpart_conf.tmp

:: Run IOmeter
:: iometer.exe /c "60HDD_test.icf" /r "results_2018-06-08.csv"

:: Run FIO
:: fio_script.bat
:: Run 108 Disk in fio
:: 2020-07-08T09:02:04

:: Get Date & Time
set hh=%time:~0,2%
if "%time:~0,1%"==" " set hh=0%hh:~1,1%
set dt=%date:~0,4%-%date:~5,2%-%date:~8,2%_%hh%%time:~3,2%%time:~6,2%

:: Remove old fio
echo. > test.fio
echo. > test.log
del *.fio
del *.log

:: Create fio results_%dt%.csv
echo terse_version_3;fio_version;jobname;groupid;error;read_kb;read_bandwidth;read_iops;read_runtime_ms;read_slat_min;read_slat_max;read_slat_mean;read_slat_dev;read_clat_min;read_clat_max;read_clat_mean;read_clat_dev;read_clat_pct01;read_clat_pct02;read_clat_pct03;read_clat_pct04;read_clat_pct05;read_clat_pct06;read_clat_pct07;read_clat_pct08;read_clat_pct09;read_clat_pct10;read_clat_pct11;read_clat_pct12;read_clat_pct13;read_clat_pct14;read_clat_pct15;read_clat_pct16;read_clat_pct17;read_clat_pct18;read_clat_pct19;read_clat_pct20;read_tlat_min;read_lat_max;read_lat_mean;read_lat_dev;read_bw_min;read_bw_max;read_bw_agg_pct;read_bw_mean;read_bw_dev;write_kb;write_bandwidth;write_iops;write_runtime_ms;write_slat_min;write_slat_max;write_slat_mean;write_slat_dev;write_clat_min;write_clat_max;write_clat_mean;write_clat_dev;write_clat_pct01;write_clat_pct02;write_clat_pct03;write_clat_pct04;write_clat_pct05;write_clat_pct06;write_clat_pct07;write_clat_pct08;write_clat_pct09;write_clat_pct10;write_clat_pct11;write_clat_pct12;write_clat_pct13;write_clat_pct14;write_clat_pct15;write_clat_pct16;write_clat_pct17;write_clat_pct18;write_clat_pct19;write_clat_pct20;write_tlat_min;write_lat_max;write_lat_mean;write_lat_dev;write_bw_min;write_bw_max;write_bw_agg_pct;write_bw_mean;write_bw_dev;cpu_user;cpu_sys;cpu_csw;cpu_mjf;cpu_minf;iodepth_1;iodepth_2;iodepth_4;iodepth_8;iodepth_16;iodepth_32;iodepth_64;lat_2us;lat_4us;lat_10us;lat_20us;lat_50us;lat_100us;lat_250us;lat_500us;lat_750us;lat_1000us;lat_2ms;lat_4ms;lat_10ms;lat_20ms;lat_50ms;lat_100ms;lat_250ms;lat_500ms;lat_750ms;lat_1000ms;lat_2000ms;lat_over_2000ms;disk_name;disk_read_iops;disk_write_iops;disk_read_merges;disk_write_merges;disk_read_ticks;write_ticks;disk_queue_time;disk_util > results_%dt%.csv

:: Generate fio config
set rtime=30
:: set bs_list=1K 2K 4K 8K 16K 32K 64K 128K 256K 512K 1M 2M 4M 8M 16M 32M 64M 128M 256M 512M 1G 2G 4G
set bs_list=4K 8K 16K 32K 64K 128K 256K 512K
:: set rw_list=randread randwrite read write
set rw_list=read write
:: set QD_list=1 2 4 8 16 32 64 128 256 512
set QD_list=1 2 3 4
set NJ_list=1 2 3 4

for %%b in (%bs_list%) do (
    for %%r in (%rw_list%) do (
        for %%q in (%QD_list%) do (
            for %%n in (%NJ_list%) do (

                echo [global]        >> bs%%b_%%r_QD%%q_NJ%%n.fio
                echo ioengine=psync  >> bs%%b_%%r_QD%%q_NJ%%n.fio
                echo thread          >> bs%%b_%%r_QD%%q_NJ%%n.fio
                echo bs=%%b          >> bs%%b_%%r_QD%%q_NJ%%n.fio
                echo rw=%%r          >> bs%%b_%%r_QD%%q_NJ%%n.fio
                echo iodepth=%%q     >> bs%%b_%%r_QD%%q_NJ%%n.fio
                echo numjobs=%%n     >> bs%%b_%%r_QD%%q_NJ%%n.fio
                echo time_based      >> bs%%b_%%r_QD%%q_NJ%%n.fio
                echo runtime=%rtime% >> bs%%b_%%r_QD%%q_NJ%%n.fio
                echo group_reporting >> bs%%b_%%r_QD%%q_NJ%%n.fio

                FOR /F "usebackq" %%i IN (no_boot_disk_num.tmp) DO (
                    echo [bs%%b_%%r_QD%%q_NJ%%n]        >> bs%%b_%%r_QD%%q_NJ%%n.fio
                    echo filename=\\.\PHYSICALDRIVE%%i  >> bs%%b_%%r_QD%%q_NJ%%n.fio
                )

                fio bs%%b_%%r_QD%%q_NJ%%n.fio --output-format=terse --output=bs%%b_%%r_QD%%q_NJ%%n.log
                type bs%%b_%%r_QD%%q_NJ%%n.log    >> results_%dt%.csv
            )
        )
    )
)

fix findstr get wrong String

fix  findstr get wrong String

findstr /v %%A no_boot_disk_num.tmp
> 0
> 10
> 20
> 30

findstr /v /rc:"^ *%%A *$" no_boot_disk_num.tmp
> 0


@echo off

SET appUrl="http://localhost:63342/BitwiseCmd/src/#clear"
SET confFile=e2e.chrome.js

FOR %%p IN (%*) DO (
    IF [%%p] == [all] SET confFile=e2e.all.js
    IF [%%p] == [build] SET appUrl="http://localhost:63342/BitwiseCmd/build/#clear"
    IF [%%p] == [deploy] SET appUrl="http://bitwisecmd.com/#clear"
)

@echo on

echo "appUrl: %appUrl%"
echo "confFile: %confFile%"

protractor tests\%confFile% --params.appUrl=%appUrl%

@echo off

SET appUrl="http://localhost:13270/src/#clear"
SET confFile=e2e.chrome.js

FOR %%p IN (%*) DO (
    IF [%%p] == [all] SET confFile=e2e.all.js
    IF [%%p] == [build] SET appUrl="http://localhost:63342/BitwiseCmd/build/#clear"
    IF [%%p] == [deploy] SET appUrl="http://bitwisecmd.com/#clear"
)

@echo on

echo "appUrl: %appUrl%"
echo "confFile: %confFile%"

protractor tests\%confFile% --params.appUrl=%appUrl%

change app url in e2e tests

change app url in e2e tests


call cleanall
call makedocs
call dosyncftp_docs
call buildall
call makedist
rem call makedist_navX-Micro
call dosyncftp
rem call dosyncftp_navX-Micro
call maven_deploy

call cleanall
call makedocs
call dosyncftp_docs
call buildall
call makedist
call makedist_navX-Micro
call dosyncftp
rem call dosyncftp_navX-Micro
call maven_deploy

Check in modified fullmake build file.

Check in modified fullmake build file.


@ECHO OFF

rem %~dp0 is the expanded pathname of the current script under NT
set LOCAL_FOP_HOME=
if "%OS%"=="Windows_NT" set LOCAL_FOP_HOME=%~dp0

rem Code from Apache Ant project
rem Slurp the command line arguments. This loop allows for an unlimited number
rem of arguments (up to the command line limit, anyway).
rem Could also do a "shift" and "%*" for all params, but apparently doesn't work
rem with Win9x.
set FOP_CMD_LINE_ARGS=%1
if ""%1""=="""" goto doneStart
shift
:setupArgs
if ""%1""=="""" goto doneStart
set FOP_CMD_LINE_ARGS=%FOP_CMD_LINE_ARGS% %1
shift
goto setupArgs
rem This label provides a place for the argument list loop to break out
rem and for NT handling to skip to.
:doneStart

set LOGCHOICE=
rem The default commons logger for JDK1.4 is JDK1.4Logger.
rem To use a different logger, uncomment the one desired below
rem set LOGCHOICE=-Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.NoOpLog
rem set LOGCHOICE=-Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.SimpleLog
rem set LOGCHOICE=-Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.Log4JLogger

set LOGLEVEL=
rem Logging levels
rem Below option is only if you are using SimpleLog instead of the default JDK1.4 Logger.
rem To set logging levels for JDK 1.4 Logger, edit the %JAVA_HOME%\JRE\LIB\logging.properties
rem file instead.
rem Possible SimpleLog values:  "trace", "debug", "info" (default), "warn", "error", or "fatal".
rem set LOGLEVEL=-Dorg.apache.commons.logging.simplelog.defaultlog=INFO

set LIBDIR=%LOCAL_FOP_HOME%lib

set LOCALCLASSPATH=%LOCAL_FOP_HOME%build\fop.jar
set LOCALCLASSPATH=%LOCALCLASSPATH%;%LOCAL_FOP_HOME%build\fop-sandbox.jar
set LOCALCLASSPATH=%LOCALCLASSPATH%;%LOCAL_FOP_HOME%build\fop-hyph.jar
set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\xml-apis-1.3.02.jar
set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\xercesImpl-2.7.1.jar
set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\xalan-2.7.0.jar
set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\serializer-2.7.0.jar
set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\batik-all-1.6.jar
set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\avalon-framework-4.2.0.jar
set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\commons-io-1.1.jar
set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\commons-logging-1.0.4.jar
set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\jimi-1.0.jar
set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\jai_core.jar
set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\jai_codec.jar
set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\fop-hyph.jar
set LOCALCLASSPATH=%LOCALCLASSPATH%;%FOP_HYPHENATION_PATH%

java %LOGCHOICE% %LOGLEVEL% -cp "%LOCALCLASSPATH%" org.apache.fop.cli.Main %FOP_CMD_LINE_ARGS%

correct line endings for fop commands

correct line endings for fop commands

git-svn-id: 102839466c3b40dd9c7e25c0a1a6d26afc40150a@375575 13f79535-47bb-0310-9956-ffa450edef68


C:\Python27\Scripts\pip.exe install -r requirements.txt --allow-external pypubsub
C:\Python27\Scripts\pip.exe install -r requirements-building.txt --allow-external pypubsub
cd iridaUploader/docs
C:\Python27\Scripts\sphinx-build -b html -d _build/doctrees   . _build/html
echo. 2>_build/__init__.py
echo. 2>_build/html/__init__.py
echo. 2>_build/html/_images/__init__.py
echo. 2>_build/html/_sources/__init__.py
echo. 2>_build/html/_static/__init__.py
cd ../..
C:\Python27\python.exe setup.py bdist_msi
move dist\* prerequisites
"C:\Program Files (x86)\NSIS\makensis.exe" "iridaUploader_installer.nsi"
PAUSE

C:\Python27\Scripts\pip.exe install -r requirements.txt --allow-external pypubsub || exit /b
C:\Python27\Scripts\pip.exe install -r requirements-building.txt --allow-external pypubsub || exit /b
cd iridaUploader/docs || exit /b
C:\Python27\Scripts\sphinx-build -b html -d _build/doctrees   . _build/html || exit /b
echo. 2>_build/__init__.py
echo. 2>_build/html/__init__.py
echo. 2>_build/html/_images/__init__.py
echo. 2>_build/html/_sources/__init__.py
echo. 2>_build/html/_static/__init__.py
cd ../..
C:\Python27\python.exe setup.py bdist_msi || exit /b
move dist\* prerequisites
"C:\Program Files (x86)\NSIS\makensis.exe" "iridaUploader_installer.nsi"
PAUSE

Add a 'set -e'-like fail on command failure for batch script.

Former-commit-id: 1bb3de4f7aab27c7069d97f43aa5ea73a901cea9


@echo off
if ["%1"] == ["/?"] goto:p_help
if ["%2"] == [""] echo Insufficient parameters. & goto:p_help
::validate alias
setlocal
for /f "delims== tokens=1" %%G in ("%*") do set _temp2=%%G

	set _temp=%_temp2: =%

if not ["%_temp%"] == ["%_temp2%"] (
	echo Your alias name can not contain a space
	endlocal
	goto:eof
)

echo %* >> "%CMDER_ROOT%\config\aliases"
doskey /macrofile="%CMDER_ROOT%\config\aliases"
perl "%CMDER_ROOT%\scripts\clean_aliases.pl"
echo Alias created
endlocal
goto:eof

:p_help
echo.Usage:
echo.	alias name=full command
echo.	$* allows the alias to assume all the parameters of the supplied command.
echo.	$1-$9 Allows you to seperate parameter by number, much like %%1 in batch.
echo.	$T is the command seperator, allowing you to string several commands together into one alias.
echo.	For more information, read DOSKEY/?

@echo off
if ["%1"] == ["/?"] goto:p_help
if ["%1"] == ["/reload"] goto:p_reload
if ["%2"] == [""] echo Insufficient parameters. & goto:p_help
::validate alias
setlocal
for /f "delims== tokens=1" %%G in ("%*") do set _temp2=%%G

	set _temp=%_temp2: =%

if not ["%_temp%"] == ["%_temp2%"] (
	echo Your alias name can not contain a space
	endlocal
	goto:eof
)

echo %* >> "%CMDER_ROOT%\config\aliases"
doskey /macrofile="%CMDER_ROOT%\config\aliases"
perl "%CMDER_ROOT%\scripts\clean_aliases.pl"
echo Alias created
endlocal
goto:eof

:p_reload
doskey /macrofile="%CMDER_ROOT%\config\aliases"
echo Aliases reloaded
goto:eof

:p_help
echo.Usage:
echo.	alias name=full command
echo.	$* allows the alias to assume all the parameters of the supplied command.
echo.	$1-$9 Allows you to seperate parameter by number, much like %%1 in batch.
echo.	$T is the command seperator, allowing you to string several commands together into one alias.
echo.	For more information, read DOSKEY/?

Add option to reload aliases from file

Add option to reload aliases from file

Add a quick way to reload the aliases file in the current shell using:

    alias /reload


@if "%SCM_TRACE_LEVEL%" NEQ "4" @echo off

:: ----------------------
:: KUDU Deployment Script
:: Version: 0.1.11
:: ----------------------

:: Prerequisites
:: -------------

:: Verify node.js installed
where node 2>nul >nul
IF %ERRORLEVEL% NEQ 0 (
  echo Missing node.js executable, please install node.js, if already installed make sure it can be reached from current environment.
  goto error
)

:: Setup
:: -----

setlocal enabledelayedexpansion

:: #region ORCHARD ENVIRONMENTAL VARIABLES
:: ------------
SET SITE_DIR=%~dp0%..
SET DEPLOYMENT_SOURCE=%~dp0%.
SET DEPLOYMENT_TARGET=%SITE_DIR%\wwwroot
SET DEPLOYMENT_TEMP="%DEPLOYMENT_SOURCE%\build\precompiled"
SET CLEAN_LOCAL_DEPLOYMENT_TEMP=true
:: #endregion ORCHARD ENVIRONMENTAL VARIABLES
:: ---------------

SET ARTIFACTS=%~dp0%..\artifacts

IF NOT DEFINED DEPLOYMENT_SOURCE (
  SET DEPLOYMENT_SOURCE=%~dp0%.
)

IF NOT DEFINED DEPLOYMENT_TARGET (
  SET DEPLOYMENT_TARGET=%ARTIFACTS%\wwwroot
)

IF NOT DEFINED NEXT_MANIFEST_PATH (
  SET NEXT_MANIFEST_PATH=%ARTIFACTS%\manifest

  IF NOT DEFINED PREVIOUS_MANIFEST_PATH (
    SET PREVIOUS_MANIFEST_PATH=%ARTIFACTS%\manifest
  )
)

IF NOT DEFINED KUDU_SYNC_CMD (
  :: Install kudu sync
  echo Installing Kudu Sync
  call npm install kudusync -g --silent
  IF !ERRORLEVEL! NEQ 0 goto error

  :: Locally just running "kuduSync" would also work
  SET KUDU_SYNC_CMD=%appdata%\npm\kuduSync.cmd
)
IF NOT DEFINED DEPLOYMENT_TEMP (
  SET DEPLOYMENT_TEMP=%temp%\___deployTemp%random%
  SET CLEAN_LOCAL_DEPLOYMENT_TEMP=true
)

IF DEFINED CLEAN_LOCAL_DEPLOYMENT_TEMP (
  IF EXIST "%DEPLOYMENT_TEMP%" rd /s /q "%DEPLOYMENT_TEMP%"
  mkdir "%DEPLOYMENT_TEMP%"
)

IF NOT DEFINED MSBUILD_PATH (
  SET MSBUILD_PATH=%WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild.exe
)

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: Deployment
:: ----------

echo Handling .NET Web Application deployment.

:: 1. Restore NuGet packages
IF /I "src\Orchard.sln" NEQ "" (
  call :ExecuteCmd nuget restore "%DEPLOYMENT_SOURCE%\src\Orchard.sln"
  IF !ERRORLEVEL! NEQ 0 goto error
)

:: 2. Build to the temporary path
IF /I "%IN_PLACE_DEPLOYMENT%" NEQ "1" (
  call :ExecuteCmd "%MSBUILD_PATH%" "%DEPLOYMENT_SOURCE%\Orchard.proj" /nologo /verbosity:m /t:Precompiled /p:AutoParameterizationWebConfigConnectionStrings=false;Configuration=Release /p:SolutionDir="%DEPLOYMENT_SOURCE%\src\\" %SCM_BUILD_ARGS%
) ELSE (
  call :ExecuteCmd "%MSBUILD_PATH%" "%DEPLOYMENT_SOURCE%\Orchard.proj" /nologo /verbosity:m /t:Build /p:AutoParameterizationWebConfigConnectionStrings=false;Configuration=Release /p:SolutionDir="%DEPLOYMENT_SOURCE%\src\\" %SCM_BUILD_ARGS%
)

IF !ERRORLEVEL! NEQ 0 goto error

:: 3. KuduSync
IF /I "%IN_PLACE_DEPLOYMENT%" NEQ "1" (
  call :ExecuteCmd "%KUDU_SYNC_CMD%" -v 50 -f "%DEPLOYMENT_TEMP%" -t "%DEPLOYMENT_TARGET%" -n "%NEXT_MANIFEST_PATH%" -p "%PREVIOUS_MANIFEST_PATH%" -i ".git;.hg;.deployment;deploy.cmd"
  IF !ERRORLEVEL! NEQ 0 goto error
)

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

:: Post deployment stub
IF DEFINED POST_DEPLOYMENT_ACTION call "%POST_DEPLOYMENT_ACTION%"
IF !ERRORLEVEL! NEQ 0 goto error

goto end

:: Execute command routine that will echo out when error
:ExecuteCmd
setlocal
set _CMD_=%*
call %_CMD_%
if "%ERRORLEVEL%" NEQ "0" echo Failed exitCode=%ERRORLEVEL%, command=%_CMD_%
exit /b %ERRORLEVEL%

:error
endlocal
echo An error has occurred during web site deployment.
call :exitSetErrorLevel
call :exitFromFunction 2>nul

:exitSetErrorLevel
exit /b 1

:exitFromFunction
()

:end
endlocal
echo Finished successfully.

@if "%SCM_TRACE_LEVEL%" NEQ "4" @echo off

:: ----------------------
:: KUDU Deployment Script
:: Version: 0.1.11
:: ----------------------

:: Prerequisites
:: -------------

:: Verify node.js installed
where node 2>nul >nul
IF %ERRORLEVEL% NEQ 0 (
  echo Missing node.js executable, please install node.js, if already installed make sure it can be reached from current environment.
  goto error
)

:: Setup
:: -----

setlocal enabledelayedexpansion

:: #region ORCHARD ENVIRONMENTAL VARIABLES
:: ------------
SET SITE_DIR=%~dp0%..
SET DEPLOYMENT_SOURCE=%~dp0%.
SET DEPLOYMENT_TARGET=%SITE_DIR%\wwwroot
SET DEPLOYMENT_TEMP="%DEPLOYMENT_SOURCE%\build\precompiled"
SET CLEAN_LOCAL_DEPLOYMENT_TEMP=true
:: #endregion ORCHARD ENVIRONMENTAL VARIABLES
:: ---------------

SET ARTIFACTS=%SITE_DIR%\artifacts

:: #region For local testing, create artifacts dir
:: ------------
IF NOT EXIST ARTIFACTS (
  echo Not exists
  echo Making dir
  mkdir ARTIFACTS
  pause > nul
  exit /b
)
:: ------------
:: #endregion

IF NOT DEFINED DEPLOYMENT_SOURCE (
  SET DEPLOYMENT_SOURCE=%~dp0%.
)

IF NOT DEFINED DEPLOYMENT_TARGET (
  SET DEPLOYMENT_TARGET=%ARTIFACTS%\wwwroot
)

IF NOT DEFINED NEXT_MANIFEST_PATH (
  SET NEXT_MANIFEST_PATH=%ARTIFACTS%\manifest

  IF NOT DEFINED PREVIOUS_MANIFEST_PATH (
    SET PREVIOUS_MANIFEST_PATH=%ARTIFACTS%\manifest
  )
)

IF NOT DEFINED KUDU_SYNC_CMD (
  :: Install kudu sync
  echo Installing Kudu Sync
  call npm install kudusync -g --silent
  IF !ERRORLEVEL! NEQ 0 goto error

  :: Locally just running "kuduSync" would also work
  SET KUDU_SYNC_CMD=%appdata%\npm\kuduSync.cmd
)
IF NOT DEFINED DEPLOYMENT_TEMP (
  SET DEPLOYMENT_TEMP=%temp%\___deployTemp%random%
  SET CLEAN_LOCAL_DEPLOYMENT_TEMP=true
)

IF DEFINED CLEAN_LOCAL_DEPLOYMENT_TEMP (
  IF EXIST "%DEPLOYMENT_TEMP%" rd /s /q "%DEPLOYMENT_TEMP%"
  mkdir "%DEPLOYMENT_TEMP%"
)

IF NOT DEFINED MSBUILD_PATH (
  SET MSBUILD_PATH=%WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild.exe
)

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: Deployment
:: ----------

echo Handling .NET Web Application deployment.

:: 1. Restore NuGet packages
IF /I "src\Orchard.sln" NEQ "" (
  call :ExecuteCmd nuget restore "%DEPLOYMENT_SOURCE%\src\Orchard.sln"
  IF !ERRORLEVEL! NEQ 0 goto error
)

:: 2. Build to the temporary path
IF /I "%IN_PLACE_DEPLOYMENT%" NEQ "1" (
  call :ExecuteCmd "%MSBUILD_PATH%" "%DEPLOYMENT_SOURCE%\Orchard.proj" /nologo /verbosity:m /t:Precompiled /p:AutoParameterizationWebConfigConnectionStrings=false;Configuration=Release /p:SolutionDir="%DEPLOYMENT_SOURCE%\src\\" %SCM_BUILD_ARGS%
) ELSE (
  call :ExecuteCmd "%MSBUILD_PATH%" "%DEPLOYMENT_SOURCE%\Orchard.proj" /nologo /verbosity:m /t:Build /p:AutoParameterizationWebConfigConnectionStrings=false;Configuration=Release /p:SolutionDir="%DEPLOYMENT_SOURCE%\src\\" %SCM_BUILD_ARGS%
)

IF !ERRORLEVEL! NEQ 0 goto error

:: 3. KuduSync
IF /I "%IN_PLACE_DEPLOYMENT%" NEQ "1" (
  call :ExecuteCmd "%KUDU_SYNC_CMD%" -v 50 -f "%DEPLOYMENT_TEMP%" -t "%DEPLOYMENT_TARGET%" -n "%NEXT_MANIFEST_PATH%" -p "%PREVIOUS_MANIFEST_PATH%" -i ".git;.hg;.deployment;deploy.cmd"
  IF !ERRORLEVEL! NEQ 0 goto error
)

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

:: Post deployment stub
IF DEFINED POST_DEPLOYMENT_ACTION call "%POST_DEPLOYMENT_ACTION%"
IF !ERRORLEVEL! NEQ 0 goto error

goto end

:: Execute command routine that will echo out when error
:ExecuteCmd
setlocal
set _CMD_=%*
call %_CMD_%
if "%ERRORLEVEL%" NEQ "0" echo Failed exitCode=%ERRORLEVEL%, command=%_CMD_%
exit /b %ERRORLEVEL%

:error
endlocal
echo An error has occurred during web site deployment.
pause > nul
call :exitSetErrorLevel
call :exitFromFunction 2>nul

:exitSetErrorLevel
exit /b 1

:exitFromFunction
()

:end
endlocal
echo Finished successfully.

Make ../artifacts dir if not exists

Make ../artifacts dir if not exists


@echo off
pushd %cd%
%~d0
cd %~dp0
cd ..

if exist %USERPROFILE%\_vimrc goto GVIMRC
echo let ^&runtimepath = printf('%%s,%%s', '%CD%\vim\vimfiles', ^&runtimepath) > %USERPROFILE%\_vimrc
echo source %CD%\dotfiles\vim\vimrc >> %USERPROFILE%\_vimrc

:GVIMRC
if exist %USERPROFILE%\_gvimrc goto END
echo source %CD%\dotfiles\vim\gvimrc > %USERPROFILE%\_gvimrc

:END
popd

@echo off
pushd %cd%
%~d0
cd %~dp0
cd ..

if exist %USERPROFILE%\_vimrc goto GVIMRC
echo set rtp+=%CD%\dotfiles\vim> %USERPROFILE%\_vimrc
echo set rtp+=%CD%\.vim>> %USERPROFILE%\_vimrc

REM echo let ^&runtimepath = printf('%%s,%%s', '%CD%\.vim\vimfiles', ^&runtimepath) >> %USERPROFILE%\_vimrc
echo source %CD%\dotfiles\vim\vimrc >> %USERPROFILE%\_vimrc

:GVIMRC
if exist %USERPROFILE%\_gvimrc goto END
echo source %CD%\dotfiles\vim\gvimrc > %USERPROFILE%\_gvimrc

:END
popd

Fix runtimepath setting in Windows bootstrap script.


@echo off
powershell -ExecutionPolicy ByPass -NoProfile -command "& """%~dp0eng\build.ps1""" -restore %*"

@echo off
powershell -ExecutionPolicy ByPass -NoProfile -command "& """%~dp0eng\build.ps1""" -restore  /p:RestoreUseStaticGraphEvaluation=true %*"

use static graph to reduce restore times


@echo off

rem figure out the folder name
set MONETDB=%~dp0

rem remove the final backslash from the path
set MONETDB=%MONETDB:~0,-1%

rem start the real server
"%MONETDB%\Mserver.bat" --dbinit="module(sql_server); mil_start();" %*

@echo off

setlocal

rem figure out the folder name
set MONETDB=%~dp0

rem remove the final backslash from the path
set MONETDB=%MONETDB:~0,-1%

rem start the real server

if exist "%MONETDB%\M5server.bat" goto m5server
"%MONETDB%\Mserver.bat" --dbinit="module(sql_server); sql_server_start();" %*

:m5server
"%MONETDB%\M5server.bat" --dbinit="include sql; sql_start();" %*

endlocal

Change the bat MSQLserver to support either M4 or M5 installation.


@echo off
setlocal enableextensions

goto entry

:usage
  echo usage: bolt [-h^|--help] [-V^|--version]
  echo     or bolt MODE [^<args^>]
  echo.
  echo modes:
  echo   init
  echo   build
  echo   test
  echo   help
  echo.
  echo For usage/help on a specific module, use:
  echo   bolt help MODE

  exit /b 0

:fail_usage
  echo.
  call :usage
  exit /b 1

:fail
  exit /b 1

:version
  for /F " delims=" %%i in (%base%version) do set v=%%i
  echo bolt %v%
  exit /b 0

:entry

set base=%~dp0

if "%~1"=="" echo error: must specify mode. && goto fail_usage

set mode=%~1
shift

if "%mode%"=="init" goto done_mode_validation
if "%mode%"=="build" goto done_mode_validation
if "%mode%"=="test" goto done_mode_validation
if "%mode%"=="help" goto done_mode_validation
if "%mode%"=="-h" call :usage && exit /b 0
if "%mode%"=="--help" call :usage && exit /b 0
if "%mode%"=="-V" call :version && exit /b 0
if "%mode%"=="--version" call :version && exit /b 0

echo invalid mode [%mode%], must be one of init^|build^|test^|help
goto fail_usage

:done_mode_validation

if not "%mode%"=="help" goto run_mode

set help_mode=true
set mode=%~1
shift

if "%mode%"=="init" goto run_mode
if "%mode%"=="build" goto run_mode
if "%mode%"=="test" goto run_mode

echo help requires argument: bolt help MODE, where MODE is one of init^|build^|test
exit /b 2

:run_mode

:inline_remaining
if "%~1"=="" goto end_inline_remaining
set remaining=%remaining% "%~1"
shift
goto :inline_remaining
:end_inline_remaining

call %base%bolt-%mode%.subr.bat %remaining%
exit /b %errorlevel%

@echo off
setlocal enableextensions

goto entry

:usage
  echo usage: bolt [-h^|--help] [-V^|--version]
  echo     or bolt MODE [^<args^>]
  echo.
  echo modes:
  echo   init
  echo   build
  echo   test
  echo   help
  echo.
  echo For usage/help on a specific module, use:
  echo   bolt help MODE

  exit /b 0

:fail_usage
  echo.
  call :usage
  exit /b 1

:fail
  exit /b 1

:version
  for /F " delims=" %%i in (%base%version) do set v=%%i
  echo bolt %v%
  exit /b 0

:entry

set base=%~dp0

if "%~1"=="" echo error: must specify mode. && goto fail_usage

set mode=%~1
shift

if "%mode%"=="init" goto done_mode_validation
if "%mode%"=="build" goto done_mode_validation
if "%mode%"=="test" goto done_mode_validation
if "%mode%"=="help" goto done_mode_validation
if "%mode%"=="-h" call :usage && exit /b 0
if "%mode%"=="--help" call :usage && exit /b 0
if "%mode%"=="-V" call :version && exit /b 0
if "%mode%"=="--version" call :version && exit /b 0

echo invalid mode [%mode%], must be one of init^|build^|test^|help
goto fail_usage

:done_mode_validation

if not "%mode%"=="help" goto run_mode

set help_mode=true
set mode=%~1
shift

if "%mode%"=="init" goto run_mode
if "%mode%"=="build" goto run_mode
if "%mode%"=="test" goto run_mode

echo help requires argument: bolt help MODE, where MODE is one of init^|build^|test
exit /b 2

:run_mode

:inline_remaining
if "%~1"=="" goto end_inline_remaining
set remaining=%remaining% "%~1"
shift
goto inline_remaining
:end_inline_remaining

call %base%bolt-%mode%.subr.bat %remaining%
exit /b %errorlevel%

Fix goto

Fix goto


@echo off
if not defined APPVEYOR goto :else1
  if not exist D:\ goto :else2
    set PYTHONDONTWRITEBYTECODE=1
    set PYPY_USESSION_DIR=D:\
    set TEMP=D:\
    set TMP=D:\
    goto :endif2
  :else2
    echo "Running on appveyor, but there is no drive D."
    fsutil fsinfo drives
    echo "Maybe you want to put the tempdir where the pagefile is (assuming that is the fastest drive)"
    powershell -NonInteractive -command "& { gwmi -computer . Win32_PageFileUsage }"
  :endif2
  goto :endif1
:else1
  echo "Not running this on appveyor? You should use .build\build.py"
:endif1

if not defined buildscript (
  echo You need to set the buildscript var
  set errorlevel=1
  goto :endofscript
)

set BINURL=https://www.hpi.uni-potsdam.de/hirschfeld/artefacts/rsqueak/rsqueak-win32-%APPVEYOR_REPO_COMMIT%.exe
if %buildscript%==jittests.py (
  echo Downloding %BINURL% for jittests
  appveyor DownloadFile -Url %BINURL% -FileName $~dp0\..\rsqueak.exe
  if errorlevel 1 (
    echo Download failed, cannot run jittests
    set errorlevel=1
    goto :endofscript
  )
)

@echo on
rem C:\Python27\python %~dp0\..\.build\%buildscript%

rem if %buildscript%==build.py (
rem   copy %~dp0\..\rsqueak.exe %~dp0\..\rsqueak-win32-%APPVEYOR_REPO_COMMIT%.exe
rem   powershell -NonInteractive -executionpolicy Unrestricted -command "& { %~dp0\rsqueak-upload.ps1 }"
rem )

:endofscript

@echo off
if not defined APPVEYOR goto :else1
  if not exist D:\ goto :else2
    set PYTHONDONTWRITEBYTECODE=1
    set PYPY_USESSION_DIR=D:\
    set TEMP=D:\
    set TMP=D:\
    goto :endif2
  :else2
    echo "Running on appveyor, but there is no drive D."
    fsutil fsinfo drives
    echo "Maybe you want to put the tempdir where the pagefile is (assuming that is the fastest drive)"
    powershell -NonInteractive -command "& { gwmi -computer . Win32_PageFileUsage }"
  :endif2
  goto :endif1
:else1
  echo "Not running this on appveyor? You should use .build\build.py"
:endif1

if not defined buildscript (
  echo You need to set the buildscript var
  set errorlevel=1
  goto :endofscript
)

set BINURL=https://www.hpi.uni-potsdam.de/hirschfeld/artefacts/rsqueak/rsqueak-win32-%APPVEYOR_REPO_COMMIT%.exe
if %buildscript%==jittests.py (
  echo Downloding %BINURL% for jittests
  appveyor DownloadFile -Url %BINURL% -FileName $~dp0\..\rsqueak.exe
  if errorlevel 1 (
    echo Download failed, cannot run jittests
    set errorlevel=1
    goto :endofscript
  )
)

@echo on
C:\Python27\python %~dp0\..\.build\%buildscript%

if %buildscript%==build.py (
  copy %~dp0\..\rsqueak.exe %~dp0\..\rsqueak-win32-%APPVEYOR_REPO_COMMIT%.exe
  powershell -NonInteractive -executionpolicy Unrestricted -command "& { %~dp0\rsqueak-upload.ps1 }"
)

:endofscript

Update rsqueak-build.bat

Update rsqueak-build.bat


REM install_program_manager_test_db.bat

"C:\Program Files\PostgreSQL\9.6\bin\psql.exe" -h localhost -U postgres  -p 5432 -f create_program_manager_test_db.sql 1> install_program_manager_test_db.log 2>&1

"C:\Program Files\PostgreSQL\9.6\bin\psql.exe" -h localhost -U postgres -d program_manager_test_db  -p 5432 -f install_pgcrypto.sql  1>> install_program_manager_test_db.log 2>>&1

REM install the schema
"C:\Program Files\PostgreSQL\9.6\bin\psql.exe" -h localhost -U postgres -d program_manager_test_db  -p 5432 -f C:\funda_components\system_user\system_user_database\create_system_user_schema.sql  1>> install_program_manager_test_db.log 2>>&1

REM install the objects
"C:\Program Files\PostgreSQL\9.6\bin\psql.exe" -h localhost -U postgres -d program_manager_test_db  -p 5432 -f C:\funda_components\system_user\system_user_database\table_definitions\system_users.sql  1>> install_program_manager_test_db.log 2>>&1

"C:\Program Files\PostgreSQL\9.6\bin\psql.exe" -h localhost -U postgres -d program_manager_test_db  -p 5432 -f C:\funda_components\system_user\system_user_database\table_definitions\system_users_history.sql  1>> install_program_manager_test_db.log 2>>&1

"C:\Program Files\PostgreSQL\9.6\bin\psql.exe" -h localhost -U postgres -d program_manager_test_db  -p 5432 -f C:\funda_components\system_user\system_user_database\table_definitions\system_user_state.sql 1>> install_program_manager_test_db.log 2>>&1

"C:\Program Files\PostgreSQL\9.6\bin\psql.exe" -h localhost -U postgres -d program_manager_test_db  -p 5432 -f C:\funda_components\system_user\system_user_database\table_definitions\system_user_state_history.sql 1>> install_program_manager_test_db.log 2>>&1

"C:\Program Files\PostgreSQL\9.6\bin\psql.exe" -h localhost -U postgres -d program_manager_test_db  -p 5432 -f C:\funda_components\system_user\system_user_database\table_definitions\system_actions.sql 1>> install_program_manager_test_db.log 2>>&1

"C:\Program Files\PostgreSQL\9.6\bin\psql.exe" -h localhost -U postgres -d program_manager_test_db  -p 5432 -f C:\funda_components\system_user\system_user_database\table_definitions\system_user_allowed_actions.sql 1>> install_program_manager_test_db.log 2>>&1

"C:\Program Files\PostgreSQL\9.6\bin\psql.exe" -h localhost -U postgres -d program_manager_test_db  -p 5432 -f C:\funda_components\system_user\system_user_database\table_definitions\system_user_allowed_actions_history.sql 1>> install_program_manager_test_db.log 2>>&1

"C:\Program Files\PostgreSQL\9.6\bin\psql.exe" -h localhost -U postgres -d program_manager_test_db  -p 5432 -f C:\funda_components\system_user\system_user_database\action_functions\action_add_new_user.sql 1>> install_program_manager_test_db.log 2>>&1

"C:\Program Files\PostgreSQL\9.6\bin\psql.exe" -h localhost -U postgres -d program_manager_test_db  -p 5432 -f C:\funda_components\system_user\system_user_database\action_functions\action_change_password.sql 1>> install_program_manager_test_db.log 2>>&1

"C:\Program Files\PostgreSQL\9.6\bin\psql.exe" -h localhost -U postgres -d program_manager_test_db  -p 5432 -f C:\funda_components\system_user\system_user_database\action_functions\action_change_user_allowed_actions.sql 1>> install_program_manager_test_db.log 2>>&1

"C:\Program Files\PostgreSQL\9.6\bin\psql.exe" -h localhost -U postgres -d program_manager_test_db  -p 5432 -f C:\funda_components\system_user\system_user_database\action_functions\action_user_login.sql 1>> install_program_manager_test_db.log 2>>&1

"C:\Program Files\PostgreSQL\9.6\bin\psql.exe" -h localhost -U postgres -d program_manager_test_db  -p 5432 -f C:\funda_components\system_user\system_user_database\action_functions\action_user_logout.sql 1>> install_program_manager_test_db.log 2>>&1

"C:\Program Files\PostgreSQL\9.6\bin\psql.exe" -h localhost -U postgres -d program_manager_test_db  -p 5432 -f C:\funda_components\system_user\system_user_database\action_functions\action_list_users.sql 1>> install_program_manager_test_db.log 2>>&1

"C:\Program Files\PostgreSQL\9.6\bin\psql.exe" -h localhost -U postgres -d program_manager_test_db  -p 5432 -f C:\funda_components\system_user\system_user_database\utility_functions\util_get_user_state.sql 1>> install_program_manager_test_db.log 2>>&1

"C:\Program Files\PostgreSQL\9.6\bin\psql.exe" -h localhost -U postgres -d program_manager_test_db  -p 5432 -f C:\funda_components\system_user\system_user_database\utility_functions\util_is_user_authorized.sql 1>> install_program_manager_test_db.log 2>>&1

"C:\Program Files\PostgreSQL\9.6\bin\psql.exe" -h localhost -U postgres -d program_manager_test_db  -p 5432 -f C:\funda_components\system_user\system_user_database\utility_functions\trig_log_state_history.sql 1>> install_program_manager_test_db.log 2>>&1

"C:\Program Files\PostgreSQL\9.6\bin\psql.exe" -h localhost -U postgres -d program_manager_test_db  -p 5432 -f C:\funda_components\system_user\system_user_database\utility_functions\trig_log_allowed_actions_history.sql 1>> install_program_manager_test_db.log 2>>&1

"C:\Program Files\PostgreSQL\9.6\bin\psql.exe" -h localhost -U postgres -d program_manager_test_db  -p 5432 -f C:\funda_components\system_user\system_user_database\utility_functions\trig_log_user_history.sql 1>> install_program_manager_test_db.log 2>>&1

"C:\Program Files\PostgreSQL\9.6\bin\psql.exe" -h localhost -U postgres -d program_manager_test_db  -p 5432 -f C:\funda_components\system_user\system_user_database\utility_functions\insert_master_user_actions_for_a_service.sql 1>> install_program_manager_test_db.log 2>>&1

"C:\Program Files\PostgreSQL\9.6\bin\psql.exe" -h localhost -U postgres -d program_manager_test_db  -p 5432 -f C:\funda_components\system_user\system_user_database\utility_functions\install_master_user.sql 1>> install_program_manager_test_db.log 2>>&1

REM install the programs_manager_schema
"C:\Program Files\PostgreSQL\9.6\bin\psql.exe" -h localhost -U postgres -d program_manager_test_db  -p 5432 -f C:\funda_components\programs_manager\programs_manager_database\create_programs_manager_schema.sql  1>> install_program_manager_test_db.log 2>>&1

"C:\Program Files\PostgreSQL\9.6\bin\psql.exe" -h localhost -U postgres -d program_manager_test_db  -p 5432 -f C:\funda_components\programs_manager\programs_manager_database\table_definitions\insert_system_actions_for_prgrm_mngr.sql  1>> install_program_manager_test_db.log 2>>&1

REM Install the programs_manager_schema objects

REM Install the tables
"C:\Program Files\PostgreSQL\9.6\bin\psql.exe" -h localhost -U postgres -d program_manager_test_db  -p 5432 -f C:\funda_components\programs_manager\programs_manager_database\table_definitions\organizations.sql  1>> install_program_manager_test_db.log 2>>&1

"C:\Program Files\PostgreSQL\9.6\bin\psql.exe" -h localhost -U postgres -d program_manager_test_db  -p 5432 -f C:\funda_components\programs_manager\programs_manager_database\table_definitions\organizations_history.sql  1>> install_program_manager_test_db.log 2>>&1

"C:\Program Files\PostgreSQL\9.6\bin\psql.exe" -h localhost -U postgres -d program_manager_test_db  -p 5432 -f C:\funda_components\programs_manager\programs_manager_database\table_definitions\organization_level.sql  1>> install_program_manager_test_db.log 2>>&1

"C:\Program Files\PostgreSQL\9.6\bin\psql.exe" -h localhost -U postgres -d program_manager_test_db  -p 5432 -f C:\funda_components\programs_manager\programs_manager_database\table_definitions\organization_level_history.sql  1>> install_program_manager_test_db.log 2>>&1

"C:\Program Files\PostgreSQL\9.6\bin\psql.exe" -h localhost -U postgres -d program_manager_test_db  -p 5432 -f C:\funda_components\programs_manager\programs_manager_database\table_definitions\programs.sql  1>> install_program_manager_test_db.log 2>>&1

"C:\Program Files\PostgreSQL\9.6\bin\psql.exe" -h localhost -U postgres -d program_manager_test_db  -p 5432 -f C:\funda_components\programs_manager\programs_manager_database\table_definitions\programs_history.sql  1>> install_program_manager_test_db.log 2>>&1

REM Install tnhe master user
"C:\Program Files\PostgreSQL\9.6\bin\psql.exe" -h localhost -U postgres -d program_manager_test_db  -p 5432 -f C:\funda_components\system_user\system_user_database\utility_functions\run_install_master_user.sql 1>> install_program_manager_test_db.log 2>>&1

REM install_program_manager_test_db.bat

"C:\Program Files\PostgreSQL\9.6\bin\psql.exe" -h localhost -U postgres  -p 5432 -f create_program_manager_test_db.sql 1> install_program_manager_test_db.log 2>&1

"C:\Program Files\PostgreSQL\9.6\bin\psql.exe" -h localhost -U postgres -d program_manager_test_db  -p 5432 -f install_pgcrypto.sql  1>> install_program_manager_test_db.log 2>>&1

REM install the schema
"C:\Program Files\PostgreSQL\9.6\bin\psql.exe" -h localhost -U postgres -d program_manager_test_db  -p 5432 -f C:\funda_components\system_user\system_user_database\create_system_user_schema.sql  1>> install_program_manager_test_db.log 2>>&1

REM install the objects
"C:\Program Files\PostgreSQL\9.6\bin\psql.exe" -h localhost -U postgres -d program_manager_test_db  -p 5432 -f C:\funda_components\system_user\system_user_database\table_definitions\system_users.sql  1>> install_program_manager_test_db.log 2>>&1

"C:\Program Files\PostgreSQL\9.6\bin\psql.exe" -h localhost -U postgres -d program_manager_test_db  -p 5432 -f C:\funda_components\system_user\system_user_database\table_definitions\system_users_history.sql  1>> install_program_manager_test_db.log 2>>&1

"C:\Program Files\PostgreSQL\9.6\bin\psql.exe" -h localhost -U postgres -d program_manager_test_db  -p 5432 -f C:\funda_components\system_user\system_user_database\table_definitions\system_user_state.sql 1>> install_program_manager_test_db.log 2>>&1

"C:\Program Files\PostgreSQL\9.6\bin\psql.exe" -h localhost -U postgres -d program_manager_test_db  -p 5432 -f C:\funda_components\system_user\system_user_database\table_definitions\system_user_state_history.sql 1>> install_program_manager_test_db.log 2>>&1

"C:\Program Files\PostgreSQL\9.6\bin\psql.exe" -h localhost -U postgres -d program_manager_test_db  -p 5432 -f C:\funda_components\system_user\system_user_database\table_definitions\system_actions.sql 1>> install_program_manager_test_db.log 2>>&1

"C:\Program Files\PostgreSQL\9.6\bin\psql.exe" -h localhost -U postgres -d program_manager_test_db  -p 5432 -f C:\funda_components\system_user\system_user_database\table_definitions\system_user_allowed_actions.sql 1>> install_program_manager_test_db.log 2>>&1

"C:\Program Files\PostgreSQL\9.6\bin\psql.exe" -h localhost -U postgres -d program_manager_test_db  -p 5432 -f C:\funda_components\system_user\system_user_database\table_definitions\system_user_allowed_actions_history.sql 1>> install_program_manager_test_db.log 2>>&1

"C:\Program Files\PostgreSQL\9.6\bin\psql.exe" -h localhost -U postgres -d program_manager_test_db  -p 5432 -f C:\funda_components\system_user\system_user_database\action_functions\action_add_new_user.sql 1>> install_program_manager_test_db.log 2>>&1

"C:\Program Files\PostgreSQL\9.6\bin\psql.exe" -h localhost -U postgres -d program_manager_test_db  -p 5432 -f C:\funda_components\system_user\system_user_database\action_functions\action_change_password.sql 1>> install_program_manager_test_db.log 2>>&1

"C:\Program Files\PostgreSQL\9.6\bin\psql.exe" -h localhost -U postgres -d program_manager_test_db  -p 5432 -f C:\funda_components\system_user\system_user_database\action_functions\action_change_user_allowed_actions.sql 1>> install_program_manager_test_db.log 2>>&1

"C:\Program Files\PostgreSQL\9.6\bin\psql.exe" -h localhost -U postgres -d program_manager_test_db  -p 5432 -f C:\funda_components\system_user\system_user_database\action_functions\action_user_login.sql 1>> install_program_manager_test_db.log 2>>&1

"C:\Program Files\PostgreSQL\9.6\bin\psql.exe" -h localhost -U postgres -d program_manager_test_db  -p 5432 -f C:\funda_components\system_user\system_user_database\action_functions\action_user_logout.sql 1>> install_program_manager_test_db.log 2>>&1

"C:\Program Files\PostgreSQL\9.6\bin\psql.exe" -h localhost -U postgres -d program_manager_test_db  -p 5432 -f C:\funda_components\system_user\system_user_database\action_functions\action_list_users.sql 1>> install_program_manager_test_db.log 2>>&1

"C:\Program Files\PostgreSQL\9.6\bin\psql.exe" -h localhost -U postgres -d program_manager_test_db  -p 5432 -f C:\funda_components\system_user\system_user_database\utility_functions\util_get_user_state.sql 1>> install_program_manager_test_db.log 2>>&1

"C:\Program Files\PostgreSQL\9.6\bin\psql.exe" -h localhost -U postgres -d program_manager_test_db  -p 5432 -f C:\funda_components\system_user\system_user_database\utility_functions\util_is_user_authorized.sql 1>> install_program_manager_test_db.log 2>>&1

"C:\Program Files\PostgreSQL\9.6\bin\psql.exe" -h localhost -U postgres -d program_manager_test_db  -p 5432 -f C:\funda_components\system_user\system_user_database\utility_functions\trig_log_state_history.sql 1>> install_program_manager_test_db.log 2>>&1

"C:\Program Files\PostgreSQL\9.6\bin\psql.exe" -h localhost -U postgres -d program_manager_test_db  -p 5432 -f C:\funda_components\system_user\system_user_database\utility_functions\trig_log_allowed_actions_history.sql 1>> install_program_manager_test_db.log 2>>&1

"C:\Program Files\PostgreSQL\9.6\bin\psql.exe" -h localhost -U postgres -d program_manager_test_db  -p 5432 -f C:\funda_components\system_user\system_user_database\utility_functions\trig_log_user_history.sql 1>> install_program_manager_test_db.log 2>>&1

"C:\Program Files\PostgreSQL\9.6\bin\psql.exe" -h localhost -U postgres -d program_manager_test_db  -p 5432 -f C:\funda_components\system_user\system_user_database\utility_functions\insert_master_user_actions_for_a_service.sql 1>> install_program_manager_test_db.log 2>>&1

"C:\Program Files\PostgreSQL\9.6\bin\psql.exe" -h localhost -U postgres -d program_manager_test_db  -p 5432 -f C:\funda_components\system_user\system_user_database\utility_functions\install_master_user.sql 1>> install_program_manager_test_db.log 2>>&1

REM install the programs_manager_schema
"C:\Program Files\PostgreSQL\9.6\bin\psql.exe" -h localhost -U postgres -d program_manager_test_db  -p 5432 -f C:\funda_components\programs_manager\programs_manager_database\create_programs_manager_schema.sql  1>> install_program_manager_test_db.log 2>>&1

"C:\Program Files\PostgreSQL\9.6\bin\psql.exe" -h localhost -U postgres -d program_manager_test_db  -p 5432 -f C:\funda_components\programs_manager\programs_manager_database\table_definitions\insert_system_actions_for_prgrm_mngr.sql  1>> install_program_manager_test_db.log 2>>&1

REM Install the programs_manager_schema objects

REM Install the tables
"C:\Program Files\PostgreSQL\9.6\bin\psql.exe" -h localhost -U postgres -d program_manager_test_db  -p 5432 -f C:\funda_components\programs_manager\programs_manager_database\table_definitions\organizations.sql  1>> install_program_manager_test_db.log 2>>&1

"C:\Program Files\PostgreSQL\9.6\bin\psql.exe" -h localhost -U postgres -d program_manager_test_db  -p 5432 -f C:\funda_components\programs_manager\programs_manager_database\table_definitions\organizations_history.sql  1>> install_program_manager_test_db.log 2>>&1

"C:\Program Files\PostgreSQL\9.6\bin\psql.exe" -h localhost -U postgres -d program_manager_test_db  -p 5432 -f C:\funda_components\programs_manager\programs_manager_database\table_definitions\organization_level.sql  1>> install_program_manager_test_db.log 2>>&1

"C:\Program Files\PostgreSQL\9.6\bin\psql.exe" -h localhost -U postgres -d program_manager_test_db  -p 5432 -f C:\funda_components\programs_manager\programs_manager_database\table_definitions\organization_level_history.sql  1>> install_program_manager_test_db.log 2>>&1

"C:\Program Files\PostgreSQL\9.6\bin\psql.exe" -h localhost -U postgres -d program_manager_test_db  -p 5432 -f C:\funda_components\programs_manager\programs_manager_database\table_definitions\programs.sql  1>> install_program_manager_test_db.log 2>>&1

"C:\Program Files\PostgreSQL\9.6\bin\psql.exe" -h localhost -U postgres -d program_manager_test_db  -p 5432 -f C:\funda_components\programs_manager\programs_manager_database\table_definitions\programs_history.sql  1>> install_program_manager_test_db.log 2>>&1

REM Install action functions
REM "C:\Program Files\PostgreSQL\9.6\bin\psql.exe" -h localhost -U postgres -d program_manager_test_db  -p 5432 -f C:\funda_components\programs_manager\programs_manager_database\action_functions\action_enter_edit_organizations.sql  1>> install_program_manager_test_db.log 2>>&1

REM Install tnhe master user
"C:\Program Files\PostgreSQL\9.6\bin\psql.exe" -h localhost -U postgres -d program_manager_test_db  -p 5432 -f C:\funda_components\system_user\system_user_database\utility_functions\run_install_master_user.sql 1>> install_program_manager_test_db.log 2>>&1

add code for action functions

add code for action functions


mkdir ..\Output
hg id > ..\Output\changeset.id

Create a file ..\Output\changeset.id that contains the changeset ID.


rem This needed for pkg-config to detect pcl and eigen3 pc files
set PKG_CONFIG_PATH=%LIBRARY_LIB%\pkgconfig

rem Renames necessary for python-pcl to detect the libraries it needs
for %%x in (io registration segmentation features filters sample_consensus surface search kdtree octree common) do (
    copy %LIBRARY_LIB%\pcl_%%x_release.lib %LIBRARY_LIB%\pcl_%%x.lib
    if errorlevel 1 exit 1
)

copy %LIBRARY_LIB%\flann_cpp_s.lib %LIBRARY_LIB%\flann_cpp.lib
if errorlevel 1 exit 1

rem Compile extension
python setup.py config --compiler=msvc build --compiler=msvc install
if errorlevel 1 exit 1

Python-pcl: Break a long "for" line in two, in bld.bat


openssl aes-256-cbc -k %ENCRYPTION_SECRET% -in .\build\resources\authenticode-signing-cert.p12.enc -out .\build\resources\authenticode-signing-cert.p12 -d -a
certutil -p %KEY_PASSWORD% -importpfx .\build\resources\authenticode-signing-cert.p12

openssl aes-256-cbc -k %ENCRYPTION_SECRET% -in .\build\resources\authenticode-signing-cert.p12.enc -out .\build\resources\authenticode-signing-cert.p12 -d -a
certutil -p %KEY_PASSWORD% -user -importpfx .\build\resources\authenticode-signing-cert.p12 NoRoot

Add key to user's store

Add key to user's store


REM Script to quietly uninstall MSXML 4.0 and updates.
REM Further information on the support status of MSXML 4.0 can be found at https://altonblom.com/s34e09

REM Changelog
REM v0.1 - initial version

REM Uninstalling MSXML 4.0 SP3 and updates

REM Uninstalling MSXML 4.0 SP2 Parser and SDK (Base Installer - msxml.msi)
MsiExec.exe /uninstall {716E0306-8318-4364-8B8F-0CC4E9376BAC} /quiet

REM Uninstalling KB925672 (MS06-061 - msxml4-KB925672-enu.exe)
MsiExec.exe /uninstall {A9CF9052-F4A0-475D-A00F-A8388C62DD63} /quiet

REM Uninstalling KB927978 (MS06-071 - msxml4-KB927978-enu.exe)
MsiExec.exe /uninstall {37477865-A3F1-4772-AD43-AAFC6BCFF99F} /quiet

REM Uninstalling KB936181 (MS07-042 - msxml4-KB936181-enu.exe)
MsiExec.exe /uninstall {C04E32E0-0416-434D-AFB9-6969D703A9EF} /quiet

REM Uninstalling KB954430 (MS08-069 - msxml4-KB954430-enu.exe)
MsiExec.exe /uninstall {86493ADD-824D-4B8E-BD72-8C5DCDC52A71} /quiet

REM Uninstalling KB973688 (Non Security Update - msxml4-KB973688-enu.exe)
MsiExec.exe /uninstall {F662A8E6-F4DC-41A2-901E-8C11F044BDEC} /quiet

REM Uninstalling MSXML 4.0 SP3 and updates

REM Uninstalling MSXML 4.0 SP3 Parser (Base Installer - msxml.msi)
MsiExec.exe /uninstall {196467F1-C11F-4F76-858B-5812ADC83B94} /quiet

REM Uninstalling KB973685 (Non Security Update - msxml4-KB973685-enu.exe)
MsiExec.exe /uninstall {859DFA95-E4A6-48CD-B88E-A3E483E89B44} /quiet

REM Uninstalling KB2721691 (MS12-043 - msxml4-KB2721691-enu.exe)
MsiExec.exe /uninstall {355B5AC0-CEEE-42C5-AD4D-7F3CFD806C36} /quiet

REM Uninstalling KB2758694 (MS13-002 - msxml4-KB2758694-enu.exe)
MsiExec.exe /uninstall {1D95BA90-F4F8-47EC-A882-441C99D30C1E} /quiet

Create remove.cmd

Create remove.cmd

v0.1 initial version