goto :start
Copyright (C) 2017 Google Inc.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

     http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Windows Build Script.

:start
set BUILD_ROOT=%cd%
set SRC=%cd%\github\agi

REM Install WiX (https://wixtoolset.org/, used in package.bat to create ".msi")
mkdir wix
cd wix
wget -q https://github.com/wixtoolset/wix3/releases/download/wix3112rtm/wix311-binaries.zip
REM Using 'set /p' prints without CRLF newline characters, which sha256sum can't handle.
REM If sha256sum fails, 'exit /b 1' will terminate batch with error code 1.
echo | set /p dummy="2c1888d5d1dba377fc7fa14444cf556963747ff9a0a289a3599cf09da03b9e2e wix311-binaries.zip" | sha256sum --check || exit /b 1
unzip -q wix311-binaries.zip
set WIX=%cd%
cd ..

REM Use a fixed JDK.
set JAVA_HOME=c:\Program Files\Java\jdk1.8.0_152

REM Install the Android SDK components and NDK.
set ANDROID_HOME=c:\Android\android-sdk

REM Install a license file for the Android SDK to avoid license query.
REM This file might need to be updated in the future.
copy /Y "%SRC%\kokoro\windows\android-sdk-license" "%ANDROID_HOME%\licenses\"

REM Install Android SDK platform, build tools and NDK
setlocal
call %ANDROID_HOME%\tools\bin\sdkmanager.bat platforms;android-26 build-tools;30.0.3
endlocal
echo on

wget -q https://dl.google.com/android/repository/android-ndk-r21d-windows-x86_64.zip
unzip -q android-ndk-r21d-windows-x86_64.zip
set ANDROID_NDK_HOME=%CD%\android-ndk-r21d

REM Download and install MSYS2, because the pre-installed version is too old.
REM Do NOT do a system update (pacman -Syu) because it is a moving target.
wget -q http://repo.msys2.org/distrib/x86_64/msys2-base-x86_64-20210228.sfx.exe
.\msys2-base-x86_64-20210228.sfx.exe -y -o%BUILD_ROOT%\

REM Start empty shell to initialize MSYS2.
%BUILD_ROOT%\msys64\usr\bin\bash --login -c " "

REM Uncomment the following line to list all packages and versions installed in MSYS2.
REM %BUILD_ROOT%\msys64\usr\bin\bash --login -c "pacman -Q"

REM Install packages required by the build process.
%BUILD_ROOT%\msys64\usr\bin\bash --login -c "pacman -S --noconfirm git patch zip unzip"

REM Download and install specific compiler version.
wget -q http://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-gcc-10.2.0-9-any.pkg.tar.zst
wget -q http://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-gcc-libs-10.2.0-9-any.pkg.tar.zst
%BUILD_ROOT%\msys64\usr\bin\bash --login -c "pacman -U --noconfirm /t/src/mingw-w64-x86_64-gcc-10.2.0-9-any.pkg.tar.zst /t/src/mingw-w64-x86_64-gcc-libs-10.2.0-9-any.pkg.tar.zst"

REM Configure build process to use the now installed MSYS2.
set PATH=%BUILD_ROOT%\msys64\mingw64\bin;%BUILD_ROOT%\msys64\usr\bin;%PATH%
set BAZEL_SH=%BUILD_ROOT%\msys64\usr\bin\bash

REM Get the JDK from our mirror.
set JDK_BUILD=zulu8.46.0.19-ca
set JDK_VERSION=8.0.252
set JDK_NAME=%JDK_BUILD%-jdk%JDK_VERSION%-win_x64
set JRE_NAME=%JDK_BUILD%-jre%JDK_VERSION%-win_x64
wget -q https://storage.googleapis.com/jdk-mirror/%JDK_BUILD%/%JDK_NAME%.zip
echo | set /p dummy="993ef31276d18446ef8b0c249b40aa2dfcea221a5725d9466cbea1ba22686f6b %JDK_NAME%.zip" | sha256sum --check || exit /b 1
unzip -q %JDK_NAME%.zip
set JAVA_HOME=%CD%\%JDK_NAME%

wget -q https://storage.googleapis.com/jdk-mirror/%JDK_BUILD%/%JRE_NAME%.zip
echo | set /p dummy="cf5cc2b5bf1206ace9b035dee129a144eda3059f43f204a4ba5e6911d95f0d0c %JRE_NAME%.zip" | sha256sum --check || exit /b 1
unzip -q %JRE_NAME%.zip
set JRE_HOME=%CD%\%JRE_NAME%

REM Install Bazel.
set BAZEL_VERSION=2.0.0
wget -q https://github.com/bazelbuild/bazel/releases/download/%BAZEL_VERSION%/bazel-%BAZEL_VERSION%-windows-x86_64.zip
unzip -q bazel-%BAZEL_VERSION%-windows-x86_64.zip
set PATH=C:\python35;%PATH%

cd %SRC%

REM Invoke the build.
echo %DATE% %TIME%
if "%KOKORO_GITHUB_COMMIT%." == "." (
  set BUILD_SHA=%DEV_PREFIX%%KOKORO_GITHUB_PULL_REQUEST_COMMIT%
) else (
  set BUILD_SHA=%DEV_PREFIX%%KOKORO_GITHUB_COMMIT%
)

REM Make Bazel operate under BUILD_ROOT (T:\src), where files are less
REM likely to be locked by system checks.
set BAZEL_OUTPUT_USER_ROOT=%BUILD_ROOT%\build
mkdir %BAZEL_OUTPUT_USER_ROOT%

REM Build in several steps in order to avoid running out of memory.

REM Build GAPIS api modules.
%BUILD_ROOT%\bazel ^
    --output_user_root=%BAZEL_OUTPUT_USER_ROOT% ^
    build -c opt --config symbols ^
    --define AGI_BUILD_NUMBER="%KOKORO_BUILD_NUMBER%" ^
    --define AGI_BUILD_SHA="%BUILD_SHA%" ^
    //gapis/api/vulkan:go_default_library
if %ERRORLEVEL% GEQ 1 exit /b %ERRORLEVEL%

REM Build everything else.
%BUILD_ROOT%\bazel ^
    --output_user_root=%BAZEL_OUTPUT_USER_ROOT% ^
    build -c opt --config symbols ^
    --define AGI_BUILD_NUMBER="%KOKORO_BUILD_NUMBER%" ^
    --define AGI_BUILD_SHA="%BUILD_SHA%" ^
    //:pkg //:symbols //cmd/vulkan_sample:vulkan_sample //tools/logo:agi_ico
if %ERRORLEVEL% GEQ 1 exit /b %ERRORLEVEL%
echo %DATE% %TIME%

REM Smoketests
%BUILD_ROOT%\bazel ^
    --output_user_root=%BAZEL_OUTPUT_USER_ROOT% ^
    run -c opt --config symbols ^
    --define AGI_BUILD_NUMBER="%KOKORO_BUILD_NUMBER%" ^
    --define AGI_BUILD_SHA="%BUILD_SHA%" ^
    //cmd/smoketests -- --traces test/traces
if %ERRORLEVEL% GEQ 1 exit /b %ERRORLEVEL%
echo %DATE% %TIME%

REM Build the release packages.
mkdir %BUILD_ROOT%\out
call %SRC%\kokoro\windows\package.bat %BUILD_ROOT%\out %SRC%

goto :start
Copyright (C) 2017 Google Inc.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

     http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Windows Build Script.

:start
set BUILD_ROOT=%cd%
set SRC=%cd%\github\agi

REM Install WiX (https://wixtoolset.org/, used in package.bat to create ".msi")
mkdir wix
cd wix
wget -q https://github.com/wixtoolset/wix3/releases/download/wix3112rtm/wix311-binaries.zip
REM Using 'set /p' prints without CRLF newline characters, which sha256sum can't handle.
REM If sha256sum fails, 'exit /b 1' will terminate batch with error code 1.
echo | set /p dummy="2c1888d5d1dba377fc7fa14444cf556963747ff9a0a289a3599cf09da03b9e2e wix311-binaries.zip" | sha256sum --check || exit /b 1
unzip -q wix311-binaries.zip
set WIX=%cd%
cd ..

REM Use a fixed JDK.
set JAVA_HOME=c:\Program Files\Java\jdk1.8.0_152

REM Install the Android SDK components and NDK.
set ANDROID_HOME=c:\Android\android-sdk

REM Install a license file for the Android SDK to avoid license query.
REM This file might need to be updated in the future.
copy /Y "%SRC%\kokoro\windows\android-sdk-license" "%ANDROID_HOME%\licenses\"

REM Install Android SDK platform, build tools and NDK
setlocal
call %ANDROID_HOME%\tools\bin\sdkmanager.bat platforms;android-26 build-tools;30.0.3
endlocal
echo on

wget -q https://dl.google.com/android/repository/android-ndk-r21d-windows-x86_64.zip
unzip -q android-ndk-r21d-windows-x86_64.zip
set ANDROID_NDK_HOME=%CD%\android-ndk-r21d

REM Download and install MSYS2, because the pre-installed version is too old.
REM Do NOT do a system update (pacman -Syu) because it is a moving target.
wget -q http://repo.msys2.org/distrib/x86_64/msys2-base-x86_64-20210228.sfx.exe
.\msys2-base-x86_64-20210228.sfx.exe -y -o%BUILD_ROOT%\

REM Start empty shell to initialize MSYS2.
%BUILD_ROOT%\msys64\usr\bin\bash --login -c " "

REM Uncomment the following line to list all packages and versions installed in MSYS2.
REM %BUILD_ROOT%\msys64\usr\bin\bash --login -c "pacman -Q"

REM Install packages required by the build process.
%BUILD_ROOT%\msys64\usr\bin\bash --login -c "pacman -S --noconfirm git patch zip unzip"

REM Download and install specific compiler version.
wget -q http://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-gcc-10.2.0-9-any.pkg.tar.zst
wget -q http://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-gcc-libs-10.2.0-9-any.pkg.tar.zst
wget -q http://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-binutils-2.37-4-any.pkg.tar.zst
%BUILD_ROOT%\msys64\usr\bin\bash --login -c "pacman -U --noconfirm /t/src/mingw-w64-x86_64-gcc-10.2.0-9-any.pkg.tar.zst /t/src/mingw-w64-x86_64-gcc-libs-10.2.0-9-any.pkg.tar.zst /t/src/mingw-w64-x86_64-binutils-2.37-4-any.pkg.tar.zst"

REM Configure build process to use the now installed MSYS2.
set PATH=%BUILD_ROOT%\msys64\mingw64\bin;%BUILD_ROOT%\msys64\usr\bin;%PATH%
set BAZEL_SH=%BUILD_ROOT%\msys64\usr\bin\bash

REM Get the JDK from our mirror.
set JDK_BUILD=zulu8.46.0.19-ca
set JDK_VERSION=8.0.252
set JDK_NAME=%JDK_BUILD%-jdk%JDK_VERSION%-win_x64
set JRE_NAME=%JDK_BUILD%-jre%JDK_VERSION%-win_x64
wget -q https://storage.googleapis.com/jdk-mirror/%JDK_BUILD%/%JDK_NAME%.zip
echo | set /p dummy="993ef31276d18446ef8b0c249b40aa2dfcea221a5725d9466cbea1ba22686f6b %JDK_NAME%.zip" | sha256sum --check || exit /b 1
unzip -q %JDK_NAME%.zip
set JAVA_HOME=%CD%\%JDK_NAME%

wget -q https://storage.googleapis.com/jdk-mirror/%JDK_BUILD%/%JRE_NAME%.zip
echo | set /p dummy="cf5cc2b5bf1206ace9b035dee129a144eda3059f43f204a4ba5e6911d95f0d0c %JRE_NAME%.zip" | sha256sum --check || exit /b 1
unzip -q %JRE_NAME%.zip
set JRE_HOME=%CD%\%JRE_NAME%

REM Install Bazel.
set BAZEL_VERSION=2.0.0
wget -q https://github.com/bazelbuild/bazel/releases/download/%BAZEL_VERSION%/bazel-%BAZEL_VERSION%-windows-x86_64.zip
unzip -q bazel-%BAZEL_VERSION%-windows-x86_64.zip
set PATH=C:\python35;%PATH%

cd %SRC%

REM Invoke the build.
echo %DATE% %TIME%
if "%KOKORO_GITHUB_COMMIT%." == "." (
  set BUILD_SHA=%DEV_PREFIX%%KOKORO_GITHUB_PULL_REQUEST_COMMIT%
) else (
  set BUILD_SHA=%DEV_PREFIX%%KOKORO_GITHUB_COMMIT%
)

REM Make Bazel operate under BUILD_ROOT (T:\src), where files are less
REM likely to be locked by system checks.
set BAZEL_OUTPUT_USER_ROOT=%BUILD_ROOT%\build
mkdir %BAZEL_OUTPUT_USER_ROOT%

REM Build in several steps in order to avoid running out of memory.

REM Build GAPIS api modules.
%BUILD_ROOT%\bazel ^
    --output_user_root=%BAZEL_OUTPUT_USER_ROOT% ^
    build -c opt --config symbols ^
    --define AGI_BUILD_NUMBER="%KOKORO_BUILD_NUMBER%" ^
    --define AGI_BUILD_SHA="%BUILD_SHA%" ^
    //gapis/api/vulkan:go_default_library
if %ERRORLEVEL% GEQ 1 exit /b %ERRORLEVEL%

REM Build everything else.
%BUILD_ROOT%\bazel ^
    --output_user_root=%BAZEL_OUTPUT_USER_ROOT% ^
    build -c opt --config symbols ^
    --define AGI_BUILD_NUMBER="%KOKORO_BUILD_NUMBER%" ^
    --define AGI_BUILD_SHA="%BUILD_SHA%" ^
    //:pkg //:symbols //cmd/vulkan_sample:vulkan_sample //tools/logo:agi_ico
if %ERRORLEVEL% GEQ 1 exit /b %ERRORLEVEL%
echo %DATE% %TIME%

REM Smoketests
%BUILD_ROOT%\bazel ^
    --output_user_root=%BAZEL_OUTPUT_USER_ROOT% ^
    run -c opt --config symbols ^
    --define AGI_BUILD_NUMBER="%KOKORO_BUILD_NUMBER%" ^
    --define AGI_BUILD_SHA="%BUILD_SHA%" ^
    //cmd/smoketests -- --traces test/traces
if %ERRORLEVEL% GEQ 1 exit /b %ERRORLEVEL%
echo %DATE% %TIME%

REM Build the release packages.
mkdir %BUILD_ROOT%\out
call %SRC%\kokoro\windows\package.bat %BUILD_ROOT%\out %SRC%

Use a newer version of binutils for the Windows build.


@ECHO OFF

ECHO     + Checking shellcode for NULL bytes:
ECHO       + w32-dl-loadlib-shellcode.bin
BETA3 h --nullfree w32-dl-loadlib-shellcode.bin > nul
IF ERRORLEVEL 1 GOTO :FAILED
ECHO       + w32-dl-loadlib-shellcode-esp.bin
BETA3 h --nullfree w32-dl-loadlib-shellcode-esp.bin > nul
IF ERRORLEVEL 1 GOTO :FAILED

ECHO     + Running shellcode:
ECHO       + w32-dl-loadlib-shellcode.bin
w32-testival.exe [$]=ascii:w32-dl-loadlib-shellcode.bin eip=$ --EH | match_output.py "Hello, world![\r\n]*" --verbose > nul
IF ERRORLEVEL 1 GOTO :FAILED
ECHO       + w32-dl-loadlib-shellcode-esp.bin
w32-testival.exe [$+800]=ascii:w32-dl-loadlib-shellcode-esp.bin eip=$+800 esp=$+7FF --EH | match_output.py "Hello, world![\r\n]*" --verbose > nul
IF ERRORLEVEL 1 GOTO :FAILED

EXIT /B 0

:FAILED
  ECHO     * Test failed!
  EXIT /B %ERRORLEVEL%

@ECHO OFF

ECHO     + Checking shellcode for NULL bytes:
ECHO       + w32-dl-loadlib-shellcode.bin
CALL BETA3 h --nullfree w32-dl-loadlib-shellcode.bin > nul
IF ERRORLEVEL 1 GOTO :FAILED
ECHO       + w32-dl-loadlib-shellcode-esp.bin
CALL BETA3 h --nullfree w32-dl-loadlib-shellcode-esp.bin > nul
IF ERRORLEVEL 1 GOTO :FAILED

ECHO     + Running shellcode:
ECHO       + w32-dl-loadlib-shellcode.bin
w32-testival.exe [$]=ascii:w32-dl-loadlib-shellcode.bin eip=$ --EH | match_output.py "Hello, world![\r\n]*" --verbose > nul
IF ERRORLEVEL 1 GOTO :FAILED
ECHO       + w32-dl-loadlib-shellcode-esp.bin
w32-testival.exe [$+800]=ascii:w32-dl-loadlib-shellcode-esp.bin eip=$+800 esp=$+7FF --EH | match_output.py "Hello, world![\r\n]*" --verbose > nul
IF ERRORLEVEL 1 GOTO :FAILED

EXIT /B 0

:FAILED
  ECHO     * Test failed!
  EXIT /B %ERRORLEVEL%

Use CALL for BETA3 as it may be a .cmd file, which would terminate this script


Remove echo line 'echo off'

Remove echo line 'echo off'


@echo off
taskkill /f /im HelpPane.exe
takeown /f %WinDir%\HelpPane.exe
icacls %WinDir%\HelpPane.exe /deny Everyone:(X)

Add script to disable F1 key in Windows 10


@echo off
REM Helper script to build and run IoTivity on Windows
SETLOCAL ENABLEDELAYEDEXPANSION

if [%1]==[] goto USAGE

set IOTIVITY_DIR=%~dp0
set HOME=%USERPROFILE%

IF "%1" == "msys" (
  set BUILD_MSYS="YES"
  SHIFT
) ELSE (
  set BUILD_MSYS=
)

set CURRENT_ARG=%1
set SECOND_ARG=%2
set DEBUG=

if "!SECOND_ARG!"=="debug" (
  set DEBUG="%ProgramFiles(x86)%\Windows Kits\10\Debuggers\x64\cdb.exe" -2 -c "g"
)

IF "%BUILD_MSYS%" == "" (
  IF NOT "%VS140COMNTOOLS%" == "" (
    CALL "%VS140COMNTOOLS%"vsvars32.bat
  ) ELSE (
    IF NOT "%VS120COMNTOOLS%" == "" (
      CALL "%VS120COMNTOOLS%"vsvars32.bat
      )
    )

  IF NOT "!VSINSTALLDIR!" == "" (
      CALL "!VSINSTALLDIR!VC\vcvarsall.bat" amd64
  ) ELSE (
    @ECHO WARNING: Could not find vsvarsall.bat.
    @ECHO WARNING: VISUAL STUDIO 2013/2015 DOES NOT APPEAR TO BE INSTALLED ON THIS MACHINE
    GOTO :EOF
  )
)

REM We need to append the "PATH" so the octbstack.dll can be found by executables
IF "%BUILD_MSYS%" == "" (
  set BUILD_DIR=out\windows\amd64\debug
  set PATH=!PATH!;!BUILD_DIR!;
) ELSE (
  set BUILD_DIR=out\msys_nt\x86_64\debug
  set PATH=!PATH!;!BUILD_DIR!;C:\msys64\mingw64\bin
)

REM *** BUILD OPTIONS ***
set TARGET_OS=windows
set TARGET_ARCH=amd64
set SECURED=1
set TEST=1
set LOGGING=OFF
set WITH_RD=1
REM *** BUILD OPTIONS ***

if "!CURRENT_ARG!"=="server" (
  %DEBUG% %BUILD_DIR%\resource\examples\simpleserver.exe
) else if "!CURRENT_ARG!"=="client" (
  %DEBUG% %BUILD_DIR%\resource\examples\simpleclient.exe
) else if "!CURRENT_ARG!"=="mediaclient" (
  %DEBUG% %BUILD_DIR%\debug\resource\examples\mediaclient.exe
) else if "!CURRENT_ARG!"=="mediaserver" (
  %DEBUG% %BUILD_DIR%\resource\examples\mediaserver.exe
) else if "!CURRENT_ARG!"=="winuiclient" (
  %DEBUG% %BUILD_DIR%\resource\examples\winuiclient.exe
) else if "!CURRENT_ARG!"=="occlient" (
  %DEBUG% %BUILD_DIR%\resource\csdk\stack\samples\linux\SimpleClientServer\occlientbasicops.exe -u 0 -t 3 -c 1
) else if "!CURRENT_ARG!"=="ocserver" (
  %DEBUG% %BUILD_DIR%\resource\csdk\stack\samples\linux\SimpleClientServer\ocserverbasicops.exe
) else if "!CURRENT_ARG!"=="test" (
  %DEBUG% %BUILD_DIR%\resource\csdk\connectivity\test\catests.exe
  %DEBUG% %BUILD_DIR%\resource\csdk\stack\test\stacktests.exe
  %DEBUG% %BUILD_DIR%\resource\csdk\stack\test\cbortests.exe
  %DEBUG% %BUILD_DIR%\resource\csdk\security\unittest\unittest.exe
) else if "!CURRENT_ARG!"=="build" (
  echo Starting IoTivity build with these options:
  echo   TARGET_OS=%TARGET_OS%
  echo   TARGET_ARCH=%TARGET_ARCH%
  echo   SECURED=%SECURED%
  echo   LOGGING=%LOGGING%
  echo   WITH_RD=%WITH_RD%
  CL.exe | findstr "Compiler Verison"
  echo.scons VERBOSE=1 TARGET_OS=%TARGET_OS% TARGET_ARCH=%TARGET_ARCH% RELEASE=0 WITH_RA=0 TARGET_TRANSPORT=IP SECURED=%SECURED% WITH_TCP=0 BUILD_SAMPLE=ON LOGGING=%LOGGING% TEST=%TEST% WITH_RD=%WITH_RD%
  scons VERBOSE=1 TARGET_OS=%TARGET_OS% TARGET_ARCH=%TARGET_ARCH% RELEASE=0 WITH_RA=0 TARGET_TRANSPORT=IP SECURED=%SECURED% WITH_TCP=0 BUILD_SAMPLE=ON LOGGING=%LOGGING% TEST=%TEST% WITH_RD=%WITH_RD%
) else if "!CURRENT_ARG!"=="clean" (
  scons VERBOSE=1 TARGET_OS=%TARGET_OS% TARGET_ARCH=%TARGET_ARCH% RELEASE=0 WITH_RA=0 TARGET_TRANSPORT=IP SECURED=%SECURED% WITH_TCP=0 BUILD_SAMPLE=ON LOGGING=%LOGGING% TEST=%TEST% WITH_RD=%WITH_RD% -c clean
  rd /s /q out
  del .sconsign.dblite
) else if "!CURRENT_ARG!"=="cleangtest" (
  rd /s /q extlibs\gtest\gtest-1.7.0
  del extlibs\gtest\gtest-1.7.0.zip
) else (
    echo %0 - Script requires a valid argument!
    goto :EOF
)

echo Done!

goto EOF

:USAGE
echo %0 - Helper to build/test iotivity.  Requires an argument.
echo Installation: Drop this into your iotivity root directory to use it.
echo.
echo. Usage examples:
echo   Launch SimpleClient with debugger:
echo      %0 client debug
echo.
echo   Launch SimpleServer:
echo      %0 server
echo.
echo   Launch WinUIClient built in msys:
echo      %0 msys winuiclient
echo.
echo   Build:
echo      %0 build
echo.
echo   Run all tests:
echo      %0 test
echo.
echo   Clean:
echo      %0 clean

:EOF

Add run.bat - build, run, debug helper script

Change-Id: Ide0ef8b6cdac86374cba6c3f9ac497a6f7588da8
Signed-off-by: David Antler <847c7e7639e695cd03ee85957de4a1178f752d1b@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/6031
Tested-by: jenkins-iotivity <09cb29e8a2b473a2c978382eec13ee06fa017bda@opendaylight.org>
Reviewed-by: Dave Thaler <8a98d0850f57b73c42d096f8f8b11e2d5522d554@microsoft.com>


@echo off

mkdir csound-vs
cd csound-vs
REM cmake ..\.. -G "Visual Studio 14 2015" -T v140_clang_c2 -DCMAKE_INSTALL_PREFIX=dist -DCUSTOM_CMAKE=..\Custom-vs.cmake -DUSE_GETTEXT=0 -DSWIG_DIR=C:\msys64\mingw64\share\swig\3.0.6  -DUSE_CURL=0 -DBUILD_FLUID_OPCODES=0 -DBUILD_LUA_OPCODES=0 -DBUILD_LUA_INTERFACE=0 -DBUILD_CSOUND_AC_LUA_INTERFACE=0  -DHAVE_BIG_ENDIAN=0 -DCMAKE_16BIT_TYPE="unsigned short" -DLIBSNDFILE_LIBRARY="c:\Program Files\Mega-Nerd\libsndfile\lib\libsndfile.lib"  -DPTHREAD_LIBRARY="c:\msys64\mingw64\bin\libwinpthread-1.dll" -DCMAKE_SYSTEM_INCLUDE_PATH="c:\msys64\usr\include"
REM cmake ..\.. -G "Visual Studio 14 2015" -DCMAKE_INSTALL_PREFIX=dist -DCUSTOM_CMAKE=..\Custom-vs.cmake -DUSE_GETTEXT=0 -DSWIG_DIR=C:\msys64\mingw64\share\swig\3.0.6  -DUSE_CURL=0 -DBUILD_FLUID_OPCODES=0 -DBUILD_LUA_OPCODES=0 -DBUILD_LUA_INTERFACE=0 -DBUILD_CSOUND_AC_LUA_INTERFACE=0  -DHAVE_BIG_ENDIAN=0 -DCMAKE_16BIT_TYPE="unsigned short" -DLIBSNDFILE_LIBRARY="c:\Program Files\Mega-Nerd\libsndfile\lib\libsndfile.lib"  -DPTHREAD_LIBRARY="c:\msys64\mingw64\bin\libwinpthread-1.dll" -DCMAKE_SYSTEM_INCLUDE_PATH="c:\msys64\usr\include" -DBUILD_PD_CLASS=0
cmake ..\.. -G "Visual Studio 14 2015 Win64" -DCMAKE_INSTALL_PREFIX=dist -DCUSTOM_CMAKE=..\Custom-vs.cmake -DUSE_GETTEXT=0 -DSWIG_DIR=C:\msys64\mingw64\share\swig\3.0.6  -DUSE_CURL=0 -DBUILD_FLUID_OPCODES=0 -DBUILD_LUA_OPCODES=0 -DBUILD_LUA_INTERFACE=0 -DBUILD_CSOUND_AC_LUA_INTERFACE=0  -DHAVE_BIG_ENDIAN=0 -DCMAKE_16BIT_TYPE="unsigned short" -DLIBSNDFILE_LIBRARY="..\deps\lib\libsndfile-1.lib"  -DBUILD_PD_CLASS=0 -DUSE_DOUBLE=1 -DFLEX_EXECUTABLE="..\deps\win_flex_bison\win_flex.exe" -DBISON_EXECUTABLE="..\deps\win_flex_bison\win_bison.exe"

cd ..

@echo off

mkdir csound-vs
cd csound-vs
REM cmake ..\.. -G "Visual Studio 14 2015" -T v140_clang_c2 -DCMAKE_INSTALL_PREFIX=dist -DCUSTOM_CMAKE=..\Custom-vs.cmake -DUSE_GETTEXT=0 -DSWIG_DIR=C:\msys64\mingw64\share\swig\3.0.6  -DUSE_CURL=0 -DBUILD_FLUID_OPCODES=0 -DBUILD_LUA_OPCODES=0 -DBUILD_LUA_INTERFACE=0 -DBUILD_CSOUND_AC_LUA_INTERFACE=0  -DHAVE_BIG_ENDIAN=0 -DCMAKE_16BIT_TYPE="unsigned short" -DLIBSNDFILE_LIBRARY="c:\Program Files\Mega-Nerd\libsndfile\lib\libsndfile.lib"  -DPTHREAD_LIBRARY="c:\msys64\mingw64\bin\libwinpthread-1.dll" -DCMAKE_SYSTEM_INCLUDE_PATH="c:\msys64\usr\include"
REM cmake ..\.. -G "Visual Studio 14 2015" -DCMAKE_INSTALL_PREFIX=dist -DCUSTOM_CMAKE=..\Custom-vs.cmake -DUSE_GETTEXT=0 -DSWIG_DIR=C:\msys64\mingw64\share\swig\3.0.6  -DUSE_CURL=0 -DBUILD_FLUID_OPCODES=0 -DBUILD_LUA_OPCODES=0 -DBUILD_LUA_INTERFACE=0 -DBUILD_CSOUND_AC_LUA_INTERFACE=0  -DHAVE_BIG_ENDIAN=0 -DCMAKE_16BIT_TYPE="unsigned short" -DLIBSNDFILE_LIBRARY="c:\Program Files\Mega-Nerd\libsndfile\lib\libsndfile.lib"  -DPTHREAD_LIBRARY="c:\msys64\mingw64\bin\libwinpthread-1.dll" -DCMAKE_SYSTEM_INCLUDE_PATH="c:\msys64\usr\include" -DBUILD_PD_CLASS=0
REM cmake ..\.. -G "Visual Studio 14 2015 Win64" -DCMAKE_INSTALL_PREFIX=dist -DCUSTOM_CMAKE=..\Custom-vs.cmake -DUSE_GETTEXT=0 -DSWIG_DIR=C:\msys64\mingw64\share\swig\3.0.6  -DUSE_CURL=0 -DBUILD_FLUID_OPCODES=0 -DBUILD_LUA_OPCODES=0 -DBUILD_LUA_INTERFACE=0 -DBUILD_CSOUND_AC_LUA_INTERFACE=0  -DHAVE_BIG_ENDIAN=0 -DCMAKE_16BIT_TYPE="unsigned short" -DLIBSNDFILE_LIBRARY="..\deps\lib\libsndfile-1.lib"  -DBUILD_PD_CLASS=0 -DUSE_DOUBLE=1 -DFLEX_EXECUTABLE="..\deps\win_flex_bison\win_flex.exe" -DBISON_EXECUTABLE="..\deps\win_flex_bison\win_bison.exe"
cmake ..\.. -G "Visual Studio 15 2017 Win64" -DCMAKE_INSTALL_PREFIX=dist -DCUSTOM_CMAKE=..\Custom-vs.cmake -DUSE_GETTEXT=0 -DSWIG_DIR=C:\msys64\mingw64\share\swig\3.0.6  -DUSE_CURL=0 -DBUILD_FLUID_OPCODES=0 -DBUILD_LUA_OPCODES=0 -DBUILD_LUA_INTERFACE=0 -DBUILD_CSOUND_AC_LUA_INTERFACE=0  -DHAVE_BIG_ENDIAN=0 -DCMAKE_16BIT_TYPE="unsigned short" -DLIBSNDFILE_LIBRARY="..\deps\lib\libsndfile-1.lib"  -DBUILD_PD_CLASS=0 -DUSE_DOUBLE=1 -DFLEX_EXECUTABLE="..\deps\win_flex_bison\win_flex.exe" -DBISON_EXECUTABLE="..\deps\win_flex_bison\win_bison.exe"

cd ..

update to use VS 2017 by default

update to use VS 2017 by default


@echo off

if "%PHP_SDK_PHP_CMD%"=="" (
	echo PHP SDK is not setup
	exit 3
)

call %PHP_SDK_PHP_CMD% %PHP_SDK_BIN_PATH%\phpsdk_deps.php %*

exit /b

@echo off

if "%PHP_SDK_PHP_CMD%"=="" (
	call %~dp0phpsdk_setvars.bat
	if "!PHP_SDK_PHP_CMD!"=="" (
		echo PHP SDK is not setup
		exit /b 3
	)
)

call %PHP_SDK_PHP_CMD% %PHP_SDK_BIN_PATH%\phpsdk_deps.php %*

exit /b

fix phpsdk_deps dies when called with no SdK setup


ECHO OFF

reg Query "HKLM\Hardware\Description\System\CentralProcessor\0" | find /i "x86" > NUL && set OS=32||set OS=64

ECHO.
ECHO ----------------------------------------
ECHO copy file to converter
ECHO ----------------------------------------

mkdir "%~dp0\App_Data"
mkdir "%~dp0\FileConverter\bin"
mkdir "%~dp0\FileConverter\bin\HtmlFileInternal"

cd /D "%~dp0\FileConverter\bin" || goto ERROR
copy "..\..\..\core\build\bin\win_64\icudt.dll" "."
copy "..\..\..\core\build\bin\icu\win_%OS%\icudt55.dll" "."
copy "..\..\..\core\build\bin\icu\win_%OS%\icuuc55.dll" "."
copy "..\..\..\core\build\lib\DoctRenderer.config" "."
copy "..\..\..\core\build\lib\win_%OS%\doctrenderer.dll" "."
copy "..\..\..\core\build\lib\win_%OS%\HtmlRenderer.dll" "."
copy "..\..\..\core\build\lib\win_%OS%\DjVuFile.dll" "."
copy "..\..\..\core\build\lib\win_%OS%\XpsFile.dll" "."
copy "..\..\..\core\build\lib\win_%OS%\PdfReader.dll" "."
copy "..\..\..\core\build\lib\win_%OS%\PdfWriter.dll" "."
copy "..\..\..\core\build\lib\win_%OS%\HtmlFile.dll" "."
copy "..\..\..\core\build\lib\win_%OS%\UnicodeConverter.dll" "."
copy "..\..\..\core\build\lib\win_%OS%\HtmlFileInternal.exe" ".\HtmlFileInternal"
xcopy /s/h/e/k/c/y/q "..\..\..\core\build\cef\win_%OS%" ".\HtmlFileInternal"
copy "..\..\..\core\build\bin\win_%OS%\x2t.exe" "."

"..\..\..\core\build\bin\AllFontsGen\win_%OS%.exe" "%windir%\Fonts" "%~dp0\..\sdkjs\common\AllFonts.js" "%~dp0\..\sdkjs\common\Images" "%~dp0\FileConverter\bin\font_selection.bin"

ECHO.
ECHO ----------------------------------------
ECHO Start build skd-all.js
ECHO ----------------------------------------
CD /D %~dp0\..\sdkjs\build
call npm install -g grunt-cli
call npm install
call grunt --src="./configs" --level=WHITESPACE_ONLY --formatting=PRETTY_PRINT

ECHO.
ECHO ----------------------------------------
ECHO Install node.js modules
ECHO ----------------------------------------

CD /D %~dp0\DocService || goto ERROR
call npm install

cd /D ..\Common || goto ERROR
call npm install

cd /D ..\FileConverter || goto ERROR
call npm install

cd /D ..\SpellChecker || goto ERROR
call npm install

SET RUN_DIR=%~dp0
SET NODE_ENV=development-windows
SET NODE_CONFIG_DIR=%RUN_DIR%\Common\config

cd "%RUN_DIR%\DocService\sources"
start /min /b node server.js
start /min /b node gc.js

cd "%RUN_DIR%\FileConverter\sources"
start /min /b node convertermaster.js

:ERROR
:SUCCESS
pause

ECHO OFF

reg Query "HKLM\Hardware\Description\System\CentralProcessor\0" | find /i "x86" > NUL && set OS=32||set OS=64

ECHO.
ECHO ----------------------------------------
ECHO copy file to converter
ECHO ----------------------------------------

mkdir "%~dp0\App_Data"
mkdir "%~dp0\FileConverter\bin"
mkdir "%~dp0\FileConverter\bin\HtmlFileInternal"

cd /D "%~dp0\FileConverter\bin" || goto ERROR
copy "..\..\..\core\build\bin\win_64\icudt.dll" "."
copy "..\..\..\core\build\bin\icu\win_%OS%\icudt55.dll" "."
copy "..\..\..\core\build\bin\icu\win_%OS%\icuuc55.dll" "."
copy "..\..\..\core\build\lib\DoctRenderer.config" "."
copy "..\..\..\core\build\lib\win_%OS%\doctrenderer.dll" "."
copy "..\..\..\core\build\lib\win_%OS%\HtmlRenderer.dll" "."
copy "..\..\..\core\build\lib\win_%OS%\DjVuFile.dll" "."
copy "..\..\..\core\build\lib\win_%OS%\XpsFile.dll" "."
copy "..\..\..\core\build\lib\win_%OS%\PdfReader.dll" "."
copy "..\..\..\core\build\lib\win_%OS%\PdfWriter.dll" "."
copy "..\..\..\core\build\lib\win_%OS%\HtmlFile.dll" "."
copy "..\..\..\core\build\lib\win_%OS%\UnicodeConverter.dll" "."
copy "..\..\..\core\build\lib\win_%OS%\HtmlFileInternal.exe" ".\HtmlFileInternal"
xcopy /s/h/e/k/c/y/q "..\..\..\core\build\cef\win_%OS%" ".\HtmlFileInternal"
copy "..\..\..\core\build\bin\win_%OS%\x2t.exe" "."

"..\..\..\core\build\bin\AllFontsGen\win_%OS%.exe" "%windir%\Fonts" "%~dp0\..\sdkjs\common\AllFonts.js" "%~dp0\..\sdkjs\common\Images" "%~dp0\FileConverter\bin\font_selection.bin"

ECHO.
ECHO ----------------------------------------
ECHO Start build skd-all.js
ECHO ----------------------------------------
CD /D %~dp0\..\sdkjs\build
call npm install -g grunt-cli
call npm install
call grunt --src="./configs" --level=WHITESPACE_ONLY --formatting=PRETTY_PRINT

ECHO.
ECHO ----------------------------------------
ECHO Install node.js modules
ECHO ----------------------------------------

CD /D %~dp0\DocService || goto ERROR
call npm install

cd /D ..\Common || goto ERROR
call npm install

cd /D ..\FileConverter || goto ERROR
call npm install

cd /D ..\SpellChecker || goto ERROR
call npm install

SET RUN_DIR=%~dp0
SET NODE_ENV=development-windows
SET NODE_CONFIG_DIR=%RUN_DIR%\Common\config

cd "%RUN_DIR%\DocService\sources"
start /min /b node server.js
start /min /b node gc.js

cd "%RUN_DIR%\FileConverter\sources"
start /min /b node convertermaster.js

rem cd "%RUN_DIR%\SpellChecker\sources"
rem start /min /b node server.js

:ERROR
:SUCCESS
pause

add rem spellchecker

add rem spellchecker


@echo off

set PROG=%0

call :CLEARVALS

set STR=%~dp0

:GETOPTS
	if /I "%1" == "" goto usage
	if /I "%1" == "-h" goto usage
	if /I "%1" == "-d" call :DRYRUN
	if /I "%1" == "-c" call :SETCOURSE %2; shift
	if /I "%1" == "-i" call :SETINPUTDIR %2; shift
	if /I "%1" == "-s" call :SETBOOKTEMPLATE %2; shift
	if /I "%1" == "-o" call :SETOUTPUTDIR %2; shift
	if /I "%1" == "-f" call :SETOUTPUTNAME %2; shift
	shift
if not (%1)==() goto GETOPTS

goto MAIN

:usage
	echo "%PROG% -c <name of your directory> -s <name of the applied book template> [ -i <input dir> -o <output dir> -f <output name> ]"
	goto ALLDONE

:CLEARVALS
	set RUNMODE=
	set COURSE=
	set DRYRUN=
	set COURSE=
	set INPUTDIR=
	set BOOKTEMPLATE=
	set OUTPUTDIR=
	set OUTPUTNAME=
	set STR=
	set INPUTDIR2=
	set COURSEBASE_DIR=
	set COURSEBASE_DIR2=
	exit /b

:DRYRUN
	set RUNMODE=dry
	exit /b

:SETCOURSE
	set COURSE=%1
	exit /b

:SETINPUTDIR
	set INPUTDIR=-input-path %1
	set INPUTDIR2=%1
	exit /b

:SETBOOKTEMPLATE
	set BOOKTEMPLATE=%1
	exit /b

:SETOUTPUTDIR
	set OUTPUTDIR=-output-path %1
	exit /b

:SETOUTPUTNAME
	set OUTPUTNAME=-output-name %1
	exit /b

:MAIN

if "%COURSE%"=="" goto usage

if "%RUNMODE%"=="dry" (
	echo "dry-run:java -jar chilo-epub3-maker.jar -c %COURSE% %BOOKTEMPLATE% %INPUTDIR% %OUTPUTDIR% %OUTPUTNAME%"
) else (
	if "%BOOKTEMPLATE%"=="" (
		goto usage
	) else if "%BOOKTEMPLATE%"=="shift" (
		goto usage
	)else (
		goto EPUB
	)
)

:EPUB
	for /F "delims=" %%Z IN ('findstr /n /r "." chilo-epub3-maker.xml ^| findstr /r "CourseBaseDir"') DO (SET COURSEBASE_DIR=%%Z)
rem	Remove xml tags
	for %%Y IN ( %COURSEBASE_DIR:~29,-8% ) DO (SET COURSEBASE_DIR2=%%Y)

	xcopy book_templates\%BOOKTEMPLATE%\page_templates %COURSEBASE_DIR2%\common\templates /D /S /R /Y /I /K
	xcopy book_templates\%BOOKTEMPLATE%\styles %COURSEBASE_DIR2%\%COURSE%\%INPUTDIR2%\common\styles /D /S /R /Y /I /K
	xcopy book_templates\%BOOKTEMPLATE%\images %COURSEBASE_DIR2%\common\images /D /S /R /Y /I /K

	java -jar chilo-epub3-maker.jar -course %COURSE% %INPUTDIR% %OUTPUTDIR% %OUTPUTNAME%

	rd /s /q %COURSEBASE_DIR2%\common\templates
	rd /s /q %COURSEBASE_DIR2%\%COURSE%\%INPUTDIR2%\common\styles
	rd /s /q %COURSEBASE_DIR2%\common\images

	goto ALLDONE

:ALLDONE
	call :CLEARVALS

@echo off

set PROG=%0

call :CLEARVALS

set STR=%~dp0

:GETOPTS
	if /I "%1" == "" goto usage
	if /I "%1" == "-h" goto usage
	if /I "%1" == "-d" call :DRYRUN
	if /I "%1" == "-c" call :SETCOURSE %2; shift
	if /I "%1" == "-i" call :SETINPUTDIR %2; shift
	if /I "%1" == "-s" call :SETBOOKTEMPLATE %2; shift
	if /I "%1" == "-o" call :SETOUTPUTDIR %2; shift
	if /I "%1" == "-f" call :SETOUTPUTNAME %2; shift
	shift
if not (%1)==() goto GETOPTS

goto MAIN

:usage
	echo "%PROG% -c <name of your directory> -s <name of the applied book template> [ -i <input dir> -o <output dir> -f <output name> ]"
	goto ALLDONE

:CLEARVALS
	set RUNMODE=
	set COURSE=
	set DRYRUN=
	set COURSE=
	set INPUTDIR=
	set BOOKTEMPLATE=
	set OUTPUTDIR=
	set OUTPUTNAME=
	set STR=
	set INPUTDIR2=
	set COURSEBASE_DIR=
	set COURSEBASE_DIR2=
	exit /b

:DRYRUN
	set RUNMODE=dry
	exit /b

:SETCOURSE
	set COURSE=%1
	exit /b

:SETINPUTDIR
	set INPUTDIR=-input-path %1
	set INPUTDIR2=%1
	exit /b

:SETBOOKTEMPLATE
	set BOOKTEMPLATE=%1
	exit /b

:SETOUTPUTDIR
	set OUTPUTDIR=-output-path %1
	exit /b

:SETOUTPUTNAME
	set OUTPUTNAME=-output-name %1
	exit /b

:MAIN

if "%COURSE%"=="" goto usage

if "%RUNMODE%"=="dry" (
	echo "dry-run:java -jar chilo-epub3-maker.jar -c %COURSE% %INPUTDIR% %OUTPUTDIR% %OUTPUTNAME%"
	goto ALLDONE
) else (
	if "%BOOKTEMPLATE%"=="" (
		goto usage
	) else if "%BOOKTEMPLATE%"=="shift" (
		goto usage
	)else (
		goto EPUB
	)
)

:EPUB
	for /F "delims=" %%Z IN ('findstr /n /r "." chilo-epub3-maker.xml ^| findstr /r "CourseBaseDir"') DO (SET COURSEBASE_DIR=%%Z)
rem	Remove xml tags
	for %%Y IN ( %COURSEBASE_DIR:~29,-8% ) DO (SET COURSEBASE_DIR2=%%Y)

	xcopy book_templates\%BOOKTEMPLATE%\page_templates %COURSEBASE_DIR2%\common\templates /D /S /R /Y /I /K
	xcopy book_templates\%BOOKTEMPLATE%\styles %COURSEBASE_DIR2%\%COURSE%\%INPUTDIR2%\common\styles /D /S /R /Y /I /K
	xcopy book_templates\%BOOKTEMPLATE%\images %COURSEBASE_DIR2%\common\images /D /S /R /Y /I /K

	java -jar chilo-epub3-maker.jar -course %COURSE% %INPUTDIR% %OUTPUTDIR% %OUTPUTNAME%

	rd /s /q %COURSEBASE_DIR2%\common\templates
	rd /s /q %COURSEBASE_DIR2%\%COURSE%\%INPUTDIR2%\common\styles
	rd /s /q %COURSEBASE_DIR2%\common\images

	goto ALLDONE

:ALLDONE
	call :CLEARVALS

Fix dry-run mode

Fix dry-run mode


@ECHO OFF

REM Command file for Sphinx documentation

set SPHINXBUILD=sphinx-build
set ALLSPHINXOPTS=-d build/doctrees %SPHINXOPTS% source
if NOT "%PAPER%" == "" (
	set ALLSPHINXOPTS=-D latex_paper_size=%PAPER% %ALLSPHINXOPTS%
)

if "%1" == "" goto help

if "%1" == "help" (
	:help
	echo.Please use `make ^<target^>` where ^<target^> is one of
	echo.  html      to make standalone HTML files
	echo.  dirhtml   to make HTML files named index.html in directories
	echo.  pickle    to make pickle files
	echo.  json      to make JSON files
	echo.  htmlhelp  to make HTML files and a HTML help project
	echo.  qthelp    to make HTML files and a qthelp project
	echo.  devhelp   to make HTML files and a Devhelp project
	echo.  latex     to make LaTeX files, you can set PAPER=a4 or PAPER=letter
	echo.  changes   to make an overview over all changed/added/deprecated items
	echo.  linkcheck to check all external links for integrity
	echo.  doctest   to run all doctests embedded in the documentation if enabled
	goto end
)

if "%1" == "clean" (
	for /d %%i in (build\*) do rmdir /q /s %%i
	del /q /s build\*
	goto end
)

if "%1" == "html" (
	%SPHINXBUILD% -b html %ALLSPHINXOPTS% build/html
	echo.
	echo.Build finished. The HTML pages are in build/html.
	goto end
)

if "%1" == "dirhtml" (
	%SPHINXBUILD% -b dirhtml %ALLSPHINXOPTS% build/dirhtml
	echo.
	echo.Build finished. The HTML pages are in build/dirhtml.
	goto end
)

if "%1" == "pickle" (
	%SPHINXBUILD% -b pickle %ALLSPHINXOPTS% build/pickle
	echo.
	echo.Build finished; now you can process the pickle files.
	goto end
)

if "%1" == "json" (
	%SPHINXBUILD% -b json %ALLSPHINXOPTS% build/json
	echo.
	echo.Build finished; now you can process the JSON files.
	goto end
)

if "%1" == "htmlhelp" (
	%SPHINXBUILD% -b htmlhelp %ALLSPHINXOPTS% build/htmlhelp
	echo.
	echo.Build finished; now you can run HTML Help Workshop with the ^
.hhp project file in build/htmlhelp.
	goto end
)

if "%1" == "qthelp" (
	%SPHINXBUILD% -b qthelp %ALLSPHINXOPTS% build/qthelp
	echo.
	echo.Build finished; now you can run "qcollectiongenerator" with the ^
.qhcp project file in build/qthelp, like this:
	echo.^> qcollectiongenerator build\qthelp\scikitimage.qhcp
	echo.To view the help file:
	echo.^> assistant -collectionFile build\qthelp\scikitimage.ghc
	goto end
)

if "%1" == "devhelp" (
	%SPHINXBUILD% -b devhelp %ALLSPHINXOPTS% build/devhelp
	echo.
	echo.Build finished.
	goto end
)

if "%1" == "latex" (
	%SPHINXBUILD% -b latex %ALLSPHINXOPTS% build/latex
	echo.
	echo.Build finished; the LaTeX files are in build/latex.
	goto end
)

if "%1" == "changes" (
	%SPHINXBUILD% -b changes %ALLSPHINXOPTS% build/changes
	echo.
	echo.The overview file is in build/changes.
	goto end
)

if "%1" == "linkcheck" (
	%SPHINXBUILD% -b linkcheck %ALLSPHINXOPTS% build/linkcheck
	echo.
	echo.Link check complete; look for any errors in the above output ^
or in build/linkcheck/output.txt.
	goto end
)

if "%1" == "doctest" (
	%SPHINXBUILD% -b doctest %ALLSPHINXOPTS% build/doctest
	echo.
	echo.Testing of doctests in the sources finished, look at the ^
results in build/doctest/output.txt.
	goto end
)

:end

@ECHO OFF

REM Command file for Sphinx documentation

set SPHINXBUILD=sphinx-build
set ALLSPHINXOPTS=-d build/doctrees %SPHINXOPTS% source
if NOT "%PAPER%" == "" (
	set ALLSPHINXOPTS=-D latex_paper_size=%PAPER% %ALLSPHINXOPTS%
)

if "%1" == "" goto help

if "%1" == "help" (
	:help
	echo.Please use `make ^<target^>` where ^<target^> is one of
	echo.  html      to make standalone HTML files
	echo.  dirhtml   to make HTML files named index.html in directories
	echo.  pickle    to make pickle files
	echo.  json      to make JSON files
	echo.  htmlhelp  to make HTML files and a HTML help project
	echo.  qthelp    to make HTML files and a qthelp project
	echo.  devhelp   to make HTML files and a Devhelp project
	echo.  latex     to make LaTeX files, you can set PAPER=a4 or PAPER=letter
	echo.  changes   to make an overview over all changed/added/deprecated items
	echo.  linkcheck to check all external links for integrity
	echo.  doctest   to run all doctests embedded in the documentation if enabled
	goto end
)

for %%x in (html htmlhelp latex qthelp) do (
	if "%1" == "%%x" (
		md source\api 2>NUL
		python tools/build_modref_templates.py
	)
)

if "%1" == "clean" (
	for /d %%i in (build\*) do rmdir /q /s %%i
	del /q /s build\*
	goto end
)

if "%1" == "html" (
	cd source && python random_gallery.py && python coverage_generator.py && cd ..
	%SPHINXBUILD% -b html %ALLSPHINXOPTS% build/html
	echo.
	echo.Build finished. The HTML pages are in build/html.
	goto end
)

if "%1" == "dirhtml" (
	%SPHINXBUILD% -b dirhtml %ALLSPHINXOPTS% build/dirhtml
	echo.
	echo.Build finished. The HTML pages are in build/dirhtml.
	goto end
)

if "%1" == "pickle" (
	%SPHINXBUILD% -b pickle %ALLSPHINXOPTS% build/pickle
	echo.
	echo.Build finished; now you can process the pickle files.
	goto end
)

if "%1" == "json" (
	%SPHINXBUILD% -b json %ALLSPHINXOPTS% build/json
	echo.
	echo.Build finished; now you can process the JSON files.
	goto end
)

if "%1" == "htmlhelp" (
	%SPHINXBUILD% -b htmlhelp %ALLSPHINXOPTS% build/htmlhelp
	echo.
	echo.Build finished; now you can run HTML Help Workshop with the ^
.hhp project file in build/htmlhelp.
	goto end
)

if "%1" == "qthelp" (
	%SPHINXBUILD% -b qthelp %ALLSPHINXOPTS% build/qthelp
	echo.
	echo.Build finished; now you can run "qcollectiongenerator" with the ^
.qhcp project file in build/qthelp, like this:
	echo.^> qcollectiongenerator build\qthelp\scikitimage.qhcp
	echo.To view the help file:
	echo.^> assistant -collectionFile build\qthelp\scikitimage.ghc
	goto end
)

if "%1" == "devhelp" (
	%SPHINXBUILD% -b devhelp %ALLSPHINXOPTS% build/devhelp
	echo.
	echo.Build finished.
	goto end
)

if "%1" == "latex" (
	%SPHINXBUILD% -b latex %ALLSPHINXOPTS% build/latex
	echo.
	echo.Build finished; the LaTeX files are in build/latex.
	goto end
)

if "%1" == "changes" (
	%SPHINXBUILD% -b changes %ALLSPHINXOPTS% build/changes
	echo.
	echo.The overview file is in build/changes.
	goto end
)

if "%1" == "linkcheck" (
	%SPHINXBUILD% -b linkcheck %ALLSPHINXOPTS% build/linkcheck
	echo.
	echo.Link check complete; look for any errors in the above output ^
or in build/linkcheck/output.txt.
	goto end
)

if "%1" == "doctest" (
	%SPHINXBUILD% -b doctest %ALLSPHINXOPTS% build/doctest
	echo.
	echo.Testing of doctests in the sources finished, look at the ^
results in build/doctest/output.txt.
	goto end
)

:end

Fix make.bat

Fix make.bat


@echo off

echo.
echo ################
echo TO_ICF
echo ################
echo.

setlocal EnableDelayedExpansion

if exist *.icf del /Q *.icf
if exist *.tmp del /Q *.tmp

set ManagerName=ManagerName

:: Get ManagerName
for /f "usebackq skip=1 tokens=*" %%i in (`wmic computersystem get name ^| findstr /r /v "^$" `) do (
	    set ManagerName=%%i )

echo ################
echo Get ManagerName= %ManagerName%
echo ################

echo ################
echo Careate icf_info.tmp file
echo ################

:: Careate icf_info_top.tmp
set TampFileName=icf_info_top
::echo ################
::echo Careate !TampFileName!.tmp
::echo ################
::echo.
echo Version 1.1.0 >> !TampFileName!.tmp
echo 'TEST SETUP ==================================================================== >> !TampFileName!.tmp
echo 'Test Description >> !TampFileName!.tmp
echo. >> !TampFileName!.tmp
echo 'Run Time >> !TampFileName!.tmp
echo '	hours      minutes    seconds >> !TampFileName!.tmp
echo 	0          10         0 >> !TampFileName!.tmp
echo 'Ramp Up Time ^(s^) >> !TampFileName!.tmp
echo 	300 >> !TampFileName!.tmp
echo 'Default Disk Workers to Spawn >> !TampFileName!.tmp
echo 	NUMBER_OF_CPUS >> !TampFileName!.tmp
echo 'Default Network Workers to Spawn >> !TampFileName!.tmp
echo 	0 >> !TampFileName!.tmp
echo 'Record Results >> !TampFileName!.tmp
echo 	ALL >> !TampFileName!.tmp
echo 'Worker Cycling >> !TampFileName!.tmp
echo '	start      step       step type >> !TampFileName!.tmp
echo 	1          1          LINEAR >> !TampFileName!.tmp
echo 'Disk Cycling >> !TampFileName!.tmp
echo '	start      step       step type >> !TampFileName!.tmp
echo 	1          1          LINEAR >> !TampFileName!.tmp
echo 'Queue Depth Cycling >> !TampFileName!.tmp
echo '	start      end        step       step type >> !TampFileName!.tmp
echo 	1          32         2          EXPONENTIAL >> !TampFileName!.tmp
echo 'Test Type >> !TampFileName!.tmp
echo 	NORMAL >> !TampFileName!.tmp
echo 'END test setup >> !TampFileName!.tmp
echo 'RESULTS DISPLAY =============================================================== >> !TampFileName!.tmp
echo 'Record Last Update Results,Update Frequency,Update Type >> !TampFileName!.tmp
echo 	DISABLED,1,WHOLE_TEST >> !TampFileName!.tmp
echo 'Bar chart 1 statistic >> !TampFileName!.tmp
echo 	Total I/Os per Second >> !TampFileName!.tmp
echo 'Bar chart 2 statistic >> !TampFileName!.tmp
echo 	Total MBs per Second (Decimal) >> !TampFileName!.tmp
echo 'Bar chart 3 statistic >> !TampFileName!.tmp
echo 	Average I/O Response Time (ms) >> !TampFileName!.tmp
echo 'Bar chart 4 statistic >> !TampFileName!.tmp
echo 	Maximum I/O Response Time (ms) >> !TampFileName!.tmp
echo 'Bar chart 5 statistic >> !TampFileName!.tmp
echo 	%% CPU Utilization (total) >> !TampFileName!.tmp
echo 'Bar chart 6 statistic >> !TampFileName!.tmp
echo 	Total Error Count >> !TampFileName!.tmp
echo 'END results display >> !TampFileName!.tmp
echo 'ACCESS SPECIFICATIONS ========================================================= >> !TampFileName!.tmp
echo 'Access specification name,default assignment >> !TampFileName!.tmp
echo 	RVI_SAS_disk(2K),NONE >> !TampFileName!.tmp
echo 'size,%% of size,%% reads,%% random,delay,burst,align,reply >> !TampFileName!.tmp
echo 	2048,100,0,100,0,1,2048,0 >> !TampFileName!.tmp
echo 'Access specification name,default assignment >> !TampFileName!.tmp
echo 	RVI_SATA_disk(6K),NONE >> !TampFileName!.tmp
echo 'size,%% of size,%% reads,%% random,delay,burst,align,reply >> !TampFileName!.tmp
echo 	6144,100,0,100,0,1,6144,0 >> !TampFileName!.tmp
echo 'END access specifications >> !TampFileName!.tmp
echo 'MANAGER LIST ================================================================== >> !TampFileName!.tmp
echo 'Manager ID, manager name >> !TampFileName!.tmp
echo 	1, >> !TampFileName!.tmp
echo 'Manager network address >> !TampFileName!.tmp
echo. >> !TampFileName!.tmp

:: Careate icf_Worker_info_top.tmp
set TampFileName=icf_Worker_info_top
::echo ################
::echo Careate !TampFileName!.tmp
::echo ################
::echo.
echo 'Worker >> !TampFileName!.tmp
::echo     Worker 1 >> !TampFileName!.tmp

:: Careate icf_Worker_info_mid_top.tmp
set TampFileName=icf_Worker_info_mid_top
::echo ################
::echo Careate !TampFileName!.tmp
::echo ################
::echo.
echo 'Worker type >> !TampFileName!.tmp
echo 	DISK >> !TampFileName!.tmp
echo 'Default target settings for worker >> !TampFileName!.tmp
echo 'Number of outstanding IOs,test connection rate,transactions per connection,use fixed seed,fixed seed value >> !TampFileName!.tmp
::echo 	1,DISABLED,1,DISABLED,0 >> !TampFileName!.tmp

:: Careate icf_Worker_info_mid_bot.tmp
set TampFileName=icf_Worker_info_mid_bot
::echo ################
::echo Careate !TampFileName!.tmp
::echo ################
::echo.
echo 'Disk maximum size,starting sector,Data pattern >> !TampFileName!.tmp
echo 	0,0,0 >> !TampFileName!.tmp
echo 'End default target settings for worker >> !TampFileName!.tmp
echo 'Assigned access specs >> !TampFileName!.tmp
echo 	RVI_SAS_disk(2K) >> !TampFileName!.tmp
echo 'End assigned access specs >> !TampFileName!.tmp
echo 'Target assignments >> !TampFileName!.tmp
echo 'Target >> !TampFileName!.tmp
::echo     1: "" >> !TampFileName!.tmp

:: Careate icf_Worker_info_bot.tmp
set TampFileName=icf_Worker_info_bot
::echo ################
::echo Careate !TampFileName!.tmp
::echo ################
::echo.
echo 'Target type >> !TampFileName!.tmp
echo 	DISK >> !TampFileName!.tmp
echo 'End target >> !TampFileName!.tmp
echo 'End target assignments >> !TampFileName!.tmp
echo 'End worker >> !TampFileName!.tmp

:: Careate icf_info_bot.tmp
set TampFileName=icf_info_bot
::echo ################
::echo Careate !TampFileName!.tmp
::echo ################
::echo.
echo 'End manager >> !TampFileName!.tmp
echo 'END manager list >> !TampFileName!.tmp
echo Version 1.1.0 >> !TampFileName!.tmp

echo ################
echo Disk detect...
echo ################

for /f "tokens=2,3" %%a in ('echo list disk ^| diskpart') do (
    set DiskNum=%%a )

echo ################
echo Start carte many icf file
echo ################
echo.

::set DiskNum=26
set FileName=00

for /L %%i in (1, 1, %DiskNum%) do (
    set "formattedValue=000000%%i"
	set FileName=!formattedValue:~-2!
    echo !FileName!.icf
	:: imput icf_info_top
	type icf_info_top.tmp                               >> !FileName!.icf
	    :: imput icf_Worker_info_top(outstanding=8)
	    type icf_Worker_info_top.tmp                    >> !FileName!.icf
        echo     Worker 1 >> !FileName!.icf
	    :: imput icf_Worker_mid_top
	    type icf_Worker_info_mid_top.tmp                >> !FileName!.icf
	    echo 	8,DISABLED,1,DISABLED,0 >> !FileName!.icf
	    :: imput icf_Worker_info_mid_bot
	    type icf_Worker_info_mid_bot.tmp                >> !FileName!.icf
	    echo     %%i: "">> !FileName!.icf
	    :: imput icf_Worker_info_bot
	    type icf_Worker_info_bot.tmp                    >> !FileName!.icf
	:: imput Other Worker info(outstanding=1)
	for /L %%j in (2, 1, %DiskNum%) do (
	    if %%i==%%j (
		    :: imput icf_Worker_info_top
	        type icf_Worker_info_top.tmp                >> !FileName!.icf
            echo     Worker %%j >> !FileName!.icf
	        :: imput icf_Worker_mid_top
	        type icf_Worker_info_mid_top.tmp            >> !FileName!.icf
	        echo 	1,DISABLED,1,DISABLED,0 >> !FileName!.icf
	        :: imput icf_Worker_info_mid_bot
	        type icf_Worker_info_mid_bot.tmp            >> !FileName!.icf
	        echo     1: "" >> !FileName!.icf
		    :: imput icf_Worker_info_bot
	        type icf_Worker_info_bot.tmp                >> !FileName!.icf
	    )else (
		    :: imput icf_Worker_info_top
	        type icf_Worker_info_top.tmp                >> !FileName!.icf
            echo     Worker %%j >> !FileName!.icf
	        :: imput icf_Worker_mid_top
	        type icf_Worker_info_mid_top.tmp            >> !FileName!.icf
	        echo 	1,DISABLED,1,DISABLED,0 >> !FileName!.icf
	        :: imput icf_Worker_info_mid_bot
	        type icf_Worker_info_mid_bot.tmp            >> !FileName!.icf
	        echo     %%j: "" >> !FileName!.icf
	        :: imput icf_Worker_info_bot
	        type icf_Worker_info_bot.tmp                >> !FileName!.icf
	    )
	)
	 type icf_info_bot.tmp                              >> !FileName!.icf
)

echo.
echo ################
echo Complete carte many icf file
echo ################
echo.

if exist *.tmp del /Q *.tmp

@echo off

echo.
echo ################
echo TO_ICF
echo ################
echo.

setlocal EnableDelayedExpansion

if exist *.icf del /Q *.icf
if exist *.tmp del /Q *.tmp

set ManagerName=ManagerName

:: Get ManagerName
for /f "usebackq skip=1 tokens=*" %%i in (`wmic computersystem get name ^| findstr /r /v "^$" `) do (
	    set ManagerName=%%i )

echo ################
echo Get ManagerName= %ManagerName%
echo ################

echo ################
echo Get diskdrive get FirmwareRevision, Index, Model
echo ################
wmic diskdrive get FirmwareRevision, Index, Model > diskdrive.tmp
type diskdrive.tmp > diskdrive.txt

for /f "skip=1 tokens=1,2,3,4* " %%i in (diskdrive.txt) do (
    ::echo %%j %%k %%i
    set "formattedValue=%%k"
    ::set ModelName=!formattedValue:~0,20!
    echo %%j !formattedValue:~0,20! %%i >> disklist.tmp
)

::type disklist.tmp
sort disklist.tmp > disksort.tmp
type disksort.tmp

echo ################
echo Get os get "SystemDrive"
echo ################

wmic os get "SystemDrive" > SystemDrive.tmp
type SystemDrive.tmp > SystemDrive.txt

for /f "skip=1 tokens=1,2,3,4* " %%i in (SystemDrive.txt) do (
    echo %%i
    set SystemDrive=%%i
)
echo ################
echo Get os get "SystemDrive"="%SystemDrive%"
echo ################

echo ################
echo Get os get "SystemDriveID"
echo ################

wmic logicaldisk where 'DeviceID="%SystemDrive%"' get Access > SystemDriveID.tmp

type SystemDriveID.tmp > SystemDriveID.txt

for /f "skip=1 tokens=1,2,3,4* " %%i in (SystemDriveID.txt) do (
    echo %%i
    set SystemDriveID=%%i
)
echo ################
echo Get os get "SystemDriveID"="%SystemDriveID%"
echo ################

echo ################
echo Remove OS disk in list
echo ################
type disksort.tmp | findstr /v " %SystemDriveID% " > disksort.txt
type disksort.txt
echo ################
echo Remove OS disk in list
echo ################

if disksort.txt == "" goto END

echo ################
echo Careate icf_info.tmp file
echo ################

:: Careate icf_info_top.tmp
set TampFileName=icf_info_top
::echo ################
::echo Careate !TampFileName!.tmp
::echo ################
::echo.
echo Version 1.1.0 >> !TampFileName!.tmp
echo 'TEST SETUP ==================================================================== >> !TampFileName!.tmp
echo 'Test Description >> !TampFileName!.tmp
echo. >> !TampFileName!.tmp
echo 'Run Time >> !TampFileName!.tmp
echo '	hours      minutes    seconds >> !TampFileName!.tmp
echo 	0          10         0 >> !TampFileName!.tmp
echo 'Ramp Up Time ^(s^) >> !TampFileName!.tmp
echo 	300 >> !TampFileName!.tmp
echo 'Default Disk Workers to Spawn >> !TampFileName!.tmp
echo 	NUMBER_OF_CPUS >> !TampFileName!.tmp
echo 'Default Network Workers to Spawn >> !TampFileName!.tmp
echo 	0 >> !TampFileName!.tmp
echo 'Record Results >> !TampFileName!.tmp
echo 	ALL >> !TampFileName!.tmp
echo 'Worker Cycling >> !TampFileName!.tmp
echo '	start      step       step type >> !TampFileName!.tmp
echo 	1          1          LINEAR >> !TampFileName!.tmp
echo 'Disk Cycling >> !TampFileName!.tmp
echo '	start      step       step type >> !TampFileName!.tmp
echo 	1          1          LINEAR >> !TampFileName!.tmp
echo 'Queue Depth Cycling >> !TampFileName!.tmp
echo '	start      end        step       step type >> !TampFileName!.tmp
echo 	1          32         2          EXPONENTIAL >> !TampFileName!.tmp
echo 'Test Type >> !TampFileName!.tmp
echo 	NORMAL >> !TampFileName!.tmp
echo 'END test setup >> !TampFileName!.tmp
echo 'RESULTS DISPLAY =============================================================== >> !TampFileName!.tmp
echo 'Record Last Update Results,Update Frequency,Update Type >> !TampFileName!.tmp
echo 	DISABLED,1,WHOLE_TEST >> !TampFileName!.tmp
echo 'Bar chart 1 statistic >> !TampFileName!.tmp
echo 	Total I/Os per Second >> !TampFileName!.tmp
echo 'Bar chart 2 statistic >> !TampFileName!.tmp
echo 	Total MBs per Second (Decimal) >> !TampFileName!.tmp
echo 'Bar chart 3 statistic >> !TampFileName!.tmp
echo 	Average I/O Response Time (ms) >> !TampFileName!.tmp
echo 'Bar chart 4 statistic >> !TampFileName!.tmp
echo 	Maximum I/O Response Time (ms) >> !TampFileName!.tmp
echo 'Bar chart 5 statistic >> !TampFileName!.tmp
echo 	%% CPU Utilization (total) >> !TampFileName!.tmp
echo 'Bar chart 6 statistic >> !TampFileName!.tmp
echo 	Total Error Count >> !TampFileName!.tmp
echo 'END results display >> !TampFileName!.tmp
echo 'ACCESS SPECIFICATIONS ========================================================= >> !TampFileName!.tmp
echo 'Access specification name,default assignment >> !TampFileName!.tmp
echo 	RVI_SAS_disk(2K),NONE >> !TampFileName!.tmp
echo 'size,%% of size,%% reads,%% random,delay,burst,align,reply >> !TampFileName!.tmp
echo 	2048,100,0,100,0,1,2048,0 >> !TampFileName!.tmp
echo 'Access specification name,default assignment >> !TampFileName!.tmp
echo 	RVI_SATA_disk(6K),NONE >> !TampFileName!.tmp
echo 'size,%% of size,%% reads,%% random,delay,burst,align,reply >> !TampFileName!.tmp
echo 	6144,100,0,100,0,1,6144,0 >> !TampFileName!.tmp
echo 'END access specifications >> !TampFileName!.tmp
echo 'MANAGER LIST ================================================================== >> !TampFileName!.tmp
echo 'Manager ID, manager name >> !TampFileName!.tmp
echo 	1, >> !TampFileName!.tmp
echo 'Manager network address >> !TampFileName!.tmp
echo. >> !TampFileName!.tmp

:: Careate icf_Worker_info_top.tmp
set TampFileName=icf_Worker_info_top
::echo ################
::echo Careate !TampFileName!.tmp
::echo ################
::echo.
echo 'Worker >> !TampFileName!.tmp
::echo     Worker 1 >> !TampFileName!.tmp

:: Careate icf_Worker_info_mid_top.tmp
set TampFileName=icf_Worker_info_mid_top
::echo ################
::echo Careate !TampFileName!.tmp
::echo ################
::echo.
echo 'Worker type >> !TampFileName!.tmp
echo 	DISK >> !TampFileName!.tmp
echo 'Default target settings for worker >> !TampFileName!.tmp
echo 'Number of outstanding IOs,test connection rate,transactions per connection,use fixed seed,fixed seed value >> !TampFileName!.tmp
::echo 	1,DISABLED,1,DISABLED,0 >> !TampFileName!.tmp

:: Careate icf_Worker_info_mid_bot.tmp
set TampFileName=icf_Worker_info_mid_bot
::echo ################
::echo Careate !TampFileName!.tmp
::echo ################
::echo.
echo 'Disk maximum size,starting sector,Data pattern >> !TampFileName!.tmp
echo 	0,0,0 >> !TampFileName!.tmp
echo 'End default target settings for worker >> !TampFileName!.tmp
echo 'Assigned access specs >> !TampFileName!.tmp
echo 	RVI_SAS_disk(2K) >> !TampFileName!.tmp
echo 'End assigned access specs >> !TampFileName!.tmp
echo 'Target assignments >> !TampFileName!.tmp
echo 'Target >> !TampFileName!.tmp
::echo     1: "" >> !TampFileName!.tmp

:: Careate icf_Worker_info_bot.tmp
set TampFileName=icf_Worker_info_bot
::echo ################
::echo Careate !TampFileName!.tmp
::echo ################
::echo.
echo 'Target type >> !TampFileName!.tmp
echo 	DISK >> !TampFileName!.tmp
echo 'End target >> !TampFileName!.tmp
echo 'End target assignments >> !TampFileName!.tmp
echo 'End worker >> !TampFileName!.tmp

:: Careate icf_info_bot.tmp
set TampFileName=icf_info_bot
::echo ################
::echo Careate !TampFileName!.tmp
::echo ################
::echo.
echo 'End manager >> !TampFileName!.tmp
echo 'END manager list >> !TampFileName!.tmp
echo Version 1.1.0 >> !TampFileName!.tmp

echo ################
echo Disk detect...
echo ################

for /f "tokens=2,3" %%a in ('echo list disk ^| diskpart') do (
    set DiskNum=%%a )

echo ################
echo Start carte many icf file
echo ################
echo.

::set DiskNum=26
set FileName=00

for /L %%i in (1, 1, %DiskNum%) do (
    set "formattedValue=000000%%i"
	set FileName=!formattedValue:~-2!
    echo !FileName!.icf
	:: imput icf_info_top
	type icf_info_top.tmp                               >> !FileName!.icf
	    :: imput icf_Worker_info_top(outstanding=8)
	    type icf_Worker_info_top.tmp                    >> !FileName!.icf
        echo     Worker 1 >> !FileName!.icf
	    :: imput icf_Worker_mid_top
	    type icf_Worker_info_mid_top.tmp                >> !FileName!.icf
	    echo 	8,DISABLED,1,DISABLED,0 >> !FileName!.icf
	    :: imput icf_Worker_info_mid_bot
	    type icf_Worker_info_mid_bot.tmp                >> !FileName!.icf
	    echo     %%i: "">> !FileName!.icf
	    :: imput icf_Worker_info_bot
	    type icf_Worker_info_bot.tmp                    >> !FileName!.icf
	:: imput Other Worker info(outstanding=1)
	for /L %%j in (2, 1, %DiskNum%) do (
	    if %%i==%%j (
		    :: imput icf_Worker_info_top
	        type icf_Worker_info_top.tmp                >> !FileName!.icf
            echo     Worker %%j >> !FileName!.icf
	        :: imput icf_Worker_mid_top
	        type icf_Worker_info_mid_top.tmp            >> !FileName!.icf
	        echo 	1,DISABLED,1,DISABLED,0 >> !FileName!.icf
	        :: imput icf_Worker_info_mid_bot
	        type icf_Worker_info_mid_bot.tmp            >> !FileName!.icf
	        echo     1: "" >> !FileName!.icf
		    :: imput icf_Worker_info_bot
	        type icf_Worker_info_bot.tmp                >> !FileName!.icf
	    )else (
		    :: imput icf_Worker_info_top
	        type icf_Worker_info_top.tmp                >> !FileName!.icf
            echo     Worker %%j >> !FileName!.icf
	        :: imput icf_Worker_mid_top
	        type icf_Worker_info_mid_top.tmp            >> !FileName!.icf
	        echo 	1,DISABLED,1,DISABLED,0 >> !FileName!.icf
	        :: imput icf_Worker_info_mid_bot
	        type icf_Worker_info_mid_bot.tmp            >> !FileName!.icf
	        echo     %%j: "" >> !FileName!.icf
	        :: imput icf_Worker_info_bot
	        type icf_Worker_info_bot.tmp                >> !FileName!.icf
	    )
	)
	 type icf_info_bot.tmp                              >> !FileName!.icf
)

echo.
echo ################
echo Complete carte many icf file
echo ################
echo.

if exist *.tmp del /Q *.tmp

add more os & device info

add more os & device info


:: Start with bootstrap
:: cd .\tools\build
ECHO .\bootstrap.bat
CALL .\bootstrap.bat
:: IF errorlevel 1 exit 1
ECHO .\bootstrap.bat mingw
CALL .\bootstrap.bat mingw
IF errorlevel 1 exit 1
:: ECHO .\b2.exe install toolset=gcc --prefix=%SRC_DIR%\b2_for_mingw
:: CALL .\b2.exe install toolset=gcc --prefix=%SRC_DIR%\b2_for_mingw
:: ECHO cd %SRCDIR%
:: cd %SRCDIR%
:: set PATH=%PATH%;%SRCDIR%\b2_for_mingw\bin
:: ECHO b2 toolset=gcc --build-type=complete stage ^
::      --build-dir=buildboost ^
::      --prefix=%LIBRARY_PREFIX% ^
::      address-model=%ARCH% ^
::      variant=release ^
::      threading=multi ^
::      link=shared ^
::      -j%CPU_COUNT% ^
::      -s ZLIB_INCLUDE="%LIBRARY_INC%" ^
::      -s ZLIB_LIBPATH="%LIBRARY_LIB%" ^
::      --with-python
:: CALL b2 toolset=gcc --build-type=complete stage ^
::      --build-dir=buildboost ^
::      --prefix=%LIBRARY_PREFIX% ^
::      address-model=%ARCH% ^
::      variant=release ^
::      threading=multi ^
::      link=shared ^
::      -j%CPU_COUNT% ^
::      -s ZLIB_INCLUDE="%LIBRARY_INC%" ^
::      -s ZLIB_LIBPATH="%LIBRARY_LIB%" ^
::      --with-python

:: cd ..\..
:: dir .
:: CALL .\tools\build\b2.exe install toolset=gcc --prefix=%LIBRARY_PREFIX%
:: dir .
:: set PATH=%PATH%;%LIBRARY_BIN%
::
:: Build step
:: CALL b2 install ^
::     --build-dir=buildboost ^
::     --prefix=%LIBRARY_PREFIX% ^
::     toolset=gcc ^
::     address-model=%ARCH% ^
::     variant=release ^
::     threading=multi ^
::     link=shared ^
::     -j%CPU_COUNT% ^
::     -s ZLIB_INCLUDE="%LIBRARY_INC%" ^
::     -s ZLIB_LIBPATH="%LIBRARY_LIB%" ^
::     --with-python
:: IF errorlevel 1 exit 1
::
:: :: Install fix-up for a non version-specific boost include
:: move %LIBRARY_INC%\boost-1_61\boost %LIBRARY_INC%
:: IF errorlevel 1 exit 1
::
:: Move dll's to LIBRARY_BIN
:: move %LIBRARY_LIB%\*vc%LIB_VER%-mt-1_61.dll "%LIBRARY_BIN%"
:: IF errorlevel 1 exit 1
:: Status API Training Shop Blog About

:: Start with bootstrap
:: cd .\tools\build
ECHO .\bootstrap.bat
CALL .\bootstrap.bat
IF errorlevel 1 exit 1
ECHO .\bootstrap.bat mingw
CALL .\bootstrap.bat mingw
ECHO type bootstrap.log
CALL type bootstrap.log
CALL .\bootstrap.bat mingw
IF errorlevel 1 exit 1
:: ECHO .\b2.exe install toolset=gcc --prefix=%SRC_DIR%\b2_for_mingw
:: CALL .\b2.exe install toolset=gcc --prefix=%SRC_DIR%\b2_for_mingw
:: ECHO cd %SRCDIR%
:: cd %SRCDIR%
:: set PATH=%PATH%;%SRCDIR%\b2_for_mingw\bin
:: ECHO b2 toolset=gcc --build-type=complete stage ^
::      --build-dir=buildboost ^
::      --prefix=%LIBRARY_PREFIX% ^
::      address-model=%ARCH% ^
::      variant=release ^
::      threading=multi ^
::      link=shared ^
::      -j%CPU_COUNT% ^
::      -s ZLIB_INCLUDE="%LIBRARY_INC%" ^
::      -s ZLIB_LIBPATH="%LIBRARY_LIB%" ^
::      --with-python
:: CALL b2 toolset=gcc --build-type=complete stage ^
::      --build-dir=buildboost ^
::      --prefix=%LIBRARY_PREFIX% ^
::      address-model=%ARCH% ^
::      variant=release ^
::      threading=multi ^
::      link=shared ^
::      -j%CPU_COUNT% ^
::      -s ZLIB_INCLUDE="%LIBRARY_INC%" ^
::      -s ZLIB_LIBPATH="%LIBRARY_LIB%" ^
::      --with-python

:: cd ..\..
:: dir .
:: CALL .\tools\build\b2.exe install toolset=gcc --prefix=%LIBRARY_PREFIX%
:: dir .
:: set PATH=%PATH%;%LIBRARY_BIN%
::
:: Build step
:: CALL b2 install ^
::     --build-dir=buildboost ^
::     --prefix=%LIBRARY_PREFIX% ^
::     toolset=gcc ^
::     address-model=%ARCH% ^
::     variant=release ^
::     threading=multi ^
::     link=shared ^
::     -j%CPU_COUNT% ^
::     -s ZLIB_INCLUDE="%LIBRARY_INC%" ^
::     -s ZLIB_LIBPATH="%LIBRARY_LIB%" ^
::     --with-python
:: IF errorlevel 1 exit 1
::
:: :: Install fix-up for a non version-specific boost include
:: move %LIBRARY_INC%\boost-1_61\boost %LIBRARY_INC%
:: IF errorlevel 1 exit 1
::
:: Move dll's to LIBRARY_BIN
:: move %LIBRARY_LIB%\*vc%LIB_VER%-mt-1_61.dll "%LIBRARY_BIN%"
:: IF errorlevel 1 exit 1
:: Status API Training Shop Blog About

Update bld.bat

Update bld.bat


@echo off
SETLOCAL

REM -- the directory in which do.bat lives
SET DO_DIR=%~dp0

IF NOT EXIST %DO_DIR%..\..\..\..\src\github.com\google\gapid (
  echo It looks like the directory structure of
  echo   %DO_DIR%
  echo doesn't match what is expected.
  echo.
  echo Did you 'git clone' the project instead of using 'go get'?
  echo Please follow the building directions found here:
  echo   https://github.com/google/gapid/blob/master/BUILDING.md
  exit /B
)

REM -- glob all go files in cmd\do
set DO_GO_FILES=
for /f "tokens=*" %%F in ('dir /b /a:-d "cmd\do\*.go"') do call set DO_GO_FILES=%%DO_GO_FILES%% "cmd\do\%%F"

REM -- set GOPATH
pushd .
cd %DO_DIR%..\..\..\..\
SET GOPATH=%DO_DIR%third_party;%CD%
popd

pushd .
cd %DO_DIR%
go run %DO_GO_FILES% %*
popd

@echo off
SETLOCAL

REM -- the directory in which do.bat lives
SET DO_DIR=%~dp0

IF NOT EXIST %DO_DIR%..\..\..\..\src\github.com\google\gapid (
  echo It looks like the directory structure of
  echo   %DO_DIR%
  echo doesn't match what is expected.
  echo.
  echo Did you 'git clone' the project instead of using 'go get'?
  echo Please follow the building directions found here:
  echo   https://github.com/google/gapid/blob/master/BUILDING.md
  exit /B
)

REM -- glob all go files in cmd\do
set DO_GO_FILES=
for /f "tokens=*" %%F in ('dir /b /a:-d "cmd\do\*.go"') do call set DO_GO_FILES=%%DO_GO_FILES%% "cmd\do\%%F"

REM -- set GOPATH
pushd .
cd %DO_DIR%..\..\..\..\
SET GOPATH=%DO_DIR%third_party;%CD%
popd

REM -- Do some env cleanup.
SET LIB=
SET LIBPATH=

pushd .
cd %DO_DIR%
go run %DO_GO_FILES% %*
popd

Clear LIB and LIBPATH in do.bat for a saner windows build.

Closes #494


del "spec/*.js"
call tsc "spec/ActorSpec.ts" -out "spec/ActorSpec.js"
call tsc "spec/ColorSpec.ts" -out "spec/ColorSpec.js"
call tsc "spec/PromiseSpec.ts" -out "spec/PromiseSpec.js"
call tsc "spec/CollectionSpec.ts" -out "spec/CollectionSpec.js"
call tsc "spec/LogSpec.ts" -out "spec/LogSpec.js"
call jasmine-node --verbose spec/

del "spec/*.js"
call tsc "spec/ActorSpec.ts" -out "spec/ActorSpec.js"
call tsc "spec/ColorSpec.ts" -out "spec/ColorSpec.js"
call tsc "spec/PromiseSpec.ts" -out "spec/PromiseSpec.js"
call tsc "spec/CollectionSpec.ts" -out "spec/CollectionSpec.js"
call tsc "spec/LogSpec.ts" -out "spec/LogSpec.js"
call tsc "spec/ClassSpec.ts" -out "spec/ClassSpec.js"
call tsc "spec/TimerSpec.ts" -out "spec/TimerSpec.js"
call jasmine-node --verbose spec/

Add new specs to bat

Add new specs to bat


@echo off
REM src/tools/msvc/clean.bat

set DIST=0
if "%1"=="dist" set DIST=1

set D=%CD%
if exist ..\msvc if exist ..\..\..\src cd ..\..\..

if exist debug rd /s /q debug
if exist release rd /s /q release
for %%f in (*.vcproj) do del %%f
for %%f in (*.vcxproj) do del %%f
for %%f in (*.vcxproj.user) do del %%f
if exist pgsql.sln del /q pgsql.sln
if exist pgsql.sln.cache del /q pgsql.sln.cache
if exist pgsql.sdf del /q pgsql.sdf
if exist pgsql.suo del /q /a:H pgsql.suo
del /s /q src\bin\win32ver.rc 2> NUL
del /s /q src\interfaces\win32ver.rc 2> NUL
if exist src\backend\win32ver.rc del /q src\backend\win32ver.rc
if exist src\backend\replication\libpqwalreceiver\win32ver.rc del /q src\backend\replication\libpqwalreceiver\win32ver.rc
if exist src\backend\snowball\win32ver.rc del /q src\backend\snowball\win32ver.rc
if exist src\interfaces\ecpg\test\win32ver.rc del /q src\interfaces\ecpg\test\win32ver.rc
if exist src\pl\plperl\win32ver.rc del /q src\pl\plperl\win32ver.rc
if exist src\pl\plpgsql\src\win32ver.rc del /q src\pl\plpgsql\src\win32ver.rc
if exist src\pl\plpython\win32ver.rc del /q src\pl\plpython\win32ver.rc
if exist src\pl\tcl\win32ver.rc del /q src\pl\tcl\win32ver.rc
if exist src\test\isolation\win32ver.rc del /q src\test\isolation\win32ver.rc
if exist src\test\regress\win32ver.rc del /q src\test\regress\win32ver.rc
if exist src\timezone\win32ver.rc del /q src\timezone\win32ver.rc

for /d %%f in (src\interfaces\ecpg\*) do if exist %%f\win32ver.rc del /q %%f\win32ver.rc
for /d %%f in (contrib\*) do if exist %%f\win32ver.rc del /q %%f\win32ver.rc
for /d %%f in (src\backend\utils\mb\conversion_procs\*) do if exist %%f\win32ver.rc del /q %%f\win32ver.rc

REM Delete files created with GenerateFiles() in Solution.pm
if exist src\include\pg_config.h del /q src\include\pg_config.h
if exist src\include\pg_config_ext.h del /q src\include\pg_config_ext.h
if exist src\include\pg_config_os.h del /q src\include\pg_config_os.h
if exist src\include\dynloader.h del /q src\include\dynloader.h
if %DIST%==1 if exist src\backend\parser\gram.h del /q src\backend\parser\gram.h
if exist src\include\utils\errcodes.h del /q src\include\utils\errcodes.h
if exist src\include\utils\fmgroids.h del /q src\include\utils\fmgroids.h
if exist src\include\utils\probes.h del /q src\include\utils\probes.h

if %DIST%==1 if exist src\backend\utils\fmgroids.h del /q src\backend\utils\fmgroids.h
if %DIST%==1 if exist src\backend\utils\fmgrtab.c del /q src\backend\utils\fmgrtab.c
if %DIST%==1 if exist src\backend\catalog\postgres.bki del /q src\backend\catalog\postgres.bki
if %DIST%==1 if exist src\backend\catalog\postgres.description del /q src\backend\catalog\postgres.description
if %DIST%==1 if exist src\backend\catalog\postgres.shdescription del /q src\backend\catalog\postgres.shdescription
if %DIST%==1 if exist src\backend\catalog\schemapg.h del /q src\backend\catalog\schemapg.h
if %DIST%==1 if exist src\backend\parser\scan.c del /q src\backend\parser\scan.c
if %DIST%==1 if exist src\backend\parser\gram.c del /q src\backend\parser\gram.c
if %DIST%==1 if exist src\backend\bootstrap\bootscanner.c del /q src\backend\bootstrap\bootscanner.c
if %DIST%==1 if exist src\backend\bootstrap\bootparse.c del /q src\backend\bootstrap\bootparse.c
if %DIST%==1 if exist src\backend\utils\misc\guc-file.c del /q src\backend\utils\misc\guc-file.c

if exist src\bin\psql\sql_help.h del /q src\bin\psql\sql_help.h

if exist src\interfaces\libpq\libpq.rc del /q src\interfaces\libpq\libpq.rc
if exist src\interfaces\libpq\libpqdll.def del /q src\interfaces\libpq\libpqdll.def
if exist src\interfaces\ecpg\compatlib\compatlib.def del /q src\interfaces\ecpg\compatlib\compatlib.def
if exist src\interfaces\ecpg\ecpglib\ecpglib.def del /q src\interfaces\ecpg\ecpglib\ecpglib.def
if exist src\interfaces\ecpg\include\ecpg_config.h del /q src\interfaces\ecpg\include\ecpg_config.h
if exist src\interfaces\ecpg\pgtypeslib\pgtypeslib.def del /q src\interfaces\ecpg\pgtypeslib\pgtypeslib.def
if %DIST%==1 if exist src\interfaces\ecpg\preproc\pgc.c del /q src\interfaces\ecpg\preproc\pgc.c
if %DIST%==1 if exist src\interfaces\ecpg\preproc\preproc.c del /q src\interfaces\ecpg\preproc\preproc.c
if %DIST%==1 if exist src\interfaces\ecpg\preproc\preproc.h del /q src\interfaces\ecpg\preproc\preproc.h

if exist src\port\pg_config_paths.h del /q src\port\pg_config_paths.h

if exist src\pl\plperl\spi.c del /q src\pl\plperl\spi.c
if %DIST%==1 if exist src\pl\plpgsql\src\pl_gram.c del /q src\pl\plpgsql\src\pl_gram.c
if %DIST%==1 if exist src\pl\plpgsql\src\pl_gram.h del /q src\pl\plpgsql\src\pl_gram.h

if %DIST%==1 if exist src\bin\psql\psqlscan.c del /q src\bin\psql\psqlscan.c

if %DIST%==1 if exist contrib\cube\cubescan.c del /q contrib\cube\cubescan.c
if %DIST%==1 if exist contrib\cube\cubeparse.c del /q contrib\cube\cubeparse.c
if %DIST%==1 if exist contrib\seg\segscan.c del /q contrib\seg\segscan.c
if %DIST%==1 if exist contrib\seg\segparse.c del /q contrib\seg\segparse.c

if exist src\test\regress\tmp_check rd /s /q src\test\regress\tmp_check
if exist contrib\spi\refint.dll del /q contrib\spi\refint.dll
if exist contrib\spi\autoinc.dll del /q contrib\spi\autoinc.dll
if exist src\test\regress\regress.dll del /q src\test\regress\regress.dll
if exist src\test\regress\refint.dll del /q src\test\regress\refint.dll
if exist src\test\regress\autoinc.dll del /q src\test\regress\autoinc.dll

if exist src\bin\initdb\tmp_check rd /s /q src\bin\initdb\tmp_check
if exist src\bin\pg_basebackup\tmp_check rd /s /q src\bin\pg_basebackup\tmp_check
if exist src\bin\pg_config\tmp_check rd /s /q src\bin\pg_config\tmp_check
if exist src\bin\pg_ctl\tmp_check rd /s /q src\bin\pg_ctl\tmp_check
if exist src\bin\pg_rewind\tmp_check rd /s /q src\bin\pg_rewind\tmp_check
if exist src\bin\pgbench\tmp_check rd /s /q src\bin\pgbench\tmp_check
if exist src\bin\scripts\tmp_check rd /s /q src\bin\scripts\tmp_check

REM Clean up datafiles built with contrib
REM cd contrib
REM for /r %%f in (*.sql) do if exist %%f.in del %%f

cd %D%

REM Clean up ecpg regression test files
msbuild /NoLogo ecpg_regression.proj /t:clean /v:q

goto :eof

@echo off
REM src/tools/msvc/clean.bat

set DIST=0
if "%1"=="dist" set DIST=1

set D=%CD%
if exist ..\msvc if exist ..\..\..\src cd ..\..\..

if exist debug rd /s /q debug
if exist release rd /s /q release
for %%f in (*.vcproj) do del %%f
for %%f in (*.vcxproj) do del %%f
for %%f in (*.vcxproj.user) do del %%f
if exist pgsql.sln del /q pgsql.sln
if exist pgsql.sln.cache del /q pgsql.sln.cache
if exist pgsql.sdf del /q pgsql.sdf
if exist pgsql.suo del /q /a:H pgsql.suo
del /s /q src\bin\win32ver.rc 2> NUL
del /s /q src\interfaces\win32ver.rc 2> NUL
if exist src\backend\win32ver.rc del /q src\backend\win32ver.rc
if exist src\backend\replication\libpqwalreceiver\win32ver.rc del /q src\backend\replication\libpqwalreceiver\win32ver.rc
if exist src\backend\snowball\win32ver.rc del /q src\backend\snowball\win32ver.rc
if exist src\interfaces\ecpg\test\win32ver.rc del /q src\interfaces\ecpg\test\win32ver.rc
if exist src\pl\plperl\win32ver.rc del /q src\pl\plperl\win32ver.rc
if exist src\pl\plpgsql\src\win32ver.rc del /q src\pl\plpgsql\src\win32ver.rc
if exist src\pl\plpython\win32ver.rc del /q src\pl\plpython\win32ver.rc
if exist src\pl\tcl\win32ver.rc del /q src\pl\tcl\win32ver.rc
if exist src\test\isolation\win32ver.rc del /q src\test\isolation\win32ver.rc
if exist src\test\regress\win32ver.rc del /q src\test\regress\win32ver.rc
if exist src\timezone\win32ver.rc del /q src\timezone\win32ver.rc

for /d %%f in (src\interfaces\ecpg\*) do if exist %%f\win32ver.rc del /q %%f\win32ver.rc
for /d %%f in (contrib\*) do if exist %%f\win32ver.rc del /q %%f\win32ver.rc
for /d %%f in (src\backend\utils\mb\conversion_procs\*) do if exist %%f\win32ver.rc del /q %%f\win32ver.rc

REM Delete files created with GenerateFiles() in Solution.pm
if exist src\include\pg_config.h del /q src\include\pg_config.h
if exist src\include\pg_config_ext.h del /q src\include\pg_config_ext.h
if exist src\include\pg_config_os.h del /q src\include\pg_config_os.h
if exist src\include\dynloader.h del /q src\include\dynloader.h
if %DIST%==1 if exist src\backend\parser\gram.h del /q src\backend\parser\gram.h
if exist src\include\utils\errcodes.h del /q src\include\utils\errcodes.h
if exist src\include\utils\fmgroids.h del /q src\include\utils\fmgroids.h
if exist src\include\utils\probes.h del /q src\include\utils\probes.h

if %DIST%==1 if exist src\backend\utils\fmgroids.h del /q src\backend\utils\fmgroids.h
if %DIST%==1 if exist src\backend\utils\fmgrtab.c del /q src\backend\utils\fmgrtab.c
if %DIST%==1 if exist src\backend\catalog\postgres.bki del /q src\backend\catalog\postgres.bki
if %DIST%==1 if exist src\backend\catalog\postgres.description del /q src\backend\catalog\postgres.description
if %DIST%==1 if exist src\backend\catalog\postgres.shdescription del /q src\backend\catalog\postgres.shdescription
if %DIST%==1 if exist src\backend\catalog\schemapg.h del /q src\backend\catalog\schemapg.h
if %DIST%==1 if exist src\backend\parser\scan.c del /q src\backend\parser\scan.c
if %DIST%==1 if exist src\backend\parser\gram.c del /q src\backend\parser\gram.c
if %DIST%==1 if exist src\backend\bootstrap\bootscanner.c del /q src\backend\bootstrap\bootscanner.c
if %DIST%==1 if exist src\backend\bootstrap\bootparse.c del /q src\backend\bootstrap\bootparse.c
if %DIST%==1 if exist src\backend\utils\misc\guc-file.c del /q src\backend\utils\misc\guc-file.c

if exist src\bin\psql\sql_help.h del /q src\bin\psql\sql_help.h

if exist src\interfaces\libpq\libpq.rc del /q src\interfaces\libpq\libpq.rc
if exist src\interfaces\libpq\libpqdll.def del /q src\interfaces\libpq\libpqdll.def
if exist src\interfaces\ecpg\compatlib\compatlib.def del /q src\interfaces\ecpg\compatlib\compatlib.def
if exist src\interfaces\ecpg\ecpglib\ecpglib.def del /q src\interfaces\ecpg\ecpglib\ecpglib.def
if exist src\interfaces\ecpg\include\ecpg_config.h del /q src\interfaces\ecpg\include\ecpg_config.h
if exist src\interfaces\ecpg\pgtypeslib\pgtypeslib.def del /q src\interfaces\ecpg\pgtypeslib\pgtypeslib.def
if %DIST%==1 if exist src\interfaces\ecpg\preproc\pgc.c del /q src\interfaces\ecpg\preproc\pgc.c
if %DIST%==1 if exist src\interfaces\ecpg\preproc\preproc.c del /q src\interfaces\ecpg\preproc\preproc.c
if %DIST%==1 if exist src\interfaces\ecpg\preproc\preproc.h del /q src\interfaces\ecpg\preproc\preproc.h

if exist src\port\pg_config_paths.h del /q src\port\pg_config_paths.h

if exist src\pl\plperl\spi.c del /q src\pl\plperl\spi.c
if %DIST%==1 if exist src\pl\plpgsql\src\pl_gram.c del /q src\pl\plpgsql\src\pl_gram.c
if %DIST%==1 if exist src\pl\plpgsql\src\pl_gram.h del /q src\pl\plpgsql\src\pl_gram.h

if %DIST%==1 if exist src\bin\psql\psqlscan.c del /q src\bin\psql\psqlscan.c

if %DIST%==1 if exist contrib\cube\cubescan.c del /q contrib\cube\cubescan.c
if %DIST%==1 if exist contrib\cube\cubeparse.c del /q contrib\cube\cubeparse.c
if %DIST%==1 if exist contrib\seg\segscan.c del /q contrib\seg\segscan.c
if %DIST%==1 if exist contrib\seg\segparse.c del /q contrib\seg\segparse.c

if exist src\test\regress\tmp_check rd /s /q src\test\regress\tmp_check
if exist contrib\spi\refint.dll del /q contrib\spi\refint.dll
if exist contrib\spi\autoinc.dll del /q contrib\spi\autoinc.dll
if exist src\test\regress\regress.dll del /q src\test\regress\regress.dll
if exist src\test\regress\refint.dll del /q src\test\regress\refint.dll
if exist src\test\regress\autoinc.dll del /q src\test\regress\autoinc.dll

if exist src\bin\initdb\tmp_check rd /s /q src\bin\initdb\tmp_check
if exist src\bin\pg_basebackup\tmp_check rd /s /q src\bin\pg_basebackup\tmp_check
if exist src\bin\pg_config\tmp_check rd /s /q src\bin\pg_config\tmp_check
if exist src\bin\pg_controldata\tmp_check rd /s /q src\bin\pg_controldata\tmp_check
if exist src\bin\pg_ctl\tmp_check rd /s /q src\bin\pg_ctl\tmp_check
if exist src\bin\pg_rewind\tmp_check rd /s /q src\bin\pg_rewind\tmp_check
if exist src\bin\pgbench\tmp_check rd /s /q src\bin\pgbench\tmp_check
if exist src\bin\scripts\tmp_check rd /s /q src\bin\scripts\tmp_check

REM Clean up datafiles built with contrib
REM cd contrib
REM for /r %%f in (*.sql) do if exist %%f.in del %%f

cd %D%

REM Clean up ecpg regression test files
msbuild /NoLogo ecpg_regression.proj /t:clean /v:q

goto :eof

MSVC: Clean tmp_check directory of pg_controldata test suite.

Back-patch to 9.4, where the suite was introduced.


@ECHO OFF

rem Change the current working directory to the location of this batch script.
pushd "%~dp0"
copy /Y mushclient_prefs.sqlite.sample mushclient_prefs.sqlite > nul
copy /Y MUSHclient.ini.sample MUSHclient.ini > nul
if not exist "worlds\mume\mume.mcl" copy /Y worlds\mume\mume.mcl.sample worlds\mume\mume.mcl > nul
if not exist "worlds\angband\angband.mcl" copy /Y worlds\angband\angband.mcl.sample worlds\angband\angband.mcl > nul
start MUSHclient.exe
cd mapperproxy
python -B startmapper.py
rem Reset the working directory to it's previous value, before this batch script was run.
popd

@ECHO OFF

rem Change the current working directory to the location of this batch script.
pushd "%~dp0"
copy /Y mushclient_prefs.sqlite.sample mushclient_prefs.sqlite > nul
copy /Y MUSHclient.ini.sample MUSHclient.ini > nul
if not exist "worlds\mume\mume.mcl" copy /Y worlds\mume\mume.mcl.sample worlds\mume\mume.mcl > nul
if not exist "worlds\angband\angband.mcl" copy /Y worlds\angband\angband.mcl.sample worlds\angband\angband.mcl > nul
start MUSHclient.exe
cd mapperproxy
python -B startmapper.py raw
rem Reset the working directory to it's previous value, before this batch script was run.
popd

Update mc.bat to start the mapper in raw mode.


@ECHO OFF
setlocal
SET ALLYPATH=..\
SET ALLYCOM=%ALLYPATH%components\
set PYTHONPATH=%ALLYCOM%ally-api
set PYTHONPATH=%PYTHONPATH%;%ALLYCOM%ally-authentication
set PYTHONPATH=%PYTHONPATH%;%ALLYCOM%ally-authentication-core
set PYTHONPATH=%PYTHONPATH%;%ALLYCOM%ally-authentication-http
set PYTHONPATH=%PYTHONPATH%;%ALLYCOM%ally-core
set PYTHONPATH=%PYTHONPATH%;%ALLYCOM%ally-core-http
set PYTHONPATH=%PYTHONPATH%;%ALLYCOM%ally-core-plugin
set PYTHONPATH=%PYTHONPATH%;%ALLYCOM%ally-core-sqlalchemy
set PYTHONPATH=%PYTHONPATH%;%ALLYCOM%ally-http-asyncore-server
set PYTHONPATH=%PYTHONPATH%;%ALLYCOM%ally-http-mongrel2-server
set PYTHONPATH=%PYTHONPATH%;%ALLYCOM%ally-utilities
set PYTHONPATH=%PYTHONPATH%;%ALLYCOM%support-administration
set PYTHONPATH=%PYTHONPATH%;%ALLYCOM%support-cdm
set PYTHONPATH=%PYTHONPATH%;%ALLYCOM%support-development

SET ALLYPLUG=%ALLYPATH%plugins\
set PYTHONPATH=%PYTHONPATH%;%ALLYPLUG%gui-action
set PYTHONPATH=%PYTHONPATH%;%ALLYPLUG%gui-core
set PYTHONPATH=%PYTHONPATH%;%ALLYPLUG%internationalization
set PYTHONPATH=%PYTHONPATH%;%ALLYPLUG%introspection-request
set PYTHONPATH=%PYTHONPATH%;%ALLYPLUG%support-sqlalchemy

SET FULLPATH=
SET SUPERPLUG=%FULLPATH%plugins\
REM set PYTHONPATH=%PYTHONPATH%;%SUPERPLUG%ffmpeg-binary
set PYTHONPATH=%PYTHONPATH%;%SUPERPLUG%livedesk
set PYTHONPATH=%PYTHONPATH%;%SUPERPLUG%livedesk-embed
set PYTHONPATH=%PYTHONPATH%;%SUPERPLUG%media-archive
set PYTHONPATH=%PYTHONPATH%;%SUPERPLUG%media-archive-audio
set PYTHONPATH=%PYTHONPATH%;%SUPERPLUG%media-archive-image
set PYTHONPATH=%PYTHONPATH%;%SUPERPLUG%media-archive-video
set PYTHONPATH=%PYTHONPATH%;%SUPERPLUG%superdesk
set PYTHONPATH=%PYTHONPATH%;%SUPERPLUG%superdesk-address
set PYTHONPATH=%PYTHONPATH%;%SUPERPLUG%superdesk-article
set PYTHONPATH=%PYTHONPATH%;%SUPERPLUG%superdesk-authentication
set PYTHONPATH=%PYTHONPATH%;%SUPERPLUG%superdesk-collaborator
set PYTHONPATH=%PYTHONPATH%;%SUPERPLUG%superdesk-country
set PYTHONPATH=%PYTHONPATH%;%SUPERPLUG%superdesk-language
set PYTHONPATH=%PYTHONPATH%;%SUPERPLUG%superdesk-person
set PYTHONPATH=%PYTHONPATH%;%SUPERPLUG%superdesk-post
set PYTHONPATH=%PYTHONPATH%;%SUPERPLUG%superdesk-source
set PYTHONPATH=%PYTHONPATH%;%SUPERPLUG%superdesk-user

del distribution\workspace\superdesk.db
python distribution\application.py

@ECHO OFF
setlocal
SET ALLYPATH=..\
SET ALLYCOM=%ALLYPATH%components\
set PYTHONPATH=%ALLYCOM%ally-api
set PYTHONPATH=%PYTHONPATH%;%ALLYCOM%ally-authentication
set PYTHONPATH=%PYTHONPATH%;%ALLYCOM%ally-authentication-core
set PYTHONPATH=%PYTHONPATH%;%ALLYCOM%ally-authentication-http
set PYTHONPATH=%PYTHONPATH%;%ALLYCOM%ally-core
set PYTHONPATH=%PYTHONPATH%;%ALLYCOM%ally-core-http
set PYTHONPATH=%PYTHONPATH%;%ALLYCOM%ally-core-plugin
set PYTHONPATH=%PYTHONPATH%;%ALLYCOM%ally-core-sqlalchemy
set PYTHONPATH=%PYTHONPATH%;%ALLYCOM%ally-http-asyncore-server
set PYTHONPATH=%PYTHONPATH%;%ALLYCOM%ally-http-mongrel2-server
set PYTHONPATH=%PYTHONPATH%;%ALLYCOM%ally-utilities
set PYTHONPATH=%PYTHONPATH%;%ALLYCOM%support-administration
set PYTHONPATH=%PYTHONPATH%;%ALLYCOM%support-cdm
set PYTHONPATH=%PYTHONPATH%;%ALLYCOM%support-development

SET ALLYPLUG=%ALLYPATH%plugins\
set PYTHONPATH=%PYTHONPATH%;%ALLYPLUG%gui-action
set PYTHONPATH=%PYTHONPATH%;%ALLYPLUG%gui-core
set PYTHONPATH=%PYTHONPATH%;%ALLYPLUG%internationalization
set PYTHONPATH=%PYTHONPATH%;%ALLYPLUG%introspection-request
set PYTHONPATH=%PYTHONPATH%;%ALLYPLUG%support-sqlalchemy

SET FULLPATH=
SET SUPERPLUG=%FULLPATH%plugins\
REM set PYTHONPATH=%PYTHONPATH%;%SUPERPLUG%ffmpeg-binary
set PYTHONPATH=%PYTHONPATH%;%SUPERPLUG%livedesk
set PYTHONPATH=%PYTHONPATH%;%SUPERPLUG%livedesk-embed
set PYTHONPATH=%PYTHONPATH%;%SUPERPLUG%media-archive
set PYTHONPATH=%PYTHONPATH%;%SUPERPLUG%media-archive-audio
set PYTHONPATH=%PYTHONPATH%;%SUPERPLUG%media-archive-image
set PYTHONPATH=%PYTHONPATH%;%SUPERPLUG%media-archive-video
set PYTHONPATH=%PYTHONPATH%;%SUPERPLUG%superdesk
set PYTHONPATH=%PYTHONPATH%;%SUPERPLUG%superdesk-address
set PYTHONPATH=%PYTHONPATH%;%SUPERPLUG%superdesk-article
set PYTHONPATH=%PYTHONPATH%;%SUPERPLUG%superdesk-authentication
set PYTHONPATH=%PYTHONPATH%;%SUPERPLUG%superdesk-collaborator
set PYTHONPATH=%PYTHONPATH%;%SUPERPLUG%superdesk-country
set PYTHONPATH=%PYTHONPATH%;%SUPERPLUG%superdesk-language
set PYTHONPATH=%PYTHONPATH%;%SUPERPLUG%superdesk-person
set PYTHONPATH=%PYTHONPATH%;%SUPERPLUG%superdesk-post
set PYTHONPATH=%PYTHONPATH%;%SUPERPLUG%superdesk-source
set PYTHONPATH=%PYTHONPATH%;%SUPERPLUG%superdesk-user

if exist {distribution\workspace\shared\superdesk.db} (
	del distribution\workspace\shared\superdesk.db
)
if exist {distribution\application.properties} (
	python distribution\application.py
) else (
	python distribution\application.py -dump
	python distribution\application.py
)

NR-474: Refactor the collaborators setup in the blog configuration screen

Inteligent start-source.bat
runs with -dump if no application.properties was found and then runs the
application normal


### application.bat - 2015 - Nouailletas ###
"Copyright company - 2015"
echo "Build : 10:00"
echo "version 1.2.1"

Correct conflict

Correct conflict


@echo off

rem #
rem #  time2backup install script for Windows
rem #
rem #  Website: https://time2backup.org
rem #  MIT License
rem #  Copyright (c) 2017-2020 Jean Prunneaux
rem #

rem #
rem #  Init
rem #

rem clear screen
cls

rem set variables
set version=
set current_path=%~dp0
set libbash_gui=%current_path%\files\time2backup\libbash\inc\libbash_gui.vbs
set install_path=%SystemDrive%\time2backup
set shortcuts=false
set exitcode=0

rem #
rem #  Main program
rem #

rem if path specified,
if not "%1"=="" (set install_path=%1)

echo time2backup %version% installer
echo.

echo Waiting for confirmation dialog...
cscript /NoLogo "%libbash_gui%" lbg_yesno "Install time2backup in %install_path% ? To change path, run install.bat with custom path." "time2backup installer"
if %errorlevel% neq 0 goto endCancel

echo.
cscript /NoLogo "%libbash_gui%" lbg_yesno "Do you want to create menu shortcut and desktop icon?" "time2backup installer" true
if %errorlevel%==0 set shortcuts=true

:install
echo Install into %install_path%...

echo Running cygwin installer...
"%current_path%\files\setup-x86_64.exe" --quiet-mode --wait -s http://mirrors.kernel.org/sourceware/cygwin --root "%install_path%\cygwin" -P rsync -P nano --upgrade-also --no-startmenu --no-desktop
if %errorlevel% NEQ 0 goto endError

rem copy files

echo.
echo Copy time2backup files...
xcopy /e /i /y /q "%current_path%\files\time2backup" "%install_path%\cygwin\usr\src\time2backup"
if %errorlevel% NEQ 0 goto endError

echo.
echo Copy windows files...
xcopy /s /y /q "%current_path%\files\bin" "%install_path%"
if %errorlevel% NEQ 0 goto endError

rem create shortcut

echo.
echo Create time2backup links...

rem create temporary VBScript
(echo Dim shell, link
echo Set shell = CreateObject^("WScript.shell"^)
echo Set link = shell.CreateShortcut^("%install_path%\time2backup.lnk"^)
echo link.Description = "Backup and restore your files"
echo link.TargetPath = "%install_path%\time2backup.bat"
echo link.IconLocation = "%install_path%\icon.ico"
echo link.WorkingDirectory = "%install_path%"
echo link.Save
)> "%current_path%\files\create_link.vbs"
cscript /NoLogo "%current_path%\files\create_link.vbs"
if %errorlevel% NEQ 0 goto endError

rem create start menu shortcut
if %shortcuts%==false goto endOK

echo.
echo Create start menu shortcut...

rem Delete old menu entries
del /f "%AllUsersProfile%\Microsoft\Windows\Start Menu\Programs\Accessories\time2backup.lnk"
del /f "%AppData%\Microsoft\Windows\Start Menu\Programs\Accessories\time2backup.lnk"

rem try to install for all users
xcopy /y "%install_path%\time2backup.lnk" "%AllUsersProfile%\Microsoft\Windows\Start Menu\Programs\"
if %errorlevel%==0 goto desktopIcon

rem if not administrator
echo Failed. Creating shortcut only for current user.

xcopy /y "%install_path%\time2backup.lnk" "%AppData%\Microsoft\Windows\Start Menu\Programs\"
if %errorlevel% NEQ 0 echo Failed. Please create shortcut manually.

:desktopIcon
echo.
echo Create desktop icon...

rem try to install for all users
xcopy /y "%install_path%\time2backup.lnk" "%SystemDrive%\Users\Public\Desktop\"
if %errorlevel%==0 goto endOK

rem if not administrator
echo Failed. Creating icon only for current user.

xcopy /y "%install_path%\time2backup.lnk" "%UserProfile%\Desktop\"
if %errorlevel% NEQ 0 echo Failed. Please create icon manually.

goto endOK

rem #
rem #  End of script
rem #

:endCancel
echo Installation cancelled
goto endScript

:endOK
echo.
cscript /NoLogo "%libbash_gui%" lbg_display_info "Install finished" "time2backup installer"
goto endScript

:endError
echo.
cscript /NoLogo "%libbash_gui%" lbg_display_error "Install failed!" "time2backup installer"
set exitcode=1

:endScript
exit /b %exitcode%

@echo off

rem #
rem #  time2backup install script for Windows
rem #
rem #  Website: https://time2backup.org
rem #  MIT License
rem #  Copyright (c) 2017-2021 Jean Prunneaux
rem #

rem #
rem #  Init
rem #

rem clear screen
cls

rem set variables
set version=
set current_path=%~dp0
set libbash_gui=%current_path%\files\time2backup\libbash\inc\libbash_gui.vbs
set install_path=%SystemDrive%\time2backup
set shortcuts=false
set exitcode=0

rem #
rem #  Main program
rem #

rem if path specified,
if not "%1"=="" (set install_path=%1)

echo time2backup %version% installer
echo.

echo Waiting for confirmation dialog...
cscript /NoLogo "%libbash_gui%" lbg_yesno "Install time2backup in %install_path% ? To change path, run install.bat with custom path." "time2backup installer"
if %errorlevel% neq 0 goto endCancel

:install
echo Install into %install_path%...

echo Running cygwin installer...
"%current_path%\files\setup-x86_64.exe" --quiet-mode --wait -s http://mirrors.kernel.org/sourceware/cygwin --root "%install_path%\cygwin" -P rsync -P nano --upgrade-also --no-startmenu --no-desktop
if %errorlevel% NEQ 0 goto endError

rem copy files

echo.
echo Copy time2backup files...
xcopy /e /i /y /q "%current_path%\files\time2backup" "%install_path%\cygwin\usr\src\time2backup"
if %errorlevel% NEQ 0 goto endError

echo.
echo Copy windows files...
xcopy /s /y /q "%current_path%\files\bin" "%install_path%"
if %errorlevel% NEQ 0 goto endError

rem create shortcut

echo.
echo Create time2backup link...

rem create temporary VBScript
(echo Dim shell, link
echo Set shell = CreateObject^("WScript.shell"^)
echo Set link = shell.CreateShortcut^("%install_path%\time2backup.lnk"^)
echo link.Description = "Backup and restore your files"
echo link.TargetPath = "%install_path%\time2backup.bat"
echo link.IconLocation = "%install_path%\icon_dark.ico"
echo link.WorkingDirectory = "%install_path%"
echo link.Save
)> "%current_path%\files\create_link.vbs"
cscript /NoLogo "%current_path%\files\create_link.vbs"
if %errorlevel% NEQ 0 goto endError

echo.
echo Create start menu shortcut...

rem Delete old menu entries
del /f "%AllUsersProfile%\Microsoft\Windows\Start Menu\Programs\Accessories\time2backup.lnk"
del /f "%AppData%\Microsoft\Windows\Start Menu\Programs\Accessories\time2backup.lnk"

rem try to install for all users
xcopy /y "%install_path%\time2backup.lnk" "%AllUsersProfile%\Microsoft\Windows\Start Menu\Programs\"
if %errorlevel%==0 goto endOK

rem if not administrator
echo Failed. Creating shortcut only for current user...
xcopy /y "%install_path%\time2backup.lnk" "%AppData%\Microsoft\Windows\Start Menu\Programs\"
if %errorlevel% NEQ 0 echo Failed. Please create shortcut manually.

goto endOK

rem #
rem #  End of script
rem #

:endCancel
echo Installation cancelled
goto endScript

:endOK
echo.
cscript /NoLogo "%libbash_gui%" lbg_display_info "Install finished" "time2backup installer"
goto endScript

:endError
echo.
cscript /NoLogo "%libbash_gui%" lbg_display_error "Install failed!" "time2backup installer"
set exitcode=1

:endScript
exit /b %exitcode%

Remove desktop icon

Remove desktop icon


if exist "C:\Program Files\R\R-3.0.0\bin\i386\Rscript.exe" set R_HOME="C:\Program Files\R\R-3.0.0\bin\i386\Rscript.exe"
if exist "C:\Program Files\R\R-3.0.1\bin\i386\Rscript.exe" set R_HOME="C:\Program Files\R\R-3.0.1\bin\i386\Rscript.exe"
if exist "C:\Program Files\R\R-3.0.2\bin\i386\Rscript.exe" set R_HOME="C:\Program Files\R\R-3.0.2\bin\i386\Rscript.exe"
if exist "C:\Program Files\R\R-3.0.3\bin\i386\Rscript.exe" set R_HOME="C:\Program Files\R\R-3.0.3\bin\i386\Rscript.exe"
if exist "C:\Program Files\R\R-3.1.0\bin\i386\Rscript.exe" set R_HOME="C:\Program Files\R\R-3.1.0\bin\i386\Rscript.exe"
if exist "C:\Program Files\R\R-3.1.1\bin\i386\Rscript.exe" set R_HOME="C:\Program Files\R\R-3.1.1\bin\i386\Rscript.exe"
if exist "C:\Program Files\R\R-3.1.2\bin\i386\Rscript.exe" set R_HOME="C:\Program Files\R\R-3.1.2\bin\i386\Rscript.exe"
if exist "C:\Program Files\R\R-3.2.0\bin\i386\Rscript.exe" set R_HOME="C:\Program Files\R\R-3.2.0\bin\i386\Rscript.exe"
if exist "C:\Program Files\R\R-3.2.1\bin\i386\Rscript.exe" set R_HOME="C:\Program Files\R\R-3.2.1\bin\i386\Rscript.exe"
if exist "C:\Program Files\R\R-3.2.2\bin\i386\Rscript.exe" set R_HOME="C:\Program Files\R\R-3.2.2\bin\i386\Rscript.exe"
if exist "C:\Program Files\R\R-3.2.3\bin\i386\Rscript.exe" set R_HOME="C:\Program Files\R\R-3.2.3\bin\i386\Rscript.exe"
if exist "C:\Program Files\R\R-3.2.4\bin\i386\Rscript.exe" set R_HOME="C:\Program Files\R\R-3.2.4\bin\i386\Rscript.exe"
if exist "C:\Program Files\R\R-3.2.5\bin\i386\Rscript.exe" set R_HOME="C:\Program Files\R\R-3.2.5\bin\i386\Rscript.exe"
if exist "C:\Program Files\R\R-3.3.3\bin\i386\Rscript.exe" set R_HOME="C:\Program Files\R\R-3.3.3\bin\i386\Rscript.exe"

Update setup.bat

Update setup.bat

Added version 3.3.3


MKDIR build\windows
CD build\windows

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

cmake --build . --config Release --target ALL_BUILD
cmake --build . --config Release --target ZERO_CHECK

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

MKDIR build\windows
CD build\windows

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

cmake --build . --config Release --target ALL_BUILD
cmake --build . --config Release --target ZERO_CHECK

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

change to VS10

change to VS10


@echo off

SET R="../bin/R#.exe"

SET CAL="D:\20191230_WYL_MRM\XBL\raw\20191218cal"
SET data="D:\20191230_WYL_MRM\XBL\raw\20191218sample(UA+NOCA)"
SET MRM="D:\biodeep\biodeepDB\smartnucl_integrative\mzML\MetaCardio_STD_v5-test.xlsx"
SET output="D:\web\test"

%R% ./mrm_quantify.R --Cal %CAL% --data %data% --MRM %MRM% --export %output% #--debug

pause

@echo off

SET R="../bin/R#.exe"

SET CAL="S:\2018\WYL\20191230_WYL_MRM\XBL\raw\20191218cal"
SET data="S:\2018\WYL\20191230_WYL_MRM\XBL\raw\20191218sample(UA+NOCA)"
SET MRM="D:\biodeep\biodeepDB\smartnucl_integrative\mzML\MetaCardio_STD_v5-test.xlsx"
SET output="S:\2018\WYL\20191230_WYL_MRM\XBL\result\20191218sample(UA+NOCA)"

%R% ./mrm_quantify.R --Cal %CAL% --data %data% --MRM %MRM% --export %output% #--debug

REM pause

Update MRM-quantify.cmd

Update MRM-quantify.cmd


start /MIN cmd /K "cd obj\i386\dbg && Title NetIDMgr OBJ"
start /MIN cmd /K "cd ..\..\..\..\krb5-svn\krb5-trunk\src\windows\identity && Title NetIDMgr SVN"
call setupbuild.cmd
set PATH=%PATH%;c:\work\global\bin
runemacs

start /MIN cmd /K "cd obj\i386\dbg && Title NetIDMgr OBJ"
set PATH=%PATH%;c:\work\svn\bin
start /MIN cmd /K "cd ..\..\..\..\krb5-svn\krb5-trunk\src\windows\identity && Title NetIDMgr SVN"
call setupbuild.cmd
set PATH=%PATH%;c:\work\global\bin
runemacs

fix path

fix path


npm install -g grunt-cli & npm update -g grunt-cli & npm install & npm update & install

Fix infinite installation loop

Fix infinite installation loop


@echo off

:: To run tests outside of MSBuild.exe
:: %1 is the path to the tests\<OSConfig> folder

pushd %1

FOR /D %%F IN (*.Tests) DO (
pushd %%F\dnxcore50
@echo "corerun.exe xunit.console.netcore.exe %%F.dll -xml testResults.xml -notrait category=failing -notrait category=nonwindowstests"
corerun.exe xunit.console.netcore.exe %%F.dll -notrait category=failing -notrait category=nonwindowstests
popd )

popd

@echo off

:: To run tests outside of MSBuild.exe
:: %1 is the path to the tests\<OSConfig> folder

pushd %1

FOR /D %%F IN (*.Tests) DO (
pushd %%F\dnxcore50
@echo "corerun.exe xunit.console.netcore.exe %%F.dll -xml testResults.xml -notrait category=failing -notrait category=nonwindowstests -notrait Benchmark=true"
corerun.exe xunit.console.netcore.exe %%F.dll -notrait category=failing -notrait category=nonwindowstests -notrait Benchmark=true
popd )

popd

Exclude perf tests from nano runs.

Exclude perf tests from nano runs.


@if not defined _echo @echo off
setlocal

if not defined BuildConfiguration SET BuildConfiguration=Debug

SET CMDHOME=%~dp0
@REM Remove trailing backslash \
set CMDHOME=%CMDHOME:~0,-1%

pushd "%CMDHOME%"
@cd

SET TestResultDir=%CMDHOME%\Binaries\%BuildConfiguration%\TestResults

if not exist %TestResultDir% md %TestResultDir%

SET _Directory=bin\%BuildConfiguration%\net461\win10-x64
SET _CoreDirectory=bin\%BuildConfiguration%\netcoreapp2.0\win10-x64

rem copy Versioning dlls to the appropriate place to make Versioning tests pass.
if not exist %CMDHOME%\test\Tester\%_Directory%\TestVersionGrainsV1\ mkdir %CMDHOME%\test\Tester\%_Directory%\TestVersionGrainsV1
if not exist %CMDHOME%\test\Tester\%_Directory%\TestVersionGrainsV2\ mkdir %CMDHOME%\test\Tester\%_Directory%\TestVersionGrainsV2

copy %CMDHOME%\test\Versions\TestVersionGrains\%_Directory%\* %CMDHOME%\test\Tester\%_Directory%\TestVersionGrainsV1\
copy %CMDHOME%\test\Versions\TestVersionGrains2\%_Directory%\* %CMDHOME%\test\Tester\%_Directory%\TestVersionGrainsV2\

set TESTS=%CMDHOME%\test\TesterAzureUtils\%_Directory%\Tester.AzureUtils.dll,%CMDHOME%\test\TesterInternal\%_Directory%\TesterInternal.dll,%CMDHOME%\test\Tester\%_Directory%\Tester.dll,%CMDHOME%\test\DefaultCluster.Tests\%_Directory%\DefaultCluster.Tests.dll,%CMDHOME%\test\NonSilo.Tests\%_Directory%\NonSilo.Tests.dll,%CMDHOME%\test\AWSUtils.Tests\%_Directory%\AWSUtils.Tests.dll,%CMDHOME%\test\BondUtils.Tests\%_Directory%\BondUtils.Tests.dll,%CMDHOME%\test\Consul.Tests\%_Directory%\Consul.Tests.dll,%CMDHOME%\test\GoogleUtils.Tests\%_Directory%\GoogleUtils.Tests.dll,%CMDHOME%\test\ServiceBus.Tests\%_Directory%\ServiceBus.Tests.dll,%CMDHOME%\test\TestServiceFabric\%_Directory%\TestServiceFabric.dll,%CMDHOME%\test\TesterSQLUtils\%_Directory%\Tester.SQLUtils.dll,%CMDHOME%\test\TesterZooKeeperUtils\%_Directory%\Tester.ZooKeeperUtils.dll,%CMDHOME%\test\RuntimeCodeGen.Tests\%_Directory%\RuntimeCodeGen.Tests.dll

if []==[%TEST_FILTERS%] set TEST_FILTERS=-trait 'Category=BVT' -trait 'Category=SlowBVT'

@Echo Test assemblies = %TESTS%
@Echo Test filters = %TEST_FILTERS%

PowerShell -NoProfile -ExecutionPolicy Bypass -Command "& ./Parallel-Tests.ps1 -assemblies %TESTS% -testFilter \"%TEST_FILTERS%\" -outDir '%TestResultDir%'"
set testresult=%errorlevel%
popd
endlocal&set testresult=%testresult%
exit /B %testresult%

@if not defined _echo @echo off
setlocal

if not defined BuildConfiguration SET BuildConfiguration=Debug

SET CMDHOME=%~dp0
@REM Remove trailing backslash \
set CMDHOME=%CMDHOME:~0,-1%

pushd "%CMDHOME%"
@cd

SET TestResultDir=%CMDHOME%\Binaries\%BuildConfiguration%\TestResults

if not exist %TestResultDir% md %TestResultDir%

SET _Directory=bin\%BuildConfiguration%\net461\win10-x64
SET _CoreDirectory=bin\%BuildConfiguration%\netcoreapp2.0\win10-x64

rem copy Versioning dlls to the appropriate place to make Versioning tests pass.
if not exist %CMDHOME%\test\Tester\%_Directory%\TestVersionGrainsV1\ mkdir %CMDHOME%\test\Tester\%_Directory%\TestVersionGrainsV1
if not exist %CMDHOME%\test\Tester\%_Directory%\TestVersionGrainsV2\ mkdir %CMDHOME%\test\Tester\%_Directory%\TestVersionGrainsV2

copy %CMDHOME%\test\Versions\TestVersionGrains\%_Directory%\* %CMDHOME%\test\Tester\%_Directory%\TestVersionGrainsV1\
copy %CMDHOME%\test\Versions\TestVersionGrains2\%_Directory%\* %CMDHOME%\test\Tester\%_Directory%\TestVersionGrainsV2\

set TESTS=%CMDHOME%\test\TesterAzureUtils\%_Directory%\Tester.AzureUtils.dll,%CMDHOME%\test\TesterInternal\%_Directory%\TesterInternal.dll,%CMDHOME%\test\Tester\%_Directory%\Tester.dll,%CMDHOME%\test\DefaultCluster.Tests\%_Directory%\DefaultCluster.Tests.dll,%CMDHOME%\test\NonSilo.Tests\%_Directory%\NonSilo.Tests.dll,%CMDHOME%\test\AWSUtils.Tests\%_Directory%\AWSUtils.Tests.dll,%CMDHOME%\test\BondUtils.Tests\%_Directory%\BondUtils.Tests.dll,%CMDHOME%\test\Consul.Tests\%_Directory%\Consul.Tests.dll,%CMDHOME%\test\GoogleUtils.Tests\%_Directory%\GoogleUtils.Tests.dll,%CMDHOME%\test\ServiceBus.Tests\%_Directory%\ServiceBus.Tests.dll,%CMDHOME%\test\TestServiceFabric\%_Directory%\TestServiceFabric.dll,%CMDHOME%\test\TesterSQLUtils\%_Directory%\Tester.SQLUtils.dll,%CMDHOME%\test\TesterZooKeeperUtils\%_Directory%\Tester.ZooKeeperUtils.dll,%CMDHOME%\test\RuntimeCodeGen.Tests\%_Directory%\RuntimeCodeGen.Tests.dll,%CMDHOME%\test\Orleans.Transactions.Tests\%_Directory%\Orleans.Transactions.Tests.dll,%CMDHOME%\test\Orleans.Transactions.Azure.Test\%_Directory%\Orleans.Transactions.Azure.Tests.dll

if []==[%TEST_FILTERS%] set TEST_FILTERS=-trait 'Category=BVT' -trait 'Category=SlowBVT'

@Echo Test assemblies = %TESTS%
@Echo Test filters = %TEST_FILTERS%

PowerShell -NoProfile -ExecutionPolicy Bypass -Command "& ./Parallel-Tests.ps1 -assemblies %TESTS% -testFilter \"%TEST_FILTERS%\" -outDir '%TestResultDir%'"
set testresult=%errorlevel%
popd
endlocal&set testresult=%testresult%
exit /B %testresult%

Include transactions tests in CI (#3495)