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

@echo "Starting Windows build"

cd /d %~dp0
cd ..

@rem The image we're currently running has a broken version of Node.js enabled
@rem by nvm (v10.15.3), which has no npm bin. This hack uses the functional
@rem Node v8.9.1 to install npm@latest, it then uses this version of npm to
@rem install npm for v10.15.3.
call nvm use v8.9.1 || goto :error
call node C:\Users\kbuilder\AppData\Roaming\nvm-ps\versions\v8.9.1\node_modules\npm-bootstrap\bin\npm-cli.js i npm -g || goto :error
call nvm use v10.15.3 || goto :error
call node C:\Users\kbuilder\AppData\Roaming\nvm-ps\versions\v8.9.1\node_modules\npm\bin\npm-cli.js i npm -g || goto :error

call npm install || goto :error
call npm run test || goto :error

goto :EOF

:error
exit /b 1

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

@echo "Starting Windows build"

cd /d %~dp0
cd ..

@rem npm path is not currently set in our image, we should fix this next time
@rem we upgrade Node.js in the image:
SET PATH=%PATH%;/cygdrive/c/Program Files/nodejs/npm

call nvm use v12.14.1
call which node

call npm install || goto :error
call npm run test || goto :error

goto :EOF

:error
exit /b 1

build: update windows configuration to match new vm


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

@echo "Starting Windows build"

cd /d %~dp0
cd ..

call npm install -g npm@5 || goto :error

call npm install || goto :error
call npm run test || goto :error

goto :EOF

:error
exit /b 1

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

@echo "Starting Windows build"

cd /d %~dp0
cd ..

call npm install -g npm@latest || goto :error
call npm install || goto :error
call npm run test || goto :error

goto :EOF

:error
exit /b 1

use latest npm on Windows (#425)

chore: use latest npm on Windows (#425)


@echo off

echo Building dependencies...

if exist lib (rd lib /q /s)
md lib
cd lib
md Debug
md Release
cd ../
REM ######################################################################################################
echo Building protobuf...

if exist protobuf (rd protobuf /q /s)
git clone -b 2.7.0 https://github.com/google/protobuf.git

cd protobuf/cmake
md build
cd build
cmake -G "Visual Studio 14 Win64" -Dprotobuf_BUILD_SHARED_LIBS=ON -Dprotobuf_BUILD_TESTS=OFF ..
"%VS140COMNTOOLS%..\IDE\Devenv" protobuf.sln /build "Debug|x64"
"%VS140COMNTOOLS%..\IDE\Devenv" protobuf.sln /build "Release|x64"
copy Debug\*.dll ..\..\..\lib\Debug /Y
copy Debug\*.lib ..\..\..\lib\Debug /Y
copy Release\*.dll ..\..\..\lib\Release /Y
copy Release\*.lib ..\..\..\lib\Release /Y

copy Release\libprotobuf.dll ..\..\..\..\Frame\SDK\Proto\proto-gen /Y
copy Release\libprotoc.dll ..\..\..\..\Frame\SDK\Proto\proto-gen /Y
copy Release\protoc.exe ..\..\..\..\Frame\SDK\Proto\proto-gen /Y

cd ..\..\..\
REM ######################################################################################################
echo Building libevent...

if exist libevent (rd libevent /q /s)
git clone -b master https://github.com/libevent/libevent.git

cd libevent
md build
cd build
cmake -G "Visual Studio 14 Win64" -DEVENT__DISABLE_OPENSSL=ON ..
"%VS140COMNTOOLS%..\IDE\Devenv" libevent.sln /build "Debug|x64" /project event_core_static.vcxproj
"%VS140COMNTOOLS%..\IDE\Devenv" libevent.sln /build "Release|x64" /project event_core_static.vcxproj
"%VS140COMNTOOLS%..\IDE\Devenv" libevent.sln /build "Debug|x64" /project event_static.vcxproj
"%VS140COMNTOOLS%..\IDE\Devenv" libevent.sln /build "Release|x64" /project event_static.vcxproj
"%VS140COMNTOOLS%..\IDE\Devenv" libevent.sln /build "Debug|x64" /project event_extra_static.vcxproj
"%VS140COMNTOOLS%..\IDE\Devenv" libevent.sln /build "Release|x64" /project event_extra_static.vcxproj
copy lib\Debug\*.lib ..\..\lib\Debug /Y
copy lib\Release\*.lib ..\..\lib\Release /Y
cd ..\..\
REM ######################################################################################################
echo Building glog...
if exist glog (rd glog /q /s)
git clone -b v035 https://github.com/google/glog.git

cd glog
md build
cd build
cmake -G "Visual Studio 14 Win64" ..
"%VS140COMNTOOLS%..\IDE\Devenv" google-glog.sln /build "Debug|x64"
"%VS140COMNTOOLS%..\IDE\Devenv" google-glog.sln /build "Release|x64"
copy Debug\*.lib ..\..\lib\Debug /Y
copy Release\*.lib ..\..\lib\Release /Y
cd ..\..\
REM ######################################################################################################
echo Building evpp...
if exist evpp (rd evpp /q /s)
git clone -b master https://github.com/ArkGame/evpp.git

cd evpp
cd vsprojects
"%VS140COMNTOOLS%..\IDE\Devenv" libevpp.sln /build "Debug|x64" /project libevpp.vcxproj
"%VS140COMNTOOLS%..\IDE\Devenv" libevpp.sln /build "Release|x64" /project libevpp.vcxproj
copy x64\Debug\*.lib ..\..\lib\Debug /Y
copy x64\Release\*.lib ..\..\lib\Release /Y

cd ..\..\
REM ####################################################################################################
REM back to root dir
cd ../

@echo off

echo Building dependencies...

if exist lib (rd lib /q /s)
md lib
cd lib
md Debug
md Release
cd ../
REM ######################################################################################################
echo Building protobuf...

if exist protobuf (rd protobuf /q /s)
git clone -b 2.7.0 https://github.com/google/protobuf.git

cd protobuf/cmake
md build
cd build
cmake -G "Visual Studio 14 Win64" -Dprotobuf_BUILD_SHARED_LIBS=ON -Dprotobuf_BUILD_TESTS=OFF ..
"%VS140COMNTOOLS%..\IDE\Devenv" protobuf.sln /build "Debug|x64"
"%VS140COMNTOOLS%..\IDE\Devenv" protobuf.sln /build "Release|x64"
copy Debug\*.dll ..\..\..\lib\Debug /Y
copy Debug\*.lib ..\..\..\lib\Debug /Y
copy Release\*.dll ..\..\..\lib\Release /Y
copy Release\*.lib ..\..\..\lib\Release /Y

copy Release\libprotobuf.dll ..\..\..\..\Frame\SDK\Proto\proto-gen /Y
copy Release\libprotoc.dll ..\..\..\..\Frame\SDK\Proto\proto-gen /Y
copy Release\protoc.exe ..\..\..\..\Frame\SDK\Proto\proto-gen /Y

cd ..\..\..\
REM ######################################################################################################
echo Building libevent...

if exist libevent (rd libevent /q /s)
git clone -b master https://github.com/libevent/libevent.git

cd libevent
md build
cd build
cmake -G "Visual Studio 14 Win64" -DEVENT__DISABLE_OPENSSL=ON ..
"%VS140COMNTOOLS%..\IDE\Devenv" libevent.sln /build "Debug|x64" /project event_core_static.vcxproj
"%VS140COMNTOOLS%..\IDE\Devenv" libevent.sln /build "Release|x64" /project event_core_static.vcxproj
"%VS140COMNTOOLS%..\IDE\Devenv" libevent.sln /build "Debug|x64" /project event_static.vcxproj
"%VS140COMNTOOLS%..\IDE\Devenv" libevent.sln /build "Release|x64" /project event_static.vcxproj
"%VS140COMNTOOLS%..\IDE\Devenv" libevent.sln /build "Debug|x64" /project event_extra_static.vcxproj
"%VS140COMNTOOLS%..\IDE\Devenv" libevent.sln /build "Release|x64" /project event_extra_static.vcxproj
copy lib\Debug\*.lib ..\..\lib\Debug /Y
copy lib\Release\*.lib ..\..\lib\Release /Y
cd ..\..\
REM ######################################################################################################
echo Building glog...
if exist glog (rd glog /q /s)
git clone -b v035 https://github.com/google/glog.git

cd glog
md build
cd build
cmake -G "Visual Studio 14 Win64" ..
"%VS140COMNTOOLS%..\IDE\Devenv" google-glog.sln /build "Debug|x64"
"%VS140COMNTOOLS%..\IDE\Devenv" google-glog.sln /build "Release|x64"
copy Debug\*.lib ..\..\lib\Debug /Y
copy Release\*.lib ..\..\lib\Release /Y
cd ..\..\
REM ######################################################################################################
echo Building evpp...
if exist evpp (rd evpp /q /s)
git clone -b master https://github.com/ArkGame/evpp.git

cd evpp
md build
cd build
cmake -G "Visual Studio 14 Win64" ..
"%VS140COMNTOOLS%..\IDE\Devenv" safe-evpp.sln /build "Debug|x64" /project evpp/evpp_static.vcxproj
"%VS140COMNTOOLS%..\IDE\Devenv" safe-evpp.sln /build "Release|x64" /project evpp/evpp_static.vcxproj
copy lib\Debug\*.lib ..\..\lib\Debug /Y
copy lib\Release\*.lib ..\..\lib\Release /Y

cd ..\..\
REM ####################################################################################################
REM back to root dir
cd ..\

use self-define CMakeLists.txt for evpp

use self-define CMakeLists.txt for evpp

Former-commit-id: cd4ae829ae322a725d24ebba65d617fd374d2384
Former-commit-id: 125a96d8b1cd4252a266a34ec6981c71f304f752


if  exist yc (
    rd /s /q yc )

mkdir yc

xcopy /Y ..\YaccConstructor\YaccConstructor\bin\Release\*.dll yc
xcopy /Y ..\YaccConstructor\YaccConstructor\bin\Release\*.exe yc
xcopy /Y ..\YaccConstructor\CYK\bin\Release\*.exe yc
xcopy /Y ..\YaccConstructor\GLLGenerator\bin\Release\*.dll yc
xcopy /Y ..\YaccConstructor\CYK\bin\Release\*.dll yc
xcopy /Y ..\YaccConstructor\RNGLRCommon\bin\Release\*.dll yc
xcopy /Y ..\YaccConstructor\RNGLRParser\bin\Release\*.dll yc
xcopy /Y ..\YaccConstructor\RNGLRGenerator\bin\Release\*.dll yc
xcopy /Y ..\YaccConstructor\Constraints\bin\Release\*.dll yc
xcopy /Y ..\YaccConstructor\Utils.SourceText\bin\Release\*.dll yc
xcopy /Y ..\YaccConstructor\FsYard\bin\Release\*.exe yc
xcopy /Y ..\YaccConstructor\FsYard\bin\Release\*.targets yc

if  exist yc (
    rd /s /q yc )

mkdir yc

xcopy /Y ..\Bin\Release\v45\*.dll yc
xcopy /Y ..\Bin\Release\v45\*.exe yc
xcopy /Y ..\Bin\Release\v45\*.targets yc

Copy true binaries.

Copy true binaries.


@ECHO OFF
SETLOCAL ENABLEDELAYEDEXPANSION

ECHO.
IF "%1"=="" (
	ECHO SUMMARY
	ECHO 	Deletes the specified IP from the ARP table, then pings the IP to
	ECHO 	extablish the correct Physical Address.
	ECHO 	The script will then continually monitor the specified IP's entry in
	ECHO 	the ARP table. If the IP's ARP table ever changes or is removed, the
	ECHO 	script will BEEP and set the Physical Address back to the correct value.
	ECHO AUTHOR
	ECHO 	Alan Reed
	ECHO 	Please contact the author with any questions, comments, or concers
	ECHO 	at al.reed13@gmail.com
	ECHO LICENSE
	ECHO 	Copyright 2012. This script is free to use, modify, and redistribute
	ECHO 	so long as you give credit to the original author.
	ECHO SYNTAX
	ECHO 	"defendARP.bat <IPAddr to monitor>"
	ECHO DESCRIPTION
	ECHO 	^<IPAddr to monitor^> should NOT be your own IPAddr. Use the IPAddr
	ECHO 	of a different device on you LAN that you are communicating with. Try
	ECHO 	the IPAddr of your network gateway.
	ECHO.
	GOTO ERROR
)

 :: Check if $1 is Local hosts IP
FOR /F "tokens=2" %%i in ('ARP -A ^| FINDSTR \-\-\-') do (
	SET ipaddr=%%i

)
IF "%1"=="%%i" (
	ECHO Cannot protect your own IP Address -- Try using the Default Gateway or router's IP Address.
	GOTO ERROR
)

ECHO INITIALIZING...
ECHO.
ECHO Removing %1 from ARP table.
 :: Remove %1 from arp table
ARP -d %1
ECHO OK.

 :: Ping the IP to establish it's correct MAC address.
 :: Note that ARP could still be poisoned if attcker sends poison packet while we are pinging.
ECHO Obtaining MAC address.
PING -n 1 %1 >nul
IF ERRORLEVEL 1 (
	ECHO Bad IP Address.
	GOTO ERROR
)

 :: Find the specified IP in the ARP Table
SET PhysAddr=""
SET tmp=""
FOR /F "tokens=*" %%a in ('ARP -a ^| findstr "%1"') do (
	SET tmp=%%a
 	:: We do this little trick with the question marks to avoid return the wrong line from the ARP table.
	SET tmp=!tmp: =?!
	FOR /F "tokens=*" %%b in ('ECHO !tmp! ^| findstr %1?') do (
		SET PhysAddr=%%b
	)
)
 :: Check that the specified IP was found in the ARP table
IF %PhysAddr%=="" (
	ECHO Host Not Found.
	GOTO ERROR
)
 :: Extract the actualy Physical Address
SET PhysAddr=%PhysAddr:~15,-11%
SET PhysAddr=%PhysAddr:?=%
ECHO OK.

:QUESTION
SET /p  a=Is %PhysAddr% the correct MAC for %1 (y/n)?
IF "%a%"=="n" (
	ECHO.
	ECHO If this is not the correct MAC then you have already been poinsoned.
	ECHO You must start this script in a 'safe' state.
	arp -d %1
	GOTO DONE
) else IF "%a%"=="y" (
	ECHO OK.
	ECHO.
	ECHO Monitoring your ARP table...
	ECHO.
	SET GoodMAC=%PhysAddr%
	GOTO LOOP
) else ( GOTO QUESTION )

:LOOP
	 :: Find the specified IP in the ARP Table
	SET PhysAddr=""
	SET tmp=""
	FOR /F "tokens=*" %%a in ('ARP -a ^| FINDSTR "%1"') do (
		SET tmp=%%a
		SET tmp=!tmp: =?!
		FOR /F "tokens=*" %%b in ('ECHO !tmp! ^| findstr %1?') do (
			SET PhysAddr=%%b
		)
	)
	IF %PhysAddr%=="" (
		ECHO %1 not found. Reestablishing connection...
		ping -n 1 %1 | findstr TTL >nul
		IF ERRORLEVEL 1 (
			ECHO Lost Connection to %1
			GOTO ERROR
		)
		ECHO OK.
		GOTO LOOP
	)
	 :: Extract the Physical Address
	SET PhysAddr=%PhysAddr:~15,-11%
	SET PhysAddr=%PhysAddr:?=%

	 :: check that the MAC did not change
	IF NOT "%GoodMAC%"=="%PhysAddr%" (
		ECHO.
		 :: BEEP - echo <ctrl+g> to a .txt, then copy the result onto the line below
		ECHO
		ECHO ARP POISONED!
		ECHO Spoofed IP: %1
		ECHO %1's actual Physical Address: %GoodMAC%
		ECHO Attcker's Physical Address: %PhysAddr%
		ECHO Attempting to reset the correct Physical Address...
		 :: Attempt to reset ARP table. This will not work if we are continually being poisoned.
		ARP -d %1
		PING -n 1 %1 >nul
		ECHO ARP Table reset.
		ECHO.
		ECHO Monitoring your ARP table...
	)
	 :: wait for 5 seconds
	ping -n 5 127.0.0.1 >nul
GOTO LOOP

GOTO DONE
:ERROR
ECHO.
:DONE

@ECHO OFF
SETLOCAL ENABLEDELAYEDEXPANSION

ECHO.
IF "%1"=="" (
	ECHO SUMMARY
	ECHO 	Deletes the specified IP from the ARP table, then pings the IP to
	ECHO 	extablish the correct Physical Address.
	ECHO 	The script will then continually monitor the specified IP's entry in
	ECHO 	the ARP table. If the IP's ARP table ever changes or is removed, the
	ECHO 	script will BEEP and set the Physical Address back to the correct value.
	ECHO AUTHOR
	ECHO 	Alan Reed
	ECHO 	Please contact the author with any questions, comments, or concers
	ECHO 	at al.reed13@gmail.com
	ECHO LICENSE
	ECHO 	Copyright 2012. This script is free to use, modify, and redistribute
	ECHO 	so long as you give credit to the original author.
	ECHO SYNTAX
	ECHO 	"defendARP.bat <IPAddr to monitor>"
	ECHO DESCRIPTION
	ECHO 	^<IPAddr to monitor^> should NOT be your own IPAddr. Use the IPAddr
	ECHO 	of a different device on you LAN that you are communicating with. Try
	ECHO 	the IPAddr of your network gateway.
	ECHO.
	GOTO ERROR
)

 :: Check if $1 is Local hosts IP
FOR /F "tokens=2" %%i in ('ARP -A ^| FINDSTR \-\-\-') do (

	IF "%1"=="%%i" (
		ECHO Cannot protect your own IP Address -- Try using the Default Gateway or router's IP Address.
		GOTO ERROR
	)
)

ECHO INITIALIZING...
ECHO.
ECHO Removing %1 from ARP table.
 :: Remove %1 from arp table
ARP -d %1
ECHO OK.

 :: Ping the IP to establish it's correct MAC address.
 :: Note that ARP could still be poisoned if attcker sends poison packet while we are pinging.
ECHO Obtaining MAC address.
PING -n 1 %1 >nul
IF ERRORLEVEL 1 (
	ECHO Bad IP Address.
	GOTO ERROR
)

 :: Find the specified IP in the ARP Table
SET PhysAddr=""
SET tmp=""
FOR /F "tokens=*" %%a in ('ARP -a ^| findstr "%1"') do (
	SET tmp=%%a
 	:: We do this little trick with the question marks to avoid return the wrong line from the ARP table.
	SET tmp=!tmp: =?!
	FOR /F "tokens=*" %%b in ('ECHO !tmp! ^| findstr %1?') do (
		SET PhysAddr=%%b
	)
)
 :: Check that the specified IP was found in the ARP table
IF %PhysAddr%=="" (
	ECHO Host Not Found.
	GOTO ERROR
)
 :: Extract the actualy Physical Address
SET PhysAddr=%PhysAddr:~15,-11%
SET PhysAddr=%PhysAddr:?=%
ECHO OK.

:QUESTION
SET /p  a=Is %PhysAddr% the correct MAC for %1 (y/n)?
IF "%a%"=="n" (
	ECHO.
	ECHO If this is not the correct MAC then you have already been poinsoned.
	ECHO You must start this script in a 'safe' state.
	arp -d %1
	GOTO DONE
) else IF "%a%"=="y" (
	ECHO OK.
	ECHO.
	ECHO Monitoring your ARP table...
	ECHO.
	SET GoodMAC=%PhysAddr%
	GOTO LOOP
) else ( GOTO QUESTION )

:LOOP
	 :: Find the specified IP in the ARP Table
	SET PhysAddr=""
	SET tmp=""
	FOR /F "tokens=*" %%a in ('ARP -a ^| FINDSTR "%1"') do (
		SET tmp=%%a
		SET tmp=!tmp: =?!
		FOR /F "tokens=*" %%b in ('ECHO !tmp! ^| findstr %1?') do (
			SET PhysAddr=%%b
		)
	)
	IF %PhysAddr%=="" (
		ECHO %1 not found. Reestablishing connection...
		ping -n 1 %1 | findstr TTL >nul
		IF ERRORLEVEL 1 (
			ECHO Lost Connection to %1
			GOTO ERROR
		)
		ECHO OK.
		GOTO LOOP
	)
	 :: Extract the Physical Address
	SET PhysAddr=%PhysAddr:~15,-11%
	SET PhysAddr=%PhysAddr:?=%

	 :: check that the MAC did not change
	IF NOT "%GoodMAC%"=="%PhysAddr%" (
		ECHO.
		 :: BEEP - echo <ctrl+g> to a .txt, then copy the result onto the line below
		ECHO
		ECHO ARP POISONED!
		ECHO Spoofed IP: %1
		ECHO %1's actual Physical Address: %GoodMAC%
		ECHO Attcker's Physical Address: %PhysAddr%
		ECHO Attempting to reset the correct Physical Address...
		 :: Attempt to reset ARP table. This will not work if we are continually being poisoned.
		ARP -d %1
		PING -n 1 %1 >nul
		ECHO ARP Table reset.
		ECHO.
		ECHO Monitoring your ARP table...
	)
	 :: wait for 5 seconds
	ping -n 5 127.0.0.1 >nul
GOTO LOOP

GOTO DONE
:ERROR
ECHO.
:DONE

fix error check to ensure user does not try to defend their own IP address


@echo off

:: This script will create a packaged version of the app in firmware_flasher in your home folder.
:: After executing this script, use NSIS to create an installer from the firmware_flasher.win32.nsi file located there.
:: You may need to run npm install electron-packager --global once before this will work correctly.

set PLATFORM=win32
set ARCH=ia32
set OUTPUT_DIR=%userprofile%\firmware_flasher
set PACKAGE_DIR="%OUTPUT_DIR%\QMK Firmware Flasher-%PLATFORM%-%ARCH%"

call npm install

call node package.js

:: call electron-packager . --platform=%PLATFORM% --arch=%ARCH% --out %OUTPUT_DIR% --overwrite --asar.unpackDir dfu'

copy installer.wxs %PACKAGE_DIR%

copy build\windows.ico %PACKAGE_DIR%

cd %PACKAGE_DIR%

call candle installer.wxs

if errorlevel 0 call light installer.wixobj

cd %~dp0

@echo off

:: This script will create a packaged version of the app in firmware_flasher in your home folder.
:: After executing this script, use NSIS to create an installer from the firmware_flasher.win32.nsi file located there.
:: You may need to run npm install electron-packager --global once before this will work correctly.

set PLATFORM=win32
set ARCH=ia32
set OUTPUT_DIR=%userprofile%\firmware_flasher
set PACKAGE_DIR="%OUTPUT_DIR%\QMK Firmware Flasher-%PLATFORM%-%ARCH%"

call npm install

call node package.js

:: call electron-packager . --platform=%PLATFORM% --arch=%ARCH% --out %OUTPUT_DIR% --overwrite --asar.unpackDir dfu'

copy QMK_Firmware_Flasher_32-bit.wxs %PACKAGE_DIR%
copy QMK_Firmware_Flasher_64-bit.wxs %PACKAGE_DIR%

copy build\windows.ico %PACKAGE_DIR%

cd %PACKAGE_DIR%

call candle QMK_Firmware_Flasher_32-bit.wxs

if errorlevel 0 call light QMK_Firmware_Flasher_32-bit.wixobj

call candle QMK_Firmware_Flasher_64-bit.wxs

if errorlevel 0 call light QMK_Firmware_Flasher_64-bit.wixobj

cd %~dp0

update dist-win32.bat

update dist-win32.bat


@echo on

mkdir build
cd build
cmake .. -G"MinGW Makefiles" -DCMAKE_CXX_COMPILER=g++.exe -DCMAKE_BUILD_TYPE=Release %CMAKE_OPT% -DCMAKE_CXX_FLAGS="%CFLAGS%" -DCMAKE_EXE_LINKER_FLAGS="%LFLAGS%"
if %ERRORLEVEL% neq 0 exit /B %ERRORLEVEL%
mingw32-make -j %THREADS%
if %ERRORLEVEL% neq 0 exit /B %ERRORLEVEL%

mkdir %NAME%
mkdir %NAME%\bin\
mkdir %NAME%\lib\
mkdir %NAME%\include\
mkdir %NAME%\include\aff3ct\

 copy bin\aff3ct*.exe  %NAME%\bin\aff3ct.exe
 copy lib\libaff3ct*.a %NAME%\lib\aff3ct.lib
xcopy ..\src\*         %NAME%\include\aff3ct\ /s /e > nul

move %NAME% ..\

@echo on

mkdir build
cd build
cmake .. -G"MinGW Makefiles" -DCMAKE_CXX_COMPILER=g++.exe -DCMAKE_BUILD_TYPE=Release %CMAKE_OPT% -DCMAKE_CXX_FLAGS="%CFLAGS%" -DCMAKE_EXE_LINKER_FLAGS="%LFLAGS%"
if %ERRORLEVEL% neq 0 exit /B %ERRORLEVEL%
mingw32-make -j %THREADS%
if %ERRORLEVEL% neq 0 exit /B %ERRORLEVEL%

mkdir %NAME%
mkdir %NAME%\bin\
mkdir %NAME%\lib\
mkdir %NAME%\include\
mkdir %NAME%\include\aff3ct\

 copy bin\aff3ct*.exe  %NAME%\bin\
 copy lib\libaff3ct*.a %NAME%\lib\
xcopy ..\src\*         %NAME%\include\aff3ct\ /s /e > nul

move %NAME% ..\

CI: fix binary and lib names for the Windows builds.


@echo off
cls
REM ..\luajit-2.0\src\luajit.exe -jv tests.lua > output.txt

REM ..\luajit-2.0\src\luajit.exe -joff -jv -jp=a correctness_tests.lua > output.txt
..\luajit-2.0\src\luajit.exe -jp=a correctness_tests.lua > output.txt
REM ..\luajit-2.0\src\luajit.exe -jv correctness_tests.lua > output.txt

@echo off
pushd %~dp0\..
cls
set LUA=..\luas\luajit\luajit.exe

%LUA% -jv tests\basic_tests.lua > tests\output.txt

%LUA% -jv tests\correctness_tests.lua >> tests\output.txt 2>&1
REM %LUA% -joff -jv -jp=a correctness_tests.lua >> tests\output.txt 2>&1
REM %LUA% -jp=a correctness_tests.lua >> tests\output.txt 2>&1

popd

rewrite so tests work in new directory

rewrite so tests work in new directory


@rem enter repo root
cd /d %~dp0\..\..\..\..

cd csharp

@rem see what dotnet version is available
dotnet --version

@rem TODO(jtattermusch): Kokoro workers currently only have dotnet SDK 2.1.3
@rem so we just overwrite the SDK requirement in global.json as the results
@rem should be fully compatible.
echo { "sdk": { "version": "2.1.3" } } >global.json

call build_packages.bat

@rem enter repo root
cd /d %~dp0\..\..\..\..

cd csharp
call build_packages.bat

Revert "overcome the global.json constraint with a hack"

This reverts commit c02346c72aafd1826b0397dbbce4ce04bf252f50.


cd src/python_pybind11
rmdir /s /q build
mkdir build
cd build

cmake -G "Ninja" ^
    -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^
    -DCMAKE_BUILD_TYPE=Release ^
    -DBUILD_SHARED_LIBS:BOOL=ON ^
    -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=ON ^
    -DUSE_SYSTEM_PATHS_FOR_PYTHON_INSTALLATION:BOOL=ON ^
    -DPython3_EXECUTABLE:PATH=%PYTHON% ^
    -DPYTHON_EXECUTABLE:PATH=%PYTHON% ^
    ..
if errorlevel 1 exit 1

:: Build.
cmake --build . --config Release
if errorlevel 1 exit 1

:: Install.
cmake --build . --config Release --target install
if errorlevel 1 exit 1

Create bld_py.bat

Create bld_py.bat


setlocal

rem Maven based build doesn't currently work on Linux
CALL mvn clean
CALL mvn process-resources
CALL mvn package -DskipTests

CD %SRC_DIR%\packaging\target\
tar -xvf openrefine-win-%PKG_VERSION%.zip
if errorlevel 1 exit 1

ROBOCOPY openrefine-%PKG_VERSION% %LIBRARY_PREFIX%\opt\openrefine /E
ECHO CD %LIBRARY_PREFIX%\opt\openrefine\ > %LIBRARY_PREFIX%\bin\refine.bat
ECHO CALL refine.bat %%* >> %LIBRARY_PREFIX%\bin\refine.bat
if errorlevel 1 exit 1

setlocal

rem Maven based build doesn't currently work on Linux
CALL mvn clean
CALL mvn process-resources
CALL mvn package -DskipTests

CD %SRC_DIR%\packaging\target\
7z e openrefine-win-%PKG_VERSION%.zip
if errorlevel 1 exit 1

ROBOCOPY openrefine-%PKG_VERSION% %LIBRARY_PREFIX%\opt\openrefine /E
ECHO CD %LIBRARY_PREFIX%\opt\openrefine\ > %LIBRARY_PREFIX%\bin\refine.bat
ECHO CALL refine.bat %%* >> %LIBRARY_PREFIX%\bin\refine.bat
if errorlevel 1 exit 1

use 7z

use 7z


@echo OFF
@setlocal

set VERSION=1.24.0
set TFDIR=C:\TreeFrog\%VERSION%
set LZ4_VERSION=1.8.3

:parse_loop
if "%1" == "" goto :start
if /i "%1" == "--prefix" goto :prefix
if /i "%1" == "--enable-debug" goto :enable_debug
if /i "%1" == "--enable-gui-mod" goto :enable_gui_mod
if /i "%1" == "--help" goto :help
if /i "%1" == "-h" goto :help
goto :help
:continue
shift
goto :parse_loop

:help
  echo Usage: %0 [OPTION]... [VAR=VALUE]...
  echo;
  echo Configuration:
  echo   -h, --help          display this help and exit
  echo   --enable-debug      compile with debugging information
  echo   --enable-gui-mod    compile and link with QtGui module
  echo;
  echo Installation directories:
  echo   --prefix=PREFIX     install files in PREFIX [%TFDIR%]
  goto :exit

:prefix
  shift
  if "%1" == "" goto :help
  set TFDIR=%1
  goto :continue

:enable_debug
  set DEBUG=yes
  goto :continue

:enable_gui_mod
  set USE_GUI=use_gui=1
  goto :continue

:start
if "%DEBUG%" == "yes" (
  set OPT="CONFIG+=debug"
) else (
  set OPT="CONFIG+=release"
)

::
:: Generates tfenv.bat
::
for %%I in (qmake.exe) do if exist %%~$path:I set QMAKE=%%~$path:I
for %%I in (cl.exe) do if exist %%~$path:I set MSCOMPILER=%%~$path:I
for %%I in (g++.exe) do if exist %%~$path:I set GNUCOMPILER=%%~$path:I

if "%QMAKE%" == "" (
  echo Qt environment not found
  exit /b
)
if "%MSCOMPILER%" == "" if "%GNUCOMPILER%"  == "" (
  echo compiler not found
  exit /b
)

:: vcvarsall.bat setup
if not "%MSCOMPILER%" == "" (
  set MAKE=nmake
  if "%Platform%" == "X64" (
    set VCVARSOPT=amd64
    set ENVSTR=Environment to build for 64-bit executable  MSVC / Qt
  ) else if "%Platform%" == "x64" (
    set VCVARSOPT=amd64
    set ENVSTR=Environment to build for 64-bit executable  MSVC / Qt
  ) else (
    set VCVARSOPT=x86
    set ENVSTR=Environment to build for 32-bit executable  MSVC / Qt
  )
) else (
  set MAKE=mingw32-make -j%NUMBER_OF_PROCESSORS%
  set ENVSTR=Environment to build for 32-bit executable  MinGW / Qt
)
SET /P X="%ENVSTR%"<NUL
qtpaths.exe --qt-version

for %%I in (qtenv2.bat) do if exist %%~$path:I set QTENV=%%~$path:I
set TFENV=tfenv.bat
echo @echo OFF> %TFENV%
echo ::>> %TFENV%
echo :: This file is generated by configure.bat>> %TFENV%
echo ::>> %TFENV%
echo;>> %TFENV%
echo set TFDIR=%TFDIR%>> %TFENV%
echo set TreeFrog_DIR=%TFDIR%>> %TFENV%
echo set QTENV="%QTENV%">> %TFENV%
echo set QMAKESPEC=%QMAKESPEC%>> %TFENV%
echo if exist %%QTENV%% ( call %%QTENV%% )>> %TFENV%
if not "%VCVARSOPT%" == "" (
  echo if not "%%VS140COMNTOOLS%%" == "" ^(>> %TFENV%
  echo   set VCVARSBAT="%%VS140COMNTOOLS%%..\..\VC\vcvarsall.bat">> %TFENV%
  echo ^) else if not "%%VS120COMNTOOLS%%" == "" ^(>> %TFENV%
  echo   set VCVARSBAT="%%VS120COMNTOOLS%%..\..\VC\vcvarsall.bat">> %TFENV%
  echo ^) else ^(>> %TFENV%
  echo   set VCVARSBAT="">> %TFENV%
  echo ^)>> %TFENV%
  echo if exist %%VCVARSBAT%% ^(>> %TFENV%
  echo   echo Setting up environment for MSVC usage...>> %TFENV%
  echo   call %%VCVARSBAT%% %VCVARSOPT%>> %TFENV%
  echo ^)>> %TFENV%
)
echo set PATH=%%TFDIR^%%\bin;%%PATH%%>> %TFENV%
echo echo Setup a TreeFrog/Qt environment.>> %TFENV%
echo echo -- TFDIR set to %%TFDIR%%>> %TFENV%
echo cd /D %%HOMEDRIVE%%%%HOMEPATH%%>> %TFENV%

set TFDIR=%TFDIR:\=/%
del 3rdparty\mongo-c-driver\.qmake.stash src\.qmake.stash tools\.qmake.stash >nul 2>&1
:: Builds MongoDB driver
echo Compiling MongoDB driver library ...
cd 3rdparty\mongo-c-driver
if exist Makefile ( %MAKE% -k distclean >nul 2>&1 )

qmake -r %OPT%
%MAKE% >nul 2>&1
if ERRORLEVEL 1 (
  echo Compile failed.
  echo MongoDB driver not available.
  exit /b
)

:: Builds LZ4
cd ..
rd /s /q lz4 >nul 2>&1
del /f /q lz4 >nul 2>&1
mklink /d lz4 lz4-%LZ4_VERSION% >nul 2>&1
if not "%MSCOMPILER%" == "" (
  devenv lz4\visual\VS2017\lz4.sln /project liblz4 /rebuild "Release|x64"
) else (
  cd lz4\lib
  qmake
  %MAKE%
  cd ..\..
)
cd ..

cd src
if exist Makefile ( %MAKE% -k distclean >nul 2>&1 )
qmake %OPT% target.path='%TFDIR%/bin' header.path='%TFDIR%/include' %USE_GUI%
cd ..
cd tools
if exist Makefile ( %MAKE% -k distclean >nul 2>&1 )
qmake -recursive %OPT% target.path='%TFDIR%/bin' header.path='%TFDIR%/include' datadir='%TFDIR%'
%MAKE% qmake
cd ..

echo;
echo First, run "%MAKE% install" in src directory.
echo Next, run "%MAKE% install" in tools directory.

:exit
exit /b

@echo OFF
@setlocal

set VERSION=1.24.0
set TFDIR=C:\TreeFrog\%VERSION%
set LZ4_VERSION=1.8.3

:parse_loop
if "%1" == "" goto :start
if /i "%1" == "--prefix" goto :prefix
if /i "%1" == "--enable-debug" goto :enable_debug
if /i "%1" == "--enable-gui-mod" goto :enable_gui_mod
if /i "%1" == "--help" goto :help
if /i "%1" == "-h" goto :help
goto :help
:continue
shift
goto :parse_loop

:help
  echo Usage: %0 [OPTION]... [VAR=VALUE]...
  echo;
  echo Configuration:
  echo   -h, --help          display this help and exit
  echo   --enable-debug      compile with debugging information
  echo   --enable-gui-mod    compile and link with QtGui module
  echo;
  echo Installation directories:
  echo   --prefix=PREFIX     install files in PREFIX [%TFDIR%]
  goto :exit

:prefix
  shift
  if "%1" == "" goto :help
  set TFDIR=%1
  goto :continue

:enable_debug
  set DEBUG=yes
  goto :continue

:enable_gui_mod
  set USE_GUI=use_gui=1
  goto :continue

:start
if "%DEBUG%" == "yes" (
  set OPT="CONFIG+=debug"
) else (
  set OPT="CONFIG+=release"
)

::
:: Generates tfenv.bat
::
for %%I in (qmake.exe) do if exist %%~$path:I set QMAKE=%%~$path:I
for %%I in (cl.exe) do if exist %%~$path:I set MSCOMPILER=%%~$path:I
for %%I in (g++.exe) do if exist %%~$path:I set GNUCOMPILER=%%~$path:I

if "%QMAKE%" == "" (
  echo Qt environment not found
  exit /b
)
if "%MSCOMPILER%" == "" if "%GNUCOMPILER%"  == "" (
  echo compiler not found
  exit /b
)

:: vcvarsall.bat setup
if not "%MSCOMPILER%" == "" (
  set MAKE=nmake
  if "%Platform%" == "X64" (
    set VCVARSOPT=amd64
    set ENVSTR=Environment to build for 64-bit executable  MSVC / Qt
  ) else if "%Platform%" == "x64" (
    set VCVARSOPT=amd64
    set ENVSTR=Environment to build for 64-bit executable  MSVC / Qt
  ) else (
    set VCVARSOPT=x86
    set ENVSTR=Environment to build for 32-bit executable  MSVC / Qt
  )
) else (
  set MAKE=mingw32-make -j%NUMBER_OF_PROCESSORS%
  set ENVSTR=Environment to build for 32-bit executable  MinGW / Qt
)
SET /P X="%ENVSTR%"<NUL
qtpaths.exe --qt-version

for %%I in (qtenv2.bat) do if exist %%~$path:I set QTENV=%%~$path:I
set TFENV=tfenv.bat
echo @echo OFF> %TFENV%
echo ::>> %TFENV%
echo :: This file is generated by configure.bat>> %TFENV%
echo ::>> %TFENV%
echo;>> %TFENV%
echo set TFDIR=%TFDIR%>> %TFENV%
echo set TreeFrog_DIR=%TFDIR%>> %TFENV%
echo set QTENV="%QTENV%">> %TFENV%
echo set QMAKESPEC=%QMAKESPEC%>> %TFENV%
echo if exist %%QTENV%% ( call %%QTENV%% )>> %TFENV%
if not "%VCVARSOPT%" == "" (
  echo if not "%%VS140COMNTOOLS%%" == "" ^(>> %TFENV%
  echo   set VCVARSBAT="%%VS140COMNTOOLS%%..\..\VC\vcvarsall.bat">> %TFENV%
  echo ^) else if not "%%VS120COMNTOOLS%%" == "" ^(>> %TFENV%
  echo   set VCVARSBAT="%%VS120COMNTOOLS%%..\..\VC\vcvarsall.bat">> %TFENV%
  echo ^) else ^(>> %TFENV%
  echo   set VCVARSBAT="">> %TFENV%
  echo ^)>> %TFENV%
  echo if exist %%VCVARSBAT%% ^(>> %TFENV%
  echo   echo Setting up environment for MSVC usage...>> %TFENV%
  echo   call %%VCVARSBAT%% %VCVARSOPT%>> %TFENV%
  echo ^)>> %TFENV%
)
echo set PATH=%%TFDIR^%%\bin;%%PATH%%>> %TFENV%
echo echo Setup a TreeFrog/Qt environment.>> %TFENV%
echo echo -- TFDIR set to %%TFDIR%%>> %TFENV%
echo cd /D %%HOMEDRIVE%%%%HOMEPATH%%>> %TFENV%

set TFDIR=%TFDIR:\=/%
del 3rdparty\mongo-c-driver\.qmake.stash src\.qmake.stash tools\.qmake.stash >nul 2>&1
:: Builds MongoDB driver
echo Compiling MongoDB driver library ...
cd 3rdparty\mongo-c-driver
if exist Makefile ( %MAKE% -k distclean >nul 2>&1 )

qmake -r %OPT%
%MAKE% >nul 2>&1
if ERRORLEVEL 1 (
  echo Compile failed.
  echo MongoDB driver not available.
  exit /b
)

:: Builds LZ4
cd ..
rd /s /q lz4 >nul 2>&1
del /f /q lz4 >nul 2>&1
mklink /d lz4 lz4-%LZ4_VERSION% >nul 2>&1
if not "%MSCOMPILER%" == "" (
  devenv lz4\visual\VS2017\lz4.sln /project liblz4 /rebuild "Release|x64"
) else (
  cd lz4\lib
  qmake -o makefile.liblz4
  %MAKE% -f makefile.liblz4
  cd ..\..
)
cd ..

cd src
if exist Makefile ( %MAKE% -k distclean >nul 2>&1 )
qmake %OPT% target.path='%TFDIR%/bin' header.path='%TFDIR%/include' %USE_GUI%
cd ..
cd tools
if exist Makefile ( %MAKE% -k distclean >nul 2>&1 )
qmake -recursive %OPT% target.path='%TFDIR%/bin' header.path='%TFDIR%/include' datadir='%TFDIR%'
%MAKE% qmake
cd ..

echo;
echo First, run "%MAKE% install" in src directory.
echo Next, run "%MAKE% install" in tools directory.

:exit
exit /b

update configure.bat

update configure.bat


tag version bump

tag version bump


echo off

set platformsFolder=platforms
set platformName=Visual

set folder=%platformsFolder%\%platformName%

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

Create script that create folder platforms/Visual


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

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

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

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

:: Setup
:: -----

setlocal enabledelayedexpansion

SET ARTIFACTS=%~dp0%..\artifacts

SET DEPLOYMENT_SOURCE=C:\Users\BigFont\orchard

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

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

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

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

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

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

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

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

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

echo Handling .NET Web Application deployment.

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

:: 2. Build

call :ExecuteCmd "%MSBUILD_PATH%" "%DEPLOYMENT_SOURCE%\orchard.proj" /t:Precompiled

IF !ERRORLEVEL! NEQ 0 goto error

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

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

goto end

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

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

:exitSetErrorLevel
exit /b 1

:exitFromFunction
()

:end
endlocal
echo Finished successfully.
pause

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

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

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

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

:: Setup
:: -----

setlocal enabledelayedexpansion

SET ARTIFACTS=%~dp0%..\artifacts

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

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

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

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

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

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

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

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

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

echo Handling .NET Web Application deployment.

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

:: 2. Build

call :ExecuteCmd "%MSBUILD_PATH%" "%DEPLOYMENT_SOURCE%\orchard.proj" /t:Precompiled

IF !ERRORLEVEL! NEQ 0 goto error

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

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

goto end

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

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

:exitSetErrorLevel
exit /b 1

:exitFromFunction
()

:end
endlocal
echo Finished successfully.
pause

Update deployment source.

Update deployment source.


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

:: ----------------------
:: KUDU Deployment Script
:: Version: 0.1.7
:: ----------------------

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

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

:: Setup
:: -----

setlocal enabledelayedexpansion

SET ARTIFACTS=%~dp0%..\artifacts

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

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

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

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

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

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

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

:SelectNodeVersion

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

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

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

  IF NOT DEFINED NODE_EXE (
    SET NODE_EXE=node
  )

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

goto :EOF

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

:Deployment
echo Handling node.js deployment.

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

:: 2. Select node version
call :SelectNodeVersion

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

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

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

goto end

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

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

:exitSetErrorLevel
exit /b 1

:exitFromFunction
()

:end
endlocal
echo Finished successfully.

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

:: ----------------------
:: KUDU Deployment Script
:: Version: 0.1.7
:: ----------------------

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

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

:: Setup
:: -----

setlocal enabledelayedexpansion

SET ARTIFACTS=%~dp0%..\artifacts

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

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

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

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

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

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

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

:SelectNodeVersion

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

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

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

  IF NOT DEFINED NODE_EXE (
    SET NODE_EXE=node
  )

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

goto :EOF

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

:Deployment
echo Handling node.js deployment.

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

:: 2. Select node version
call :SelectNodeVersion

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

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

:: 5. Run grunt
IF EXIST "%DEPLOYMENT_TARGET%\bower.json" (
  pushd "%DEPLOYMENT_TARGET%"
  call :ExecuteCmd !NPM_CMD! install grunt-cli
  IF !ERRORLEVEL! NEQ 0 goto error
  call :ExecuteCmd grunt --no-color cssmin uglify
  IF !ERRORLEVEL! NEQ 0 goto error
  call :ExecuteCmd grunt --no-color --force
  IF !ERRORLEVEL! NEQ 0 goto error
  popd
)

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

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

goto end

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

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

:exitSetErrorLevel
exit /b 1

:exitFromFunction
()

:end
endlocal
echo Finished successfully.

Revert "get it working #5"

Revert "get it working #5"

This reverts commit fee12ab4925e9e8a34787677d4c577f38d2eeb84.


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

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

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

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

:: Setup
:: -----

setlocal enabledelayedexpansion

SET ARTIFACTS=%~dp0%..\artifacts

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

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

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

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

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

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

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

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

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

echo Handling .NET Web Application deployment.
pause > nul

:: 1. Restore NuGet packages
IF /I "src\Orchard.sln" NEQ "" (

  echo Nuget
  echo %DEPLOYMENT_SOURCE%\src\Orchard.sln"
  pause > nul

  call :ExecuteCmd nuget restore "%DEPLOYMENT_SOURCE%\src\Orchard.sln"
  IF !ERRORLEVEL! NEQ 0 goto error

  echo End Nuget
  pause > nul

)

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

IF !ERRORLEVEL! NEQ 0 goto error

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

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

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

goto end

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

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

:exitSetErrorLevel
exit /b 1

:exitFromFunction
()

:end
endlocal
echo Finished successfully.

pause > nul

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

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

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

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

:: Setup
:: -----

setlocal enabledelayedexpansion

SET ARTIFACTS=%~dp0%..\artifacts

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

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

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

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

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

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

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

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

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

echo Handling .NET Web Application deployment.

:: 1. Restore NuGet packages
IF /I "src\Orchard.sln" NEQ "" (

  echo Nuget
  echo %DEPLOYMENT_SOURCE%\src\Orchard.sln"

  call :ExecuteCmd nuget restore "%DEPLOYMENT_SOURCE%\src\Orchard.sln"
  IF !ERRORLEVEL! NEQ 0 goto error

  echo End Nuget

)

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

IF !ERRORLEVEL! NEQ 0 goto error

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

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

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

goto end

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

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

:exitSetErrorLevel
exit /b 1

:exitFromFunction
()

:end
endlocal
echo Finished successfully.

Remove pauses.

Remove pauses.


REM Test build
python setup.py sdist bdist_wheel
REM Upload to PyPi
REM python setup.py sdist bdist_wheel upload

Create pyoctree_build.bat

Create pyoctree_build.bat


REM Start copying files
mkdir Src

xcopy /D /S /I /Y ..\..\Src\UI\Web\*.py Src\
xcopy /D /S /I /Y ..\..\Src\UI\Web\*.bat Src\
xcopy /D /S /I /Y ..\..\Src\UI\Web\data Src\data
xcopy /D /S /I /Y "..\..\Src\Bin Collector\*.py" Src\
xcopy /D /S /I /Y "..\..\Src\Diff Inspector\*.py" Src\
xcopy /D /S /I /Y "..\..\Src\Bin Collector\Bin\*.pyd" Src\
xcopy /D /S /I /Y SetupDist.py Src\
xcopy /D /S /I /Y ..\..\Src\UI\Web\DarunGrim3Sample01.cfg Src\DarunGrim3.cfg

REM Start copying files
mkdir Src

xcopy /D /S /I /Y ..\..\Src\UI\Web\*.py Src\
xcopy /D /S /I /Y ..\..\Src\UI\Web\*.bat Src\
xcopy /D /S /I /Y ..\..\Src\UI\Web\data Src\data
xcopy /D /S /I /Y "..\..\Src\Bin Collector\*.py" Src\
xcopy /D /S /I /Y "..\..\Src\Diff Inspector\*.py" Src\
xcopy /D /S /I /Y "..\..\Src\Bin Collector\Bin\*.pyd" Src\
xcopy /D /S /I /Y SetupDist.py Src\
copy ..\..\Src\UI\Web\DarunGrim3Sample01.cfg Src\DarunGrim3.cfg

Use copy for configuration file copy

Use copy for configuration file copy


@if "%SCM_TRACE_LEVEL%" NEQ "4" @echo off
@echo Started: %date% %time%

:: ----------------------
:: KUDU Deployment Script
:: Version: 1.0.12
:: ----------------------

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

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

:: Setup
:: -----

setlocal enabledelayedexpansion

SET ARTIFACTS=%~dp0%..\artifacts

IF NOT DEFINED DEPLOYMENT_SOURCE (
  SET DEPLOYMENT_SOURCE=%~dp0%.
)
echo "Deployment Source: %DEPLOYMENT_SOURCE%"

IF NOT DEFINED DEPLOYMENT_DIST (
    SET DEPLOYMENT_DIST=%DEPLOYMENT_SOURCE%\dist
) ELSE (
    ECHO "Deployement Dist already set"
)
echo "Deployment Dist: %DEPLOYMENT_DIST%"

IF NOT DEFINED DEPLOYMENT_TARGET (
  SET DEPLOYMENT_TARGET=%ARTIFACTS%\wwwroot
)
echo "Deployment Target: %DEPLOYMENT_TARGET%"

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

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

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

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

for /F "tokens=5 delims=.\" %%a in ("%PREVIOUS_MANIFEST_PATH%") do SET PREVIOUS_SCM_COMMIT_ID=%%a

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: Pre-Deployment
:: ----------
@echo "Initiating Pre-Deployment: %date% %time%"
:: .deploy initial install if node_modules doesn't exist.
IF NOT EXIST "%DEPLOYMENT_SOURCE%\.deploy\node_modules" (
    echo "NPM Install: %DEPLOYMENT_SOURCE%\.deploy\package.json"
    pushd "%DEPLOYMENT_SOURCE%\.deploy\"
    npm install --production --progress=false --cache-min=432000
    popd
) ELSE (
   "%DEPLOYMENT_SOURCE%\.deploy\node_modules already exists"
)

::Initial install if node_modules doesn't exist.
IF EXIST "%DEPLOYMENT_SOURCE%\package.json" (
 echo "Main package.json exists."
    IF NOT EXIST "%DEPLOYMENT_SOURCE%\node_modules" (
        echo "NPM Install: %DEPLOYMENT_SOURCE%\package.json"
        pushd "%DEPLOYMENT_SOURCE%"
        npm install --production --progress=false --cache-min=432000
        npm install --save json-loader --progress=false --cache-min=432000
        popd
    ) ELSE (
        echo "Main node_modules exists"
    )
) ELSE (
 echo "No main package.json."
)

@echo "Previous Commit: %PREVIOUS_SCM_COMMIT_ID%  Current Commit: %SCM_COMMIT_ID%"
:: Only do npm install if there was a change in package.json
for /F %%f in ('git.exe diff --name-only %PREVIOUS_SCM_COMMIT_ID% %SCM_COMMIT_ID% ^| grep package.json') do (
    SET PACKAGEJSON=%%~f
    SET PKGFOLDER=!DEPLOYMENT_SOURCE!\!PACKAGEJSON:package.json=!
    echo "NPM Install: !PKGFOLDER!package.json"
    pushd "!PKGFOLDER!"
    npm install --production --progress=false --cache-min=432000
    npm install --save json-loader --progress=false --cache-min=432000
    IF !ERRORLEVEL! NEQ 0 goto error
    popd
)

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

@echo "Initiating Deployment: %date% %time%"

:: 1. Build Script
node %DEPLOYMENT_SOURCE%\.deploy\deploy.js
IF !ERRORLEVEL! NEQ 0 goto error

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

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: Cleanup
:: ----------
echo."Removing %DEPLOYMENT_TARGET%\%DEPLOY_DIST_FOLDER%"
del /f/s/q "%DEPLOYMENT_TARGET%\%DEPLOY_DIST_FOLDER%" > nul
rmdir /s/q "%DEPLOYMENT_TARGET%\%DEPLOY_DIST_FOLDER%"

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
goto end

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

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

:exitSetErrorLevel
exit /b 1

:exitFromFunction
()

:end
endlocal
echo Finished successfully.

@if "%SCM_TRACE_LEVEL%" NEQ "4" @echo off
@echo Started: %date% %time%

:: ----------------------
:: KUDU Deployment Script
:: Version: 1.0.12
:: ----------------------

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

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

:: Setup
:: -----

setlocal enabledelayedexpansion

SET ARTIFACTS=%~dp0%..\artifacts

IF NOT DEFINED DEPLOYMENT_SOURCE (
  SET DEPLOYMENT_SOURCE=%~dp0%.
)
echo "Deployment Source: %DEPLOYMENT_SOURCE%"

IF NOT DEFINED DEPLOYMENT_DIST (
    SET DEPLOYMENT_DIST=%DEPLOYMENT_SOURCE%\dist
) ELSE (
    ECHO "Deployement Dist already set"
)
echo "Deployment Dist: %DEPLOYMENT_DIST%"

IF NOT DEFINED DEPLOYMENT_TARGET (
  SET DEPLOYMENT_TARGET=%ARTIFACTS%\wwwroot
)
echo "Deployment Target: %DEPLOYMENT_TARGET%"

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

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

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

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

for /F "tokens=5 delims=.\" %%a in ("%PREVIOUS_MANIFEST_PATH%") do SET PREVIOUS_SCM_COMMIT_ID=%%a

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: Pre-Deployment
:: ----------
@echo "Initiating Pre-Deployment: %date% %time%"
:: .deploy initial install if node_modules doesn't exist.
IF NOT EXIST "%DEPLOYMENT_SOURCE%\.deploy\node_modules" (
    echo "NPM Install: %DEPLOYMENT_SOURCE%\.deploy\package.json"
    pushd "%DEPLOYMENT_SOURCE%\.deploy\"
    npm install --production --progress=false --cache-min=432000
    popd
) ELSE (
   "%DEPLOYMENT_SOURCE%\.deploy\node_modules already exists"
)

::Initial install if node_modules doesn't exist.
IF EXIST "%DEPLOYMENT_SOURCE%\package.json" (
 echo "Main package.json exists."
    IF NOT EXIST "%DEPLOYMENT_SOURCE%\node_modules" (
        echo "NPM Install: %DEPLOYMENT_SOURCE%\package.json"
        pushd "%DEPLOYMENT_SOURCE%"
        npm install --production --progress=false --cache-min=432000
        npm install --save json-loader --progress=false --cache-min=432000
        popd
    ) ELSE (
        echo "Main node_modules exists"
    )
) ELSE (
 echo "No main package.json."
)

@echo "Previous Commit: %PREVIOUS_SCM_COMMIT_ID%  Current Commit: %SCM_COMMIT_ID%"
:: Only do npm install if there was a change in package.json
for /F %%f in ('git.exe diff --name-only %PREVIOUS_SCM_COMMIT_ID% %SCM_COMMIT_ID% ^| grep package.json') do (
    SET PACKAGEJSON=%%~f
    SET PKGFOLDER=!DEPLOYMENT_SOURCE!\!PACKAGEJSON:package.json=!
    echo "NPM Install: !PKGFOLDER!package.json"
    pushd "!PKGFOLDER!"
    npm install --production --progress=false --cache-min=432000
    npm install --save json-loader --progress=false --cache-min=432000
    IF !ERRORLEVEL! NEQ 0 goto error
    popd
)

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

@echo "Initiating Deployment: %date% %time%"

:: 1. Build Script
node %DEPLOYMENT_SOURCE%\.deploy\deploy.js
IF !ERRORLEVEL! NEQ 0 goto error

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

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: Cleanup
:: ----------
echo."Removing %DEPLOYMENT_TARGET%\%DEPLOY_DIST_FOLDER%"
del /f/s/q "%DEPLOYMENT_SOURCE%\%DEPLOY_DIST_FOLDER%" > nul
rmdir /s/q "%DEPLOYMENT_SOURCE%\%DEPLOY_DIST_FOLDER%"
IF !ERRORLEVEL! NEQ 0 goto error

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
goto end

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

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

:exitSetErrorLevel
exit /b 1

:exitFromFunction
()

:end
endlocal
echo Finished successfully.

Build Master:2017-03-03T21:37:58.659Z

Build Master:2017-03-03T21:37:58.659Z


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

:: ----------------------
:: KUDU Deployment Script
:: Version: 0.1.13
:: ----------------------

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

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

:: Setup
:: -----

setlocal enabledelayedexpansion

SET ARTIFACTS=%~dp0%..\artifacts

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

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

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

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

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

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

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

:SelectNodeVersion

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

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

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

  IF NOT DEFINED NODE_EXE (
    SET NODE_EXE=node
  )

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

goto :EOF

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

:Deployment
echo Handling node.js deployment.

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

if EXIST %HOME%\site\wwwroot\sites\default\.git (
   pushd %HOME%\site\wwwroot\sites\default
   git pull
   popd
)

:: 2. Select node version
call :SelectNodeVersion

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

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

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

goto end

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

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

:exitSetErrorLevel
exit /b 1

:exitFromFunction
()

:end
endlocal
echo Finished successfully.

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

:: ----------------------
:: KUDU Deployment Script
:: Version: 0.1.13
:: ----------------------

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

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

:: Setup
:: -----

setlocal enabledelayedexpansion

SET ARTIFACTS=%~dp0%..\artifacts

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

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

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

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

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

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

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

:SelectNodeVersion

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

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

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

  IF NOT DEFINED NODE_EXE (
    SET NODE_EXE=node
  )

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

goto :EOF

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

:Deployment
echo Handling node.js deployment.

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

:: if EXIST %HOME%\site\wwwroot\sites\default\.git (
::   pushd %HOME%\site\wwwroot\sites\default
::   git pull
::   popd
::)

:: 2. Select node version
call :SelectNodeVersion

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

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

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

goto end

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

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

:exitSetErrorLevel
exit /b 1

:exitFromFunction
()

:end
endlocal
echo Finished successfully.

Remove site/default update script to deployment file.


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

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

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

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

:: Setup
:: -----

setlocal enabledelayedexpansion

SET ARTIFACTS=%~dp0%..\artifacts

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

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

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

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

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

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

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

:SelectNodeVersion

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

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

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

  IF NOT DEFINED NODE_EXE (
    SET NODE_EXE=node
  )

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

goto :EOF

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

: Deployment
echo Handling node.js deployment.

:: 1. Select node version
call :SelectNodeVersion

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

:: 3. Execute Gulp
IF EXIST "%DEPLOYMENT_TARGET%\gulpfile.js" (
    call .\node_modules\.bin\gulp build
    IF !ERRORLEVEL! NEQ 0 goto error
)

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

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
goto end

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

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

:exitSetErrorLevel
exit /b 1

:exitFromFunction
()

:end
endlocal
echo Finished successfully.

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

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

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

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

:: Setup
:: -----

setlocal enabledelayedexpansion

SET ARTIFACTS=%~dp0%..\artifacts

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

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

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

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

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

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

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

:SelectNodeVersion

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

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

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

  IF NOT DEFINED NODE_EXE (
    SET NODE_EXE=node
  )

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

goto :EOF

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

: Deployment
echo Handling node.js deployment.

:: 1. Select node version
call :SelectNodeVersion

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

:: 3. Execute Gulp
IF EXIST "%DEPLOYMENT_TARGET%\gulpfile.js" (
    call .\node_modules\.bin\gulp build
    IF !ERRORLEVEL! NEQ 0 goto error
)

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

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
goto end

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

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

:exitSetErrorLevel
exit /b 1

:exitFromFunction
()

:end
endlocal
echo Finished successfully.

edit deploycmd

edit deploycmd


@echo off
rem Copyright 2014-2015 Hendrik Saly
rem Licensed under the Apache License, Version 2.0

rem Configure the plugins you want to install
call esi_plugin.bat -i  elasticsearch/elasticsearch-analysis-phonetic/2.3.0
call esi_plugin.bat -i  elasticsearch/elasticsearch-mapper-attachments/2.3.0
rem call esi_plugin.bat -url http://bit.ly/19RBF3b -install langdetect

@echo off
rem Copyright 2014-2015 Hendrik Saly
rem Licensed under the Apache License, Version 2.0

rem Configure the plugins you want to install
call esi_plugin.bat -i  elasticsearch/elasticsearch-analysis-phonetic/2.5.0
call esi_plugin.bat -i  elasticsearch/elasticsearch-mapper-attachments/2.5.0
rem call esi_plugin.bat -url http://bit.ly/19RBF3b -install langdetect

update plugins for es 1.5.0

update plugins for es 1.5.0


REM replace node-opcua-crypto/pki modules with link to sibling modules
set N=node-opcua-crypto
rmdir node_modules\%N% /s /q
mklink /j node_modules\%N% %~dp0..\%N%

set N=node-opcua-pki
rmdir node_modules\%N% /s /q
mklink /j node_modules\%N% %~dp0..\%N%

add makeLink utility

add makeLink utility


git submodule update --init

SET CLIPATH=c:\jenkins\workspace\go-cli-tests-windows32Bit
SET GOPATH=%CLIPATH%
c:\Go\bin\go build -v -o cf-windows-386.exe main

SET GOPATH=c:\Users\Administrator\go
SET CATSPATH=%GOPATH%\src\github.com\cloudfoundry\cf-acceptance-tests
copy %CLIPATH%\cf-windows-386.exe %CATSPATH%\gcf.exe /Y

SET PATH=%PATH%;%CATSPATH%

call %environment.bat

cd %CATSPATH%
SET CONFIG=%CATSPATH%\config.json
ginkgo -r -v -slowSpecThreshold=300 -skip="admin buildpack"

git submodule update --init

SET CLIPATH=c:\jenkins\workspace\go-cli-tests-windows32Bit
SET GOPATH=%CLIPATH%
c:\Go\bin\go build -v -o cf-windows-386.exe main

SET GOPATH=c:\Users\Administrator\go
SET CATSPATH=%GOPATH%\src\github.com\cloudfoundry\cf-acceptance-tests
copy %CLIPATH%\cf-windows-386.exe %CATSPATH%\gcf.exe /Y

SET PATH=%PATH%;%CATSPATH%

call %environment.bat

cd %CATSPATH%
SET CONFIG=%CATSPATH%\config.json
%GOPATH%\bin\ginkgo -r -v -slowSpecThreshold=300 -skip="admin buildpack"

use absolute path to ginkgo

use absolute path to ginkgo


@if "%SCM_TRACE_LEVEL%" NEQ "4" @echo off
@echo Started: %date% %time%

:: ----------------------
:: KUDU Deployment Script
:: Version: 1.0.12
:: ----------------------

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

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

:: Setup
:: -----

setlocal enabledelayedexpansion

SET ARTIFACTS=%~dp0%..\artifacts

IF NOT DEFINED DEPLOYMENT_SOURCE (
  SET DEPLOYMENT_SOURCE=%~dp0%.
)
echo "Deployment Source: %DEPLOYMENT_SOURCE%"

IF NOT DEFINED DEPLOYMENT_DIST (
    SET DEPLOYMENT_DIST=%DEPLOYMENT_SOURCE%\dist
) ELSE (
    ECHO "Deployement Dist already set"
)
echo "Deployment Dist: %DEPLOYMENT_DIST%"

IF NOT DEFINED DEPLOYMENT_TARGET (
  SET DEPLOYMENT_TARGET=%ARTIFACTS%\wwwroot
)
echo "Deployment Target: %DEPLOYMENT_TARGET%"

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

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

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

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

for /F "tokens=5 delims=.\" %%a in ("%PREVIOUS_MANIFEST_PATH%") do SET PREVIOUS_SCM_COMMIT_ID=%%a

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: Pre-Deployment
:: ----------
@echo "Initiating Pre-Deployment: %date% %time%"
:: .deploy initial install if node_modules doesn't exist.
IF NOT EXIST "%DEPLOYMENT_SOURCE%\.deploy\node_modules" (
    echo "NPM Install: %DEPLOYMENT_SOURCE%\.deploy\package.json"
    pushd "%DEPLOYMENT_SOURCE%\.deploy\"
    npm install --production --progress=false --cache-min=432000
    popd
)

::Initial install if node_modules doesn't exist.
IF EXIST "%DEPLOYMENT_SOURCE%\package.json" IF NOT EXIST "%DEPLOYMENT_SOURCE%\node_modules" (
    echo "NPM Install: %DEPLOYMENT_SOURCE%\package.json"
    pushd "%DEPLOYMENT_SOURCE%"
    npm install --production --progress=false --cache-min=432000
    popd
)

@echo "Previous Commit: %PREVIOUS_SCM_COMMIT_ID%  Current Commit: %SCM_COMMIT_ID%"
:: Only do npm install if there was a change in package.json
for /F %%f in ('git.exe diff --name-only %PREVIOUS_SCM_COMMIT_ID% %SCM_COMMIT_ID% ^| grep package.json') do (
    SET PACKAGEJSON=%%~f
    SET PKGFOLDER=!DEPLOYMENT_SOURCE!\!PACKAGEJSON:package.json=!
    echo "NPM Install: !PKGFOLDER!package.json"
    pushd "!PKGFOLDER!"
    npm install --production --progress=false --cache-min=432000
    npm install --save json-loader --progress=false --cache-min=432000
    IF !ERRORLEVEL! NEQ 0 goto error
    popd
)

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

@echo "Initiating Deployment: %date% %time%"

:: 1. Build Script
node %DEPLOYMENT_SOURCE%\.deploy\deploy.js

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

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
goto end

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

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

:exitSetErrorLevel
exit /b 1

:exitFromFunction
()

:end
endlocal
echo Finished successfully.

@if "%SCM_TRACE_LEVEL%" NEQ "4" @echo off
@echo Started: %date% %time%

:: ----------------------
:: KUDU Deployment Script
:: Version: 1.0.12
:: ----------------------

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

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

:: Setup
:: -----

setlocal enabledelayedexpansion

SET ARTIFACTS=%~dp0%..\artifacts

IF NOT DEFINED DEPLOYMENT_SOURCE (
  SET DEPLOYMENT_SOURCE=%~dp0%.
)
echo "Deployment Source: %DEPLOYMENT_SOURCE%"

IF NOT DEFINED DEPLOYMENT_DIST (
    SET DEPLOYMENT_DIST=%DEPLOYMENT_SOURCE%\dist
) ELSE (
    ECHO "Deployement Dist already set"
)
echo "Deployment Dist: %DEPLOYMENT_DIST%"

IF NOT DEFINED DEPLOYMENT_TARGET (
  SET DEPLOYMENT_TARGET=%ARTIFACTS%\wwwroot
)
echo "Deployment Target: %DEPLOYMENT_TARGET%"

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

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

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

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

for /F "tokens=5 delims=.\" %%a in ("%PREVIOUS_MANIFEST_PATH%") do SET PREVIOUS_SCM_COMMIT_ID=%%a

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: Pre-Deployment
:: ----------
@echo "Initiating Pre-Deployment: %date% %time%"
:: .deploy initial install if node_modules doesn't exist.
IF NOT EXIST "%DEPLOYMENT_SOURCE%\.deploy\node_modules" (
    echo "NPM Install: %DEPLOYMENT_SOURCE%\.deploy\package.json"
    pushd "%DEPLOYMENT_SOURCE%\.deploy\"
    npm install --production --progress=false --cache-min=432000
    popd
)

::Initial install if node_modules doesn't exist.
IF EXIST "%DEPLOYMENT_SOURCE%\package.json" (
 echo "Main package.json exists."
    IF NOT EXIST "%DEPLOYMENT_SOURCE%\node_modules" (
        echo "NPM Install: %DEPLOYMENT_SOURCE%\package.json"
        pushd "%DEPLOYMENT_SOURCE%"
        npm install --production --progress=false --cache-min=432000
        npm install --save json-loader --progress=false --cache-min=432000
        popd
    ) ELSE (
        echo "Main node_modules exists"
    )
)

@echo "Previous Commit: %PREVIOUS_SCM_COMMIT_ID%  Current Commit: %SCM_COMMIT_ID%"
:: Only do npm install if there was a change in package.json
for /F %%f in ('git.exe diff --name-only %PREVIOUS_SCM_COMMIT_ID% %SCM_COMMIT_ID% ^| grep package.json') do (
    SET PACKAGEJSON=%%~f
    SET PKGFOLDER=!DEPLOYMENT_SOURCE!\!PACKAGEJSON:package.json=!
    echo "NPM Install: !PKGFOLDER!package.json"
    pushd "!PKGFOLDER!"
    npm install --production --progress=false --cache-min=432000
    npm install --save json-loader --progress=false --cache-min=432000
    IF !ERRORLEVEL! NEQ 0 goto error
    popd
)

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

@echo "Initiating Deployment: %date% %time%"

:: 1. Build Script
node %DEPLOYMENT_SOURCE%\.deploy\deploy.js

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

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
goto end

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

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

:exitSetErrorLevel
exit /b 1

:exitFromFunction
()

:end
endlocal
echo Finished successfully.

Build Master:2017-03-03T19:39:21.948Z

Build Master:2017-03-03T19:39:21.948Z


echo ON

:: Set the right msvc version according to Python version
if "%PY_VER%"=="2.7" (
    set MSVC_VER=9.0
    set LIB_VER=90
) else if "%PY_VER%"=="3.4" (
    set MSVC_VER=10.0
    set LIB_VER=100
) else (
    set MSVC_VER=14.0
    set LIB_VER=140
)

set MSVC_VER=12.0
set LIB_VER=120

call bootstrap.bat
if errorlevel 1 exit 1

call b2 install toolset=msvc-%MSVC_VER% ^
        address-model=%ARCH% ^
        variant=release ^
        threading=multi ^
        link=static,shared ^
        define=BOOST_ALL_NO_LIB ^
        -j%CPU_COUNT% ^
        --with-python ^
        --layout=system ^
        --build-dir=buildboost ^
        --prefix=%LIBRARY_PREFIX%
if errorlevel 1 exit 1

move %LIBRARY_LIB%\boost_*.dll "%LIBRARY_BIN%"
if errorlevel 1 exit 1

echo OFF

echo ON

:: Set the right msvc version according to Python version
if "%PY_VER%"=="2.7" (
    set MSVC_VER=9.0
    set LIB_VER=90
) else if "%PY_VER%"=="3.4" (
    set MSVC_VER=10.0
    set LIB_VER=100
) else (
    set MSVC_VER=14.0
    set LIB_VER=140
)

set MSVC_VER=12.0
set LIB_VER=120

set MSVC_VER=14.0
set LIB_VER=140

call bootstrap.bat
if errorlevel 1 exit 1

call b2 install toolset=msvc-%MSVC_VER% ^
        address-model=%ARCH% ^
        variant=release ^
        threading=multi ^
        link=static,shared ^
        define=BOOST_ALL_NO_LIB ^
        -j%CPU_COUNT% ^
        --with-python ^
        --layout=system ^
        --build-dir=buildboost ^
        --prefix=%LIBRARY_PREFIX%
if errorlevel 1 exit 1

move %LIBRARY_LIB%\boost_*.dll "%LIBRARY_BIN%"
if errorlevel 1 exit 1

echo OFF

Update bld.bat

Update bld.bat


set DEPOT="%CD%"

IF NOT EXIST mobility.pro GOTO NOSOURCE
set CETESTCOMMAND=cetest -cache %QTDIR%\.qmake.cache -libpath \Windows

IF NOT EXIST %DEPOT%\..\..\qa-dungeon\mainline\tests\wince\deploy\ GOTO SKIPDEPLOY
cd %DEPOT%\..\..\qa-dungeon\mainline\tests\wince\deploy\
call %CETESTCOMMAND%

:SKIPDEPLOY
cd %DEPOT%\tests\auto\qcontact
call %CETESTCOMMAND%
cd %DEPOT%\tests\auto\qcontactactions\unittest
call %CETESTCOMMAND%
cd %DEPOT%\tests\auto\qcontactasync\unittest
call %CETESTCOMMAND%
cd %DEPOT%\tests\auto\qcontactdetail
call %CETESTCOMMAND%
cd %DEPOT%\tests\auto\qcontactdetaildefinition
call %CETESTCOMMAND%
cd %DEPOT%\tests\auto\qcontactdetails
call %CETESTCOMMAND%
cd %DEPOT%\tests\auto\qcontactfilter
call %CETESTCOMMAND%
cd %DEPOT%\testsauto\qcontactgroup
call %CETESTCOMMAND%
cd %DEPOT%\tests\auto\qcontactmanager
call %CETESTCOMMAND%
cd %DEPOT%\tests\auto\qcontactmanagerfiltering
call %CETESTCOMMAND%
cd %DEPOT%\tests\auto\qcontactmanagerplugins\unittest
call %CETESTCOMMAND%
GOTO EOF

:NOSOURCE
echo "Unable to find mobility.pro check current directory is QtContacts source"
GOTO EOF

:EOF
cd %DEPOT%

set DEPOT="%CD%"

IF NOT EXIST mobility.pro GOTO NOSOURCE
IF EXIST %QTDIR%\.qmake.cache set CETESTCOMMAND=cetest -cache %QTDIR%\.qmake.cache -libpath \Windows
IF NOT EXIST %QTDIR%\.qmake.cache set CETESTCOMMAND=cetest -libpath \Windows

IF NOT EXIST %DEPOT%\..\..\qa-dungeon\mainline\tests\wince\deploy\ GOTO SKIPDEPLOY
cd %DEPOT%\..\..\qa-dungeon\mainline\tests\wince\deploy\
call %CETESTCOMMAND%

:SKIPDEPLOY
cd %DEPOT%\tests\auto\qcontact
call %CETESTCOMMAND%
cd %DEPOT%\tests\auto\qcontactactions\unittest
call %CETESTCOMMAND%
cd %DEPOT%\tests\auto\qcontactasync\unittest
call %CETESTCOMMAND%
cd %DEPOT%\tests\auto\qcontactdetail
call %CETESTCOMMAND%
cd %DEPOT%\tests\auto\qcontactdetaildefinition
call %CETESTCOMMAND%
cd %DEPOT%\tests\auto\qcontactdetails
call %CETESTCOMMAND%
cd %DEPOT%\tests\auto\qcontactfilter
call %CETESTCOMMAND%
cd %DEPOT%\testsauto\qcontactgroup
call %CETESTCOMMAND%
cd %DEPOT%\tests\auto\qcontactmanager
call %CETESTCOMMAND%
cd %DEPOT%\tests\auto\qcontactmanagerfiltering
call %CETESTCOMMAND%
cd %DEPOT%\tests\auto\qcontactmanagerplugins\unittest
call %CETESTCOMMAND%
GOTO EOF

:NOSOURCE
echo "Unable to find mobility.pro check current directory is QtContacts source"
GOTO EOF

:EOF
cd %DEPOT%

Add a rununittest script for WindowsCE

Add a rununittest script for WindowsCE

Script must be run when in the QtContacts source directory


@setlocal EnableDelayedExpansion EnableExtensions
@for %%i in (%~dp0\_packer_config*.cmd) do @call "%%~i"
@if defined PACKER_DEBUG (@echo on) else (@echo off)

if not defined PACKER_SERVICES set PACKER_SERVICES=opensshd sshd BvSshServer winrm

title Starting services: %PACKER_SERVICES%. Please wait...

:: Intentionally named with zz so it runs last by 00-run-all-scripts.cmd so
:: that the Packer winrm/ssh connections is not inadvertently dropped during the
:: Sysprep run

for %%i in (%PACKER_SERVICES%) do (
  echo ==^> Checking if the %%i service is installed
  sc query %%i >nul 2>nul && (
    echo ==^> Starting the %%i service
    sc start %%i
  )
)

:exit0

ver>nul

goto :exit

:exit1

verify other 2>nul

:exit

@setlocal EnableDelayedExpansion EnableExtensions
@for %%i in (%~dp0\_packer_config*.cmd) do @call "%%~i"
@if defined PACKER_DEBUG (@echo on) else (@echo off)

if not defined PACKER_SERVICES set PACKER_SERVICES=opensshd sshd BvSshServer winrm

title Starting services: %PACKER_SERVICES%. Please wait...

:: Intentionally named with zz so it runs last by 00-run-all-scripts.cmd so
:: that the Packer winrm/ssh connections is not inadvertently dropped during the
:: Sysprep run

for %%i in (%PACKER_SERVICES%) do (
  echo ==^> Checking if the %%i service is installed
  sc query %%i >nul 2>nul && (
    echo ==^> Configuring %%i service to autostart
    sc config %%i start= auto

    echo ==^> Starting the %%i service
    sc start %%i
  )
)

:exit0

ver>nul

goto :exit

:exit1

verify other 2>nul

:exit

Configure winrm service to autostart

Configure winrm service to autostart

Fixes #19


@echo off
call python build-removedev.py
if errorlevel 1 goto failed

call build.bat debug
if errorlevel 1 goto failed

call build.bat release
if errorlevel 1 goto failed

git commit -am "Removing dev from version numbers"
if errorlevel 1 goto failed

goto:eof

:failed
echo "[ERROR] Failed"
goto:eof

@echo off
call python build-removedev.py
if errorlevel 1 goto failed

git commit -am "Removing dev from version numbers"
if errorlevel 1 goto failed

goto:eof

:failed
echo "[ERROR] Failed"
goto:eof

remove building from prepare.bat

remove building from prepare.bat


setlocal
call settings.bat

git clone https://github.com/osmcode/osm-testdata
git clone https://github.com/osmcode/libosmium.git libosmium

cd libosmium

mkdir build
cd build

set TESTS=ON
set DATATEST=ON
set BUILD_HEADERS=OFF
set BUILD_BENCHMARKS=ON

if "%COMPILER%" == "MINGW" (
   %CMAKE% .. -DBOOST_ROOT=%BOOST_ROOT% -DBoost_USE_STATIC_LIBS=ON -DBUILD_TESTING=%TESTS% -DBUILD_TRY_HPPS=%ALLHPPS% -DBoost_ADDITIONAL_VERSIONS=1.57
   %ER%
   mingw32-make
   %ER%
) else (
   cmake .. %GENERATOR% -DCMAKE_BUILD_TYPE=%VARIANT% -DCMAKE_INSTALL_PREFIX=%PREFIX% -DBOOST_ROOT=%BOOST_ROOT% -DBoost_USE_STATIC_LIBS=ON -DBUILD_TESTING=%TESTS% -DBUILD_HEADERS=%BUILD_HEADERS% -DBUILD_BENCHMARKS=%BUILD_BENCHMARKS%  -DBoost_ADDITIONAL_VERSIONS=1.58;1.59 -DBUILD_DATA_TESTS=%DATATEST%
   %ER%
   %MSBUILDINSTALL%
   %ER%
)

set PATH=%PATH%;%PREFIX%/bin
if "%TESTS%"=="ON" ctest -C %Variant% -VV >..\..\%~n0_tests.log

if "%COMPILER%" == "MINGW" (
   mingw32-make install
   %ER%
) else (
   msbuild /p:Configuration=%Variant% /clp:Verbosity=minimal /nologo INSTALL.vcxproj
   %ER%
)

mkdir %PREFIX%\include\protozero
xcopy /i /y /e ..\include\protozero %PREFIX%\include\protozero
mkdir %PREFIX%\include\utf8
xcopy /i /y /e ..\include\utf8 %PREFIX%\include\utf8

copy /y ..\include\utf8.h %PREFIX%\include
cd ..\..

setlocal
call settings.bat

git clone https://github.com/osmcode/osm-testdata
git clone https://github.com/osmcode/libosmium.git libosmium

cd libosmium

mkdir build
cd build

set TESTS=ON
set DATATEST=ON
set BUILD_HEADERS=OFF
set BUILD_BENCHMARKS=ON

if "%COMPILER%" == "MINGW" (
   %CMAKE% .. -DBOOST_ROOT=%BOOST_ROOT% -DBoost_USE_STATIC_LIBS=ON -DBUILD_TESTING=%TESTS% -DBUILD_TRY_HPPS=%ALLHPPS% -DBoost_ADDITIONAL_VERSIONS=1.57
   %ER%
   mingw32-make
   %ER%
) else (
   cmake .. %GENERATOR% -DCMAKE_BUILD_TYPE=%VARIANT% -DCMAKE_INSTALL_PREFIX=%PREFIX% -DBOOST_ROOT=%BOOST_ROOT% -DBoost_USE_STATIC_LIBS=ON -DBUILD_TESTING=%TESTS% -DBUILD_HEADERS=%BUILD_HEADERS% -DBUILD_BENCHMARKS=%BUILD_BENCHMARKS%  -DBoost_ADDITIONAL_VERSIONS=1.58;1.59 -DBUILD_DATA_TESTS=%DATATEST%
   %ER%
   %MSBUILDINSTALL%
   %ER%
)

set PATH=%PATH%;%PREFIX%/bin
if "%TESTS%"=="ON" ctest -C %Variant% -VV >..\..\%~n0_tests.log

if "%COMPILER%" == "MINGW" (
   mingw32-make install
   %ER%
) else (
   msbuild /p:Configuration=%Variant% /clp:Verbosity=minimal /nologo INSTALL.vcxproj
   %ER%
)

mkdir %PREFIX%\include\protozero
xcopy /i /y /e ..\include\protozero %PREFIX%\include\protozero
mkdir %PREFIX%\include\utf8
xcopy /i /y /e ..\include\utf8 %PREFIX%\include\utf8

copy /y ..\include\utf8.h %PREFIX%\include
copy /y ..\include\gdalcpp.hpp %PREFIX%\include
cd ..\..

install gdalcpp with osmium

install gdalcpp with osmium