Instruction
stringlengths
14
778
input_code
stringlengths
0
4.24k
output_code
stringlengths
1
5.44k
Set SDK version depending on Python 2 or 3.
@echo off :: To build extensions for 64 bit Python 3, we need to configure environment :: variables to use the MSVC 2010 C++ compilers from GRMSDKX_EN_DVD.iso of: :: MS Windows SDK for Windows 7 and .NET Framework 4 :: :: More details at: :: https://github.com/cython/cython/wiki/64BitCythonExtensionsOnWindows :: IF "%DISTUTILS_USE_SDK%"=="1" ( IF "%PLATFORM%"=="x64" ( ECHO Configuring environment to build with MSVC on a 64bit architecture ECHO Using Windows SDK v7.0 "C:\Program Files\Microsoft SDKs\Windows\v7.0\Setup\WindowsSdkVer.exe" -q -version:v7.0 CALL "C:\Program Files\Microsoft SDKs\Windows\v7.0\Bin\SetEnv.cmd" /x64 /release SET MSSdk=1 REM Need the following to allow tox to see the SDK compiler SET TOX_TESTENV_PASSENV=DISTUTILS_USE_SDK MSSdk INCLUDE LIB ) ELSE ( ECHO Using default MSVC build environment for 32 bit architecture ECHO Executing: %* call %* || EXIT 1 ) ) ELSE ( ECHO Using default MSVC build environment ) CALL %*
@echo off :: To build extensions for 64 bit Python 3, we need to configure environment :: variables to use the MSVC 2010 C++ compilers from GRMSDKX_EN_DVD.iso of: :: MS Windows SDK for Windows 7 and .NET Framework 4 :: :: More details at: :: https://github.com/cython/cython/wiki/64BitCythonExtensionsOnWindows :: IF "%DISTUTILS_USE_SDK%"=="1" ( SET MAJOR_PYTHON_VERSION="%PYTHON_VERSION:~0,1%" IF %MAJOR_PYTHON_VERSION% == "2" ( SET WINDOWS_SDK_VERSION="v7.0" ) ELSE IF %MAJOR_PYTHON_VERSION% == "3" ( SET WINDOWS_SDK_VERSION="v7.1" ) ELSE ( ECHO Unsupported Python version: "%MAJOR_PYTHON_VERSION%" EXIT 1 ) IF "%PLATFORM%"=="x64" ( ECHO Configuring environment to build with MSVC on a 64bit architecture ECHO Using Windows SDK %WINDOWS_SDK_VERSION% "C:\Program Files\Microsoft SDKs\Windows\%WINDOWS_SDK_VERSION%\Setup\WindowsSdkVer.exe" -q -version:%WINDOWS_SDK_VERSION% CALL "C:\Program Files\Microsoft SDKs\Windows\%WINDOWS_SDK_VERSION%\Bin\SetEnv.cmd" /x64 /release SET MSSdk=1 REM Need the following to allow tox to see the SDK compiler SET TOX_TESTENV_PASSENV=DISTUTILS_USE_SDK MSSdk INCLUDE LIB ) ELSE ( ECHO Using default MSVC build environment for 32 bit architecture ECHO Executing: %* call %* || EXIT 1 ) ) ELSE ( ECHO Using default MSVC build environment ) CALL %*
Fix path in FOR loop
rem Copy runtime DLLs echo "" | stack exec -- where libstdc++-6.dll > lib.txt echo "" | stack exec -- where libgcc_s_seh-1.dll >> lib.txt echo "" | stack exec -- where libwinpthread-1.dll >> lib.txt for /F %i IN (lib.txt) do copy /Y %i .\ del /q lib.txt
rem Copy runtime DLLs echo "" | stack exec -- where libstdc++-6.dll > lib.txt echo "" | stack exec -- where libgcc_s_seh-1.dll >> lib.txt echo "" | stack exec -- where libwinpthread-1.dll >> lib.txt for /F %i IN (lib.txt) do copy /Y "%i" .\ del /q lib.txt
Add logging into studio with plugin
@echo off SET pathToVS12=C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe SET pathToVS11=C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\devenv.exe IF EXIST %pathToVS12%( "%pathToVS12%" /RootSuffix YC /ReSharper.Internal Exit /b ) IF EXIST %pathToVS11% ( "%pathToVS11%" /RootSuffix YC /ReSharper.Internal Exit /b ) ELSE ( echo "Microsoft Visual Studio 11 and Microsoft Visual Studio 12 weren't found. Try run plugin manually with keys /RootSuffix YC /ReSharper.Internal" )
@echo off SET pathToVS12=C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe SET pathToVS11=C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\devenv.exe rem info about resharper logging https://www.jetbrains.com/resharper/devguide/Platform/Logging.html IF EXIST %pathToVS12%( "%pathToVS12%" /RootSuffix YC /ReSharper.Internal /ReSharper.LogLevel TRACE Exit /b ) IF EXIST %pathToVS11% ( "%pathToVS11%" /RootSuffix YC /ReSharper.Internal /ReSharper.LogFile /ReSharper.LogLevel TRACE Exit /b ) ELSE ( echo "Microsoft Visual Studio 11 and Microsoft Visual Studio 12 weren't found. Try run plugin manually with keys /RootSuffix YC /ReSharper.Internal" )
Use Windows environment variable substitution
SET GOPATH=%CD%\gopath SET GATSPATH=%GOPATH%\src\code.cloudfoundry.org\cli-acceptance-tests SET PATH=C:\Go\bin;%PATH% SET PATH=C:\Program Files\Git\cmd\;%PATH% SET PATH=%GOPATH%\bin;%PATH% SET PATH=C:\Program Files\GnuWin32\bin;%PATH% SET PATH=C:\Program Files\cURL\bin;%PATH% SET PATH=%CD%;%PATH% SET /p DOMAIN=<%CD%\bosh-lite-lock\name SET CF_API=api.%DOMAIN% call %CD%\cli-ci\ci\cli\tasks\create-cats-config.bat SET CONFIG=%CD%\config.json pushd %CD%\cf-cli-binaries gzip -d cf-cli-binaries.tgz tar -xvf cf-cli-binaries.tar MOVE %CD%\cf-cli_winx64.exe ..\cf.exe popd go get -v github.com/onsi/ginkgo/ginkgo cd %GATSPATH% ginkgo.exe -r -nodes=4 $GINKGO_ARGS
SET GOPATH=%CD%\gopath SET GATSPATH=%GOPATH%\src\code.cloudfoundry.org\cli-acceptance-tests SET PATH=C:\Go\bin;%PATH% SET PATH=C:\Program Files\Git\cmd\;%PATH% SET PATH=%GOPATH%\bin;%PATH% SET PATH=C:\Program Files\GnuWin32\bin;%PATH% SET PATH=C:\Program Files\cURL\bin;%PATH% SET PATH=%CD%;%PATH% SET /p DOMAIN=<%CD%\bosh-lite-lock\name SET CF_API=api.%DOMAIN% call %CD%\cli-ci\ci\cli\tasks\create-cats-config.bat SET CONFIG=%CD%\config.json pushd %CD%\cf-cli-binaries gzip -d cf-cli-binaries.tgz tar -xvf cf-cli-binaries.tar MOVE %CD%\cf-cli_winx64.exe ..\cf.exe popd go get -v github.com/onsi/ginkgo/ginkgo cd %GATSPATH% ginkgo.exe -r -nodes=4 %GINKGO_ARGS%
Fix 2 bugs with Windows activation
set CARGO_HOME=%CONDA_PREFIX%.cargo.win set CARGO_CONFIG=%CARGO_HOME%\config set RUSTUP_HOME=%CARGO_HOME%\rustup set PATH=%CARGO_HOME%\bin:%PATH% if not exist "%CARGO_HOME%" mkdir "%CARGO_HOME%" echo [target.x86_64-pc-windows-msvc]>> %CARGO_CONFIG% echo linker = "%LD%">> %CARGO_CONFIG%
set CARGO_HOME=%CONDA_PREFIX%\.cargo.win set CARGO_CONFIG=%CARGO_HOME%\config set RUSTUP_HOME=%CARGO_HOME%\rustup set PATH=%CARGO_HOME%\bin:%PATH% if not exist "%CARGO_HOME%" mkdir "%CARGO_HOME%" echo [target.x86_64-pc-windows-msvc]>> %CARGO_CONFIG% if [%LD%] == [] ( echo linker = "link.exe">> %CARGO_CONFIG% ) else ( echo linker = "%LD%">> %CARGO_CONFIG% )
Add OxyPlot.Xps to Release download (discussions/545072)
mkdir ..\Output\Release mkdir ..\Output\Release\NET40 mkdir ..\Output\Release\NET45 mkdir ..\Output\Release\NetCore45 mkdir ..\Output\Release\NetCore45\Themes mkdir ..\Output\Release\SL5 copy ..\Output\NET45\OxyPlot.??? ..\Output\Release copy ..\Output\NET40\OxyPlot.WindowsForms.??? ..\Output\Release\NET40 copy ..\Output\NET45\OxyPlot.WindowsForms.??? ..\Output\Release\NET45 copy ..\Output\NET40\OxyPlot.WPF.??? ..\Output\Release\NET40 copy ..\Output\NET45\OxyPlot.WPF.??? ..\Output\Release\NET45 copy ..\Output\SL5\OxyPlot.Silverlight.??? ..\Output\Release\SL5 copy ..\Output\NetCore45\OxyPlot.Metro.??? ..\Output\Release\NetCore45 copy ..\Output\NetCore45\Themes\*.* ..\Output\Release\NetCore45\Themes "C:\Program Files\7-Zip\7z.exe" a -r ..\Output\OxyPlot-%1.zip ..\Output\Release\*.* > ZipRelease.log
mkdir ..\Output\Release mkdir ..\Output\Release\NET40 mkdir ..\Output\Release\NET45 mkdir ..\Output\Release\NetCore45 mkdir ..\Output\Release\NetCore45\Themes mkdir ..\Output\Release\SL5 copy ..\Output\NET45\OxyPlot.??? ..\Output\Release copy ..\Output\NET40\OxyPlot.WindowsForms.??? ..\Output\Release\NET40 copy ..\Output\NET45\OxyPlot.WindowsForms.??? ..\Output\Release\NET45 copy ..\Output\NET40\OxyPlot.WPF.??? ..\Output\Release\NET40 copy ..\Output\NET45\OxyPlot.WPF.??? ..\Output\Release\NET45 copy ..\Output\NET40\OxyPlot.Xps.??? ..\Output\Release\NET40 copy ..\Output\NET45\OxyPlot.Xps.??? ..\Output\Release\NET45 copy ..\Output\SL5\OxyPlot.Silverlight.??? ..\Output\Release\SL5 copy ..\Output\NetCore45\OxyPlot.Metro.??? ..\Output\Release\NetCore45 copy ..\Output\NetCore45\Themes\*.* ..\Output\Release\NetCore45\Themes "C:\Program Files\7-Zip\7z.exe" a -r ..\Output\OxyPlot-%1.zip ..\Output\Release\*.* > ZipRelease.log
Remove verbose from curl command
@echo on @setlocal :: Sample usage: :: purge-ngenix http://chopard-st.cdn.ngenix.net/test2.txt :: This file is set up for a specific property tag, the property tag variable can also be set to be passed as an input set ConfigFile=Ngenix-config.txt :: Set auth variables from config file if not exist %ConfigFile% ( echo Configuration file: %ConfigFile% does not exist. Aborting purge! goto finish ) set PATH=%PATH%;..\..\common @call source %ConfigFile% set APIendpoint=https://api.ngenix.net set URL=%1 curl -v -X POST -u "%User%:%Password%" -H "Accept: application/json" -H "Content-Type: text/plain" -d "%URL%" %APIendpoint%/v1/commands/purge/%Property_Tag% :finish echo.
@echo on @setlocal :: Sample usage: :: purge-ngenix http://chopard-st.cdn.ngenix.net/test2.txt :: This file is set up for a specific property tag, the property tag variable can also be set to be passed as an input set ConfigFile=Ngenix-config.txt :: Set auth variables from config file if not exist %ConfigFile% ( echo Configuration file: %ConfigFile% does not exist. Aborting purge! goto finish ) set PATH=%PATH%;..\..\common @call source %ConfigFile% set APIendpoint=https://api.ngenix.net set URL=%1 curl -s -X POST -u "%User%:%Password%" -H "Accept: application/json" -H "Content-Type: text/plain" -d "%URL%" %APIendpoint%/v1/commands/purge/%Property_Tag% :finish echo.
Change windows installer signing script based on the current step name
@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
Add time information when running a single test
@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
Update findstr search pattern for creating nupkgs
@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 make script for documentation.
@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
Adjust path (I reinstalled Windows).
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
Remove commands from before install script
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
Use older version of node-gyp
@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
Make some renames so that it can detect the libraries it needs
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
Disable compiling for Vista+ by default.
@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
Update Unity install directory in build script
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
Use 7zip instead of zip.
@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 ..
Add FFmpeg setup helper script
@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
Test for install location of the Visual Studio files
@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 )"
Add basic build and pack script
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
Revert "Removed for loop and used MOVE command with wildcards"
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"
Remove .lib artifact from pogo build
::------------------------------------------------------------------------------------------------------- :: 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
Include Code folder in releases
@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
Revert "the integration package is not in the cli resource"
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 .
Use windows variable syntax in windows...
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
Add installation script for Vundle on 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
Build script should overwrite images automatically
@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
Add simple batch script to tag new releases and update properties
@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 a helpful comment for folks unfamiliar with the SHIFT construct.
@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 odb init for run script buttons.
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"
Increase memory limit for standard installation
cd /d %~dp0 java -jar pathvisio.jar -p visplugins.jar %*
cd /d %~dp0 java -Xmx1024m -jar pathvisio.jar -p visplugins.jar %*
Clean both Release and Debug projects, to support the MSI builder.
@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
Add script to copy shaders back from device.
:: 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%
Make FFTW3 work for windows
exit 1
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%\
Add new line at end of file.
@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
@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
Fix incorrect VS version bug
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%
Set git user.name and user.email
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
Fix position to current directory
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
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 ../
Change clcache size and set CLCACHE_NODIRECT
@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%
Update VS open command to work with VS2015
:: 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 )
Build with Visual Studio 2015
if not exist deps git clone -b master http://buildserver.urbackup.org/git/urbackup_deps deps cd deps git reset --hard git pull
if not exist deps git clone -b master http://buildserver.urbackup.org/git/urbackup_deps deps cd deps git reset --hard git pull cd ..
Add %JAVA_OPTS% to crawler, so some java options such as -Xmx can be adjusted by this variable.
@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
Update RingLibUI - Add a batch file to build the library DLL file
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
Use latest FAKE.Core 4.x version
@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 %*
Kill script: termintes openfin and node processes and clears openfin cache
@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"
Make now includes Plato statistics
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
Use an if/else in the batch script
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
Test debug & release configs
@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
Add release tool for windows
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 ..
Update push script to push packages separately
.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
Delete uwp app packages too!
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"
Remove wildcard from del statement
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 ..
Add release tool for windows
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 equivalent script for Windows execute/test
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 /FORCE:MULTIPLE to Windows linker flags
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
Make sure the package is created in the bin folder.
@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
Clean script can simply delegate to build script
@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
@"%~dp0build" /v:n /target:Clean
Stop using debug flag for Windows build
SET "JAVA_HOME=C:\opt\jdk-8" cd git-repo ./mvnw clean install -X
SET "JAVA_HOME=C:\opt\jdk-8" cd git-repo ./mvnw clean install
Build script now logs to console
@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%"
Use myget feed to download KoreBuild package
@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%
Remove 'Preview' qualifier from VS and MSBuild
@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 the vs version flag.
@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
@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
Set nuget version to use as 2.6.4
@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
Remove xcopy from Npcap install script
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
Add boot script source for lcd43 system
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 Windows version of script
@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 script to set folder options
<!-- : @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
Build shared library on Windows
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
Update kuduscript to latest for adding python support
@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
Fix path to install cygwin.
:: %~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 build script to also work when nuget.exe isn't in the path
@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
Remove w9xopen.exe and add README.txt to Windows build
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 ..
Fix lavapipe JSON patcher. Fixes 0a775146
@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 )
Add period to the signed name.
@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
Remove unnecessary cmake flag INSTALL_DIR
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 compressed pointer flag for now.
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 %*
Use Java 17 for Windows CI build
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
Add -j1 to windows launch script
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
Fix build for Python 3.5
:: 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 )
Add python2.7\Scripts to PATH on Win
@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
Update Clang/C2 batch file with new toolchain name
@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
Fix accidental incorrect quoting in test script (changeset 1235391)
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%
Delete the nuget packages from the packaging directory BEFORE the script starts to avoid madness
@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
Update nuget publish cmd file for latest version.
@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
Use string redirection in Windows service
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"
Add GATSPATH to beginning of PATH.
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
Set configuration to the one bundled
:: 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%
Test with /TP instead of /TC to check for C++ warnings.
@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
Add some more debugging prints in the AppVeyor test script, to investigate an error when running CMake.
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%
Update new version of kuduscript where the generator wont generate iisnode.yml file
@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
Change install command in windows script
"%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 build script after moving DMLib to VS2017
echo off set BuildMode=Debug if not {%1} == {} ( set BuildMode=%1 ) set OriginalPath=%cd% set TestPath=%~dp0..\test "%ProgramFiles(x86)%\MSBuild\14.0\Bin\msbuild" %TestPath%\DMLibTest\DMLibTest.csproj /t:Rebuild /p:Configuration=%BuildMode% >NUL "%ProgramFiles(x86)%\MSBuild\14.0\Bin\msbuild" %TestPath%\DMLibTestCodeGen\DMLibTestCodeGen.csproj /t:Rebuild /p:Configuration=%BuildMode% >NUL %TestPath%\DMLibTestCodeGen\bin\Debug\DMLibTestCodeGen.exe %TestPath%\DMLibTest\bin\Debug\DMLibTest.dll %TestPath%\DMLibTest\Generated DNetCore cd %~dp0 dotnet restore -s https://www.nuget.org/api/v2/ cd %~dp0\Microsoft.WindowsAzure.Storage.DataMovement dotnet build -c %BuildMode% cd %~dp0\MsTestLib dotnet build -c %BuildMode% cd %~dp0\DMTestLib dotnet build -c %BuildMode% cd %~dp0\DMLibTest dotnet build -c %BuildMode% dotnet publish -c %BuildMode% cd %OriginalPath%
set BuildMode=Debug if not {%1} == {} ( set BuildMode=%1 ) set OriginalPath=%cd% set TestPath=%~dp0..\test "%ProgramFiles(x86)%\MSBuild\14.0\Bin\msbuild" %TestPath%\DMLibTest\DMLibTest.csproj /t:Rebuild /p:Configuration=%BuildMode% >NUL "%ProgramFiles(x86)%\MSBuild\14.0\Bin\msbuild" %TestPath%\DMLibTestCodeGen\DMLibTestCodeGen.csproj /t:Rebuild /p:Configuration=%BuildMode% >NUL %TestPath%\DMLibTestCodeGen\bin\Debug\DMLibTestCodeGen.exe %TestPath%\DMLibTest\bin\Debug\DMLibTest.dll %TestPath%\DMLibTest\Generated DNetCore dotnet restore -s https://www.nuget.org/api/v2/ %~dp0\DMLibTest cd %~dp0\Microsoft.WindowsAzure.Storage.DataMovement dotnet build -c %BuildMode% cd %~dp0\MsTestLib dotnet build -c %BuildMode% cd %~dp0\DMTestLib dotnet build -c %BuildMode% cd %~dp0\DMLibTest dotnet build -c %BuildMode% dotnet publish -c %BuildMode% cd %OriginalPath%
Make sure exit code is 0 when successful.
@echo off pushd %1 set attempts=5 set counter=0 :retry set /a counter+=1 echo Attempt %counter% out of %attempts% if exist %1\node_modules\azure-cli\bin\azure ( cmd /c npm update https://github.com/amitapl/azure-sdk-tools-xplat/tarball/latest ) else ( cmd /c npm install https://github.com/amitapl/azure-sdk-tools-xplat/tarball/latest ) IF %ERRORLEVEL% NEQ 0 goto error if exist %1\node_modules\kudusync\bin\kudusync ( cmd /c npm update kudusync ) else ( cmd /c npm install kudusync ) 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.
@echo off pushd %1 set attempts=5 set counter=0 :retry set /a counter+=1 echo Attempt %counter% out of %attempts% if exist %1\node_modules\azure-cli\bin\azure ( cmd /c npm update https://github.com/amitapl/azure-sdk-tools-xplat/tarball/latest ) else ( cmd /c npm install https://github.com/amitapl/azure-sdk-tools-xplat/tarball/latest ) IF %ERRORLEVEL% NEQ 0 goto error if exist %1\node_modules\kudusync\bin\kudusync ( cmd /c npm update kudusync ) else ( cmd /c npm install kudusync ) 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
Add a singed name at the filename of the installer, after it was successfully signed.
@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 "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\" && 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
Remove -race from windows units temporarily
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 version go get -u github.com/onsi/ginkgo/ginkgo ginkgo version ginkgo -r -race -randomizeAllSpecs -randomizeSuites -skipPackage integration -flakeAttempts=2 .
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 version go get -u github.com/onsi/ginkgo/ginkgo ginkgo version ginkgo -r -randomizeAllSpecs -randomizeSuites -skipPackage integration -flakeAttempts=2 .
Install the base-devel meta package on setup
if not exist "C:\Windows\Temp\msys2.exe" ( powershell -Command "(New-Object System.Net.WebClient).DownloadFile('http://repo.msys2.org/distrib/x86_64/msys2-x86_64-20161025.exe', 'C:\Windows\Temp\msys2.exe')" <NUL ) start /wait C:\Windows\Temp\msys2.exe --script A:\msys2-install.qs start /wait C:\msys64\usr\bin\bash.exe --login -c "pacman -Syu --noconfirm" start /wait C:\msys64\usr\bin\bash.exe --login -c "pacman -Syu --noconfirm" start /wait C:\msys64\usr\bin\bash.exe --login -c "pacman -S --noconfirm zip unzip"
if not exist "C:\Windows\Temp\msys2.exe" ( powershell -Command "(New-Object System.Net.WebClient).DownloadFile('http://repo.msys2.org/distrib/x86_64/msys2-x86_64-20161025.exe', 'C:\Windows\Temp\msys2.exe')" <NUL ) start /wait C:\Windows\Temp\msys2.exe --script A:\msys2-install.qs start /wait C:\msys64\usr\bin\bash.exe --login -c "pacman -Syu --noconfirm" start /wait C:\msys64\usr\bin\bash.exe --login -c "pacman -Syu --noconfirm" start /wait C:\msys64\usr\bin\bash.exe --login -c "pacman -S --noconfirm zip unzip" start /wait C:\msys64\usr\bin\bash.exe --login -c "pacman -S --noconfirm base-devel"
Use upgrade command with choco on Windows
REM Installing Chocolatey @powershell -NoProfile -ExecutionPolicy unrestricted -Command "iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))" && SET PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin REM Installing virtualbox choco install virtualbox -y REM Killing the default adapter and DHCP server to avoid network issues down the road "C:\Program Files\Oracle\VirtualBox\VBoxManage" dhcpserver remove --netname "HostInterfaceNetworking-VirtualBox Host-Only Ethernet Adapter" "C:\Program Files\Oracle\VirtualBox\VBoxManage" hostonlyif remove "VirtualBox Host-Only Ethernet Adapter" REM Installing vagrant choco install vagrant -y
REM Installing Chocolatey @powershell -NoProfile -ExecutionPolicy unrestricted -Command "iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))" && SET PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin REM Installing virtualbox choco upgrade virtualbox -y REM Killing the default adapter and DHCP server to avoid network issues down the road "C:\Program Files\Oracle\VirtualBox\VBoxManage" dhcpserver remove --netname "HostInterfaceNetworking-VirtualBox Host-Only Ethernet Adapter" "C:\Program Files\Oracle\VirtualBox\VBoxManage" hostonlyif remove "VirtualBox Host-Only Ethernet Adapter" REM Installing vagrant choco upgrade vagrant -y
Remove race condition on vacate in test by using -forever option. Fix parallel test behaviour.
universe = vanilla executable = ./x_job_filexfer_testjob.pl log = job_filexfer_output-withvacate_van.log output = job_filexfer_output-withvacate_van.out error = job_filexfer_output-withvacate_van.err should_transfer_files = YES when_to_transfer_output = ON_EXIT_OR_EVICT transfer_output_files = submit_filetrans_output14821e.txt,submit_filetrans_output14821f.txt,submit_filetrans_output14821g.txt Notification = NEVER arguments = --job=14821 --long queue
universe = vanilla executable = ./x_job_filexfer_testjob.pl log = job_filexfer_output-withvacate_van.log output = job_filexfer_output-withvacate_van.out error = job_filexfer_output-withvacate_van.err should_transfer_files = YES when_to_transfer_output = ON_EXIT_OR_EVICT transfer_output_files = submit_filetrans_output14821e.txt,submit_filetrans_output14821f.txt,submit_filetrans_output14821g.txt Notification = NEVER arguments = --job=14821 --forever queue
Fix invalid DLL paths when deploying.
@call set_vars.bat copy %QTPATH%\Qt5Charts.dll %ROOTPATH%\release\ copy %QTPATH%\Qt5Core.dll %ROOTPATH%\release\ copy %QTPATH%\Qt5Gui.dll %ROOTPATH%\release\ copy %QTPATH%\Qt5Network.dll %ROOTPATH%\release\ copy %QTPATH%\Qt5Widgets.dll %ROOTPATH%\release\ copy %MINGW%\bin\libgcc_s_dw2-1.dll %ROOTPATH%\release\ copy %MINGW%\bin\libstdc++-6.dll %ROOTPATH%\release\ copy %MINGW%\bin\libgcc_s_dw2-1.dll %ROOTPATH%\release\ copy %MINGW%\bin\libwinpthread-1.dll %ROOTPATH%\release\ @if not "%RUNALL%"=="1" pause
@call set_vars.bat copy %QTPATH%\Qt5Charts.dll %ROOTPATH%\release\ copy %QTPATH%\Qt5Core.dll %ROOTPATH%\release\ copy %QTPATH%\Qt5Gui.dll %ROOTPATH%\release\ copy %QTPATH%\Qt5Network.dll %ROOTPATH%\release\ copy %QTPATH%\Qt5Widgets.dll %ROOTPATH%\release\ copy %QTPATH%\libgcc_s_dw2-1.dll %ROOTPATH%\release\ copy %QTPATH%\libstdc++-6.dll %ROOTPATH%\release\ copy %QTPATH%\libgcc_s_dw2-1.dll %ROOTPATH%\release\ copy %QTPATH%\libwinpthread-1.dll %ROOTPATH%\release\ @if not "%RUNALL%"=="1" pause