add office

add office

git-svn-id: 9db5f3bf534fda1ae49cdb5ebc7e13fb9e7e48c1@64621 954022d7-b5bf-4e40-9824-e11837661b57


@echo off
@echo %PYTHONPATH%
if "%1"=="" goto default_value_python:
set pythonexe="%1"
%pythonexe% setup.py write_version
goto custom_python:

:default_value_python:
set pythonexe="c:\Python370_x64\python.exe"
if not exist %pythonexe% set pythonexe="c:\Python366_x64\python.exe"
if not exist %pythonexe% set pythonexe="c:\Python365_x64\python.exe"
if not exist %pythonexe% set pythonexe="c:\Python364_x64\python.exe"
if not exist %pythonexe% set pythonexe="c:\Python363_x64\python.exe"
if not exist %pythonexe% set pythonexe="c:\Python36_x64\python.exe"
:custom_python:
@echo [python] %pythonexe%
%pythonexe% -u setup.py build_script
if %errorlevel% neq 0 exit /b %errorlevel%

@echo off
@echo %PYTHONPATH%
if "%1"=="" goto default_value_python:
set pythonexe="%1"
%pythonexe% setup.py write_version
goto custom_python:

:default_value_python:
set pythonexe="c:\Python372_x64\python.exe"
if not exist %pythonexe% set pythonexe="c:\Python370_x64\python.exe"
if not exist %pythonexe% set pythonexe="c:\Python366_x64\python.exe"
if not exist %pythonexe% set pythonexe="c:\Python365_x64\python.exe"
if not exist %pythonexe% set pythonexe="c:\Python364_x64\python.exe"
if not exist %pythonexe% set pythonexe="c:\Python363_x64\python.exe"
if not exist %pythonexe% set pythonexe="c:\Python36_x64\python.exe"
:custom_python:
@echo [python] %pythonexe%
%pythonexe% -u setup.py build_script
if %errorlevel% neq 0 exit /b %errorlevel%

Update build_script.bat

Update build_script.bat


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

:default_value_python:
set pythonexe="c:\Python36_x64\python"
:custom_python:
%pythonexe% -u setup.py build_script
if %errorlevel% neq 0 exit /b %errorlevel%

@echo off
if "%1"=="" goto default_value_python:
set pythonexe="%1"
%pythonexe% setup.py write_version
goto custom_python:

:default_value_python:
set pythonexe="c:\Python363_x64\python"
if not exist %pythonexe% set pythonexe="c:\Python36_x64\python"
:custom_python:
@echo [python] %pythonexe%
%pythonexe% -u setup.py build_script
if %errorlevel% neq 0 exit /b %errorlevel%

update script

update script


add bat to fly on windows

add bat to fly on windows


cls
cl /c ring_allegro.c -I"c:\allegro\include" -I"..\..\include"
link ring_allegro.obj  ..\..\lib\ring.lib c:\allegro\lib\allegro_monolith.lib /DLL /OUT:..\..\bin\ring_allegro.dll /SUBSYSTEM:CONSOLE,"5.01"
del ring_allegro.obj

Add file build.bat

Add file build.bat


@echo off
setlocal

REM Workaround https://github.com/dotnet/coreclr/issues/2153
set ComPlus_ReadyToRun=0

set INIT_TOOLS_LOG=%~dp0\init-tools.log
if [%PACKAGES_DIR%]==[] set PACKAGES_DIR=%~dp0packages\
if [%TOOLRUNTIME_DIR%]==[] set TOOLRUNTIME_DIR=%~dp0Tools
set DOTNET_PATH=%TOOLRUNTIME_DIR%\dotnetcli\
if [%DOTNET_CMD%]==[] set DOTNET_CMD=%DOTNET_PATH%bin\dotnet.exe
if [%BUILDTOOLS_SOURCE%]==[] set BUILDTOOLS_SOURCE=https://www.myget.org/F/dotnet-buildtools/
set /P BUILDTOOLS_VERSION=< %~dp0BuildToolsVersion.txt
set BUILD_TOOLS_PATH=%PACKAGES_DIR%Microsoft.DotNet.BuildTools\%BUILDTOOLS_VERSION%\lib\
set PROJECT_JSON_PATH=%TOOLRUNTIME_DIR%\%BUILDTOOLS_VERSION%
set PROJECT_JSON_FILE=%PROJECT_JSON_PATH%\project.json
set PROJECT_JSON_CONTENTS={ "dependencies": { "Microsoft.DotNet.BuildTools": "%BUILDTOOLS_VERSION%" }, "frameworks": { "dnxcore50": { } } }
set BUILD_TOOLS_SEMAPHORE=%PROJECT_JSON_PATH%\init-tools.completed

:: if force option is specified then clean the tool runtime and build tools package directory to force it to get recreated
if [%1]==[force] (
  if exist "%TOOLRUNTIME_DIR%" rmdir /S /Q "%TOOLRUNTIME_DIR%"
  if exist "%PACKAGES_DIR%Microsoft.DotNet.BuildTools" rmdir /S /Q "%PACKAGES_DIR%Microsoft.DotNet.BuildTools"
)

:: If sempahore exists do nothing
if exist "%BUILD_TOOLS_SEMAPHORE%" (
  echo Tools are already initialized.
  goto :EOF
)

if NOT exist "%PROJECT_JSON_PATH%" mkdir "%PROJECT_JSON_PATH%"
echo %PROJECT_JSON_CONTENTS% > %PROJECT_JSON_FILE%
echo Running %0 > %INIT_TOOLS_LOG%

if exist "%DOTNET_CMD%" goto :afterdotnetrestore

echo Installing dotnet cli...
if NOT exist "%DOTNET_PATH%" mkdir "%DOTNET_PATH%"
set /p DOTNET_VERSION=< %~dp0DotnetCLIVersion.txt
set DOTNET_ZIP_NAME=dotnet-win-x64.%DOTNET_VERSION%.zip
set DOTNET_REMOTE_PATH=https://dotnetcli.blob.core.windows.net/dotnet/dev/Binaries/%DOTNET_VERSION%/%DOTNET_ZIP_NAME%
set DOTNET_LOCAL_PATH=%DOTNET_PATH%%DOTNET_ZIP_NAME%
echo Installing '%DOTNET_REMOTE_PATH%' to '%DOTNET_LOCAL_PATH%' >> %INIT_TOOLS_LOG%
powershell -NoProfile -ExecutionPolicy unrestricted -Command "(New-Object Net.WebClient).DownloadFile('%DOTNET_REMOTE_PATH%', '%DOTNET_LOCAL_PATH%'); Add-Type -Assembly 'System.IO.Compression.FileSystem' -ErrorVariable AddTypeErrors; if ($AddTypeErrors.Count -eq 0) { [System.IO.Compression.ZipFile]::ExtractToDirectory('%DOTNET_LOCAL_PATH%', '%DOTNET_PATH%') } else { (New-Object -com shell.application).namespace('%DOTNET_PATH%').CopyHere((new-object -com shell.application).namespace('%DOTNET_LOCAL_PATH%').Items(),16) }" 2> NUL

:afterdotnetrestore

if exist "%BUILD_TOOLS_PATH%" goto :afterbuildtoolsrestore
echo Restoring BuildTools version %BUILDTOOLS_VERSION%...
echo Running: "%DOTNET_CMD%" restore "%PROJECT_JSON_FILE%" --packages %PACKAGES_DIR% --source "%BUILDTOOLS_SOURCE%" >> %INIT_TOOLS_LOG%
call "%DOTNET_CMD%" restore "%PROJECT_JSON_FILE%" --packages %PACKAGES_DIR% --source "%BUILDTOOLS_SOURCE%" >> %INIT_TOOLS_LOG%
if NOT exist "%BUILD_TOOLS_PATH%init-tools.cmd" (
  echo ERROR: Could not restore build tools correctly. See '%INIT_TOOLS_LOG%' for more details.
  goto :EOF
)

:afterbuildtoolsrestore

echo Initializing BuildTools ...
echo Running: "%BUILD_TOOLS_PATH%init-tools.cmd" "%~dp0" "%DOTNET_CMD%" "%TOOLRUNTIME_DIR%" >> %INIT_TOOLS_LOG%
call "%BUILD_TOOLS_PATH%init-tools.cmd" "%~dp0" "%DOTNET_CMD%" "%TOOLRUNTIME_DIR%" >> %INIT_TOOLS_LOG%

:: Create sempahore file
echo Done initializing tools.
echo Init-Tools.cmd completed for BuildTools Version: %BUILDTOOLS_VERSION% > "%BUILD_TOOLS_SEMAPHORE%"

@echo off
setlocal

REM Workaround https://github.com/dotnet/coreclr/issues/2153
set ComPlus_ReadyToRun=0

set INIT_TOOLS_LOG=%~dp0init-tools.log
if [%PACKAGES_DIR%]==[] set PACKAGES_DIR=%~dp0packages\
if [%TOOLRUNTIME_DIR%]==[] set TOOLRUNTIME_DIR=%~dp0Tools
set DOTNET_PATH=%TOOLRUNTIME_DIR%\dotnetcli\
if [%DOTNET_CMD%]==[] set DOTNET_CMD=%DOTNET_PATH%bin\dotnet.exe
if [%BUILDTOOLS_SOURCE%]==[] set BUILDTOOLS_SOURCE=https://www.myget.org/F/dotnet-buildtools/
set /P BUILDTOOLS_VERSION=< %~dp0BuildToolsVersion.txt
set BUILD_TOOLS_PATH=%PACKAGES_DIR%Microsoft.DotNet.BuildTools\%BUILDTOOLS_VERSION%\lib\
set PROJECT_JSON_PATH=%TOOLRUNTIME_DIR%\%BUILDTOOLS_VERSION%
set PROJECT_JSON_FILE=%PROJECT_JSON_PATH%\project.json
set PROJECT_JSON_CONTENTS={ "dependencies": { "Microsoft.DotNet.BuildTools": "%BUILDTOOLS_VERSION%" }, "frameworks": { "dnxcore50": { } } }
set BUILD_TOOLS_SEMAPHORE=%PROJECT_JSON_PATH%\init-tools.completed

:: if force option is specified then clean the tool runtime and build tools package directory to force it to get recreated
if [%1]==[force] (
  if exist "%TOOLRUNTIME_DIR%" rmdir /S /Q "%TOOLRUNTIME_DIR%"
  if exist "%PACKAGES_DIR%Microsoft.DotNet.BuildTools" rmdir /S /Q "%PACKAGES_DIR%Microsoft.DotNet.BuildTools"
)

:: If sempahore exists do nothing
if exist "%BUILD_TOOLS_SEMAPHORE%" (
  echo Tools are already initialized.
  goto :EOF
)

if NOT exist "%PROJECT_JSON_PATH%" mkdir "%PROJECT_JSON_PATH%"
echo %PROJECT_JSON_CONTENTS% > %PROJECT_JSON_FILE%
echo Running %0 > %INIT_TOOLS_LOG%

if exist "%DOTNET_CMD%" goto :afterdotnetrestore

echo Installing dotnet cli...
if NOT exist "%DOTNET_PATH%" mkdir "%DOTNET_PATH%"
set /p DOTNET_VERSION=< %~dp0DotnetCLIVersion.txt
set DOTNET_ZIP_NAME=dotnet-win-x64.%DOTNET_VERSION%.zip
set DOTNET_REMOTE_PATH=https://dotnetcli.blob.core.windows.net/dotnet/dev/Binaries/%DOTNET_VERSION%/%DOTNET_ZIP_NAME%
set DOTNET_LOCAL_PATH=%DOTNET_PATH%%DOTNET_ZIP_NAME%
echo Installing '%DOTNET_REMOTE_PATH%' to '%DOTNET_LOCAL_PATH%' >> %INIT_TOOLS_LOG%
powershell -NoProfile -ExecutionPolicy unrestricted -Command "(New-Object Net.WebClient).DownloadFile('%DOTNET_REMOTE_PATH%', '%DOTNET_LOCAL_PATH%'); Add-Type -Assembly 'System.IO.Compression.FileSystem' -ErrorVariable AddTypeErrors; if ($AddTypeErrors.Count -eq 0) { [System.IO.Compression.ZipFile]::ExtractToDirectory('%DOTNET_LOCAL_PATH%', '%DOTNET_PATH%') } else { (New-Object -com shell.application).namespace('%DOTNET_PATH%').CopyHere((new-object -com shell.application).namespace('%DOTNET_LOCAL_PATH%').Items(),16) }" >> %INIT_TOOLS_LOG%
if NOT exist "%DOTNET_LOCAL_PATH%" (
  echo ERROR: Could not install dotnet cli correctly. See '%INIT_TOOLS_LOG%' for more details.
  goto :EOF
)

:afterdotnetrestore

if exist "%BUILD_TOOLS_PATH%" goto :afterbuildtoolsrestore
echo Restoring BuildTools version %BUILDTOOLS_VERSION%...
echo Running: "%DOTNET_CMD%" restore "%PROJECT_JSON_FILE%" --packages %PACKAGES_DIR% --source "%BUILDTOOLS_SOURCE%" >> %INIT_TOOLS_LOG%
call "%DOTNET_CMD%" restore "%PROJECT_JSON_FILE%" --packages %PACKAGES_DIR% --source "%BUILDTOOLS_SOURCE%" >> %INIT_TOOLS_LOG%
if NOT exist "%BUILD_TOOLS_PATH%init-tools.cmd" (
  echo ERROR: Could not restore build tools correctly. See '%INIT_TOOLS_LOG%' for more details.
  goto :EOF
)

:afterbuildtoolsrestore

echo Initializing BuildTools ...
echo Running: "%BUILD_TOOLS_PATH%init-tools.cmd" "%~dp0" "%DOTNET_CMD%" "%TOOLRUNTIME_DIR%" >> %INIT_TOOLS_LOG%
call "%BUILD_TOOLS_PATH%init-tools.cmd" "%~dp0" "%DOTNET_CMD%" "%TOOLRUNTIME_DIR%" >> %INIT_TOOLS_LOG%

:: Create sempahore file
echo Done initializing tools.
echo Init-Tools.cmd completed for BuildTools Version: %BUILDTOOLS_VERSION% > "%BUILD_TOOLS_SEMAPHORE%"

Add error checking for dotnet cli restoring


@rem Script to build LuaJIT with MSVC.
@rem Copyright (C) 2005-2011 Mike Pall. See Copyright Notice in luajit.h
@rem
@rem Either open a "Visual Studio .NET Command Prompt"
@rem (Note that the Express Edition does not contain an x64 compiler)
@rem -or-
@rem Open a "Windows SDK Command Shell" and set the compiler environment:
@rem     setenv /release /x86
@rem   -or-
@rem     setenv /release /x64
@rem
@rem Then cd to this directory and run this script.

@if not defined INCLUDE goto :FAIL

@setlocal
@set LJCOMPILE=cl /nologo /c /MD /O2 /W3 /D_CRT_SECURE_NO_DEPRECATE
@set LJLINK=link /nologo
@set LJMT=mt /nologo
@set LJLIB=lib /nologo
@set DASMDIR=..\dynasm
@set DASM=lua %DASMDIR%\dynasm.lua
@set ALL_LIB=lib_base.c lib_math.c lib_bit.c lib_string.c lib_table.c lib_io.c lib_os.c lib_package.c lib_debug.c lib_jit.c lib_ffi.c

if not exist buildvm_x86.h^
  %DASM% -LN -o buildvm_x86.h buildvm_x86.dasc
if not exist buildvm_x64win.h^
  %DASM% -LN -D X64 -D X64WIN -o buildvm_x64win.h buildvm_x86.dasc

%LJCOMPILE% /I "." /I %DASMDIR% buildvm*.c
%LJLINK% /out:buildvm.exe buildvm*.obj
if exist buildvm.exe.manifest^
  %LJMT% -manifest buildvm.exe.manifest -outputresource:buildvm.exe

buildvm -m peobj -o lj_vm.obj
buildvm -m bcdef -o lj_bcdef.h %ALL_LIB%
buildvm -m ffdef -o lj_ffdef.h %ALL_LIB%
buildvm -m libdef -o lj_libdef.h %ALL_LIB%
buildvm -m recdef -o lj_recdef.h %ALL_LIB%
buildvm -m vmdef -o ..\lib\vmdef.lua %ALL_LIB%
buildvm -m folddef -o lj_folddef.h lj_opt_fold.c

@if "%1"=="amalg" goto :AMALGDLL
@if "%1"=="static" goto :STATIC
%LJCOMPILE% /DLUA_BUILD_AS_DLL lj_*.c lib_*.c
%LJLINK% /DLL /out:lua51.dll lj_*.obj lib_*.obj
@goto :MTDLL
:STATIC
%LJCOMPILE% /DLUA_BUILD_AS_DLL lj_*.c lib_*.c
%LJLIB% /OUT:lua51.lib lj_*.obj lib_*.obj
@goto :MTDLL
:AMALGDLL
%LJCOMPILE% /DLUA_BUILD_AS_DLL ljamalg.c
%LJLINK% /DLL /out:lua51.dll ljamalg.obj lj_vm.obj
:MTDLL
if exist lua51.dll.manifest^
  %LJMT% -manifest lua51.dll.manifest -outputresource:lua51.dll;2

%LJCOMPILE% luajit.c
%LJLINK% /out:luajit.exe luajit.obj lua51.lib
if exist luajit.exe.manifest^
  %LJMT% -manifest luajit.exe.manifest -outputresource:luajit.exe

del *.obj *.manifest buildvm.exe

@goto :END
:FAIL
@echo You must open a "Visual Studio .NET Command Prompt" to run this script
:END

@rem Script to build LuaJIT with MSVC.
@rem Copyright (C) 2005-2011 Mike Pall. See Copyright Notice in luajit.h
@rem
@rem Either open a "Visual Studio .NET Command Prompt"
@rem (Note that the Express Edition does not contain an x64 compiler)
@rem -or-
@rem Open a "Windows SDK Command Shell" and set the compiler environment:
@rem     setenv /release /x86
@rem   -or-
@rem     setenv /release /x64
@rem
@rem Then cd to this directory and run this script.

@if not defined INCLUDE goto :FAIL

@setlocal
@set LJCOMPILE=cl /nologo /c /MD /O2 /W3 /D_CRT_SECURE_NO_DEPRECATE
@set LJLINK=link /nologo
@set LJMT=mt /nologo
@set LJLIB=lib /nologo
@set DASMDIR=..\dynasm
@set DASM=lua %DASMDIR%\dynasm.lua
@set ALL_LIB=lib_base.c lib_math.c lib_bit.c lib_string.c lib_table.c lib_io.c lib_os.c lib_package.c lib_debug.c lib_jit.c lib_ffi.c

if not exist buildvm_x86.h^
  %DASM% -LN -o buildvm_x86.h buildvm_x86.dasc
@if errorlevel 1 goto :BAD
if not exist buildvm_x64win.h^
  %DASM% -LN -D X64 -D X64WIN -o buildvm_x64win.h buildvm_x86.dasc
@if errorlevel 1 goto :BAD

%LJCOMPILE% /I "." /I %DASMDIR% buildvm*.c
@if errorlevel 1 goto :BAD
%LJLINK% /out:buildvm.exe buildvm*.obj
@if errorlevel 1 goto :BAD
if exist buildvm.exe.manifest^
  %LJMT% -manifest buildvm.exe.manifest -outputresource:buildvm.exe

buildvm -m peobj -o lj_vm.obj
@if errorlevel 1 goto :BAD
buildvm -m bcdef -o lj_bcdef.h %ALL_LIB%
@if errorlevel 1 goto :BAD
buildvm -m ffdef -o lj_ffdef.h %ALL_LIB%
@if errorlevel 1 goto :BAD
buildvm -m libdef -o lj_libdef.h %ALL_LIB%
@if errorlevel 1 goto :BAD
buildvm -m recdef -o lj_recdef.h %ALL_LIB%
@if errorlevel 1 goto :BAD
buildvm -m vmdef -o ..\lib\vmdef.lua %ALL_LIB%
@if errorlevel 1 goto :BAD
buildvm -m folddef -o lj_folddef.h lj_opt_fold.c
@if errorlevel 1 goto :BAD

@if "%1" neq "debug" goto :NODEBUG
@shift
@set LJCOMPILE=%LJCOMPILE% /Zi /Fdluajit.pdb
@set LJLINK=%LJLINK% /debug /PDB:luajit.pdb
:NODEBUG
@if "%1"=="amalg" goto :AMALGDLL
@if "%1"=="static" goto :STATIC
%LJCOMPILE% /DLUA_BUILD_AS_DLL lj_*.c lib_*.c
@if errorlevel 1 goto :BAD
%LJLINK% /DLL /out:lua51.dll lj_*.obj lib_*.obj
@if errorlevel 1 goto :BAD
@goto :MTDLL
:STATIC
%LJCOMPILE% /DLUA_BUILD_AS_DLL lj_*.c lib_*.c
@if errorlevel 1 goto :BAD
%LJLIB% /OUT:lua51.lib lj_*.obj lib_*.obj
@if errorlevel 1 goto :BAD
@goto :MTDLL
:AMALGDLL
%LJCOMPILE% /DLUA_BUILD_AS_DLL ljamalg.c
@if errorlevel 1 goto :BAD
%LJLINK% /DLL /out:lua51.dll ljamalg.obj lj_vm.obj
@if errorlevel 1 goto :BAD
:MTDLL
if exist lua51.dll.manifest^
  %LJMT% -manifest lua51.dll.manifest -outputresource:lua51.dll;2

%LJCOMPILE% luajit.c
@if errorlevel 1 goto :BAD
%LJLINK% /out:luajit.exe luajit.obj lua51.lib
@if errorlevel 1 goto :BAD
if exist luajit.exe.manifest^
  %LJMT% -manifest luajit.exe.manifest -outputresource:luajit.exe

@del *.obj *.manifest buildvm.exe
@echo.
@echo === Successfully built LuaJIT ===

@goto :END
:BAD
@echo.
@echo *******************************************************
@echo *** Build FAILED -- Please check the error messages ***
@echo *******************************************************
@goto :END
:FAIL
@echo You must open a "Visual Studio .NET Command Prompt" to run this script
:END

Add debug option to msvcbuild.bat and improve error handling.


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

@echo on

set BUILD_ROOT=%cd%
set SRC=%cd%\github\SPIRV-Tools
set BUILD_TYPE=%1
set VS_VERSION=%2

:: Force usage of python 2.7 rather than 3.6
set PATH=C:\python27;%PATH%

cd %SRC%
git clone --depth=1 https://github.com/KhronosGroup/SPIRV-Headers external/spirv-headers
git clone --depth=1 https://github.com/google/googletest          external/googletest
git clone --depth=1 https://github.com/google/effcee              external/effcee
git clone --depth=1 https://github.com/google/re2                 external/re2

:: #########################################
:: set up msvc build env
:: #########################################
if %VS_VERSION% == 2017 (
  call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" x64
  echo "Using VS 2017..."
) else if %VS_VERSION% == 2015 (
  call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x64
  echo "Using VS 2015..."
) else if %VS_VERSION% == 2013 (
  call "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" x64
  echo "Using VS 2013..."
)

cd %SRC%
mkdir build
cd build

:: #########################################
:: Start building.
:: #########################################
echo "Starting build... %DATE% %TIME%"
if "%KOKORO_GITHUB_COMMIT%." == "." (
  set BUILD_SHA=%KOKORO_GITHUB_PULL_REQUEST_COMMIT%
) else (
  set BUILD_SHA=%KOKORO_GITHUB_COMMIT%
)
cmake -GNinja -DSPIRV_BUILD_COMPRESSION=ON -DCMAKE_BUILD_TYPE=%BUILD_TYPE% -DCMAKE_INSTALL_PREFIX=install -DRE2_BUILD_TESTING=OFF -DCMAKE_C_COMPILER=cl.exe -DCMAKE_CXX_COMPILER=cl.exe ..
if %ERRORLEVEL% GEQ 1 exit /b %ERRORLEVEL%

echo "Build everything... %DATE% %TIME%"
ninja
if %ERRORLEVEL% GEQ 1 exit /b %ERRORLEVEL%
echo "Build Completed %DATE% %TIME%"

:: #########################################
:: Run the tests.
:: #########################################
echo "Running Tests... %DATE% %TIME%"
ctest -C %BUILD_TYPE% --output-on-failure --timeout 300
if %ERRORLEVEL% GEQ 1 exit /b %ERRORLEVEL%
echo "Tests Completed %DATE% %TIME%"

:: Clean up some directories.
rm -rf %SRC%\build
rm -rf %SRC%\external

exit /b %ERRORLEVEL%

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

@echo on

set BUILD_ROOT=%cd%
set SRC=%cd%\github\SPIRV-Tools
set BUILD_TYPE=%1
set VS_VERSION=%2

:: Force usage of python 2.7 rather than 3.6
set PATH=C:\python27;%PATH%

cd %SRC%
git clone --depth=1 https://github.com/KhronosGroup/SPIRV-Headers external/spirv-headers
git clone --depth=1 https://github.com/google/googletest          external/googletest
git clone --depth=1 https://github.com/google/effcee              external/effcee
git clone --depth=1 https://github.com/google/re2                 external/re2

:: #########################################
:: set up msvc build env
:: #########################################
if %VS_VERSION% == 2017 (
  call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" x64
  echo "Using VS 2017..."
) else if %VS_VERSION% == 2015 (
  call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x64
  echo "Using VS 2015..."
) else if %VS_VERSION% == 2013 (
  call "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" x64
  echo "Using VS 2013..."
)

cd %SRC%
mkdir build
cd build

:: #########################################
:: Start building.
:: #########################################
echo "Starting build... %DATE% %TIME%"
if "%KOKORO_GITHUB_COMMIT%." == "." (
  set BUILD_SHA=%KOKORO_GITHUB_PULL_REQUEST_COMMIT%
) else (
  set BUILD_SHA=%KOKORO_GITHUB_COMMIT%
)

:: Skip building tests for VS2013
if %VS_VERSION% == 2013 (
  cmake -GNinja -DSPIRV_SKIP_TESTS=ON -DSPIRV_BUILD_COMPRESSION=ON -DCMAKE_BUILD_TYPE=%BUILD_TYPE% -DCMAKE_INSTALL_PREFIX=install -DRE2_BUILD_TESTING=OFF -DCMAKE_C_COMPILER=cl.exe -DCMAKE_CXX_COMPILER=cl.exe ..
) else (
  cmake -GNinja -DSPIRV_BUILD_COMPRESSION=ON -DCMAKE_BUILD_TYPE=%BUILD_TYPE% -DCMAKE_INSTALL_PREFIX=install -DRE2_BUILD_TESTING=OFF -DCMAKE_C_COMPILER=cl.exe -DCMAKE_CXX_COMPILER=cl.exe ..
)

if %ERRORLEVEL% GEQ 1 exit /b %ERRORLEVEL%

echo "Build everything... %DATE% %TIME%"
ninja
if %ERRORLEVEL% GEQ 1 exit /b %ERRORLEVEL%
echo "Build Completed %DATE% %TIME%"

:: ################################################
:: Run the tests (We no longer run tests on VS2013)
:: ################################################
if NOT %VS_VERSION% == 2013 (
  echo "Running Tests... %DATE% %TIME%"
  ctest -C %BUILD_TYPE% --output-on-failure --timeout 300
  if %ERRORLEVEL% GEQ 1 exit /b %ERRORLEVEL%
  echo "Tests Completed %DATE% %TIME%"
)

:: Clean up some directories.
rm -rf %SRC%\build
rm -rf %SRC%\external

exit /b %ERRORLEVEL%

[kokoro] Stop building and running tests for VS2013 (#1852)


:: Sign keybase.exe and generate a signed installer, with an embedded signed uninsaller
:: $1 is full path to keybase.exe
:: todo: specify output?
::
:: For Jenkins:
if DEFINED WORKSPACE set GOPATH=%WORKSPACE%
set GOARCH=386
::
:: get the target build folder. Assume winresource.exe has been built.
:: If not, go there and do "go generate"
set Folder=%GOPATH%\src\github.com\keybase\client\go\keybase\
set PathName=%Folder%keybase.exe

if NOT DEFINED DOKAN_PATH set DOKAN_PATH=%GOPATH%\bin\dokan-dev\dokan-v1.0.0-RC4.2
echo DOKAN_PATH %DOKAN_PATH%

pushd %GOPATH%\src\github.com\keybase\client\packaging\windows

:: Capture the windows style version
for /f %%i in ('%Folder%winresource.exe -w') do set KEYBASE_WINVER=%%i
echo KEYBASE_WINVER %KEYBASE_WINVER%

:: Capture keybase's semantic version
for /f "tokens=3" %%i in ('%PathName% -version') do set SEMVER=%%i
echo %SEMVER%
::Set this again for Jenkins
set KEYBASE_VERSION=%SEMVER%

echo KEYBASE_VERSION %KEYBASE_VERSION%

:: dokan source binaries.
:: There are 8 (4 windows versions times 32/64 bit) but they all seem to have the same version.
for /f %%i in ('PowerShell "(Get-Item %DOKAN_PATH%\Win32\Win10Release\dokan1.sys).VersionInfo.FileVersion"') do set DOKANVER=%%i
echo DOKANVER %DOKANVER%
IF %DOKANVER%=="" (
  EXIT /B 1
)

:: Other alternate time servers:
::   http://timestamp.verisign.com/scripts/timstamp.dll
::   http://timestamp.globalsign.com/scripts/timestamp.dll
::   http://tsa.starfieldtech.com
::   http://timestamp.comodoca.com/authenticode
::   http://timestamp.digicert.com
SignTool.exe sign /i digicert /a /tr http://timestamp.digicert.com %PathName%
IF %ERRORLEVEL% NEQ 0 (
  EXIT /B 1
)
SignTool.exe sign /i digicert  /a /tr http://timestamp.digicert.com %GOPATH%\src\github.com\keybase\kbfs\kbfsdokan\kbfsdokan.exe
IF %ERRORLEVEL% NEQ 0 (k
  EXIT /B 1
)
SignTool.exe sign /i digicert /a /tr http://timestamp.digicert.com %GOPATH%\src\github.com\keybase\go-updater\service\upd.exe
IF %ERRORLEVEL% NEQ 0 (k
  EXIT /B 1
)
SignTool.exe sign /i digicert /a /tr http://timestamp.digicert.com %GOPATH%\src\github.com\keybase\client\go\tools\runquiet\runquiet.exe
IF %ERRORLEVEL% NEQ 0 (k
  EXIT /B 1
)
SignTool.exe sign /i digicert /a /tr http://timestamp.digicert.com %GOPATH%\src\github.com\keybase\client\desktop\release\win32-ia32\Keybase-win32-ia32\Keybase.exe
IF %ERRORLEVEL% NEQ 0 (
  EXIT /B 1
)

:: Double check that keybase is codesigned
signtool verify /pa %PathName%
IF %ERRORLEVEL% NEQ 0 (
  EXIT /B 1
)

:: Double check that kbfs is codesigned
signtool verify /pa %GOPATH%\src\github.com\keybase\kbfs\kbfsdokan\kbfsdokan.exe
IF %ERRORLEVEL% NEQ 0 (
  EXIT /B 1
)

:: Double check that updater is codesigned
signtool verify /pa %GOPATH%\src\github.com\keybase\go-updater\service\upd.exe
IF %ERRORLEVEL% NEQ 0 (
  EXIT /B 1
)

:: Double check that Keybase.exe gui is codesigned
signtool verify /pa %GOPATH%\src\github.com\keybase\client\desktop\release\win32-ia32\Keybase-win32-ia32\Keybase.exe
IF %ERRORLEVEL% NEQ 0 (
  EXIT /B 1
)

if NOT DEFINED BUILD_TAG set BUILD_TAG=%SEMVER%

pushd %GOPATH%\src\github.com\keybase\client\packaging\windows\WIXInstallers
msbuild WIX_Installers.sln  /p:Configuration=Release /p:Platform=x86 /t:Build
popd
IF %ERRORLEVEL% NEQ 0 (
  EXIT /B 1
)

go get github.com/keybase/release
go install github.com/keybase/release
set ReleaseBin=%GOPATH%\bin\windows_386\release.exe

if not EXIST %GOPATH%\src\github.com\keybase\client\packaging\windows\%BUILD_TAG% mkdir %GOPATH%\src\github.com\keybase\client\packaging\windows\%BUILD_TAG%
pushd %GOPATH%\src\github.com\keybase\client\packaging\windows\%BUILD_TAG%

move %GOPATH%\src\github.com\keybase\client\packaging\windows\WIXInstallers\KeybaseBundle\bin\Release\*.exe %GOPATH%\src\github.com\keybase\client\packaging\windows\%BUILD_TAG%
for /f %%i in ('dir /od /b *.exe') do set KEYBASE_INSTALLER_NAME=%%i

:: Double check that the installer is codesigned
signtool verify /pa %KEYBASE_INSTALLER_NAME%
IF %ERRORLEVEL% NEQ 0 (
  EXIT /B 1
)

if NOT DEFINED JSON_UPDATE_FILENAME set JSON_UPDATE_FILENAME=update-windows-prod-v2.json

:: Run keybase sign to get signature of update
set KeybaseBin="%ProgramFiles(x86)%\Keybase\keybase.exe"
set SigFile=sig.txt
%KeybaseBin% sign -d -i %KEYBASE_INSTALLER_NAME% -o %SigFile%
IF %ERRORLEVEL% NEQ 0 (
  EXIT /B 1
)

%ReleaseBin% update-json --version=%SEMVER% --src=%KEYBASE_INSTALLER_NAME% --uri=https://prerelease.keybase.io/windows --signature=%SigFile% > %JSON_UPDATE_FILENAME%

:: Sign keybase.exe and generate a signed installer, with an embedded signed uninsaller
:: $1 is full path to keybase.exe
:: todo: specify output?
::
:: For Jenkins:
if DEFINED WORKSPACE set GOPATH=%WORKSPACE%
set GOARCH=386
::
:: get the target build folder. Assume winresource.exe has been built.
:: If not, go there and do "go generate"
set Folder=%GOPATH%\src\github.com\keybase\client\go\keybase\
set PathName=%Folder%keybase.exe

if NOT DEFINED DOKAN_PATH set DOKAN_PATH=%GOPATH%\bin\dokan-dev\dokan-v1.0.0-RC4.2
echo DOKAN_PATH %DOKAN_PATH%

pushd %GOPATH%\src\github.com\keybase\client\packaging\windows

:: Capture the windows style version
for /f %%i in ('%Folder%winresource.exe -w') do set KEYBASE_WINVER=%%i
echo KEYBASE_WINVER %KEYBASE_WINVER%

:: Capture keybase's semantic version
for /f "tokens=3" %%i in ('%PathName% -version') do set SEMVER=%%i
echo %SEMVER%
::Set this again for Jenkins
set KEYBASE_VERSION=%SEMVER%

echo KEYBASE_VERSION %KEYBASE_VERSION%

:: dokan source binaries.
:: There are 8 (4 windows versions times 32/64 bit) but they all seem to have the same version.
for /f %%i in ('PowerShell "(Get-Item %DOKAN_PATH%\Win32\Win10Release\dokan1.sys).VersionInfo.FileVersion"') do set DOKANVER=%%i
echo DOKANVER %DOKANVER%
IF %DOKANVER%=="" (
  EXIT /B 1
)

:: Other alternate time servers:
::   http://timestamp.verisign.com/scripts/timstamp.dll
::   http://timestamp.globalsign.com/scripts/timestamp.dll
::   http://tsa.starfieldtech.com
::   http://timestamp.comodoca.com/authenticode
::   http://timestamp.digicert.com
SignTool.exe sign /i digicert /a /tr http://timestamp.digicert.com %PathName%
IF %ERRORLEVEL% NEQ 0 (
  EXIT /B 1
)
SignTool.exe sign /i digicert  /a /tr http://timestamp.digicert.com %GOPATH%\src\github.com\keybase\kbfs\kbfsdokan\kbfsdokan.exe
IF %ERRORLEVEL% NEQ 0 (k
  EXIT /B 1
)
SignTool.exe sign /i digicert /a /tr http://timestamp.digicert.com %GOPATH%\src\github.com\keybase\go-updater\service\upd.exe
IF %ERRORLEVEL% NEQ 0 (k
  EXIT /B 1
)
SignTool.exe sign /i digicert /a /tr http://timestamp.digicert.com %GOPATH%\src\github.com\keybase\client\go\tools\runquiet\runquiet.exe
IF %ERRORLEVEL% NEQ 0 (k
  EXIT /B 1
)
SignTool.exe sign /i digicert /a /tr http://timestamp.digicert.com %GOPATH%\src\github.com\keybase\client\desktop\release\win32-ia32\Keybase-win32-ia32\Keybase.exe
IF %ERRORLEVEL% NEQ 0 (
  EXIT /B 1
)

:: Double check that keybase is codesigned
signtool verify /pa %PathName%
IF %ERRORLEVEL% NEQ 0 (
  EXIT /B 1
)

:: Double check that kbfs is codesigned
signtool verify /pa %GOPATH%\src\github.com\keybase\kbfs\kbfsdokan\kbfsdokan.exe
IF %ERRORLEVEL% NEQ 0 (
  EXIT /B 1
)

:: Double check that updater is codesigned
signtool verify /pa %GOPATH%\src\github.com\keybase\go-updater\service\upd.exe
IF %ERRORLEVEL% NEQ 0 (
  EXIT /B 1
)

:: Double check that Keybase.exe gui is codesigned
signtool verify /pa %GOPATH%\src\github.com\keybase\client\desktop\release\win32-ia32\Keybase-win32-ia32\Keybase.exe
IF %ERRORLEVEL% NEQ 0 (
  EXIT /B 1
)

if NOT DEFINED BUILD_TAG set BUILD_TAG=%SEMVER%

pushd %GOPATH%\src\github.com\keybase\client\packaging\windows\WIXInstallers
msbuild WIX_Installers.sln  /p:Configuration=Release /p:Platform=x86 /t:Build
popd
IF %ERRORLEVEL% NEQ 0 (
  EXIT /B 1
)

go get github.com/keybase/release
go install github.com/keybase/release
set ReleaseBin=%GOPATH%\bin\windows_386\release.exe

if not EXIST %GOPATH%\src\github.com\keybase\client\packaging\windows\%BUILD_TAG% mkdir %GOPATH%\src\github.com\keybase\client\packaging\windows\%BUILD_TAG%
pushd %GOPATH%\src\github.com\keybase\client\packaging\windows\%BUILD_TAG%

move %GOPATH%\src\github.com\keybase\client\packaging\windows\WIXInstallers\KeybaseBundle\bin\Release\*.exe %GOPATH%\src\github.com\keybase\client\packaging\windows\%BUILD_TAG%
for /f %%i in ('dir /od /b *.exe') do set KEYBASE_INSTALLER_NAME=%%i

:: Double check that the installer is codesigned
signtool verify /pa %KEYBASE_INSTALLER_NAME%
IF %ERRORLEVEL% NEQ 0 (
  EXIT /B 1
)

if NOT DEFINED JSON_UPDATE_FILENAME set JSON_UPDATE_FILENAME=update-windows-prod-v2.json

:: Run keybase sign to get signature of update
set KeybaseBin="%ProgramFiles(x86)%\Keybase\keybase.exe"
set SigFile=sig.txt
%KeybaseBin% sign -d -i %KEYBASE_INSTALLER_NAME% -o %SigFile%
IF %ERRORLEVEL% NEQ 0 (
  EXIT /B 1
)

%ReleaseBin% update-json --version=%SEMVER% --src=%KEYBASE_INSTALLER_NAME% --uri=https://prerelease.keybase.io/windows --signature=%SigFile% --description=%GOPATH%\src\github.com\keybase\client\desktop\CHANGELOG.txt > %JSON_UPDATE_FILENAME%

Use changelog for update description [skip ci] (#3273)


SETLOCAL EnableExtensions EnableDelayedExpansion

IF [%UsbDkVersion%] == [] SET UsbDkVersion=99.99.99
IF [%UsbDkVersion%] == [".."] SET UsbDkVersion=99.99.99

pushd ..\..\Install_Debug\x86

del UsbDk_Debug_x86.msi UsbDk_Debug_x86.wixobj UsbDk_Debug_x86.wixpdb

"C:\Program Files (x86)\WiX Toolset v3.8\bin\candle.exe" ..\..\Tools\Installer\UsbDkInstaller.wxs -out UsbDk_Debug.wixobj -dUsbDkVersion=%UsbDkVersion% -dConfig=Debug
if !ERRORLEVEL! NEQ 0 exit /B 1
"C:\Program Files (x86)\WiX Toolset v3.8\bin\light.exe" UsbDk_Debug.wixobj -out UsbDk_Debug_%UsbDkVersion%_x86.msi -sw1076
if !ERRORLEVEL! NEQ 0 exit /B 1

popd

pushd ..\..\Install_Debug\x64

del *.msi *.wixobj *.wixpdb

"C:\Program Files (x86)\WiX Toolset v3.8\bin\candle.exe" ..\..\Tools\Installer\UsbDkInstaller.wxs -out UsbDk_Debug.wixobj -dUsbDkVersion=%UsbDkVersion% -dConfig=Debug -dUsbDk64Bit=1
if !ERRORLEVEL! NEQ 0 exit /B 1
"C:\Program Files (x86)\WiX Toolset v3.8\bin\light.exe" UsbDk_Debug.wixobj -out UsbDk_Debug_%UsbDkVersion%_x64.msi -sw1076
if !ERRORLEVEL! NEQ 0 exit /B 1

popd

pushd ..\..\Install\x86

del *.msi *.wixobj *.wixpdb

"C:\Program Files (x86)\WiX Toolset v3.8\bin\candle.exe" ..\..\Tools\Installer\UsbDkInstaller.wxs -out UsbDk.wixobj -dUsbDkVersion=%UsbDkVersion% -dConfig=Release
if !ERRORLEVEL! NEQ 0 exit /B 1
"C:\Program Files (x86)\WiX Toolset v3.8\bin\light.exe" UsbDk.wixobj -out UsbDk_%UsbDkVersion%_x86.msi -sw1076
if !ERRORLEVEL! NEQ 0 exit /B 1

popd

pushd ..\..\Install\x64

del UsbDk_x64.msi UsbDk_x64.msi.wixobj UsbDk_x64.msi.wixpdb

"C:\Program Files (x86)\WiX Toolset v3.8\bin\candle.exe" ..\..\Tools\Installer\UsbDkInstaller.wxs -out UsbDk.wixobj -dUsbDkVersion=%UsbDkVersion% -dConfig=Release -dUsbDk64Bit=1
if !ERRORLEVEL! NEQ 0 exit /B 1
"C:\Program Files (x86)\WiX Toolset v3.8\bin\light.exe" UsbDk.wixobj -out UsbDk_%UsbDkVersion%_x64.msi -sw1076
if !ERRORLEVEL! NEQ 0 exit /B 1

popd

echo SUCCEEDED

SETLOCAL EnableExtensions EnableDelayedExpansion

IF [%UsbDkVersion%] == [] SET UsbDkVersion=99.99.99
IF [%UsbDkVersion%] == [".."] SET UsbDkVersion=99.99.99

pushd ..\..\Install_Debug\x86

del *.msi *.wixobj *.wixpdb

"C:\Program Files (x86)\WiX Toolset v3.8\bin\candle.exe" ..\..\Tools\Installer\UsbDkInstaller.wxs -out UsbDk_Debug.wixobj -dUsbDkVersion=%UsbDkVersion% -dConfig=Debug
if !ERRORLEVEL! NEQ 0 exit /B 1
"C:\Program Files (x86)\WiX Toolset v3.8\bin\light.exe" UsbDk_Debug.wixobj -out UsbDk_Debug_%UsbDkVersion%_x86.msi -sw1076
if !ERRORLEVEL! NEQ 0 exit /B 1

popd

pushd ..\..\Install_Debug\x64

del *.msi *.wixobj *.wixpdb

"C:\Program Files (x86)\WiX Toolset v3.8\bin\candle.exe" ..\..\Tools\Installer\UsbDkInstaller.wxs -out UsbDk_Debug.wixobj -dUsbDkVersion=%UsbDkVersion% -dConfig=Debug -dUsbDk64Bit=1
if !ERRORLEVEL! NEQ 0 exit /B 1
"C:\Program Files (x86)\WiX Toolset v3.8\bin\light.exe" UsbDk_Debug.wixobj -out UsbDk_Debug_%UsbDkVersion%_x64.msi -sw1076
if !ERRORLEVEL! NEQ 0 exit /B 1

popd

pushd ..\..\Install\x86

del *.msi *.wixobj *.wixpdb

"C:\Program Files (x86)\WiX Toolset v3.8\bin\candle.exe" ..\..\Tools\Installer\UsbDkInstaller.wxs -out UsbDk.wixobj -dUsbDkVersion=%UsbDkVersion% -dConfig=Release
if !ERRORLEVEL! NEQ 0 exit /B 1
"C:\Program Files (x86)\WiX Toolset v3.8\bin\light.exe" UsbDk.wixobj -out UsbDk_%UsbDkVersion%_x86.msi -sw1076
if !ERRORLEVEL! NEQ 0 exit /B 1

popd

pushd ..\..\Install\x64

del *.msi *.wixobj *.wixpdb

"C:\Program Files (x86)\WiX Toolset v3.8\bin\candle.exe" ..\..\Tools\Installer\UsbDkInstaller.wxs -out UsbDk.wixobj -dUsbDkVersion=%UsbDkVersion% -dConfig=Release -dUsbDk64Bit=1
if !ERRORLEVEL! NEQ 0 exit /B 1
"C:\Program Files (x86)\WiX Toolset v3.8\bin\light.exe" UsbDk.wixobj -out UsbDk_%UsbDkVersion%_x64.msi -sw1076
if !ERRORLEVEL! NEQ 0 exit /B 1

popd

echo SUCCEEDED

Fix MSI deletion before rebuild

Build: Fix MSI deletion before rebuild

Signed-off-by: Dmitry Fleytman <f50f56ffad4b379c2a89812e98b14900ef87e9ea@redhat.com>


@echo off
rmdir /S /Q VestaDizLite
mkdir VestaDizLite
cd VestaDizLite
copy "C:\Users\1\Dropbox\VestaLite (2)\VestaDizLite.zip" VestaDizLite.zip
"C:\Program Files\HaoZip\HaoZipC.exe" e VestaDizLite.zip
VestaDizLite.exe /silent

@echo off
rmdir /S /Q VestaDizLite
mkdir VestaDizLite
cd VestaDizLite
copy "C:\Users\1\Dropbox\VestaLite (2)\VestaDizLite.zip" VestaDizLite.zip
"C:\Program Files\HaoZip\HaoZipC.exe" e VestaDizLite.zip
VestaDizLite.exe /verysilent

Hide installer with /verysilent key. Resolve #7.


@echo off
cd ../..
if not exist "temp" mkdir temp
cd temp
cmake -DCMAKE_INSTALL_PREFIX=../temp/install -G "Visual Studio 16 2019" -A x64 ..
if %errorlevel% neq 0 exit /b %errorlevel%
cd ../build/VisualStudio

@echo off
cd ../..
if not exist "temp" mkdir temp
cd temp
cmake -DCMAKE_INSTALL_PREFIX=../temp/install -G "Visual Studio 17 2022" -A x64 ..
if %errorlevel% neq 0 exit /b %errorlevel%
cd ../build/VisualStudio

Update Doxyfile

Update Doxyfile


@IF EXIST "%~dp0\node.exe" (
  "%~dp0\node.exe"  "%~dp0\her" %*
) ELSE (
  node  "%~dp0\her" %*
)

add her.cmd for windows

add her.cmd for windows


echo on
SetLocal EnableDelayedExpansion

rem Matrix-driven Appveyor CI script for libmodbus-rs
rem Currently only does MSYS2 builds.
rem https://www.appveyor.com/docs/installed-software#mingw-msys-cygwin
rem Needs the following vars:
rem     MSYS2_ARCH: x86_64 or i686
rem     MSYSTEM:    MINGW64 or MINGW32
rem     target:     x86_64-pc-windows-gnu, i686-pc-windows-gnu
rem     channel:    stable, beta, nightly
rem This script based on the work of the libmypaint team.

rem Download rust
set RUSTUP_URL=https://win.rustup.rs/rustup-init.exe
echo Downloading %RUSTUP_URL%...
powershell -Command "appveyor DownloadFile https://win.rustup.rs/ -FileName rustup-init.exe"
if %ERRORLEVEL% NEQ 0 exit 1
powershell -Command "rustup-init -yv --default-toolchain %channel% --default-host %target%"
if %ERRORLEVEL% NEQ 0 exit 1
set PATH=%PATH%;%USERPROFILE%\.cargo\bin
rustc -vV
cargo -vV

rem Set the paths appropriately
PATH C:\msys64\%MSYSTEM%\bin;C:\msys64\usr\bin;%PATH%
PATH %PATH%;%USERPROFILE%\.cargo\bin

rem Upgrade the MSYS2 platform
bash -lc "pacman --noconfirm --sync --refresh --refresh pacman"
bash -lc "pacman --noconfirm --sync --refresh --refresh --sysupgrade --sysupgrade"

rem Install required tools
bash -xlc "pacman --noconfirm -S --needed base-devel"

rem Install the relevant native dependencies
bash -xlc "pacman --noconfirm -S --needed mingw-w64-%MSYS2_ARCH%-clang"

rem Invoke subsequent bash in the build tree
cd %APPVEYOR_BUILD_FOLDER%
set CHERE_INVOKING=yes

rem Build/test scripting
bash -xlc "set pwd"
bash -xlc "env"

cargo test --verbose

echo on
SetLocal EnableDelayedExpansion

rem Matrix-driven Appveyor CI script for libmodbus-rs
rem Currently only does MSYS2 builds.
rem https://www.appveyor.com/docs/installed-software#mingw-msys-cygwin
rem Needs the following vars:
rem     MSYS2_ARCH: x86_64 or i686
rem     MSYSTEM:    MINGW64 or MINGW32
rem     target:     x86_64-pc-windows-gnu, i686-pc-windows-gnu
rem     channel:    stable, beta, nightly
rem This script based on the work of the libmypaint team.

rem Download rust
set RUSTUP_URL=https://win.rustup.rs/rustup-init.exe
echo Downloading %RUSTUP_URL%...
powershell -Command "appveyor DownloadFile https://win.rustup.rs/ -FileName rustup-init.exe"
if %ERRORLEVEL% NEQ 0 exit 1
powershell -Command "rustup-init.exe -yv --default-toolchain %channel% --default-host %target%"
if %ERRORLEVEL% NEQ 0 exit 1
set PATH=%PATH%;%USERPROFILE%\.cargo\bin
rustc -vV
cargo -vV

rem Set the paths appropriately
PATH C:\msys64\%MSYSTEM%\bin;C:\msys64\usr\bin;%PATH%
PATH %PATH%;%USERPROFILE%\.cargo\bin

rem Upgrade the MSYS2 platform
bash -lc "pacman --noconfirm --sync --refresh --refresh pacman"
bash -lc "pacman --noconfirm --sync --refresh --refresh --sysupgrade --sysupgrade"

rem Install required tools
bash -xlc "pacman --noconfirm -S --needed base-devel"

rem Install the relevant native dependencies
bash -xlc "pacman --noconfirm -S --needed mingw-w64-%MSYS2_ARCH%-clang"

rem Invoke subsequent bash in the build tree
cd %APPVEYOR_BUILD_FOLDER%
set CHERE_INVOKING=yes

rem Build/test scripting
bash -xlc "set pwd"
bash -xlc "env"

cargo test --verbose

Update Appveyor

Update Appveyor


@ECHO OFF

REM change current directory to the location of this script
pushd %~dp0

REM create bin directory if it doesn't exist
if not exist ..\bin mkdir ..\bin

REM compile the code into the bin folder
javac  ..\src\seedu\addressbook\Addressbook.java -d ..\bin
IF ERRORLEVEL 1 (
    echo ********** BUILD FAILURE **********
    REM return to previous directory
    popd
    exit /b 1
)
REM no error here, errorlevel == 0

REM (invalid) no parent directory, invalid filename with no extension
java -classpath ..\bin seedu.addressbook.AddressBook " " < NUL > actual.txt
REM (invalid) invalid parent directory that does not exist, valid filename
java -classpath ..\bin seedu.addressbook.AddressBook "directoryThatDoesNotExist/valid.filename" < NUL >> actual.txt
REM (invalid) no parent directory, invalid filename with dot on first character
java -classpath ..\bin seedu.addressbook.AddressBook ".noFilename" < NUL >> actual.txt
REM (invalid) valid parent directory, non regular file
if not exist data\notRegularFile.txt mkdir data\notRegularFile.txt
java -classpath ..\bin seedu.addressbook.AddressBook "data/notRegularFile.txt" < NUL >> actual.txt
REM (valid) valid parent directory, valid filename with extension.
copy /y NUL data\valid.filename
java -classpath ..\bin seedu.addressbook.AddressBook "data/valid.filename" < exitinput.txt >> actual.txt
REM run the program, feed commands from input.txt file and redirect the output to the actual.txt
java -classpath ..\bin seedu.addressbook.AddressBook < input.txt >> actual.txt

REM compare the output to the expected output
FC actual.txt expected.txt

REM return to previous directory
popd

@ECHO OFF

REM change current directory to the location of this script
pushd %~dp0

REM create bin directory if it doesn't exist
if not exist ..\bin mkdir ..\bin

REM compile the code into the bin folder
javac ..\src\seedu\addressbook\AddressBook.java -d ..\bin
IF ERRORLEVEL 1 (
    echo ********** BUILD FAILURE **********
    REM return to previous directory
    popd
    exit /b 1
)
REM no error here, errorlevel == 0

REM (invalid) no parent directory, invalid filename with no extension
java -classpath ..\bin seedu.addressbook.AddressBook " " < NUL > actual.txt
REM (invalid) invalid parent directory that does not exist, valid filename
java -classpath ..\bin seedu.addressbook.AddressBook "directoryThatDoesNotExist/valid.filename" < NUL >> actual.txt
REM (invalid) no parent directory, invalid filename with dot on first character
java -classpath ..\bin seedu.addressbook.AddressBook ".noFilename" < NUL >> actual.txt
REM (invalid) valid parent directory, non regular file
if not exist data\notRegularFile.txt mkdir data\notRegularFile.txt
java -classpath ..\bin seedu.addressbook.AddressBook "data/notRegularFile.txt" < NUL >> actual.txt
REM (valid) valid parent directory, valid filename with extension.
copy /y NUL data\valid.filename
java -classpath ..\bin seedu.addressbook.AddressBook "data/valid.filename" < exitinput.txt >> actual.txt
REM run the program, feed commands from input.txt file and redirect the output to the actual.txt
java -classpath ..\bin seedu.addressbook.AddressBook < input.txt >> actual.txt

REM compare the output to the expected output
FC actual.txt expected.txt

REM return to previous directory
popd

fix filepath in `javac` command

runtests.bat: fix filepath in `javac` command

The `javac` command in the `runtests.bat` script reports a "file not
found" error if the case sensitive attribute of the `src` folder is
enabled.

`runtests.bat` script will fail to compile the code into the `bin`
folder and exit prematurely. This results in developers being unable
to execute the tests successfully.

Let's fix the filepath in the `javac` command to allow it to compile
successfully and continue executing the remaining tests even when the
case sensitive attribute of the `src` folder is enabled.


set secdns=https://doh-ch.blahdns.com/dns-query
reg.exe add "HKLM\Software\Policies\Google\Chrome" /v DnsOverHttpsMode /f /t REG_SZ /d "automatic" /f
reg.exe add "HKLM\Software\Policies\Google\Chrome" /v DnsOverHttpsTemplates /f /t REG_SZ /d "%secdns%" /f

reg add "HKLM\Software\Policies\Microsoft\Edge" /v "BuiltInDnsClientEnabled" /t REG_DWORD /d "1" /f
reg add "HKLM\Software\Policies\Microsoft\Edge" /v "DnsOverHttpsMode " /t REG_SZ /d "automatic" /f
reg add "HKLM\Software\Policies\Microsoft\Edge" /v "DnsOverHttpsTemplates" /t REG_SZ /d "%secdns%" /f

set secdns=https://doh-ch.blahdns.com/dns-query
reg.exe add "HKLM\Software\Policies\Google\Chrome" /v "DnsOverHttpsMode" /f /t REG_SZ /d "automatic" /f
reg.exe add "HKLM\Software\Policies\Google\Chrome" /v "DnsOverHttpsTemplates" /f /t REG_SZ /d "%secdns%" /f

reg add "HKLM\Software\Policies\Microsoft\Edge" /v "BuiltInDnsClientEnabled" /f /t REG_DWORD /d "1"
reg add "HKLM\Software\Policies\Microsoft\Edge" /v "DnsOverHttpsMode" /f /t REG_SZ /d "automatic"
reg add "HKLM\Software\Policies\Microsoft\Edge" /v "DnsOverHttpsTemplates" /f /t REG_SZ /d "%secdns%"

Update securedns.cmd

Update securedns.cmd


@echo off
setlocal
if "%1"==""       goto documentation
if "%1"=="--help" goto documentation
if "%1"=="-h"     goto documentation
if "%1"=="/h"     goto documentation
goto parseopts

:documentation
echo Usage: %~nx0 [options] [.exs file] [data]
echo.
echo   -v                Prints version and exit
echo   -e command        Evaluates the given command (*)
echo   -r file           Requires the given files/patterns (*)
echo   -S script         Finds and executes the given script
echo   -pr file          Requires the given files/patterns in parallel (*)
echo   -pa path          Prepends the given path to Erlang code path (*)
echo   -pz path          Appends the given path to Erlang code path (*)
echo   --app app         Start the given app and its dependencies (*)
echo   --erl switches    Switches to be passed down to erlang (*)
echo   --name name       Makes and assigns a name to the distributed node
echo   --sname name      Makes and assigns a short name to the distributed node
echo   --cookie cookie   Sets a cookie for this distributed node
echo   --hidden          Makes a hidden node
echo   --detached        Starts the Erlang VM detached from console
echo   --no-halt         Does not halt the Erlang VM after execution
echo.
echo ** Options marked with (*) can be given more than once
echo ** Options given after the .exs file or -- are passed down to the executed code
echo ** Options can be passed to the erlang runtime using ELIXIR_ERL_OPTIONS or --erl
goto end

:parseopts

rem Parameters for Erlang
set parsErlang=

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

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

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

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

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

rem ******* assume all pre-params are parsed ********************
:expand_erl_libs
rem ******* expand all ebin paths as Windows does not support the ..\*\ebin wildcard ********************
SETLOCAL enabledelayedexpansion
set ext_libs=
for  /d %%d in ("%originPath%..\lib\*.") do (
  set ext_libs=!ext_libs! -pa "%%~fd\ebin"
)
SETLOCAL disabledelayedexpansion
:run
IF %useWerl% EQU 1 (
    werl.exe %ext_libs% %ELIXIR_ERL_OPTIONS% %parsErlang% -s elixir start_cli %beforeExtra% -extra %*
) ELSE (
    erl.exe %ext_libs% -noshell %ELIXIR_ERL_OPTIONS% %parsErlang% -s elixir start_cli %beforeExtra% -extra %*
)
:end
endlocal

@echo off
setlocal
if "%1"==""       goto documentation
if "%1"=="--help" goto documentation
if "%1"=="-h"     goto documentation
if "%1"=="/h"     goto documentation
goto parseopts

:documentation
echo Usage: %~nx0 [options] [.exs file] [data]
echo.
echo   -v                Prints version and exit
echo   -e command        Evaluates the given command (*)
echo   -r file           Requires the given files/patterns (*)
echo   -S script         Finds and executes the given script
echo   -pr file          Requires the given files/patterns in parallel (*)
echo   -pa path          Prepends the given path to Erlang code path (*)
echo   -pz path          Appends the given path to Erlang code path (*)
echo   --app app         Start the given app and its dependencies (*)
echo   --erl switches    Switches to be passed down to erlang (*)
echo   --name name       Makes and assigns a name to the distributed node
echo   --sname name      Makes and assigns a short name to the distributed node
echo   --cookie cookie   Sets a cookie for this distributed node
echo   --hidden          Makes a hidden node
echo   --detached        Starts the Erlang VM detached from console
echo   --no-halt         Does not halt the Erlang VM after execution
echo.
echo ** Options marked with (*) can be given more than once
echo ** Options given after the .exs file or -- are passed down to the executed code
echo ** Options can be passed to the erlang runtime using ELIXIR_ERL_OPTIONS or --erl
goto end

:parseopts

rem Parameters for Erlang
set parsErlang=

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

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

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

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

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

rem ******* assume all pre-params are parsed ********************
:expand_erl_libs
rem ******* expand all ebin paths as Windows does not support the ..\*\ebin wildcard ********************
SETLOCAL enabledelayedexpansion
set ext_libs=
for  /d %%d in ("%originPath%..\lib\*.") do (
  set ext_libs=!ext_libs! -pa "%%~fd\ebin"
)
SETLOCAL disabledelayedexpansion
:run
IF %useWerl% EQU 1 (
    start werl.exe %ext_libs% %ELIXIR_ERL_OPTIONS% %parsErlang% -s elixir start_cli %beforeExtra% -extra %*
) ELSE (
    erl.exe %ext_libs% -noshell %ELIXIR_ERL_OPTIONS% %parsErlang% -s elixir start_cli %beforeExtra% -extra %*
)
:end
endlocal

Use start to spawn werl without lingering cmd window


@echo off

SET MSBUILD=C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe
rem SET MSBUILD=%ProgramFiles(x86)%\MSBuild\14.0\Bin\MSBuild.exe
SET OUTPUT=..\..\..\..\Binaries
SET PARAMS=/consoleloggerparameters:ErrorsOnly /m

FOR %%P IN (AM.Core,ManagedIrbis,AM.Rfid,AM.Drawing,AM.Windows.Forms,,AM.Win32,IrbisUI,AM.Suggestions,AM.AOT,AM.Ocr,RestfulIrbis) DO (
  FOR %%B IN (Debug,Release) DO (
    CALL :BUILDLIB %%P %%B 35  v3.5   "CLASSIC;DESKTOP;FW35"
    CALL :BUILDLIB %%P %%B 40  v4.0   "CLASSIC;DESKTOP;FW4;FW40"
    CALL :BUILDLIB %%P %%B 45  v4.5   "CLASSIC;DESKTOP;FW4;FW45"
rem CALL :BUILDLIB %%P %%B 451 v4.5.1 "CLASSIC;DESKTOP;FW4;FW40;FW45;FW451"
    CALL :BUILDLIB %%P %%B 46  v4.6   "CLASSIC;DESKTOP;FW4;FW46"
rem CALL :BUILDLIB %%P %%B 461 v4.6.1 "CLASSIC;DESKTOP;FW4;FW46;FW461"
rem CALL :BUILDLIB %%P %%B 461 v4.6.2 "CLASSIC;DESKTOP;FW4;FW46;FW462"
  )
)

FOR %%P IN (mx64,PftBench) DO (
  FOR %%B IN (Debug,Release) DO (
    CALL :BUILDAPP %%P %%B 40  v4.0   "CLASSIC;DESKTOP;FW4;FW40"
    CALL :BUILDAPP %%P %%B 45  v4.5   "CLASSIC;DESKTOP;FW4;FW45"
    CALL :BUILDAPP %%P %%B 46  v4.6   "CLASSIC;DESKTOP;FW4;FW46"
  )
)

EXIT

:BUILDLIB
ECHO BUILD %1 %2 %4
"%MSBUILD%" Source\Classic\Libs\%1\%1.csproj /p:Configuration=%2 /p:TargetFrameworkVersion=%4  /p:OutputPath=%OUTPUT%\%2%3 %PARAMS% /p:DefineConstants=%5 /t:Rebuild
GOTO :END

:BUILDAPP
ECHO BUILD %1 %2 %4
"%MSBUILD%" Source\Classic\Apps\%1\%1.csproj /p:Configuration=%2 /p:TargetFrameworkVersion=%4  /p:OutputPath=%OUTPUT%\%2%3 %PARAMS% /p:DefineConstants=%5 /t:Rebuild
GOTO :END

:END

@echo off

SET MSBUILD=C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe
rem SET MSBUILD=%ProgramFiles(x86)%\MSBuild\14.0\Bin\MSBuild.exe
SET OUTPUT=..\..\..\..\Binaries
SET PARAMS=/consoleloggerparameters:ErrorsOnly /m

FOR %%P IN (AM.Core,ManagedIrbis,AM.Rfid,AM.Drawing,AM.Windows.Forms,,AM.Win32,IrbisUI,AM.Suggestions,AM.AOT,AM.Ocr,RestfulIrbis,IrbisInterop) DO (
  FOR %%B IN (Debug,Release) DO (
    CALL :BUILDLIB %%P %%B 35  v3.5   "CLASSIC;DESKTOP;FW35"
    CALL :BUILDLIB %%P %%B 40  v4.0   "CLASSIC;DESKTOP;FW4;FW40"
    CALL :BUILDLIB %%P %%B 45  v4.5   "CLASSIC;DESKTOP;FW4;FW45"
rem CALL :BUILDLIB %%P %%B 451 v4.5.1 "CLASSIC;DESKTOP;FW4;FW40;FW45;FW451"
    CALL :BUILDLIB %%P %%B 46  v4.6   "CLASSIC;DESKTOP;FW4;FW46"
rem CALL :BUILDLIB %%P %%B 461 v4.6.1 "CLASSIC;DESKTOP;FW4;FW46;FW461"
rem CALL :BUILDLIB %%P %%B 461 v4.6.2 "CLASSIC;DESKTOP;FW4;FW46;FW462"
  )
)

FOR %%P IN (mx64,PftBench) DO (
  FOR %%B IN (Debug,Release) DO (
    CALL :BUILDAPP %%P %%B 40  v4.0   "CLASSIC;DESKTOP;FW4;FW40"
    CALL :BUILDAPP %%P %%B 45  v4.5   "CLASSIC;DESKTOP;FW4;FW45"
    CALL :BUILDAPP %%P %%B 46  v4.6   "CLASSIC;DESKTOP;FW4;FW46"
  )
)

EXIT

:BUILDLIB
ECHO BUILD %1 %2 %4
"%MSBUILD%" Source\Classic\Libs\%1\%1.csproj /p:Configuration=%2 /p:TargetFrameworkVersion=%4  /p:OutputPath=%OUTPUT%\%2%3 %PARAMS% /p:DefineConstants=%5 /t:Rebuild
GOTO :END

:BUILDAPP
ECHO BUILD %1 %2 %4
"%MSBUILD%" Source\Classic\Apps\%1\%1.csproj /p:Configuration=%2 /p:TargetFrameworkVersion=%4  /p:OutputPath=%OUTPUT%\%2%3 %PARAMS% /p:DefineConstants=%5 /t:Rebuild
GOTO :END

:END

Add IrbisInterop to compile.cmd

Add IrbisInterop to compile.cmd


@echo off

echo Building NUI via OneScript...
call .\vendor\bin\nether-onescript build .\vendor\netherjs\nui\onescript.json

echo Copying NUI.JS to public web...
call copy .\vendor\netherjs\nui\dist\nui.js .\www\share\other\src\js\200-nui.js

echo COPYING NUI.CSS to public web...
call copy .\vendor\netherjs\nui\dist\nui.css .\www\share\other\src\css\200-nui.css

echo Building Public Web Script Bundle via OneScript...
call .\vendor\bin\nether-onescript build .\www\share\other\scripts.json

echo Building Public Web Stylesheet Bundle via Onescript...
call .\vendor\bin\nether-onescript build .\www\share\other\styles.json

@echo off

echo Building NUI via OneScript...
call .\vendor\bin\nether-onescript build .\vendor\netherjs\nui\onescript.json
echo.

echo Copying NUI.JS to public web...
call xcopy /Y /Q .\vendor\netherjs\nui\dist\nui.js .\www\share\other\src\js\200-nui.js
echo.

echo Copying NUI.CSS to public web...
call xcopy /Y /Q .\vendor\netherjs\nui\dist\nui.css .\www\share\other\src\css\200-nui.css
echo.

echo Copying NUI GFX to public web...
call xcopy /I /Y /Q .\vendor\netherjs\nui\dist\gfx .\www\share\other\dist\gfx
echo.

echo Building Public Web Script Bundle via OneScript...
call .\vendor\bin\nether-onescript build .\www\share\other\scripts.json
echo.

echo Building Public Web Stylesheet Bundle via Onescript...
call .\vendor\bin\nether-onescript build .\www\share\other\styles.json
echo.

include the nui gfx

include the nui gfx


cd bin
"C:\Program Files\Java\jdk1.8.0_101\bin\jar.exe" cmf ..\dover_manifest.mf ..\dover.jar uk\ac\kent\dover\fastGraph\*.class uk\ac\kent\dover\fastGraph\Gui\*.class uk\ac\kent\displayGraph\*.class uk\ac\kent\displayGraph\comparators\*.class uk\ac\kent\displayGraph\dialogs\*.class uk\ac\kent\displayGraph\display\*.class uk\ac\kent\displayGraph\drawers\*.class uk\ac\kent\displayGraph\experiments\*.class uk\ac\kent\displayGraph\utilities\*.class uk\ac\kent\displayGraph\views\*.class org\json\*.class org\json\LICENSE org\json\README uk\ac\kent\dover\license.txt uk\ac\kent\dover\README.md uk\ac\kent\displayGraph\license.txt uk\ac\kent\displayGraph\README.md ..\lib\Jama-1.0.1.jar ..\lib\commons-cli-1.3.1\commons-cli-1.3.1.jar ..\lib\jsoup-1.10.1.jar

cd ..
pause

cd bin
jar cmf ..\dover_manifest.mf ..\dover.jar uk\ac\kent\dover\fastGraph\*.class uk\ac\kent\dover\fastGraph\Gui\*.class uk\ac\kent\displayGraph\*.class uk\ac\kent\displayGraph\comparators\*.class uk\ac\kent\displayGraph\dialogs\*.class uk\ac\kent\displayGraph\display\*.class uk\ac\kent\displayGraph\drawers\*.class uk\ac\kent\displayGraph\experiments\*.class uk\ac\kent\displayGraph\utilities\*.class uk\ac\kent\displayGraph\views\*.class org\json\*.class org\json\LICENSE org\json\README uk\ac\kent\dover\license.txt uk\ac\kent\dover\README.md uk\ac\kent\displayGraph\license.txt uk\ac\kent\displayGraph\README.md ..\lib\Jama-1.0.1.jar ..\lib\commons-cli-1.3.1\commons-cli-1.3.1.jar ..\lib\jsoup-1.10.1.jar

cd ..
pause

Revert change to buildjar.bat

Revert change to buildjar.bat


docker build -t node 4.1
docker tag node:latest node:4.1.0

docker build -t node:onbuild 4.1/onbuild

Add build.bat

Add build.bat


@echo off
setlocal enabledelayedexpansion

TITLE D2GS Magic Builder for Windows
color 4f
echo.
echo /-\-/-\-/-\-/-\-/-\-  D 2 G S  M a g i c  B u i l d e r  -\-/-\-/-\-/-\-/-\-/-\
echo \                                                                             /
echo /   Copyright 2012-2015, HarpyWar (harpywar@gmail.com)                             \
echo \   http://harpywar.com                                                       /
echo /                                                                             \
echo \-/-\-/-\-/-\-/-\-/-\-/-\-/-\-/-\-/-\-/-\-/-\-/-\-/-\-/-\-/-\-/-\-/-\-/-\-/-\-/
set CURRENT_PATH=%~dp0
:: change path to where script was run
cd /D "%CURRENT_PATH%"

:: localization
@call module\i18n.inc.bat
set i18n=module\i18n.inc.bat

:: ----------- VARIABLES ------------
@set URL_MPQ=http://pvpgn-magic-builder.googlecode.com/svn/branches/diablo2/

@set D2GS_RELEASE=d2gs\

:: ----------- SETUP ------------
echo.
echo _______________________________[ S E T U P ]____________________________________

call %i18n% 9_1

:choose_version
echo    1) 1.13c (multithreaded)
echo    2) 1.13c
echo    3) 1.11b
echo    4) 1.10
echo    5) 1.09d
echo.
call %i18n% 1_9
module\choice /c:1234
set CHOICE_D2GSVER=%errorlevel%

if [%CHOICE_D2GSVER%]==[1] set D2GSVER=1.13c_m
if [%CHOICE_D2GSVER%]==[2] set D2GSVER=1.13c
if [%CHOICE_D2GSVER%]==[3] set D2GSVER=1.11b
if [%CHOICE_D2GSVER%]==[4] set D2GSVER=1.10
if [%CHOICE_D2GSVER%]==[5] set D2GSVER=1.09d

echo.
echo --------------------------------------------------------------------------------
:set_password
call %i18n% 9_2
set /p telnet_pass=:
if [%telnet_pass%]==[] goto :set_password

:: get password hash
for /f "delims=" %%a in ('module\bnhash.exe %telnet_pass%') do @set PASSHASH=%%a
echo.
call %i18n% 9_3 d2gs.reg
::echo %telnet_pass% = %PASSHASH%

echo.
echo --------------------------------------------------------------------------------
:mpq_download
call %i18n% 9_4
echo (d2data.mpq, d2exp.mpq, d2sfx.mpq, d2speech.mpq)
module\choice
if %errorlevel%==2 ( set CHOICE_MPQ=n) else ( set CHOICE_MPQ=y)

:: -----------  Download files ------------
echo.
echo _____________________________[ D O W N L O A D ]________________________________

if not exist "%D2GS_RELEASE%" mkdir "%D2GS_RELEASE%"

:: Download DLLs to the directory with selected version, so files will cached and not downloaded again next time
pushd module\include\d2gs

:: iterate files from filelist.txt
for /f "tokens=1,2 delims=: " %%a in ('%CURRENT_PATH%module\autoupdate\md5sum.exe -c %D2GSVER%\filelist.txt') do (
	:: if checksum is wrong or file does not exists, then download
	if ["%%b"]==["FAILED"] @call :download %%a
)

:: Download MPQs if required
popd
pushd %D2GS_RELEASE%

if not [%CHOICE_MPQ%]==[n] (
	:: iterate files from filelist.txt
	for /f "tokens=1,2 delims=: " %%a in ('%CURRENT_PATH%module\autoupdate\md5sum.exe -c %CURRENT_PATH%module\include\d2gs\filelist.txt') do (
		:: if checksum is wrong or file does not exists, then download
		if ["%%b"]==["FAILED"] @call :download %%a
	)
)
popd

:: -----------  Copy D2GS files ------------
echo.
echo _______________________________[ B U I L D ]____________________________________

:: 1) backup large mpq files
@mkdir "%D2GS_RELEASE%mpq.bkp"
@move /Y "%D2GS_RELEASE%*.mpq" "%D2GS_RELEASE%mpq.bkp"
:: 2) erase release dir
@erase /Q "%D2GS_RELEASE%*.*">nul
:: 3) restore large mpq files
@move /Y "%D2GS_RELEASE%mpq.bkp\*.mpq" "%D2GS_RELEASE%"
@rmdir /S /Q "%D2GS_RELEASE%mpq.bkp"

:: 4) copy d2gs files directory
@copy /Y "module\include\d2gs\%D2GSVER%" "%D2GS_RELEASE%"
@copy /Y "module\include\d2gs\*" "%D2GS_RELEASE%"
@del "%D2GS_RELEASE%filelist.txt"

:: 5) change password hash in d2gs.reg
echo.
set str_find=[[quote]]AdminPassword[[quote]]
set str_replace=[[quote]]AdminPassword[[quote]]=[[quote]]%PASSHASH%[[quote]]
for /f "delims=" %%a in ('cscript "module\replace_line.vbs" "d2gs\d2gs.reg" "!str_find!" "!str_replace!"') do set res=%%a
if ["!res!"]==["ok"] ( echo AdminPassword was updated in %D2GS_RELEASE%d2gs.reg ) else ( echo Error: AdminPassword was not updated in %D2GS_RELEASE%d2gs.reg)

:: 5) if 64-bit OS then change registry path in d2gs.reg
if defined ProgramFiles(x86) (
	echo.
	echo 64-bit OS detected, registry path will changed...
	set str_find=[HKEY_LOCAL_MACHINE\SOFTWARE\D2Server\D2GS]
	set str_replace=[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\D2Server\D2GS]
	for /f "delims=" %%a in ('cscript "module\replace_line.vbs" "d2gs\d2gs.reg" "!str_find!" "!str_replace!"') do set res=%%a
	if ["!res!"]==["ok"] ( echo Registry path was updated in %D2GS_RELEASE%d2gs.reg ) else ( echo Error: Registry path was not updated in %D2GS_RELEASE%d2gs.reg)
)

goto :THEEND

:: downloads a file %1
:download
	:: replace \ to / in remote path dir
	set f_tmp=%URL_MPQ%%1
	set f_remote=%f_tmp:\=/%
	:: get filename from path
	rem for %%x in (%1.META) do set f_name=%%~nx

	call %i18n% 3_8 "%f_local%"
	:: download file from the remote url to local file with overwrite
	for /f "delims=" %%a in ('%CURRENT_PATH%module\autoupdate\wget.exe "%f_remote%" -O "%1"') do echo.

	exit /b 0

:THEEND
echo.
echo ___________________________[ C O M P L E T E ]__________________________________
call %i18n% 9_9
echo.
echo.

:: wait for any key
pause

@echo off
setlocal enabledelayedexpansion

TITLE D2GS Magic Builder for Windows
color 4f
echo.
echo /-\-/-\-/-\-/-\-/-\-  D 2 G S  M a g i c  B u i l d e r  -\-/-\-/-\-/-\-/-\-/-\
echo \                                                                             /
echo /   Copyright 2012-2015, HarpyWar (harpywar@gmail.com)                             \
echo \   http://harpywar.com                                                       /
echo /                                                                             \
echo \-/-\-/-\-/-\-/-\-/-\-/-\-/-\-/-\-/-\-/-\-/-\-/-\-/-\-/-\-/-\-/-\-/-\-/-\-/-\-/
set CURRENT_PATH=%~dp0
:: change path to where script was run
cd /D "%CURRENT_PATH%"

:: localization
@call module\i18n.inc.bat
set i18n=module\i18n.inc.bat

:: ----------- VARIABLES ------------
@set URL_MPQ=http://pvpgn-magic-builder.googlecode.com/svn/branches/diablo2/

@set D2GS_RELEASE=d2gs\

:: ----------- SETUP ------------
echo.
echo _______________________________[ S E T U P ]____________________________________

call %i18n% 9_1

:choose_version
echo    1) 1.13c (multithreaded)
echo    2) 1.13c
echo    3) 1.11b
echo    4) 1.10
echo    5) 1.09d
echo.
call %i18n% 1_9
module\choice /c:12345
set CHOICE_D2GSVER=%errorlevel%

if [%CHOICE_D2GSVER%]==[1] set D2GSVER=1.13c_m
if [%CHOICE_D2GSVER%]==[2] set D2GSVER=1.13c
if [%CHOICE_D2GSVER%]==[3] set D2GSVER=1.11b
if [%CHOICE_D2GSVER%]==[4] set D2GSVER=1.10
if [%CHOICE_D2GSVER%]==[5] set D2GSVER=1.09d

echo.
echo --------------------------------------------------------------------------------
:set_password
call %i18n% 9_2
set /p telnet_pass=:
if [%telnet_pass%]==[] goto :set_password

:: get password hash
for /f "delims=" %%a in ('module\bnhash.exe %telnet_pass%') do @set PASSHASH=%%a
echo.
call %i18n% 9_3 d2gs.reg
::echo %telnet_pass% = %PASSHASH%

echo.
echo --------------------------------------------------------------------------------
:mpq_download
call %i18n% 9_4
echo (d2data.mpq, d2exp.mpq, d2sfx.mpq, d2speech.mpq)
module\choice
if %errorlevel%==2 ( set CHOICE_MPQ=n) else ( set CHOICE_MPQ=y)

:: -----------  Download files ------------
echo.
echo _____________________________[ D O W N L O A D ]________________________________

if not exist "%D2GS_RELEASE%" mkdir "%D2GS_RELEASE%"

:: Download DLLs to the directory with selected version, so files will cached and not downloaded again next time
pushd module\include\d2gs

:: iterate files from filelist.txt
for /f "tokens=1,2 delims=: " %%a in ('%CURRENT_PATH%module\autoupdate\md5sum.exe -c %D2GSVER%\filelist.txt') do (
	:: if checksum is wrong or file does not exists, then download
	if ["%%b"]==["FAILED"] @call :download %%a
)

:: Download MPQs if required
popd
pushd %D2GS_RELEASE%

if not [%CHOICE_MPQ%]==[n] (
	:: iterate files from filelist.txt
	for /f "tokens=1,2 delims=: " %%a in ('%CURRENT_PATH%module\autoupdate\md5sum.exe -c %CURRENT_PATH%module\include\d2gs\filelist.txt') do (
		:: if checksum is wrong or file does not exists, then download
		if ["%%b"]==["FAILED"] @call :download %%a
	)
)
popd

:: -----------  Copy D2GS files ------------
echo.
echo _______________________________[ B U I L D ]____________________________________

:: 1) backup large mpq files
@mkdir "%D2GS_RELEASE%mpq.bkp"
@move /Y "%D2GS_RELEASE%*.mpq" "%D2GS_RELEASE%mpq.bkp"
:: 2) erase release dir
@erase /Q "%D2GS_RELEASE%*.*">nul
:: 3) restore large mpq files
@move /Y "%D2GS_RELEASE%mpq.bkp\*.mpq" "%D2GS_RELEASE%"
@rmdir /S /Q "%D2GS_RELEASE%mpq.bkp"

:: 4) copy d2gs files directory
@copy /Y "module\include\d2gs\%D2GSVER%" "%D2GS_RELEASE%"
@copy /Y "module\include\d2gs\*" "%D2GS_RELEASE%"
@del "%D2GS_RELEASE%filelist.txt"

:: 5) change password hash in d2gs.reg
echo.
set str_find=[[quote]]AdminPassword[[quote]]
set str_replace=[[quote]]AdminPassword[[quote]]=[[quote]]%PASSHASH%[[quote]]
for /f "delims=" %%a in ('cscript "module\replace_line.vbs" "d2gs\d2gs.reg" "!str_find!" "!str_replace!"') do set res=%%a
if ["!res!"]==["ok"] ( echo AdminPassword was updated in %D2GS_RELEASE%d2gs.reg ) else ( echo Error: AdminPassword was not updated in %D2GS_RELEASE%d2gs.reg)

:: 5) if 64-bit OS then change registry path in d2gs.reg
if defined ProgramFiles(x86) (
	echo.
	echo 64-bit OS detected, registry path will changed...
	set str_find=[HKEY_LOCAL_MACHINE\SOFTWARE\D2Server\D2GS]
	set str_replace=[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\D2Server\D2GS]
	for /f "delims=" %%a in ('cscript "module\replace_line.vbs" "d2gs\d2gs.reg" "!str_find!" "!str_replace!"') do set res=%%a
	if ["!res!"]==["ok"] ( echo Registry path was updated in %D2GS_RELEASE%d2gs.reg ) else ( echo Error: Registry path was not updated in %D2GS_RELEASE%d2gs.reg)
)

goto :THEEND

:: downloads a file %1
:download
	:: replace \ to / in remote path dir
	set f_tmp=%URL_MPQ%%1
	set f_remote=%f_tmp:\=/%
	:: get filename from path
	rem for %%x in (%1.META) do set f_name=%%~nx

	call %i18n% 3_8 "%f_local%"
	:: download file from the remote url to local file with overwrite
	for /f "delims=" %%a in ('%CURRENT_PATH%module\autoupdate\wget.exe "%f_remote%" -O "%1"') do echo.

	exit /b 0

:THEEND
echo.
echo ___________________________[ C O M P L E T E ]__________________________________
call %i18n% 9_9
echo.
echo.

:: wait for any key
pause

Update build_d2gs.bat

Update build_d2gs.bat

fixed can't d2gs 1.09d


@if defined ELIXIR_CLI_ECHO (@echo on) else  (@echo off)
call "%~dp0\elixir.bat" +iex --erl "-user Elixir.IEx.CLI" --no-halt %*

@if defined ELIXIR_CLI_ECHO (@echo on) else  (@echo off)
call "%~dp0\elixir.bat" +iex --erl "-user Elixir.IEx.CLI" --no-halt %ELIXIR_IEX_FLAGS% %*

Add environment variable to iex.bat so user can default to --werl if desired.


adb disconnect
adb forward --remove tcp:4444
adb forward tcp:4444 localabstract:/adb-hub
adb connect 127.0.0.1:4444

feat: Add a command file for connecting to the watch

Add a command file for connecting to the watch.
See http://stackoverflow.com/questions/29656967/trouble-debugging-android-wear-over-bluetooth-unable-to-connect-to-localhost
for details

Basically this:
rem first remove port forwarding;
adb forward --remove tcp:4444

rem then do port forwarding steps from the begining
adb forward tcp:4444 localabstract:/adb-hub
adb connect localhost:4444


@echo on
choco install -y --allowEmptyChecksum firefox googlechrome wget notepadplusplus sublimetext3 mono monodevelop gtksharp visualstudiocode p4merge dotnet4.5 nodejs.install conemu dejavufonts ag golang
call refreshenv

wget -c https://cygwin.com/setup-x86_64.exe
setup-x86_64.exe -R "C:\cygwin64" -s http://mirror.switch.ch/ftp/mirror/cygwin/ -q -g -P curl,zsh,git,vim,wget,xz,tar,gawk,bzip2,subversion,zlib,fontconfig,clang,cmake,lua,perl,the_silver_searcher,gnupg,patch,zlib-devel,openssl-devel,libyaml-devel,libyaml0_2,sqlite3,make,libtool,autoconf,automake,bison,m4,mingw64-i686-gcc-core,mingw64-x86_64-gcc-core,patch,cygwin32-readline,libcrypt-devel,libcrypt0,ncurses,libncurses-devel,python-devel

set script_path=%~dp0
set repo_path=%script_path%\..\
set bash=c:\cygwin64\bin\bash.exe --login -c

for /f "delims=" %%A in ('%bash% "cd `cygpath $HOMEPATH`/dev/dotfiles && git rev-parse --abbrev-ref HEAD"') do set "branch=%%A"
%bash% 'echo "branch is $branch"'
%bash% "cp -vr `cygpath $HOMEPATH`/.ssh $HOME/"
%bash% "export OUTER_CLONE=`cygpath $repo_path` && $script_path/build_insider.sh"

@echo on
choco install -y --allowEmptyChecksum firefox googlechrome wget notepadplusplus sublimetext3 mono monodevelop gtksharp visualstudiocode p4merge dotnet4.5 nodejs.install conemu dejavufonts ag golang
call refreshenv

wget -c https://cygwin.com/setup-x86_64.exe
setup-x86_64.exe -R "C:\cygwin64" -s http://mirror.switch.ch/ftp/mirror/cygwin/ -q -g -P curl,zsh,git,vim,wget,xz,tar,gawk,bzip2,subversion,zlib,fontconfig,clang,cmake,lua,perl,the_silver_searcher,gnupg,patch,zlib-devel,openssl-devel,libyaml-devel,libyaml0_2,sqlite3,make,libtool,autoconf,automake,bison,m4,mingw64-i686-gcc-core,mingw64-x86_64-gcc-core,patch,cygwin32-readline,libcrypt-devel,libcrypt0,ncurses,libncurses-devel,python-devel,libxslt,libxslt-devel,libjpeg-devel

set script_path=%~dp0
set repo_path=%script_path%\..\
set bash=c:\cygwin64\bin\bash.exe --login -c

for /f "delims=" %%A in ('%bash% "cd `cygpath $HOMEPATH`/dev/dotfiles && git rev-parse --abbrev-ref HEAD"') do set "branch=%%A"
%bash% 'echo "branch is $branch"'
%bash% "cp -vr `cygpath $HOMEPATH`/.ssh $HOME/"
%bash% "export OUTER_CLONE=`cygpath $repo_path` && $script_path/build_insider.sh"

Add Nikola's dependencies on cygwin

Add Nikola's dependencies on cygwin


@echo off

:: hook `nodist use <version>`
if "%1"=="use" (
  call %0 + %2
  if ERRORLEVEL 0 (
    :: get path to version and add it to PATH
    FOR /F "tokens=1 delims=" %%A in ('"%0" path %2') do @set "Path=%%A;%Path%"
  )
  goto end
)

:: hook `nodist update`
if "%1"=="update" (
  :: rescue our hacked npm.cmd from `npm update`'s fangs
  copy /Y "%~dp0\npm.cmd" "%~dp0\npm.copy.cmd"
  cmd /C npm update npm -g
  del /F "%~dp0\npm.cmd"
  move /Y "%~dp0\npm.copy.cmd" "%~dp0\npm.cmd"

  pushd .
  cd /D "%~dp0"
  cd ..
  npm update
  popd
)

:main
"%~dp0..\node.exe" "%~dp0..\cli" %*
goto end

:end

@echo off

:: hook `nodist use <version>`
if "%1"=="use" (
  call %0 + %2
  if ERRORLEVEL 0 (
    :: get path to version and add it to PATH
    FOR /F "tokens=1 delims=" %%A in ('"%0" path %2') do @set "Path=%%A;%Path%"
  )
  goto end
)

:: hook `nodist update`
if "%1"=="update" (
  :: rescue our hacked npm.cmd from `npm update`'s fangs
  copy /Y "%~dp0\npm.cmd" "%~dp0\npm.copy.cmd"
  cmd /C npm update npm -g
  del /F "%~dp0\npm.cmd"
  move /Y "%~dp0\npm.copy.cmd" "%~dp0\npm.cmd"

  pushd .
  cd /D "%~dp0"
  cd ..
  cmd /C npm update
  popd
)

:main
"%~dp0..\node.exe" "%~dp0..\cli" %*
goto end

:end

Put `npm update` into it's own shell

Put `npm update` into it's own shell


@echo off
echo %cd%
set scriptLocation=%cd%
FOR /F "tokens=1,2 delims==" %%G IN (env.properties) DO (set %%G=%%H)
echo Project Dir: %projectDir% , Application: %applicationName%
cd %projectDir%\%applicationName%
call mvn clean install -DskipTests
cd %scriptLocation%
call redeployApplication.bat
REM pause

add scripts in eclipse

add scripts in eclipse


@echo off

echo Building dependencies...

if exist lib (rd lib /q /s)
md lib
cd lib
md Debug
md Release
cd ../

REM If your path is different with below, please change to your install path
set %VS150COMNTOOLS%=C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\Tools\
echo "%VS150COMNTOOLS%..\IDE\Devenv"

REM ######################################################################################################
echo Building protobuf...

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

cd protobuf/cmake
md build
cd build
cmake -G "Visual Studio 15 Win64" -Dprotobuf_BUILD_SHARED_LIBS=ON -Dprotobuf_BUILD_TESTS=OFF ..
"%VS150COMNTOOLS%..\IDE\Devenv" protobuf.sln /build "Debug|x64"
"%VS150COMNTOOLS%..\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 15 Win64" -DEVENT__DISABLE_OPENSSL=ON ..
"%VS150COMNTOOLS%..\IDE\Devenv" libevent.sln /build "Debug|x64" /project event_core_static.vcxproj
"%VS150COMNTOOLS%..\IDE\Devenv" libevent.sln /build "Release|x64" /project event_core_static.vcxproj
"%VS150COMNTOOLS%..\IDE\Devenv" libevent.sln /build "Debug|x64" /project event_static.vcxproj
"%VS150COMNTOOLS%..\IDE\Devenv" libevent.sln /build "Release|x64" /project event_static.vcxproj
"%VS150COMNTOOLS%..\IDE\Devenv" libevent.sln /build "Debug|x64" /project event_extra_static.vcxproj
"%VS150COMNTOOLS%..\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 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 15 Win64" -DLIBEVENT_DIR=..\libevent -DLIBEVENT_LIB_DIR=..\lib\Release ..
"%VS150COMNTOOLS%..\IDE\Devenv" evpp.sln /build "Debug|x64" /project evpp/evpp_static.vcxproj
"%VS150COMNTOOLS%..\IDE\Devenv" 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 ..\

@echo off

echo Building dependencies...

if exist lib (rd lib /q /s)
md lib
cd lib
md Debug
md Release
cd ../

REM If your path is different with below, please change to your install path
set VS150COMNTOOLS=C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\Tools\
echo "%VS150COMNTOOLS%..\IDE\Devenv"

REM ######################################################################################################
echo Building protobuf...

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

cd protobuf/cmake
md build
cd build
cmake -G "Visual Studio 15 Win64" -Dprotobuf_BUILD_SHARED_LIBS=ON -Dprotobuf_BUILD_TESTS=OFF ..
"%VS150COMNTOOLS%..\IDE\Devenv" protobuf.sln /build "Debug|x64"
"%VS150COMNTOOLS%..\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 15 Win64" -DEVENT__DISABLE_OPENSSL=ON ..
"%VS150COMNTOOLS%..\IDE\Devenv" libevent.sln /build "Debug|x64" /project event_core_static.vcxproj
"%VS150COMNTOOLS%..\IDE\Devenv" libevent.sln /build "Release|x64" /project event_core_static.vcxproj
"%VS150COMNTOOLS%..\IDE\Devenv" libevent.sln /build "Debug|x64" /project event_static.vcxproj
"%VS150COMNTOOLS%..\IDE\Devenv" libevent.sln /build "Release|x64" /project event_static.vcxproj
"%VS150COMNTOOLS%..\IDE\Devenv" libevent.sln /build "Debug|x64" /project event_extra_static.vcxproj
"%VS150COMNTOOLS%..\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 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 15 Win64" -DLIBEVENT_DIR=..\libevent -DLIBEVENT_LIB_DIR=..\lib\Release ..
"%VS150COMNTOOLS%..\IDE\Devenv" evpp.sln /build "Debug|x64" /project evpp/evpp_static.vcxproj
"%VS150COMNTOOLS%..\IDE\Devenv" 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 ..\

modify build_dep.bat ,fix set environment variables

Former-commit-id: 13c8155c8b009420a66dc8989484c7c30259edb9 [formerly b74ed3531e9ebbf0bc29ac58815fcdebc418e212] [formerly 3eeebd352c3df925e3d85f0788cd17f81a83fd22 [formerly 37a43f883979c219a43422717c7c9cd2876510f7]]
Former-commit-id: 0f1be230a295534e9126b8eadafd5c01b3690573 [formerly 95c3a3a42b517dbfe4540f24fbdb91bdf3d359ce]
Former-commit-id: 10079c8f86c576da61f88f4d3d36ad1b3ddab665


@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
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...

REM close vcpkg setup task
tarkkill /IM /F /T Microsoft.VisualStudio.Setup.Configuration.Console.exe
if exist evpp (rd evpp /q /s)
git clone -b master https://github.com/Qihoo360/evpp.git

cd evpp
md build
cd build
git clone https://github.com/Microsoft/vcpkg.git
cd vcpkg
call bootstrap-vcpkg.bat
vcpkg install evpp:x64-windows

copy packages\evpp_x64-windows\debug\lib\evpp*.lib ..\..\..\lib\Debug /Y
copy packages\evpp_x64-windows\lib\evpp*.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
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 evpp_static.vcxproj
"%VS140COMNTOOLS%..\IDE\Devenv" libevpp.sln /build "Release|x64" /project evpp_static.vcxproj
cd ..\..\
REM ####################################################################################################
REM back to root dir
cd ../

modify evpp use a clone

modify evpp use a clone

Former-commit-id: 6f5065067293c5d9238a6efbe1b94e52def567d1 [formerly 852375885f5e3e1cb41000748ff5f59f98224907] [formerly 9b4f2edb594b0a60d45ebd86510d9c6dea722395] [formerly f6344e39bb8fad0616625f530520a0eac0492bea]
Former-commit-id: 4a95fc45676b7524a3b90f0a9b1eadede396be26
Former-commit-id: 03235cabe7562260604c992232c39903e747ab59
Former-commit-id: 9ce6f2ea31b77a9e4fbd173e7867122d1537689b


set MAPNIK_INPUT_PLUGINS=c:\\mapnik-2.0\\lib\\mapnik\\input
set MAPNIK_FONTS=c:\\mapnik-2.0\\lib\\mapnik\\fonts
set target=Build
set config=Release
python gen_settings.py
python gyp/gyp build.gyp --depth=. -f msvs -G msvs_version=2010
;msbuild build.sln /t:%target% /p:Configuration=%config%
msbuild build.sln
;cp projects/makefiles/out/Default/_mapnik.node lib/_mapnik.node

set MAPNIK_INPUT_PLUGINS=c:\\mapnik-2.0\\lib\\mapnik\\input
set MAPNIK_FONTS=c:\\mapnik-2.0\\lib\\mapnik\\fonts
set target=Build
set config=Release
python gen_settings.py
python gyp/gyp build.gyp --depth=. -f msvs -G msvs_version=2010
rem msbuild build.sln /t:%target% /p:Configuration=%config%
msbuild build.sln
rem cp projects/makefiles/out/Default/_mapnik.node lib/_mapnik.node

comment out lines in windows build script


@ echo off
set base_dir=%~dp0
%base_dir:~0,2%
pushd %base_dir%
echo # %time%  >> data/log/%date:~0,4%-%date:~5,2%-%date:~8,2%.log
python run.py >> data/log/%date:~0,4%-%date:~5,2%-%date:~8,2%.log
popd

@ echo off
set base_dir=%~dp0
%base_dir:~0,2%
pushd %base_dir%
echo # %time%  >> data/log/%date:~0,4%-%date:~5,2%.log
python run.py >>  data/log/%date:~0,4%-%date:~5,2%.log
popd

change log time

change log time


set "ERRORS="
   call wlog.bat build_bzip.bat ^
&& call wlog.bat build_iconv.bat ^
&& call wlog.bat build_libpng.bat ^
&& call wlog.bat build_sqlite.bat ^
&& call wlog.bat build_freexl.bat ^
&& call wlog.bat build_geos.bat ^
&& call wlog.bat build_readosm.bat ^
&& call wlog.bat build_spatialite.bat ^
&& call wlog.bat build_spatialite_tools.bat ^
&& call wlog.bat build_curl.bat ^
&& del /y %prefix%\bin\curl.exe ^
&& call wlog.bat build_gdal.bat

echo Builds with errors: %ERRORS%

set "ERRORS="
   call wlog.bat build_bzip.bat ^
&& call wlog.bat build_iconv.bat ^
&& call wlog.bat build_libpng.bat ^
&& call wlog.bat build_sqlite.bat ^
&& call wlog.bat build_freexl.bat ^
&& call wlog.bat build_geos.bat ^
&& call wlog.bat build_readosm.bat ^
&& call wlog.bat build_spatialite.bat ^
&& call wlog.bat build_spatialite_tools.bat ^
&& call wlog.bat build_curl.bat ^
&& del /y %prefix%\bin\curl.exe ^
&& call wlog.bat build_gdal2.bat

echo Builds with errors: %ERRORS%

use gdal2 by default

use gdal2 by default


mklink /j C:\Users\Trent\bin C:\Users\Trent\.dotfiles\bin
mklink /j C:\Users\Trent\vimfiles C:\Users\Trent\.dotfiles\vimfiles
mklink /j C:\Users\Trent\.git_template C:\Users\Trent\.dotfiles\.git_template
mklink /j C:\Users\Trent\.prompts C:\Users\Trent\.dotfiles\prompts
mklink /j C:\Users\Trent\.zsh C:\Users\Trent\.dotfiles\zsh
mklink C:\Users\Trent\.bash_profile C:\Users\Trent\.dotfiles\.bash_profile
mklink C:\Users\Trent\.bashrc C:\Users\Trent\.dotfiles\.bashrc
mklink "C:\\Program Files\\ConEmu\\ConEmu.xml C:\Users\Trent\.dotfiles\ConEmu.xml
mklink C:\Users\Trent\.curlrc C:\Users\Trent\.dotfiles\.curlrc
mklink C:\Users\Trent\.editorconfig C:\Users\Trent\.dotfiles\.editorconfig
mklink C:\Users\Trent\.gitconfig C:\Users\Trent\.dotfiles\.gitconfig
mklink C:\Users\Trent\.gitignore C:\Users\Trent\.dotfiles\.gitignore
mklink C:\Users\Trent\.jscs.json C:\Users\Trent\.dotfiles\.jscs.json
mklink C:\Users\Trent\.jshintrc C:\Users\Trent\.dotfiles\.jshintrc
mklink C:\Users\Trent\.vimrc C:\Users\Trent\.dotfiles\.vimrc
::mklink C:\Windows\System32\WindowsPowerShell\v1.0\profile.ps1 C:\Users\Trent\.dotfiles\PowerShell\profile.ps1
::mklink C:\Users\Trent\Documents\WindowsPowerShell\PowerTabConfig.xml C:\Users\Trent\.dotfiles\PowerShell\PowerTabConfig.xml
::mklink C:\Users\Trent\Documents\WindowsPowerShell\TabExpansion.xml C:\Users\Trent\.dotfiles\PowerShell\TabExpansion.xml
mklink C:\Users\Trent\.agignore C:\Users\Trent\.dotfiles\.agignore
mklink C:\Users\Trent\.pryrc C:\Users\Trent\.dotfiles\.pryrc
mklink C:\Users\Trent\.gemrc C:\Users\Trent\.dotfiles\.gemrc
mklink C:\Users\Trent\.tmux.conf C:\Users\Trent\.dotfiles\.tmux.conf
mklink C:\Users\Trent\.zshrc C:\Users\Trent\.dotfiles\.zshrc
mklink C:\Users\Trent\.aprc C:\Users\Trent\.dotfiles\.aprc
mklink C:\Users\Trent\.ctags C:\Users\Trent\.dotfiles\.ctags

pause

mklink /j C:\Users\tscheffert\bin C:\Users\tscheffert\.dotfiles\bin
mklink /j C:\Users\tscheffert\vimfiles C:\Users\tscheffert\.dotfiles\vimfiles
mklink /j C:\Users\tscheffert\.git_template C:\Users\tscheffert\.dotfiles\.git_template
mklink /j C:\Users\tscheffert\.prompts C:\Users\tscheffert\.dotfiles\prompts
mklink /j C:\Users\tscheffert\.zsh C:\Users\tscheffert\.dotfiles\zsh
mklink C:\Users\tscheffert\.bash_profile C:\Users\tscheffert\.dotfiles\.bash_profile
mklink C:\Users\tscheffert\.bashrc C:\Users\tscheffert\.dotfiles\.bashrc
mklink "C:\\Program Files\\ConEmu\\ConEmu.xml" C:\Users\tscheffert\.dotfiles\ConEmu.xml
mklink C:\Users\tscheffert\.curlrc C:\Users\tscheffert\.dotfiles\.curlrc
mklink C:\Users\tscheffert\.editorconfig C:\Users\tscheffert\.dotfiles\.editorconfig
mklink C:\Users\tscheffert\.gitconfig C:\Users\tscheffert\.dotfiles\.gitconfig
mklink C:\Users\tscheffert\.gitignore C:\Users\tscheffert\.dotfiles\.gitignore
mklink C:\Users\tscheffert\.jscs.json C:\Users\tscheffert\.dotfiles\.jscs.json
mklink C:\Users\tscheffert\.jshintrc C:\Users\tscheffert\.dotfiles\.jshintrc
mklink C:\Users\tscheffert\.vimrc C:\Users\tscheffert\.dotfiles\.vimrc
::mklink C:\Windows\System32\WindowsPowerShell\v1.0\profile.ps1 C:\Users\tscheffert\.dotfiles\PowerShell\profile.ps1
::mklink C:\Users\tscheffert\Documents\WindowsPowerShell\PowerTabConfig.xml C:\Users\tscheffert\.dotfiles\PowerShell\PowerTabConfig.xml
::mklink C:\Users\tscheffert\Documents\WindowsPowerShell\TabExpansion.xml C:\Users\tscheffert\.dotfiles\PowerShell\TabExpansion.xml
mklink C:\Users\tscheffert\.agignore C:\Users\tscheffert\.dotfiles\.agignore
mklink C:\Users\tscheffert\.pryrc C:\Users\tscheffert\.dotfiles\.pryrc
mklink C:\Users\tscheffert\.gemrc C:\Users\tscheffert\.dotfiles\.gemrc
mklink C:\Users\tscheffert\.tmux.conf C:\Users\tscheffert\.dotfiles\.tmux.conf
mklink C:\Users\tscheffert\.zshrc C:\Users\tscheffert\.dotfiles\.zshrc
mklink C:\Users\tscheffert\.aprc C:\Users\tscheffert\.dotfiles\.aprc
mklink C:\Users\tscheffert\.ctags C:\Users\tscheffert\.dotfiles\.ctags

pause

Fix bootstrap.bat missing double quote

Bootstrap: Fix bootstrap.bat missing double quote


SET GOPATH=%CD%\go
SET GATSPATH=%GOPATH%\src\code.cloudfoundry.org\cli
SET CF_DIAL_TIMEOUT=15

SET PATH=C:\Go\bin;%PATH%
SET PATH=C:\Program Files\Git\cmd\;%PATH%
SET PATH=%GOPATH%\bin;%PATH%
SET PATH=C:\Program Files\GnuWin32\bin;%PATH%
SET PATH=C:\Program Files\cURL\bin;%PATH%
SET PATH=%CD%;%PATH%

SET /p DOMAIN=<%CD%\bosh-lite-lock\name
SET /p CF_PASSWORD=<%CD%\cf-credentials\cf-password
SET CF_API=https://api.%DOMAIN%
call %CD%\cli-ci\ci\cli\tasks\create-cats-config.bat
SET CONFIG=%CD%\config.json

pushd %CD%\cf-cli-binaries
	gzip -d cf-cli-binaries.tgz
	tar -xvf cf-cli-binaries.tar
	MOVE %CD%\cf-cli_winx64.exe ..\cf.exe
popd

go get -v -u github.com/onsi/ginkgo/ginkgo

cd %GATSPATH%
ginkgo.exe -r -nodes=16 -flakeAttempts=2 -slowSpecThreshold=60 -randomizeAllSpecs ./integration/isolated ./integration/plugin || exit 1
ginkgo.exe -r -flakeAttempts=2 -slowSpecThreshold=60 -randomizeAllSpecs -skip=NON_WINDOWS ./integration/global || exit 1

SET GOPATH=%CD%\go
SET GATSPATH=%GOPATH%\src\code.cloudfoundry.org\cli
SET CF_DIAL_TIMEOUT=15

SET PATH=C:\Go\bin;%PATH%
SET PATH=C:\Program Files\Git\cmd\;%PATH%
SET PATH=%GOPATH%\bin;%PATH%
SET PATH=C:\Program Files\GnuWin32\bin;%PATH%
SET PATH=C:\Program Files\cURL\bin;%PATH%
SET PATH=%CD%;%PATH%

SET /p DOMAIN=<%CD%\bosh-lite-lock\name
SET /p CF_PASSWORD=<%CD%\cf-credentials\cf-password
SET CF_API=https://api.%DOMAIN%
call %CD%\cli-ci\ci\cli\tasks\create-cats-config.bat
SET CONFIG=%CD%\config.json

pushd %CD%\cf-cli-binaries
	gzip -d cf-cli-binaries.tgz
	tar -xvf cf-cli-binaries.tar
	MOVE %CD%\cf-cli_winx64.exe ..\cf.exe
popd

go get -v -u github.com/onsi/ginkgo/ginkgo

cd %GATSPATH%
ginkgo.exe -r -nodes=16 -flakeAttempts=2 -slowSpecThreshold=60 -randomizeAllSpecs -skip=NON_WINDOWS ./integration/isolated ./integration/plugin || exit 1
ginkgo.exe -r -flakeAttempts=2 -slowSpecThreshold=60 -randomizeAllSpecs ./integration/global || exit 1

migrate skip flag with integration/plugins test

[#143975669]

Signed-off-by: Stu Pollock <f92a33a5576f99e8c458f20aa3ed76c650ba4a5c@pivotal.io>


@ECHO OFF
"..\..\..\packages\OpenCover.4.5.3723\OpenCover.Console.exe" -target:"..\..\..\packages\NUnit.Runners.2.6.4\tools\nunit-console.exe" -targetargs:"ShoppingListApp.Domain.Test.dll /noshadow /nologo /framework:net-4.5.1" -register:"user" -mergebyhash
if %ERRORLEVEL% GEQ 1 GOTO ERROR

DEL /F /Q ".\coverage\*.*"
if %ERRORLEVEL% GEQ 1 GOTO ERROR

"..\..\..\packages\ReportGenerator.2.1.3.0\reportgenerator.exe" -reports:"results.xml" -targetdir:"coverage" Verbosity:"Error"
if %ERRORLEVEL% GEQ 1 GOTO ERROR

REM Firefox is causing the batch file to return an error code 1
"C:\Program Files (x86)\Mozilla Firefox\firefox.exe" ".\coverage\index.htm"
exit 0

:ERROR
exit 2

@ECHO OFF
"..\..\..\packages\OpenCover.4.5.3723\OpenCover.Console.exe" -target:"..\..\..\packages\NUnit.Runners.2.6.4\tools\nunit-console.exe" -targetargs:"ShoppingListApp.Domain.Test.dll /noshadow /nologo /framework:net-4.5.1" -register:"user" -mergebyhash
if %ERRORLEVEL% GEQ 1 GOTO ERROR

DEL /F /Q ".\coverage\*.*"
if %ERRORLEVEL% GEQ 1 GOTO ERROR

"..\..\..\packages\ReportGenerator.2.1.3.0\reportgenerator.exe" -reports:"results.xml" -targetdir:"coverage" Verbosity:"Error"
if %ERRORLEVEL% GEQ 1 GOTO ERROR

REM Firefox is causing the batch file to return an error code 1
"C:\Program Files (x86)\Mozilla Firefox\firefox.exe" ".\coverage\index.htm"
exit 0

:ERROR
exit 0

[CHG] return always exit 0 for the batch file. Activate then only locally the diagnosis when needed.


@echo off
::Check versions
IF [%1] == [] (
	echo "Set UI version as parameter!"
	EXIT /B
)

::Set package version in files
powershell -NoProfile -ExecutionPolicy Bypass -Command ".\SetVersion.ps1 %1"

pushd ..
::Clear build artifacts
rd /S /Q out\

::Build project
call bower install
call grunt build
popd

::Create packages
nuget Pack UI.nuspec

::Clean up
del UI.nuspec /Q /F

@echo off
::Check versions
IF [%1] == [] (
	echo "Set UI version as parameter!"
	EXIT /B
)

::Set package version in files
powershell -NoProfile -ExecutionPolicy Bypass -Command ".\SetVersion.ps1 %1"

pushd ..
::Clear build artifacts
rd /S /Q out\

::Build project
call npm install
call bower install
call grunt build
popd

::Create packages
nuget Pack UI.nuspec

::Clean up
del UI.nuspec /Q /F

fix .nuget

fix .nuget


SET builddir=%SRC_DIR%\..\build_dir

rmdir /s /q %builddir%
if errorlevel 1 exit 1
mkdir  %builddir%
if errorlevel 1 exit 1
cd %builddir%
if errorlevel 1 exit 1

cmake %SRC_DIR% -G "%CMAKE_GENERATOR%"
if errorlevel 1 exit 1

cmake --build %builddir% --config Release --target install
if errorlevel 1 exit 1

"%PYTHON%" setup.py install
if errorlevel 1 exit 1

SET builddir=%SRC_DIR%\..\build_dir

rmdir /s /q %builddir%
if errorlevel 1 exit 1
mkdir  %builddir%
if errorlevel 1 exit 1
cd %builddir%
if errorlevel 1 exit 1

cmake %SRC_DIR% -G "NMake Makefiles"
if errorlevel 1 exit 1

cmake --build %builddir% --config Release --target install
if errorlevel 1 exit 1

"%PYTHON%" setup.py install
if errorlevel 1 exit 1

use NMake Makefiles as cmake generator

use NMake Makefiles as cmake generator


@echo off

setlocal enabledelayedexpansion

axel --version>/nul 2>&1 && set is_axel_exist=true

if not defined is_axel_exist goto :command_not_found

set repo=http://repo2.maven.org/maven2

set groupId=
set artifactId=
set version=

for %%e in ( %* ) do (
	if %%e gtr 0 (
		if not defined groupId (
			set groupId=%%e
		) else (
			if not defined artifactId (
				set artifactId=%%e
			) else (
				if not defined version (
					set version=%%e
				)
			)
		)
	)
)

if defined groupId if defined artifactId if defined version goto :execute
goto :invalid_parameters

:execute
set out=!artifactId!-!version!-sources.jar
set target=!repo!/!groupId:.=/!/!artifactId!/!version!/!out!
echo going to get: !target!
axel -n 4 -o !out! !target!
goto :end

:invalid_parameters
echo invalid arguments found.
echo coordinate: !groupId!:!artifactId!:!version!
goto :end

:command_not_found
echo command axel is not found.
goto :end

:end
endlocal
goto :eof

add getsrc script to get maven sources

add getsrc script to get maven sources


@echo off

SET sdkpath=%xilinxpath%\SDK\2015.4\bin

SET cfile=%~1
SET jsonfile=%~2
SET projectname=%~3
SET cswfile=%cfile:~0,-2%_sw.c
SET ciffile=%cfile:~0,-2%_if.c

SET toolchainpath=%~4

if not {%~1} == {} if not {%~2} == {} if not {%~3} == {} (

  mkdir software
  copy %ciffile% software
  copy %cswfile% software\helloworld.c
  copy %toolchainpath%\utils\lscript.ld software
  copy %toolchainpath%\utils\timer.c software
  copy %toolchainpath%\utils\timer.h software
  python %toolchainpath%\python\generatesdktcl.py %cfile% %jsonfile% %projectname%
  %sdkpath%\xsdk.bat -batch -source %projectname%_build_sdk.tcl

) else (
    echo "few arguments!"
)

@echo off

SET sdkpath=%xilinxpath%\SDK\2015.4\bin

SET cfile=%~1
SET jsonfile=%~2
SET projectname=%~3
SET cswfile=%cfile:~3,-2%_sw.c
SET ciffile=%cfile:~3,-2%_if.c

SET toolchainpath=%~4

if not {%~1} == {} if not {%~2} == {} if not {%~3} == {} (

  mkdir software
  copy %ciffile% software
  copy %cswfile% software\helloworld.c
  copy %toolchainpath%\utils\lscript.ld software
  copy %toolchainpath%\utils\timer.c software
  copy %toolchainpath%\utils\timer.h software
  python %toolchainpath%\python\generatesdktcl.py %cfile% %jsonfile% %projectname%
  %sdkpath%\xsdk.bat -batch -source %projectname%_build_sdk.tcl

) else (
    echo "few arguments!"
)

modify typo

modify typo