@echo off
rem This will download the Kolibri windows installer artifact at the windows-2016 buildkite agent.
rem After the installer successfully sign it will upload the signed installer at the Sign Windows installer pipeline artifact.
rem To sign the Windows installer set the `SIGN_WINDOWS_INSTALLER=true` environment variable.

IF NOT "%SIGN_WINDOWS_INSTALLER%" == "true" (GOTO DONT_SIGN)

set current_path=%cd%
buildkite-agent.exe artifact download "dist/*.exe" . --step "Build kolibri windows installer" --build %BUILDKITE_BUILD_ID% --agent-access-token %BUILDKITE_AGENT_ACCESS_TOKEN%
%WINDOWS_SIGN_SCRIPT_PATH% "%current_path%\dist" && cd "%current_path%\installer\" && buildkite-agent.exe artifact upload "*.exe"
GOTO END

:DONT_SIGN
echo Set the SIGN_WINDOWS_INSTALLER=true environment variable to sign the Windows installer.

:END

@echo off
rem This will download the Kolibri windows installer artifact at the windows-2016 buildkite agent.
rem After the installer successfully sign it will upload the signed installer at the Sign Windows installer pipeline artifact.
rem To sign the Windows installer set the `SIGN_WINDOWS_INSTALLER=true` environment variable.

IF NOT "%SIGN_WINDOWS_INSTALLER%" == "true" (GOTO DONT_SIGN)

set current_path=%cd%
buildkite-agent.exe artifact download "dist/*.exe" . --step "Build Windows installer" --build %BUILDKITE_BUILD_ID% --agent-access-token %BUILDKITE_AGENT_ACCESS_TOKEN%
%WINDOWS_SIGN_SCRIPT_PATH% "%current_path%\dist" && cd "%current_path%\installer\" && buildkite-agent.exe artifact upload "*.exe"
GOTO END

:DONT_SIGN
echo Set the SIGN_WINDOWS_INSTALLER=true environment variable to sign the Windows installer.

:END

Change windows installer signing script based on the current step name


mkdir c:\projects\plib-build

if "%APPVEYOR_REPO_BRANCH%"=="appveyor_test" (
        set "BOOST_ARGS=-DPLIB_TESTS_STATIC=ON -DBOOST_ROOT=C:\Libraries\boost_1_59_0"
)

if "%USE_MINGW%"=="1" (
        cd c:\projects\plib-build
        set "PATH=C:\MinGW\bin;C:\Program Files (x86)\CMake\bin"
        set BUILD_TYPE=-DCMAKE_BUILD_TYPE=%configuration%

        cmake %BUILD_TYPE% -G"%CMAKE_GENERATOR%" %BOOST_ARGS% c:\projects\plib
        mingw32-make
        ctest
) else (
        if "%USE_MSYS%"=="1" (
                set "PATH=C:\msys64\usr\bin"
                bash c:\projects\plib\contrib\appveyor\build_msys.sh
        ) else (
                if "%USE_CYGWIN%"=="1" (
                        set "PATH=C:\cygwin\bin"
                        bash c:\projects\plib\contrib\appveyor\build_msys.sh
                )
        )
)

mkdir c:\projects\plib-build

if "%APPVEYOR_REPO_BRANCH%"=="appveyor_test" (
        set "BOOST_ARGS=-DPLIB_TESTS_STATIC=ON -DBOOST_ROOT=C:\Libraries\boost_1_59_0"
)

if "%USE_MINGW%"=="1" (
        cd c:\projects\plib-build
        set "PATH=C:\MinGW\bin;C:\Program Files (x86)\CMake\bin"
        set BUILD_TYPE=-DCMAKE_BUILD_TYPE=%configuration%

        cmake %BUILD_TYPE% -G"%CMAKE_GENERATOR%" %BOOST_ARGS% c:\projects\plib
        mingw32-make
        ctest
) else (
        if "%USE_MSYS%"=="1" (
                set "PATH=C:\msys64\usr\bin"
                bash c:\projects\plib\contrib\appveyor\build_msys.sh
        ) else (
                if "%USE_CYGWIN%"=="1" (
                        set "PATH=C:\cygwin\bin"
                        bash c:\projects\plib\contrib\appveyor\build_cygwin.sh
                )
        )
)

Fix path to Cygwin build script

appveyor: Fix path to Cygwin build script


@echo off
rem /*##############################################################################
rem
rem     Copyright (C) 2011 HPCC Systems.
rem
rem     All rights reserved. This program is free software: you can redistribute it and/or modify
rem     it under the terms of the GNU Affero General Public License as
rem     published by the Free Software Foundation, either version 3 of the
rem     License, or (at your option) any later version.
rem
rem     This program is distributed in the hope that it will be useful,
rem     but WITHOUT ANY WARRANTY; without even the implied warranty of
rem     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
rem     GNU Affero General Public License for more details.
rem
rem     You should have received a copy of the GNU Affero General Public License
rem     along with this program.  If not, see <http://www.gnu.org/licenses/>.
rem ############################################################################## */

setlocal enableextensions
md %regresstgt% 2>nul
call %~dp0\regress1 -m %*
if EXIST %~dp0\rcompare.bat. call %~dp0\rcompare %~n1

@echo off
rem /*##############################################################################
rem
rem     Copyright (C) 2011 HPCC Systems.
rem
rem     All rights reserved. This program is free software: you can redistribute it and/or modify
rem     it under the terms of the GNU Affero General Public License as
rem     published by the Free Software Foundation, either version 3 of the
rem     License, or (at your option) any later version.
rem
rem     This program is distributed in the hope that it will be useful,
rem     but WITHOUT ANY WARRANTY; without even the implied warranty of
rem     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
rem     GNU Affero General Public License for more details.
rem
rem     You should have received a copy of the GNU Affero General Public License
rem     along with this program.  If not, see <http://www.gnu.org/licenses/>.
rem ############################################################################## */

setlocal enableextensions
md %regresstgt% 2>nul
set start=%time%
call %~dp0\regress1 -m %*
echo Time: %start%  %time%
if EXIST %~dp0\rcompare.bat. call %~dp0\rcompare %~n1

Add time information when running a single test

Signed-off-by: Gavin Halliday <2edfa8aca9fb78974188e5b35be8b52d4e4967ae@lexisnexis.com>


@ECHO OFF
SET SUFFIX=%1
IF '%SUFFIX%' == '' GOTO NOSUFFIX
for /f %%a in ('findstr /sm packOptions project.json %~dp0..\src') do dotnet pack %%a --no-build -c Release -o "%~dp0..\nugets" --version-suffix %SUFFIX%
GOTO END

:NOSUFFIX
for /f %%a in ('findstr /sm packOptions project.json %~dp0..\src') do dotnet pack %%a --no-build -c Release -o "%~dp0..\nugets"
GOTO END

:END

@ECHO OFF
pushd "%~dp0.."
SET parentDir=%cd%
popd

SET SUFFIX=%1
IF '%SUFFIX%' == '' GOTO NOSUFFIX
for /f %%a in ('findstr /sm packOptions %parentDir%\src\project.json') do dotnet pack %%a --no-build -c Release -o "%parentDir%\nugets" --version-suffix %SUFFIX%
GOTO END

:NOSUFFIX
for /f %%a in ('findstr /sm packOptions %parentDir%\src\project.json') do dotnet pack %%a --no-build -c Release -o "%parentDir%\nugets"
GOTO END

:END

Update findstr search pattern for creating nupkgs

The old format won't work when current folder is sibling or is deeper than
the src folder.


@echo off
"%~dp0\..\Prerequisites\Pandoc\pandoc.exe" --from markdown --to html5 --toc -N --standalone --self-contained -c "%~dp0\etc\css\github-pandoc.css" --output "%~dp0\README.html" "%~dp0\README.md"
pause

@echo off

if not exist "%JAVA_HOME%\bin\java.exe" (
	echo Java could not be found, please make sure JAVA_HOME is set correctly!
	pause && goto:eof
)

"%~dp0\..\Prerequisites\Pandoc\pandoc.exe" --from markdown --to html5 --toc -N --standalone --self-contained -c "%~dp0\etc\css\github-pandoc.css" --output "%~dp0\README.html" "%~dp0\README.md"

"%JAVA_HOME%\bin\java.exe" -jar "%~dp0\..\Prerequisites\HTMLCompressor\bin\htmlcompressor-1.5.3.jar" --compress-css -o "%~dp0\README.min.html" "%~dp0\README.html"
move /Y "%~dp0\README.min.html" "%~dp0\README.html"

pause

Update make script for documentation.

Update make script for documentation.


inject.exe --run "C:\Users\Joshua\AppData\Local\MyComGames\MyComGames.exe" --inject --export Load --add-path --path-resolution --module cerberus.dll

inject.exe --run "C:\Users\Admin\AppData\Local\MyComGames\MyComGames.exe" --inject --export Load --add-path --path-resolution --module cerberus.dll

Adjust path (I reinstalled Windows).

[Scripts] Adjust path (I reinstalled Windows).


REM Install Internet Information Server (IIS).
c:\Windows\Sysnative\WindowsPowerShell\v1.0\powershell.exe -Command Import-Module -Name ServerManager
c:\Windows\Sysnative\WindowsPowerShell\v1.0\powershell.exe -Command Install-WindowsFeature Web-Server
c:\Windows\Sysnative\WindowsPowerShell\v1.0\powershell.exe -Command Start-Sleep -s 2000

REM Install Internet Information Server (IIS).
c:\Windows\Sysnative\WindowsPowerShell\v1.0\powershell.exe -Command Start-Sleep -s 20

Remove commands from before install script


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

@echo "Starting Windows build"

powershell -c "& { iwr https://raw.githubusercontent.com/grumpycoders/nvm-ps/master/nvm.ps1 | iex }"

SET PATH=%APPDATA%\nvm-ps;%APPDATA%\nvm-ps\nodejs;%PATH%
call nvm install 10
call nvm use 10

call npm install -g npm
@rem https://github.com/mapbox/node-pre-gyp/issues/362
call npm install -g node-gyp

cd /d %~dp0
cd ..\..

git submodule update --init
git submodule foreach --recursive git submodule update --init

set ARTIFACTS_OUT=%cd%\artifacts
cd packages\grpc-native-core
call tools\run_tests\artifacts\build_artifact_node.bat || goto :error
cd ..\..

goto :EOF

:error
exit /b 1

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

@echo "Starting Windows build"

powershell -c "& { iwr https://raw.githubusercontent.com/grumpycoders/nvm-ps/master/nvm.ps1 | iex }"

SET PATH=%APPDATA%\nvm-ps;%APPDATA%\nvm-ps\nodejs;%PATH%
call nvm install 10
call nvm use 10

call npm install -g npm
@rem https://github.com/mapbox/node-pre-gyp/issues/362
call npm install -g node-gyp@4

cd /d %~dp0
cd ..\..

git submodule update --init
git submodule foreach --recursive git submodule update --init

set ARTIFACTS_OUT=%cd%\artifacts
cd packages\grpc-native-core
call tools\run_tests\artifacts\build_artifact_node.bat || goto :error
cd ..\..

goto :EOF

:error
exit /b 1

Use older version of node-gyp

Use older version of node-gyp


set PKG_CONFIG_PATH=%LIBRARY_LIB%\pkgconfig

python setup.py config --compiler=msvc build --compiler=msvc install
if errorlevel 1 exit 1

set PKG_CONFIG_PATH=%LIBRARY_LIB%\pkgconfig

rem Library renames necessary for python-pcl to compile
for %%x in (io registration segmentation features filters sample_consensus surface search kdtree octree common) do (
    copy %LIBRARY_LIB%\pcl_%%x_release.lib %LIBRARY_LIB%\pcl_%%x.lib
    if errorlevel 1 exit 1
)

copy %LIBRARY_LIB%\flann_cpp_s.lib %LIBRARY_LIB%\flann_cpp.lib
if errorlevel 1 exit 1

python setup.py config --compiler=msvc build --compiler=msvc install
if errorlevel 1 exit 1

Python-pcl: Make some renames so that it can detect the libraries it needs


@rem Open "Visual Studio .NET Command Prompt" to run this script

@setlocal
@set LUA=../../luajit-2.0
@set LSCOMPILE=cl /nologo /c /LD /MD /O2 /W3 /D_CRT_SECURE_NO_DEPRECATE /I%LUA%/src
@set LSLINK=link /nologo

%LSCOMPILE% /DLUA_BUILD_AS_DLL /DWIN32_VISTA luasys.c sock/sys_sock.c isa/isapi/isapi_dll.c
@if errorlevel 1 goto :END
%LSLINK% /DLL /OUT:sys.dll /DEF:isa/isapi/isapi_dll.def *.obj %LUA%/src/lua*.lib kernel32.lib user32.lib winmm.lib shell32.lib advapi32.lib ws2_32.lib
@if errorlevel 1 goto :END

@del *.obj *.manifest *.lib *.exp

:END

@rem Open "Visual Studio .NET Command Prompt" to run this script

@setlocal
@set LUA=../../luajit-2.0
@set LSCOMPILE=cl /nologo /c /LD /MD /O2 /W3 /D_CRT_SECURE_NO_DEPRECATE /I%LUA%/src
@set LSLINK=link /nologo

%LSCOMPILE% /DLUA_BUILD_AS_DLL /DWIN32_VISTA_ luasys.c sock/sys_sock.c isa/isapi/isapi_dll.c
@if errorlevel 1 goto :END
%LSLINK% /DLL /OUT:sys.dll /DEF:isa/isapi/isapi_dll.def *.obj %LUA%/src/lua*.lib kernel32.lib user32.lib winmm.lib shell32.lib advapi32.lib ws2_32.lib
@if errorlevel 1 goto :END

@del *.obj *.manifest *.lib *.exp

:END

Win32: Disable compiling for Vista+ by default.


cd /d %~dp0

rem Check to make sure we've actually copied over at least something that could be the OSVR and Managed-OSVR binaries.
if not exist OSVR-Unity\Assets\OSVRUnity\Plugins\x86\*.dll exit /B 1

"C:\Program Files (x86)\Unity\Editor\Unity.exe" -quit -batchmode -projectPath "%~dp0OSVR-Unity" -logFile "%~dp0unity.log" -executeMethod OSVRUnityBuild.build
type "%~dp0unity.log"

rem Fail the build if we didn't get a unitypackage out.
if not exist OSVR-Unity\*.unitypackage exit /B 1

rem Copy the unitypackage to the dist directory if it exists.
if exist OSVR-Unity-Dist xcopy OSVR-Unity\*.unitypackage OSVR-Unity-Dist /Y

cd /d %~dp0

rem Check to make sure we've actually copied over at least something that could be the OSVR and Managed-OSVR binaries.
if not exist OSVR-Unity\Assets\OSVRUnity\Plugins\x86\*.dll exit /B 1

"C:\Program Files\Unity\Editor\Unity.exe" -quit -batchmode -projectPath "%~dp0OSVR-Unity" -logFile "%~dp0unity.log" -executeMethod OSVRUnityBuild.build
type "%~dp0unity.log"

rem Fail the build if we didn't get a unitypackage out.
if not exist OSVR-Unity\*.unitypackage exit /B 1

rem Copy the unitypackage to the dist directory if it exists.
if exist OSVR-Unity-Dist xcopy OSVR-Unity\*.unitypackage OSVR-Unity-Dist /Y

Update Unity install directory in build script


@echo off

set SELF_PATH=%~dp0
call %SELF_PATH%\env.bat

set QTC_SOURCE=%cd%\qtcreator-latest\src
set QTC_BUILD=%cd%\qtcreator-latest\compiled

rmdir /s /q build
mkdir build

cd build
lrelease %SELF_PATH%\..\..\qtc-cppcheck.pro
qmake %SELF_PATH%\..\..
nmake
cd ..

set /p VERSION=<qtcreator-latest\version
set PLUGIN_NAME=QtcCppcheck

if not exist qtcreator-latest\compiled\lib\qtcreator\plugins\%PLUGIN_NAME%4.dll  exit /b 1

rd /Q /S dist
mkdir dist\lib\qtcreator\plugins
mkdir dist\share\qtcreator\translations
copy /Y qtcreator-latest\compiled\lib\qtcreator\plugins\%PLUGIN_NAME%4.dll dist\lib\qtcreator\plugins
copy /Y %SELF_PATH%\..\..\translation\*.qm dist\share\qtcreator\translations

if exist %PLUGIN_NAME%-%VERSION%-win.zip del /Q %PLUGIN_NAME%-%VERSION%-win.zip
cd dist
zip -q -r ..\%PLUGIN_NAME%-%VERSION%-win.zip *
cd ..

@echo off

set SELF_PATH=%~dp0
call %SELF_PATH%\env.bat

set QTC_SOURCE=%cd%\qtcreator-latest\src
set QTC_BUILD=%cd%\qtcreator-latest\compiled

rmdir /s /q build
mkdir build

cd build
lrelease %SELF_PATH%\..\..\qtc-cppcheck.pro
qmake %SELF_PATH%\..\..
nmake
cd ..

set /p VERSION=<qtcreator-latest\version
set PLUGIN_NAME=QtcCppcheck

if not exist qtcreator-latest\compiled\lib\qtcreator\plugins\%PLUGIN_NAME%4.dll  exit /b 1

rd /Q /S dist
mkdir dist\lib\qtcreator\plugins
mkdir dist\share\qtcreator\translations
copy /Y qtcreator-latest\compiled\lib\qtcreator\plugins\%PLUGIN_NAME%4.dll dist\lib\qtcreator\plugins
copy /Y %SELF_PATH%\..\..\translation\*.qm dist\share\qtcreator\translations

if exist %PLUGIN_NAME%-%VERSION%-win.zip del /Q %PLUGIN_NAME%-%VERSION%-win.zip
cd dist
7z a ..\%PLUGIN_NAME%-%VERSION%-win.zip *
cd ..

Use 7zip instead of zip.

Use 7zip instead of zip.


@echo off
setlocal EnableDelayedExpansion

REM This script automatically extracts the downloaded FFmpeg 7-zip archives and sets up the required folder structure

SET version=ffmpeg-2.8.2
SET platforms="win32" "win64"
SET disttypes="dev" "shared"

REM 7-Zip
REM echo without newline at end
ECHO|SET /p=Searching for 7-zip...

WHERE 7z >nul 2>nul
IF %ERRORLEVEL% EQU 0 (
    ECHO found on path
    SET sevenzip=7z
) ELSE (
    IF EXIST "%PROGRAMFILES%\7-zip\7z.exe" (
        ECHO found in program files
        SET sevenzip="%PROGRAMFILES%\7-zip\7z.exe"
    ) ELSE (
        IF EXIST "%PROGRAMFILES(X86)%\7-zip\7z.exe" (
            ECHO found in x86 program files
            SET sevenzip="%PROGRAMFILES(X86)%\7-zip\7z.exe"
        ) ELSE (
            ECHO NOT FOUND
            ECHO ERROR: 7-zip not found... please install to default directory and retry, or extract files manually according to the instructions in ffmpeg-prepare.txt
            GOTO end
        )
    )
)

REM FFmpeg archive files
ECHO Looking for required archive files...
SET filenotfound=0

FOR %%p in (%platforms%) DO (
    FOR %%d in (%disttypes%) DO (
        SET file=%version%-%%~p-%%~d.7z

        REM echo without newline at end
        ECHO|SET /p=Checking !file!...

        IF NOT EXIST !file! (
            ECHO MISSING
            SET filenotfound=1
        ) ELSE (
            ECHO ok
        )
    )
)

IF %filenotfound% EQU 1 (
    ECHO ERROR: Missing file^(s^)^^! Please download the required files into this script's directory^^!
    GOTO end
)

REM Extraction
ECHO Extracting...

FOR %%p in (%platforms%) DO (
    REM create target dir, suppress errors if dir already exists
    mkdir %%~p >nul 2>nul

    FOR %%d in (%disttypes%) DO (
        REM assemble archive name
        SET name=%version%-%%~p-%%~d

        REM extract archive without cmd output
        %sevenzip% x -y !name!.7z >nul

        REM move necessary folders from extracted archive to target folder
        REM (not every archive contains every folder)
        FOR %%d in (bin include lib) DO (
            IF EXIST !name!\%%~d (
                move !name!\%%~d %%~p\%%~d >nul
            )
        )

        REM force delete remainder of extracted folder
        rmdir /S /Q !name!
    )
)

ECHO Finished^^! FFmpeg is setup correctly^^! You can now safely delete the downloaded archive files.

:end
REM wait for key press, to display results also to users calling this script directly (not from a prompt)
pause

Add FFmpeg setup helper script

Add FFmpeg setup helper script


@set __e=%1
@if "%1" == "" set __e=off
@echo %__e%
rem builder_custom_init

set VC_VER=14.0
set BUILDER_CFG_PLATFORM=Win64
set BUILDER_CFG_BUILD_TYPE=Release
set PYTHON_VERSION=3.6
set PYTHON_FILE_VERSION=36

rem if Win64 then setup path to include the 64bit CL.exe
rem when called in place this can fork bomb (lots of CMD.exe in task manager)
call "C:\Program Files (x86)\Microsoft Visual Studio %VC_VER%\VC\bin\amd64\vcvars64.bat"
@echo %__e%

set PYTHON=c:\python%PYTHON_FILE_VERSION%.%BUILDER_CFG_PLATFORM%\python
PATH c:\python%PYTHON_FILE_VERSION%.%BUILDER_CFG_PLATFORM%;%PATH%
%PYTHON% -c "import sys;print( 'Python:', sys.version )"

@set __e=%1
@if "%1" == "" set __e=off
@echo %__e%
rem builder_custom_init

set VC_VER=14.0
set BUILDER_CFG_PLATFORM=Win64
set BUILDER_CFG_BUILD_TYPE=Release
set PYTHON_VERSION=3.6
set PYTHON_FILE_VERSION=36

rem if Win64 then setup path to include the 64bit CL.exe
rem when called in place this can fork bomb (lots of CMD.exe in task manager)
if exist "C:\Program Files (x86)\Microsoft Visual Studio %VC_VER%\VC\bin\amd64\vcvars64.bat" (
    call "C:\Program Files (x86)\Microsoft Visual Studio %VC_VER%\VC\bin\amd64\vcvars64.bat"
)
if exist "c:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars64.bat" (
    call "c:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars64.bat"
)
@echo %__e%

set PYTHON=c:\python%PYTHON_FILE_VERSION%.%BUILDER_CFG_PLATFORM%\python
PATH c:\python%PYTHON_FILE_VERSION%.%BUILDER_CFG_PLATFORM%;"c:\Program Files\gettext-iconv\bin";%PATH%
%PYTHON% -c "import sys;print( 'Python:', sys.version )"

Test for install location of the Visual Studio files


SET MsBuildPath=C:\Windows\Microsoft.NET\Framework64\v4.0.30319
SET NuGetExe=.nuget\nuget.exe
%MsBuildPath%\MsBuild.exe build.proj

.nuget\NuGet.exe pack Caliburn.Metro\Caliburn.Metro.nuspec
.nuget\NuGet.exe pack Caliburn.Metro.Autofac\Caliburn.Metro.Autofac.nuspec

Add basic build and pack script

Add basic build and pack script


ECHO off
ECHO MOVE C:\mongo* C:\mongodb
setx MYPATH "%PATH%;C:\mongodb\bin"

ECHO on
FOR /f %%i IN ('dir /ad /b "C:\" ^|findstr /I "mongo"') DO set dest=%%i
ECHO MOVE C:\%dest% C:\mongodb\
setx MYPATH "%PATH%;C:\mongodb\bin"

Revert "Removed for loop and used MOVE command with wildcards"

This reverts commit d4e2e10962b2c4e05b9f54cef8d12e6e4cdff7f2.

I am an idiot and glob commands / wildcards don't work in batch
scripts. Thanks Microsoft.


::-------------------------------------------------------------------------------------------------------
:: Copyright (C) Microsoft. All rights reserved.
:: Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
::-------------------------------------------------------------------------------------------------------

:: PGO Build Workflow:
:: - pre_pgi.cmd
:: - build (with PGI instrumentation enabled)
:: - post_pgi.cmd
:: - pogo_training.ps1
:: - pre_pgo.cmd
:: - build (using PGO profile)
:: * post_pgo.cmd

@echo off

if "%PogoConfig%"=="False" (
    echo ---- Not a Pogo Config. Skipping step.
    exit /b 0
)

set binpath_pgo=%1

if "%binpath_pgo%"=="" (
  goto:usage
)

set POGO_TYPE=

REM Clean binaries we no longer need
if exist %binpath_pgo%\*.pgc ( del %binpath_pgo%\*.pgc )
if exist %binpath_pgo%\*.pgd ( del %binpath_pgo%\*.pgd )
if exist %binpath_pgo%\pgort* ( del %binpath_pgo%\pgort* )

goto:eof

:usage
  echo Invalid/missing arguments
  echo.
  echo Usage: post_pgo.cmd ^<binary_path^>
  echo   - binary_path: output path of your binaries

exit /b 1

::-------------------------------------------------------------------------------------------------------
:: Copyright (C) Microsoft. All rights reserved.
:: Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
::-------------------------------------------------------------------------------------------------------

:: PGO Build Workflow:
:: - pre_pgi.cmd
:: - build (with PGI instrumentation enabled)
:: - post_pgi.cmd
:: - pogo_training.ps1
:: - pre_pgo.cmd
:: - build (using PGO profile)
:: * post_pgo.cmd

@echo off

if "%PogoConfig%"=="False" (
    echo ---- Not a Pogo Config. Skipping step.
    exit /b 0
)

set binpath_pgo=%1

if "%binpath_pgo%"=="" (
  goto:usage
)

set POGO_TYPE=

REM Clean binaries we no longer need
if exist %binpath_pgo%\*.lib ( del %binpath_pgo%\*.lib )
if exist %binpath_pgo%\*.pgc ( del %binpath_pgo%\*.pgc )
if exist %binpath_pgo%\*.pgd ( del %binpath_pgo%\*.pgd )
if exist %binpath_pgo%\pgort* ( del %binpath_pgo%\pgort* )

goto:eof

:usage
  echo Invalid/missing arguments
  echo.
  echo Usage: post_pgo.cmd ^<binary_path^>
  echo   - binary_path: output path of your binaries

exit /b 1

Remove .lib artifact from pogo build

Remove .lib artifact from pogo build


@echo off
setlocal

set ReleaseName=%3-%5-%4

set ProjectPath=%6
set ReleasePath=%6\%1
set WinRAR=c:\Program Files\WinRAR\WinRAR.exe

mkdir "%ReleaseName%"
mkdir "%ReleaseName%\Scripts"

copy "%ProjectPath%\*.txt" "%ReleaseName%"
copy "%ProjectPath%\*.md" "%ReleaseName%"
xcopy "%ProjectPath%\Scripts" "%ReleaseName%\Scripts" /E

copy "%ReleasePath%\*.dll" "%ReleaseName%"
copy "%ReleasePath%\%2" "%ReleaseName%"

"%WinRAR%" a -ep1 -m5 -r -t "%ReleaseName%.zip" "%ReleaseName%\*"
rmdir /S /Q "%ReleaseName%"

endlocal

@echo off
setlocal

set ReleaseName=%3-%5-%4

set ProjectPath=%6
set ReleasePath=%6\%1
set WinRAR=c:\Program Files\WinRAR\WinRAR.exe

mkdir "%ReleaseName%"
mkdir "%ReleaseName%\Scripts"

copy "%ProjectPath%\*.txt" "%ReleaseName%"
copy "%ProjectPath%\*.md" "%ReleaseName%"
xcopy "%ProjectPath%\Code" "%ReleaseName%\Code" /E
xcopy "%ProjectPath%\Scripts" "%ReleaseName%\Scripts" /E

copy "%ReleasePath%\*.dll" "%ReleaseName%"
copy "%ReleasePath%\%2" "%ReleaseName%"

"%WinRAR%" a -ep1 -m5 -r -t "%ReleaseName%.zip" "%ReleaseName%\*"
rmdir /S /Q "%ReleaseName%"

endlocal

Include Code folder in releases

Include Code folder in releases


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

cd %GOPATH%\src\code.cloudfoundry.org\cli

powershell -command set-executionpolicy remotesigned

go get github.com/onsi/ginkgo/ginkgo

ginkgo -r -randomizeAllSpecs -randomizeSuites .

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

cd %GOPATH%\src\code.cloudfoundry.org\cli

powershell -command set-executionpolicy remotesigned

go get github.com/onsi/ginkgo/ginkgo

ginkgo -r -randomizeAllSpecs -randomizeSuites -skipPackage integration .

Revert "the integration package is not in the cli resource"

This reverts commit a2fdfaa92f857fb85ddc98b3eebc7ced1047821a.


set CONDA_PREFIX=%PREFIX%
if errorlevel 1 exit 1

cmake -B build -S "%SRC_DIR%" ^
	-G Ninja ^
    -DCMAKE_BUILD_TYPE=Release
if errorlevel 1 exit 1

cmake --build build -j ${CPU_COUNT}
if errorlevel 1 exit 1

if not exist %SP_DIR% mkdir %SP_DIR%
if errorlevel 1 exit 1

copy build/OCP.cp*-*.* %SP_DIR%
if errorlevel 1 exit 1

set CONDA_PREFIX=%PREFIX%
if errorlevel 1 exit 1

cmake -B build -S "%SRC_DIR%" ^
	-G Ninja ^
    -DCMAKE_BUILD_TYPE=Release
if errorlevel 1 exit 1

cmake --build build -j %CPU_COUNT%
if errorlevel 1 exit 1

if not exist "%SP_DIR%" mkdir "%SP_DIR%"
if errorlevel 1 exit 1

copy build/OCP.cp*-*.* "%SP_DIR%"
if errorlevel 1 exit 1

Use windows variable syntax in windows...


@echo off
REM Note: do not try installing into the vim subdirectory here. Vundle overwrites the git repo!
if not exist %USERPROFILE%\vimfiles\bundle mkdir %USERPROFILE%\vimfiles\bundle
git clone https://github.com/gmarik/Vundle.vim.git %USERPROFILE%\vimfiles\bundle\Vundle.vim
cd %USERPROFILE%\vimfiles\bundle
gvim +PluginInstall

VIM: Add installation script for Vundle on Windows


@echo off
if not defined build_dir goto :missing_variables

del /s /q "%build_dir%\hehu_mf\"
mkdir "%build_dir%\hehu_mf\functions"

pushd %tools_dir%\binmake
@echo on
binmake.exe "%source_dir%\config.cpp" "%build_dir%\hehu_mf\config.bin"
@echo off
popd

@echo on
copy "%source_dir%\CQB_Params.hpp" "%build_dir%\hehu_mf\"
xcopy /E "%source_dir%\functions" "%build_dir%\hehu_mf\functions"

"%tools_dir%\filebank\filebank.exe" -property prefix=hehu_mf "%build_dir%\hehu_mf"

@echo off
mkdir "%target_dir%\@hehu_mf\addons"
mkdir "%target_dir%\@hehu_mf\images"

@echo on
copy "%build_dir%\hehu_mf.pbo" "%target_dir%\@hehu_mf\addons"
copy "%source_dir%\mod.cpp" "%target_dir%\@hehu_mf"
copy "%source_dir%\README.md" "%target_dir%\@hehu_mf\readme.txt"
xcopy /E "%source_dir%\images" "%target_dir%\@hehu_mf\images"

exit 0

:missing_variables
echo You need to set up your make.bat file and run that one instead!
pause
exit 1

@echo off
if not defined build_dir goto :missing_variables

del /s /q "%build_dir%\hehu_mf\"
mkdir "%build_dir%\hehu_mf\functions"

pushd %tools_dir%\binmake
@echo on
binmake.exe "%source_dir%\config.cpp" "%build_dir%\hehu_mf\config.bin"
@echo off
popd

@echo on
copy "%source_dir%\CQB_Params.hpp" "%build_dir%\hehu_mf\"
xcopy /E "%source_dir%\functions" "%build_dir%\hehu_mf\functions"

"%tools_dir%\filebank\filebank.exe" -property prefix=hehu_mf "%build_dir%\hehu_mf"

@echo off
mkdir "%target_dir%\@hehu_mf\addons"
mkdir "%target_dir%\@hehu_mf\images"

@echo on
copy "%build_dir%\hehu_mf.pbo" "%target_dir%\@hehu_mf\addons"
copy "%source_dir%\mod.cpp" "%target_dir%\@hehu_mf"
copy "%source_dir%\README.md" "%target_dir%\@hehu_mf\readme.txt"
xcopy /E /Y "%source_dir%\images" "%target_dir%\@hehu_mf\images"

exit 0

:missing_variables
echo You need to set up your make.bat file and run that one instead!
pause
exit 1

Build script should overwrite images automatically


@echo off
SET CURDIR=%CD%

Set /P version=Enter release version number (e.g. 1.2.3):
If "%version%"=="" goto :err
goto:noerr

:err
echo No release version entered
goto:end

:noerr
SET SRC=https://metageta.googlecode.com/svn/trunk
SET DST=https://metageta.googlecode.com/svn/tags/%version%

svn copy %SRC% %DST% -m "Tagging version %version%"
svn checkout --depth=empty %DST% %TEMP%\metageta-%version%
cd %TEMP%\metageta-%version%
svn propset displayversion %version% .
svn propset version %version%.$Revision$ .
svn commit -m "Updating version properties %version%"
cd %CURDIR%
del /f /q %TEMP%\metageta-%version%

:end
pause

Add simple batch script to tag new releases and update properties


@ECHO OFF

REM Configure your favorite diff3/merge program here.
SET DIFF3="C:\Program Files\Funky Stuff\My Merge Tool.exe"

SET MINE=%9
SHIFT
SET OLDER=%9
SHIFT
SET YOURS=%9

REM Call the merge command (change the following line to make sense)
%DIFF3% --older %OLDER% --mine %MINE% --yours %YOURS%

REM After performing the merge, this script needs to print the contents
REM of the merged file to stdout.  Do that in whatever way you see fit.

@ECHO OFF

REM Configure your favorite diff3/merge program here.
SET DIFF3="C:\Program Files\Funky Stuff\My Merge Tool.exe"

REM We only have access to nine parameters at a time.  We use SHIFT to slide
REM our nine-parameter window a little bit so we can get to what we need.
SET MINE=%9
SHIFT
SET OLDER=%9
SHIFT
SET YOURS=%9

REM Call the merge command (change the following line to make sense)
%DIFF3% --older %OLDER% --mine %MINE% --yours %YOURS%

REM After performing the merge, this script needs to print the contents
REM of the merged file to stdout.  Do that in whatever way you see fit.

Add a helpful comment for folks unfamiliar with the SHIFT construct.

* contrib/client-side/diff3wrap.bat

git-svn-id: f8a4e5e023278da1e04e203c7fe051e3c4285d88@855345 13f79535-47bb-0310-9956-ffa450edef68


REM perform 32-bit build
if "%1" == "clean" rmdir /s /q build
mkdir build
cd build
del CMakeCache.txt
rmdir /s /q build\_CPack_Packages
cmake -G"MinGW Makefiles" -DRSTUDIO_TARGET=Desktop -DCMAKE_BUILD_TYPE=Release ..\..\..
mingw32-make
cd ..

REM perform 64-bit build and install it into the 32-bit tree
REM (but only do this if we are on win64)
IF DEFINED PROGRAMW6432 call make-install-win64.bat "%CD%\build\src\cpp\session" %1

REM create packages
cd build
cpack -G NSIS
REM cpack -G ZIP
cd ..

REM perform 32-bit build
if "%1" == "clean" rmdir /s /q build
mkdir build
cd build
del CMakeCache.txt
rmdir /s /q build\_CPack_Packages
cmake -G"MinGW Makefiles" -DRSTUDIO_TARGET=Desktop -DCMAKE_BUILD_TYPE=Release ..\..\..
mingw32-make
cd ..

REM perform 64-bit build and install it into the 32-bit tree
REM (but only do this if we are on win64)
IF "%PROCESSOR_ARCHITECTURE%" == "AMD64" call make-install-win64.bat "%CD%\build\src\cpp\session" %1

REM create packages
cd build
cpack -G NSIS
REM cpack -G ZIP
cd ..

Make Win x64 build work on versions of Windows earlier than Win7/2008R2


@echo off
set local
rem Signing pattern taken from:
rem https://textslashplain.com/2016/01/10/authenticode-in-2016/

rem Add path for signtool
set path=%path%;C:\Program Files (x86)\Windows Kits\10\bin\x64

rem So far I see no indications that SHA1 signing is actually needed.
rem signtool sign /d "UIforETW" /du "https://github.com/google/UIforETW/releases" /n "Bruce Dawson" /tr http://timestamp.digicert.com /fd SHA1 %~dp0bin\UIforETW.exe %~dp0bin\UIforETW32.exe
rem @if not %errorlevel% equ 0 goto failure

rem Sign both 64-bit and 32-bit versions of UIforETW with the same description.
signtool sign /d "UIforETW" /du "https://github.com/google/UIforETW/releases" /n "Bruce Dawson" /tr http://timestamp.digicert.com /td SHA256 /fd SHA256 %~dp0bin\UIforETW.exe %~dp0bin\UIforETW32.exe
@if not %errorlevel% equ 0 goto failure
exit /b

:failure
echo Signing failed!

Add batch file to sign main executables

Add batch file to sign main executables

All future releases of UIforETW will have the two main executables
signed. This is particularly important since these two are run as
administrator.

SHA1 signing is currently not used because it does not seem to add any
value for the operating systems (Windows 7 and above, and maybe Windows
Vista, but probably not) that UIforETW targets. If SHA1 is needed I can
add it - but I hate having to type the signing-key password twice.


mkdir /Script
cd /Script

create STRING "Restart DAQ"
set "Restart DAQ" "/home/newg2/Applications/field-daq/online/bin/restart_daq.sh
"
create STRING "Restart Front-Ends"
set "Restart Front-Ends" "/home/newg2/Applications/field-daq/online/bin/restart_frontends.sh"

Add odb init for run script buttons.

Add odb init for run script buttons.


cd /d %~dp0
java -jar pathvisio.jar -p visplugins.jar %*

cd /d %~dp0
java -Xmx1024m -jar pathvisio.jar -p visplugins.jar %*

Increase memory limit for standard installation


@rem Used by the buildbot "clean" step.
call "%VS71COMNTOOLS%vsvars32.bat"
cd PCbuild
@echo Deleting .pyc/.pyo files ...
python_d.exe rmpyc.py
devenv.com /clean Debug pcbuild.sln

@rem Used by the buildbot "clean" step.
call "%VS71COMNTOOLS%vsvars32.bat"
cd PCbuild
@echo Deleting .pyc/.pyo files ...
python_d.exe rmpyc.py
devenv.com /clean Release pcbuild.sln
devenv.com /clean Debug pcbuild.sln

Clean both Release and Debug projects, to support the MSI builder.


:: Retrieve data files from Android device using ADB
:: Grab only the shaders/ directory, where edited shaders are stored.

echo off
:: Guess the default installation location
set ANDROID_HOME=%LOCALAPPDATA%\Android
set ANDROID_SDK=%ANDROID_HOME%\sdk
set ADB=%ANDROID_SDK%\platform-tools\adb
::echo %ADB%

set SHADERS_PATH=data/shaders/
set APP_PATH=/sdcard/Android/data/com.android.flickercladding/
set REMOTE_PATH=%APP_PATH%/%SHADERS_PATH%
set LOCAL_PATH=deploy/data/.

%ADB% -d pull %REMOTE_PATH% %LOCAL_PATH%

Add script to copy shaders back from device.


IF "%ARCH%"=="32" (
    powershell -command "& { iwr ftp://ftp.fftw.org/pub/fftw/fftw-3.3.4-dll32.zip -OutFile fftw-3.3.4-dll32.zip }"
    7z e .\fftw-3.3.4-dll32.zip -offtw3
) ELSE (
    powershell -command "& { iwr ftp://ftp.fftw.org/pub/fftw/fftw-3.3.4-dll64.zip -OutFile fftw-3.3.4-dll64.zip }"
    7z e .\fftw-3.3.4-dll64.zip -offtw3
)

cd fftw3
lib /def:libfftw3f-3.def
cd ..

ls fftw3
move fftw3\libfftw3f-3.lib %LIBRARY_LIB%\
move fftw3\fftw3.f %LIBRARY_INC%\

Make FFTW3 work for windows

Make FFTW3 work for windows

Former-commit-id: 3c55074b3421ec9ea51ee762e039ca5c64a16954


@echo off
SETLOCAL ENABLEDELAYEDEXPANSION
pushd %~dp0\..\Docs
echo Dumping AngelScript API...
..\Bin\ScriptCompiler -dumpapi ScriptAPI.dox AngelScriptAPI.h
if errorlevel 1 exit /B 1
pushd %~dp0\..\Source\Engine\LuaScript\pkgs\
echo Dumping LuaScript API...
..\..\..\..\Bin\tolua++ -L ToDoxHook.lua -P -o ..\..\..\..\Docs\LuaScriptAPI.dox Urho3D.tolua
if errorlevel 1 exit /B 1
pushd %~dp0\..\Docs
echo Converting Doxygen files to HTML...
doxygen Doxyfile 1>nul
echo Finish.
popd

Add new line at end of file.

Add new line at end of file.


:: msbuild must be in path
SET PATH=%PATH%;%WINDIR%\Microsoft.NET\Framework64\v4.0.30319
where msbuild
if errorLevel 1 ( echo "msbuild was not found on PATH" && exit /b 1 )

git submodule update --init --recursive
cd IronFrame
call build.bat build || exit /b 1
cd ..

rmdir /S /Q packages
bin\nuget restore || exit /b 1
MSBuild Containerizer\Containerizer.csproj /t:Rebuild /p:Configuration=Release || exit /b 1
MSBuild Containerizer.Tests\Containerizer.Tests.csproj /t:Rebuild /p:Configuration=Release || exit /b 1
packages\nspec.0.9.68\tools\NSpecRunner.exe Containerizer.Tests\bin\Release\Containerizer.Tests.dll || exit /b 1

:: msbuild must be in path
SET DEVENV_PATH=%programfiles(x86)%\Microsoft Visual Studio 12.0\Common7\IDE
SET PATH=%PATH%;%DEVENV_PATH%;%WINDIR%\Microsoft.NET\Framework64\v4.0.30319
where msbuild
if errorLevel 1 ( echo "msbuild was not found on PATH" && exit /b 1 )

git submodule update --init --recursive
pushd IronFrame || exit /b 1
  ..\bin\nuget restore || exit /b 1
  devenv IronFrame.sln /build "Release" || exit /b 1
  :: call build.bat build || exit /b 1
popd

rmdir /S /Q packages
bin\nuget restore || exit /b 1
MSBuild Containerizer\Containerizer.csproj /t:Rebuild /p:Configuration=Release || exit /b 1
MSBuild Containerizer.Tests\Containerizer.Tests.csproj /t:Rebuild /p:Configuration=Release || exit /b 1
packages\nspec.0.9.68\tools\NSpecRunner.exe Containerizer.Tests\bin\Release\Containerizer.Tests.dll || exit /b 1

Use visual studio instead of msbuild

Use visual studio instead of msbuild

Signed-off-by: Dave_Goddard <a5692579077bf98cb035292473fe12572309d028@pivotal.io>


mkdir build
cd build

cmake -G "Visual Studio 16 2019" ^
	-DCMAKE_BUILD_TYPE=Rel  ^
	-DENABLE_TESTS=OFF ^
	-DNETCDF_PREFIX="%LIBRARY_PREFIX%" ^
	-DHDF5_ROOT="%LIBRARY_PREFIX%" ^
	-DGDAL_DIR="%LIBRARY_PREFIX%" ^
	-DGDAL_LIBRARY="%LIBRARY_PREFIX%\lib\gdal_i.lib" ^
	-DGDAL_INCLUDE_DIR="%LIBRARY_PREFIX%\include" ^
	-DLIBXML2_LIBRARIES="%LIBRARY_PREFIX%\lib\libxml2.lib" ^
	-DLIBXML2_INCLUDE_DIR="%LIBRARY_PREFIX%\include\libxml2" ^
	-DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^
	-DCMAKE_PREFIX_PATH=%LIBRARY_PREFIX% ^
	..

cmake --build .

copy /B mdal\Debug\*.dll %LIBRARY_BIN%
copy /B tools\Debug\*.exe %LIBRARY_BIN%

mkdir build
cd build

cmake  ^
	-DCMAKE_BUILD_TYPE=Rel  ^
	-DENABLE_TESTS=OFF ^
	-DNETCDF_PREFIX="%LIBRARY_PREFIX%" ^
	-DHDF5_ROOT="%LIBRARY_PREFIX%" ^
	-DGDAL_DIR="%LIBRARY_PREFIX%" ^
	-DGDAL_LIBRARY="%LIBRARY_PREFIX%\lib\gdal_i.lib" ^
	-DGDAL_INCLUDE_DIR="%LIBRARY_PREFIX%\include" ^
	-DLIBXML2_LIBRARIES="%LIBRARY_PREFIX%\lib\libxml2.lib" ^
	-DLIBXML2_INCLUDE_DIR="%LIBRARY_PREFIX%\include\libxml2" ^
	-DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^
	-DCMAKE_PREFIX_PATH=%LIBRARY_PREFIX% ^
	..

cmake --build .

copy /B mdal\Debug\*.dll %LIBRARY_BIN%
copy /B tools\Debug\*.exe %LIBRARY_BIN%

Fix incorrect VS version bug

Fix incorrect VS version bug


IF  "%1"=="" (
	GOTO HELL
) ELSE (
	SET _TAG_=v%1
)

IF  NOT "%2"=="" (
	SET _TAG_=%_TAG_%.%2
)

git remote set-url origin https://%3:%4@github.com/wasteam/waslibs.git
git tag -a %_TAG_% -m "Version built: %_TAG_%"
git push origin %_TAG_%

GOTO END

:HELL
ECHO VERSION NOT FOUND
EXIT -1

:END
ECHO PROCESS FINISHED
EXIT 0

IF  "%1"=="" (
	GOTO HELL
) ELSE (
	SET _TAG_=v%1
)

IF  NOT "%2"=="" (
	SET _TAG_=%_TAG_%.%2
)

git config --global user.email "%3@outlook.com"
git config --global user.name "%3"
git remote set-url origin https://%3:%4@github.com/wasteam/waslibs.git
git tag -a %_TAG_% -m "Version built: %_TAG_%"
git push origin %_TAG_%

GOTO END

:HELL
ECHO VERSION NOT FOUND
EXIT -1

:END
ECHO PROCESS FINISHED
EXIT 0

Set git user.name and user.email

Set git user.name and user.email


git clone https://github.com/SFML/SFML.git
cd SFML

mkdir install
mkdir build
cd build

cmake .. -G "Visual Studio 15 Win64" -DCMAKE_INSTALL_PREFIX=../install -DSFML_DEPENDENCIES_INSTALL_PREFIX=../install -DSFML_BUILD_FRAMEWORKS=FALSE -DBUILD_SHARED_LIBS=TRUE

msbuild INSTALL.vcxproj

cd ../../

mkdir install
mkdir build
cd build

cmake .. -G "Visual Studio 15 Win64" -DCMAKE_BUILD_TYPE=$CONFIGURATION -DTARGET_CPU=$PLATFORM -DCMAKE_INSTALL_PREFIX=../install -DCMAKE_PREFIX_PATH=C:/projects/timle/SFML/install

cd ../

Fix position to current directory

Fix position to current directory


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

@echo on

@rem Use clcache for faster builds
pip install -q git+https://github.com/frerich/clcache.git
clcache -s
set CLCACHE_SERVER=1
set CLCACHE_HARDLINK=1
powershell.exe -Command "Start-Process clcache-server"

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

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

@echo on

@rem Use clcache for faster builds
pip install -q git+https://github.com/frerich/clcache.git
clcache -M 3221225472
clcache -s
set CLCACHE_SERVER=1
set CLCACHE_HARDLINK=1
set CLCACHE_NODIRECT=1
powershell.exe -Command "Start-Process clcache-server"

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

Change clcache size and set CLCACHE_NODIRECT


:: Open the input file at the input line.
::
:: Bug: The line doesn't work
::

"\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\devenv" /Edit "%1" /Command "Edit.GoTo %2"

:: Open the input file at the input line.
::
:: Bug: The line doesn't work
::

:: VS2012
REM "c:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\devenv" /Edit "%1" /Command "Edit.GoTo %2"
:: VS2013
REM "c:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv" /Edit "%1" /Command "Edit.GoTo %2"
:: VS2015
"c:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\devenv" /Edit "%1" /Command "Edit.GoTo %2"

:: TODO: Can I detect which Visual Studio is running? Above is not a great solution. Maybe something like this?
REM :check
REM :: Note: tasklist does not return a valid exit code, so we need to use findstr.
REM tasklist /M UE4Editor-Core.dll | findstr "No tasks" > nul
REM IF ERRORLEVEL 1 (
REM 	IF x%1 NEQ x-f GOTO :check
REM )

Update VS open command to work with VS2015


if not exist deps git clone -b master http://buildserver.urbackup.org/git/urbackup_deps deps
cd deps
git reset --hard
git pull
cd ..

Build with Visual Studio 2015

Build with Visual Studio 2015


copy Zusatz-Dateien\LiesMich.txt     dist\LiesMich.txt
copy Zusatz-Dateien\CV-Navi.sh       dist\CV-Navi.sh

copy Zusatz_Bibs\rxtxSerial.dll         dist\rxtxSerial.dll
copy Zusatz_Bibs\rxtxSerial64.dll       dist\rxtxSerial64.dll
copy Zusatz_Bibs\librxtxSerial.jnilib   dist\rxtxSerial.dll
copy Zusatz_Bibs\librxtxSerial64.jnilib dist\rxtxSerial64.dll

copy Zusatz-Dateien\LiesMich.txt     dist\LiesMich.txt
copy Zusatz-Dateien\CV-Navi.sh       dist\CV-Navi.sh

copy Zusatz_Bibs\rxtxSerial.dll         dist\rxtxSerial.dll
copy Zusatz_Bibs\rxtxSerial64.dll       dist\rxtxSerial64.dll
copy Zusatz_Bibs\librxtxSerial.jnilib   dist\librxtxSerial.jnilib
copy Zusatz_Bibs\librxtxSerial64.jnilib dist\librxtxSerial64.jnilib

Fix fuer Windows basiertes Build-Skript

Fix fuer Windows basiertes Build-Skript


@echo off
SETLOCAL ENABLEDELAYEDEXPANSION

:: Initialize system variables and check configuration
call "%~dp0.etc\init.cmd"
IF %ERRORLEVEL% NEQ 0 exit /B %ERRORLEVEL%

pushd "!REGAIN_HOME!/runtime/crawler"
TITLE Regain crawler
java -Xmx1024m -Dfile.encoding=UTF-8 -cp !IK_EXT_HOME!/bin;!IK_HOME!/IKAnalyzer2012_u6.jar;!REGAIN_HOME!/runtime/crawler/regain-crawler.jar net.sf.regain.crawler.Main -config "!PROFILE_HOME!/.work/CrawlerConfiguration.xml" -logConfig "!PROFILE_HOME!/.work/log4j.properties"
popd

ENDLOCAL

@echo off
SETLOCAL ENABLEDELAYEDEXPANSION

:: Initialize system variables and check configuration
call "%~dp0.etc\init.cmd"
IF %ERRORLEVEL% NEQ 0 exit /B %ERRORLEVEL%

pushd "!REGAIN_HOME!/runtime/crawler"
TITLE Regain crawler
java %JAVA_OPTS% -Dfile.encoding=UTF-8 -cp !IK_EXT_HOME!/bin;!IK_HOME!/IKAnalyzer2012_u6.jar;!REGAIN_HOME!/runtime/crawler/regain-crawler.jar net.sf.regain.crawler.Main -config "!PROFILE_HOME!/.work/CrawlerConfiguration.xml" -logConfig "!PROFILE_HOME!/.work/log4j.properties"
popd

ENDLOCAL

Add %JAVA_OPTS% to crawler, so some java options such as -Xmx can be adjusted by this variable.


cls
call ../../language/src/locatevc.bat
cl /c /DEBUG ring_libui.c -I "..\..\extensions\libdepwin\libui" -I"..\..\language\include"
link /DEBUG ring_libui.obj  ..\..\lib\ring.lib ..\..\extensions\libdepwin\libui\libui.lib /DLL /OUT:..\..\bin\ring_libui.dll /SUBSYSTEM:CONSOLE,"5.01"
del ring_libui.obj

Update RingLibUI - Add a batch file to build the library DLL file


@echo off
cls

IF NOT EXIST "build\tools\FAKE.Core\tools\Fake.exe" (
  "tools\nuget\nuget.exe" install "NUnit.Runners" -OutputDirectory "build\tools" -ExcludeVersion -Version 2.6.4
  "tools\nuget\nuget.exe" install "FAKE.Core" -OutputDirectory "build\tools" -ExcludeVersion -Version 4.60.0
)

"build\tools\FAKE.Core\tools\Fake.exe" build.fsx %*

@echo off
cls

IF NOT EXIST "build\tools\FAKE.Core\tools\Fake.exe" (
  "tools\nuget\nuget.exe" install "NUnit.Runners" -OutputDirectory "build\tools" -ExcludeVersion -Version 2.6.4
  "tools\nuget\nuget.exe" install "FAKE.Core" -OutputDirectory "build\tools" -ExcludeVersion -Version 4.64.13
)

"build\tools\FAKE.Core\tools\Fake.exe" build.fsx %*

Use latest FAKE.Core 4.x version

Use latest FAKE.Core 4.x version


@echo off

taskkill/F /IM openfin.exe
taskkill /IM node.exe /F

del /q "%localappdata%\OpenFin\cache\*"
FOR /D %%p IN ("%localappdata%\OpenFin\cache\*.*") DO rmdir "%%p" /s /q

del /q "%localappdata%\OpenFin\apps\*"
FOR /D %%p IN ("%localappdata%\OpenFin\apps\*.*") DO rmdir "%%p" /s /q

del /q "%localappdata%\OpenFin\runtime\*"
FOR /D %%p IN ("%localappdata%\OpenFin\runtime\*.*") DO rmdir "%%p" /s /q

del /q "%localappdata%\OpenFin\logs\*"
FOR /D %%p IN ("%localappdata%\OpenFin\logs\*.*") DO rmdir "%%p" /s /q

del /q "%localappdata%\OpenFin\cache.dat"

del /q "%localappdata%\OpenFin\OpenFinRVM.exe"

Kill script: termintes openfin and node processes and clears openfin cache


cd make
node node_make.js debug
node node_make.js release
cd ..
if not exist ..\ArnaudBuchholz.github.io goto end
copy build\gpf.js ..\ArnaudBuchholz.github.io\
copy build\gpf-debug.js ..\ArnaudBuchholz.github.io\
plato -d ..\ArnaudBuchholz.github.io\plato\gpf-js -t GPF-JS -l .jshintrc *.js
:end

cd make
node node_make.js debug
node node_make.js release
cd ..
if not exist ..\ArnaudBuchholz.github.io goto end
copy build\gpf.js ..\ArnaudBuchholz.github.io\
copy build\gpf-debug.js ..\ArnaudBuchholz.github.io\
plato -x coding_convention.js -d ..\ArnaudBuchholz.github.io\plato\gpf-js -t GPF-JS -l .jshintrc *.js
:end

Make now includes Plato statistics

Make now includes Plato statistics


echo Current build setup CC="%CC%" PLATFORM="%PLATFORM%" TARGET="%TARGET%"

if %CC% == VC2019 call "%ProgramFiles(x86)%\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvarsall.bat" %PLATFORM%
if %CC% == VC2019p call "%ProgramFiles(x86)%\Microsoft Visual Studio\2019\Preview\VC\Auxiliary\Build\vcvarsall.bat" %PLATFORM%
if %CC% == MinGW set PATH=%PATH%;C:\msys64\mingw64\bin

rem check compiler version
if %CC% == MinGW g++ -v
if not %CC% == MinGW cl

appveyor DownloadFile https://github.com/mozilla/sccache/releases/download/%SCCACHE_VERSION%/sccache-%SCCACHE_VERSION%-x86_64-pc-windows-msvc.tar.gz
tar -xf sccache-%SCCACHE_VERSION%-x86_64-pc-windows-msvc.tar.gz

appveyor DownloadFile http://download.qt.io/official_releases/jom/jom.zip -FileName jom.zip
7z e jom.zip

set PATH=%PATH%;sccache-%SCCACHE_VERSION%-x86_64-pc-windows-msvc

echo Current build setup CC="%CC%" PLATFORM="%PLATFORM%" TARGET="%TARGET%"

if %CC% == VC2019 call "%ProgramFiles(x86)%\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvarsall.bat" %PLATFORM%
if %CC% == VC2019p call "%ProgramFiles(x86)%\Microsoft Visual Studio\2019\Preview\VC\Auxiliary\Build\vcvarsall.bat" %PLATFORM%
if %CC% == MinGW set PATH=%PATH%;C:\msys64\mingw64\bin

rem check compiler version
if %CC% == MinGW (
   g++ -v
) else (
   cl
)

appveyor DownloadFile https://github.com/mozilla/sccache/releases/download/%SCCACHE_VERSION%/sccache-%SCCACHE_VERSION%-x86_64-pc-windows-msvc.tar.gz
tar -xf sccache-%SCCACHE_VERSION%-x86_64-pc-windows-msvc.tar.gz

appveyor DownloadFile http://download.qt.io/official_releases/jom/jom.zip -FileName jom.zip
7z e jom.zip

set PATH=%PATH%;sccache-%SCCACHE_VERSION%-x86_64-pc-windows-msvc

Use an if/else in the batch script

Use an if/else in the batch script


cd ..
set "destination=testcoverage"

rmdir /q /s %destination%
mkdir %destination%
cd content/tests
dotnet test /p:AltCover=true
mv coverage.xml ../../%destination%/coverage.xml

cd ../../%destination%

set "reportgenerator=%UserProfile%\.nuget\packages\reportgenerator\4.0.7\tools\net47\ReportGenerator.exe"
set "targetdir=."

"%reportGenerator%" -reports:coverage.xml -reporttypes:HtmlInline -targetdir:%targetdir%

cd ..
set "destination=testcoverage"

rmdir /q /s %destination%
mkdir %destination%
cd content/tests
dotnet test /p:AltCover=true
mv coverage.xml ../../%destination%/coverage.xml

cd ../../%destination%

set "reportgenerator=%UserProfile%\.nuget\packages\reportgenerator\4.0.11\tools\net47\ReportGenerator.exe"
set "targetdir=."

"%reportGenerator%" -reports:coverage.xml -reporttypes:HtmlInline -targetdir:%targetdir%

Update to tools for reportgenerator

Update to tools for reportgenerator


@echo off
pushd "%~dp0"
call build && dotnet test --no-restore --no-build NCrontab.Tests
popd

@echo off
pushd "%~dp0"
call build ^
  && call :test Debug ^
  && call :test Release ^
popd
goto :EOF

:test
dotnet test --no-restore --no-build -c %1 NCrontab.Tests
goto :EOF

Test debug & release configs

Test debug & release configs


PATH=C:\python26;C:\progra~2\7-zip;%PATH%
del /q /s dist\*.*
python setup.py py2exe
cd dist
7z d library.zip jinja2\* dns\* 'graphy\*
7z a namebench_for_Windows.zip -r *
namebench -x -O 8.8.8.8 -t5 -o test.html
start test.html

cd ..

Add release tool for windows

Add release tool for windows


.nuget\NuGet.exe push src\DelegateDecompiler\bin\Release\*.nupkg -ApiKey %1

for /r %%x in (src\DelegateDecompiler\bin\Release\*.nupkg) do .nuget\NuGet.exe push %%x -ApiKey %1

Update push script to push packages separately


FOR /F "tokens=*" %%G IN ('DIR /B /AD /S bin') DO RMDIR /S /Q "%%G"
FOR /F "tokens=*" %%G IN ('DIR /B /AD /S obj') DO RMDIR /S /Q "%%G"
FOR /F "tokens=*" %%G IN ('DIR /B /AD /S node_modules') DO RMDIR /S /Q "%%G"
FOR /F "tokens=*" %%G IN ('DIR /B /AD /S Packages') DO RMDIR /S /Q "%%G"
FOR /F "tokens=*" %%G IN ('DIR /B /AD /S .vs') DO RMDIR /S /Q "%%G"
FOR /F "tokens=*" %%G IN ('DIR /B /AD /S TestResults') DO RMDIR /S /Q "%%G"
DEL /Q /F /S "Resource.designer.cs"
DEL /Q /F /S "*.csproj.user"
DEL /Q /F /S "*.Model.Context.d.ts"
DEL /Q /F /S "*.Model.Context.js"

FOR /F "tokens=*" %%G IN ('DIR /B /AD /S bin') DO RMDIR /S /Q "%%G"
FOR /F "tokens=*" %%G IN ('DIR /B /AD /S obj') DO RMDIR /S /Q "%%G"
FOR /F "tokens=*" %%G IN ('DIR /B /AD /S node_modules') DO RMDIR /S /Q "%%G"
FOR /F "tokens=*" %%G IN ('DIR /B /AD /S Packages') DO RMDIR /S /Q "%%G"
FOR /F "tokens=*" %%G IN ('DIR /B /AD /S .vs') DO RMDIR /S /Q "%%G"
FOR /F "tokens=*" %%G IN ('DIR /B /AD /S TestResults') DO RMDIR /S /Q "%%G"
FOR /F "tokens=*" %%G IN ('DIR /B /AD /S AppPackages') DO RMDIR /S /Q "%%G"
DEL /Q /F /S "Resource.designer.cs"
DEL /Q /F /S "*.csproj.user"
DEL /Q /F /S "*.Model.Context.d.ts"
DEL /Q /F /S "*.Model.Context.js"

Delete uwp app packages too!

Delete uwp app packages too!


rem Tool to assemble Windows builds
rem Requirements are 7-zip, py2exe, and FreeExtractor

PATH=C:\python27;C:\python26;C:\progra~1\7-zip;C:\progra~2\7-zip;%PATH%

rem ****** Clean out the old junk
rmdir /q /s dist\*.*
del /s /q dist\*.*

rem ****** Compile our executable and core zipfile
python setup.py py2exe

rem ****** Remove extras from core zipfile
cd dist
7z d namebench.zip tcl\*.*
rmdir /s /q tcl\tcl8.5\tzdata tcl\tk8.5\demos
del tcl\tk8.5\images\*.eps

rem ****** Final assembly of zipfile
copy ..\README.txt .
7z a namebench_for_Windows.zip -r * >nul

rem ****** Test assembled zipfile
namebench -x -O 8.8.8.8 -q5 -o test.html
start test.html

cd ..

rem Tool to assemble Windows builds
rem Requirements are 7-zip, py2exe, and FreeExtractor

PATH=C:\python27;C:\python26;C:\progra~1\7-zip;C:\progra~2\7-zip;%PATH%

rem ****** Clean out the old junk
del /s /f /q dist

rem ****** Compile our executable and core zipfile
python setup.py py2exe

rem ****** Remove extras from core zipfile
cd dist
7z d namebench.zip tcl\*.*
rmdir /s /q tcl\tcl8.5\tzdata tcl\tk8.5\demos
del tcl\tk8.5\images\*.eps

rem ****** Final assembly of zipfile
copy ..\README.txt .
7z a namebench_for_Windows.zip -r * >nul

rem ****** Test assembled zipfile
namebench -x -O 8.8.8.8 -q5 -o test.html
start test.html

cd ..

Remove wildcard from del statement

Remove wildcard from del statement


@ECHO OFF
PUSHD %~DP0
SET CURDIR=%CD%
PUSHD ..
SET TOPDIR=%CD%
POPD
POPD

SET GDAL_ROOT=%TOPDIR%\bin\gdal
rem SET GDAL_PAM_PROXY_DIR=%TEMP%
SET GDAL_DATA=%GDAL_ROOT%\share\gdal-data
SET GEOTIFF_CSV=%GDAL_DATA%
SET PROJ_LIB=%GDAL_ROOT%\share\proj
SET GDAL_DRIVER_PATH=%GDAL_ROOT%\bin\plugins

SET PYTHONHOME=%TOPDIR%\bin\Python26
SET PYTHONPATH=%PYTHONHOME%\Lib\lib-tk
SET PYTHONPATH=%PYTHONHOME%\Lib\site-packages\pywin32_system32;%PYTHONHOME%\Lib\site-packages\win32;%PYTHONHOME%\Lib\site-packages\win32\lib;%PYTHONHOME%\Lib\site-packages\pythonwin;%PYTHONPATH%
SET PYTHONPATH=%GDAL_ROOT%\bin;%GDAL_ROOT%\lib;%PYTHONPATH%
SET PYTHONPATH=%CURDIR%;%PYTHONPATH%

PATH=%GDAL_ROOT%\bin;%PATH%
PATH=%GDAL_ROOT%\bin\gdal\apps;%PATH%
PATH=%GDAL_DRIVER_PATH%;%PATH%
PATH=%PYTHONPATH%;%PATH%
PATH=%PYTHONHOME%;%PATH%
PATH=%CURDIR%;%PATH%

@ECHO OFF
PUSHD %~DP0
SET CURDIR=%CD%
PUSHD ..
SET TOPDIR=%CD%
POPD
POPD

SET GDAL_ROOT=%TOPDIR%\bin\gdal
rem SET GDAL_PAM_PROXY_DIR=%TEMP%
SET GDAL_DATA=%GDAL_ROOT%\share\gdal-data
SET GEOTIFF_CSV=%GDAL_DATA%
SET PROJ_LIB=%GDAL_ROOT%\share\proj
SET GDAL_DRIVER_PATH=%GDAL_ROOT%\bin\plugins

SET PYTHONHOME=%TOPDIR%\bin\Python26
SET PYTHONPATH=%PYTHONHOME%\Lib\lib-tk
SET PYTHONPATH=%PYTHONHOME%\Lib\site-packages\pywin32_system32;%PYTHONHOME%\Lib\site-packages\win32;%PYTHONHOME%\Lib\site-packages\win32\lib;%PYTHONHOME%\Lib\site-packages\pythonwin;%PYTHONPATH%
SET PYTHONPATH=%GDAL_ROOT%\bin;%GDAL_ROOT%\lib;%PYTHONPATH%
SET PYTHONPATH=%CURDIR%;%PYTHONPATH%

set path=
set path=%WINDIR%;%WINDIR%\system32
PATH=%GDAL_ROOT%\bin;%PATH%
PATH=%GDAL_ROOT%\bin\gdal\apps;%PATH%
PATH=%GDAL_DRIVER_PATH%;%PATH%
PATH=%PYTHONPATH%;%PATH%
PATH=%PYTHONHOME%;%PATH%
PATH=%CURDIR%;%PATH%

Clean out the PAHT env var to hopefully avoid more missing/extra dependencies


Add release tool for windows

Add release tool for windows


rem CI script

rem Install Bazel using Choco
echo "Installing/updating bazel"
choco install bazel -y

rem Use placeholder secret file
mkdir data\
echo '
    {"installed":{"client_id":"PLACEHOLDER.apps.googleusercontent.com","project_id":"PLACEHOLDER","auth_uri":"https://accounts.google.com/o/oauth2/auth","token_uri":"https://oauth2.googleapis.com/token","auth_provider_x509_cert_url":"https://www.googleapis.com/oauth2/v1/certs","client_secret":"PLACEHOLDER","redirect_uris":["urn:ietf:wg:oauth:2.0:oob","http://localhost"]}}
' > data\client_not_so_secret.json

rem Ensure that our code builds
bazel build gactions
rem Print version
bazel run gactions -- version

rem Run all tests
bazel test ...

Add equivalent script for Windows execute/test

Bug: 174267320
Change-Id: Ie3ca4521418c9a7a653a20cd55b2f904524bf616


set CONDA_PREFIX=%PREFIX%
if errorlevel 1 exit 1

cmake -B build -S "%SRC_DIR%" ^
	-G Ninja ^
    -DCMAKE_BUILD_TYPE=Release ^
    -DPython3_FIND_STRATEGY=LOCATION ^
    -DPython3_ROOT_DIR=%CONDA_PREFIX% ^
    -DCMAKE_LINKER=lld-link.exe
if errorlevel 1 exit 1

cmake --build build -j %CPU_COUNT% -- -v -k 0
if errorlevel 1 exit 1

if not exist "%SP_DIR%" mkdir "%SP_DIR%"
if errorlevel 1 exit 1

copy build/OCP.cp*-*.* "%SP_DIR%"
if errorlevel 1 exit 1

set CONDA_PREFIX=%PREFIX%
if errorlevel 1 exit 1

cmake -B build -S "%SRC_DIR%" ^
	-G Ninja ^
    -DCMAKE_BUILD_TYPE=Release ^
    -DPython3_FIND_STRATEGY=LOCATION ^
    -DPython3_ROOT_DIR=%CONDA_PREFIX% ^
    -DCMAKE_LINKER=lld-link.exe ^
    -DCMAKE_MODULE_LINKER_FLAGS="/FORCE:MULTIPLE"
if errorlevel 1 exit 1

cmake --build build -j %CPU_COUNT% -- -v -k 0
if errorlevel 1 exit 1

if not exist "%SP_DIR%" mkdir "%SP_DIR%"
if errorlevel 1 exit 1

copy build/OCP.cp*-*.* "%SP_DIR%"
if errorlevel 1 exit 1

Add /FORCE:MULTIPLE to Windows linker flags


@echo off
setlocal

set _projectName=CommandLine
set _solution=%_projectName%.sln
set _codeProject=src\%_projectName%.csproj
set _analyzerProject=analyzer\%_projectName%.Analyzer\%_projectName%.Analyzer.csproj
set _testProject=test\%_projectName%.tests.csproj

set _config=%1
if not defined _config (
  set _config=Debug
)

echo Building Config '%_config%'
echo Solution: '%_solution%'
echo Code: '%_codeProject%'
echo Analyzer: '%_analyzerProject%'
echo Test: '%_testProject%'

echo --------------------------
echo !!! Restoring packages !!!
echo --------------------------
dotnet restore

echo -------------------------
echo !!! Cleaning solution !!!
echo -------------------------
dotnet clean %_solution%

echo -------------------------
echo !!! Building solution !!!
echo -------------------------
dotnet build %_solution% -c %_config%

echo -------------------------
echo !!! Building analyzer !!!
echo -------------------------
dotnet build %_analyzerProject% -c %_config%

echo ---------------------
echo !!! Running tests !!!
echo ---------------------
dotnet test --no-build -c %_config% %_testProject%

if not "%_config%" == "Release" (
	echo =======================================================
	echo Skipping over package creation as not building Release
	echo =======================================================
	goto :eof
)

echo ------------------------------
echo !!! Creating NuGet package !!!
echo ------------------------------
dotnet pack --no-build -c %_config% %_codeProject%

endlocal
@echo on

@echo off
setlocal

set _projectName=CommandLine
set _solution=%_projectName%.sln
set _codeProject=src\%_projectName%.csproj
set _analyzerProject=analyzer\%_projectName%.Analyzer\%_projectName%.Analyzer.csproj
set _testProject=test\%_projectName%.tests.csproj

set _config=%1
if not defined _config (
  set _config=Debug
)

echo Building Config '%_config%'
echo Solution: '%_solution%'
echo Code: '%_codeProject%'
echo Analyzer: '%_analyzerProject%'
echo Test: '%_testProject%'

echo --------------------------
echo !!! Restoring packages !!!
echo --------------------------
dotnet restore

echo -------------------------
echo !!! Cleaning solution !!!
echo -------------------------
dotnet clean %_solution%

echo -------------------------
echo !!! Building solution !!!
echo -------------------------
dotnet build %_solution% -c %_config%

echo -------------------------
echo !!! Building analyzer !!!
echo -------------------------
dotnet build %_analyzerProject% -c %_config%

echo ---------------------
echo !!! Running tests !!!
echo ---------------------
dotnet test --no-build -c %_config% %_testProject%

if not "%_config%" == "Release" (
	echo =======================================================
	echo Skipping over package creation as not building Release
	echo =======================================================
	goto :eof
)

echo ------------------------------
echo !!! Creating NuGet package !!!
echo ------------------------------
dotnet pack --no-build -c %_config% %_codeProject% -o ..\bin\package

endlocal
@echo on

Make sure the package is created in the bin folder.


@echo off
pushd "%~dp0"
for %%i in (Debug Release) do "%SystemRoot%\Microsoft.NET\Framework\v4.0.30319\msbuild" /target:Clean /p:Configuration=%%i src\NCrontab.sln
popd

Clean script can simply delegate to build script


SET "JAVA_HOME=C:\opt\jdk-8"
cd git-repo
./mvnw clean install -X

Stop using debug flag for Windows build

Stop using debug flag for Windows build


@echo on

set config=%1
if "%config%" == "" (
    set config=Release
)

set version=1.0.0
if not "%PackageVersion%" == "" (
    set version=%PackageVersion%
)
if not "%GitVersion.ClassicVersion%" == "" (
    REM override version number with the one provided by git
    set version=%GitVersion.ClassicVersion%
	echo Version set to %version%
    REM patch assemblyinfo with this version number
    REM call %GitVersion% /updateAssemblyInfo "properties\assemblyinfo.cs"
    call %GitVersion% /output buildserver /updateAssemblyInfo true
)

REM AssemblyInfoUtil.exe -set:%version% "C:\Program Files\MyProject1\AssemblyInfo.cs"

set nuget=
if "%nuget%" == "" (
     set nuget=nuget
)

REM ;AssemblyVersion="%version%";AssemblyFileVersion="%version%"
%WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild ManagedWifi.msbuild /p:Configuration="%config%";VersionNumber=%version% /m /v:M /fl /flp:LogFile=msbuild.log;Verbosity=diag /nr:false

mkdir Build
mkdir Build\lib
mkdir Build\lib\net20

%nuget% pack "ManagedWifi.nuspec" -NoPackageAnalysis -verbosity detailed -o Build -Version %version% -p Configuration="%config%"

@echo on

set config=%1
if "%config%" == "" (
    set config=Release
)

set version=1.0.0
if not "%PackageVersion%" == "" (
    set version=%PackageVersion%
)
if not "%GitVersion.ClassicVersion%" == "" (
    REM override version number with the one provided by git
    set version=%GitVersion.ClassicVersion%
	echo Version set to %version%
    REM patch assemblyinfo with this version number
    REM call %GitVersion% /updateAssemblyInfo "properties\assemblyinfo.cs"
    call %GitVersion% /output buildserver /updateAssemblyInfo true
)

REM AssemblyInfoUtil.exe -set:%version% "C:\Program Files\MyProject1\AssemblyInfo.cs"

set nuget=
if "%nuget%" == "" (
     set nuget=nuget
)

REM ;AssemblyVersion="%version%";AssemblyFileVersion="%version%"
%WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild ManagedWifi.msbuild /p:Configuration="%config%";VersionNumber=%version% /m /v:M /clp:Verbosity=diag /nr:false

mkdir Build
mkdir Build\lib
mkdir Build\lib\net20

%nuget% pack "ManagedWifi.nuspec" -NoPackageAnalysis -verbosity detailed -o Build -Version %version% -p Configuration="%config%"

Build script now logs to console

Build script now logs to console


@echo off
cd %~dp0

SETLOCAL ENABLEEXTENSIONS
SET CACHED_NUGET=%LocalAppData%\NuGet\NuGet.exe

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

:copynuget
IF EXIST .nuget\nuget.exe goto restore
md .nuget
copy %CACHED_NUGET% .nuget\nuget.exe > nul

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

IF "%SKIP_KRE_INSTALL%"=="1" goto run
CALL packages\KoreBuild\build\kvm upgrade -runtime CLR -x86
CALL packages\KoreBuild\build\kvm install default -runtime CoreCLR -x86

:run
CALL packages\KoreBuild\build\kvm use default -runtime CLR -x86
CALL packages\KoreBuild\build\kpm restore
CALL packages\KoreBuild\build\kvm build

:end
exit /b %ERRORLEVEL%

@echo off
cd %~dp0

SETLOCAL ENABLEEXTENSIONS
SET CACHED_NUGET=%LocalAppData%\NuGet\NuGet.exe

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

:copynuget
IF EXIST .nuget\nuget.exe goto restore
md .nuget
copy %CACHED_NUGET% .nuget\nuget.exe > nul

:restore
IF EXIST packages\KoreBuild goto run
.nuget\NuGet.exe install KoreBuild -ExcludeVersion -o packages -nocache -pre -Source https://www.myget.org/F/aspnetvnext/api/v2
.nuget\NuGet.exe install Sake -version 0.2 -o packages -ExcludeVersion

IF "%SKIP_KRE_INSTALL%"=="1" goto run
CALL packages\KoreBuild\build\kvm upgrade -runtime CLR -x86
CALL packages\KoreBuild\build\kvm install default -runtime CoreCLR -x86

:run
CALL packages\KoreBuild\build\kvm use default -runtime CLR -x86
CALL packages\KoreBuild\build\kpm restore
CALL packages\KoreBuild\build\kvm build

:end
exit /b %ERRORLEVEL%

Use myget feed to download KoreBuild package


@ECHO OFF

SETLOCAL

SET CACHED_NUGET=%LocalAppData%\NuGet\NuGet.exe
SET SOLUTION_PATH=%~dp0src\CodeFormatter.sln
SET BUILD_TOOLS_PATH="%ProgramFiles(x86)%\MSBuild\14.0\bin\MSBuild.exe"

IF NOT EXIST %BUILD_TOOLS_PATH% (
  echo In order to build or run this tool you need either Visual Studio 2015 Preview or
  echo Microsoft Build Tools 2015 Preview tools installed.
  echo.
  echo Visit http://www.visualstudio.com/en-us/downloads/visual-studio-2015-downloads-vs
  echo to download either.
  goto :eof
)

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

:restore
IF EXIST "%~dp0src\packages" goto build
%CACHED_NUGET% restore %SOLUTION_PATH%

:build

%BUILD_TOOLS_PATH% %SOLUTION_PATH% /p:OutDir="%~dp0bin " /nologo /m /v:m /flp:verbosity=normal %*

@ECHO OFF

SETLOCAL

SET CACHED_NUGET=%LocalAppData%\NuGet\NuGet.exe
SET SOLUTION_PATH=%~dp0src\CodeFormatter.sln
SET BUILD_TOOLS_PATH="%ProgramFiles(x86)%\MSBuild\14.0\bin\MSBuild.exe"

IF NOT EXIST %BUILD_TOOLS_PATH% (
  echo In order to build or run this tool you need either Visual Studio 2015 or
  echo Microsoft Build Tools 2015 tools installed.
  echo.
  echo Visit http://www.visualstudio.com/en-us/downloads/visual-studio-2015-downloads-vs
  echo to download either.
  goto :eof
)

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

:restore
IF EXIST "%~dp0src\packages" goto build
%CACHED_NUGET% restore %SOLUTION_PATH%

:build

%BUILD_TOOLS_PATH% %SOLUTION_PATH% /p:OutDir="%~dp0bin " /nologo /m /v:m /flp:verbosity=normal %*

Remove 'Preview' qualifier from VS and MSBuild

Firstly, they don't add much and secondly, we'll have to remove them
eventually anyways.


@echo Off
set config=%1
if "%config%" == "" (
   set config=debug
)

.nuget\NuGet.exe restore JabbR.sln -configFile %~dp0\.nuget\NuGet.config -nocache
msbuild %~dp0\Build\Build.proj /p:Configuration="%config%" /v:M /fl /flp:LogFile=msbuild.log;Verbosity=Normal /nr:false /p:VisualStudioVersion=11.0

Remove the vs version flag.

Remove the vs version flag.


PATH=C:\python26;C:\progra~2\7-zip;%PATH%
del /q /s dist\*.*
python setup.py py2exe
cd dist
7z d library.zip jinja2\* dns\* 'graphy\*
7z a namebench_for_Windows.zip -r *
namebench -x -O 8.8.8.8 -t5 -o test.html
start test.html

cd ..

PATH=C:\python26;C:\progra~2\7-zip;%PATH%
del /q /s dist\*.*
python setup.py py2exe
cd dist
7z d library.zip jinja2\* dns\* 'graphy\*
del /s w9xpopen.exe
copy ..\README.txt .
7z a namebench_for_Windows.zip -r *
namebench -x -O 8.8.8.8 -t5 -o test.html
start test.html

cd ..

Remove w9xopen.exe and add README.txt to Windows build


@echo off
NuGet.exe install MSBuildTasks -OutputDirectory .\Tools\ -ExcludeVersion -NonInteractive
NuGet.exe install NUnit.Runners -OutputDirectory .\Tools\ -ExcludeVersion -NonInteractive
NuGet.exe install Wix.Toolset -OutputDirectory .\Tools\ -ExcludeVersion -NonInteractive

@echo off
NuGet.exe install MSBuildTasks -OutputDirectory .\Tools\ -ExcludeVersion -NonInteractive
NuGet.exe install NUnit.Runners -OutputDirectory .\Tools\ -ExcludeVersion -NonInteractive -Version 2.6.4
NuGet.exe install Wix.Toolset -OutputDirectory .\Tools\ -ExcludeVersion -NonInteractive

Set nuget version to use as 2.6.4

[nunit] Set nuget version to use as 2.6.4


set NPCAP_OEM_FILE=npcap-0.9988-oem.exe
curl --digest --user %NPCAP_USERNAME%:%NPCAP_PASSWORD% https://nmap.org/npcap/oem/dist/%NPCAP_OEM_FILE% --output %NPCAP_OEM_FILE%
%NPCAP_OEM_FILE% /S /winpcap_mode
xcopy C:\Windows\System32\Npcap\*.dll C:\Windows\System32
xcopy C:\Windows\SysWOW64\Npcap\*.dll C:\Windows\SysWOW64
appveyor DownloadFile https://nmap.org/npcap/dist/npcap-sdk-1.04.zip
mkdir C:\Npcap-sdk
7z x .\npcap-sdk-1.04.zip -oC:\Npcap-sdk

set NPCAP_OEM_FILE=npcap-0.9988-oem.exe
curl --digest --user %NPCAP_USERNAME%:%NPCAP_PASSWORD% https://nmap.org/npcap/oem/dist/%NPCAP_OEM_FILE% --output %NPCAP_OEM_FILE%
%NPCAP_OEM_FILE% /S /winpcap_mode
appveyor DownloadFile https://nmap.org/npcap/dist/npcap-sdk-1.04.zip
mkdir C:\Npcap-sdk
7z x .\npcap-sdk-1.04.zip -oC:\Npcap-sdk

Remove xcopy from Npcap install script

Remove xcopy from Npcap install script


setenv bootargs "console=ttyO2,115200n8 mpurate=500 vram=12M omapdss.def_disp=lcd43 root=/dev/mmcblk0p2 rw rootfstype=ext3 rootwait"
setenv loadaddr 0x82000000
fatload mmc 0 ${loadaddr} uImage
bootm ${loadaddr}

Add boot script source for lcd43 system

Add boot script source for lcd43 system


@ECHO OFF

REM
REM Converts the Reach KBs into the format expected by BioNLPProcessor
REM Re-run this script whenever a Reach KB changes
REM To avoid rugenerating *all* KBs edit the ner_kb.config file and keep only the modified KBs
REM

cd ../reach

REM generate the NER KBs here
sbt "runMain org.clulab.processors.bionlp.ner.KBGenerator ../bioresources/ner_kb.config ../bioresources/src/main/resources/org/clulab/reach/kb/ ../bioresources/src/main/resources/org/clulab/reach/kb/ner"

REM generate the serialized LexiconNER model now
sbt "runMain org.clulab.processors.bionlp.ner.KBLoader ../bioresources/src/main/resources/org/clulab/reach/kb/ner/model.ser.gz"

cd ../bioresources

Add Windows version of script

Add Windows version of script


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

title Setting folder options. Please wait...

echo ==^> Setting folder options
echo ==^> Show file extensions
:: Default is 1 - hide file extensions
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /f /v HideFileExt /t REG_DWORD /d 0
echo ==^> Show hidden files and folders
:: Default is 2 - do not show hidden files and folders
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /f /v Hidden /t REG_DWORD /d 1
echo ==^> Display Full path
:: Default FullPath 0 and FullPathAddress 0
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /f /v FullPath /t REG_DWORD /d 1
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /f /v FullPathAddress /t REG_DWORD /d 1

:exit0
ver>nul
goto :exit

:exit1
verify other 2>nul

:exit

Add script to set folder options

Add script to set folder options


setlocal EnableDelayedExpansion

mkdir build
cd build

cmake -G "NMake Makefiles" ^
      -DCMAKE_INSTALL_PREFIX:PATH="%LIBRARY_PREFIX%" ^
      -DCMAKE_PREFIX_PATH:PATH="%LIBRARY_PREFIX%" ^
      -DCMAKE_BUILD_TYPE:STRING=Release ^
      -DCMAKE_LIBRARY_PATH:PATH="%LIBRARY_PREFIX%;%LIBRARY_PREFIX%/bin" ^
      ..
if errorlevel 1 exit 1

nmake
if errorlevel 1 exit 1

setlocal EnableDelayedExpansion

mkdir build
cd build

cmake -G "NMake Makefiles" ^
      -DCMAKE_INSTALL_PREFIX:PATH="%LIBRARY_PREFIX%" ^
      -DCMAKE_PREFIX_PATH:PATH="%LIBRARY_PREFIX%" ^
      -DCMAKE_BUILD_TYPE:STRING=Release ^
      -DCMAKE_LIBRARY_PATH:PATH="%LIBRARY_PREFIX%;%LIBRARY_PREFIX%/bin" ^
      -DBUILD_SHARED_LIBS:BOOL=ON ^
      ..

if errorlevel 1 exit 1

nmake
if errorlevel 1 exit 1

Build shared library on Windows

Build shared library on Windows


@echo off
setlocal enabledelayedexpansion

pushd %1

set attempts=5
set counter=0

:retry
set /a counter+=1
echo Attempt %counter% out of %attempts%

cmd /c npm install https://github.com/projectkudu/KuduScript/tarball/da0885fc7a8a2facba79a8b5ca818ed6a730d856
IF %ERRORLEVEL% NEQ 0 goto error

goto end

:error
if %counter% GEQ %attempts% goto :lastError
goto retry

:lastError
popd
echo An error has occured during npm install.
exit /b 1

:end
popd
echo Finished successfully.
exit /b 0

@echo off
setlocal enabledelayedexpansion

pushd %1

set attempts=5
set counter=0

:retry
set /a counter+=1
echo Attempt %counter% out of %attempts%

cmd /c npm install https://github.com/projectkudu/KuduScript/tarball/eddc60f7017a05a02bd9b19b3162ce58a10de81a
IF %ERRORLEVEL% NEQ 0 goto error

goto end

:error
if %counter% GEQ %attempts% goto :lastError
goto retry

:lastError
popd
echo An error has occured during npm install.
exit /b 1

:end
popd
echo Finished successfully.
exit /b 0

Update kuduscript to latest for adding python support


:: %~dp0 gives the dirname of the script

cmd /c %~dp0firewall-disable.bat
cmd /c %~dp0vagrant-ssh.bat

:: %~dp0 gives the dirname of the script

cmd /c %~dp0firewall-disable.bat
cmd /c %~dp0install-cygwin-sshd.bat

Fix path to install cygwin.

Fix path to install cygwin.


@ECHO OFF

WHERE /Q nuget >NUL
IF %ERRORLEVEL% NEQ 0 (
    ECHO nuget not found.
    ECHO.
    ECHO Run "%~pd0download-nuget.cmd" to download the latest version, or update PATH as appropriate.
    GOTO END
)

nuget pack %~dp0WindowsCanvas.nuspec -nopackageanalysis -outputdirectory %~dp0..\..\bin %*
nuget pack %~dp0WindowsCanvas-debug.nuspec -nopackageanalysis -outputdirectory %~dp0..\..\bin %*

:END

@ECHO OFF

PUSHD %~dp0

WHERE /Q nuget >NUL
IF %ERRORLEVEL% NEQ 0 (
    ECHO nuget not found.
    ECHO.
    ECHO Run "%~pd0download-nuget.cmd" to download the latest version, or update PATH as appropriate.
    GOTO END
)

nuget pack %~dp0WindowsCanvas.nuspec -nopackageanalysis -outputdirectory %~dp0..\..\bin %*
nuget pack %~dp0WindowsCanvas-debug.nuspec -nopackageanalysis -outputdirectory %~dp0..\..\bin %*

:END

POPD

Fix build script to also work when nuget.exe isn't in the path


@setlocal ENABLEDELAYEDEXPANSION
@set jsonlines=0
@for /R %devroot%\%projectname%\bin\%abi%\ %%a IN (lvp_icd.*.json) do @for /f tokens^=^*^ delims^= %%b IN (%%a) do @(
@set /a jsonlines+=1
@IF !jsonlines! NEQ 4 set jsonline[!jsonlines!]=%%b
@IF !jsonlines! EQU 4 set jsonline[!jsonlines!]=        "library_path": "vulkan_lvp.dll"
)
@for /R %devroot%\%projectname%\bin\%abi%\ %%a IN (lvp_icd.*.json) do @(
@del %%a
@for /L %%b IN (1,1,%jsonlines%) do @echo !jsonline[%%b]!>>%%a
)

@setlocal ENABLEDELAYEDEXPANSION
@set jsonlines=0
@for /R %devroot%\%projectname%\bin\%abi%\ %%a IN (lvp_icd.*.json) do @for /f tokens^=^*^ delims^= %%b IN (%%a) do @(
@set /a jsonlines+=1
@IF !jsonlines! NEQ 4 set jsonline[!jsonlines!]=%%b
@IF !jsonlines! EQU 4 set jsonline[!jsonlines!]=        "library_path": ".^\^\vulkan_lvp.dll"
)
@for /R %devroot%\%projectname%\bin\%abi%\ %%a IN (lvp_icd.*.json) do @(
@del %%a
@for /L %%b IN (1,1,%jsonlines%) do @echo !jsonline[%%b]!>>%%a
)

Fix lavapipe JSON patcher. Fixes 0a775146


@echo off
rem To sign the Windows installer, set the `SIGN_WINDOWS_INSTALLER=true` environment variable.
rem This will download the Kolibri Windows installer artifact at the windows-2016 Buildkite agent.
rem After the installer successfully sign it will upload the installer at the Sign Windows Installer pipeline artifact.

IF NOT "%SIGN_WINDOWS_INSTALLER%" == "true" (GOTO DONT_SIGN)

set current_path=%cd%
buildkite-agent.exe artifact download "installer/*.exe" . --step "Build kolibri windows installer" --build %BUILDKITE_BUILD_ID% --agent-access-token %BUILDKITE_AGENT_ACCESS_TOKEN%
%WINDOWS_SIGN_SCRIPT_PATH% "%current_path%\installer" && cd "%current_path%\installer\" && ren *.exe *-signed.exe && buildkite-agent.exe artifact upload "*.exe"
GOTO END

:DONT_SIGN
echo Set the SIGN_WINDOWS_INSTALLER=true environment variable to sign the Windows installer.

:END

@echo off
rem To sign the Windows installer, set the `SIGN_WINDOWS_INSTALLER=true` environment variable.
rem This will download the Kolibri Windows installer artifact at the windows-2016 Buildkite agent.
rem After the installer successfully sign it will upload the installer at the Sign Windows Installer pipeline artifact.

IF NOT "%SIGN_WINDOWS_INSTALLER%" == "true" (GOTO DONT_SIGN)

set current_path=%cd%
buildkite-agent.exe artifact download "installer/*.exe" . --step "Build kolibri windows installer" --build %BUILDKITE_BUILD_ID% --agent-access-token %BUILDKITE_AGENT_ACCESS_TOKEN%
%WINDOWS_SIGN_SCRIPT_PATH% "%current_path%\installer" && cd "%current_path%\installer\" && ren *.exe *.-signed.exe && buildkite-agent.exe artifact upload "*.exe"
GOTO END

:DONT_SIGN
echo Set the SIGN_WINDOWS_INSTALLER=true environment variable to sign the Windows installer.

:END

Add period to the signed name.

Add period to the signed name.


mkdir build
cd build

REM TODO: can not find tkint.h -> disabling GUI for WIN

cmake .. -G "Ninja" ^
    -DCMAKE_BUILD_TYPE="Release" ^
    -DINSTALL_DIR_LAYOUT="Unix" ^
    -DCMAKE_PREFIX_PATH:FILEPATH="%PREFIX%" ^
    -DCMAKE_INSTALL_PREFIX:FILEPATH="%LIBRARY_PREFIX%" ^
    -DNG_INSTALL_DIR_INCLUDE:FILEPATHE="%LIBRARY_PREFIX%/include/netgen" ^
    -DINSTALL_DIR:FILEPATH:FILEPATH="%LIBRARY_PREFIX%" ^
    -DOCC_INCLUDE_DIR:FILEPATH="%LIBRARY_PREFIX%/include/opencascade" ^
    -DOCC_LIBRARY_DIR:FILEPATH="%LIBRARY_PREFIX%/lib" ^
    -DUSE_OCC=ON ^
    -DUSE_PYTHON=ON ^
    -DUSE_GUI=OFF ^
    -DUSE_SUPERBUILD=OFF

if errorlevel 1 exit 1
ninja install
if errorlevel 1 exit 1

mkdir build
cd build

REM TODO: can not find tkint.h -> disabling GUI for WIN

cmake .. -G "Ninja" ^
    -DCMAKE_BUILD_TYPE="Release" ^
    -DINSTALL_DIR_LAYOUT="Unix" ^
    -DCMAKE_PREFIX_PATH:FILEPATH="%PREFIX%" ^
    -DCMAKE_INSTALL_PREFIX:FILEPATH="%LIBRARY_PREFIX%" ^
    -DNG_INSTALL_DIR_INCLUDE:FILEPATHE="%LIBRARY_PREFIX%/include/netgen" ^
    -DOCC_INCLUDE_DIR:FILEPATH="%LIBRARY_PREFIX%/include/opencascade" ^
    -DOCC_LIBRARY_DIR:FILEPATH="%LIBRARY_PREFIX%/lib" ^
    -DUSE_OCC=ON ^
    -DUSE_PYTHON=ON ^
    -DUSE_GUI=OFF ^
    -DUSE_SUPERBUILD=OFF

if errorlevel 1 exit 1
ninja install
if errorlevel 1 exit 1

Remove unnecessary cmake flag INSTALL_DIR


FOR /F "tokens=*" %%G IN ('DIR /B /AD /S org.*') DO RMDIR /S /Q %%G
java -ea -Dosgi.classloader.singleThreadLoads=true -XX:+UseCompressedOops -XX:+CMSClassUnloadingEnabled -XX:+UseParallelGC -Xmx92m -jar plugins\org.eclipse.equinox.launcher.jar  %*

FOR /F "tokens=*" %%G IN ('DIR /B /AD /S org.*') DO RMDIR /S /Q %%G
java -ea -Dosgi.classloader.singleThreadLoads=true -XX:+CMSClassUnloadingEnabled -XX:+UseParallelGC -Xmx92m -jar plugins\org.eclipse.equinox.launcher.jar  %*

Remove compressed pointer flag for now.

Remove compressed pointer flag for now.


SET "JAVA_HOME=C:\opt\jdk-8"
SET PATH=%PATH%;C:\Program Files\Git\usr\bin
cd git-repo
.\gradlew -Dorg.gradle.internal.launcher.welcomeMessageEnabled=false --no-daemon --max-workers=4 build

SET "JAVA_HOME=C:\opt\jdk-17"
SET PATH=%PATH%;C:\Program Files\Git\usr\bin
cd git-repo
.\gradlew -Dorg.gradle.internal.launcher.welcomeMessageEnabled=false --no-daemon --max-workers=4 build

Use Java 17 for Windows CI build

Use Java 17 for Windows CI build

See gh-28101


@ECHO OFF
IF %1.==. GOTO No1
set CONFIG=%1

REM set debug parameters
REM set DEBUG_OPTS="-Xdebug -Xrunjdwp:transport=dt_socket,address=1044,server=y,suspend=y"

@powershell -Command "java -cp '..\lib\*' %DEBUG_OPTS% \"-Daerobase.config.dir=%CONFIG%\" org.jboss.aerogear.unifiedpush.DBMaintenance"

GOTO End1

:No1
  ECHO Missing Config file
GOTO End1

:End1
@ECHO ON

@ECHO OFF
IF %1.==. GOTO No1
set CONFIG=%1

REM set debug parameters
REM set DEBUG_OPTS="-Xdebug -Xrunjdwp:transport=dt_socket,address=1044,server=y,suspend=y"

java -cp ..\lib\* %DEBUG_OPTS% "-Daerobase.config.dir=%CONFIG%" org.jboss.aerogear.unifiedpush.DBMaintenance > initdb-java.log 2>&1

GOTO End1

:No1
  ECHO Missing Config file
GOTO End1

:End1
@ECHO ON

Fix initdb under windows server 2016

Fix initdb under windows server 2016


cd C:\Users\chrome-bot
call gclient config https://skia.googlesource.com/buildbot.git
call gclient sync --force
cd buildbot
python scripts\launch_slaves.py

cd C:\Users\chrome-bot
call gclient config https://skia.googlesource.com/buildbot.git
call gclient sync --force -j1
cd buildbot
python scripts\launch_slaves.py

Add -j1 to windows launch script

Add -j1 to windows launch script

(SkipBuildbotRuns)

Review URL: https://codereview.chromium.org/23054003

git-svn-id: 32fc27f4dcfb6c0385cd9719852b95fe6680452d@10698 2bbb7eff-a529-9590-31e7-b0007b416f81


:: Author:  Lisandro Dalcin
:: Contact: dalcinl@gmail.com
:: Credits: Olivier Grisel and Kyle Kastner
@ECHO OFF

SET COMMAND_TO_RUN=%*

SET WIN_SDK_ROOT=C:\Program Files\Microsoft SDKs\Windows
IF "%PYTHON_VERSION:~0,1%" == "2" SET WIN_SDK_VERSION="v7.0"
IF "%PYTHON_VERSION:~0,1%" == "3" SET WIN_SDK_VERSION="v7.1"

IF "%PYTHON_ARCH%"=="64" (
    ECHO Configuring Windows SDK %WIN_SDK_VERSION% for Python %PYTHON_VERSION% on a 64 bit architecture
    SET DISTUTILS_USE_SDK=1
    SET MSSdk=1
    "%WIN_SDK_ROOT%\%WIN_SDK_VERSION%\Setup\WindowsSdkVer.exe" -q -version:%WIN_SDK_VERSION%
    "%WIN_SDK_ROOT%\%WIN_SDK_VERSION%\Bin\SetEnv.cmd" /x64 /release
    ECHO Executing: %COMMAND_TO_RUN%
    call %COMMAND_TO_RUN% || EXIT 1
) ELSE (
    ECHO Using default MSVC build environment for 32 bit architecture
    ECHO Executing: %COMMAND_TO_RUN%
    call %COMMAND_TO_RUN% || EXIT 1
)

:: Author:  Lisandro Dalcin
:: Contact: dalcinl@gmail.com
:: Credits: Olivier Grisel and Kyle Kastner
@ECHO OFF

SET COMMAND_TO_RUN=%*

SET PYTHON_VERSION_MAJOR=%PYTHON_VERSION:~0,1%
SET PYTHON_VERSION_MINOR=%PYTHON_VERSION:~2,1%

SET WIN_SDK_ROOT=C:\Program Files\Microsoft SDKs\Windows
IF %PYTHON_VERSION_MAJOR% == 2 SET WIN_SDK_VERSION="v7.0"
IF %PYTHON_VERSION_MAJOR% == 3 SET WIN_SDK_VERSION="v7.1"

IF %PYTHON_ARCH% == 64 SET USE_WIN_SDK=1
IF %PYTHON_VERSION_MAJOR% EQU 3 IF %PYTHON_VERSION_MINOR% GEQ 5 SET USE_WIN_SDK=0
IF %PYTHON_VERSION_MAJOR% GTR 3 SET USE_WIN_SDK=0
if %PYTHON_ARCH% == 32 SET USE_WIN_SDK=0

IF %USE_WIN_SDK% == 1 (
    ECHO Configuring Windows SDK %WIN_SDK_VERSION% for %PYTHON_ARCH% bit architecture
    SET DISTUTILS_USE_SDK=1
    SET MSSdk=1
    "%WIN_SDK_ROOT%\%WIN_SDK_VERSION%\Setup\WindowsSdkVer.exe" -q -version:%WIN_SDK_VERSION%
    "%WIN_SDK_ROOT%\%WIN_SDK_VERSION%\Bin\SetEnv.cmd" /x64 /release
    ECHO Executing: %COMMAND_TO_RUN%
    CALL %COMMAND_TO_RUN% || EXIT 1
) ELSE (
    ECHO Using default MSVC build environment for %PYTHON_ARCH% bit architecture
    ECHO Executing: %COMMAND_TO_RUN%
    CALL %COMMAND_TO_RUN% || EXIT 1
)

Fix build for Python 3.5

AppVeyor: Fix build for Python 3.5


@echo off
setlocal
set mypath=%~dp0
set PATH=%mypath%\python2.7;%PATH%
set PYTHONPATH=%mypath%\lib
set OQ_SITE_CFG_PATH=%mypath%\openquake.cfg

doskey oq=python.exe -m openquake.commands.__main__ $*
doskey oq-engine=python.exe -m openquake.commands.__main__ engine $*

echo OpenQuake environment loaded
echo The command 'oq-engine' is deprecated and will be removed. Please use 'oq engine' instead
cmd /k

endlocal

@echo off
setlocal
set mypath=%~dp0
set PATH=%mypath%\python2.7\Scripts;%mypath%\python2.7;%PATH%
set PYTHONPATH=%mypath%\lib
set OQ_SITE_CFG_PATH=%mypath%\openquake.cfg

doskey oq=python.exe -m openquake.commands.__main__ $*
doskey oq-engine=python.exe -m openquake.commands.__main__ engine $*

echo OpenQuake environment loaded
echo The command 'oq-engine' is deprecated and will be removed. Please use 'oq engine' instead
cmd /k

endlocal

Add python2.7\Scripts to PATH on Win

Add python2.7\Scripts to PATH on Win


@echo off
setlocal
call NightlyBuild.cmd
set PackageDir=%~dp0LocalPackages
call dnu restore dnx\src\Microsoft.DotNet.xunit.performance.runner.dnx\project.json -f %PackageDir%
call dnu pack dnx\src\Microsoft.DotNet.xunit.performance.runner.dnx\project.json --out %PackageDir% --configuration Release

@echo off
setlocal
call NightlyBuild.cmd
set PackageDir=%~dp0LocalPackages
pushd %~dp0dnx\src\Microsoft.DotNet.xunit.performance.runner.dnx
call dnu restore
call dnu pack --out %PackageDir% --configuration Release
popd

Fix BuildForPublishcation.cmd Apparently the paths in nuget.config are relative to the *current* directory...


@echo off

cmake -G "Visual Studio 14 2015 Win64"  %"Set the generator to Visual Studio 2015 x64"% ^
      -T "v140_clang_3_7"               %"Set the compiler toolchain to Clang/C2"% ^
      -H%~dp0\..                        %"Set the source directory to the parent directory"% ^
      -B%~dp0\..\_build_clang           %"Set the build directory to the _build_clang subdirectory"% ^
      %*                                %"Forward additional command line arguments to CMake"%

@echo on

@echo off

cmake -G "Visual Studio 14 2015 Win64"  %"Set the generator to Visual Studio 2015 x64"% ^
      -T "v140_clang_c2"                %"Set the compiler toolchain to Clang/C2"% ^
      -H%~dp0\..                        %"Set the source directory to the parent directory"% ^
      -B%~dp0\..\_build_clang           %"Set the build directory to the _build_clang subdirectory"% ^
      %*                                %"Forward additional command line arguments to CMake"%

@echo on

Update Clang/C2 batch file with new toolchain name


rem @if "%_echo%"=="" echo off

setlocal

call %~d0%~p0\..\..\..\config.bat

if EXIST magic.dll del magic.dll
if errorlevel 1 goto :Error

"%FSC%" --out:magic.dll -a magic.fs --keyfile:magic.snk
if errorlevel 1 goto :Error

REM == If we are running this test on a lab machine, we may not be running from an elev cmd prompt
REM == In that case, ADMIN_PIPE is set to the tool to invoke the command elevated.
IF DEFINED ADMIN_PIPE %ADMIN_PIPE% %GACUTIL% /if magic.dll
if errorlevel 1 goto :Error

if EXIST provider.dll del provider.dll
if ERRORLEVEL 1 goto :Error

"%CSC%" /out:provider.dll /target:library /r:"%FSCOREDLLPATH%" /r:magic.dll provider.cs
if ERRORLEVEL 1 goto :Error

"%GACUTIL%" /if magic.dll

"%FSC%" %fsc_flags% /debug+ /r:provider.dll /optimize- test.fsx
if ERRORLEVEL 1 goto Error

:Ok
echo. > build.ok
endlocal
exit /b 0

:Error
endlocal
exit /b %ERRORLEVEL%

rem @if "%_echo%"=="" echo off

setlocal

call %~d0%~p0\..\..\..\config.bat

if EXIST magic.dll del magic.dll
if errorlevel 1 goto :Error

"%FSC%" --out:magic.dll -a magic.fs --keyfile:magic.snk
if errorlevel 1 goto :Error

REM == If we are running this test on a lab machine, we may not be running from an elev cmd prompt
REM == In that case, ADMIN_PIPE is set to the tool to invoke the command elevated.
IF DEFINED ADMIN_PIPE %ADMIN_PIPE% %GACUTIL% /if magic.dll
if errorlevel 1 goto :Error

if EXIST provider.dll del provider.dll
if ERRORLEVEL 1 goto :Error

%CSC% /out:provider.dll /target:library "/r:%FSCOREDLLPATH%" /r:magic.dll provider.cs
if ERRORLEVEL 1 goto :Error

"%GACUTIL%" /if magic.dll

"%FSC%" %fsc_flags% /debug+ /r:provider.dll /optimize- test.fsx
if ERRORLEVEL 1 goto Error

:Ok
echo. > build.ok
endlocal
exit /b 0

:Error
endlocal
exit /b %ERRORLEVEL%

Fix accidental incorrect quoting in test script (changeset 1235391)


@echo off
pushd %~dp0
if not exist ..\..\nuget.exe (
    powershell -Command "Invoke-WebRequest https://dist.nuget.org/win-x86-commandline/latest/nuget.exe -OutFile ..\..\nuget.exe"
)

if not defined NUGET_VERSION (
    echo NUGET_VERSION not defined, aborting...
    popd
    exit /b 1
)

if not defined API_KEY (
    echo API_KEY not defined, aborting...
    popd
    exit /b 1
)

if not defined NUGET_REPO (
    echo NUGET_REPO not defined, aborting...
    popd
    exit /b 1
)

for /r %%i in (*.nuspec) do (
    ..\..\nuget.exe pack %%i /Properties version=%NUGET_VERSION% /BasePath ..\.. || exit /b 1
)

for /r %%i in (*.nupkg) do (
    ..\..\nuget.exe push %%i %API_KEY% -Source %NUGET_REPO% || exit /b 1
)

del *.nupkg

popd

@echo off
pushd %~dp0
del *.nupkg
if not exist ..\..\nuget.exe (
    powershell -Command "Invoke-WebRequest https://dist.nuget.org/win-x86-commandline/latest/nuget.exe -OutFile ..\..\nuget.exe"
)

if not defined NUGET_VERSION (
    echo NUGET_VERSION not defined, aborting...
    popd
    exit /b 1
)

if not defined API_KEY (
    echo API_KEY not defined, aborting...
    popd
    exit /b 1
)

if not defined NUGET_REPO (
    echo NUGET_REPO not defined, aborting...
    popd
    exit /b 1
)

for /r %%i in (*.nuspec) do (
    ..\..\nuget.exe pack %%i /Properties version=%NUGET_VERSION% /BasePath ..\.. || exit /b 1
)

for /r %%i in (*.nupkg) do (
    ..\..\nuget.exe push %%i %API_KEY% -Source %NUGET_REPO% || exit /b 1
)

popd

Delete the nuget packages from the packaging directory BEFORE the script starts to avoid madness


@echo off
echo Press any key to publish
pause
".nuget\NuGet.exe" push Rssdp.1.0.0.7.nupkg
pause

@echo off
echo Press any key to publish
pause
".nuget\NuGet.exe" push Rssdp.1.0.0.9.nupkg
pause

Update nuget publish cmd file for latest version.


rem Alter this if you need to install multiple instances.
@echo off
set SERVICENAME="Cuberite"

set CURRENTDIR=%CD%
sc create %SERVICENAME% binPath= "%CURRENTDIR%\Cuberite.exe -d" start= auto DisplayName= %SERVICENAME%
sc description %SERVICENAME% "Minecraft server instance"

rem Alter this if you need to install multiple instances.
@echo off
set SERVICENAME="Cuberite"

set CURRENTDIR=%CD%
sc create %SERVICENAME% binPath= "%CURRENTDIR%\Cuberite.exe -d" start= auto DisplayName= "@%CURRENTDIR%\Cuberite.exe,-1"
sc description %SERVICENAME% "@%CURRENTDIR%\Cuberite.exe,-2"

Use string redirection in Windows service

+ Localisation support


DEL c:\Users\Administrator\go\src\github.com\pivotal-cf-experimental\GATS\cf.exe
bitsadmin.exe /transfer "DownloadStableCLI" https://s3.amazonaws.com/go-cli/builds/cf-windows-amd64.exe c:\Users\Administrator\go\src\github.com\pivotal-cf-experimental\GATS\cf.exe

go get -u github.com/pivotal-cf-experimental/GATS/...

SET GATSPATH=%GOPATH%\src\github.com\pivotal-cf-experimental\GATS
SET PATH=%PATH%;%GATSPATH%;C:\Program Files\cURL\bin
SET CONFIG=%CD%\config.json
SET LOCAL_GOPATH=%GATSPATH%\Godeps\_workspace
MKDIR %LOCAL_GOPATH%\bin
SET GOPATH=%LOCAL_GOPATH%;%GOPATH%
SET PATH=%LOCAL_GOPATH%\bin;%PATH%

go install -v github.com/onsi/ginkgo/ginkgo
ginkgo.exe -r -slowSpecThreshold=120 ./gats

DEL c:\Users\Administrator\go\src\github.com\pivotal-cf-experimental\GATS\cf.exe
bitsadmin.exe /transfer "DownloadStableCLI" https://s3.amazonaws.com/go-cli/builds/cf-windows-amd64.exe c:\Users\Administrator\go\src\github.com\pivotal-cf-experimental\GATS\cf.exe

go get -u github.com/pivotal-cf-experimental/GATS/...

SET GATSPATH=%GOPATH%\src\github.com\pivotal-cf-experimental\GATS
SET PATH=%GATSPATH%;%PATH%;C:\Program Files\cURL\bin
SET CONFIG=%CD%\config.json
SET LOCAL_GOPATH=%GATSPATH%\Godeps\_workspace
MKDIR %LOCAL_GOPATH%\bin
SET GOPATH=%LOCAL_GOPATH%;%GOPATH%
SET PATH=%LOCAL_GOPATH%\bin;%PATH%

go install -v github.com/onsi/ginkgo/ginkgo
ginkgo.exe -r -slowSpecThreshold=120 ./gats

Add GATSPATH to beginning of PATH.

Add GATSPATH to beginning of PATH.

- Ensure that the correct cf version is being used.


@echo off
net session >nul 2>&1
if %errorLevel% NEQ 0 (
    echo Please run this script with Administrator privileges
    timeout 10 > NUL
    EXIT /B 1
)
SET cdpath=%~dp0
echo Setting the system environment variable DOCKER_HOST
reg add "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment" /v DOCKER_HOST /t REG_SZ /d tcp://:2376 /f
echo Setting the system environment variable DOCKER_TLS
reg add "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment" /v DOCKER_TLS_VERIFY /t REG_SZ /d 1 /f
echo Configuring the Docker daemon for TLS
if not exist c:\ProgramData\docker\certs.d\ mkdir c:\ProgramData\docker\certs.d\
xcopy /O %cdpath%server\* c:\ProgramData\docker\certs.d\
echo Configuring the Docker client to connect using TLS for the current user
if not exist c:\Users\%username%\.docker\ mkdir c:\Users\%username%\.docker\
xcopy /O %cdpath%client\* c:\Users\%username%\.docker\
echo Restarting Docker
net stop Docker
net start Docker
echo All done. Docker is now configured for TLS.
echo Please complete the preparation on the control domain console.
timeout 10 > NUL
EXIT /b 0

@echo off
net session >nul 2>&1
if %errorLevel% NEQ 0 (
    echo Please run this script with Administrator privileges
    timeout 10 > NUL
    EXIT /B 1
)
SET cdpath=%~dp0
if not exist c:\ProgramData\docker\ (
    echo Error: Could not find Docker in c:\ProgramData\docker\.
    echo Please install Docker before running this script.
    timeout 10 > NUL
    EXIT /B 1
)
echo Setting the system environment variable DOCKER_HOST
reg add "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment" /v DOCKER_HOST /t REG_SZ /d tcp://:2376 /f
echo Setting the system environment variable DOCKER_TLS
reg add "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment" /v DOCKER_TLS_VERIFY /t REG_SZ /d 1 /f
echo Configuring the Docker daemon for TLS
if not exist c:\ProgramData\docker\certs.d\ mkdir c:\ProgramData\docker\certs.d\
xcopy /O %cdpath%server\* c:\ProgramData\docker\certs.d\
echo Configuring the Docker client to connect using TLS for the current user
if not exist c:\Users\%username%\.docker\ mkdir c:\Users\%username%\.docker\
xcopy /O %cdpath%client\* c:\Users\%username%\.docker\
echo Restarting Docker
net stop Docker
net start Docker
echo All done. Docker is now configured for TLS.
echo Please complete the preparation on the control domain console.
timeout 10 > NUL
EXIT /b 0

Check that Docker is installed on Windows

Signed-off-by: Robert Breker <bfcd7039ca4b92386f0756a1d5e67ea4ff23cfe0@citrix.com>


:: Establish an environment for Mindbender applications

@echo off

set PYBLISH_BASE=%~dp0git\pyblish-base
set PYBLISH_MAYA=%~dp0git\pyblish-maya
set PYBLISH_NUKE=%~dp0git\pyblish-nuke
set PYBLISH_QML=%~dp0git\pyblish-qml
set PYBLISH_LITE=%~dp0git\pyblish-lite
set MINDBENDER_CORE=%~dp0git\mindbender-core
set MINDBENDER_LAUNCHER=%~dp0git\mindbender-launcher
set MINDBENDER_EXAMPLE=%~dp0git\mindbender-example\projects

set PATH=%~dp0bin\windows\syncthing;%PATH%
set PATH=%~dp0bin\windows\python36;%PATH%
set PATH=%~dp0bin\windows;%PATH%
set PATH=%~dp0bin;%PATH%

set PYTHONPATH=%~dp0bin\maya\2016\pythonpath
set PYTHONPATH=%MINDBENDER_CORE%;%MINDBENDER_LAUNCHER%;%PYTHONPATH%

set PYBLISHGUI=pyblish_qml

if "%MINDBENDER_PROJECTS%"=="" set MINDBENDER_PROJECTS=%MINDBENDER_EXAMPLE%

:: Establish an environment for Mindbender applications

@echo off

set PYBLISH_BASE=%~dp0git\pyblish-base
set PYBLISH_MAYA=%~dp0git\pyblish-maya
set PYBLISH_NUKE=%~dp0git\pyblish-nuke
set PYBLISH_QML=%~dp0git\pyblish-qml
set PYBLISH_LITE=%~dp0git\pyblish-lite
set MINDBENDER_CORE=%~dp0git\mindbender-core
set MINDBENDER_LAUNCHER=%~dp0git\mindbender-launcher
set MINDBENDER_EXAMPLE=%~dp0git\mindbender-example\projects
set MINDBENDER_CONFIG=polly

set PATH=%~dp0bin\windows\python36;%PATH%
set PATH=%~dp0bin\windows;%PATH%
set PATH=%~dp0bin;%PATH%

set PYTHONPATH=%~dp0bin\pythonpath
set PYTHONPATH=%~dp0\git\mindbender-config;%PYTHONPATH%
set PYTHONPATH=%MINDBENDER_CORE%;%MINDBENDER_LAUNCHER%;%PYTHONPATH%

set PYBLISHGUI=pyblish_qml

if "%MINDBENDER_PROJECTS%"=="" set MINDBENDER_PROJECTS=%MINDBENDER_EXAMPLE%

Set configuration to the one bundled

Set configuration to the one bundled


@ECHO OFF

set target=amd64
set MSVC=%USERPROFILE%\cmsc\msvc\bin\%target%
set libs=/LIBPATH:"%MSVC%\..\..\lib\%target%"
set include=/I"%MSVC%\..\..\include\crt"

set src=%CD%
set output=/OUT:zs.exe
set C_FLAGS=/Wall /GL /O1 /Os /Oi /Ob1 /GS- /TC
set files=%src%\main.c %src%\errors.c %src%\flash_io.c %src%\zs_data.c

%MSVC%\cl.exe /MD %include% %C_FLAGS% %files% %EXTRA_LIBS% /link %output% %libs%

pause

@ECHO OFF

set target=amd64
set MSVC=%USERPROFILE%\cmsc\msvc\bin\%target%
set libs=/LIBPATH:"%MSVC%\..\..\lib\%target%"
set include=/I"%MSVC%\..\..\include\crt"

set src=%CD%
set output=/OUT:zs.exe
REM set C_FLAGS=/Wall /GL /O1 /Os /Oi /Ob1 /GS- /TP
set C_FLAGS=/Wall /GL /O1 /Os /Oi /Ob1 /GS- /TC

set files=%src%\main.c %src%\errors.c %src%\flash_io.c %src%\zs_data.c

%MSVC%\cl.exe /MD %include% %C_FLAGS% %files% %EXTRA_LIBS% /link %output% %libs%

pause

Test with /TP instead of /TC to check for C++ warnings.


echo on

echo Postsubmit.bat started.

if exist %VCVARSALL_SCRIPT% (
  echo Running VCVARSALL script: %VCVARSALL_SCRIPT%
  CALL %VCVARSALL_SCRIPT% amd64 || exit /b %errorlevel%
)

echo Creating build directory.

mkdir C:\Fruit\build-%CONFIGURATION%
cd C:\Fruit\build-%CONFIGURATION%

echo Running CMake.

%CMAKE_PATH%\cmake.exe -G %CMAKE_GENERATOR% .. -DCMAKE_BUILD_TYPE=%CONFIGURATION% -DBOOST_DIR=%BOOST_DIR% -DBUILD_TESTS_IN_RELEASE_MODE=True || exit /b %errorlevel%

echo Building Fruit.

IF %CMAKE_GENERATOR%=="MinGW Makefiles" (
  mingw32-make -j12 || exit /b %errorlevel%
) ELSE (
  msbuild ALL_BUILD.vcxproj || exit /b %errorlevel%
)

echo Running tests.

%CMAKE_PATH%\ctest.exe -j 1 --output-on-failure -C %CONFIGURATION% || exit /b %errorlevel%

echo on

echo Postsubmit.bat started.

if exist %VCVARSALL_SCRIPT% (
  echo Running VCVARSALL script: %VCVARSALL_SCRIPT%
  CALL %VCVARSALL_SCRIPT% amd64 || exit /b %errorlevel%
)

echo Creating build directory.

mkdir C:\Fruit\build-%CONFIGURATION%
cd C:\Fruit\build-%CONFIGURATION%

rem TODO: Remove the following 2 commands, they are only for debugging.
echo Looking for CMake executable:
dir %CMAKE_PATH%

echo Running CMake.

%CMAKE_PATH%\cmake.exe -G %CMAKE_GENERATOR% .. -DCMAKE_BUILD_TYPE=%CONFIGURATION% -DBOOST_DIR=%BOOST_DIR% -DBUILD_TESTS_IN_RELEASE_MODE=True || exit /b %errorlevel%

echo Building Fruit.

IF %CMAKE_GENERATOR%=="MinGW Makefiles" (
  mingw32-make -j12 || exit /b %errorlevel%
) ELSE (
  msbuild ALL_BUILD.vcxproj || exit /b %errorlevel%
)

echo Running tests.

%CMAKE_PATH%\ctest.exe -j 1 --output-on-failure -C %CONFIGURATION% || exit /b %errorlevel%

Add some more debugging prints in the AppVeyor test script, to investigate an error when running CMake.


@echo off
setlocal enabledelayedexpansion

pushd %1

set attempts=5
set counter=0

:retry
set /a counter+=1
echo Attempt %counter% out of %attempts%

cmd /c npm install https://github.com/projectkudu/KuduScript/tarball/3bf82c59679bd6539651cf5751246f34e6fd6a56
IF %ERRORLEVEL% NEQ 0 goto error

goto end

:error
if %counter% GEQ %attempts% goto :lastError
goto retry

:lastError
popd
echo An error has occured during npm install.
exit /b 1

:end
popd
echo Finished successfully.
exit /b 0

@echo off
setlocal enabledelayedexpansion

pushd %1

set attempts=5
set counter=0

:retry
set /a counter+=1
echo Attempt %counter% out of %attempts%

cmd /c npm install https://github.com/projectkudu/KuduScript/tarball/89ed632cfb0154130af7cc555d4644ad33122ab9
IF %ERRORLEVEL% NEQ 0 goto error

goto end

:error
if %counter% GEQ %attempts% goto :lastError
goto retry

:lastError
popd
echo An error has occured during npm install.
exit /b 1

:end
popd
echo Finished successfully.
exit /b 0

Update new version of kuduscript where the generator wont generate iisnode.yml file


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

:: Add more build steps here, if they are necessary.

:: See
:: http://docs.continuum.io/conda/build.html
:: for a list of environment variables that are set during the build process.

"%PYTHON%" setup.py install --offline --no-git --single-version-externally-managed --record record.txt
if errorlevel 1 exit 1

:: Add more build steps here, if they are necessary.

:: See
:: http://docs.continuum.io/conda/build.html
:: for a list of environment variables that are set during the build process.

Change install command in windows script