@echo off

for /f "delims=" %%i in ("%~dp0..\envs") do (
    set ANACONDA_ENVS=%%~fi
)

set CONDA_NEW_ENV=%1
set CONDA_NEW_ENV=%CONDA_NEW_ENV:"=%

if "%2" == "" goto skiptoomanyargs
    echo ERROR: Too many arguments provided
    goto usage
:skiptoomanyargs

if not "%CONDA_NEW_ENV%" == "" goto skipmissingarg
:usage
    echo Usage: activate envname
    echo.
    echo Deactivates previously activated Conda
    echo environment, then activates the chosen one.
    exit /b 1
:skipmissingarg

if exist "%ANACONDA_ENVS%\%CONDA_NEW_ENV%\Python.exe" goto skipmissingenv
    echo No environment named "%CONDA_NEW_ENV%" exists in %ANACONDA_ENVS%
    set CONDA_NEW_ENV=
    exit /b 1
:skipmissingenv

REM Deactivate a previous activation if it is live
if "%CONDA_DEFAULT_ENV%" == "" goto skipdeactivate
    REM This search/replace removes the previous env from the path
    echo Deactivating environment "%CONDA_DEFAULT_ENV%"...

    REM Run any deactivate scripts
    if not exist %ANACONDA_ENVS%\%CONDA_DEFAULT_ENV%\etc\conda\deactivate.d goto nodeactivate
        pushd %ANACONDA_ENVS%\%CONDA_DEFAULT_ENV%\etc\conda\deactivate.d
        for %%g in (*.bat) do call "%%g"
        popd
    :nodeactivate

    set CONDACTIVATE_PATH=%ANACONDA_ENVS%\%CONDA_DEFAULT_ENV%;%ANACONDA_ENVS%\%CONDA_DEFAULT_ENV%\Scripts;
    call set PATH=%%PATH:%CONDACTIVATE_PATH%=%%
    set CONDA_DEFAULT_ENV=
    set CONDACTIVATE_PATH=
:skipdeactivate

set CONDA_DEFAULT_ENV=%CONDA_NEW_ENV%
set CONDA_NEW_ENV=
echo Activating environment "%CONDA_DEFAULT_ENV%"...
set PATH=%ANACONDA_ENVS%\%CONDA_DEFAULT_ENV%;%ANACONDA_ENVS%\%CONDA_DEFAULT_ENV%\Scripts;%PATH%
set PROMPT=[%CONDA_DEFAULT_ENV%] $P$G

REM Run any activate scripts
if not exist %ANACONDA_ENVS%\%CONDA_DEFAULT_ENV%\etc\conda\activate.d goto noactivate
    pushd %ANACONDA_ENVS%\%CONDA_DEFAULT_ENV%\etc\conda\activate.d
    for %%g in (*.bat) do call "%%g"
    popd
:noactivate

@echo off

for /f "delims=" %%i in ("%~dp0..\envs") do (
    set ANACONDA_ENVS=%%~fi
)

set CONDA_NEW_ENV=%~1

if "%~2" == "" goto skiptoomanyargs
    echo ERROR: Too many arguments provided
    goto usage
:skiptoomanyargs

if not "%CONDA_NEW_ENV%" == "" goto skipmissingarg
:usage
    echo Usage: activate envname
    echo.
    echo Deactivates previously activated Conda
    echo environment, then activates the chosen one.
    exit /b 1
:skipmissingarg

if exist "%ANACONDA_ENVS%\%CONDA_NEW_ENV%\Python.exe" goto skipmissingenv
    echo No environment named "%CONDA_NEW_ENV%" exists in %ANACONDA_ENVS%
    set CONDA_NEW_ENV=
    exit /b 1
:skipmissingenv

REM Deactivate a previous activation if it is live
if "%CONDA_DEFAULT_ENV%" == "" goto skipdeactivate
    REM This search/replace removes the previous env from the path
    echo Deactivating environment "%CONDA_DEFAULT_ENV%"...

    REM Run any deactivate scripts
    if not exist %ANACONDA_ENVS%\%CONDA_DEFAULT_ENV%\etc\conda\deactivate.d goto nodeactivate
        pushd %ANACONDA_ENVS%\%CONDA_DEFAULT_ENV%\etc\conda\deactivate.d
        for %%g in (*.bat) do call "%%g"
        popd
    :nodeactivate

    set CONDACTIVATE_PATH=%ANACONDA_ENVS%\%CONDA_DEFAULT_ENV%;%ANACONDA_ENVS%\%CONDA_DEFAULT_ENV%\Scripts;
    call set PATH=%%PATH:%CONDACTIVATE_PATH%=%%
    set CONDA_DEFAULT_ENV=
    set CONDACTIVATE_PATH=
:skipdeactivate

set CONDA_DEFAULT_ENV=%CONDA_NEW_ENV%
set CONDA_NEW_ENV=
echo Activating environment "%CONDA_DEFAULT_ENV%"...
set PATH=%ANACONDA_ENVS%\%CONDA_DEFAULT_ENV%;%ANACONDA_ENVS%\%CONDA_DEFAULT_ENV%\Scripts;%PATH%
set PROMPT=[%CONDA_DEFAULT_ENV%] $P$G

REM Run any activate scripts
if not exist %ANACONDA_ENVS%\%CONDA_DEFAULT_ENV%\etc\conda\activate.d goto noactivate
    pushd %ANACONDA_ENVS%\%CONDA_DEFAULT_ENV%\etc\conda\activate.d
    for %%g in (*.bat) do call "%%g"
    popd
:noactivate

Adjust to take into account quoted strings

There's some oddities in stripping quotation marks from an empty string.
Using the %~N syntax takes into account quoted strings and strips the
quotes from it.  I've tested this in Windows XP.

Side benefit -- it's easier on syntax highlighters.

cc: a9786548288b84529329166401e7ee1ca19d25e5@mwiebe


@echo OFF
msbuild
ECHO "WifiProfiles.exe is in WifiProfiles/bin/debug."

@echo OFF
msbuild /p:Configuration=Release /t:Rebuild
ECHO "WiFi.exe is in WifiProfiles/bin/Release/"

build fix - release mode, updated message


@echo off

if "%KeymanDeveloperPath%"=="" goto err_env
if "%1"=="-?" goto help
if "%1"=="/?" goto help
if /i "%1" EQU "-h" goto help
if /i "%1" EQU "/h" goto help
if /i "%1" EQU "--help" goto help
if "%1"=="/?" goto help

rem ###########################################
rem Locate the project based on the path name
rem ###########################################

if "%1"=="-p" goto prebuild

set kpj=%~dp0
set kpj=%kpj:~0,-1%
call %0 -p %kpj% %*
exit /b %errorlevel%

:prebuild
shift
set kpj=%~n1.kpj
shift

rem ###########################################
rem Check environment and parameters
rem ###########################################

set silent=
set targetflag=
set target=
set debug=-w
set clean=

:params

if "%1"=="" goto build

if "%1"=="-s" (
  set silent=-s
  shift
  goto params
)

if "%1"=="-c" (
  set clean=-c
  shift
  goto params
)

if "%1"=="-d" (
  set debug=-d
  shift
  goto params
)

if not "%1"=="" (
  set targetflag=-t
  set target=%1
  rem no additional params after target
)

rem ###########################################
rem Build
rem ###########################################

:build

if not "%silent%" == "-s" (
  if "%target%" == ""  (
    if "%clean%" == "-c" (echo Cleaning %kpj%...) else (echo Building %kpj%...)
  ) else (
    if "%clean%" == "-c" (echo Cleaning %target%...) else (echo Building %target%...)
  )
)

"%KeymanDeveloperPath%\kmcomp.exe" -nologo %silent% %clean% %debug% %kpj% %targetflag% "%target%"
exit /B %ERRORLEVEL%

rem ###########################################
rem Help and errors
rem ###########################################

:help
echo. %0 [-p project[.kpj]] [-s] [-c] [-d] [target]
echo.
echo. -p project.kpj: If not specified, then will use the kpj file
echo.                 with same name as current directory.
echo.                 If specified, project.kpj must be in the current path.
echo.
echo. -s:      Silent build
echo. -c:      Clean instead of build
echo. -d:      Include debug information [also allows warnings]
echo. target:  If specified, then will build just that file in the project.
echo.          Target must be a .kmn or a .kps file referenced in the project
echo.
echo. Exit code of 0 indicates success. Any other exit code is an error
exit /b 2
goto :eof

:err_env
echo Error: the environment variable KeymanDeveloperPath must be set to the path for kmcomp.exe
exit /b 3

Create build.cmd

Create build.cmd


cmd /c call npm publish "%~dp0\..\..\src\picturepark-sdk-v1-angular\dist\picturepark-sdk-v1-angular" --access=public
cmd /c call npm publish "%~dp0\..\..\src\picturepark-sdk-v1-angular\dist\picturepark-sdk-v1-angular-oidc" --access=public
cmd /c call npm publish "%~dp0\..\..\src\picturepark-sdk-v1-angular\dist\picturepark-sdk-v1-angular-ui" --access=public
cmd /c call npm publish "%~dp0\..\..\src\picturepark-sdk-v1-fetch" --access=public
cmd /c call npm publish "%~dp0\..\..\src\picturepark-sdk-v1-pickers" --access=public

cmd /c call npm publish "%~dp0\..\src\picturepark-sdk-v1-angular\dist\picturepark-sdk-v1-angular" --access=public
cmd /c call npm publish "%~dp0\..\src\picturepark-sdk-v1-angular\dist\picturepark-sdk-v1-angular-oidc" --access=public
cmd /c call npm publish "%~dp0\..\src\picturepark-sdk-v1-angular\dist\picturepark-sdk-v1-angular-ui" --access=public
cmd /c call npm publish "%~dp0\..\src\picturepark-sdk-v1-fetch" --access=public
cmd /c call npm publish "%~dp0\..\src\picturepark-sdk-v1-pickers" --access=public

Fix npm publish path

Fix npm publish path


::HELP Redirects output of command line tools to GUI application.
::HELP
::HELP
::HELP USAGE
::HELP
::HELP command | 2 [OPTIONS] [APP[.EXT] | EXT] [APP-OPTIONS]
::HELP
::HELP
::HELP OPTIONS
::HELP
::HELP -d DIR     use DIR for storing temp files
::HELP -n NAME    use NAME as the name of temp file
::HELP --debug    turn on debug information
::HELP --dry-run  don't invoke a command, display only
::HELP
::HELP
::HELP DESCRIPTION
::HELP
::HELP The script is flexible enough to enable many ways to invoke GUI
::HELP applications. Which GUI application would be invoked is defined by
::HELP the arguments. Depending on what is this, it will be called to
::HELP declare few specific environment variables.
::HELP
::HELP
::HELP INVOCATION
::HELP
::HELP commands | 2
::HELP
::HELP With no parameters runs Notepad. Always.
::HELP
::HELP commands | 2 APP
::HELP
::HELP "APP" is the parameter defining an application or a family of
::HELP applications or an extension (without the leading "dot" symbol).
::HELP The script looks around for the file called as "2.APP.bat". If the
::HELP file exists, invokes it to set the needful environment variables.
::HELP The script should declare few specific environment variables (see
::HELP the "ENVIRONMENT" section below).
::HELP
::HELP commands | 2 APP.EXT
::HELP
::HELP The same as above but ".EXT" overrides early declared extension.
::HELP
::HELP commands | 2 EXT
::HELP
::HELP If there is no file "2.APP.bat", the argument is assumed as the
::HELP extension (without the leading "dor" symbol), the script does
::HELP attempt to find an executable command (using "assoc" and "ftype")
::HELP and prepare invocation of the command found by these commands.
::HELP
::HELP
::HELP ENVIRONMENT
::HELP
::HELP %pipecmd%
::HELP
::HELP (Mandatory)
::HELP Invocation string for the application. It could or could not
::HELP contain additional parameters supported by the application.
::HELP
::HELP %pipeext%
::HELP
::HELP (Optional, but recommended to set)
::HELP Extenstion (like ".txt" or ".html" etc). It can be useful in the
::HELP case if the application is able to handle different data files.
::HELP
::HELP %pipetmpsave%
::HELP
::HELP (Optional)
::HELP The command line tool used for capturing output of commands and
::HELP redirecting to a resulting file. By default it is set as follows:
::HELP
::HELP set "pipetmpsave=more"
::HELP
::HELP Another possible setting is:
::HELP
::HELP set "pipetmpsave=findstr "$""
::HELP
::HELP
::HELP CONFIGURATION
::HELP
::HELP Using the file "2-settings.bat" located in the same directory
::HELP allows to configure the global environment variables of the main
::HELP script. It is good place for setting such kind of variables as
::HELP %pipetmpdir%, %pipetmpname% and %pipetmpsave%.
::HELP
::HELP
::HELP SEE ALSO
::HELP
::HELP ASSOC /?
::HELP FTYPE /?

:: ========================================================================

@echo off

timeout /t 0 >nul 2>&1 && (
	call :pipe-help
	goto :EOF
)

:: ========================================================================

setlocal

set "pipedbg="
set "pipedry="

set "pipecmd="
set "pipecmdopts="
set "pipetitle="
set "pipeext="

set "pipetmpdir=%TEMP%"
set "pipetmpname=pipe.%RANDOM%"
set "pipetmpfile="
set "pipetmpsave=more"

if exist "%~dpn0-settings.bat" call "%~dpn0-settings.bat"

:: ========================================================================

:pipe-options-begin

if "%~1" == "" goto :pipe-options-end

if "%~1" == "-d" (
	set "pipetmpdir=%~2"
	shift /1
	shift /1
) else if "%~1" == "-n" (
	set "pipetmpname=%~2"
	shift /1
	shift /1
) else if "%~1" == "--debug" (
	set "pipedbg=1"
	shift /1
) else if "%~1" == "--dry-run" (
	set "pipedry=1"
	shift /1
) else (
	goto :pipe-options-end
)

goto :pipe-options-begin
:pipe-options-end

:: ========================================================================

if "%~1" == "" (

	rem command | 2

	set "pipecmd=notepad"
	set "pipetitle=[app = notepad]"
	set "pipeext=.txt"

) else if exist "%~dpn0.%~n1.bat" (

	rem command | 2 app[.ext]

	call :pipe-configure "%~dpn0.%~n1.bat" "%~x1"

	set "pipetitle=[app = %~n1]"
	if not "%~x1" == "" set "pipeext=%~x1"

	shift /1

) else (

	rem command | 2 ext

	for /f "tokens=1,* delims==" %%a in ( '
		2^>nul assoc ".%~n1"
	' ) do for /f "tokens=1,* delims==" %%c in ( '
		2^>nul ftype "%%b"
	' ) do (

		set "pipecmd=%%d"
		set "pipetitle=[%%a = %%b]"
		set "pipeext=%%a"

	)
	if not "%~x1" == "" set "pipeext=%~x1"

	shift /1

)

if defined pipedbg call :pipe-debug "After parsing options"

:: ========================================================================

if not defined pipecmd (
	>&2 echo:Bad invocation
	goto :EOF
)

:: ========================================================================

if not defined pipeext set "pipeext=.txt"
if not defined pipetitle set "pipetitle=[%pipeext%]"

for %%f in ( "%pipetmpdir%" ) do set "pipetmpfile=%%~ff\%pipetmpname%%pipeext%"

:: ========================================================================

setlocal enabledelayedexpansion

set "pipecmdopt="

:pipe-app-options-begin
set pipecmdopt=%1
if not defined pipecmdopt goto :pipe-app-options-end

set "pipecmdopts=%pipecmdopts% %pipecmdopt%"
shift /1

goto :pipe-app-options-begin
:pipe-app-options-end

set "pipecmd=!pipecmd:%%1="%%1"!"
set "pipecmd=!pipecmd:""%%1""="%%1"!"
if "!pipecmd!" == "!pipecmd:%%1=!" set "pipecmd=!pipecmd! "%%1""
set "pipecmd=!pipecmd:%%1=%pipetmpfile%!"

endlocal & set "pipecmd=%pipecmd%" & set "pipecmdopts=%pipecmdopts%"

:: ========================================================================

if defined pipedbg call :pipe-debug "Before invocation"

call :pipe-invoke %pipecmdopts%

endlocal
goto :EOF

:: ========================================================================

:pipe-configure
setlocal
call "%~1" "%~2"
endlocal & set "pipecmd=%pipecmd%" & set "pipeext=%pipeext%" & set "pipetmpsave=%pipetmpsave%"
goto :EOF

:pipe-invoke
if defined pipedry (
	echo:Invocation ^(dry-run^)
	echo:call %pipetmpsave% ^> "%pipetmpfile%"
	echo:call start "Starting %pipetitle%" %pipecmd%
	goto :EOF
)

call %pipetmpsave% > "%pipetmpfile%"
call start "Starting %pipetitle%" %pipecmd%
goto :EOF

:: ========================================================================

:pipe-help
for /f "tokens=1,* delims= " %%a in ( '
	findstr /b "::HELP" "%~f0"
' ) do (
	echo:%%~b
)
goto :EOF

:pipe-debug
echo:%~1...
set pipe
echo:
goto :EOF

:: ========================================================================

:: EOF

::HELP Redirects output of command line tools to GUI application.
::HELP
::HELP
::HELP USAGE
::HELP
::HELP command | 2 [OPTIONS] [APP[.EXT] | EXT] [APP-OPTIONS]
::HELP
::HELP
::HELP OPTIONS
::HELP
::HELP -d DIR     use DIR for storing temp files
::HELP -n NAME    use NAME as the name of temp file
::HELP --debug    turn on debug information
::HELP --dry-run  don't invoke a command, display only
::HELP
::HELP
::HELP DESCRIPTION
::HELP
::HELP The script is flexible enough to enable many ways to invoke GUI
::HELP applications. Which GUI application would be invoked is defined by
::HELP the arguments. Depending on what is this, it will be called to
::HELP declare few specific environment variables.
::HELP
::HELP
::HELP INVOCATION
::HELP
::HELP commands | 2
::HELP
::HELP With no parameters runs Notepad. Always.
::HELP
::HELP commands | 2 APP
::HELP
::HELP "APP" is the parameter defining an application or a family of
::HELP applications or an extension (without the leading "dot" symbol).
::HELP The script looks around for the file called as "2.APP.bat". If the
::HELP file exists, invokes it to set the needful environment variables.
::HELP The script should declare few specific environment variables (see
::HELP the "ENVIRONMENT" section below).
::HELP
::HELP commands | 2 APP.EXT
::HELP
::HELP The same as above but ".EXT" overrides early declared extension.
::HELP
::HELP commands | 2 EXT
::HELP
::HELP If there is no file "2.APP.bat", the argument is assumed as the
::HELP extension (without the leading "dor" symbol), the script does
::HELP attempt to find an executable command (using "assoc" and "ftype")
::HELP and prepare invocation of the command found by these commands.
::HELP
::HELP
::HELP ENVIRONMENT
::HELP
::HELP %pipecmd%
::HELP
::HELP (Mandatory)
::HELP Invocation string for the application. It could or could not
::HELP contain additional parameters supported by the application.
::HELP
::HELP %pipeext%
::HELP
::HELP (Optional, but recommended to set)
::HELP Extenstion (like ".txt" or ".html" etc). It can be useful in the
::HELP case if the application is able to handle different data files.
::HELP
::HELP %pipetmpsave%
::HELP
::HELP (Optional)
::HELP The command line tool used for capturing output of commands and
::HELP redirecting to a resulting file. By default it is set as follows:
::HELP
::HELP set "pipetmpsave=more"
::HELP
::HELP Another possible setting is:
::HELP
::HELP set "pipetmpsave=findstr "$""
::HELP
::HELP
::HELP CONFIGURATION
::HELP
::HELP Using the file "2-settings.bat" located in the same directory
::HELP allows to configure the global environment variables of the main
::HELP script. It is good place for setting such kind of variables as
::HELP %pipetmpdir%, %pipetmpname% and %pipetmpsave%.
::HELP
::HELP
::HELP SEE ALSO
::HELP
::HELP ASSOC /?
::HELP FTYPE /?

:: ========================================================================

@echo off

timeout /t 0 >nul 2>&1 && (
	call :pipe-help
	goto :EOF
)

:: ========================================================================

setlocal

set "pipedbg="
set "pipedry="

set "pipetmpdir=%TEMP%"
set "pipetmpname=pipe.%RANDOM%"
set "pipetmpfile="
set "pipetmpsave=more"

if exist "%~dpn0-settings.bat" call "%~dpn0-settings.bat"

set "pipecmd="
set "pipecmdopts="
set "pipetitle="
set "pipeext="

:: ========================================================================

:pipe-options-begin

if "%~1" == "" goto :pipe-options-end

if "%~1" == "-d" (
	set "pipetmpdir=%~2"
	shift /1
	shift /1
) else if "%~1" == "-n" (
	set "pipetmpname=%~2"
	shift /1
	shift /1
) else if "%~1" == "--debug" (
	set "pipedbg=1"
	shift /1
) else if "%~1" == "--dry-run" (
	set "pipedry=1"
	shift /1
) else (
	goto :pipe-options-end
)

goto :pipe-options-begin
:pipe-options-end

:: ========================================================================

if "%~1" == "" (

	rem command | 2

	set "pipecmd=notepad"
	set "pipetitle=[app = notepad]"
	set "pipeext=.txt"

) else if exist "%~dpn0.%~n1.bat" (

	rem command | 2 app[.ext]

	call :pipe-configure "%~dpn0.%~n1.bat" "%~x1"

	set "pipetitle=[app = %~n1]"
	if not "%~x1" == "" set "pipeext=%~x1"

	shift /1

) else (

	rem command | 2 ext

	for /f "tokens=1,* delims==" %%a in ( '
		2^>nul assoc ".%~n1"
	' ) do for /f "tokens=1,* delims==" %%c in ( '
		2^>nul ftype "%%b"
	' ) do (

		set "pipecmd=%%d"
		set "pipetitle=[%%a = %%b]"
		set "pipeext=%%a"

	)
	if not "%~x1" == "" set "pipeext=%~x1"

	shift /1

)

if defined pipedbg call :pipe-debug "After parsing options"

:: ========================================================================

if not defined pipecmd (
	>&2 echo:Bad invocation
	goto :EOF
)

:: ========================================================================

if not defined pipeext set "pipeext=.txt"
if not defined pipetitle set "pipetitle=[%pipeext%]"

for %%f in ( "%pipetmpdir%" ) do set "pipetmpfile=%%~ff\%pipetmpname%%pipeext%"

:: ========================================================================

setlocal enabledelayedexpansion

set "pipecmdopt="

:pipe-app-options-begin
set pipecmdopt=%1
if not defined pipecmdopt goto :pipe-app-options-end

set "pipecmdopts=%pipecmdopts% %pipecmdopt%"
shift /1

goto :pipe-app-options-begin
:pipe-app-options-end

set "pipecmd=!pipecmd:%%1="%%1"!"
set "pipecmd=!pipecmd:""%%1""="%%1"!"
if "!pipecmd!" == "!pipecmd:%%1=!" set "pipecmd=!pipecmd! "%%1""
set "pipecmd=!pipecmd:%%1=%pipetmpfile%!"

endlocal & set "pipecmd=%pipecmd%" & set "pipecmdopts=%pipecmdopts%"

:: ========================================================================

if defined pipedbg call :pipe-debug "Before invocation"

call :pipe-invoke %pipecmdopts%

endlocal
goto :EOF

:: ========================================================================

:pipe-configure
setlocal
call "%~1" "%~2"
endlocal & set "pipecmd=%pipecmd%" & set "pipeext=%pipeext%" & set "pipetmpsave=%pipetmpsave%"
goto :EOF

:pipe-invoke
if defined pipedry (
	echo:Invocation ^(dry-run^)
	echo:call %pipetmpsave% ^> "%pipetmpfile%"
	echo:call start "Starting %pipetitle%" %pipecmd%
	goto :EOF
)

call %pipetmpsave% > "%pipetmpfile%"
call start "Starting %pipetitle%" %pipecmd%
goto :EOF

:: ========================================================================

:pipe-help
for /f "tokens=1,* delims= " %%a in ( '
	findstr /b "::HELP" "%~f0"
' ) do (
	echo:%%~b
)
goto :EOF

:pipe-debug
echo:%~1...
set pipe
echo:
goto :EOF

:: ========================================================================

:: EOF

reorder some variables in 2.bat

reorder some variables in 2.bat


:: This file generates debug unity builds for rapid iteration

@echo off
pushd %~dp0
if not exist build mkdir build
if not exist build\enet mkdir build\enet
if not exist build\imgui mkdir build\imgui
if not exist build\lib mkdir build\lib
if not exist build\bin mkdir build\bin

:: [Compiler options]
:: /nologo: suppress copyright message
:: /Gm-: Disable minimal rebuild
:: /MDd: Runtime library: Multi-threaded Debug DLL
:: /GR-: disable RTTI
:: /EHs-c-: disable exceptions
:: /fp:fast: "fast" floating-point model; results are less predictable
:: /fp:except-: disable floating-point exceptions when generating code
:: /Oi: enable intrinsic functions
:: /Ob1: only __inline function expansion
:: /WX: treat warnings as errors
:: /W4: warning level 4
:: /wd4100:
:: /wd4505:
:: /Bt: display timings (undocumented)

set slBasicCompile=/nologo /Gm- /MDd /GR- /EHs-c- /fp:fast /fp:except- /Oi
set slDefinitions=-DSL_CL -D_DEBUG -DUNICODE -D_UNICODE -D_SCL_SECURE_NO_WARNINGS -D_HAS_EXCEPTIONS=0 -DNOMINMAX -DVC_EXTRALEAN -DSTRICT -DWIN32_LEAN_AND_MEAN -DNOGDI -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_SECURE_NO_WARNINGS -D_WINSOCK_DEPRECATED_NO_WARNINGS
set slInclude=/I..\..\src /I..\..\external\sce_vectormath-master\include /I..\..\external\flatbuffers-1.3.0\include /I..\..\external\protobuf-2.6.1\src /I..\..\external\enet-1.3.13\include /I..\..\external\imgui-1.49
set slCompile=%slBasicCompile% %slDefinitions% %slInclude% /Ob1 /WX /W4 /wd4100 /wd4505 /Z7 /Bt
::set slFxCompile=/Zi /E"main" /Od /Vn"g_%(Filename)" /WX /Fh"src/%(Filename).h" /nologo

:: [Linker options]
:: /time: display timings (undocumented)

set slLink=/time /incremental:no /LIBPATH:../lib enet.lib imgui.lib winmm.lib ws2_32.lib dxguid.lib

:cook
if exist build\bin\assets goto enet
call cook build\bin\assets

:enet
if exist build\lib\enet.lib goto imgui
echo. && echo [ENet]
pushd external\enet-1.3.13
cl /c %slBasicCompile% /Fo..\..\build\enet\ /Iinclude *.c
popd
pushd build\enet
lib /nologo /out:..\lib\enet.lib *.obj
popd

:imgui
if exist build\lib\imgui.lib goto starlight
echo. && echo [ImGui]
pushd external\imgui-1.49
cl /c %slBasicCompile% /Fo..\..\build\imgui\ /I. imgui.cpp imgui_demo.cpp imgui_draw.cpp examples\directx11_example\imgui_impl_dx11.cpp
popd
pushd build\imgui
lib /nologo /out:..\lib\imgui.lib *.obj
popd

:starlight
echo. && echo [starlight_ub]
pushd build\bin
cl %slCompile% /LD /Festarlight.dll ..\..\src\starlight_ub.cpp /link %slLink% /PDB:starlight_%random%.pdb

:starlight_win32
echo. && echo [starlight_win32_ub]
fxc /Zi /E"main" /Od /Vn"g_SimplePixelShader" /WX /T ps_4_0 /Fh"..\..\src/SimplePixelShader.h" /nologo ..\..\src/SimplePixelShader.hlsl
fxc /Zi /E"main" /Od /Vn"g_SimpleVertexShader" /WX /T vs_4_0 /Fh"..\..\src/SimpleVertexShader.h" /nologo ..\..\src/SimpleVertexShader.hlsl
cl %slCompile% /Festarlight.exe /I..\..\external\imgui-1.49\examples\directx11_example ..\..\src\starlight_win32_ub.cpp /link %slLink% d3dcompiler.lib d3d11.lib
popd
popd

:: This file generates debug unity builds for rapid iteration

@echo off
pushd %~dp0
if not exist build mkdir build
if not exist build\enet mkdir build\enet
if not exist build\imgui mkdir build\imgui
if not exist build\lib mkdir build\lib
if not exist build\bin mkdir build\bin

:: [Compiler options]
:: /nologo: suppress copyright message
:: /Gm-: Disable minimal rebuild
:: /MDd: Runtime library: Multi-threaded Debug DLL
:: /GR-: disable RTTI
:: /EHs-c-: disable exceptions
:: /fp:fast: "fast" floating-point model; results are less predictable
:: /fp:except-: disable floating-point exceptions when generating code
:: /Oi: enable intrinsic functions
:: /Ob1: only __inline function expansion
:: /WX: treat warnings as errors
:: /W4: warning level 4
:: /wd4100:
:: /wd4505:
:: /Bt: display timings (undocumented)

set slBasicCompile=/nologo /Gm- /MDd /GR- /EHs-c- /fp:fast /fp:except- /Oi
set slDefinitions=-DSL_CL -D_DEBUG -DUNICODE -D_UNICODE -D_SCL_SECURE_NO_WARNINGS -D_HAS_EXCEPTIONS=0 -DNOMINMAX -DVC_EXTRALEAN -DSTRICT -DWIN32_LEAN_AND_MEAN -DNOGDI -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_SECURE_NO_WARNINGS -D_WINSOCK_DEPRECATED_NO_WARNINGS
set slInclude=/I..\..\src /I..\..\external\sce_vectormath-master\include /I..\..\external\flatbuffers-1.3.0\include /I..\..\external\protobuf-2.6.1\src /I..\..\external\enet-1.3.13\include /I..\..\external\imgui-1.49
set slCompile=%slBasicCompile% %slDefinitions% %slInclude% /Ob1 /WX /W4 /wd4100 /wd4505 /Z7 /Bt
::set slFxCompile=/Zi /E"main" /Od /Vn"g_%(Filename)" /WX /Fh"src/%(Filename).h" /nologo

:: [Linker options]
:: /time: display timings (undocumented)

set slLink=/time /incremental:no /LIBPATH:../lib enet.lib imgui.lib winmm.lib ws2_32.lib dxguid.lib ole32.lib

:cook
if exist build\bin\assets goto enet
call cook build\bin\assets

:enet
if exist build\lib\enet.lib goto imgui
echo. && echo [ENet]
pushd external\enet-1.3.13
cl /c %slBasicCompile% /Fo..\..\build\enet\ /Iinclude *.c
popd
pushd build\enet
lib /nologo /out:..\lib\enet.lib *.obj
popd

:imgui
if exist build\lib\imgui.lib goto starlight
echo. && echo [ImGui]
pushd external\imgui-1.49
cl /c %slBasicCompile% /Fo..\..\build\imgui\ /I. imgui.cpp imgui_demo.cpp imgui_draw.cpp examples\directx11_example\imgui_impl_dx11.cpp
popd
pushd build\imgui
lib /nologo /out:..\lib\imgui.lib *.obj
popd

:starlight
echo. && echo [starlight_ub]
pushd build\bin
cl %slCompile% /LD /Festarlight.dll ..\..\src\starlight_ub.cpp /link %slLink% /PDB:starlight_%random%.pdb

:starlight_win32
echo. && echo [starlight_win32_ub]
fxc /Zi /E"main" /Od /Vn"g_SimplePixelShader" /WX /T ps_4_0 /Fh"..\..\src/SimplePixelShader.h" /nologo ..\..\src/SimplePixelShader.hlsl
fxc /Zi /E"main" /Od /Vn"g_SimpleVertexShader" /WX /T vs_4_0 /Fh"..\..\src/SimpleVertexShader.h" /nologo ..\..\src/SimpleVertexShader.hlsl
cl %slCompile% /Festarlight.exe /I..\..\external\imgui-1.49\examples\directx11_example ..\..\src\starlight_win32_ub.cpp /link %slLink% d3dcompiler.lib d3d11.lib
popd
popd

Add ole32.lib to batch build

Add ole32.lib to batch build


set plugin_file=%CD%/UnrealCV.uplugin
set package_folder=%CD%/Plugins/UnrealCV
set UE4=C:\Program Files\Epic Games\UE_4.14
REM TODO: Check the existence of UE4 folder and give a useful hint for user
REM Modify the UE4 variable to point to your UE4 installation path
"%UE4%/Engine/Build/BatchFiles/RunUAT.bat" BuildPlugin -plugin=%plugin_file% -package=%package_folder% -rocket -targetplatforms=Win64
xcopy /E /Y Plugins\UnrealCV\Binaries %CD%

Copy compiled binaries to C:\qiuwch\workspace\unrealcv\unrealcv.


@echo off
setlocal

:: Set the default arguments for build
set __BuildArch=x64
set __BuildType=debug

:: Set the various build properties here so that CMake and MSBuild can pick them up
set __ProjectDir=%~dp0
set __ProjectFilesDir=%~dp0
set __SourceDir=%__ProjectDir%\src
set __PackagesDir=%__SourceDir%\.nuget
set __RootBinDir=%__ProjectDir%\binaries
set __LogsDir=%__RootBinDir%\Logs
set __CMakeSlnDir=%__RootBinDir%\CMake
set __MSBCleanBuildArgs=

:Arg_Loop
if "%1" == "" goto ArgsDone
if /i "%1" == "/?" goto Usage
if /i "%1" == "x64"    (set __BuildArch=x64&&shift&goto Arg_Loop)

if /i "%1" == "debug"    (set __BuildType=debug&shift&goto Arg_Loop)
if /i "%1" == "release"   (set __BuildType=release&shift&goto Arg_Loop)

if /i "%1" == "clean"   (set __CleanBuild=1&shift&goto Arg_Loop)

if /i "%1" == "unixmscorlib" (set __UnixMscorlibOnly=1&shift&goto Arg_Loop)

echo Invalid commandline argument: %1
goto Usage

:ArgsDone

echo Commencing CoreCLR Repo build
echo.

:: Set the remaining variables based upon the determined build configuration
set __BinDir=%__RootBinDir%\Product\%__BuildArch%\%__BuildType%
set __PackagesBinDir=%__BinDir%\.nuget
set __ToolsDir=%__RootBinDir%\tools
set __TestWorkingDir=%__RootBinDir%\tests\%__BuildArch%\%__BuildType%
set __IntermediatesDir=%__RootBinDir%\intermediates\%__BuildArch%\%__BuildType%

:: Generate path to be set for CMAKE_INSTALL_PREFIX to contain forward slash
set __CMakeBinDir=%__BinDir%
set "__CMakeBinDir=%__CMakeBinDir:\=/%"

:: Switch to clean build mode if the binaries output folder does not exist
if not exist %__RootBinDir% set __CleanBuild=1

:: Configure environment if we are doing a clean build.
if not defined __CleanBuild goto CheckPrereqs
echo Doing a clean build
echo.

:: MSBuild projects would need a rebuild
set __MSBCleanBuildArgs=/t:rebuild

:: Cleanup the binaries drop folder
if exist %__BinDir% rd /s /q %__BinDir%
md %__BinDir%

:: Cleanup the CMake folder
if exist %__CMakeSlnDir% rd /s /q %__CMakeSlnDir%
md %__CMakeSlnDir%

:: Cleanup the logs folder
if exist %__LogsDir% rd /s /q %__LogsDir%
md %__LogsDir%

::Cleanup intermediates folder
if exist %__IntermediatesDir% rd /s /q %__IntermediatesDir%

:: Check prerequisites
:CheckPrereqs
echo Checking pre-requisites...
echo.
::
:: Check presence of CMake on the path
for %%X in (cmake.exe) do (set FOUNDCMake=%%~$PATH:X)
if defined FOUNDCMake goto CheckVS
echo Installation of CMake, and ensuring it is on the path, is a pre-requisite to build this repository.
goto :eof

:CheckVS
:: Check presence of VS
if defined VS120COMNTOOLS goto CheckVSExistence
echo Installation of VS 2013 is a pre-requisite to build this repository.
goto :eof

:CheckVSExistence
:: Does VS 2013 really exist?
if exist "%VS120COMNTOOLS%\..\IDE\devenv.exe" goto CheckMSBuild
echo Installation of VS 2013 is a pre-requisite to build this repository.
goto :eof

:CheckMSBuild
:: Note: We've disabled node reuse because it causes file locking issues.
::       The issue is that we extend the build with our own targets which
::       means that that rebuilding cannot successfully delete the task
::       assembly.
set _msbuildexe="%ProgramFiles(x86)%\MSBuild\12.0\Bin\MSBuild.exe"
if not exist %_msbuildexe% set _msbuildexe="%ProgramFiles%\MSBuild\12.0\Bin\MSBuild.exe"
if not exist %_msbuildexe% set _msbuildexe="%ProgramFiles(x86)%\MSBuild\14.0\Bin\MSBuild.exe"
if not exist %_msbuildexe% set _msbuildexe="%ProgramFiles%\MSBuild\14.0\Bin\MSBuild.exe"
if not exist %_msbuildexe% echo Error: Could not find MSBuild.exe.  Please see https://github.com/dotnet/coreclr/wiki/Developer%%20Guide for build instructions. && exit /b 1

:: All set to commence the build

setlocal
if defined __UnixMscorlibOnly goto PerformMScorlibBuild

echo Commencing build of native components for %__BuildArch%/%__BuildType%
echo.

:: Set the environment for the native build
call "%VS120COMNTOOLS%\..\..\VC\vcvarsall.bat" x86_amd64
cd %__CMakeSlnDir%

if exist "%VSINSTALLDIR%DIA SDK" goto GenVSSolution
echo Error: DIA SDK is missing at "%VSINSTALLDIR%DIA SDK". ^
This is due to bug in VS Intaller. It does not install DIA SDK at "%VSINSTALLDIR%" but rather ^
at VS install location of previous version. Workaround is to copy DIA SDK folder from VS install location ^
of previous version to "%VSINSTALLDIR%" and then resume build.
goto :eof

:GenVSSolution
:: Regenerate the VS solution
call ..\..\src\pal\tools\gen-buildsys-win.bat %__ProjectDir%

:BuildComponents
if exist %__CMakeSlnDir%\install.vcxproj goto BuildCoreCLR
echo Failed to generate native component build project!
goto :eof

REM Build CoreCLR
:BuildCoreCLR
set __CoreCLRBuildLog=%__LogsDir%\CoreCLR_%__BuildArch%__%__BuildType%.log
%_msbuildexe% %__CMakeSlnDir%\install.vcxproj %__MSBCleanBuildArgs% /nologo /maxcpucount /nodeReuse:false /p:Configuration=%__BuildType% /p:Platform=%__BuildArch% /fileloggerparameters:Verbosity=diag;LogFile="%__CoreCLRBuildLog%"
pushd %__ProjectDir%
IF NOT ERRORLEVEL 1 goto PerformMScorlibBuild
echo Native component build failed. Refer %__CoreCLRBuildLog% for details.
goto :eof

:PerformMScorlibBuild
endlocal

setlocal
set __AdditionalMSBuildArgs=

if defined __UnixMscorlibOnly set __AdditionalMSBuildArgs=/p:OS=Unix /p:BuildNugetPackage=false

:: Set the environment for the managed build
call "%VS120COMNTOOLS%\VsDevCmd.bat"
echo Commencing build of mscorlib for %__BuildArch%/%__BuildType%
echo.
set __MScorlibBuildLog=%__LogsDir%\MScorlib_%__BuildArch%__%__BuildType%.log
%_msbuildexe% "%__ProjectFilesDir%build.proj" %__MSBCleanBuildArgs% /nologo /maxcpucount /verbosity:minimal /nodeReuse:false /fileloggerparameters:Verbosity=diag;LogFile="%__MScorlibBuildLog%" %__AdditionalMSBuildArgs%
IF NOT ERRORLEVEL 1 (
  if defined __UnixMscorlibOnly goto :eof
  goto PerformTestBuild
)

echo MScorlib build failed. Refer %__MScorlibBuildLog% for details.
goto :eof

:PerformTestBuild
echo.
echo Commencing build of tests for %__BuildArch%/%__BuildType%
echo.
call tests\buildtest.cmd
endlocal

::Build complete
echo Repo successfully built.
echo.
echo Product binaries are available at %__BinDir%
echo Test binaries are available at %__TestWorkingDir%
goto :eof

:Usage
echo.
echo Usage:
echo %0 BuildArch BuildType [clean] where:
echo.
echo BuildArch can be: x64
echo BuildType can be: Debug, Release
echo Clean - optional argument to force a clean build.
goto :eof

@echo off
setlocal

:: Set the default arguments for build
set __BuildArch=x64
set __BuildType=debug

:: Set the various build properties here so that CMake and MSBuild can pick them up
set __ProjectDir=%~dp0
set __ProjectFilesDir=%~dp0
set __SourceDir=%__ProjectDir%\src
set __PackagesDir=%__SourceDir%\.nuget
set __RootBinDir=%__ProjectDir%\binaries
set __LogsDir=%__RootBinDir%\Logs
set __CMakeSlnDir=%__RootBinDir%\CMake
set __MSBCleanBuildArgs=

:Arg_Loop
if "%1" == "" goto ArgsDone
if /i "%1" == "/?" goto Usage
if /i "%1" == "x64"    (set __BuildArch=x64&&shift&goto Arg_Loop)

if /i "%1" == "debug"    (set __BuildType=debug&shift&goto Arg_Loop)
if /i "%1" == "release"   (set __BuildType=release&shift&goto Arg_Loop)

if /i "%1" == "clean"   (set __CleanBuild=1&shift&goto Arg_Loop)

if /i "%1" == "unixmscorlib" (set __UnixMscorlibOnly=1&shift&goto Arg_Loop)

echo Invalid commandline argument: %1
goto Usage

:ArgsDone

echo Commencing CoreCLR Repo build
echo.

:: Set the remaining variables based upon the determined build configuration
set __BinDir=%__RootBinDir%\Product\%__BuildArch%\%__BuildType%
set __PackagesBinDir=%__BinDir%\.nuget
set __ToolsDir=%__RootBinDir%\tools
set __TestWorkingDir=%__RootBinDir%\tests\%__BuildArch%\%__BuildType%
set __IntermediatesDir=%__RootBinDir%\intermediates\%__BuildArch%\%__BuildType%

:: Generate path to be set for CMAKE_INSTALL_PREFIX to contain forward slash
set __CMakeBinDir=%__BinDir%
set "__CMakeBinDir=%__CMakeBinDir:\=/%"

:: Switch to clean build mode if the binaries output folder does not exist
if not exist %__RootBinDir% set __CleanBuild=1

:: Configure environment if we are doing a clean build.
if not defined __CleanBuild goto CheckPrereqs
echo Doing a clean build
echo.

:: MSBuild projects would need a rebuild
set __MSBCleanBuildArgs=/t:rebuild

:: Cleanup the binaries drop folder
if exist %__BinDir% rd /s /q %__BinDir%
md %__BinDir%

:: Cleanup the CMake folder
if exist %__CMakeSlnDir% rd /s /q %__CMakeSlnDir%
md %__CMakeSlnDir%

:: Cleanup the logs folder
if exist %__LogsDir% rd /s /q %__LogsDir%
md %__LogsDir%

::Cleanup intermediates folder
if exist %__IntermediatesDir% rd /s /q %__IntermediatesDir%

:: Check prerequisites
:CheckPrereqs
echo Checking pre-requisites...
echo.
::
:: Check presence of CMake on the path
for %%X in (cmake.exe) do (set FOUNDCMake=%%~$PATH:X)
if defined FOUNDCMake goto CheckVS
echo CMake is a pre-requisite to build this repository but it was not found on the path. Please install CMake from http://www.cmake.org/download/ and ensure it is on your path.
goto :eof

:CheckVS
:: Check presence of VS
if defined VS120COMNTOOLS goto CheckVSExistence
echo Installation of VS 2013 is a pre-requisite to build this repository.
goto :eof

:CheckVSExistence
:: Does VS 2013 really exist?
if exist "%VS120COMNTOOLS%\..\IDE\devenv.exe" goto CheckMSBuild
echo Installation of VS 2013 is a pre-requisite to build this repository.
goto :eof

:CheckMSBuild
:: Note: We've disabled node reuse because it causes file locking issues.
::       The issue is that we extend the build with our own targets which
::       means that that rebuilding cannot successfully delete the task
::       assembly.
set _msbuildexe="%ProgramFiles(x86)%\MSBuild\12.0\Bin\MSBuild.exe"
if not exist %_msbuildexe% set _msbuildexe="%ProgramFiles%\MSBuild\12.0\Bin\MSBuild.exe"
if not exist %_msbuildexe% set _msbuildexe="%ProgramFiles(x86)%\MSBuild\14.0\Bin\MSBuild.exe"
if not exist %_msbuildexe% set _msbuildexe="%ProgramFiles%\MSBuild\14.0\Bin\MSBuild.exe"
if not exist %_msbuildexe% echo Error: Could not find MSBuild.exe.  Please see https://github.com/dotnet/coreclr/wiki/Developer%%20Guide for build instructions. && exit /b 1

:: All set to commence the build

setlocal
if defined __UnixMscorlibOnly goto PerformMScorlibBuild

echo Commencing build of native components for %__BuildArch%/%__BuildType%
echo.

:: Set the environment for the native build
call "%VS120COMNTOOLS%\..\..\VC\vcvarsall.bat" x86_amd64
cd %__CMakeSlnDir%

if exist "%VSINSTALLDIR%DIA SDK" goto GenVSSolution
echo Error: DIA SDK is missing at "%VSINSTALLDIR%DIA SDK". ^
This is due to bug in VS Intaller. It does not install DIA SDK at "%VSINSTALLDIR%" but rather ^
at VS install location of previous version. Workaround is to copy DIA SDK folder from VS install location ^
of previous version to "%VSINSTALLDIR%" and then resume build.
goto :eof

:GenVSSolution
:: Regenerate the VS solution
call ..\..\src\pal\tools\gen-buildsys-win.bat %__ProjectDir%

:BuildComponents
if exist %__CMakeSlnDir%\install.vcxproj goto BuildCoreCLR
echo Failed to generate native component build project!
goto :eof

REM Build CoreCLR
:BuildCoreCLR
set __CoreCLRBuildLog=%__LogsDir%\CoreCLR_%__BuildArch%__%__BuildType%.log
%_msbuildexe% %__CMakeSlnDir%\install.vcxproj %__MSBCleanBuildArgs% /nologo /maxcpucount /nodeReuse:false /p:Configuration=%__BuildType% /p:Platform=%__BuildArch% /fileloggerparameters:Verbosity=diag;LogFile="%__CoreCLRBuildLog%"
pushd %__ProjectDir%
IF NOT ERRORLEVEL 1 goto PerformMScorlibBuild
echo Native component build failed. Refer %__CoreCLRBuildLog% for details.
goto :eof

:PerformMScorlibBuild
endlocal

setlocal
set __AdditionalMSBuildArgs=

if defined __UnixMscorlibOnly set __AdditionalMSBuildArgs=/p:OS=Unix /p:BuildNugetPackage=false

:: Set the environment for the managed build
call "%VS120COMNTOOLS%\VsDevCmd.bat"
echo Commencing build of mscorlib for %__BuildArch%/%__BuildType%
echo.
set __MScorlibBuildLog=%__LogsDir%\MScorlib_%__BuildArch%__%__BuildType%.log
%_msbuildexe% "%__ProjectFilesDir%build.proj" %__MSBCleanBuildArgs% /nologo /maxcpucount /verbosity:minimal /nodeReuse:false /fileloggerparameters:Verbosity=diag;LogFile="%__MScorlibBuildLog%" %__AdditionalMSBuildArgs%
IF NOT ERRORLEVEL 1 (
  if defined __UnixMscorlibOnly goto :eof
  goto PerformTestBuild
)

echo MScorlib build failed. Refer %__MScorlibBuildLog% for details.
goto :eof

:PerformTestBuild
echo.
echo Commencing build of tests for %__BuildArch%/%__BuildType%
echo.
call tests\buildtest.cmd
endlocal

::Build complete
echo Repo successfully built.
echo.
echo Product binaries are available at %__BinDir%
echo Test binaries are available at %__TestWorkingDir%
goto :eof

:Usage
echo.
echo Usage:
echo %0 BuildArch BuildType [clean] where:
echo.
echo BuildArch can be: x64
echo BuildType can be: Debug, Release
echo Clean - optional argument to force a clean build.
goto :eof

Update the CMake requirement message in build.cmd.


@echo Off
cd %~dp0

dotnet build src/ApiApprover.sln --configuration Release /nologo
dotnet test src/ApiApprover.sln --configuration Release --no-build --verbosity=normal /nologo
dotnet publish src/PublicApiGenerator/PublicApiGenerator.csproj --configuration Release --no-build /nologo
dotnet pack src/PublicApiGenerator/PublicApiGenerator.csproj --configuration Release --no-build /nologo
dotnet publish src/PublicApiGenerator.Tool/PublicApiGenerator.Tool.csproj --configuration Release --no-build /nologo
dotnet pack src/PublicApiGenerator.Tool/PublicApiGenerator.Tool.csproj --configuration Release --no-build /nologo

@echo Off
cd %~dp0

dotnet build src/ApiApprover.sln --configuration Release /nologo && dotnet test src/ApiApprover.sln --configuration Release --no-build --verbosity=normal /nologo && dotnet publish src/PublicApiGenerator/PublicApiGenerator.csproj --configuration Release --no-build /nologo && dotnet pack src/PublicApiGenerator/PublicApiGenerator.csproj --configuration Release --no-build /nologo && dotnet publish src/PublicApiGenerator.Tool/PublicApiGenerator.Tool.csproj --configuration Release --no-build /nologo && dotnet pack src/PublicApiGenerator.Tool/PublicApiGenerator.Tool.csproj --configuration Release --no-build /nologo

Stop build when one cmd failed

Stop build when one cmd failed


@ECHO off
SETLOCAL

SET REPO_FOLDER=%~dp0
CD %REPO_FOLDER%

SET BUILD_FOLDER=.build
SET KOREBUILD_FOLDER=%BUILD_FOLDER%\KoreBuild-dotnet
SET KOREBUILD_VERSION=

SET NUGET_PATH=%BUILD_FOLDER%\NuGet.exe
SET NUGET_VERSION=latest
SET CACHED_NUGET=%LocalAppData%\NuGet\nuget.%NUGET_VERSION%.exe

IF NOT EXIST %BUILD_FOLDER% (
    md %BUILD_FOLDER%
)

IF NOT EXIST %NUGET_PATH% (
    IF NOT EXIST %CACHED_NUGET% (
        echo Downloading latest version of NuGet.exe...
        IF NOT EXIST %LocalAppData%\NuGet (
            md %LocalAppData%\NuGet
        )
        @powershell -NoProfile -ExecutionPolicy unrestricted -Command "$ProgressPreference = 'SilentlyContinue'; Invoke-WebRequest 'https://dist.nuget.org/win-x86-commandline/%NUGET_VERSION%/nuget.exe' -OutFile '%CACHED_NUGET%'"
    )

    copy %CACHED_NUGET% %NUGET_PATH% > nul
)

IF NOT EXIST %KOREBUILD_FOLDER% (
    SET KOREBUILD_DOWNLOAD_ARGS=
    IF NOT "%KOREBUILD_VERSION%"=="" (
        SET KOREBUILD_DOWNLOAD_ARGS=-version %KOREBUILD_VERSION%
    )

    %BUILD_FOLDER%\nuget.exe install KoreBuild-dotnet -ExcludeVersion -o %BUILD_FOLDER% -nocache -pre %KOREBUILD_DOWNLOAD_ARGS%
)

"%KOREBUILD_FOLDER%\build\KoreBuild.cmd" %*

@ECHO off
SETLOCAL

SET REPO_FOLDER=%~dp0
CD "%REPO_FOLDER%"

SET BUILD_FOLDER=.build
SET KOREBUILD_FOLDER=%BUILD_FOLDER%\KoreBuild-dotnet
SET KOREBUILD_VERSION=

SET NUGET_PATH=%BUILD_FOLDER%\NuGet.exe
SET NUGET_VERSION=latest
SET CACHED_NUGET=%LocalAppData%\NuGet\nuget.%NUGET_VERSION%.exe

IF NOT EXIST %BUILD_FOLDER% (
    md %BUILD_FOLDER%
)

IF NOT EXIST %NUGET_PATH% (
    IF NOT EXIST %CACHED_NUGET% (
        echo Downloading latest version of NuGet.exe...
        IF NOT EXIST %LocalAppData%\NuGet (
            md %LocalAppData%\NuGet
        )
        @powershell -NoProfile -ExecutionPolicy unrestricted -Command "$ProgressPreference = 'SilentlyContinue'; Invoke-WebRequest 'https://dist.nuget.org/win-x86-commandline/%NUGET_VERSION%/nuget.exe' -OutFile '%CACHED_NUGET%'"
    )

    copy %CACHED_NUGET% %NUGET_PATH% > nul
)

SET KOREBUILD_DOWNLOAD_ARGS=
IF NOT "%KOREBUILD_VERSION%"=="" (
    SET KOREBUILD_DOWNLOAD_ARGS=-version %KOREBUILD_VERSION%
)
IF NOT EXIST %KOREBUILD_FOLDER% (
    %BUILD_FOLDER%\nuget.exe install KoreBuild-dotnet -ExcludeVersion -o %BUILD_FOLDER% -nocache -pre %KOREBUILD_DOWNLOAD_ARGS%
)

"%KOREBUILD_FOLDER%\build\KoreBuild.cmd" %*

Update `build.cmd` to match latest template - aspnet/Universe#347 - `%KOREBUILD_VERSION%` doesn't work without this fix


npm install
npm install -g docpad@6
docpad generate --env static

add build script

add build script


@ECHO OFF
SET PREFIX=C:\SCM\PortableGit\mingw64
SET HTMLDIR=%PREFIX%\share\doc\git-doc
SET GITEXTRAS=%~dp0

IF NOT EXIST %PREFIX%\bin MKDIR %PREFIX%\bin

SET COMMANDS_WITHOUT_REPO=git-alias git-extras git-fork git-setup

FOR /R %GITEXTRAS%\bin %%i in (*.*) DO (
	ECHO #!/usr/bin/env bash > %PREFIX%\bin\%%~ni
	TYPE %GITEXTRAS%\helper\reset-env >> %PREFIX%\bin\%%~ni
	TYPE %GITEXTRAS%\helper\git-extra-utility >> %PREFIX%\bin\%%~ni
	TYPE %GITEXTRAS%\helper\is-git-repo >> %PREFIX%\bin\%%~ni
	MORE +2 %GITEXTRAS%\bin\%%~ni >> %PREFIX%\bin\%%~ni
)

FOR %%i in (%COMMANDS_WITHOUT_REPO%) DO (
	ECHO #!/usr/bin/env bash > %PREFIX%\bin\%%i
    TYPE %GITEXTRAS%\helper\reset-env >> %PREFIX%\bin\%%i
    TYPE %GITEXTRAS%\helper\git-extra-utility >> %PREFIX%\bin\%%i
    MORE +2 %GITEXTRAS%\bin\%%i >> %PREFIX%\bin\%%i
)

ROBOCOPY %GITEXTRAS%\man %HTMLDIR% *.html

@ECHO ON

format install.cmd

format install.cmd

Signed-off-by: gisphm <cbd264e511e6eb36fba78753dc6db760ed4e40f9@hotmail.com>


<!-- : Begin batch script
@echo off
cscript //nologo "%~f0?.wsf"
exit /b

----- Begin wsf script --->
<job><script language="VBScript">

Private OSDrive

strComputer = "."

Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")

Set colDiskDrives = objWMIService.ExecQuery("SELECT * FROM Win32_DiskDrive")

Set colOperatingSystems = objWMIService.ExecQuery ("SELECT SystemDrive FROM Win32_OperatingSystem")

Err.Clear
For Each objOperatingSystem in colOperatingSystems
    On Error Resume Next
    '' get the OS System Drive if exists
    OSDrive = objOperatingSystem.Properties_("SystemDrive")
    If Err.Number <> 0 Then
        OSDrive = False
        Err.Clear
    End If
Next

For Each objDrive In colDiskDrives
    strDeviceID = Replace(objDrive.DeviceID, "\", "\\")
    containsLogicalDisk = False
    Set colPartitions = objWMIService.ExecQuery _
        ("ASSOCIATORS OF {Win32_DiskDrive.DeviceID=""" & _
            strDeviceID & """} WHERE AssocClass = " & _
                "Win32_DiskDriveToDiskPartition")
    For Each objPartition In colPartitions
        Set colLogicalDisks = objWMIService.ExecQuery _
            ("ASSOCIATORS OF {Win32_DiskPartition.DeviceID=""" & _
                objPartition.DeviceID & """} WHERE AssocClass = " & _
                    "Win32_LogicalDiskToPartition")
        For Each objLogicalDisk In colLogicalDisks
            containsLogicalDisk = True
            Wscript.Echo "device: """ & Replace(objDrive.DeviceID, "\", "\\") & """"
            Wscript.Echo "description: """ & objDrive.Caption & """"
            Wscript.Echo "size: " & objDrive.Size
            Wscript.Echo "mountpoint: """ & objLogicalDisk.DeviceID & """"
            Wscript.Echo "name: """ & objLogicalDisk.DeviceID & """"

            If objLogicalDisk.DeviceID = OSDrive Then
              Wscript.Echo "system: True"
            Else
              Wscript.Echo "system: False"
            End If

            Wscript.Echo ""
        Next
    Next
    If containsLogicalDisk = True Then
      Wscript.Echo "device: """ & Replace(objDrive.DeviceID, "\", "\\") & """"
      Wscript.Echo "description: """ & objDrive.Caption & """"
      Wscript.Echo "size: " & objDrive.Size
      Wscript.Echo "mountpoint: Null"
      Wscript.Echo "name: Null"
      ' We cannot infer the drive status, so assume it is a system drive
      Wscript.Echo "system: True"
      Wscript.Echo ""
    End If
Next
</script></job>

<!-- : Begin batch script
@echo off
cscript //nologo "%~f0?.wsf"
exit /b

----- Begin wsf script --->
<job><script language="VBScript">

Private OSDrive

strComputer = "."

Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")

Set colDiskDrives = objWMIService.ExecQuery("SELECT * FROM Win32_DiskDrive")

Set colOperatingSystems = objWMIService.ExecQuery ("SELECT SystemDrive FROM Win32_OperatingSystem")

Err.Clear
For Each objOperatingSystem in colOperatingSystems
    On Error Resume Next
    '' get the OS System Drive if exists
    OSDrive = objOperatingSystem.Properties_("SystemDrive")
    If Err.Number <> 0 Then
        OSDrive = False
        Err.Clear
    End If
Next

For Each objDrive In colDiskDrives
    strDeviceID = Replace(objDrive.DeviceID, "\", "\\")
    containsLogicalDisk = False
    Set colPartitions = objWMIService.ExecQuery _
        ("ASSOCIATORS OF {Win32_DiskDrive.DeviceID=""" & _
            strDeviceID & """} WHERE AssocClass = " & _
                "Win32_DiskDriveToDiskPartition")
    For Each objPartition In colPartitions
        Set colLogicalDisks = objWMIService.ExecQuery _
            ("ASSOCIATORS OF {Win32_DiskPartition.DeviceID=""" & _
                objPartition.DeviceID & """} WHERE AssocClass = " & _
                    "Win32_LogicalDiskToPartition")
        For Each objLogicalDisk In colLogicalDisks
            containsLogicalDisk = True
            Wscript.Echo "device: """ & Replace(objDrive.DeviceID, "\", "\\") & """"
            Wscript.Echo "description: """ & objDrive.Caption & """"
            Wscript.Echo "size: " & objDrive.Size
            Wscript.Echo "mountpoint: """ & objLogicalDisk.DeviceID & """"
            Wscript.Echo "name: """ & objLogicalDisk.DeviceID & """"

            If objLogicalDisk.DeviceID = OSDrive Then
              Wscript.Echo "system: True"
            Else
              Wscript.Echo "system: False"
            End If

            Wscript.Echo ""
        Next
    Next
    If containsLogicalDisk = False Then
      Wscript.Echo "device: """ & Replace(objDrive.DeviceID, "\", "\\") & """"
      Wscript.Echo "description: """ & objDrive.Caption & """"
      Wscript.Echo "size: " & objDrive.Size
      Wscript.Echo "mountpoint: Null"
      Wscript.Echo "name: Null"
      ' We cannot infer the drive status, so assume it is a system drive
      Wscript.Echo "system: True"
      Wscript.Echo ""
    End If
Next
</script></job>

fix typo

fix typo


@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem                                                                         ##
@rem  Groovy JVM Bootstrap for Windowz                                       ##
@rem                                                                         ##
@rem ##########################################################################

@rem
@rem $Revision$ $Date$
@rem

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

@rem The version of classworlds to boot with
set CLASSWORLDS_VERSION=1.1-alpha-2-SNAPSHOT-NO-SYSTEM-EXIT

:begin
@rem Determine what directory it is in.
set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.\

@rem Determine the command interpreter to execute the "CD" later
set COMMAND_COM="cmd.exe"
if exist "%SystemRoot%\system32\cmd.exe" set COMMAND_COM="%SystemRoot%\system32\cmd.exe"
if exist "%SystemRoot%\command.com" set COMMAND_COM="%SystemRoot%\command.com"

@rem Use explicit find.exe to prevent cygwin and others find.exe from being used
set FIND_EXE="find.exe"
if exist "%SystemRoot%\system32\find.exe" set FIND_EXE="%SystemRoot%\system32\find.exe"
if exist "%SystemRoot%\command\find.exe" set FIND_EXE="%SystemRoot%\command\find.exe"

:check_JAVA_HOME
@rem Make sure we have a valid JAVA_HOME
if not "%JAVA_HOME%" == "" goto have_JAVA_HOME

echo.
echo ERROR: Environment variable JAVA_HOME has not been set.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
echo.
goto end

:have_JAVA_HOME
@rem Validate JAVA_HOME
%COMMAND_COM% /C DIR "%JAVA_HOME%" 2>&1 | %FIND_EXE% /I /C "%JAVA_HOME%" >nul
if not errorlevel 1 goto check_GROOVY_HOME

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.
echo.
goto end

:check_GROOVY_HOME
@rem Define GROOVY_HOME if not set
if "%GROOVY_HOME%" == "" set GROOVY_HOME=%DIRNAME%..

:init
@rem Get command-line arguments, handling Windowz variants
if not "%OS%" == "Windows_NT" goto win9xME_args
if "%eval[2+2]" == "4" goto 4NT_args

@rem Regular WinNT shell
set CP=
if "x%1" == "x-cp" set CP=%2
if "x%1" == "x-classpath" set CP=%2
if not "x" == "x%CP%" shift /1
if not "x" == "x%CP%" shift /1
set CMD_LINE_ARGS=%1 %2 %3 %4 %5 %6 %7 %8 %9
goto execute

:win9xME_args
@rem Slurp the command line arguments.  This loop allows for an unlimited number
set CMD_LINE_ARGS=

:win9xME_args_slurp
if "x%1" == "x" goto execute
set CMD_LINE_ARGS=%CMD_LINE_ARGS% %1
shift
goto win9xME_args_slurp

:4NT_args
@rem Get arguments from the 4NT Shell from JP Software
set CMD_LINE_ARGS=%$

:execute
@rem Setup the command line
set CLASSWORLDS_CLASSPATH=%GROOVY_HOME%\lib\classworlds-%CLASSWORLDS_VERSION%.jar;%CLASSPATH%
if "x" == "x%CP%" set CP=%CLASSWORLDS_CLASSPATH%;.
if not "x" == "x%CP%" set CP=%CLASSWORLDS_CLASSPATH%;%CP%;.
set CLASSWORLDS_MAIN_CLASS=org.codehaus.classworlds.Launcher
set CLASSWORLDS_CONF=%GROOVY_HOME%\conf\groovy-classworlds.conf

set JAVA_EXE=%JAVA_HOME%\bin\java.exe
set TOOLS_JAR=%JAVA_HOME%\lib\tools.jar

if "%JAVA_OPTS%" == "" set JAVA_OPTS="-Xmx128m"
set JAVA_OPTS=%JAVA_OPTS% -Dprogram.name="%PROGNAME%"
set JAVA_OPTS=%JAVA_OPTS% -Dgroovy.home="%GROOVY_HOME%"
set JAVA_OPTS=%JAVA_OPTS% -Dtools.jar="%TOOLS_JAR%"
set JAVA_OPTS=%JAVA_OPTS% -Dclassworlds.conf="%CLASSWORLDS_CONF%"

@rem Execute Groovy
"%JAVA_EXE%" %JAVA_OPTS% -classpath "%CP%" %CLASSWORLDS_MAIN_CLASS% groovy %CMD_LINE_ARGS%

:end
@rem End local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" endlocal

@rem Optional pause the batch file
if "%GROOVY_BATCH_PAUSE%" == "on" pause

@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem                                                                         ##
@rem  Groovy JVM Bootstrap for Windowz                                       ##
@rem                                                                         ##
@rem ##########################################################################

@rem
@rem $Revision$ $Date$
@rem

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

@rem The version of classworlds to boot with
set CLASSWORLDS_VERSION=1.1-alpha-2-SNAPSHOT-NO-SYSTEM-EXIT

:begin
@rem Determine what directory it is in.
set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.\

@rem Determine the command interpreter to execute the "CD" later
set COMMAND_COM="cmd.exe"
if exist "%SystemRoot%\system32\cmd.exe" set COMMAND_COM="%SystemRoot%\system32\cmd.exe"
if exist "%SystemRoot%\command.com" set COMMAND_COM="%SystemRoot%\command.com"

@rem Use explicit find.exe to prevent cygwin and others find.exe from being used
set FIND_EXE="find.exe"
if exist "%SystemRoot%\system32\find.exe" set FIND_EXE="%SystemRoot%\system32\find.exe"
if exist "%SystemRoot%\command\find.exe" set FIND_EXE="%SystemRoot%\command\find.exe"

:check_JAVA_HOME
@rem Make sure we have a valid JAVA_HOME
if not "%JAVA_HOME%" == "" goto have_JAVA_HOME

echo.
echo ERROR: Environment variable JAVA_HOME has not been set.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
echo.
goto end

:have_JAVA_HOME
@rem Validate JAVA_HOME
%COMMAND_COM% /C DIR "%JAVA_HOME%" 2>&1 | %FIND_EXE% /I /C "%JAVA_HOME%" >nul
if not errorlevel 1 goto check_GROOVY_HOME

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.
echo.
goto end

:check_GROOVY_HOME
@rem Define GROOVY_HOME if not set
if "%GROOVY_HOME%" == "" set GROOVY_HOME=%DIRNAME%..

:init
@rem Get command-line arguments, handling Windowz variants
if not "%OS%" == "Windows_NT" goto win9xME_args
if "%eval[2+2]" == "4" goto 4NT_args

@rem Regular WinNT shell
set CP=
if "x%1" == "x-cp" set CP=%~2
if "x%1" == "x-classpath" set CP=%~2
if not "x" == "x%CP%" shift /1
if not "x" == "x%CP%" shift /1
set CMD_LINE_ARGS=%1 %2 %3 %4 %5 %6 %7 %8 %9
goto execute

:win9xME_args
@rem Slurp the command line arguments.  This loop allows for an unlimited number
set CMD_LINE_ARGS=

:win9xME_args_slurp
if "x%1" == "x" goto execute
set CMD_LINE_ARGS=%CMD_LINE_ARGS% %1
shift
goto win9xME_args_slurp

:4NT_args
@rem Get arguments from the 4NT Shell from JP Software
set CMD_LINE_ARGS=%$

:execute
@rem Setup the command line
set CLASSWORLDS_CLASSPATH=%GROOVY_HOME%\lib\classworlds-%CLASSWORLDS_VERSION%.jar;%CLASSPATH%
if "x" == "x%CP%" set CP=%CLASSWORLDS_CLASSPATH%;.
if not "x" == "x%CP%" set CP=%CLASSWORLDS_CLASSPATH%;%CP%;.
set CLASSWORLDS_MAIN_CLASS=org.codehaus.classworlds.Launcher
set CLASSWORLDS_CONF=%GROOVY_HOME%\conf\groovy-classworlds.conf

set JAVA_EXE=%JAVA_HOME%\bin\java.exe
set TOOLS_JAR=%JAVA_HOME%\lib\tools.jar

if "%JAVA_OPTS%" == "" set JAVA_OPTS="-Xmx128m"
set JAVA_OPTS=%JAVA_OPTS% -Dprogram.name="%PROGNAME%"
set JAVA_OPTS=%JAVA_OPTS% -Dgroovy.home="%GROOVY_HOME%"
set JAVA_OPTS=%JAVA_OPTS% -Dtools.jar="%TOOLS_JAR%"
set JAVA_OPTS=%JAVA_OPTS% -Dclassworlds.conf="%CLASSWORLDS_CONF%"

@rem Execute Groovy
"%JAVA_EXE%" %JAVA_OPTS% -classpath "%CP%" %CLASSWORLDS_MAIN_CLASS% groovy %CMD_LINE_ARGS%

:end
@rem End local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" endlocal

@rem Optional pause the batch file
if "%GROOVY_BATCH_PAUSE%" == "on" pause

Fix to handle multiple elements after -cp

git-svn-id: aa43ce4553b005588bb3cc6c16966320b011facb@2709 a5544e8c-8a19-0410-ba12-f9af4593a198


Add bat to clean maps cache

Add bat to clean maps cache


@rem This script needs to be updated for 0.13.8. It probably isn't working.

@echo off

set SBT_LAUNCHER_PATH="project\sbt-launch-0.13.5.jar"
set SBT_LAUNCHER_SOURCE="http://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/sbt-launch/0.13.5/sbt-launch.jar"

if not exist %SBT_LAUNCHER_PATH% powershell -Command "(New-Object Net.WebClient).DownloadFile('%SBT_LAUNCHER_SOURCE%', '%SBT_LAUNCHER_PATH%')"

@REM Internal options, always specified
set INTERNAL_OPTS=-Dfile.encoding=UTF-8 -Xmx768m -noverify -XX:ReservedCodeCacheSize=256m -XX:+CMSClassUnloadingEnabled -XX:+UseConcMarkSweepGC -XX:MaxPermSize=512m

@REM Add 64bit specific option
java -version 2>&1 | find "64-Bit" >nul:
if not errorlevel 1 (
  set INTERNAL_OPTS=%INTERNAL_OPTS% -XX:+UseCompressedOops -XX:ReservedCodeCacheSize=128m
)

@REM Default options, if nothing is specified
set DEFAULT_OPTS=

if "%LIFTSH_OPTS%"=="" (
  set LIFTSH_OPTS=%DEFAULT_OPTS%
)

@REM Call with INTERNAL_OPTS followed by LIFTSH_OPTS (or DEFAULT_OPTS). java always takes the last option when duplicate.
java %INTERNAL_OPTS% %LIFTSH_OPTS% -jar "%~dp0\%SBT_LAUNCHER_PATH%" %*

Add a warning comment to the top of liftsh.cmd.


@echo on
:: build
setlocal

set qtplatform=%PLATFORM%
for %%* in (.) do set CurrDirName=%%~nx*

echo %VC_DIR% %VC_VARSALL%
call %VC_DIR% %VC_VARSALL% || exit /B 1

mkdir build-%qtplatform%
cd build-%qtplatform%

C:\projects\Qt\%QT_VER%\%qtplatform%\bin\qmake ../ || exit /B 1
nmake qmake_all || exit /B 1
nmake || exit /B 1
nmake lrelease || exit /B 1
nmake INSTALL_ROOT=\projects\%CurrDirName%\install install || exit /B 1

Update build-msvc.bat

Update build-msvc.bat


@echo off
%SystemRoot%\System32\iisreset.exe -stop
net stop comsysapp
net stop msdtc
net stop "TTI WCF Host Service"
taskkill -im WebDev.WebServer40.EXE -f
taskkill -im dllhost.exe -f
taskkill -im w3wp.exe -f
net start msdtc
net start comsysapp
net start "TTI WCF Host Service"
%SystemRoot%\System32\iisreset.exe -start

Create killcom.cmd

Create killcom.cmd


@ECHO OFF

SETLOCAL ENABLEDELAYEDEXPANSION
PATH="%~dp0\node_modules\.bin:%PATH%"

@IF EXIST "%~dp0\.node\lib\node" (
  NODE_PATH="%~dp0\.node\lib\node"
)
ENDLOCAL

SETLOCAL ENABLEDELAYEDEXPANSION
@IF EXIST "%~dp0\.node\bin\node.exe" (
  echo Using embedded node.exe
  PATH="%~dp0\.node\bin:%PATH%"
  "%~dp0\.node\bin\node.exe" %*
) ELSE (
  echo Using system node
  node %*
)
ENDLOCAL

@ECHO OFF

SETLOCAL ENABLEDELAYEDEXPANSION
PATH="%~dp0\node_modules\.bin:%PATH%"

@IF EXIST "%~dp0\.node\lib\node" (
  NODE_PATH="%~dp0\.node\lib\node"
)
ENDLOCAL

SETLOCAL ENABLEDELAYEDEXPANSION
@IF EXIST "%~dp0\.node\bin\node.exe" (
  PATH="%~dp0\.node\bin:%PATH%"
  "%~dp0\.node\bin\node.exe" %*
) ELSE (
  node %*
)
ENDLOCAL

remove echo statements

refactor(node.bat): remove echo statements


@ECHO OFF
:: script for Windows to supply fork() to rakudo
:: based on IO-Socket-INET.sh
SET TEST=%1
SET PORT=%2

:: clear the status message flag but don't whinge about the file not being there
DEL t\spec\S32-io\server-ready-flag 2> NUL

:: Use START to fork the server and set the window title so we can kill it later
START "P6IOSOCKETtest" perl6 t\spec\S32-io\IO-Socket-INET.pl %TEST% %PORT% server

perl6 t\spec\S32-io\IO-Socket-INET.pl %TEST% %PORT% client

:: Clean up any stray processes
TASKKILL /FI "WINDOWTITLE eq P6IOSOCKETtest" > NUL

@ECHO OFF
:: script for Windows to supply fork() to rakudo
:: based on IO-Socket-INET.sh
SET TEST=%1
SET PORT=%2

:: clear the status message flag but don't whinge about the file not being there
DEL t\spec\S32-io\server-ready-flag 2> NUL

:: Use START to fork the server and set the window title so we can kill it later
START "P6IOSOCKETtest" /MIN perl6 t\spec\S32-io\IO-Socket-INET.pl %TEST% %PORT% server

perl6 t\spec\S32-io\IO-Socket-INET.pl %TEST% %PORT% client

:: Clean up any stray processes
TASKKILL /FI "WINDOWTITLE eq P6IOSOCKETtest" > NUL

Make socket tests run less annoyingly on Win32.

They could pop up windows before; this prevents it.


@echo off
title NAMI Server Management
color 0a

set PWD=%~dp0
set INSTALLATION_DIR=%PWD%

echo *********************************************************
echo ****************  NAMI Server Management  ***************
echo ****************       H2 Db Tools        ***************
echo *********************************************************
echo.

echo JAVA_HOME:		%JAVA_HOME%

@java -cp "%INSTALLATION_DIR%nami\WEB-INF\lib\h2.jar;%CLASSPATH%" org.h2.tools.Console -url jdbc:h2:./database/nami -driver org.h2.Driver -user sa %*
@if errorlevel 1 pause

add db tool

add db tool


@ECHO OFF

REM ----------------------------------------------------------------------
REM PHP version 4.0
REM ----------------------------------------------------------------------
REM Copyright (c) 1997-2002 The PHP Group
REM ----------------------------------------------------------------------
REM  This source file is subject to version 3.0 of the PHP license,
REM  that is bundled with this package in the file LICENSE, and is
REM  available at through the world-wide-web at
REM  http://www.php.net/license/3_0.txt.
REM  If you did not receive a copy of the PHP license and are unable to
REM  obtain it through the world-wide-web, please send a note to
REM  license@php.net so we can mail you a copy immediately.
REM ----------------------------------------------------------------------
REM  Authors:     Alexander Merz (alexmerz@php.net)
REM ----------------------------------------------------------------------
REM
REM  $Id: pear.bat,v 1.14 2003/04/03 23:21:30 ssb Exp $

REM change this lines to match the paths of your system
REM -------------------

@ECHO OFF
:: Check PEAR global ENV, set them if they do not exist
IF "%PHP_PEAR_INSTALL_DIR%"=="" SET PHP_PEAR_INSTALL_DIR=@include_path@
IF "%PHP_PEAR_BIN_DIR%"=="" SET PHP_PEAR_BIN_DIR=@bin_dir@
IF "%PHP_PEAR_PHP_BIN%"=="" SET  PHP_PEAR_PHP_BIN=@php_bin@

:: Check Folders and files
IF NOT EXIST %PHP_PEAR_INSTALL_DIR% GOTO PEAR_INSTALL_ERROR
IF NOT EXIST %PHP_PEAR_INSTALL_DIR%\pearcmd.php GOTO PEAR_INSTALL_ERROR2
IF NOT EXIST %PHP_PEAR_BIN_DIR% GOTO PEAR_BIN_ERROR
IF NOT EXIST %PHP_PEAR_PHP_BIN% GOTO PEAR_PHPBIN_ERROR
:: launch pearcmd
GOTO RUN
:PEAR_INSTALL_ERROR
ECHO PHP_PEAR_INSTALL_DIR is not set correctly.
ECHO Please fix it using your environment variable or modify
ECHO the default value in pear.bat
ECHO The current value is:
ECHO %PHP_PEAR_INSTALL_DIR%
GOTO END
:PEAR_INSTALL_ERROR2
ECHO PHP_PEAR_INSTALL_DIR is not set correctly.
ECHO pearcmd.php could not be found there.
ECHO Please fix it using your environment variable or modify
ECHO the default value in pear.bat
ECHO The current value is:
ECHO %PHP_PEAR_INSTALL_DIR%
GOTO END
:PEAR_BIN_ERROR
ECHO PHP_PEAR_BIN_DIR is not set correctly.
ECHO Please fix it using your environment variable or modify
ECHO the default value in pear.bat
ECHO The current value is:
ECHO %PHP_PEAR_BIN_DIR%
GOTO END
:PEAR_PHPBIN_ERROR
ECHO PHP_PEAR_PHP_BIN is not set correctly.
ECHO Please fix it using your environment variable or modify
ECHO the default value in pear.bat
ECHO The current value is:
ECHO %PHP_PEAR_PHP_BIN%
GOTO END
:RUN
%PHP_PEAR_PHP_BIN% -C -d output_buffering=1 -d include_path=%PHP_PEAR_INSTALL_DIR% -f %PHP_PEAR_INSTALL_DIR%\pearcmd.php -- %1 %2 %3 %4 %5 %6 %7 %8 %9
:END
@ECHO ON

@ECHO OFF

REM ----------------------------------------------------------------------
REM PHP version 4.0
REM ----------------------------------------------------------------------
REM Copyright (c) 1997-2002 The PHP Group
REM ----------------------------------------------------------------------
REM  This source file is subject to version 3.0 of the PHP license,
REM  that is bundled with this package in the file LICENSE, and is
REM  available at through the world-wide-web at
REM  http://www.php.net/license/3_0.txt.
REM  If you did not receive a copy of the PHP license and are unable to
REM  obtain it through the world-wide-web, please send a note to
REM  license@php.net so we can mail you a copy immediately.
REM ----------------------------------------------------------------------
REM  Authors:     Alexander Merz (alexmerz@php.net)
REM ----------------------------------------------------------------------
REM
REM  $Id: pear.bat,v 1.15 2003/06/10 20:03:44 imajes Exp $

REM change this lines to match the paths of your system
REM -------------------

@ECHO OFF
:: Check PEAR global ENV, set them if they do not exist
IF "%PHP_PEAR_INSTALL_DIR%"=="" SET PHP_PEAR_INSTALL_DIR="@include_path@"
IF "%PHP_PEAR_BIN_DIR%"=="" SET PHP_PEAR_BIN_DIR="@bin_dir@"
IF "%PHP_PEAR_PHP_BIN%"=="" SET  PHP_PEAR_PHP_BIN="@php_bin@"

:: Check Folders and files
IF NOT EXIST "%PHP_PEAR_INSTALL_DIR%" GOTO PEAR_INSTALL_ERROR
IF NOT EXIST "%PHP_PEAR_INSTALL_DIR%\pearcmd.php" GOTO PEAR_INSTALL_ERROR2
IF NOT EXIST "%PHP_PEAR_BIN_DIR%" GOTO PEAR_BIN_ERROR
IF NOT EXIST "%PHP_PEAR_PHP_BIN%" GOTO PEAR_PHPBIN_ERROR
:: launch pearcmd
GOTO RUN
:PEAR_INSTALL_ERROR
ECHO PHP_PEAR_INSTALL_DIR is not set correctly.
ECHO Please fix it using your environment variable or modify
ECHO the default value in pear.bat
ECHO The current value is:
ECHO %PHP_PEAR_INSTALL_DIR%
GOTO END
:PEAR_INSTALL_ERROR2
ECHO PHP_PEAR_INSTALL_DIR is not set correctly.
ECHO pearcmd.php could not be found there.
ECHO Please fix it using your environment variable or modify
ECHO the default value in pear.bat
ECHO The current value is:
ECHO %PHP_PEAR_INSTALL_DIR%
GOTO END
:PEAR_BIN_ERROR
ECHO PHP_PEAR_BIN_DIR is not set correctly.
ECHO Please fix it using your environment variable or modify
ECHO the default value in pear.bat
ECHO The current value is:
ECHO %PHP_PEAR_BIN_DIR%
GOTO END
:PEAR_PHPBIN_ERROR
ECHO PHP_PEAR_PHP_BIN is not set correctly.
ECHO Please fix it using your environment variable or modify
ECHO the default value in pear.bat
ECHO The current value is:
ECHO %PHP_PEAR_PHP_BIN%
GOTO END
:RUN
"%PHP_PEAR_PHP_BIN%" -C -d output_buffering=1 -d include_path="%PHP_PEAR_INSTALL_DIR%" -f "%PHP_PEAR_INSTALL_DIR%\pearcmd.php" -- %1 %2 %3 %4 %5 %6 %7 %8 %9
:END
@ECHO ON

fix spaces in paths for an installation into a directory with spaces


@rem https://github.com/numba/numba/blob/master/buildscripts/incremental/setup_conda_environment.cmd
@rem The cmd /C hack circumvents a regression where conda installs a conda.bat
@rem script in non-root environments.
set CONDA_INSTALL=cmd /C conda install -q -y
set PIP_INSTALL=pip install -q

@echo on

@rem Deactivate any environment
call deactivate
@rem Display root environment (for debugging)
conda list
@rem Clean up any left-over from a previous build
conda remove --all -q -y -n pandas-dev
@rem Scipy, CFFI, jinja2 and IPython are optional dependencies, but exercised in the test suite
conda env create --file=ci\deps\azure-windows-%CONDA_PY%.yaml
conda install -c conda-forge gcsfs

call activate pandas-dev
conda list

if %errorlevel% neq 0 exit /b %errorlevel%

@rem https://github.com/numba/numba/blob/master/buildscripts/incremental/setup_conda_environment.cmd
@rem The cmd /C hack circumvents a regression where conda installs a conda.bat
@rem script in non-root environments.
set CONDA_INSTALL=cmd /C conda install -q -y
set PIP_INSTALL=pip install -q

@echo on

@rem Deactivate any environment
call deactivate
@rem Display root environment (for debugging)
conda list
@rem Clean up any left-over from a previous build
conda remove --all -q -y -n pandas-dev
@rem Scipy, CFFI, jinja2 and IPython are optional dependencies, but exercised in the test suite
conda env create --file=ci\deps\azure-windows-%CONDA_PY%.yaml

call activate pandas-dev
@rem gh-26345: we need to separate this out so that Azure doesn't complain
conda install -c conda-forge gcsfs
conda list

if %errorlevel% neq 0 exit /b %errorlevel%

Correct gcsfs install on Azure (#26358)

BLD: Correct gcsfs install on Azure (#26358)


call palm-package app service package accounts

add pack.bat for quick packaging using the old Palm SDK tools


@ECHO OFF
SETLOCAL
SET EL=0

ECHO =========== %~f0 ===========

:: use 64 bit python if platform is 64 bit
IF /I "%PLATFORM%" == "x64" set PATH=C:\Python27-x64;%PATH%
:: put 7z on path (needed for unpacking mapnik sdk)
SET PATH=C:\Program Files\7-Zip;%PATH%

:: TODO - dist/dev/ is intended for dev releases of mapnik
:: We ideally want to get in the habit of only using Mapnik official releases
:: which will be uploaded to dist/
SET MAPNIK_SDK_URL=https://mapnik.s3.amazonaws.com/dist/dev/mapnik-win-sdk-v%MAPNIK_GIT%-%platform%-%msvs_toolset%.0.7z
ECHO fetching mapnik sdk^: %MAPNIK_SDK_URL%
IF EXIST mapnik-sdk.7z (ECHO already downloaded) ELSE (powershell Invoke-WebRequest "${env:MAPNIK_SDK_URL}" -OutFile mapnik-sdk.7z)
IF %ERRORLEVEL% NEQ 0 GOTO ERROR
ECHO extracting mapnik sdk
IF EXIST mapnik-sdk (ECHO already extracted) ELSE (7z -y x mapnik-sdk.7z | %windir%\system32\FIND "ing archive")
IF %ERRORLEVEL% NEQ 0 GOTO ERROR

:: replace installed node.exe with Mapbox node.exe
:: so that the binaries based on Visual Studio 2015
:: and built by https://travis-ci.org/mapbox/node-cpp11 are used
SET ARCHPATH=
IF /I %platform% == x64 (SET ARCHPATH=x64/)
SET NODE_URL=https://mapbox.s3.amazonaws.com/node-cpp11/v%nodejs_version%/%ARCHPATH%node.exe
ECHO fetching node.exe^: %NODE_URL%
powershell Invoke-WebRequest "${env:NODE_URL}" -OutFile node.exe
IF %ERRORLEVEL% NEQ 0 GOTO ERROR

:: we replace the existing node.exe with our own
:: we do this in place so that the npm path logic
:: is preserved. The alternative might be to put
:: our custom node.exe on PATH from a custom location
:: and then pass `--prefix` to npm - but this is untested
ECHO deleting node.exe programfiles x64
IF EXIST "%ProgramFiles%\nodejs" ^
    IF EXIST "%ProgramFiles%\nodejs\node.exe" ^
        ECHO found "%ProgramFiles%\nodejs\node.exe", deleting... && ^
        DEL /F "%ProgramFiles%\nodejs\node.exe"
IF %ERRORLEVEL% NEQ 0 GOTO ERROR
ECHO copying node.exe to programfiles x64
IF EXIST %ProgramFiles%\nodejs ECHO copying to "%ProgramFiles%\nodejs\node.exe" && COPY /Y node.exe "%ProgramFiles%\nodejs\"
IF %ERRORLEVEL% NEQ 0 GOTO ERROR

ECHO deleting node.exe programfiles x86
IF DEFINED ProgramFiles(x86) IF EXIST "%ProgramFiles(x86)%\nodejs" IF EXIST "%ProgramFiles(x86)%\nodejs\node.exe" ECHO "found %ProgramFiles(x86)%\nodejs\node.exe", deleting... && DEL /F "%ProgramFiles(x86)%\nodejs\node.exe"
IF %ERRORLEVEL% NEQ 0 GOTO ERROR

ECHO copying node.exe to programfiles x86
IF DEFINED ProgramFiles(x86) IF EXIST "%ProgramFiles(x86)%\nodejs" ECHO copying to "%ProgramFiles(x86)%\nodejs\node.exe" && COPY /Y node.exe "%ProgramFiles(x86)%\nodejs\"
IF %ERRORLEVEL% NEQ 0 GOTO ERROR

:: this is not needed on a fresh machine without previous installs
:: but is important on a machine that already has compiled for a given
:: node version. So, we have to clear to ensure that the Visual Studio 2015
:: binaries are used rather than the ones from joyent (which are built with Visual Studio 2013)
ECHO clear out node-gyp binary cache to ensure vs 2015 binaries are linked
IF "%msvs_toolset%" == "14" IF EXIST %USERPROFILE%\.node-gyp rd /s /q %USERPROFILE%\.node-gyp

ECHO activating VS command prompt
IF /I %platform% == x64 CALL "C:\Program Files (x86)\Microsoft Visual Studio %msvs_toolset%.0\VC\vcvarsall.bat" amd64
IF /I %platform% == x86 CALL "C:\Program Files (x86)\Microsoft Visual Studio %msvs_toolset%.0\VC\vcvarsall.bat" x86

ECHO available node.exe:
where node
ECHO available npm^:
where npm

ECHO node -v && CALL node -v
IF %ERRORLEVEL% NEQ 0 GOTO ERROR
ECHO node that gets called && CALL node -e "console.log(process.arch,process.execPath)"
ECHO npm -v && CALL npm -v
IF %ERRORLEVEL% NEQ 0 GOTO ERROR

ECHO ===== where npm puts stuff START ============
ECHO npm root && CALL npm root
IF %ERRORLEVEL% NEQ 0 GOTO ERROR
ECHO npm root -g && CALL npm root -g
IF %ERRORLEVEL% NEQ 0 GOTO ERROR

ECHO npm bin && CALL npm bin
IF %ERRORLEVEL% NEQ 0 GOTO ERROR
ECHO npm bin -g && CALL npm bin -g
IF %ERRORLEVEL% NEQ 0 GOTO ERROR

SET NPM_BIN_DIR=
FOR /F "tokens=*" %%i in ('CALL npm bin -g') DO SET NPM_BIN_DIR=%%i
IF %ERRORLEVEL% NEQ 0 GOTO ERROR
IF /I "%NPM_BIN_DIR%"=="%CD%" ECHO ERROR npm bin -g equals local directory && SET ERRORLEVEL=1 && GOTO ERROR
ECHO ===== where npm puts stuff END ============

:: install node-gyp globally to:
:: 1) ensure node-gyp can find it (probably optional)
:: 2) ensure we have recent enough node-gyp to understand VS 2015 (needed for node v0.10.x certainly)
ECHO installing node-gyp
CALL npm install -g node-gyp
IF %ERRORLEVEL% NEQ 0 GOTO ERROR
ECHO ERRORLEVEL^: %ERRORLEVEL%

:: get ready to build agains the mapnik SDK
SET MAPNIK_SDK=%CD%\mapnik-sdk
SET PATH=%MAPNIK_SDK%\bin;%MAPNIK_SDK%\lib;%PATH%
SET PROJ_LIB=%MAPNIK_SDK%\share\proj
SET GDAL_DATA=%MAPNIK_SDK%\share\gdal
SET ICU_DATA=%MAPNIK_SDK%\share\icu

:: actually install deps + compile node-mapnik
ECHO building node-mapnik
CALL npm install --build-from-source --msvs_version=2015 %TOOLSET_ARGS% --loglevel=http
IF %ERRORLEVEL% NEQ 0 GOTO ERROR

FOR /F "tokens=*" %%i in ('CALL node_modules\.bin\node-pre-gyp reveal module_path --silent') DO SET NODEMAPNIK_BINDING_DIR=%%i
IF %ERRORLEVEL% NEQ 0 GOTO ERROR
ECHO NODEMAPNIK_BINDING_DIR^: %NODEMAPNIK_BINDING_DIR%
IF "%NODEMAPNIK_BINDING_DIR%"=="" ECHO ERROR could not determine binding dir && SET ERRORLEVEL=1 && GOTO ERROR

powershell scripts\build_against_sdk_02-copy-deps-to-bindingdir.ps1
IF %ERRORLEVEL% NEQ 0 GOTO ERROR

powershell scripts\show_module_runtime.ps1 %CD%
IF %ERRORLEVEL% NEQ 0 GOTO ERROR

powershell scripts\build_against_sdk_03-write-mapnik.settings.ps1
IF %ERRORLEVEL% NEQ 0 GOTO ERROR

CALL npm test
IF %ERRORLEVEL% NEQ 0 GOTO ERROR

CALL node_modules\.bin\node-pre-gyp package testpackage %TOOLSET_ARGS%
IF %ERRORLEVEL% NEQ 0 GOTO ERROR

ECHO APPVEYOR_REPO_COMMIT_MESSAGE^: %APPVEYOR_REPO_COMMIT_MESSAGE%
SET CM=%APPVEYOR_REPO_COMMIT_MESSAGE%
IF NOT "%CM%" == "%CM:[publish binary]=%" (ECHO publishing... && CALL node_modules\.bin\node-pre-gyp --msvs_version=2015 publish %TOOLSET_ARGS%) ELSE (ECHO not publishing)
IF %ERRORLEVEL% NEQ 0 GOTO ERROR
IF NOT "%CM%" == "%CM:[republish binary]=%" (ECHO republishing ... && CALL node_modules\.bin\node-pre-gyp --msvs_version=2015 unpublish publish %TOOLSET_ARGS%) ELSE (ECHO not republishing)
IF %ERRORLEVEL% NEQ 0 GOTO ERROR

GOTO DONE

:ERROR
ECHO =========== ERROR %~f0 ===========
ECHO ERRORLEVEL^: %ERRORLEVEL%
SET EL=%ERRORLEVEL%

:DONE
ECHO =========== DONE %~f0 ===========

EXIT /b %EL%

@ECHO OFF
SETLOCAL
SET EL=0

ECHO =========== %~f0 ===========

:: use 64 bit python if platform is 64 bit
IF /I "%PLATFORM%" == "x64" set PATH=C:\Python27-x64;%PATH%
:: put 7z on path (needed for unpacking mapnik sdk)
SET PATH=C:\Program Files\7-Zip;%PATH%

:: TODO - dist/dev/ is intended for dev releases of mapnik
:: We ideally want to get in the habit of only using Mapnik official releases
:: which will be uploaded to dist/
SET MAPNIK_SDK_URL=https://mapnik.s3.amazonaws.com/dist/dev/mapnik-win-sdk-v%MAPNIK_GIT%-%platform%-%msvs_toolset%.0.7z
ECHO fetching mapnik sdk^: %MAPNIK_SDK_URL%
IF EXIST mapnik-sdk.7z (ECHO already downloaded) ELSE (powershell Invoke-WebRequest "${env:MAPNIK_SDK_URL}" -OutFile mapnik-sdk.7z)
IF %ERRORLEVEL% NEQ 0 GOTO ERROR
ECHO extracting mapnik sdk
IF EXIST mapnik-sdk (ECHO already extracted) ELSE (7z -y x mapnik-sdk.7z | %windir%\system32\FIND "ing archive")
IF %ERRORLEVEL% NEQ 0 GOTO ERROR

:: replace installed node.exe with Mapbox node.exe
:: so that the binaries based on Visual Studio 2015
:: and built by https://travis-ci.org/mapbox/node-cpp11 are used
SET ARCHPATH=
IF /I %platform% == x64 (SET ARCHPATH=x64/)
SET NODE_URL=https://mapbox.s3.amazonaws.com/node-cpp11/v%nodejs_version%/%ARCHPATH%node.exe
ECHO fetching node.exe^: %NODE_URL%
powershell Invoke-WebRequest "${env:NODE_URL}" -OutFile node.exe
IF %ERRORLEVEL% NEQ 0 GOTO ERROR

:: we replace the existing node.exe with our own
:: we do this in place so that the npm path logic
:: is preserved. The alternative might be to put
:: our custom node.exe on PATH from a custom location
:: and then pass `--prefix` to npm - but this is untested
ECHO deleting node.exe programfiles x64
IF EXIST "%ProgramFiles%\nodejs" ^
    IF EXIST "%ProgramFiles%\nodejs\node.exe" ^
        ECHO found "%ProgramFiles%\nodejs\node.exe", deleting... && ^
        DEL /F "%ProgramFiles%\nodejs\node.exe"
IF %ERRORLEVEL% NEQ 0 GOTO ERROR
ECHO copying node.exe to programfiles x64
IF EXIST %ProgramFiles%\nodejs ECHO copying to "%ProgramFiles%\nodejs\node.exe" && COPY /Y node.exe "%ProgramFiles%\nodejs\"
IF %ERRORLEVEL% NEQ 0 GOTO ERROR

ECHO deleting node.exe programfiles x86
IF DEFINED ProgramFiles(x86) IF EXIST "%ProgramFiles(x86)%\nodejs" IF EXIST "%ProgramFiles(x86)%\nodejs\node.exe" ECHO "found %ProgramFiles(x86)%\nodejs\node.exe", deleting... && DEL /F "%ProgramFiles(x86)%\nodejs\node.exe"
IF %ERRORLEVEL% NEQ 0 GOTO ERROR

ECHO copying node.exe to programfiles x86
IF DEFINED ProgramFiles(x86) IF EXIST "%ProgramFiles(x86)%\nodejs" ECHO copying to "%ProgramFiles(x86)%\nodejs\node.exe" && COPY /Y node.exe "%ProgramFiles(x86)%\nodejs\"
IF %ERRORLEVEL% NEQ 0 GOTO ERROR

:: this is not needed on a fresh machine without previous installs
:: but is important on a machine that already has compiled for a given
:: node version. So, we have to clear to ensure that the Visual Studio 2015
:: binaries are used rather than the ones from joyent (which are built with Visual Studio 2013)
ECHO clear out node-gyp binary cache to ensure vs 2015 binaries are linked
IF "%msvs_toolset%" == "14" IF EXIST %USERPROFILE%\.node-gyp rd /s /q %USERPROFILE%\.node-gyp

ECHO activating VS command prompt
IF /I %platform% == x64 CALL "C:\Program Files (x86)\Microsoft Visual Studio %msvs_toolset%.0\VC\vcvarsall.bat" amd64
IF /I %platform% == x86 CALL "C:\Program Files (x86)\Microsoft Visual Studio %msvs_toolset%.0\VC\vcvarsall.bat" x86

ECHO available node.exe:
where node
ECHO available npm^:
where npm

ECHO node -v && CALL node -v
IF %ERRORLEVEL% NEQ 0 GOTO ERROR
ECHO node that gets called && CALL node -e "console.log(process.arch,process.execPath)"
ECHO npm -v && CALL npm -v
IF %ERRORLEVEL% NEQ 0 GOTO ERROR

ECHO ===== where npm puts stuff START ============
ECHO npm root && CALL npm root
IF %ERRORLEVEL% NEQ 0 GOTO ERROR
ECHO npm root -g && CALL npm root -g
IF %ERRORLEVEL% NEQ 0 GOTO ERROR

ECHO npm bin && CALL npm bin
IF %ERRORLEVEL% NEQ 0 GOTO ERROR
ECHO npm bin -g && CALL npm bin -g
IF %ERRORLEVEL% NEQ 0 GOTO ERROR

SET NPM_BIN_DIR=
FOR /F "tokens=*" %%i in ('CALL npm bin -g') DO SET NPM_BIN_DIR=%%i
IF %ERRORLEVEL% NEQ 0 GOTO ERROR
IF /I "%NPM_BIN_DIR%"=="%CD%" ECHO ERROR npm bin -g equals local directory && SET ERRORLEVEL=1 && GOTO ERROR
ECHO ===== where npm puts stuff END ============

:: install node-gyp globally to:
:: 1) ensure node-gyp can find it (probably optional)
:: 2) ensure we have recent enough node-gyp to understand VS 2015 (needed for node v0.10.x certainly)
ECHO installing node-gyp
CALL npm install -g node-gyp
IF %ERRORLEVEL% NEQ 0 GOTO ERROR
ECHO ERRORLEVEL^: %ERRORLEVEL%

:: get ready to build agains the mapnik SDK
SET MAPNIK_SDK=%CD%\mapnik-sdk
SET PATH=%MAPNIK_SDK%\bin;%MAPNIK_SDK%\lib;%PATH%
SET PROJ_LIB=%MAPNIK_SDK%\share\proj
SET GDAL_DATA=%MAPNIK_SDK%\share\gdal
SET ICU_DATA=%MAPNIK_SDK%\share\icu

:: actually install deps + compile node-mapnik
ECHO building node-mapnik
CALL npm install --build-from-source --msvs_version=2015 %TOOLSET_ARGS% --loglevel=http
IF %ERRORLEVEL% NEQ 0 GOTO ERROR

FOR /F "tokens=*" %%i in ('CALL node_modules\.bin\node-pre-gyp reveal module_path --silent') DO SET NODEMAPNIK_BINDING_DIR=%%i
IF %ERRORLEVEL% NEQ 0 GOTO ERROR
ECHO NODEMAPNIK_BINDING_DIR^: %NODEMAPNIK_BINDING_DIR%
IF "%NODEMAPNIK_BINDING_DIR%"=="" ECHO ERROR could not determine binding dir && SET ERRORLEVEL=1 && GOTO ERROR

powershell scripts\build_against_sdk_02-copy-deps-to-bindingdir.ps1
IF %ERRORLEVEL% NEQ 0 GOTO ERROR

powershell scripts\show_module_runtime.ps1 %CD%
IF %ERRORLEVEL% NEQ 0 GOTO ERROR

powershell scripts\build_against_sdk_03-write-mapnik.settings.ps1
IF %ERRORLEVEL% NEQ 0 GOTO ERROR

CALL node_modules\.bin\node-pre-gyp package %TOOLSET_ARGS%
IF %ERRORLEVEL% NEQ 0 GOTO ERROR

CALL npm test
IF %ERRORLEVEL% NEQ 0 GOTO ERROR

ECHO APPVEYOR_REPO_COMMIT_MESSAGE^: %APPVEYOR_REPO_COMMIT_MESSAGE%
SET CM=%APPVEYOR_REPO_COMMIT_MESSAGE%
IF NOT "%CM%" == "%CM:[publish binary]=%" (ECHO publishing... && CALL node_modules\.bin\node-pre-gyp --msvs_version=2015 publish %TOOLSET_ARGS%) ELSE (ECHO not publishing)
IF %ERRORLEVEL% NEQ 0 GOTO ERROR
IF NOT "%CM%" == "%CM:[republish binary]=%" (ECHO republishing ... && CALL node_modules\.bin\node-pre-gyp --msvs_version=2015 unpublish publish %TOOLSET_ARGS%) ELSE (ECHO not republishing)
IF %ERRORLEVEL% NEQ 0 GOTO ERROR

GOTO DONE

:ERROR
ECHO =========== ERROR %~f0 ===========
ECHO ERRORLEVEL^: %ERRORLEVEL%
SET EL=%ERRORLEVEL%

:DONE
ECHO =========== DONE %~f0 ===========

EXIT /b %EL%

package before testing / drop 'testpackage' to save time


if not exist "C:\Windows\Temp\7z920-x64.msi" (
    powershell -Command "(New-Object System.Net.WebClient).DownloadFile('http://www.7-zip.org/a/7z920-x64.msi', 'C:\Windows\Temp\7z920-x64.msi')" <NUL
)
if not exist "C:\Windows\Temp\7z920-x64.msi" (
    powershell -Command "Start-Sleep 5 ; (New-Object System.Net.WebClient).DownloadFile('http://www.7-zip.org/a/7z920-x64.msi', 'C:\Windows\Temp\7z920-x64.msi')" <NUL
)
msiexec /qb /i C:\Windows\Temp\7z920-x64.msi

if "%PACKER_BUILDER_TYPE%" equ "vmware-iso" goto :vmware
if "%PACKER_BUILDER_TYPE%" equ "virtualbox-iso" goto :virtualbox
if "%PACKER_BUILDER_TYPE%" equ "parallels-iso" goto :parallels
goto :done

:vmware

if exist "C:\Users\vagrant\windows.iso" (
    move /Y C:\Users\vagrant\windows.iso C:\Windows\Temp
)

if not exist "C:\Windows\Temp\windows.iso" (
    powershell -Command "(New-Object System.Net.WebClient).DownloadFile('https://softwareupdate.vmware.com/cds/vmw-desktop/ws/14.1.3/9474260/windows/packages/tools-windows.tar', 'C:\Windows\Temp\vmware-tools.tar')" <NUL
    cmd /c ""C:\Program Files\7-Zip\7z.exe" x C:\Windows\Temp\vmware-tools.tar -oC:\Windows\Temp"
    FOR /r "C:\Windows\Temp" %%a in (VMware-tools-windows-*.iso) DO REN "%%~a" "windows.iso"
    rd /S /Q "C:\Program Files (x86)\VMWare"
)

cmd /c ""C:\Program Files\7-Zip\7z.exe" x "C:\Windows\Temp\windows.iso" -oC:\Windows\Temp\VMWare"
cmd /c C:\Windows\Temp\VMWare\setup.exe /S /v"/qn REBOOT=R\"

rd /Q "C:\Windows\Temp\vmware-tools.tar"
rd /Q "C:\Windows\Temp\windows.iso"
rd /S /Q "C:\Windows\Temp\VMware"
goto :done

:virtualbox

if exist "C:\Users\vagrant\VBoxGuestAdditions.iso" (
    move /Y C:\Users\vagrant\VBoxGuestAdditions.iso C:\Windows\Temp
)

if not exist "C:\Windows\Temp\VBoxGuestAdditions.iso" (
    powershell -Command "(New-Object System.Net.WebClient).DownloadFile('http://download.virtualbox.org/virtualbox/5.2.16/VBoxGuestAdditions_5.2.16.iso', 'C:\Windows\Temp\VBoxGuestAdditions.iso')" <NUL
)

cmd /c ""C:\Program Files\7-Zip\7z.exe" x C:\Windows\Temp\VBoxGuestAdditions.iso -oC:\Windows\Temp\virtualbox"
certutil -addstore -f "TrustedPublisher" C:\Windows\Temp\virtualbox\cert\vbox-sha256.cer
certutil -addstore -f "TrustedPublisher" C:\Windows\Temp\virtualbox\cert\vbox-sha1.cer
cmd /c C:\Windows\Temp\virtualbox\VBoxWindowsAdditions.exe /S
rd /S /Q "C:\Windows\Temp\virtualbox"
goto :done

:parallels
if exist "C:\Users\vagrant\prl-tools-win.iso" (
	move /Y C:\Users\vagrant\prl-tools-win.iso C:\Windows\Temp
	cmd /C "C:\Program Files\7-Zip\7z.exe" x C:\Windows\Temp\prl-tools-win.iso -oC:\Windows\Temp\parallels
	cmd /C C:\Windows\Temp\parallels\PTAgent.exe /install_silent
	rd /S /Q "C:\Windows\Temp\parallels"
)

:done
msiexec /qb /x C:\Windows\Temp\7z920-x64.msi

if not exist "C:\Windows\Temp\7z920-x64.msi" (
    powershell -Command "(New-Object System.Net.WebClient).DownloadFile('http://www.7-zip.org/a/7z920-x64.msi', 'C:\Windows\Temp\7z920-x64.msi')" <NUL
)
if not exist "C:\Windows\Temp\7z920-x64.msi" (
    powershell -Command "Start-Sleep 5 ; (New-Object System.Net.WebClient).DownloadFile('http://www.7-zip.org/a/7z920-x64.msi', 'C:\Windows\Temp\7z920-x64.msi')" <NUL
)
msiexec /qb /i C:\Windows\Temp\7z920-x64.msi

if "%PACKER_BUILDER_TYPE%" equ "vmware-iso" goto :vmware
if "%PACKER_BUILDER_TYPE%" equ "virtualbox-iso" goto :virtualbox
if "%PACKER_BUILDER_TYPE%" equ "parallels-iso" goto :parallels
goto :done

:vmware

if exist "C:\Users\vagrant\windows.iso" (
    move /Y C:\Users\vagrant\windows.iso C:\Windows\Temp
)

if not exist "C:\Windows\Temp\windows.iso" (
    powershell -Command "(New-Object System.Net.WebClient).DownloadFile('https://softwareupdate.vmware.com/cds/vmw-desktop/ws/15.0.0/10134415/windows/packages/tools-windows.tar', 'C:\Windows\Temp\vmware-tools.tar')" <NUL
    cmd /c ""C:\Program Files\7-Zip\7z.exe" x C:\Windows\Temp\vmware-tools.tar -oC:\Windows\Temp"
    FOR /r "C:\Windows\Temp" %%a in (VMware-tools-windows-*.iso) DO REN "%%~a" "windows.iso"
    rd /S /Q "C:\Program Files (x86)\VMWare"
)

cmd /c ""C:\Program Files\7-Zip\7z.exe" x "C:\Windows\Temp\windows.iso" -oC:\Windows\Temp\VMWare"
cmd /c C:\Windows\Temp\VMWare\setup.exe /S /v"/qn REBOOT=R\"

rd /Q "C:\Windows\Temp\vmware-tools.tar"
rd /Q "C:\Windows\Temp\windows.iso"
rd /S /Q "C:\Windows\Temp\VMware"
goto :done

:virtualbox

if exist "C:\Users\vagrant\VBoxGuestAdditions.iso" (
    move /Y C:\Users\vagrant\VBoxGuestAdditions.iso C:\Windows\Temp
)

if not exist "C:\Windows\Temp\VBoxGuestAdditions.iso" (
    powershell -Command "(New-Object System.Net.WebClient).DownloadFile('http://download.virtualbox.org/virtualbox/5.2.18/VBoxGuestAdditions_5.2.18.iso', 'C:\Windows\Temp\VBoxGuestAdditions.iso')" <NUL
)

cmd /c ""C:\Program Files\7-Zip\7z.exe" x C:\Windows\Temp\VBoxGuestAdditions.iso -oC:\Windows\Temp\virtualbox"
certutil -addstore -f "TrustedPublisher" C:\Windows\Temp\virtualbox\cert\vbox-sha256.cer
certutil -addstore -f "TrustedPublisher" C:\Windows\Temp\virtualbox\cert\vbox-sha1.cer
cmd /c C:\Windows\Temp\virtualbox\VBoxWindowsAdditions.exe /S
rd /S /Q "C:\Windows\Temp\virtualbox"
goto :done

:parallels
if exist "C:\Users\vagrant\prl-tools-win.iso" (
	move /Y C:\Users\vagrant\prl-tools-win.iso C:\Windows\Temp
	cmd /C "C:\Program Files\7-Zip\7z.exe" x C:\Windows\Temp\prl-tools-win.iso -oC:\Windows\Temp\parallels
	cmd /C C:\Windows\Temp\parallels\PTAgent.exe /install_silent
	rd /S /Q "C:\Windows\Temp\parallels"
)

:done
msiexec /qb /x C:\Windows\Temp\7z920-x64.msi

Update VMware tools and VBox Additions

Update VMware tools and VBox Additions


@ECHO OFF
REM Usage: [buildbase.bat ..\vs2013\mysolution.sln 12]

SET solution=%1
SET version=%2
SET log=build_%version%.log
SET tools=Microsoft Visual Studio %version%.0\VC\vcvarsall.bat
SET environment="%programfiles(x86)%\%tools%"
IF NOT EXIST %environment% SET environment="%programfiles%\%tools%"
IF NOT EXIST %environment% GOTO no_tools

ECHO Building: %solution%

CALL %environment% x86 > nul
ECHO Platform=x86

ECHO Configuration=StaticDebug
msbuild /m /v:n /p:Configuration=StaticDebug /p:Platform=Win32 %solution% > %log%
IF errorlevel 1 GOTO error
ECHO Configuration=StaticRelease
msbuild /m /v:n /p:Configuration=StaticRelease /p:Platform=Win32 %solution% >> %log%
IF errorlevel 1 GOTO error

CALL %environment% x86_amd64 > nul
ECHO Platform=x64

ECHO Configuration=StaticDebug
msbuild /m /v:n /p:Configuration=StaticDebug /p:Platform=x64 %solution% >> %log%
IF errorlevel 1 GOTO error
ECHO Configuration=StaticRelease
msbuild /m /v:n /p:Configuration=StaticRelease /p:Platform=x64 %solution% >> %log%
IF errorlevel 1 GOTO error

ECHO Complete: %solution%
GOTO end

:error
ECHO *** ERROR, build terminated early, see: %log%
GOTO end

:no_tools
ECHO *** ERROR, build tools not found: %tools%

:end

@ECHO OFF
REM Usage: [buildbase.bat ..\vs2013\mysolution.sln 12]

SET solution=%1
SET version=%2
SET log=build_%version%.log
SET tools=Microsoft Visual Studio %version%.0\VC\vcvarsall.bat
SET environment="%programfiles(x86)%\%tools%"
IF NOT EXIST %environment% SET environment="%programfiles%\%tools%"
IF NOT EXIST %environment% GOTO no_tools

ECHO Building: %solution%

CALL %environment% x86_amd64 > nul
ECHO Platform=x64

ECHO Configuration=StaticDebug
msbuild /m /v:n /p:Configuration=StaticDebug /p:Platform=x64 %solution% >> %log%
IF errorlevel 1 GOTO error
ECHO Configuration=StaticRelease
msbuild /m /v:n /p:Configuration=StaticRelease /p:Platform=x64 %solution% >> %log%
IF errorlevel 1 GOTO error

ECHO Complete: %solution%
GOTO end

:error
ECHO *** ERROR, build terminated early, see: %log%
GOTO end

:no_tools
ECHO *** ERROR, build tools not found: %tools%

:end

Change VS build script to x64 only.

Change VS build script to x64 only.


@echo off

nuget install -OutputDirectory packages
msbuild main.sln /p:Configuration=Release
rem It runs deploy.bat as the after-build step of solution building

Build script for checksystem

Build script for checksystem


@ECHO OFF

SET CONVEYOR_SYNC_FILE=conveyor.pid

IF EXIST %CONVEYOR_SYNC_FILE% DEL /F /Q %CONVEYOR_SYNC_FILE%

ECHO Starting conveyor backend from start.bat

virtualenv\Scripts\python.exe -m conveyor.service -c conveyor.conf

@ECHO OFF

SET CONVEYOR_SYNC_FILE=conveyor.pid

IF EXIST %CONVEYOR_SYNC_FILE% DEL /F /Q %CONVEYOR_SYNC_FILE%

ECHO Starting conveyor backend from start.bat

virtualenv\Scripts\python.exe -m conveyor.server -c conveyor.conf

Fix a stupid typo in start.bat.

Fix a stupid typo in start.bat.


MKDIR build\windows
CD build\windows

cmake ^
    -G "NMake Makefiles"                     ^
    -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX%  ^
    -DCMAKE_INSTALL_BINDIR=%LIBRARY_BIN%     ^
    -DCMAKE_INSTALL_LIBDIR=%LIBRARY_LIB%     ^
    -DCMAKE_INSTALL_INCLUDEDIR=%LIBRARY_INC% ^
    -DCMAKE_PREFIX_PATH=%LIBRARY_PREFIX%     ^
    -DCMAKE_BUILD_TYPE=Release               ^
    ..\..

cmake --build . --config Release

dir
dir libmetis
dir programs
dir include
dir Release
dir libmetis\Release
dir programs\Release
dir include\Release

copy libmetis\Release\metis.lib %LIBRARY_BIN%
copy programs\Release\cmpfillin.exe %LIBRARY_LIB%
copy programs\Release\gpmetis.exe %LIBRARY_LIB%
copy programs\Release\graphchk.exe %LIBRARY_LIB%
copy programs\Release\m2gmetis.exe %LIBRARY_LIB%
copy programs\Release\ndmetis.exe %LIBRARY_LIB%
copy programs\Release\mpmetis.exe %LIBRARY_LIB%

MKDIR build\windows
CD build\windows

cmake ^
    -G "NMake Makefiles"                     ^
    -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX%  ^
    -DCMAKE_INSTALL_BINDIR=%LIBRARY_BIN%     ^
    -DCMAKE_INSTALL_LIBDIR=%LIBRARY_LIB%     ^
    -DCMAKE_INSTALL_INCLUDEDIR=%LIBRARY_INC% ^
    -DCMAKE_PREFIX_PATH=%LIBRARY_PREFIX%     ^
    -DCMAKE_BUILD_TYPE=Release               ^
    ..\..

cmake --build . --config Release

dir
dir libmetis
dir programs
dir include
dir Release

copy libmetis\metis.lib %LIBRARY_BIN%
copy programs\cmpfillin.exe %LIBRARY_LIB%
copy programs\gpmetis.exe %LIBRARY_LIB%
copy programs\graphchk.exe %LIBRARY_LIB%
copy programs\m2gmetis.exe %LIBRARY_LIB%
copy programs\ndmetis.exe %LIBRARY_LIB%
copy programs\mpmetis.exe %LIBRARY_LIB%

correct locations of exe files

correct locations of exe files