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

:: ----------------------
:: KUDU Deployment Script
:: Version: 1.0.15
:: ----------------------

:: 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
)

:: Verify yarn installed
where yarn 2>nul >null
IF %ERRORLEVEL% NEQ 0 (
  echo "Missing yarn, installing via npm"
  npm i -g yarn
)

:: 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
)
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: Deployment
:: ----------
echo Handling function App deployment with custom build.cmd script.
echo "build.cmd running in directory %cd%"

:: Restore dotnet packages and build dotnet projects
dotnet restore
dotnet build -c Release

:: Restore node packages and build node projects
yarn install
yarn build

:: 3. KuduSync
IF /I "%IN_PLACE_DEPLOYMENT%" NEQ "1" (
  call :ExecuteCmd "%KUDU_SYNC_CMD%" -v 50 -f ./ -t "%DEPLOYMENT_TARGET%" -n "%NEXT_MANIFEST_PATH%" -p "%PREVIOUS_MANIFEST_PATH%" -i ".git;.hg;.deployment;deploy.cmd"
  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.

REM @echo off
REM cls

REM echo "build.cmd running in directory %cd%"

REM dotnet restore std-artist-tally-tool
REM dotnet build -c Release std-artist-tally-tool

REM REM .paket\paket.bootstrapper.exe
REM REM if errorlevel 1 (
REM REM   exit /b %errorlevel%
REM REM )

REM REM .paket\paket.exe restore --force
REM REM if errorlevel 1 (
REM REM   exit /b %errorlevel%
REM REM )

REM 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"
REM IF !ERRORLEVEL! NEQ 0 goto error

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

:: ----------------------
:: KUDU Deployment Script
:: Version: 1.0.15
:: ----------------------

:: 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
)

:: Verify yarn installed
where yarn 2>nul >nul
IF %ERRORLEVEL% NEQ 0 (
  echo "Missing yarn, installing via npm"
  npm i -g yarn
)

echo "Yarn installed, continuing to deployment"

:: 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
)
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: Deployment
:: ----------
echo Handling function App deployment with custom build.cmd script.
echo "build.cmd running in directory %cd%"

:: Restore dotnet packages and build dotnet projects
dotnet restore
dotnet build -c Release

:: Restore node packages and build node projects
yarn install
yarn build

:: 3. KuduSync
IF /I "%IN_PLACE_DEPLOYMENT%" NEQ "1" (
  call :ExecuteCmd "%KUDU_SYNC_CMD%" -v 50 -f ./ -t "%DEPLOYMENT_TARGET%" -n "%NEXT_MANIFEST_PATH%" -p "%PREVIOUS_MANIFEST_PATH%" -i ".git;.hg;.deployment;deploy.cmd"
  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.

REM @echo off
REM cls

REM echo "build.cmd running in directory %cd%"

REM dotnet restore std-artist-tally-tool
REM dotnet build -c Release std-artist-tally-tool

REM REM .paket\paket.bootstrapper.exe
REM REM if errorlevel 1 (
REM REM   exit /b %errorlevel%
REM REM )

REM REM .paket\paket.exe restore --force
REM REM if errorlevel 1 (
REM REM   exit /b %errorlevel%
REM REM )

REM 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"
REM IF !ERRORLEVEL! NEQ 0 goto error

Update build command

Update build command


@echo off
setlocal
set PATH=%PATH%;%ProgramFiles(x86)%\MSBuild\12.0\Bin\;
set BUIDROOT=%cd%

:getopts
if "%1"=="" (goto :default) else (goto :%1)
goto :exit

:default
goto :cleanbuild

:cleanbuild
echo "### Cleaning the build directory"
cd %BUIDROOT%\native
msbuild winp.vcxproj /t:Clean /p:Configuration=Release /verbosity:minimal /nologo /p:Platform="Win32"
if %errorlevel% neq 0 exit /b %errorlevel%
msbuild winp.vcxproj /t:Clean /p:Configuration=Release /verbosity:minimal /nologo /p:Platform="x64"
if %errorlevel% neq 0 exit /b %errorlevel%
msbuild winp.vcxproj /t:Clean /p:Configuration=Debug /verbosity:minimal /nologo /p:Platform="Win32"
if %errorlevel% neq 0 exit /b %errorlevel%
msbuild winp.vcxproj /t:Clean /p:Configuration=Debug /verbosity:minimal /nologo /p:Platform="x64"
if %errorlevel% neq 0 exit /b %errorlevel%
mvn clean
if %errorlevel% neq 0 exit /b %errorlevel%
goto :build

:build
echo "### Building project configurations"
cd %BUIDROOT%\native
REM /verbosity:minimal
msbuild winp.vcxproj /p:Configuration=Release /nologo /p:Platform="Win32"
if %errorlevel% neq 0 exit /b %errorlevel%
msbuild winp.vcxproj /p:Configuration=Release /nologo /p:Platform="x64"
if %errorlevel% neq 0 exit /b %errorlevel%
msbuild winp.vcxproj /p:Configuration=Debug /nologo /p:Platform="Win32"
if %errorlevel% neq 0 exit /b %errorlevel%
msbuild winp.vcxproj /p:Configuration=Debug /nologo /p:Platform="x64"
if %errorlevel% neq 0 exit /b %errorlevel%

echo "### Updating WinP resource files"
cd %BUIDROOT%
COPY native\Release\winp.dll src\main\resources\winp.dll
if %errorlevel% neq 0 exit /b %errorlevel%
COPY native\x64\Release\winp.dll src\main\resources\winp.x64.dll
if %errorlevel% neq 0 exit /b %errorlevel%

echo "### Build WinP"
mvn package
if %errorlevel% neq 0 exit /b %errorlevel%

goto :exit

:test
mvn verify
if %errorlevel% neq 0 exit /b %errorlevel%
goto :exit

:exit
endlocal

@echo off
setlocal
set PATH=%PATH%;%ProgramFiles(x86)%\MSBuild\12.0\Bin\;
set BUIDROOT=%cd%

:getopts
if "%1"=="" (goto :default) else (goto :%1)
goto :exit

:default
goto :cleanbuild

:cleanbuild
echo "### Cleaning the build directory"
cd %BUIDROOT%\native
msbuild winp.vcxproj /t:Clean /p:Configuration=Release /verbosity:minimal /nologo /p:Platform="Win32"
if %errorlevel% neq 0 exit /b %errorlevel%
msbuild winp.vcxproj /t:Clean /p:Configuration=Release /verbosity:minimal /nologo /p:Platform="x64"
if %errorlevel% neq 0 exit /b %errorlevel%
msbuild winp.vcxproj /t:Clean /p:Configuration=Debug /verbosity:minimal /nologo /p:Platform="Win32"
if %errorlevel% neq 0 exit /b %errorlevel%
msbuild winp.vcxproj /t:Clean /p:Configuration=Debug /verbosity:minimal /nologo /p:Platform="x64"
if %errorlevel% neq 0 exit /b %errorlevel%
cd %BUIDROOT%
mvn clean
if %errorlevel% neq 0 exit /b %errorlevel%
goto :build

:build
echo "### Building project configurations"
cd %BUIDROOT%\native
REM /verbosity:minimal
msbuild winp.vcxproj /p:Configuration=Release /nologo /p:Platform="Win32"
if %errorlevel% neq 0 exit /b %errorlevel%
msbuild winp.vcxproj /p:Configuration=Release /nologo /p:Platform="x64"
if %errorlevel% neq 0 exit /b %errorlevel%
msbuild winp.vcxproj /p:Configuration=Debug /nologo /p:Platform="Win32"
if %errorlevel% neq 0 exit /b %errorlevel%
msbuild winp.vcxproj /p:Configuration=Debug /nologo /p:Platform="x64"
if %errorlevel% neq 0 exit /b %errorlevel%

echo "### Updating WinP resource files"
cd %BUIDROOT%
COPY native\Release\winp.dll src\main\resources\winp.dll
if %errorlevel% neq 0 exit /b %errorlevel%
COPY native\x64\Release\winp.dll src\main\resources\winp.x64.dll
if %errorlevel% neq 0 exit /b %errorlevel%

echo "### Build WinP"
cd %BUIDROOT%
mvn package
if %errorlevel% neq 0 exit /b %errorlevel%

goto :exit

:test
cd %BUIDROOT%
mvn verify
if %errorlevel% neq 0 exit /b %errorlevel%
goto :exit

:exit
endlocal

Fix directory navigation in build.cmd

Fix directory navigation in build.cmd


@echo OFF
@setlocal

@rem Copyright (c) nexB Inc. and others. All rights reserved.
@rem SPDX-License-Identifier: Apache-2.0
@rem See http://www.apache.org/licenses/LICENSE-2.0 for the license text.
@rem See https://github.com/nexB/ for support or download.
@rem See https://aboutcode.org for more information about nexB OSS projects.

@rem ################################
@rem # A configuration script to set things up:
@rem # create a virtualenv and install or update thirdparty packages.
@rem # Source this script for initial configuration
@rem # Use configure --help for details

@rem # This script will search for a virtualenv.pyz app in etc\thirdparty\virtualenv.pyz
@rem # Otherwise it will download the latest from the VIRTUALENV_PYZ_URL default
@rem ################################

@rem ################################
@rem # Defaults. Change these variables to customize this script
@rem ################################

@rem # Requirement arguments passed to pip and used by default or with --dev.
set "REQUIREMENTS=--editable ."
set "DEV_REQUIREMENTS=--editable .[testing]"

@rem # where we create a virtualenv
set "VIRTUALENV_DIR=tmp"

@rem # Cleanable files and directories to delete with the --clean option
set "CLEANABLE=build tmp"

@rem # extra  arguments passed to pip
set "PIP_EXTRA_ARGS= "

@rem # the URL to download virtualenv.pyz if needed
set VIRTUALENV_PYZ_URL=https://bootstrap.pypa.io/virtualenv.pyz
@rem ################################

@rem ################################
@rem # Current directory where this script lives
set CFG_ROOT_DIR=%~dp0
set "CFG_BIN_DIR=%CFG_ROOT_DIR%\%VIRTUALENV_DIR%\Scripts"

@rem ################################
@rem # Set the quiet flag to empty if not defined
if not defined CFG_QUIET (
    set "CFG_QUIET= "
)

@rem ################################
@rem # Main command line entry point
set CFG_DEV_MODE=0
set "CFG_REQUIREMENTS=%REQUIREMENTS%"

if "%1" EQU "--help"   (goto cli_help)
if "%1" EQU "--clean"  (goto clean)
if "%1" EQU "--dev"    (
    set "CFG_REQUIREMENTS=%DEV_REQUIREMENTS%"
    set CFG_DEV_MODE=1
)
if "%1" EQU "--python"(
    echo "The --python option is now DEPRECATED. Use the PYTHON_EXECUTABLE environment"
    echo "variable instead. Run configure --help for details."
    exit /b 0
)

@rem ################################
@rem # find a proper Python to run
@rem # Use environment variables or a file if available.
@rem # Otherwise the latest Python by default.
if not defined PYTHON_EXECUTABLE (
    @rem # check for a file named PYTHON_EXECUTABLE
    if exist ""%CFG_ROOT_DIR%\PYTHON_EXECUTABLE"" (
        set /p PYTHON_EXECUTABLE=<""%CFG_ROOT_DIR%\PYTHON_EXECUTABLE""
    ) else (
        set "PYTHON_EXECUTABLE=py"
    )
)

:create_virtualenv
@rem # create a virtualenv for Python
@rem # Note: we do not use the bundled Python 3 "venv" because its behavior and
@rem # presence is not consistent across Linux distro and sometimes pip is not
@rem # included either by default. The virtualenv.pyz app cures all these issues.

if not exist ""%CFG_BIN_DIR%\python.exe"" (
    if not exist "%CFG_BIN_DIR%" (
        mkdir %CFG_BIN_DIR%
    )

    if exist ""%CFG_ROOT_DIR%\etc\thirdparty\virtualenv.pyz"" (
        %PYTHON_EXECUTABLE% "%CFG_ROOT_DIR%\etc\thirdparty\virtualenv.pyz" ^
            --wheel embed --pip embed --setuptools embed ^
            --seeder pip ^
            --never-download ^
            --no-periodic-update ^
            --no-vcs-ignore ^
            %CFG_QUIET% ^
            %CFG_ROOT_DIR%\%VIRTUALENV_DIR%
    ) else (
        if not exist ""%CFG_ROOT_DIR%\%VIRTUALENV_DIR%\virtualenv.pyz"" (
            curl -o "%CFG_ROOT_DIR%\%VIRTUALENV_DIR%\virtualenv.pyz" %VIRTUALENV_PYZ_URL%

            if %ERRORLEVEL% neq 0 (
                exit /b %ERRORLEVEL%
            )
        )
        %PYTHON_EXECUTABLE% "%CFG_ROOT_DIR%\%VIRTUALENV_DIR%\virtualenv.pyz" ^
            --wheel embed --pip embed --setuptools embed ^
            --seeder pip ^
            --never-download ^
            --no-periodic-update ^
            --no-vcs-ignore ^
            %CFG_QUIET% ^
            %CFG_ROOT_DIR%\%VIRTUALENV_DIR%
    )
)

if %ERRORLEVEL% neq 0 (
    exit /b %ERRORLEVEL%
)

:install_packages
@rem # install requirements in virtualenv
@rem # note: --no-build-isolation means that pip/wheel/setuptools will not
@rem # be reinstalled a second time and reused from the virtualenv and this
@rem # speeds up the installation.
@rem # We always have the PEP517 build dependencies installed already.

%CFG_BIN_DIR%\pip install ^
    --upgrade ^
    --no-build-isolation ^
    %CFG_QUIET% ^
    %PIP_EXTRA_ARGS% ^
    %CFG_REQUIREMENTS%

if %ERRORLEVEL% neq 0 (
    exit /b %ERRORLEVEL%
)

exit /b 0

@rem ################################

:cli_help
    echo An initial configuration script
    echo "  usage: configure [options]"
    echo " "
    echo The default is to configure for regular use. Use --dev for development.
    echo " "
    echo The options are:
    echo " --clean: clean built and installed files and exit."
    echo " --dev:   configure the environment for development."
    echo " --help:  display this help message and exit."
    echo " "
    echo By default, the python interpreter version found in the path is used.
    echo Alternatively, the PYTHON_EXECUTABLE environment variable can be set to
    echo configure another Python executable interpreter to use. If this is not
    echo set, a file named PYTHON_EXECUTABLE containing a single line with the
    echo path of the Python executable to use will be checked last.
    exit /b 0

:clean
@rem # Remove cleanable file and directories and files from the root dir.
echo "* Cleaning ..."
for %%F in (%CLEANABLE%) do (
    rmdir /s /q "%CFG_ROOT_DIR%\%%F" >nul 2>&1
    del /f /q "%CFG_ROOT_DIR%\%%F" >nul 2>&1
)
exit /b 0

@echo OFF
@setlocal

@rem Copyright (c) nexB Inc. and others. All rights reserved.
@rem SPDX-License-Identifier: Apache-2.0
@rem See http://www.apache.org/licenses/LICENSE-2.0 for the license text.
@rem See https://github.com/nexB/ for support or download.
@rem See https://aboutcode.org for more information about nexB OSS projects.

@rem ################################
@rem # A configuration script to set things up:
@rem # create a virtualenv and install or update thirdparty packages.
@rem # Source this script for initial configuration
@rem # Use configure --help for details

@rem # This script will search for a virtualenv.pyz app in etc\thirdparty\virtualenv.pyz
@rem # Otherwise it will download the latest from the VIRTUALENV_PYZ_URL default
@rem ################################

@rem ################################
@rem # Defaults. Change these variables to customize this script
@rem ################################

@rem # Requirement arguments passed to pip and used by default or with --dev.
set "REQUIREMENTS=--editable ."
set "DEV_REQUIREMENTS=--editable .[testing]"

@rem # where we create a virtualenv
set "VIRTUALENV_DIR=tmp"

@rem # Cleanable files and directories to delete with the --clean option
set "CLEANABLE=build tmp"

@rem # extra  arguments passed to pip
set "PIP_EXTRA_ARGS= "

@rem # the URL to download virtualenv.pyz if needed
set VIRTUALENV_PYZ_URL=https://bootstrap.pypa.io/virtualenv.pyz
@rem ################################

@rem ################################
@rem # Current directory where this script lives
set CFG_ROOT_DIR=%~dp0
set "CFG_BIN_DIR=%CFG_ROOT_DIR%\%VIRTUALENV_DIR%\Scripts"

@rem ################################
@rem # Set the quiet flag to empty if not defined
if not defined CFG_QUIET (
    set "CFG_QUIET= "
)

@rem ################################
@rem # Main command line entry point
set CFG_DEV_MODE=0
set "CFG_REQUIREMENTS=%REQUIREMENTS%"

if "%1" EQU "--help"   (goto cli_help)
if "%1" EQU "--clean"  (goto clean)
if "%1" EQU "--dev"    (
    set "CFG_REQUIREMENTS=%DEV_REQUIREMENTS%"
    set CFG_DEV_MODE=1
)
if "%1" EQU "--python" (
    echo "The --python option is now DEPRECATED. Use the PYTHON_EXECUTABLE environment"
    echo "variable instead. Run configure --help for details."
    exit /b 0
)

@rem ################################
@rem # find a proper Python to run
@rem # Use environment variables or a file if available.
@rem # Otherwise the latest Python by default.
if not defined PYTHON_EXECUTABLE (
    @rem # check for a file named PYTHON_EXECUTABLE
    if exist ""%CFG_ROOT_DIR%\PYTHON_EXECUTABLE"" (
        set /p PYTHON_EXECUTABLE=<""%CFG_ROOT_DIR%\PYTHON_EXECUTABLE""
    ) else (
        set "PYTHON_EXECUTABLE=py"
    )
)

:create_virtualenv
@rem # create a virtualenv for Python
@rem # Note: we do not use the bundled Python 3 "venv" because its behavior and
@rem # presence is not consistent across Linux distro and sometimes pip is not
@rem # included either by default. The virtualenv.pyz app cures all these issues.

if not exist ""%CFG_BIN_DIR%\python.exe"" (
    if not exist "%CFG_BIN_DIR%" (
        mkdir %CFG_BIN_DIR%
    )

    if exist ""%CFG_ROOT_DIR%\etc\thirdparty\virtualenv.pyz"" (
        %PYTHON_EXECUTABLE% "%CFG_ROOT_DIR%\etc\thirdparty\virtualenv.pyz" ^
            --wheel embed --pip embed --setuptools embed ^
            --seeder pip ^
            --never-download ^
            --no-periodic-update ^
            --no-vcs-ignore ^
            %CFG_QUIET% ^
            %CFG_ROOT_DIR%\%VIRTUALENV_DIR%
    ) else (
        if not exist ""%CFG_ROOT_DIR%\%VIRTUALENV_DIR%\virtualenv.pyz"" (
            curl -o "%CFG_ROOT_DIR%\%VIRTUALENV_DIR%\virtualenv.pyz" %VIRTUALENV_PYZ_URL%

            if %ERRORLEVEL% neq 0 (
                exit /b %ERRORLEVEL%
            )
        )
        %PYTHON_EXECUTABLE% "%CFG_ROOT_DIR%\%VIRTUALENV_DIR%\virtualenv.pyz" ^
            --wheel embed --pip embed --setuptools embed ^
            --seeder pip ^
            --never-download ^
            --no-periodic-update ^
            --no-vcs-ignore ^
            %CFG_QUIET% ^
            %CFG_ROOT_DIR%\%VIRTUALENV_DIR%
    )
)

if %ERRORLEVEL% neq 0 (
    exit /b %ERRORLEVEL%
)

:install_packages
@rem # install requirements in virtualenv
@rem # note: --no-build-isolation means that pip/wheel/setuptools will not
@rem # be reinstalled a second time and reused from the virtualenv and this
@rem # speeds up the installation.
@rem # We always have the PEP517 build dependencies installed already.

%CFG_BIN_DIR%\pip install ^
    --upgrade ^
    --no-build-isolation ^
    %CFG_QUIET% ^
    %PIP_EXTRA_ARGS% ^
    %CFG_REQUIREMENTS%

if %ERRORLEVEL% neq 0 (
    exit /b %ERRORLEVEL%
)

exit /b 0

@rem ################################

:cli_help
    echo An initial configuration script
    echo "  usage: configure [options]"
    echo " "
    echo The default is to configure for regular use. Use --dev for development.
    echo " "
    echo The options are:
    echo " --clean: clean built and installed files and exit."
    echo " --dev:   configure the environment for development."
    echo " --help:  display this help message and exit."
    echo " "
    echo By default, the python interpreter version found in the path is used.
    echo Alternatively, the PYTHON_EXECUTABLE environment variable can be set to
    echo configure another Python executable interpreter to use. If this is not
    echo set, a file named PYTHON_EXECUTABLE containing a single line with the
    echo path of the Python executable to use will be checked last.
    exit /b 0

:clean
@rem # Remove cleanable file and directories and files from the root dir.
echo "* Cleaning ..."
for %%F in (%CLEANABLE%) do (
    rmdir /s /q "%CFG_ROOT_DIR%\%%F" >nul 2>&1
    del /f /q "%CFG_ROOT_DIR%\%%F" >nul 2>&1
)
exit /b 0

Add space for correct syntax

Add space for correct syntax

Signed-off-by: Philippe Ombredanne <ca95c4a6a4931f366cbdaf5878c5016609417d37@nexb.com>


::..............................................................................
::
::  This file is part of the AXL library.
::
::  AXL is distributed under the MIT license.
::  For details see accompanying license.txt file,
::  the public copy of which is also available at:
::  http://tibbo.com/downloads/archive/axl/license.txt
::
::..............................................................................

@echo off

set DOWNLOAD_DIR=c:\downloads
set DOWNLOAD_DIR_CMAKE=%DOWNLOAD_DIR:\=/%

:: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

:: Ragel

mkdir %DOWNLOAD_DIR%\ragel
appveyor DownloadFile %RAGEL_DOWNLOAD_URL% -FileName %DOWNLOAD_DIR%\ragel.exe

echo set (RAGEL_EXE %DOWNLOAD_DIR_CMAKE%/ragel.exe) >> paths.cmake

:: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

:: Lua

mkdir %DOWNLOAD_DIR%\lua
appveyor DownloadFile %LUA_DOWNLOAD_URL% -FileName %DOWNLOAD_DIR%\lua\lua.zip
7z x -y %DOWNLOAD_DIR%\lua\lua.zip -o%DOWNLOAD_DIR%\lua

echo set (LUA_INC_DIR %DOWNLOAD_DIR_CMAKE%/lua/include) >> paths.cmake
echo set (LUA_LIB_DIR %DOWNLOAD_DIR_CMAKE%/lua) >> paths.cmake
echo set (LUA_DLL_DIR %DOWNLOAD_DIR_CMAKE%/lua) >> paths.cmake
echo set (LUA_LIB_NAME %LUA_LIB_NAME%) >> paths.cmake

:: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

:: OpenSSL

set OPENSSL_DIR_CMAKE=%OPENSSL_DIR:\=/%

echo set (OPENSSL_INC_DIR %OPENSSL_DIR_CMAKE%/include) >> paths.cmake
echo set (OPENSSL_LIB_DIR %OPENSSL_DIR_CMAKE%/lib) >> paths.cmake
echo set (OPENSSL_DLL_DIR %OPENSSL_DIR_CMAKE%/bin) >> paths.cmake

:: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

:: Get rid of annoying Xamarin build warnings

if exist "c:\Program Files (x86)\MSBuild\14.0\Microsoft.Common.targets\ImportAfter\Xamarin.Common.targets" (
	del "c:\Program Files (x86)\MSBuild\14.0\Microsoft.Common.targets\ImportAfter\Xamarin.Common.targets"
)

if exist "c:\Program Files (x86)\MSBuild\4.0\Microsoft.Common.targets\ImportAfter\Xamarin.Common.targets" (
	del "c:\Program Files (x86)\MSBuild\4.0\Microsoft.Common.targets\ImportAfter\Xamarin.Common.targets"
)

::..............................................................................
::
::  This file is part of the AXL library.
::
::  AXL is distributed under the MIT license.
::  For details see accompanying license.txt file,
::  the public copy of which is also available at:
::  http://tibbo.com/downloads/archive/axl/license.txt
::
::..............................................................................

@echo off

set DOWNLOAD_DIR=c:\downloads
set DOWNLOAD_DIR_CMAKE=%DOWNLOAD_DIR:\=/%

:: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

:: Ragel

mkdir %DOWNLOAD_DIR%\ragel
appveyor DownloadFile %RAGEL_DOWNLOAD_URL% -FileName %DOWNLOAD_DIR%\ragel.exe

echo set (RAGEL_EXE %DOWNLOAD_DIR_CMAKE%/ragel.exe) >> paths.cmake

:: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

:: Lua

mkdir %DOWNLOAD_DIR%\lua
appveyor DownloadFile %LUA_DOWNLOAD_URL% -FileName %DOWNLOAD_DIR%\lua\lua.zip
7z x -y %DOWNLOAD_DIR%\lua\lua.zip -o%DOWNLOAD_DIR%\lua

echo set (LUA_INC_DIR %DOWNLOAD_DIR_CMAKE%/lua/include) >> paths.cmake
echo set (LUA_LIB_DIR %DOWNLOAD_DIR_CMAKE%/lua) >> paths.cmake
echo set (LUA_DLL_DIR %DOWNLOAD_DIR_CMAKE%/lua) >> paths.cmake
echo set (LUA_LIB_NAME %LUA_LIB_NAME%) >> paths.cmake

:: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

:: OpenSSL

set OPENSSL_DIR_CMAKE=%OPENSSL_DIR:\=/%

echo set (OPENSSL_INC_DIR %OPENSSL_DIR_CMAKE%/include) >> paths.cmake
echo set (OPENSSL_LIB_DIR %OPENSSL_DIR_CMAKE%/lib) >> paths.cmake
echo set (OPENSSL_DLL_DIR %OPENSSL_DIR_CMAKE%/bin) >> paths.cmake
echo set (OPENSSL_CRYPTO_LIB_NAME libeay32) >> paths.cmake
echo set (OPENSSL_CRYPTO_DLL_NAME libeay32) >> paths.cmake
echo set (OPENSSL_SSL_LIB_NAME ssleay32) >> paths.cmake
echo set (OPENSSL_SSL_DLL_NAME ssleay32) >> paths.cmake

:: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

:: Get rid of annoying Xamarin build warnings

if exist "c:\Program Files (x86)\MSBuild\14.0\Microsoft.Common.targets\ImportAfter\Xamarin.Common.targets" (
	del "c:\Program Files (x86)\MSBuild\14.0\Microsoft.Common.targets\ImportAfter\Xamarin.Common.targets"
)

if exist "c:\Program Files (x86)\MSBuild\4.0\Microsoft.Common.targets\ImportAfter\Xamarin.Common.targets" (
	del "c:\Program Files (x86)\MSBuild\4.0\Microsoft.Common.targets\ImportAfter\Xamarin.Common.targets"
)

[ci/appveyor] set OPENSSL_xxx_LIB_NAME & OPENSSL_xxx_DLL_NAME


if not exist trunk exit 1
cd trunk
svn info
if errorlevel 1 exit 1
for /f "delims=" %%i in ('svn info | grep "Revision"') do set svnrev=%%i
if not svnrev=="Revision: 1157" exit 1

if not exist trunk exit 1
cd trunk
svn info
if errorlevel 1 exit 1
for /f "delims=" %%i in ('svn info ^| grep "Revision"') do set svnrev=%%i
if errorlevel 1 exit 1
echo %svnrev%
if not "%svnrev%"=="Revision: 1157" exit 1

Fix source_svn test recipe on Windows

Fix source_svn test recipe on Windows


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

@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem
@rem  Gradle startup script for Windows
@rem  (Modified for the purposes of building Byte Buddy)
@rem
@rem ##########################################################################

@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal

set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%

@rem Resolve any "." and ".." in APP_HOME to make it shorter.
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi

@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"

@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome

set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto execute

echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.

goto fail

:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe

if exist "%JAVA_EXE%" goto execute

echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.

goto fail

:execute

@rem Use legacy Gradle if Java 6 or 7 is used to build (Byte Buddy edit)
set WRAPPER_LOCATION=wrapper-legacy
for /f tokens^=2-5^ delims^=.-_^" %%j in ('%JAVA_HOME%\bin\java -fullversion 2^>^&1') do set "JAVA_VERSION_STRING=%%j%%k%%l%%m"
IF NOT "%JAVA_VERSION_STRING:~0,3%"=="160" (
  IF NOT "%JAVA_VERSION_STRING:~0,3%"=="170" (
    set WRAPPER_LOCATION=wrapper
  )
)

@rem Extension to allow automatically downloading the Gradle binary from Gradle's repository
@rem This is implemented similarly to the Maven Wrapper's download routine.
SET DISTRIBUTION_LOCATION=""
SET DISTRIBUTION_URL=""
for /f "usebackq tokens=1,2 delims==" %%A in ("%APP_HOME%\gradle\%WRAPPER_LOCATION%\gradle-wrapper.properties") do (
    if "%%A"=="distributionRepo" SET DISTRIBUTION_LOCATION=%%B
    if "%%A"=="distributionUrl" SET DISTRIBUTION_URL=%%B
)
if not %DISTRIBUTION_LOCATION%="" (
    SET DISTRIBUTION_SOURCE=%DISTRIBUTION_LOCATION%/%DISTRIBUTION_URL%
    SET DISTRIBUTION_TARGET=%APP_HOME%\gradle\%WRAPPER_LOCATION%\%DISTRIBUTION_URL%
    if exist %DISTRIBUTION_TARGET% (
        if "%GRADLEW_VERBOSE%" == "true" (
            echo Found %DISTRIBUTION_TARGET%
        )
    ) else (
        if "%GRADLEW_VERBOSE%" == "true" (
            echo Couldn't find %DISTRIBUTION_TARGET%, downloading it ...
            echo Downloading from: %DISTRIBUTION_SOURCE%
        )

        powershell -Command "&{"^
            "$webclient = new-object System.Net.WebClient;"^
            "if (-not ([string]::IsNullOrEmpty('%GRADLEW_USERNAME%') -and [string]::IsNullOrEmpty('%GRADLEW_PASSWORD%'))) {"^
            "$webclient.Credentials = new-object System.Net.NetworkCredential('%GRADLEW_USERNAME%', '%GRADLEW_PASSWORD%');"^
            "}"^
            "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; $webclient.DownloadFile('%DISTRIBUTION_SOURCE%', '%DISTRIBUTION_TARGET%')"^
            "}"
        if "%GRADLEW_VERBOSE%" == "true" (
            echo Finished downloading %DISTRIBUTION_TARGET%
        )
    )
)
@rem End of extension

@rem Setup the command line
set CLASSPATH=%APP_HOME%\gradle\%WRAPPER_LOCATION%\gradle-wrapper.jar

@REM Validate the Gradle wrapper's hash (Byte Buddy edit)
SET FILE_HASH=""
FOR /F "usebackq tokens=1,2 delims==" %%A IN ("%APP_HOME%\gradle\%WRAPPER_LOCATION%\gradle-wrapper.properties") DO (
    IF "%%A"=="wrapperHash" SET FILE_HASH=%%B
)
IF NOT %FILE_HASH%=="" (
    FOR /F "usebackq tokens=*" %%A in ('certUtil -hashfile "%APP_HOME%\gradle\%WRAPPER_LOCATION%\gradle-wrapper.properties" SHA256') do (
        echo %%A | findstr /C:"hash" 1>nul || (
            IF NOT %%A==%FILE_HASH% (
                echo Could not validate hash of maven-wrapper.jar
                goto error
            )
        )
    )
)

@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*

:end
@rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd

:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
if  not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
exit /b 1

:mainEnd
if "%OS%"=="Windows_NT" endlocal

:omega

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

@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem
@rem  Gradle startup script for Windows
@rem  (Modified for the purposes of building Byte Buddy)
@rem
@rem ##########################################################################

@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal

set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%

@rem Resolve any "." and ".." in APP_HOME to make it shorter.
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi

@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"

@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome

set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto execute

echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.

goto fail

:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe

if exist "%JAVA_EXE%" goto execute

echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.

goto fail

:execute

@rem Use legacy Gradle if Java 6 or 7 is used to build (Byte Buddy edit)
set WRAPPER_LOCATION=wrapper-legacy
for /f tokens^=2-5^ delims^=.-_^" %%j in ('%JAVA_HOME%\bin\java -fullversion 2^>^&1') do set "JAVA_VERSION_STRING=%%j%%k%%l%%m"
IF NOT "%JAVA_VERSION_STRING:~0,3%"=="160" (
  IF NOT "%JAVA_VERSION_STRING:~0,3%"=="170" (
    set WRAPPER_LOCATION=wrapper
  )
)

@rem Extension to allow automatically downloading the Gradle binary from Gradle's repository
@rem This is implemented similarly to the Maven Wrapper's download routine.
SET DISTRIBUTION_LOCATION=""
SET DISTRIBUTION_URL=""
for /f "usebackq tokens=1,2 delims==" %%A in ("%APP_HOME%\gradle\%WRAPPER_LOCATION%\gradle-wrapper.properties") do (
    if "%%A"=="distributionRepo" SET DISTRIBUTION_LOCATION=%%B
    if "%%A"=="distributionUrl" SET DISTRIBUTION_URL=%%B
)
if not %DISTRIBUTION_LOCATION%=="" (
    SET DISTRIBUTION_SOURCE=%DISTRIBUTION_LOCATION%/%DISTRIBUTION_URL%
    SET DISTRIBUTION_TARGET=%APP_HOME%\gradle\%WRAPPER_LOCATION%\%DISTRIBUTION_URL%
    if exist %DISTRIBUTION_TARGET% (
        if "%GRADLEW_VERBOSE%" == "true" (
            echo Found %DISTRIBUTION_TARGET%
        )
    ) else (
        if "%GRADLEW_VERBOSE%" == "true" (
            echo Couldn't find %DISTRIBUTION_TARGET%, downloading it ...
            echo Downloading from: %DISTRIBUTION_SOURCE%
        )

        powershell -Command "&{"^
            "$webclient = new-object System.Net.WebClient;"^
            "if (-not ([string]::IsNullOrEmpty('%GRADLEW_USERNAME%') -and [string]::IsNullOrEmpty('%GRADLEW_PASSWORD%'))) {"^
            "$webclient.Credentials = new-object System.Net.NetworkCredential('%GRADLEW_USERNAME%', '%GRADLEW_PASSWORD%');"^
            "}"^
            "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; $webclient.DownloadFile('%DISTRIBUTION_SOURCE%', '%DISTRIBUTION_TARGET%')"^
            "}"
        if "%GRADLEW_VERBOSE%" == "true" (
            echo Finished downloading %DISTRIBUTION_TARGET%
        )
    )
)
@rem End of extension

@rem Setup the command line
set CLASSPATH=%APP_HOME%\gradle\%WRAPPER_LOCATION%\gradle-wrapper.jar

@REM Validate the Gradle wrapper's hash (Byte Buddy edit)
SET FILE_HASH=""
FOR /F "usebackq tokens=1,2 delims==" %%A IN ("%APP_HOME%\gradle\%WRAPPER_LOCATION%\gradle-wrapper.properties") DO (
    IF "%%A"=="wrapperHash" SET FILE_HASH=%%B
)
IF NOT %FILE_HASH%=="" (
    FOR /F "usebackq tokens=*" %%A in ('certUtil -hashfile "%APP_HOME%\gradle\%WRAPPER_LOCATION%\gradle-wrapper.properties" SHA256') do (
        echo %%A | findstr /C:"hash" 1>nul || (
            IF NOT %%A==%FILE_HASH% (
                echo Could not validate hash of maven-wrapper.jar
                goto error
            )
        )
    )
)

@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*

:end
@rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd

:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
if  not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
exit /b 1

:mainEnd
if "%OS%"=="Windows_NT" endlocal

:omega

Fix script.

Fix script.


:: This batch file loads the NHol interactive environment into the
:: latest version of F# Interactive (FSI) available on this machine.

@echo off

:: Variables which hold paths to various versions of F# Interactive.
set FSI_30= "C:\Program Files (x86)\Microsoft SDKs\F#\3.0\Framework\v4.0\fsi.exe"
set FSI_20= "C:\Program Files (x86)\Microsoft F#\v4.0\fsi.exe"

:: Set variables which hold command-line arguments to be passed to F# Interactive.
set fsi_args= --lib:NHol^
  --define:DEBUG^
  --define:TRACE^
  --define:USE^
  --use:init.fsx^
  --use:Logging.fs^
  --use:system.fs^
  --use:lib.fs^
  --use:fusion.fs^
  --use:basics.fs^
  --use:nets.fs^
  --use:printer.fs^
  --use:preterm.fs^
  --use:parser.fs^
  --use:equal.fs^
  --use:bool.fs^
  --use:drule.fs^
  --use:tactics.fs^
  --use:itab.fs^
  --use:simp.fs^
  --use:theorems.fs^
  --use:ind_defs.fs^
  --use:class.fs^
  --use:trivia.fs^
  --use:canon.fs^
  --use:meson.fs^
  --use:quot.fs^
  --use:pair.fs^
  --use:nums.fs^
  --use:recursion.fs^
  --use:arith.fs^
  --use:wf.fs^
  --use:calc_num.fs^
  --use:normalizer.fs^
  --use:grobner.fs^
  --use:ind_types.fs^
  --use:lists.fs^
  --use:realax.fs^
  --use:calc_int.fs^
  --use:realarith.fs^
  --use:real.fs^
  --use:calc_rat.fs^
  --use:int.fs^
  --use:sets.fs^
  --use:iterate.fs^
  --use:cart.fs^
  --use:define.fs^
  --use:help.fs^
  --use:database.fs

:: Try to find the user's installation of F# Interactive.
if exist %FSI_30% (
    :: VS 2012 / F# 3.0
    echo Using F# 3.0

    :: Set the 'FSI' variable to the path for F# 3.0 Interactive.
    set FSI= %FSI_30%
) else (
if exist %FSI_20% (
    :: VS 2010 / F# 2.0
    echo Using F# 2.0
) else (
    :: Unable to find the F# installation, so exit.
    echo Unable to find an installation of F# interactive at any known location.
    echo Exiting...
    exit
))

:: Load the NHol environment into the detected version of F# Interactive.
echo Loading NHol into F# Interactive.
%FSI% %fsi_args%

:: This batch file loads the NHol interactive environment into the
:: latest version of F# Interactive (FSI) available on this machine.

@echo off

:: Variables which hold paths to various versions of F# Interactive.
set FSI_30= "C:\Program Files (x86)\Microsoft SDKs\F#\3.0\Framework\v4.0\fsi.exe"
set FSI_20= "C:\Program Files (x86)\Microsoft F#\v4.0\fsi.exe"

:: Set variables which hold command-line arguments to be passed to F# Interactive.
set fsi_args= --lib:NHol^
  --define:FSI_VER_2^
  --define:DEBUG^
  --define:TRACE^
  --define:USE^
  --use:init.fsx^
  --use:Logging.fs^
  --use:system.fs^
  --use:lib.fs^
  --use:fusion.fs^
  --use:basics.fs^
  --use:nets.fs^
  --use:printer.fs^
  --use:preterm.fs^
  --use:parser.fs^
  --use:equal.fs^
  --use:bool.fs^
  --use:drule.fs^
  --use:tactics.fs^
  --use:itab.fs^
  --use:simp.fs^
  --use:theorems.fs^
  --use:ind_defs.fs^
  --use:class.fs^
  --use:trivia.fs^
  --use:canon.fs^
  --use:meson.fs^
  --use:quot.fs^
  --use:pair.fs^
  --use:nums.fs^
  --use:recursion.fs^
  --use:arith.fs^
  --use:wf.fs^
  --use:calc_num.fs^
  --use:normalizer.fs^
  --use:grobner.fs^
  --use:ind_types.fs^
  --use:lists.fs^
  --use:realax.fs^
  --use:calc_int.fs^
  --use:realarith.fs^
  --use:real.fs^
  --use:calc_rat.fs^
  --use:int.fs^
  --use:sets.fs^
  --use:iterate.fs^
  --use:cart.fs^
  --use:define.fs^
  --use:help.fs^
  --use:database.fs^

:: Try to find the user's installation of F# Interactive.
if exist %FSI_30% (
    :: VS 2012 / F# 3.0
    echo Using F# 3.0

    :: Set the 'FSI' variable to the path for F# 3.0 Interactive.
    set FSI= %FSI_30%

    set FSI_VER_FLAG = ""
) else (
if exist %FSI_20% (
    :: VS 2010 / F# 2.0
    echo Using F# 2.0

    :: Set the 'FSI' variable to the path for F# 2.0 Interactive.
    set FSI= %FSI_20%

    set FSI_VER_FLAG = "--define:FSI_VER_2"
) else (
    :: Unable to find the F# installation, so exit.
    echo Unable to find an installation of F# interactive at any known location.
    echo Exiting...
    exit
))

:: Load the NHol environment into the detected version of F# Interactive.
echo Loading NHol into F# Interactive.
%FSI% %fsi_args% %FSI_VER_FLAG%

Fix NHol.bat so it works with FSI 2.0.

Fix NHol.bat so it works with FSI 2.0.

Signed-off-by: Eric Taucher <30b64b56436fcf85b74ccbb05f43dcd6d341dadf@gmail.com>


@setlocal
@set PROMPT=$G$S

@if exist "%~dp0version.cmd" call "%~dp0version.cmd"

@if not "%1" == "" goto %1

:build
        @set "VERSION=%DATE:/=%"
        @set X_VERSION=
        @goto _build

:release
        for /F %%I in (version.txt) do set VERSION=%%I
        set "X_VERSION=-X main.version %VERSION%"

:_build
        if not exist nyagos.syso windres --output-format=coff -o nyagos.syso nyagos.rc
        for /F %%V in ('git log -1 --pretty^=format:%%H') do go build -ldflags "-X main.stamp %DATE% -X main.commit %%V %X_VERSION%"
        goto end

:fmt
        for /R . %%I IN (*.go) do go fmt %%I
        for /R . %%I in (.*~) do del %%I
        goto end

:clean
        for %%I in (nyagos.exe nyagos.syso version.now) do if exist %%I del %%I
        goto end

:get
        go get github.com/mattn/go-runewidth
        go get github.com/shiena/ansicolor
        go get github.com/atotto/clipboard
        goto end

:package
        zip -9 "nyagos-%VERSION%%2.zip" nyagos.exe lua52.dll nyagos.lua nyagos_ja.md nyagos_en.md readme.md .nyagos nyagos.d\*.lua
        goto end

:install
        @echo off
        if not "%2" == "" set "INSTALLDIR=%2"
        if "%INSTALLDIR%" == "" (
            @echo Please %0.cmd install PATH\TO\BIN, once
            goto end
        )
        if exist installdir (
            @start make.cmd install.
        ) else (
            @echo Please %0.cmd install EXIST\PATH\TO\BIN,  once
        )
        goto end

:install.
        @echo Please close NYAGOS.exe and hit ENTER.
        @pause
        robocopy nyagos.d "%INSTALLDIR%\nyagos.d" /mir
        copy nyagos.exe "%INSTALLDIR%\."
        copy nyagos.lua "%INSTALLDIR%\."
        copy lua52.dll  "%INSTALLDIR%\."
        goto end

:upgrade
        for %%I in (mattn\go-runewidth shiena\ansicolor atotto\clipboard ) do (
            cd %GOPATH%\Src\github.com\%%I
            git pull origin master:master
            go build
        )
        goto end

:help
        @echo off
        echo Usage for make.cmd
        echo  %0          : Equals to '%0 build'
        echo  %0 build    : Build nyagos.exe as snapshot (ignore version.txt)
        echo  %0 release  : Build nyagos.exe as release  (see version.txt)
        echo  %0 fmt      : Format all source files with 'go fmt'
        echo  %0 clean    : Delete nyagos.exe and nyagos.syso
        echo  %0 package  : Make the package zip-file
        echo  %0 get      : Do 'go get' for each github library
        echo  %0 upgrade  : Do 'git pull' for each github library
        echo  %0 help     : Print help
        echo  %0 install INSTALLDIR
        echo     : Copy binaries to INSTALLDIR
        echo  %0 install
        echo     : Copy binaries to last INSTALLDIR
:end
        ( echo set "VERSION=%VERSION%"
          echo set "X_VERSION=%X_VERSION%"
          echo set "INSTALLDIR=%INSTALLDIR%"
        ) > "%~dp0version.cmd"

@setlocal
@set PROMPT=$G$S

@if exist "%~dp0version.cmd" call "%~dp0version.cmd"

@if not "%1" == "" goto %1

:build
        @set "VERSION=%DATE:/=%"
        @set X_VERSION=
        @goto _build

:release
        for /F %%I in (version.txt) do set VERSION=%%I
        set "X_VERSION=-X main.version %VERSION%"

:_build
        if not exist nyagos.syso windres --output-format=coff -o nyagos.syso nyagos.rc
        for /F %%V in ('git log -1 --pretty^=format:%%H') do go build -ldflags "-X main.stamp %DATE% -X main.commit %%V %X_VERSION%"
        goto end

:fmt
        for /R . %%I IN (*.go) do go fmt %%I
        for /R . %%I in (.*~) do del %%I
        goto end

:clean
        for %%I in (nyagos.exe nyagos.syso version.now) do if exist %%I del %%I
        goto end

:get
        go get github.com/mattn/go-runewidth
        go get github.com/shiena/ansicolor
        go get github.com/atotto/clipboard
        goto end

:package
        zip -9 "nyagos-%VERSION%%2.zip" nyagos.exe lua52.dll nyagos.lua nyagos_ja.md nyagos_en.md readme.md .nyagos nyagos.d\*.lua
        goto end

:install
        @echo off
        if not "%2" == "" set "INSTALLDIR=%2"
        if "%INSTALLDIR%" == "" (
            @echo Please %0.cmd install PATH\TO\BIN, once
            goto end
        )
        if exist installdir (
            @start make.cmd install.
        ) else (
            @echo Please %0.cmd install EXIST\PATH\TO\BIN,  once
        )
        goto end

:install.
        @echo Please close NYAGOS.exe and hit ENTER.
        @pause
        robocopy nyagos.d "%INSTALLDIR%\nyagos.d" /E
        copy nyagos.exe "%INSTALLDIR%\."
        copy nyagos.lua "%INSTALLDIR%\."
        copy lua52.dll  "%INSTALLDIR%\."
        goto end

:upgrade
        for %%I in (mattn\go-runewidth shiena\ansicolor atotto\clipboard ) do (
            cd %GOPATH%\Src\github.com\%%I
            git pull origin master:master
            go build
        )
        goto end

:help
        @echo off
        echo Usage for make.cmd
        echo  %0          : Equals to '%0 build'
        echo  %0 build    : Build nyagos.exe as snapshot (ignore version.txt)
        echo  %0 release  : Build nyagos.exe as release  (see version.txt)
        echo  %0 fmt      : Format all source files with 'go fmt'
        echo  %0 clean    : Delete nyagos.exe and nyagos.syso
        echo  %0 package  : Make the package zip-file
        echo  %0 get      : Do 'go get' for each github library
        echo  %0 upgrade  : Do 'git pull' for each github library
        echo  %0 help     : Print help
        echo  %0 install INSTALLDIR
        echo     : Copy binaries to INSTALLDIR
        echo  %0 install
        echo     : Copy binaries to last INSTALLDIR
:end
        ( echo set "VERSION=%VERSION%"
          echo set "X_VERSION=%X_VERSION%"
          echo set "INSTALLDIR=%INSTALLDIR%"
        ) > "%~dp0version.cmd"

make install: robocopy option /mir -> /E


setlocal EnableDelayedExpansion

if "%ARCH%"=="64" (
    set WIN64="WIN64=YES"
) else (
    set WIN64=
)

:: Work out MSVC_VER - needed for build process.
:: Currently guess from Python version
if  %vc% LEQ 9 set MSVC_VER=1500
if  %vc% GTR 9 set MSVC_VER=1900

:: Get the minor/major version of poppler from the %poppler% environment
:: variable that is set by conda-build
FOR /F "tokens=1,2 delims=." %%a IN ("%poppler%") DO (
  set POPPLER_MAJOR_VERSION=%%a
  set POPPLER_MINOR_VERSION=%%b
)

:: Need consistent flags between build and install.
set BLD_OPTS=%WIN64% ^
    MSVC_VER=%MSVC_VER% ^
    GDAL_HOME=%LIBRARY_PREFIX% ^
    BINDIR=%LIBRARY_BIN% ^
    LIBDIR=%LIBRARY_LIB% ^
    INCDIR=%LIBRARY_INC% ^
    DATADIR=%LIBRARY_PREFIX%\share\gdal ^
    HTMLDIR=%LIBRARY_PREFIX%\share\doc\gdal ^
    CURL_INC="-I%LIBRARY_INC%" ^
    CURL_LIB="%LIBRARY_LIB%\libcurl.lib wsock32.lib wldap32.lib winmm.lib" ^
    EXPAT_DIR=%LIBRARY_PREFIX% ^
    EXPAT_INCLUDE="-I%LIBRARY_INC%" ^
    EXPAT_LIB=%LIBRARY_LIB%\expat.lib ^
    FITS_PLUGIN=NO ^
    FITS_INC_DIR=%LIBRARY_INC% ^
    FITS_LIB="%LIBRARY_LIB%\cfitsio.lib" ^
    FREEXL_CFLAGS="-I%LIBRARY_INC%" ^
    FREEXL_LIBS=%LIBRARY_LIB%\freexl_i.lib ^
    GEOS_CFLAGS="-I%LIBRARY_INC% -DHAVE_GEOS" ^
    GEOS_DIR=%LIBRARY_PREFIX% ^
    GEOS_LIB=%LIBRARY_LIB%\geos_c.lib ^
    HDF4_DIR=%LIBRARY_PREFIX% ^
    HDF4_HAS_MAXOPENFILES=YES ^
    HDF4_LIB="%LIBRARY_LIB%\hdf.lib %LIBRARY_LIB%\mfhdf.lib %LIBRARY_LIB%\xdr.lib" ^
    HDF5_DIR=%LIBRARY_PREFIX% ^
    HDF5_LIB=%LIBRARY_LIB%\hdf5.lib ^
    JPEGDIR=%LIBRARY_INC% ^
    JPEG_EXTERNAL_LIB=1 ^
    JPEG_LIB=%LIBRARY_LIB%\libjpeg.lib ^
    KEA_CFLAGS="-I%LIBRARY_INC%" ^
    KEA_LIB="%LIBRARY_LIB%\hdf5_cpp.lib %LIBRARY_LIB%\libkea.lib" ^
    NETCDF_INC_DIR=%LIBRARY_INC% ^
    NETCDF_LIB=%LIBRARY_LIB%\netcdf.lib ^
    NETCDF_SETTING=yes ^
    OPENJPEG_CFLAGS="-I%LIBRARY_INC%\openjpeg-2.3" ^
    OPENJPEG_ENABLED=YES ^
    OPENJPEG_LIB=%LIBRARY_LIB%\openjp2.lib ^
    PG_INC_DIR=%LIBRARY_INC% ^
    PG_LIB=%LIBRARY_LIB%\libpq.lib ^
    PNGDIR=%LIBRARY_INC% ^
    PNG_EXTERNAL_LIB=1 ^
    PNG_LIB=%LIBRARY_LIB%\libpng.lib ^
    PROJ_FLAGS="-DPROJ_STATIC -DACCEPT_USE_OF_DEPRECATED_PROJ_API_H" ^
    PROJ_INCLUDE="-I%LIBRARY_INC%" ^
    PROJ_LIBRARY=%LIBRARY_LIB%\proj_6_0.lib ^
    SPATIALITE_412_OR_LATER=yes ^
    SQLITE_INC="-I%LIBRARY_INC% -DHAVE_SPATIALITE" ^
    SQLITE_LIB="%LIBRARY_LIB%\sqlite3.lib %LIBRARY_LIB%\spatialite_i.lib" ^
    TIFF_INC="-I%LIBRARY_INC%" ^
    TIFF_LIB=%LIBRARY_LIB%\tiff.lib ^
    TIFF_OPTS=-DBIGTIFF_SUPPORT ^
    XERCES_DIR=%LIBRARY_PREFIX% ^
    XERCES_INCLUDE="-I%LIBRARY_INC% -I%LIBRARY_INC%\xercesc" ^
    XERCES_LIB=%LIBRARY_LIB%\xerces-c_3.lib ^
    GEOTIFF_INC="-I%LIBRARY_INC%" ^
    GEOTIFF_LIB=%LIBRARY_LIB%\geotiff_i.lib ^
    LIBICONV_INCLUDE="-I%LIBRARY_INC% -DICONV_CONST= " ^
    LIBICONV_LIBRARY="%LIBRARY_LIB%\iconv.lib" ^
    POPPLER_ENABLED=YES ^
    POPPLER_CFLAGS="-I%LIBRARY_INC%\poppler -DPOPPLER_0_20_OR_LATER= -DPOPPLER_0_23_OR_LATER= -DPOPPLER_0_58_OR_LATER= -DPOPPLER_HAS_OPTCONTENT= -DPOPPLER_BASE_STREAM_HAS_TWO_ARGS= " ^
    POPPLER_MAJOR_VERSION=%POPPLER_MAJOR_VERSION% ^
    POPPLER_MINOR_VERSION=%POPPLER_MINOR_VERSION% ^
    POPPLER_LIBS="%LIBRARY_LIB%\poppler.lib"

endlocal && set BLD_OPTS=%BLD_OPTS%

setlocal EnableDelayedExpansion

if "%ARCH%"=="64" (
    set WIN64="WIN64=YES"
) else (
    set WIN64=
)

:: Work out MSVC_VER - needed for build process.
:: Currently guess from Python version
if  %vc% LEQ 9 set MSVC_VER=1500
if  %vc% GTR 9 set MSVC_VER=1900

:: Get the minor/major version of poppler from the %poppler% environment
:: variable that is set by conda-build
FOR /F "tokens=1,2 delims=." %%a IN ("%poppler%") DO (
  set POPPLER_MAJOR_VERSION=%%a
  set POPPLER_MINOR_VERSION=%%b
)

:: Need consistent flags between build and install.
set BLD_OPTS=%WIN64% ^
    MSVC_VER=%MSVC_VER% ^
    GDAL_HOME=%LIBRARY_PREFIX% ^
    BINDIR=%LIBRARY_BIN% ^
    LIBDIR=%LIBRARY_LIB% ^
    INCDIR=%LIBRARY_INC% ^
    DATADIR=%LIBRARY_PREFIX%\share\gdal ^
    HTMLDIR=%LIBRARY_PREFIX%\share\doc\gdal ^
    CURL_INC="-I%LIBRARY_INC%" ^
    CURL_LIB="%LIBRARY_LIB%\libcurl.lib wsock32.lib wldap32.lib winmm.lib" ^
    EXPAT_DIR=%LIBRARY_PREFIX% ^
    EXPAT_INCLUDE="-I%LIBRARY_INC%" ^
    EXPAT_LIB=%LIBRARY_LIB%\expat.lib ^
    FITS_PLUGIN=NO ^
    FITS_INC_DIR=%LIBRARY_INC% ^
    FITS_LIB="%LIBRARY_LIB%\cfitsio.lib" ^
    FREEXL_CFLAGS="-I%LIBRARY_INC%" ^
    FREEXL_LIBS=%LIBRARY_LIB%\freexl_i.lib ^
    GEOS_CFLAGS="-I%LIBRARY_INC% -DHAVE_GEOS" ^
    GEOS_DIR=%LIBRARY_PREFIX% ^
    GEOS_LIB=%LIBRARY_LIB%\geos_c.lib ^
    HDF4_DIR=%LIBRARY_PREFIX% ^
    HDF4_HAS_MAXOPENFILES=YES ^
    HDF4_LIB="%LIBRARY_LIB%\hdf.lib %LIBRARY_LIB%\mfhdf.lib %LIBRARY_LIB%\xdr.lib" ^
    HDF5_DIR=%LIBRARY_PREFIX% ^
    HDF5_LIB=%LIBRARY_LIB%\hdf5.lib ^
    JPEGDIR=%LIBRARY_INC% ^
    JPEG_EXTERNAL_LIB=1 ^
    JPEG_LIB=%LIBRARY_LIB%\libjpeg.lib ^
    KEA_CFLAGS="-I%LIBRARY_INC%" ^
    KEA_LIB="%LIBRARY_LIB%\hdf5_cpp.lib %LIBRARY_LIB%\libkea.lib" ^
    NETCDF_INC_DIR=%LIBRARY_INC% ^
    NETCDF_LIB=%LIBRARY_LIB%\netcdf.lib ^
    NETCDF_SETTING=yes ^
    OPENJPEG_CFLAGS="-I%LIBRARY_INC%\openjpeg-2.3" ^
    OPENJPEG_ENABLED=YES ^
    OPENJPEG_LIB=%LIBRARY_LIB%\openjp2.lib ^
    PG_INC_DIR=%LIBRARY_INC% ^
    PG_LIB=%LIBRARY_LIB%\libpq.lib ^
    PNGDIR=%LIBRARY_INC% ^
    PNG_EXTERNAL_LIB=1 ^
    PNG_LIB=%LIBRARY_LIB%\libpng.lib ^
    PROJ_FLAGS="-DPROJ_STATIC -DACCEPT_USE_OF_DEPRECATED_PROJ_API_H" ^
    PROJ_INCLUDE="-I%LIBRARY_INC%" ^
    PROJ_LIBRARY=%LIBRARY_LIB%\proj_6_1.lib ^
    SPATIALITE_412_OR_LATER=yes ^
    SQLITE_INC="-I%LIBRARY_INC% -DHAVE_SPATIALITE" ^
    SQLITE_LIB="%LIBRARY_LIB%\sqlite3.lib %LIBRARY_LIB%\spatialite_i.lib" ^
    TIFF_INC="-I%LIBRARY_INC%" ^
    TIFF_LIB=%LIBRARY_LIB%\tiff.lib ^
    TIFF_OPTS=-DBIGTIFF_SUPPORT ^
    XERCES_DIR=%LIBRARY_PREFIX% ^
    XERCES_INCLUDE="-I%LIBRARY_INC% -I%LIBRARY_INC%\xercesc" ^
    XERCES_LIB=%LIBRARY_LIB%\xerces-c_3.lib ^
    GEOTIFF_INC="-I%LIBRARY_INC%" ^
    GEOTIFF_LIB=%LIBRARY_LIB%\geotiff_i.lib ^
    LIBICONV_INCLUDE="-I%LIBRARY_INC% -DICONV_CONST= " ^
    LIBICONV_LIBRARY="%LIBRARY_LIB%\iconv.lib" ^
    POPPLER_ENABLED=YES ^
    POPPLER_CFLAGS="-I%LIBRARY_INC%\poppler -DPOPPLER_0_20_OR_LATER= -DPOPPLER_0_23_OR_LATER= -DPOPPLER_0_58_OR_LATER= -DPOPPLER_HAS_OPTCONTENT= -DPOPPLER_BASE_STREAM_HAS_TWO_ARGS= " ^
    POPPLER_MAJOR_VERSION=%POPPLER_MAJOR_VERSION% ^
    POPPLER_MINOR_VERSION=%POPPLER_MINOR_VERSION% ^
    POPPLER_LIBS="%LIBRARY_LIB%\poppler.lib"

endlocal && set BLD_OPTS=%BLD_OPTS%

fix proj4 lib

fix proj4 lib


C:\projects\crossfire\packages\OpenCover.4.6.519\tools\OpenCover.Console.exe -register:user "-target:C:\projects\crossfire\packages\NUnit.ConsoleRunner.3.7.0\tools\nunit3-console.exe" "-targetargs: C:\projects\crossfire\Tests\MultithreadProducerConsumerUnitTest\bin\Debug\MultithreadProducerConsumerUnitTest.dll" -output:C:\projects\crossfire\coverage.xml -returntargetcode

C:\projects\crossfire\packages\ReportGenerator.3.0.0\tools\ReportGenerator.exe "-reports:C:\projects\crossfire\coverage.xml" "-targetdir:C:\projects\crossfire\.coverage"

for /f %%i in ('git rev-parse HEAD') do set commit_id=%%i
for /f %%i in ('git rev-parse --abbrev-ref HEAD') do set commit_branch=%%i
for /f "delims=" %%i in ('git log -1 --pretty^=%%B') do set commit_msg=%%i
for /f "delims=" %%i in ('git log -1 --pretty^=%%an') do set commit_author=%%i
for /f %%i in ('git log -1 --pretty^=%%ae') do set commit_email=%%i

C:\projects\crossfire\packages\coveralls.net.0.7.0\tools\csmacnz.Coveralls.exe --opencover -i C:\projects\crossfire\coverage.xml --repoToken %COVERALLS_REPO_TOKEN% --commitId %commit_id% --commitBranch %commit_branch% --commitAuthor "%commit_author%" --commitEmail %commit_email% --commitMessage "%commit_msg%"

MSBuild.SonarQube.Runner.exe end /d:"sonar.login=%SONAR_LOGIN%"

C:\projects\crossfire\packages\OpenCover.4.6.519\tools\OpenCover.Console.exe -register:user "-target:C:\projects\crossfire\packages\NUnit.ConsoleRunner.3.7.0\tools\nunit3-console.exe" "-targetargs: C:\projects\crossfire\Fibonacci\FibonacciUnitTest\bin\Debug\FibonacciUnitTest.dll C:\projects\crossfire\LoopPerformance\LoopPerformanceUnitTest\bin\Debug\LoopPerformanceUnitTest.dll C:\projects\crossfire\MultithreadProducerConsumer\MultithreadProducerConsumerUnitTest\bin\Debug\MultithreadProducerConsumerUnitTest.dll" -output:C:\projects\crossfire\coverage.xml -returntargetcode

C:\projects\crossfire\packages\ReportGenerator.3.0.0\tools\ReportGenerator.exe "-reports:C:\projects\crossfire\coverage.xml" "-targetdir:C:\projects\crossfire\.coverage"

for /f %%i in ('git rev-parse HEAD') do set commit_id=%%i
for /f %%i in ('git rev-parse --abbrev-ref HEAD') do set commit_branch=%%i
for /f "delims=" %%i in ('git log -1 --pretty^=%%B') do set commit_msg=%%i
for /f "delims=" %%i in ('git log -1 --pretty^=%%an') do set commit_author=%%i
for /f %%i in ('git log -1 --pretty^=%%ae') do set commit_email=%%i

C:\projects\crossfire\packages\coveralls.net.0.7.0\tools\csmacnz.Coveralls.exe --opencover -i C:\projects\crossfire\coverage.xml --repoToken %COVERALLS_REPO_TOKEN% --commitId %commit_id% --commitBranch %commit_branch% --commitAuthor "%commit_author%" --commitEmail %commit_email% --commitMessage "%commit_msg%"

MSBuild.SonarQube.Runner.exe end /d:"sonar.login=%SONAR_LOGIN%"

add unit test projects to the existing hardcoded script


setlocal

set nocache=0

if exist thirdparty.cached (
	echo.
	echo Last build date of cache is
	type thirdparty.cached
	echo.
) else set nocache=1

if not exist %BOOST_ROOT% set nocache=1

if %nocache% == 1 (
	rmdir /s /q %BOOST_ROOT%
	pushd C:\Libraries\boost_1_59_0
	call .\bootstrap
	call .\b2 --prefix=%BOOST_ROOT% toolset=msvc-12.0 variant=release link=static threading=multi runtime-link=static --with-date_time --with-filesystem --with-system --with-regex --with-signals --with-thread --with-locale -q -d0 install
	xcopy /e /i /y %BOOST_ROOT%\include\boost-1_59\boost %BOOST_ROOT%\boost > nul
	popd
)

if %nocache% == 1 (
	call .\build.bat thirdparty
	date /t > thirdparty.cached & time /t >> thirdparty.cached
	echo.
	echo Thirdparty libraries installed.
	echo.
)

setlocal

set nocache=0

if not exist thirdparty.cached set nocache=1
if not exist %BOOST_ROOT% set nocache=1

if %nocache% == 1 (
	rmdir /s /q %BOOST_ROOT%
	pushd C:\Libraries\boost_1_59_0
	call .\bootstrap
	call .\b2 --prefix=%BOOST_ROOT% toolset=msvc-12.0 variant=release link=static threading=multi runtime-link=static --with-date_time --with-filesystem --with-system --with-regex --with-signals --with-thread --with-locale -q -d0 install
	xcopy /e /i /y /q %BOOST_ROOT%\include\boost-1_59\boost %BOOST_ROOT%\boost
	popd
	if %ERRORLEVEL% NEQ 0 goto ERROR

	call .\build.bat thirdparty
	if %ERRORLEVEL% NEQ 0 goto ERROR

	date /t > thirdparty.cached & time /t >> thirdparty.cached
	echo.
	echo Thirdparty libraries installed.
	echo.
	goto EXIT
) else (
	echo.
	echo Last build date of cache is
	type thirdparty.cached
	echo.
	goto EXIT
)

:ERROR
set EXITCODE=%ERRORLEVEL%

:EXIT
exit /b %EXITCODE%

Improve appveyor.install.bat

Improve appveyor.install.bat


dnx MessageTemplates.Tests test
packages\xunit.runner.console\tools\xunit.console.x86.exe FsMessageTemplates.Tests\bin\Release\FsMessageTemplates.Tests.dll
vstest.console /logger:AppVeyor /Logger:timelineLogger MessageTemplates.PerfTests\bin\Release\MessageTemplates.PerfTests.dll

Use vstest.console

Use vstest.console


@echo off

set BASE_DIR=%~dp0

taskkill /FI "Imagename eq cmd.exe" /FI "Windowtitle eq selenium - %BASE_DIR%run-selenium"
taskkill /FI "Imagename eq cmd.exe" /FI "Windowtitle eq http-server - %BASE_DIR%run-http-server"

start "selenium" %BASE_DIR%run-selenium
start "http-server" %BASE_DIR%run-http-server

gulp %*

taskkill /FI "Imagename eq cmd.exe" /FI "Windowtitle eq selenium - %BASE_DIR%run-selenium"
taskkill /FI "Imagename eq cmd.exe" /FI "Windowtitle eq http-server - %BASE_DIR%run-http-server"

@echo off

set BASE_DIR=%~dp0

taskkill /FI "Imagename eq cmd.exe" /FI "Windowtitle eq selenium - %BASE_DIR%run-selenium"
taskkill /FI "Imagename eq cmd.exe" /FI "Windowtitle eq http-server - %BASE_DIR%run-http-server"

start "selenium" %BASE_DIR%run-selenium
start "http-server" %BASE_DIR%run-http-server

call gulp %*

taskkill /FI "Imagename eq cmd.exe" /FI "Windowtitle eq selenium - %BASE_DIR%run-selenium"
taskkill /FI "Imagename eq cmd.exe" /FI "Windowtitle eq http-server - %BASE_DIR%run-http-server"

call gulp in windows

call gulp in windows


Add Batch File to Push to NuGet

Add Batch File to Push to NuGet


@echo off
rem
rem Install or update Cygwin.
rem

setlocal

set _PACKAGES=cron,diffutils,inetutils,ncurses,netcat,openssh,p7zip,procps,python,rsync,screen,unzip,vim,zip,genisoimage,w3m,wodim
set _ROOTDIR=C:\cygwin
set _SITE=http://mirrors.xmission.com/cygwin
set _PREFIX=CYGWIN-SETUP:

goto :main

:check_admin
    rem Check for ADMIN privileges
    rem https://sites.google.com/site/eneerge/home/BatchGotAdmin

    echo %_PREFIX% Checking for Administrator privileges
    >nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system"
    if "%ERRORLEVEL%" EQU "0" goto :endif_check_admin
        echo %_PREFIX% ERROR: You do not have Administrator privileges
        echo %_PREFIX% Rerun from a "Run as Administrator" command prompt
        exit /b 1
    :endif_check_admin
goto :eof

:stop_services
    if not exist "%_ROOTDIR%\bin\cygrunsrv.exe" goto :eof
    for /f "usebackq" %%s in (`%_ROOTDIR%\bin\cygrunsrv.exe --list`) do (
        echo %_PREFIX% Stopping %%s
        %_ROOTDIR%\bin\cygrunsrv --stop %%s
    )
goto :eof

:start_services
    for /f "usebackq" %%s in (`%_ROOTDIR%\bin\cygrunsrv.exe --list`) do (
        echo %_PREFIX% Starting %%s
        %_ROOTDIR%\bin\cygrunsrv --start %%s
    )
goto :eof

:get_setup_exe
    if not exist %_ROOTDIR% (
        echo %_PREFIX% Creating %_ROOTDIR%
        mkdir %_ROOTDIR%
    )
    echo %_PREFIX% Fetching latest setup.exe from cygwin.com
    wget --quiet -O %_ROOTDIR%\setup.exe http://cygwin.com/setup.exe
goto :eof

:setup
    echo %_PREFIX% Running setup.exe to install standard package set
    %_ROOTDIR%\setup.exe --site %_SITE% --quiet-mode --no-shortcuts --root %_ROOTDIR% --local-package-dir %_ROOTDIR%\LocalPackageDir --packages %_PACKAGES%
    echo %_PREFIX% Running setup.exe for updates
    %_ROOTDIR%\setup.exe --site %_SITE% --quiet-mode --no-shortcuts --root %_ROOTDIR% --local-package-dir %_ROOTDIR%\LocalPackageDir --packages %_PACKAGES%
goto :eof

:create_passwd
    if not exist %_ROOTDIR%\etc\passwd (
        echo %_PREFIX% Creating /etc/passwd
        %_ROOTDIR%\bin\bash --login -i -c '/usr/bin/mkpasswd --local > /etc/passwd'
    )
    if not exist %_ROOTDIR%\etc\group (
        echo %_PREFIX% Creating /etc/group
        %_ROOTDIR%\bin\bash --login -i -c '/usr/bin/mkgroup --local > /etc/group'
    )
goto :eof

:config_syslogd
    sc query syslogd | findstr "service does not exist" > NUL:
    if %ERRORLEVEL% NEQ 0 goto :eof

    echo %_PREFIX% Configuring syslogd
    if not exist %_ROOTDIR%\bin\syslogd-config (
        echo %_PREFIX% ERROR: inetutils not installed
        goto :eof
    )
    %_ROOTDIR%\bin\bash --login -i -c "/usr/bin/syslogd-config"
goto :eof

:config_sshd
    sc query sshd | findstr "service does not exist" > NUL:
    if %ERRORLEVEL% NEQ 0 goto :eof

    echo %_PREFIX% Configuring sshd
    if not exist %_ROOTDIR%\bin\ssh-host-config (
        echo %_PREFIX% ERROR: opensshd not installed
        goto :eof
    )
    findstr /r "^sshd:" %_ROOTDIR%\etc\passwd
    if %ERRORLEVEL% EQU 0 (
        echo %_PREFIX% ERROR: sshd account found in /etc/passwd
        goto :eof
    )
    %_ROOTDIR%\bin\bash --login -i -c "/usr/bin/ssh-host-config"
    echo %_PREFIX% Disabling reverse DNS lookup by sshd
    %_ROOTDIR%\bin\bash --login -i -c "/usr/bin/sed -i -e 's/#UseDNS yes/UseDNS no/' /etc/sshd_config"
goto :eof

:config_lsa
    reg query HKLM\SYSTEM\CurrentControlSet\Control\Lsa /v "Authentication Packages" | findstr cyglsa > NUL:
    if %ERRORLEVEL% EQU 0 goto :eof

    echo %_PREFIX% Configuring cyglsa
    %_ROOTDIR%\bin\bash --login -i -c "/usr/bin/cyglsa-config"
goto :eof

:main
    call :check_admin ||exit /b 1
    call :get_setup_exe
    call :stop_services
    call :setup
    call :create_passwd
    call :config_syslogd
    call :config_sshd
    call :start_services
    rem Do config_lsa last so that reboot message is last
    call :config_lsa

:exit

@echo off
rem
rem Install or update Cygwin.
rem

setlocal

set _PACKAGES=cron,diffutils,inetutils,ncurses,netcat,openssh,p7zip,procps,python,rsync,screen,unzip,vim,zip,genisoimage,w3m,wodim
set _ROOTDIR=C:\cygwin
set _SITE=http://mirrors.xmission.com/cygwin
set _PREFIX=CYGWIN-SETUP:

goto :main

:check_admin
    rem Check for ADMIN privileges
    rem https://sites.google.com/site/eneerge/home/BatchGotAdmin

    echo %_PREFIX% Checking for Administrator privileges
    >nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system"
    if "%ERRORLEVEL%" EQU "0" goto :endif_check_admin
        echo %_PREFIX% ERROR: You do not have Administrator privileges
        echo %_PREFIX% Rerun from a "Run as Administrator" command prompt
        exit /b 1
    :endif_check_admin
goto :eof

:stop_services
    if not exist "%_ROOTDIR%\bin\cygrunsrv.exe" goto :eof
    for /f "usebackq" %%s in (`%_ROOTDIR%\bin\cygrunsrv.exe --list`) do (
        echo %_PREFIX% Stopping %%s
        %_ROOTDIR%\bin\cygrunsrv --stop %%s
    )
goto :eof

:start_services
    for /f "usebackq" %%s in (`%_ROOTDIR%\bin\cygrunsrv.exe --list`) do (
        echo %_PREFIX% Starting %%s
        %_ROOTDIR%\bin\cygrunsrv --start %%s
    )
goto :eof

:get_setup_exe
    if not exist %_ROOTDIR% (
        echo %_PREFIX% Creating %_ROOTDIR%
        mkdir %_ROOTDIR%
    )
    echo %_PREFIX% Fetching latest setup.exe from cygwin.com
    wget --quiet -O %_ROOTDIR%\setup.exe http://cygwin.com/setup.exe
goto :eof

:setup
    echo %_PREFIX% Running setup.exe to install standard package set
    %_ROOTDIR%\setup.exe --site %_SITE% --quiet-mode --no-shortcuts --root %_ROOTDIR% --local-package-dir %_ROOTDIR%\LocalPackageDir --packages %_PACKAGES%
    echo %_PREFIX% Running setup.exe for updates
    %_ROOTDIR%\setup.exe --site %_SITE% --quiet-mode --no-shortcuts --root %_ROOTDIR% --local-package-dir %_ROOTDIR%\LocalPackageDir
goto :eof

:create_passwd
    if not exist %_ROOTDIR%\etc\passwd (
        echo %_PREFIX% Creating /etc/passwd
        %_ROOTDIR%\bin\bash --login -i -c '/usr/bin/mkpasswd --local > /etc/passwd'
    )
    if not exist %_ROOTDIR%\etc\group (
        echo %_PREFIX% Creating /etc/group
        %_ROOTDIR%\bin\bash --login -i -c '/usr/bin/mkgroup --local > /etc/group'
    )
goto :eof

:config_syslogd
    sc query syslogd | findstr "service does not exist" > NUL:
    if %ERRORLEVEL% NEQ 0 goto :eof

    echo %_PREFIX% Configuring syslogd
    if not exist %_ROOTDIR%\bin\syslogd-config (
        echo %_PREFIX% ERROR: inetutils not installed
        goto :eof
    )
    %_ROOTDIR%\bin\bash --login -i -c "/usr/bin/syslogd-config"
goto :eof

:config_sshd
    sc query sshd | findstr "service does not exist" > NUL:
    if %ERRORLEVEL% NEQ 0 goto :eof

    echo %_PREFIX% Configuring sshd
    if not exist %_ROOTDIR%\bin\ssh-host-config (
        echo %_PREFIX% ERROR: opensshd not installed
        goto :eof
    )
    findstr /r "^sshd:" %_ROOTDIR%\etc\passwd
    if %ERRORLEVEL% EQU 0 (
        echo %_PREFIX% ERROR: sshd account found in /etc/passwd
        goto :eof
    )
    %_ROOTDIR%\bin\bash --login -i -c "/usr/bin/ssh-host-config"
    echo %_PREFIX% Disabling reverse DNS lookup by sshd
    %_ROOTDIR%\bin\bash --login -i -c "/usr/bin/sed -i -e 's/#UseDNS yes/UseDNS no/' /etc/sshd_config"
goto :eof

:config_lsa
    reg query HKLM\SYSTEM\CurrentControlSet\Control\Lsa /v "Authentication Packages" | findstr cyglsa > NUL:
    if %ERRORLEVEL% EQU 0 goto :eof

    echo %_PREFIX% Configuring cyglsa
    %_ROOTDIR%\bin\bash --login -i -c "/usr/bin/cyglsa-config"
goto :eof

:main
    call :check_admin ||exit /b 1
    call :get_setup_exe
    call :stop_services
    call :setup
    call :create_passwd
    call :config_syslogd
    call :config_sshd
    call :start_services
    rem Do config_lsa last so that reboot message is last
    call :config_lsa

:exit

fix 'Running setup.exe for updates'

cygwin-setup.bat: fix 'Running setup.exe for updates'


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

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

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

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

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

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

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

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

SET CLASSPATH=%CLASSPATH%;%JARS%

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

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

goto end

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

:end

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

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

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

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

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

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

rem Check if classes exists and is not empty
IF EXIST "%PA_SCHEDULER%\classes\scheduler" (
	SET CLASSPATH=%CLASSPATH%;%PA_SCHEDULER%\classes\resource-manager;%PA_SCHEDULER%\classes\scheduler
	SET JARS=%PA_SCHEDULER%\lib\
	FOR %%j IN ("%PA_SCHEDULER%\lib\*.jar") DO SET JARS=!JARS!;%%j
	rem Use jar index to avoid 'command too long'
	SET JARS=!JARS!;%PA_SCHEDULER%\lib\ProActive\ProActive.jar
	FOR %%j IN ("%PA_SCHEDULER%\lib\common\*.jar") DO SET JARS=!JARS!;%%j
) ELSE (
	SET JARS=%PA_SCHEDULER%\dist\lib\ProActive.jar
rem Jars needed by the scheduler not included in the ProActive.jar jarindex
	SET JARS=!JARS!;%PA_SCHEDULER%\dist\lib\client.jar
	SET JARS=!JARS!;%PA_SCHEDULER%\dist\lib\derby.jar
	SET JARS=!JARS!;%PA_SCHEDULER%\dist\lib\derbytools.jar
	SET JARS=!JARS!;%PA_SCHEDULER%\dist\lib\isorelax.jar
	SET JARS=!JARS!;%PA_SCHEDULER%\dist\lib\js.jar
	SET JARS=!JARS!;%PA_SCHEDULER%\dist\lib\msv.jar
	SET JARS=!JARS!;%PA_SCHEDULER%\dist\lib\ProActive_resource-manager.jar
	SET JARS=!JARS!;%PA_SCHEDULER%\dist\lib\ProActive_scheduler.jar
	SET JARS=!JARS!;%PA_SCHEDULER%\dist\lib\ProActive_tests.jar
	SET JARS=!JARS!;%PA_SCHEDULER%\dist\lib\relaxngDatatype.jar
	SET JARS=!JARS!;%PA_SCHEDULER%\dist\lib\rngpack-1.1a.jar.jar
	SET JARS=!JARS!;%PA_SCHEDULER%\dist\lib\script-api.jar.jar
	SET JARS=!JARS!;%PA_SCHEDULER%\dist\lib\script-js.jar
	SET JARS=!JARS!;%PA_SCHEDULER%\dist\lib\xsdlib.jar
)

SET CLASSPATH=%CLASSPATH%;%JARS%

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

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

goto end

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

:end

Fix init.bat to set the classpath when running on dist/lib/.

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


@echo off
rem Clear the "UNC paths are not supported" warning.
cls
cscript //i //nologo %~dp0\windows_info.vbs
pause

@echo off
rem Clear the "UNC paths are not supported" warning.
cls
cscript //i //nologo "%~dp0\windows_info.vbs"
pause

fix when run from dir with space in it

windows_info.bat: fix when run from dir with space in it


for /f "delims=" %%i in ('python -c "import os; print os.environ.get(\'CONDA_PREFIX\').replace(\'/\', \'\\\')"') do set TEMP_PREFIX=%%i
set SCONSFLAGS="--site-dir=%TEMP_PREFIX%/share/site_scons"

for /f "delims=" %i in ('python -c "import os; print os.environ.get('CONDA_PREFIX').replace('/', '\\')"') do set TEMP_PREFIX=%i
set SCONSFLAGS="--site-dir=%TEMP_PREFIX%/share/site_scons"

Correct Windows site_scons

Correct Windows site_scons


python extract_hgt.py  53.119 -4.093 53.0314 -3.940 srtm90 | python array-to-stl.py -999 90 1 53 1 2 > snowden.stl

Create snowdon.bat

Create snowdon.bat


@ECHO OFF
Title Mobilot Setup

ECHO Running "composer install" ...
composer install

ECHO Creating folders under "app/storage/" ...
mkdir app\storage\logs
mkdir app\storage\cache
mkdir app\storage\meta
mkdir app\storage\sessions
mkdir app\storage\views

ECHO Creating folders under "public/" ...
mkdir public\upload

ECHO NOTE: Manually create "database.php" (if necessary)
ECHO NOTE: Manually create database named "mobilot" (MySQL)

Support for Windows setup of mobilot with BAT.


"%R%" CMD INSTALL --build .
IF %ERRORLEVEL% NEQ 0 exit 1

Add bld.bat

Add bld.bat


@echo off
setlocal
cls

git show-branch --list release-*
echo.
SET /P release_branch="Please enter version of release branch: release-"
echo.
echo.
echo Change local branch to master
git checkout master
echo.
echo.
echo Merge release branch to master
git merge --no-ff release-%release_branch%
echo.
echo.
echo Create a tag of this version on master branch
git tag -a v%release_branch% -m "Creating Tag for Release %release_branch%"
echo.
echo.
echo Push changes to master and push tag
git push origin master
git push origin v%release_branch%
echo.
echo.
echo Change to develop workspace
git checkout develop
echo.
echo.
echo Merge changs from release branch
git merge --no-ff release-%release_branch%
echo.
echo.
echo Update Versions
call "%M2_HOME%/bin/mvn" versions:set -DnextSnapshot=true -DprocessAllModules=true
echo.
echo.
echo Delete the local release branch
git branch -d release-%release_branch%
echo.
echo.
echo Commiting update POM Files
:: commit the pom file with the updated version
git commit -m "changing develop version to new version" *pom.xml
echo.
echo.
echo Push the merge with version change to GitHub
git push origin develop
echo.
echo.
echo Changing to Master repository
git checkout v%release_branch%
echo.
echo.
echo Deploy new master version
call "%M2_HOME%/bin/mvn" deploy

add deploy request to release

add deploy request to release


setlocal
call settings.bat

svn checkout http://svn.osgeo.org/geos/trunk geos-svn
git svn clone -r HEAD http://svn.osgeo.org/geos/trunk geos-svn

cd geos-svn
echo #define GEOS_SVN_REVISION "3.4.2.svn" > geos_svn_revision.h
cmake -G %CMAKE_TARGET% -DCMAKE_BUILD_TYPE=%VARIANT% -DCMAKE_INSTALL_PREFIX=%PREFIX% -DGEOS_ENABLE_TESTS=OFF
%MAKE% install
cd ..

setlocal
call settings.bat

svn checkout http://svn.osgeo.org/geos/trunk geos-svn
rem git svn clone -r HEAD http://svn.osgeo.org/geos/trunk geos-svn

cd geos-svn
echo #define GEOS_SVN_REVISION "3.4.2.svn" > geos_svn_revision.h
cmake -G %CMAKE_TARGET% -DCMAKE_BUILD_TYPE=%VARIANT% -DCMAKE_INSTALL_PREFIX=%PREFIX% -DGEOS_ENABLE_TESTS=OFF
%MAKE% install
cd ..

use only svn to get geos

use only svn to get geos


@echo off

:: BatchGotAdmin
:-------------------------------------
REM  --> Check for permissions
    IF "%PROCESSOR_ARCHITECTURE%" EQU "amd64" (
>nul 2>&1 "%SYSTEMROOT%\SysWOW64\cacls.exe" "%SYSTEMROOT%\SysWOW64\config\system"
) ELSE (
>nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system"
)

REM --> If error flag set, we do not have admin.
if '%errorlevel%' NEQ '0' (
    echo Requesting administrative privileges...
    goto UACPrompt
) else ( goto gotAdmin )

:UACPrompt
    echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%\getadmin.vbs"
    set params = %*:"=""
    echo UAC.ShellExecute "cmd.exe", "/c ""%~s0"" %params%", "", "runas", 1 >> "%temp%\getadmin.vbs"

    "%temp%\getadmin.vbs"
    del "%temp%\getadmin.vbs"
    exit /B

:gotAdmin
    pushd "%CD%"
    CD /D "%~dp0"
:--------------------------------------

@echo Mesa3D quick deployment utility
@echo -------------------------------
@echo Quick deployment utility allows for fast Mesa deployment without manual copy-paste. This helps a lot if you have
@echo many programs that can use Mesa. Some applications still may use the GPU if they are smart enough to only load OpenGL
@echo DLL from system directory. Use Federico Dossena's Mesainjector to workaround this case.
@echo Build instructions - https://fdossena.com/?p=mesa/injector_build.frag
@echo VMWare ThinApp capture: http://fdossena.com/mesa/MesaInjector_Capture.7z
@echo.
@pause

:deploy
@cls
@echo Mesa3D quick deployment utility
@echo -------------------------------
@echo Please provide the path to the folder that contains the application launcher executable. It is recommended to
@echo copy-paste it from Windows Explorer using CTRL+V. The right click paste introduced in Windows 10 may lead to
@echo unexpected double paste. Also don't worry if path contains spaces, parantheses or other symbols, it is enclosed in
@echo quotes automatically so you don't need to add them manually.
@echo.
@set /p dir=Path to folder holding application executable:
@echo.
@set mesadll=x86
@if %PROCESSOR_ARCHITECTURE%==AMD64 GOTO ask_for_app_abi
@if NOT %PROCESSOR_ARCHITECTURE%==AMD64 GOTO finish

:ask_for_app_abi
@set /p ABI=This is a 64-bit application (y=yes):
@if /I "%ABI%"=="y" set mesadll=x64
@echo.

:finish
@set mesaloc=%~dp0
@mklink "%dir%\opengl32.dll" "%mesaloc%%mesadll%\opengl32.dll"
@echo.
@set s3tc=n
@set /p s3tc=Do you need S3TC (y/n):
@echo.
@if /I "%s3tc%"=="y" mklink "%dir%\dxtn.dll" "%mesaloc%%mesadll%\dxtn.dll"
@if /I "%s3tc%"=="y" echo.
@set osmesatype=n
@set /p osmesa=Do you need off-screen rendering (y/n):
@echo.
@if /I "%osmesa%"=="y" echo What version of osmesa off-screen rendering you want:
@if /I "%osmesa%"=="y" echo 1. Gallium based (faster, but lacks certain features);
@if /I "%osmesa%"=="y" echo 2. Swrast based (slower, but has unique OpenGL 2.1 features);
@if /I "%osmesa%"=="y" set /p osmesatype=Enter choice:
@if /I "%osmesa%"=="y" echo.
@if "%osmesatype%"=="1" mklink "%dir%\osmesa.dll" "%mesaloc%%mesadll%\osmesa-gallium.dll"
@if "%osmesatype%"=="2" mklink "%dir%\osmesa.dll" "%mesaloc%%mesadll%\osmesa-swrast.dll"
@if "%osmesatype%"=="1" echo.
@if "%osmesatype%"=="2" echo.
@set /p graw=Do you need graw library (y/n):
@echo.
@if /I "%graw%"=="y" mklink "%dir%\graw.dll" "%mesaloc%%mesadll%\graw.dll"
@echo.
@set /p rerun=More Mesa deployment? (y=yes):
@if /I "%rerun%"=="y" GOTO deploy

@echo off

:: BatchGotAdmin
:-------------------------------------
REM  --> Check for permissions
    IF "%PROCESSOR_ARCHITECTURE%" EQU "amd64" (
>nul 2>&1 "%SYSTEMROOT%\SysWOW64\cacls.exe" "%SYSTEMROOT%\SysWOW64\config\system"
) ELSE (
>nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system"
)

REM --> If error flag set, we do not have admin.
if '%errorlevel%' NEQ '0' (
    echo Requesting administrative privileges...
    goto UACPrompt
) else ( goto gotAdmin )

:UACPrompt
    echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%\getadmin.vbs"
    set params = %*:"=""
    echo UAC.ShellExecute "cmd.exe", "/c ""%~s0"" %params%", "", "runas", 1 >> "%temp%\getadmin.vbs"

    "%temp%\getadmin.vbs"
    del "%temp%\getadmin.vbs"
    exit /B

:gotAdmin
    pushd "%CD%"
    CD /D "%~dp0"
:--------------------------------------

@echo Mesa3D quick deployment utility
@echo -------------------------------
@echo Quick deployment utility allows for fast Mesa deployment without manual copy-paste. This helps a lot if you have
@echo many programs that can use Mesa. Some applications still may use the GPU if they are smart enough to only load OpenGL
@echo DLL from system directory. Use Federico Dossena's Mesainjector to workaround this case.
@echo Build instructions - https://fdossena.com/?p=mesa/injector_build.frag
@echo VMWare ThinApp capture: http://fdossena.com/mesa/MesaInjector_Capture.7z
@echo.
@pause

:deploy
@cls
@echo Mesa3D quick deployment utility
@echo -------------------------------
@echo Please provide the path to the folder that contains the application launcher executable. It is recommended to
@echo copy-paste it from Windows Explorer using CTRL+V. The right click paste introduced in Windows 10 may lead to
@echo unexpected double paste. Also don't worry if path contains spaces, parantheses or other symbols, it is enclosed in
@echo quotes automatically so you don't need to add them manually.
@echo.
@set /p dir=Path to folder holding application executable:
@echo.
@set mesadll=x86
@if %PROCESSOR_ARCHITECTURE%==AMD64 GOTO ask_for_app_abi
@if NOT %PROCESSOR_ARCHITECTURE%==AMD64 GOTO finish

:ask_for_app_abi
@set /p ABI=This is a 64-bit application (y=yes):
@if /I "%ABI%"=="y" set mesadll=x64
@echo.

:finish
@set mesaloc=%~dp0
@mklink "%dir%\opengl32.dll" "%mesaloc%%mesadll%\opengl32.dll"
@mklink "%dir%\swrAVX.dll" "%mesaloc%%mesadll%\swrAVX.dll"
@mklink "%dir%\swrAVX2.dll" "%mesaloc%%mesadll%\swrAVX2.dll"
@echo.
@set s3tc=n
@set /p s3tc=Do you need S3TC (y/n):
@echo.
@if /I "%s3tc%"=="y" mklink "%dir%\dxtn.dll" "%mesaloc%%mesadll%\dxtn.dll"
@if /I "%s3tc%"=="y" echo.
@set osmesatype=n
@set /p osmesa=Do you need off-screen rendering (y/n):
@echo.
@if /I "%osmesa%"=="y" echo What version of osmesa off-screen rendering you want:
@if /I "%osmesa%"=="y" echo 1. Gallium based (faster, but lacks certain features);
@if /I "%osmesa%"=="y" echo 2. Swrast based (slower, but has unique OpenGL 2.1 features);
@if /I "%osmesa%"=="y" set /p osmesatype=Enter choice:
@if /I "%osmesa%"=="y" echo.
@if "%osmesatype%"=="1" mklink "%dir%\osmesa.dll" "%mesaloc%%mesadll%\osmesa-gallium.dll"
@if "%osmesatype%"=="2" mklink "%dir%\osmesa.dll" "%mesaloc%%mesadll%\osmesa-swrast.dll"
@if "%osmesatype%"=="1" echo.
@if "%osmesatype%"=="2" echo.
@set /p graw=Do you need graw library (y/n):
@echo.
@if /I "%graw%"=="y" mklink "%dir%\graw.dll" "%mesaloc%%mesadll%\graw.dll"
@echo.
@set /p rerun=More Mesa deployment? (y=yes):
@if /I "%rerun%"=="y" GOTO deploy

Add support for OpenSWR to quick deployment utility Is starting to catch up with llvmpipe in performance


### application.bat - 201x - votre nom ###
echo "Copyright toto - 2014"

echo "version 1.1"
echo "Build : 11:00"

### application.bat - 2014 - Toto ###
version = "2"
build_hour = "11H00"

echo "Build ${build_hour}"
echo "version ${version}"

add var to script

add var to script


;= echo off
;= rem Call DOSKEY and use this file as the macrofile
;= %SystemRoot%\system32\doskey /listsize=1000 /macrofile=%0%
;= rem In batch mode, jump to the end of the file
;= goto:eof
;= Add aliases below here

clear=cls
cmderr=cd /d "%CMDER_ROOT%"
e=explorer $*
gvim="C:\Program Files (x86)\Vim\vim80\gvim.exe" $*
history=cat "%CMDER_ROOT%\config\.history"
ll=ls -l -h --show-control-chars -F --color $*
ls=ls --show-control-chars -F --color $*
nuget="C:\workspace\nuget\nuget.exe" $*
pip2="C:\Program Files\Anaconda2\Scripts\pip.exe" $*
pip3="C:\Program Files\Anaconda3\Scripts\pip.exe" $*
pwd=cd
unalias=alias /d $1
vi=vim $*
vim="C:\Program Files (x86)\Vim\vim80\vim.exe" $*
vimdiff="C:\Program Files (x86)\Vim\vim80\vim.exe" -d $*
vsdevcmd="C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\Tools\VsDevCmd.bat"
vsmsbuild="C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\Tools\VsMSBuildCmd.bat"

;= Git
g=git $*

;= Git Add
ga=git add --verbose $*
gae=git add --verbose --edit $*
gad=git add --verbose --interactive $*
gap=git add --verbose --patch $*
gau=git add --verbose --update $*

;= Git Branch
gb=git branch -vv $*
gba=git branch -vv --all $*
gbc=git checkout -b $*
gbd=git branch --delete $*
gbm=git branch --move $*
gbs=git show-branch $*

;= Git Commit
gc=git commit -v $*
gca=git commit -v --all $*
gcF=git commit -v --amend $*
gcm=git commit --message $*
gcp=git cherry-pick --ff $*
gcS=git commit --gpg-sign $*
gcSF=git commit --amend --gpg-sign $*
gco=git checkout $*
gcs=git show $*

;= Git Data
gd=git ls-files $*
gdc=git ls-files --cached $*
gdx=git ls-files --deleted $*
gdm=git ls-files --modified $*
gdu=git ls-files --other --exclude-standard $*
gdk=git ls-files --killed $*
gdi=git status --porcelain --short --ignored | sed -n "s/^!! //p" $*

;= Git Fetch
gf=git fetch --all --tags --prune $*
gfc=git clone $*
gfcr=git clone --recurse-submodules $*
gfm=git pull
gfr=git pull --rebase
gfx="C:\workspace\aliases\gfx.cmd" $*
gfu=git remote --verbose update --prune $*

;= Git Grep
gg=git grep $*
ggi=git grep --interactive $*
ggl=git grep --files-with-matches $*
ggv=git grep --invert-match $*
ggw=git grep --word-regexp $*

;= Git Index
gia=git add $*
gid=git diff --cached $*
gir=git reset $*

;= Git Log Author
gl=git log --pretty=format:"%C(4)%aN %C(7)<%aE> %C(4)%ar %C(3)%ad %C(2)%h%C(1)%d %C(7)%<(80,trunc)%s" --topo-order $*
gla=git log --pretty=format:"%C(4)%aN %C(7)<%aE> %C(4)%ar %C(3)%ad %C(2)%h%C(1)%d %C(7)%<(80,trunc)%s" --topo-order --all $*
glag=git log --pretty=format:"%C(4)%aN %C(7)<%aE> %C(4)%ar %C(3)%ad %C(2)%h%C(1)%d %C(7)%<(80,trunc)%s" --topo-order --all --graph $*
gld=git log --pretty=format:"%C(4)%aN %C(7)<%aE> %C(4)%ar %C(3)%ad %C(2)%h%C(1)%d %C(7)%<(80,trunc)%s" --topo-order --no-merges --first-parent $*
gldp=git log --pretty=format:"%C(4)%aN %C(7)<%aE> %C(4)%ar %C(3)%ad %C(2)%h%C(1)%d %C(7)%<(80,trunc)%s" --topo-order --no-merges --first-parent --patch $*
glg=git log --pretty=format:"%C(4)%aN %C(7)<%aE> %C(4)%ar %C(3)%ad %C(2)%h%C(1)%d %C(7)%<(80,trunc)%s" --topo-order --graph $*
gls=git log --pretty="format:%C(bold)Commit:%C(reset) %C(2)%H%C(1)%d%n%C(bold)Author:%C(reset) %C(4)%an %C(7)<%ae>%n%C(bold)Date:%C(reset) %C(3)%ai %C(4)(%ar)%C(reset)%n%+B" --topo-order --stat $*

;= Git Log Committer
glc=git log --pretty=format:"%C(4)%cN %C(7)<%cE> %C(4)%cr %C(3)%cd %C(2)%h%C(1)%d %C(7)%<(80,trunc)%s" --topo-order $*
glca=git log --pretty=format:"%C(4)%cN %C(7)<%cE> %C(4)%cr %C(3)%cd %C(2)%h%C(1)%d %C(7)%<(80,trunc)%s" --topo-order --all $*
glcag=git log --pretty=format:"%C(4)%cN %C(7)<%cE> %C(4)%cr %C(3)%cd %C(2)%h%C(1)%d %C(7)%<(80,trunc)%s" --topo-order --all --graph $*
glcd=git log --pretty=format:"%C(4)%cN %C(7)<%cE> %C(4)%cr %C(3)%cd %C(2)%h%C(1)%d %C(7)%<(80,trunc)%s" --topo-order --no-merges --first-parent $*
glcdp=git log --pretty=format:"%C(4)%cN %C(7)<%cE> %C(4)%cr %C(3)%cd %C(2)%h%C(1)%d %C(7)%<(80,trunc)%s" --topo-order --no-merges --first-parent --patch $*
glcg=git log --pretty=format:"%C(4)%cN %C(7)<%cE> %C(4)%cr %C(3)%cd %C(2)%h%C(1)%d %C(7)%<(80,trunc)%s" --topo-order --graph $*
glcs=git log --pretty="format:%C(bold)Commit:%C(reset) %C(2)%H%C(1)%d%n%C(bold)Committer:%C(reset) %C(4)%cn %C(7)<%ce>%n%C(bold)Date:%C(reset) %C(3)%ci %C(4)(%cr)%C(reset)%n%+B" --topo-order --stat $*

;= Git Merge
gm=git merge $*
gma=git merge --abort $*
gmt=git mergetool $*

;= Git Push
gp=git push $*
gpt=git push --tags $*

;= Git Rebase
gr=git rebase $*
gra=git rebase --abort $*
grc=git rebase --continue $*
gri=git rebase --interactive $*

;= Git Remote

;= Git Stash
gs=git stash $*
gsa=git stash apply $*
gsd=git stash show --patch --stat $*
gsx=git stash drop $*
gsl=git stash list $*
gsp=git stash pop $*
gss=git stash save --include-untracked $*

;= Git Working Copy
gwa=git add --verbose $*
gws=git status $*
gwd=git diff $*
gwr=git reset --soft $*
gwc=git clean $*

;= echo off
;= rem Call DOSKEY and use this file as the macrofile
;= %SystemRoot%\system32\doskey /listsize=1000 /macrofile=%0%
;= rem In batch mode, jump to the end of the file
;= goto:eof
;= Add aliases below here

clear=cls
cmderr=cd /d "%CMDER_ROOT%"
e=explorer $*
gvim="C:\Program Files (x86)\Vim\vim80\gvim.exe" $*
history=cat "%CMDER_ROOT%\config\.history"
ll=ls -l -h --show-control-chars -F --color $*
ls=ls --show-control-chars -F --color $*
nuget="C:\workspace\nuget\nuget.exe" $*
pip2="C:\Program Files\Anaconda2\Scripts\pip.exe" $*
pip3="C:\Program Files\Anaconda3\Scripts\pip.exe" $*
ps=powershell $*
pwd=cd
unalias=alias /d $1
vi=vim $*
vim="C:\Program Files (x86)\Vim\vim80\vim.exe" $*
vimdiff="C:\Program Files (x86)\Vim\vim80\vim.exe" -d $*
vsdevcmd="C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\Tools\VsDevCmd.bat"
vsmsbuild="C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\Tools\VsMSBuildCmd.bat"

;= Git
g=git $*

;= Git Add
ga=git add --verbose $*
gae=git add --verbose --edit $*
gad=git add --verbose --interactive $*
gap=git add --verbose --patch $*
gau=git add --verbose --update $*

;= Git Branch
gb=git branch -vv $*
gba=git branch -vv --all $*
gbc=git checkout -b $*
gbd=git branch --delete $*
gbm=git branch --move $*
gbs=git show-branch $*

;= Git Commit
gc=git commit -v $*
gca=git commit -v --all $*
gcF=git commit -v --amend $*
gcm=git commit --message $*
gcp=git cherry-pick --ff $*
gcS=git commit --gpg-sign $*
gcSF=git commit --amend --gpg-sign $*
gco=git checkout $*
gcs=git show $*

;= Git Data
gd=git ls-files $*
gdc=git ls-files --cached $*
gdx=git ls-files --deleted $*
gdm=git ls-files --modified $*
gdu=git ls-files --other --exclude-standard $*
gdk=git ls-files --killed $*
gdi=git status --porcelain --short --ignored | sed -n "s/^!! //p" $*

;= Git Fetch
gf=git fetch --all --tags --prune $*
gfc=git clone $*
gfcr=git clone --recurse-submodules $*
gfm=git pull
gfr=git pull --rebase
gfx="C:\workspace\aliases\gfx.cmd" $*
gfu=git remote --verbose update --prune $*

;= Git Grep
gg=git grep $*
ggi=git grep --interactive $*
ggl=git grep --files-with-matches $*
ggv=git grep --invert-match $*
ggw=git grep --word-regexp $*

;= Git Index
gia=git add $*
gid=git diff --cached $*
gir=git reset $*

;= Git Log Author
gl=git log --pretty=format:"%C(4)%aN %C(7)<%aE> %C(4)%ar %C(3)%ad %C(2)%h%C(1)%d %C(7)%<(80,trunc)%s" --topo-order $*
gla=git log --pretty=format:"%C(4)%aN %C(7)<%aE> %C(4)%ar %C(3)%ad %C(2)%h%C(1)%d %C(7)%<(80,trunc)%s" --topo-order --all $*
glag=git log --pretty=format:"%C(4)%aN %C(7)<%aE> %C(4)%ar %C(3)%ad %C(2)%h%C(1)%d %C(7)%<(80,trunc)%s" --topo-order --all --graph $*
gld=git log --pretty=format:"%C(4)%aN %C(7)<%aE> %C(4)%ar %C(3)%ad %C(2)%h%C(1)%d %C(7)%<(80,trunc)%s" --topo-order --no-merges --first-parent $*
gldp=git log --pretty=format:"%C(4)%aN %C(7)<%aE> %C(4)%ar %C(3)%ad %C(2)%h%C(1)%d %C(7)%<(80,trunc)%s" --topo-order --no-merges --first-parent --patch $*
glg=git log --pretty=format:"%C(4)%aN %C(7)<%aE> %C(4)%ar %C(3)%ad %C(2)%h%C(1)%d %C(7)%<(80,trunc)%s" --topo-order --graph $*
gls=git log --pretty="format:%C(bold)Commit:%C(reset) %C(2)%H%C(1)%d%n%C(bold)Author:%C(reset) %C(4)%an %C(7)<%ae>%n%C(bold)Date:%C(reset) %C(3)%ai %C(4)(%ar)%C(reset)%n%+B" --topo-order --stat $*

;= Git Log Committer
glc=git log --pretty=format:"%C(4)%cN %C(7)<%cE> %C(4)%cr %C(3)%cd %C(2)%h%C(1)%d %C(7)%<(80,trunc)%s" --topo-order $*
glca=git log --pretty=format:"%C(4)%cN %C(7)<%cE> %C(4)%cr %C(3)%cd %C(2)%h%C(1)%d %C(7)%<(80,trunc)%s" --topo-order --all $*
glcag=git log --pretty=format:"%C(4)%cN %C(7)<%cE> %C(4)%cr %C(3)%cd %C(2)%h%C(1)%d %C(7)%<(80,trunc)%s" --topo-order --all --graph $*
glcd=git log --pretty=format:"%C(4)%cN %C(7)<%cE> %C(4)%cr %C(3)%cd %C(2)%h%C(1)%d %C(7)%<(80,trunc)%s" --topo-order --no-merges --first-parent $*
glcdp=git log --pretty=format:"%C(4)%cN %C(7)<%cE> %C(4)%cr %C(3)%cd %C(2)%h%C(1)%d %C(7)%<(80,trunc)%s" --topo-order --no-merges --first-parent --patch $*
glcg=git log --pretty=format:"%C(4)%cN %C(7)<%cE> %C(4)%cr %C(3)%cd %C(2)%h%C(1)%d %C(7)%<(80,trunc)%s" --topo-order --graph $*
glcs=git log --pretty="format:%C(bold)Commit:%C(reset) %C(2)%H%C(1)%d%n%C(bold)Committer:%C(reset) %C(4)%cn %C(7)<%ce>%n%C(bold)Date:%C(reset) %C(3)%ci %C(4)(%cr)%C(reset)%n%+B" --topo-order --stat $*

;= Git Merge
gm=git merge $*
gma=git merge --abort $*
gmt=git mergetool $*

;= Git Push
gp=git push $*
gpt=git push --tags $*

;= Git Rebase
gr=git rebase $*
gra=git rebase --abort $*
grc=git rebase --continue $*
gri=git rebase --interactive $*

;= Git Remote

;= Git Stash
gs=git stash $*
gsa=git stash apply $*
gsd=git stash show --patch --stat $*
gsx=git stash drop $*
gsl=git stash list $*
gsp=git stash pop $*
gss=git stash save --include-untracked $*

;= Git Working Copy
gwa=git add --verbose $*
gws=git status $*
gwd=git diff $*
gwr=git reset --soft $*
gwc=git clean $*

Add windows powershell alias ps

Add windows powershell alias ps