doc_id
stringlengths
36
36
metadata
dict
input
stringlengths
28
4.3k
output
stringlengths
11
5.45k
34a3b4be-c403-4429-9300-de22cf8c5d5a
{ "language": "Batchfile" }
```batchfile ``` Add build script for MSVC 2017 community.
```batchfile mkdir obj SET PATH=C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin;%PATH% SET "VSCMD_START_DIR=%CD%" CALL "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" amd64 cl.exe /std:c++14 /O2 /MT /EHsc /I . /Fo.\obj\ ^ /D_USE_MATH_DEFINES ^ .\hlt\entity.cpp .\hlt\map.cpp .\hlt\move.cpp ^ .\MyBot.cpp ^ /link /out:MyBot.exe ```
de2058b4-1695-427e-ae68-6a736414a103
{ "language": "Batchfile" }
```batchfile @echo off setlocal pushd "%~dp0" for /f %%i in (kwindex.txt) do call :id %%i goto :EOF :id setlocal echo %1 for /f "usebackq tokens=*" %%i in (`hg parents %1 --template "%~nx1 {node|short} {date|isodate} {author}\n"`) do set x=%%i call replace %1 \$Id(:.+?)?\$ "$Id: %x% $" > %temp%\%~nx1 copy %temp%\%~nx1 %1 /y > nul goto :EOF ``` Expand author in Id keyword with user portion only
```batchfile @echo off setlocal pushd "%~dp0" for /f %%i in (kwindex.txt) do call :id %%i goto :EOF :id setlocal echo %1 for /f "usebackq tokens=*" %%i in (`hg parents %1 --template "%~nx1 {node|short} {date|isodate} {author|user}\n"`) do set x=%%i call replace %1 \$Id(:.+?)?\$ "$Id: %x% $" > %temp%\%~nx1 copy %temp%\%~nx1 %1 /y > nul goto :EOF ```
27eb943f-4496-4247-be59-08578a86e609
{ "language": "Batchfile" }
```batchfile ``` Add a batch file to build on Windows with MSVC.
```batchfile @setlocal @set SCHEME_H_DIR=..\src @set TSCOMPILE=cl /nologo /O2 /W3 /c /D_CRT_SECURE_NO_DEPRECATE /DUSE_DL=1 /I%SCHEME_H_DIR% @set TSLIB=lib /nologo @set TSLINK=link /nologo @set REGSRC=re.c regcomp.c regexec.c regerror.c regfree.c @set OBJPRODN=re.obj regcomp.obj regexec.obj regerror.obj regfree.obj @if "%1" == "static" goto STATIC @if not exist dll\ ( mkdir dll ) %TSCOMPILE% /MT %REGSRC% %TSLINK% /DLL /out:dll\re.dll /export:init_re %OBJPRODN% %TSCOMPILE% /MDd %REGSRC% %TSLINK% /DLL /out:dll\re_d.dll /export:init_re %OBJPRODN% @goto END :STATIC @if not exist lib\ ( mkdir lib ) %TSCOMPILE% /MT %REGSRC% %TSLIB% /out:lib\re.lib %OBJPRODN% %TSCOMPILE% /MDd %REGSRC% %TSLIB% /out:lib\re_d.lib %OBJPRODN% :END del %OBJPRODN% ```
465dd1b7-3397-4255-8d00-056bc8836fd3
{ "language": "Batchfile" }
```batchfile @echo off REM --------------------------------------------------------------------------- REM Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. 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. rem --------------------------------------------------------------------------- java -cp "../../bin/*;*" %* org.wso2.appserver.samples.sso.Quickstart ``` Fix http-analytics quickstart script for windows
```batchfile @echo off REM --------------------------------------------------------------------------- REM Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. 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. rem --------------------------------------------------------------------------- rem ----- if JAVA_HOME is not set we're not happy ------------------------------ :checkJava if "%JAVA_HOME%" == "" goto noJavaHome if not exist "%JAVA_HOME%\bin\java.exe" goto noJavaHome goto checkJdk18 :noJavaHome echo "You must set the JAVA_HOME variable before running the Quickstart." goto end :checkJdk18 "%JAVA_HOME%\bin\java" -version 2>&1 | findstr /r "1.8" >NUL IF ERRORLEVEL 1 goto unknownJdk goto runQuickstart :unknownJdk echo [ERROR] You need to have JDK 1.8 or above to run this Quickstart goto end :runQuickstart "%JAVA_HOME%\bin\java" -cp "../../bin/*;../../lib/*;*" %* org.wso2.appserver.samples.httpanalytics.Quickstart goto end :end```
561f6182-99c6-47f6-ba79-936a6a1a0a17
{ "language": "Batchfile" }
```batchfile curl -sSf https://static.rust-lang.org/dist/rust-1.10.0-i686-pc-windows-msvc.exe -o rust.exe rust.exe /VERYSILENT /NORESTART /DIR="C:\Rust" set PATH=%PATH%;C:\Rust\bin curl -sSf http://releases.llvm.org/%LLVM_VERSION%/LLVM-%LLVM_VERSION%-win32.exe -o LLVM.exe 7z x LLVM.exe -oC:\LLVM set PATH=%PATH%;C:\LLVM\bin set LIBCLANG_PATH=C:\LLVM\bin ``` Update Rust version used by Appveyor
```batchfile curl -sSf https://static.rust-lang.org/dist/rust-1.24.0-i686-pc-windows-msvc.exe -o rust.exe rust.exe /VERYSILENT /NORESTART /DIR="C:\Rust" set PATH=%PATH%;C:\Rust\bin curl -sSf http://releases.llvm.org/%LLVM_VERSION%/LLVM-%LLVM_VERSION%-win32.exe -o LLVM.exe 7z x LLVM.exe -oC:\LLVM set PATH=%PATH%;C:\LLVM\bin set LIBCLANG_PATH=C:\LLVM\bin ```
2d013045-7dff-422f-ad94-1fe3d5743c4a
{ "language": "Batchfile" }
```batchfile @ECHO OFF SET BASEDIR=%~dp0 PUSHD %BASEDIR% IF NOT EXIST pyenv\NUL GOTO NOENVDIR ECHO removing existing environment RMDIR /S /Q pyenv :NOENVDIR virtualenv pyenv CALL pyenv\Scripts\activate python -m pip install -r pyenv.pkgs CALL pyenv\Scripts\deactivate POPD ``` Disable pip cache dir on Windows
```batchfile @ECHO OFF SET BASEDIR=%~dp0 PUSHD %BASEDIR% IF NOT EXIST pyenv\NUL GOTO NOENVDIR ECHO removing existing environment RMDIR /S /Q pyenv :NOENVDIR virtualenv pyenv CALL pyenv\Scripts\activate python -m pip install -r pyenv.pkgs --no-cache-dir CALL pyenv\Scripts\deactivate POPD ```
ac3a2a13-e9a2-48b7-9619-e0b73234de3f
{ "language": "Batchfile" }
```batchfile ``` Add Batch File for Automated Testing with timeout
```batchfile SET EXE=%2 start %1%EXE% timeout /t %3 FOR /F %%x IN ('tasklist /NH /FI "IMAGENAME eq %EXE%"') DO IF %%x == %EXE% taskkill /im %EXE% /f & exit /b 1 exit /b %errorlevel%```
0f3b1c48-9773-40e4-be67-5722aea1718f
{ "language": "Batchfile" }
```batchfile set SPECWARE4=\Progra~1\Specware4 rem SWPATH needs /s rather than \s so URI parsing works set SWPATH=/Progra~1/Specware4:/ set XEMACS=C:\Progra~1\XEmacs\XEmacs-21.4.6 rem Set allegro to the version you have set ALLEGRO=C:\Progra~1\acl62 rem set ALLEGRO=C:\Progra~1\acl61 set SPECWARE_BIN=$SPECWARE4\Applications\Specware\bin\windows set LISP_EXECUTABLE=%ALLEGRO%\alisp.exe set LISP_HEAP_IMAGE=%SPECWARE_BIN%\Specware4.dxl set LISP_DIRECTORY=%Specware4%/ cd "%Specware4%" %XEMACS%\i586-pc-win32\xemacs.exe -debug-init -l "%ALLEGRO%/eli/fi-site-init" -l "%SPECWARE4%/Library/IO/Emacs/load" -f "run-specware4" & ``` Use xeli instead of eli
```batchfile set SPECWARE4=\Progra~1\Specware4 rem SWPATH needs /s rather than \s so URI parsing works set SWPATH=/Progra~1/Specware4:/ set XEMACS=C:\Progra~1\XEmacs\XEmacs-21.4.6 rem Set allegro to the version you have rem set ALLEGRO=C:\Progra~1\acl62 set ALLEGRO=C:\Progra~1\acl61 set SPECWARE_BIN=$SPECWARE4\Applications\Specware\bin\windows set LISP_EXECUTABLE=%ALLEGRO%\alisp.exe set LISP_HEAP_IMAGE=%SPECWARE_BIN%\Specware4.dxl set LISP_DIRECTORY=%Specware4%/ cd "%Specware4%" %XEMACS%\i586-pc-win32\xemacs.exe -debug-init -l "%ALLEGRO%/xeli/fi-site-init" -l "%SPECWARE4%/Library/IO/Emacs/load" -f "run-specware4" & ```
0117c5ee-3e3a-4683-80ee-e50a723d028b
{ "language": "Batchfile" }
```batchfile java -Djava.library.path=lib -cp lib/NeticaJ.jar;target/vetaraus-1.0-SNAPSHOT-jar-with-dependencies.jar de.dhbw.vetaraus.Application --learn P003_learn.csv P003_classify.csv``` Make Netica.dll available to Windows
```batchfile set PATH=%PATH%;lib java -Djava.library.path=lib -cp lib/NeticaJ.jar;target/vetaraus-1.0-SNAPSHOT-jar-with-dependencies.jar de.dhbw.vetaraus.Application --learn P003_learn.csv P003_classify.csv```
37d7209d-f0ac-418a-a32c-a0d1d35b04b5
{ "language": "Batchfile" }
```batchfile .\Debug\res2h.exe .\test .\results -s -v -h .\results\resources.h -u .\results\resources.cpp .\Debug\res2h.exe .\test .\results\data.bin -b -s -v``` Update tests to dump binary archive
```batchfile .\Release\res2h.exe .\test .\results -s -v -h .\results\resources.h -u .\results\resources.cpp .\Release\res2h.exe .\test .\results\data.bin -b -s -v .\Release\res2hdump.exe .\results\data.bin .\results -f -v```
14270e1f-990f-4c72-bb56-95027425eab2
{ "language": "Batchfile" }
```batchfile msbuild\msbuild ..\src\Torken.CQRS.Core\Torken.CQRS.Core.csproj /p:Configuration=Release nuget\nuget pack ..\src\Torken.CQRS.Core\Torken.CQRS.Core.csproj -IncludeReferencedProjects -Prop Configuration=Release >>log.txt``` Add script to create nuget packages
```batchfile msbuild\msbuild ..\src\Torken.CQRS.Core\Torken.CQRS.Core.csproj /p:Configuration=Release nuget\nuget pack ..\src\Torken.CQRS.Core\Torken.CQRS.Core.csproj -IncludeReferencedProjects -Prop Configuration=Release```
54299003-d974-49d6-ad42-895c11305236
{ "language": "Batchfile" }
```batchfile @echo off echo. echo Portable Accord.NET Framework NuGet package publisher echo ========================================================= echo. echo This Windows batch file uses NuGet to automatically echo push the Portable Accord.NET Framework packages to the gallery. echo. timeout /T 5 :: Directory settings set output=..\bin\nupkg set current=%~dp0 echo. echo Current directory: %current% echo Output directory: %output% echo. forfiles /p %output% /m *.nupkg /c "cmd /c %current%\NuGet.exe push @file" pause``` Use no-space path to current directory
```batchfile @echo off echo. echo Portable Accord.NET Framework NuGet package publisher echo ========================================================= echo. echo This Windows batch file uses NuGet to automatically echo push the Portable Accord.NET Framework packages to the gallery. echo. timeout /T 5 :: Directory settings set output=..\bin\nupkg set current=..\..\NuGet echo. echo Current directory: %current% echo Output directory: %output% echo. forfiles /p %output% /m *.nupkg /c "cmd /c %current%\NuGet.exe push @file" pause```
a49b7eb2-0c91-4d0a-ad43-97c2fbd4b63e
{ "language": "Batchfile" }
```batchfile @echo off rem ======================================================================== rem rem Copyright 2015-2017 Intel Corporation rem rem rem rem Licensed under the Apache License, Version 2.0 (the "License"); rem rem you may not use this file except in compliance with the License. rem rem You may obtain a copy of the License at rem rem rem rem http://www.apache.org/licenses/LICENSE-2.0 rem rem rem rem Unless required by applicable law or agreed to in writing, software rem rem distributed under the License is distributed on an "AS IS" BASIS, rem rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. rem rem See the License for the specific language governing permissions and rem rem limitations under the License. rem rem ======================================================================== rem setlocal md build cd build cmake -L ^ -G "%~1" ^ -T "%~2" ^ -D OSPRAY_BUILD_ISA=ALL ^ -D OSPRAY_MODULE_MPI=ON ^ -D OSPRAY_MODULE_BILINEAR_PATCH=ON ^ -D OSPRAY_ENABLE_TESTING=ON ^ -D USE_IMAGE_MAGICK=OFF ^ .. (cmake --build . --config Release --target ALL_BUILD -- /m /nologo) -and (ctest . -C Release) :abort endlocal :end ``` Revert "fix syntax in Win ci build script"
```batchfile @echo off rem ======================================================================== rem rem Copyright 2015-2017 Intel Corporation rem rem rem rem Licensed under the Apache License, Version 2.0 (the "License"); rem rem you may not use this file except in compliance with the License. rem rem You may obtain a copy of the License at rem rem rem rem http://www.apache.org/licenses/LICENSE-2.0 rem rem rem rem Unless required by applicable law or agreed to in writing, software rem rem distributed under the License is distributed on an "AS IS" BASIS, rem rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. rem rem See the License for the specific language governing permissions and rem rem limitations under the License. rem rem ======================================================================== rem setlocal md build cd build cmake -L ^ -G "%~1" ^ -T "%~2" ^ -D OSPRAY_BUILD_ISA=ALL ^ -D OSPRAY_MODULE_MPI=ON ^ -D OSPRAY_MODULE_BILINEAR_PATCH=ON ^ -D OSPRAY_ENABLE_TESTING=ON ^ -D USE_IMAGE_MAGICK=OFF ^ .. (cmake --build . --config Release --target ALL_BUILD -- /m /nologo) ^ -and ^ (ctest . -C Release) :abort endlocal :end ```
44ec4e73-0319-4780-8f54-d4f7922df13f
{ "language": "Batchfile" }
```batchfile setlocal set BUILDSTAGE=build-stage set NUGETPATH=%BUILDSTAGE%\.nuget set NUGET=%NUGETPATH%\nuget.exe set PACKAGESPATH=%NUGETPATH%\packages :Build_EnvCheck call e5r 1>nul if "%ERRORLEVEL%"=="0" goto Build_NugetDownload echo. echo E5R Environment not installed! goto Build_End :Build_NugetDownload if exist %NUGET% goto Build_Before echo Downloading NuGet... echo TODO: Move to E5R ENV BOOT --tech aspnet if not exist "%NUGETPATH%" md "%NUGETPATH%" @powershell -NoProfile -ExecutionPolicy unrestricted -Command ^ "$ProgressPreference = 'SilentlyContinue'; Invoke-WebRequest 'https://www.nuget.org/nuget.exe' -OutFile '%NUGET%'" :Build_NugetCheck echo TODO: Move to Build_EnvCheck if exist %NUGET% goto Build_Before echo. echo NUGET not installed! goto Build_End :Build_Before call e5r env boot call e5r env install --version 1.0.0-beta3 -runtime CLR -x86 call e5r env use --version 1.0.0-beta3 -runtime CLR -x86 echo TODO: Delete packages.config and use install Sake here call "%NUGET%" install -OutputDirectory %PACKAGESPATH% -ExcludeVersion .\packages.config :Build echo Building... call "%PACKAGESPATH%\Sake\tools\sake.exe" -I "build" -f makefile.shade %* :Build_End ``` Use version of file and defaults runtime and arch
```batchfile setlocal set BUILDSTAGE=build-stage set NUGETPATH=%BUILDSTAGE%\.nuget set NUGET=%NUGETPATH%\nuget.exe set PACKAGESPATH=%NUGETPATH%\packages :Build_EnvCheck call e5r 1>nul if "%ERRORLEVEL%"=="0" goto Build_NugetDownload echo. echo E5R Environment not installed! goto Build_End :Build_NugetDownload if exist %NUGET% goto Build_Before echo Downloading NuGet... echo TODO: Move to E5R ENV BOOT --tech aspnet if not exist "%NUGETPATH%" md "%NUGETPATH%" @powershell -NoProfile -ExecutionPolicy unrestricted -Command ^ "$ProgressPreference = 'SilentlyContinue'; Invoke-WebRequest 'https://www.nuget.org/nuget.exe' -OutFile '%NUGET%'" :Build_NugetCheck echo TODO: Move to Build_EnvCheck if exist %NUGET% goto Build_Before echo. echo NUGET not installed! goto Build_End :Build_Before call e5r env boot call e5r env install call e5r env use echo TODO: Delete packages.config and use install Sake here call "%NUGET%" install -OutputDirectory %PACKAGESPATH% -ExcludeVersion .\packages.config :Build echo Building... call "%PACKAGESPATH%\Sake\tools\sake.exe" -I "build" -f makefile.shade %* :Build_End ```
93595d7d-704a-4094-9252-c58c95d523fb
{ "language": "Batchfile" }
```batchfile @echo off rem installer bug. http://stackoverflow.com/a/25095327 mkdir "%APPDATA%\npm" > NUL 2>&1 set PATH=node_modules\.bin;node_modules\lisb-hubot\node_modules\.bin;%PATH% call npm install for /f "delims=\" %%i in ("%CD%") do set UID=%%i if "%REDIS_URL%" == "" ( set REDIS_URL=redis://localhost:6379/%UID% ) if "%1" == "start" ( forever start ^ --uid "%UID%" ^ --minUptime 10000 --spinSleepTime 600000 ^ -o hubot.log -a ^ -w --watchDirectory scripts ^ -c coffee node_modules\.bin\hubot.cmd -a direct %* ) else if "%1" == "stop" ( forever stop "%UID%" ) else if "%1" == "restart" ( forever restart "%UID%" ) else if "%1" == "status" ( forever list | find "] %UID% " ) else if "%1" == "logs" ( cat hubot.log | more ) else ( node_modules\.bin\hubot.cmd -a direct %* ) ``` Load .env file on windows.
```batchfile @echo off rem installer bug. http://stackoverflow.com/a/25095327 mkdir "%APPDATA%\npm" > NUL 2>&1 set PATH=node_modules\.bin;node_modules\lisb-hubot\node_modules\.bin;%PATH% call npm install for /f "delims=\" %%i in ("%CD%") do set UID=%%i for /f "tokens=1,2 delims==" %%i in (.env) do set %%i=%%j if "%REDIS_URL%" == "" ( set REDIS_URL=redis://localhost:6379/%UID% ) if "%1" == "start" ( forever start ^ --uid "%UID%" ^ --minUptime 10000 --spinSleepTime 600000 ^ -o hubot.log -a ^ -w --watchDirectory scripts ^ -c coffee node_modules\.bin\hubot.cmd -a direct %* ) else if "%1" == "stop" ( forever stop "%UID%" ) else if "%1" == "restart" ( forever restart "%UID%" ) else if "%1" == "status" ( forever list | find "] %UID% " ) else if "%1" == "logs" ( cat hubot.log | more ) else ( node_modules\.bin\hubot.cmd -a direct %* ) ```
07a8d8c0-f42f-40b4-bfc7-5685926bc79d
{ "language": "Batchfile" }
```batchfile ``` Add sript to set APIs used by E2E Apps
```batchfile @echo off if "%1" == "" goto :Error goto :Start :Error echo usage: %0 ^<application name^> echo where application name is a azure mobile Service app. goto :TheEnd :Start call azure mobile api create %1 admin --permissions *=admin call azure mobile api create %1 application --permissions *=application call azure mobile api create %1 user --permissions *=user call azure mobile api create %1 public --permissions *=public call azure mobile api create %1 shared --permissions *=admin call azure mobile api create %1 movieFinder --permissions *=application call azure mobile script upload %1 api/admin.js -f admin.js call azure mobile script upload %1 api/application.js -f application.js call azure mobile script upload %1 api/user.js -f user.js call azure mobile script upload %1 api/public.js -f public.js call azure mobile script upload %1 api/shared.js -f shared.js call azure mobile script upload %1 api/moviefinder.js -f moviefinder.js :TheEnd ```
88b19cc5-cfaf-4266-a228-92d630221943
{ "language": "Batchfile" }
```batchfile ``` Add script to plot dependency graph via cmake --graphviz
```batchfile @echo off if not exist CMakeCache.txt ( echo Run this script from the CMake build folder exit /b ) if not exist graphviz mkdir graphviz cmake --graphviz=.\graphviz\deps.dot . && dot -Tpng -Gdpi=100 .\graphviz\deps.dot > deps.png && deps.png ```
92939d36-b2e2-4abc-8bbd-94521413bdff
{ "language": "Batchfile" }
```batchfile @..\..\..\third_party\python_24\python.exe run_webkit_tests.py %* ``` Make run_webkit_test.bat workable even if we execute it on a directory other than webkit\tools\layout_tests\.
```batchfile @%~dp0\..\..\..\third_party\python_24\python.exe %~dp0\run_webkit_tests.py %* ```
3077c724-46ea-4eac-afd1-b6872adbaa6b
{ "language": "Batchfile" }
```batchfile @echo off call "..\VsDevCmd.cmd" set platform="%1" if "%1" == "AnyCPU" ( set platform="x86" ) for /r ..\..\Tests\Magick.NET.Tests\bin %%a in (*.dll) do ( if "%%~nxa"=="Magick.NET.Tests.dll" ( echo "Running tests from: %%~dpnxa" vstest.console /inIsolation /platform:%platform% /logger:AppVeyor %%~dpnxa if %errorlevel% neq 0 exit /b %errorlevel% ) ) ``` Use a different version of vstest.console to make sure the exit code is correct.
```batchfile @echo off call "..\VsDevCmd.cmd" set platform="%1" if "%1" == "AnyCPU" ( set platform="x86" ) set vstest="%VSINSTALLDIR%Common7\IDE\CommonExtensions\Microsoft\TestWindow\vstest.console.exe" for /r ..\..\Tests\Magick.NET.Tests\bin %%a in (*.dll) do ( if "%%~nxa"=="Magick.NET.Tests.dll" ( echo "Running tests from: %%~dpnxa" %vstest% %%~dpnxa /inIsolation /platform:%platform% /TestAdapterPath:%%~dpa /logger:AppVeyor if %errorlevel% neq 0 exit /b %errorlevel% ) ) ```
5de79595-94eb-4254-b31f-fb0130ebe39e
{ "language": "Batchfile" }
```batchfile @rem *************************************************************************** @rem (C) Copyright 2016 Jerome Comte and Dorian Cransac @rem @rem This file is part of STEP @rem @rem STEP is free software: you can redistribute it and/or modify @rem it under the terms of the GNU Affero General Public License as published by @rem the Free Software Foundation, either version 3 of the License, or @rem (at your option) any later version. @rem @rem STEP 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 STEP. If not, see <http://www.gnu.org/licenses/>. @rem *************************************************************************** rem @echo off TITLE STEP MongoDB SET MONGO_PATH= rem if mongod.exe isn't on your path, then set your own as follows (watch for the backslash and double quote at the end): rem SET MONGO_PATH="D:\Program Files\MongoDB\Server\3.0\bin"\ for /f "skip=1" %%x in ('wmic os get localdatetime') do if not defined mydate set mydate=%%x %MONGO_PATH%mongod.exe -dbpath ..\data\mongodb > mongod_%mydate%.log 2>&1 ``` Put MongoDB log files in the log folder
```batchfile @rem *************************************************************************** @rem (C) Copyright 2016 Jerome Comte and Dorian Cransac @rem @rem This file is part of STEP @rem @rem STEP is free software: you can redistribute it and/or modify @rem it under the terms of the GNU Affero General Public License as published by @rem the Free Software Foundation, either version 3 of the License, or @rem (at your option) any later version. @rem @rem STEP 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 STEP. If not, see <http://www.gnu.org/licenses/>. @rem *************************************************************************** rem @echo off TITLE STEP MongoDB SET MONGO_PATH= rem if mongod.exe isn't on your path, then set your own as follows (watch for the backslash and double quote at the end): rem SET MONGO_PATH="D:\Program Files\MongoDB\Server\3.0\bin"\ for /f "skip=1" %%x in ('wmic os get localdatetime') do if not defined mydate set mydate=%%x %MONGO_PATH%mongod.exe -dbpath ..\data\mongodb > ..\log\mongod_%mydate%.log 2>&1 ```
65419402-823c-48a4-8fbe-9340aa453bc9
{ "language": "Batchfile" }
```batchfile msbuild /p:Configuration=Release NSISInfoWriter.sln ilrepack /targetplatform:v4 ^ /out:target\nsisiw.exe ^ /parallel ^ "%~dp0\NSISInfoWriter\bin\Release\nsisiw.exe" ^ "%~dp0\NSISInfoWriter\bin\Release\CommandLine.dll"``` Disable debug information generation when using ilrepack
```batchfile msbuild /p:Configuration=Release NSISInfoWriter.sln ilrepack /targetplatform:v4 ^ /out:target\nsisiw.exe ^ /parallel ^ /ndebug ^ "%~dp0\NSISInfoWriter\bin\Release\nsisiw.exe" ^ "%~dp0\NSISInfoWriter\bin\Release\CommandLine.dll"```
0b69e892-4c31-4e72-b2da-db6737e408d9
{ "language": "Batchfile" }
```batchfile md build cd build cmake -DLIBWS_WITH_AUTOBAHN=ON .. cmake --build . ctest bin\Debug\autobahntest.exe --config ..\test\autobahn\libws.cfg ``` Update the jenkins build to build Libevent.
```batchfile cd deps cd libevent md build cd build cmake -DEVENT__DISABLE_TESTS=ON -DEVENT__DISABLE_REGRESS=ON -DEVENT__DISABLE_BENCHMARK=ON .. cd .. cd .. cd .. md build cd build cmake -DLibevent_DIR=deps/libevent/build/ -DLIBWS_WITH_AUTOBAHN=ON .. cmake --build . ctest bin\Debug\autobahntest.exe --config ..\test\autobahn\libws.cfg ```
0ca486f2-aabf-4dfc-a9b1-072624c44d97
{ "language": "Batchfile" }
```batchfile @ECHO off REM This suite requires https://github.com/inkarkat/runVimTests to run ../../runVimTests/bin/runVimTests.cmd --pure vimgrep.suite ``` Add an option to clean the test directory
```batchfile @ECHO off REM This suite requires https://github.com/inkarkat/runVimTests to run if %1.==clean. goto Clean if %1.==run. goto Run echo "usage: runall.bat clean|run" goto End :Clean echo Cleaning del /Q *.out 2> nul del /Q *.msgout 2> nul goto End :Run echo Running ../../runVimTests/bin/runVimTests.cmd --pure vimgrep.suite goto End :End ```
718d8468-5486-4b36-84c0-fe486af77767
{ "language": "Batchfile" }
```batchfile @echo off echo. echo James Build System echo ------------------- set ANT_HOME=tools set CLASSPATH=lib\xerces.jar %ANT_HOME%\bin\ant.bat -emacs %1 %2 %3 %4 %5 %6 %7 %8 goto cleanup :cleanup set ANT_HOME= ``` Use velocity and jdom that was copied from jakarta-site2
```batchfile @echo off echo. echo James Build System echo ------------------- set ANT_HOME=tools set CLASSPATH=lib\xerces-1.4.3.jar;tools\lib\velocity-1.3-dev.jar;tools\lib\jdom-b7.jar %ANT_HOME%\bin\ant.bat -emacs %1 %2 %3 %4 %5 %6 %7 %8 goto cleanup :cleanup set ANT_HOME= ```
c3cbf5a9-bab8-4c91-bd10-ee313d1e1a82
{ "language": "Batchfile" }
```batchfile @echo off echo *** Building Microsoft.Bot.Builder.History setlocal setlocal enabledelayedexpansion setlocal enableextensions set errorlevel=0 mkdir ..\nuget erase /s ..\nuget\Microsoft.Bot.Builder.History*nupkg msbuild /property:Configuration=release Microsoft.Bot.Builder.History.csproj for /f %%v in ('powershell -noprofile "(Get-Command .\bin\release\Microsoft.Bot.Builder.dll).FileVersionInfo.FileVersion"') do set builder=%%v for /f %%v in ('powershell -noprofile "(Get-Command .\bin\release\Microsoft.Bot.Builder.History.dll).FileVersionInfo.FileVersion"') do set version=%%v ..\..\packages\NuGet.CommandLine.3.4.3\tools\NuGet.exe pack Microsoft.Bot.Builder.History.nuspec -symbols -properties version=%version%;builder=%builder% -OutputDirectory ..\nuget echo *** Finished building Microsoft.Bot.Builder.History ``` Update nuget commandline tool to 4.1.0 for bot.builder.history
```batchfile @echo off echo *** Building Microsoft.Bot.Builder.History setlocal setlocal enabledelayedexpansion setlocal enableextensions set errorlevel=0 mkdir ..\nuget erase /s ..\nuget\Microsoft.Bot.Builder.History*nupkg msbuild /property:Configuration=release Microsoft.Bot.Builder.History.csproj for /f %%v in ('powershell -noprofile "(Get-Command .\bin\release\Microsoft.Bot.Builder.dll).FileVersionInfo.FileVersion"') do set builder=%%v for /f %%v in ('powershell -noprofile "(Get-Command .\bin\release\Microsoft.Bot.Builder.History.dll).FileVersionInfo.FileVersion"') do set version=%%v ..\..\packages\NuGet.CommandLine.4.1.0\tools\NuGet.exe pack Microsoft.Bot.Builder.History.nuspec -symbols -properties version=%version%;builder=%builder% -OutputDirectory ..\nuget echo *** Finished building Microsoft.Bot.Builder.History ```
bc0a9c8e-32d1-4b98-8b3c-6887b9921d13
{ "language": "Batchfile" }
```batchfile @echo off setlocal set COLLECOTR_PROCESS_TITLE=Skywalking-Collector set COLLECTOR_BASE_PATH=%~dp0%.. set COLLECTOR_RUNTIME_OPTIONS="-Xms256M -Xmx512M" set CLASSPATH=%COLLECTOR_BASE_PATH%\config; SET CLASSPATH=%COLLECTOR_BASE_PATH%\libs\*;%CLASSPATH% if ""%JAVA_HOME%"" == """" ( set _EXECJAVA=java ) else ( set _EXECJAVA="%JAVA_HOME%"/bin/java ) start /MIN "%COLLECOTR_PROCESS_TITLE%" %_EXECJAVA% "%COLLECTOR_RUNTIME_OPTIONS%" -cp "%CLASSPATH%" org.skywalking.apm.collector.worker.CollectorBootStartUp & echo Collector started successfully! endlocal ``` Fix windows script start collector failure.
```batchfile @echo off setlocal set COLLECOTR_PROCESS_TITLE=Skywalking-Collector set COLLECTOR_BASE_PATH=%~dp0%.. set COLLECTOR_RUNTIME_OPTIONS="-Xms256M -Xmx512M" set CLASSPATH=%COLLECTOR_BASE_PATH%\config; SET CLASSPATH=%COLLECTOR_BASE_PATH%\libs\*;%CLASSPATH% if defined JAVA_HOME ( set _EXECJAVA="%JAVA_HOME:"=%"\bin\java ) if not defined JAVA_HOME ( echo "JAVA_HOME not set." set _EXECJAVA=java ) start /MIN "%COLLECOTR_PROCESS_TITLE%" %_EXECJAVA% "%COLLECTOR_RUNTIME_OPTIONS%" -cp "%CLASSPATH%" org.skywalking.apm.collector.worker.CollectorBootStartUp & echo Collector started successfully! endlocal ```
63ebe22a-a674-40f1-ae6d-1b326ba71942
{ "language": "Batchfile" }
```batchfile @if not exist "%HOME%" @set HOME=%HOMEDRIVE%%HOMEPATH% @if not exist "%HOME%" @set HOME=%USERPROFILE% @set BASE_DIR=%HOME%\.spf13-vim-3 call git clone --recursive -b 3.0 git://github.com/spf13/spf13-vim.git "%BASE_DIR%" call mkdir "%BASE_DIR%\.vim\bundle" call mklink /J "%HOME%\.vim" "%BASE_DIR%\.vim" call mklink "%HOME%\.vimrc" "%BASE_DIR%\.vimrc" call mklink "%HOME%\_vimrc" "%BASE_DIR%\.vimrc" call mklink "%HOME%\.vimrc.bundles" "%BASE_DIR%\.vimrc.bundles" call git clone http://github.com/gmarik/vundle.git "%HOME%/.vim/bundle/vundle" call vim -u "%BASE_DIR%/.vimrc.bundles" +BundleInstall! +BundleClean +qall ``` Make Windows Installer more robust & auto updating
```batchfile @if not exist "%HOME%" @set HOME=%HOMEDRIVE%%HOMEPATH% @if not exist "%HOME%" @set HOME=%USERPROFILE% @set BASE_DIR=%HOME%\.spf13-vim-3 IF NOT EXIST "%BASE_DIR%" ( call git clone --recursive -b 3.0 https://github.com/spf13/spf13-vim.git "%BASE_DIR%" ) ELSE ( @set ORIGINAL_DIR=%CD% echo updating spf13-vim chdir /d "%BASE_DIR%" call git pull chdir /d "%ORIGINAL_DIR%" call cd "%BASE_DIR%" ) call mklink "%HOME%\.vimrc" "%BASE_DIR%\.vimrc" call mklink "%HOME%\_vimrc" "%BASE_DIR%\.vimrc" call mklink "%HOME%\.vimrc.fork" "%BASE_DIR%\.vimrc.fork" call mklink "%HOME%\.vimrc.bundles" "%BASE_DIR%\.vimrc.bundles" call mklink "%HOME%\.vimrc.bundles.fork" "%BASE_DIR%\.vimrc.bundles.fork" call mklink /J "%HOME%\.vim" "%BASE_DIR%\.vim" IF NOT EXIST "%BASE_DIR%\.vim\bundle" ( call mkdir "%BASE_DIR%\.vim\bundle" ) IF NOT EXIST "%HOME%/.vim/bundle/vundle" ( call git clone https://github.com/gmarik/vundle.git "%HOME%/.vim/bundle/vundle" ) call vim -u "%BASE_DIR%/.vimrc.bundles" +BundleInstall! +BundleClean +qall ```
a00e396a-ec2b-4880-a46b-ddd250d3ad6e
{ "language": "Batchfile" }
```batchfile @echo off echo Compiling... cd windeployqt qmake windeployqt.pro IF ERRORLEVEL ==1 GOTO :ERROR mingw32-make.exe release IF ERRORLEVEL ==1 GOTO :ERROR cd .. qmake presi-aoke.pro IF ERRORLEVEL ==1 GOTO :ERROR mingw32-make.exe release IF ERRORLEVEL ==1 GOTO :ERROR echo Copying files to staging del /Q /S .\staging mkdir .\staging copy .\release\presi-aoke.exe .\staging echo Copying qt libraries to staging .\windeployqt\release\windeployqt.exe .\staging\presi-aoke.exe -no-translations -no-webkit2 -opengl echo Creating installer if exist "C:\Program Files (x86)\NSIS\makensis.exe" (set nsis="C:\Program Files (x86)\NSIS\makensis.exe") else (set nsis="C:\Program Files\NSIS\makensis.exe") %nsis% presi-aoke.nsi IF ERRORLEVEL ==1 GOTO :ERROR echo Build complete EXIT /B 0 :ERROR ECHO Build failed. EXIT /B 1 ``` Trim down the Windows installer size
```batchfile @echo off echo Compiling... cd windeployqt qmake windeployqt.pro IF ERRORLEVEL ==1 GOTO :ERROR mingw32-make.exe release IF ERRORLEVEL ==1 GOTO :ERROR cd .. qmake presi-aoke.pro IF ERRORLEVEL ==1 GOTO :ERROR mingw32-make.exe release IF ERRORLEVEL ==1 GOTO :ERROR echo Copying files to staging del /Q /S .\staging mkdir .\staging copy .\release\presi-aoke.exe .\staging echo Copying qt libraries to staging .\windeployqt\release\windeployqt.exe .\staging\presi-aoke.exe -no-translations -no-webkit -no-webkit2 -no-opengl -no-svg rem Trim a bunch of plugins that we don't use del /Q /S .\staging\iconengines erase .\staging\imageformats\qdds*.dll .\staging\imageformats\qicns*.dll .\staging\imageformats\qico*.dll .\staging\imageformats\qjp2*.dll .\staging\imageformats\qmng*.dll .\staging\imageformats\qsvg*.dll .\staging\imageformats\qtga*.dll .\staging\imageformats\qtiff*.dll .\staging\imageformats\qweb*.dll erase .\staging\imageformats\qgifd.dll .\staging\imageformats\qjpegd.dll .\staging\imageformats\qwbmpd.dll echo Creating installer if exist "C:\Program Files (x86)\NSIS\makensis.exe" (set nsis="C:\Program Files (x86)\NSIS\makensis.exe") else (set nsis="C:\Program Files\NSIS\makensis.exe") %nsis% presi-aoke.nsi IF ERRORLEVEL ==1 GOTO :ERROR echo Build complete EXIT /B 0 :ERROR ECHO Build failed. EXIT /B 1 ```
bd10dc02-10cd-46b8-8579-5555e1661513
{ "language": "Batchfile" }
```batchfile @echo off if "%~1" == "" ( echo Usage: release_win.bat path-to-bin-folder goto end ) setlocal set destroot=%cd%\%~1 set DESTDIR= mkdir build cd build del CMakeCache.txt rem make sure to use default settings cmake -D CMAKE_INSTALL_PREFIX=%destroot%\x64 -D COMPILER=ICC -G "Visual Studio 12 2013 Win64" .. ICProjConvert150 embree.sln /IC /s /f cmake --build . --config Release --target INSTALL -- /m cmake --build . --config Release --target PACKAGE -- /m copy embree*.exe %destroot% cd .. mkdir build32 cd build32 del CMakeCache.txt rem make sure to use default settings cmake -D CMAKE_INSTALL_PREFIX=%destroot%\win32 -D COMPILER=ICC -G "Visual Studio 12 2013" .. ICProjConvert150 embree.sln /IC /s /f cmake --build . --config Release --target INSTALL -- /m cmake --build . --config Release --target PACKAGE -- /m copy embree*.exe %destroot% cd .. endlocal :end ``` Check for errors regarding ICProjConvert150
```batchfile @echo off if "%~1" == "" ( echo Usage: release_win.bat path-to-bin-folder goto end ) setlocal set destroot=%cd%\%~1 set DESTDIR= mkdir build cd build del CMakeCache.txt rem make sure to use default settings cmake -D CMAKE_INSTALL_PREFIX=%destroot%\x64 -D COMPILER=ICC -G "Visual Studio 12 2013 Win64" .. ICProjConvert150 embree.sln /IC /s /f if %ERRORLEVEL%==9009 ( echo Problems converting the project to ICC, aborting goto abort ) cmake --build . --config Release --target INSTALL -- /m cmake --build . --config Release --target PACKAGE -- /m copy embree*.exe %destroot% cd .. mkdir build32 cd build32 del CMakeCache.txt rem make sure to use default settings cmake -D CMAKE_INSTALL_PREFIX=%destroot%\win32 -D COMPILER=ICC -G "Visual Studio 12 2013" .. ICProjConvert150 embree.sln /IC /s /f if %ERRORLEVEL%==9009 ( echo Problems converting the project to ICC, aborting goto abort ) cmake --build . --config Release --target INSTALL -- /m cmake --build . --config Release --target PACKAGE -- /m copy embree*.exe %destroot% cd .. :abort endlocal :end ```
78033a57-82fc-4adf-93c9-cab11799f9bd
{ "language": "Batchfile" }
```batchfile @echo off setlocal set PATH=C:\Program Files (x86)\Git\bin\;%PATH% call "C:\Program Files (x86)\Microsoft Visual Studio 12.0\vc\vcvarsall.bat" x86 msbuild /tv:12.0 /p:BuildSignedSharpDX=false /t:RunCertificationTests /verbosity:quiet /clp:ErrorsOnly /fl /flp:Summary;Verbosity=minimal;logfile=BuildErrors.log;Append=true %* d:\Artiom\Projects\SharpDX\SharpDX.build ``` Fix path to SharpDX.build for certification tests.
```batchfile @echo off setlocal set PATH=C:\Program Files (x86)\Git\bin\;%PATH% call "C:\Program Files (x86)\Microsoft Visual Studio 12.0\vc\vcvarsall.bat" x86 msbuild /tv:12.0 /p:BuildSignedSharpDX=false /t:RunCertificationTests /verbosity:quiet /clp:ErrorsOnly /fl /flp:Summary;Verbosity=minimal;logfile=BuildErrors.log;Append=true %* SharpDX.build ```
d99dfc04-7fac-4811-848f-38dac562631f
{ "language": "Batchfile" }
```batchfile @ECHO off REM This suite requires https://github.com/inkarkat/runVimTests to run if %1.==clean. goto Clean if %1.==run. goto Run echo "usage: runall.bat clean|run" goto End :Clean echo Cleaning del /Q *.out 2> nul del /Q *.msgout 2> nul goto End :Run echo Running ../../runVimTests/bin/runVimTests.cmd --pure vimgrep.suite goto End :End ``` Add an argument to run only certain tests
```batchfile @ECHO off REM This suite requires https://github.com/inkarkat/runVimTests to run if %1.==clean. goto Clean if %1.==run. goto Run if %1.==runall. goto RunAll echo "usage: runall.bat clean|run|runall" goto End :Clean echo Cleaning del /Q *.out 2> nul del /Q *.msgout 2> nul goto End :Run shift echo Running %1 %2 %3 %4 %5 %6 %7 %8 %9 ../../runVimTests/bin/runVimTests.cmd --pure %1 %2 %3 %4 %5 %6 %7 %8 %9 goto End :RunAll echo Running all ../../runVimTests/bin/runVimTests.cmd --pure vimgrep.suite goto End :End ```
b179a9cd-b042-4a1b-83cb-97bd0116b31e
{ "language": "Batchfile" }
```batchfile @echo off setlocal EnableDelayedExpansion set registryRoot=HKCU\Software\Classes set key=TortoiseGit reg add "%registryRoot%\*\shellex\ContextMenuHandlers\%key%" /d "---" /f reg add "%registryRoot%\Directory\Background\shellex\ContextMenuHandlers\%key%" /d "---" /f reg add "%registryRoot%\Directory\shellex\ContextMenuHandlers\%key%" /d "---" /f reg add "%registryRoot%\Drive\shellex\ContextMenuHandlers\%key%" /d "---" /f reg add "%registryRoot%\Folder\shellex\ContextMenuHandlers\%key%" /d "---" /f ``` Disable tortoise git context menu on more types
```batchfile @echo off setlocal EnableDelayedExpansion set registryRoot=HKCU\Software\Classes set key=TortoiseGit reg add "%registryRoot%\*\shellex\ContextMenuHandlers\%key%" /d "---" /f reg add "%registryRoot%\Directory\Background\shellex\ContextMenuHandlers\%key%" /d "---" /f reg add "%registryRoot%\Directory\shellex\ContextMenuHandlers\%key%" /d "---" /f reg add "%registryRoot%\Drive\shellex\ContextMenuHandlers\%key%" /d "---" /f reg add "%registryRoot%\Folder\shellex\ContextMenuHandlers\%key%" /d "---" /f reg add "%registryRoot%\InternetShortcut\shellex\ContextMenuHandlers\%key%" /d "---" /f reg add "%registryRoot%\LibraryFolder\background\shellex\ContextMenuHandlers\%key%" /d "---" /f reg add "%registryRoot%\LibraryLocation\shellex\ContextMenuHandlers\%key%" /d "---" /f reg add "%registryRoot%\lnkfile\shellex\ContextMenuHandlers\%key%" /d "---" /f ```
62ebdf4a-ca50-42d2-bd42-66b3271bbabf
{ "language": "Batchfile" }
```batchfile call sbt assembly del greedy.zip java -jar out/proguard5.0/lib/proguard.jar @proguard.config "C:\Program Files\7-Zip\7za.exe" a -tzip greedy.zip greedy.jar PAUSE``` Delete jar after packaging in zip
```batchfile call sbt assembly del greedy.zip java -jar out/proguard5.0/lib/proguard.jar @proguard.config "C:\Program Files\7-Zip\7za.exe" a -tzip greedy.zip greedy.jar del greedy.jar PAUSE```
d4db3cb1-57f4-4efd-ac65-4fc30920b306
{ "language": "Batchfile" }
```batchfile rem ba.bat - download and build all of scintilla and scite rd /s/q scintilla scite cvs co scintilla scite cd scintilla call delbin del/q bin\*.a call delcvs call zipsrc cd win32 nmake -f scintilla.mak cd .. cd .. cd scite del/q bin\*.properties del/q bin\SciTE call delbin call delcvs call zipsrc cd win32 nmake -f scite.mak cd .. call upxsc1 call zipwscite call delbin cd .. cd scintilla call delbin cd .. ``` Delete pdb files so they are not included in source zips.
```batchfile rem ba.bat - download and build all of scintilla and scite rd /s/q scintilla scite cvs co scintilla scite cd scintilla call delbin del/q bin\*.a call delcvs call zipsrc cd win32 nmake -f scintilla.mak cd .. del/q bin\*.pdb cd .. cd scite del/q bin\*.properties del/q bin\SciTE call delbin call delcvs call zipsrc cd win32 nmake -f scite.mak cd .. call upxsc1 call zipwscite call delbin cd .. cd scintilla call delbin cd .. ```
a87f0c93-bd96-427a-beb3-4a6e2e171949
{ "language": "Batchfile" }
```batchfile for /f %%c in ('wmic cpu get NumberOfCores ^| findstr [0-9]') do set "CORES=%%c" set SOURCE_DIR=%CD% set BUILD_DIR=../build-sqlitewrapper set CMAKE_COMMAND=cmake.exe set MAKE_COMMAND=C:\Qt-Installation\Tools\QtCreator\bin\jom.exe /J %CORES% call "C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\Tools\VsDevCmd.bat" python projectfiles_unchanged.py if %ERRORLEVEL% NEQ 0 ( RMDIR /S /Q "%BUILD_DIR%" ) if not exist "%BUILD_DIR%" mkdir "%BUILD_DIR%" cd "%BUILD_DIR%" || goto error %CMAKE_COMMAND% -DCMAKE_BUILD_TYPE=Release -G "NMake Makefiles" "%SOURCE_DIR%" || goto error %MAKE_COMMAND% || goto error cd "%SOURCE_DIR%" goto :EOF :error cd "%SOURCE_DIR%" exit /b 1 ``` Move build type variables to the top
```batchfile set BUILD_DIR=../build-sqlitewrapper set CMAKE_BUILD_TYPE=Release for /f %%c in ('wmic cpu get NumberOfCores ^| findstr [0-9]') do set "CORES=%%c" set SOURCE_DIR=%CD% set CMAKE_COMMAND=cmake.exe set MAKE_COMMAND=C:\Qt-Installation\Tools\QtCreator\bin\jom.exe /J %CORES% call "C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\Tools\VsDevCmd.bat" python projectfiles_unchanged.py if %ERRORLEVEL% NEQ 0 ( RMDIR /S /Q "%BUILD_DIR%" ) if not exist "%BUILD_DIR%" mkdir "%BUILD_DIR%" cd "%BUILD_DIR%" || goto error %CMAKE_COMMAND% -DCMAKE_BUILD_TYPE=%CMAKE_BUILD_TYPE% -G "NMake Makefiles" "%SOURCE_DIR%" || goto error %MAKE_COMMAND% || goto error cd "%SOURCE_DIR%" goto :EOF :error cd "%SOURCE_DIR%" exit /b 1 ```
bbdb6150-7d41-4d9f-8f1d-a2318d373be3
{ "language": "Batchfile" }
```batchfile set SOURCE_DIR=%CD% set BUILD_DIR=build-sqlitewrapper set CMAKE_COMMAND=cmake.exe set MAKE_COMMAND=mingw32-make.exe -j2 cd .. if not exist "%BUILD_DIR%" mkdir "%BUILD_DIR%" cd "%BUILD_DIR%" || goto error %CMAKE_COMMAND% -G "MinGW Makefiles" "%SOURCE_DIR%" || goto error %MAKE_COMMAND% || goto error cd "%SOURCE_DIR%" exit /b 0 :error cd "%SOURCE_DIR%" exit /b 1 ``` Convert Windows build script to MSVC
```batchfile set SOURCE_DIR=%CD% set BUILD_DIR=build-sqlitewrapper set CMAKE_COMMAND=cmake.exe set MAKE_COMMAND=C:\Qt\Tools\QtCreator\bin\jom.exe /J 2 call "C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\Tools\VsDevCmd.bat" cd .. if not exist "%BUILD_DIR%" mkdir "%BUILD_DIR%" cd "%BUILD_DIR%" || goto error %CMAKE_COMMAND% -DCMAKE_BUILD_TYPE=Release -G "NMake Makefiles" "%SOURCE_DIR%" || goto error %MAKE_COMMAND% || goto error cd "%SOURCE_DIR%" exit /b 0 :error cd "%SOURCE_DIR%" exit /b 1 ```
177aea4d-ad2a-4367-a7c5-ee4c2697481b
{ "language": "Batchfile" }
```batchfile @echo off rem rem Extra installation script rem rem See CK LICENSE.txt for licensing details. rem See CK Copyright.txt for copyright details. rem rem Developer(s): Grigori Fursin, 2016-2017 rem rem ############################################################ echo. echo Preparing vars ... cd %INSTALL_DIR%\%PACKAGE_SUB_DIR% mingw32-make PREFIX="%INSTALL_DIR%\install" BINARY=%CK_TARGET_CPU_BITS% ONLY_CBLAS=1 MAKE=mingw32-make.exe CFLAGS="-DMS_ABI" NOFORTRAN=1 NO_LAPACK=1 if %errorlevel% neq 0 ( echo. echo Error: make failed! goto err ) mingw32-make install PREFIX="%INSTALL_DIR%\install" if %errorlevel% neq 0 ( echo. echo Error: make install failed! goto err ) exit /b 0 ``` Fix OpenBLAS build on Windows
```batchfile @echo off rem rem Extra installation script rem rem See CK LICENSE.txt for licensing details. rem See CK Copyright.txt for copyright details. rem rem Developer(s): Grigori Fursin, 2016-2017 rem rem ############################################################ echo. echo Preparing vars ... cd %INSTALL_DIR%\%PACKAGE_SUB_DIR% rem mingw32-make PREFIX="%INSTALL_DIR%\install" BINARY=%CK_TARGET_CPU_BITS% ONLY_CBLAS=1 MAKE=mingw32-make.exe CFLAGS="-DMS_ABI" NOFORTRAN=1 NO_LAPACK=1 make PREFIX="%INSTALL_DIR%\install" BINARY=%CK_TARGET_CPU_BITS% CC=gcc FC=gfortran if %errorlevel% neq 0 ( echo. echo Error: make failed! goto err ) mingw32-make install PREFIX="%INSTALL_DIR%\install" if %errorlevel% neq 0 ( echo. echo Error: make install failed! goto err ) exit /b 0 ```
b57b8fa8-204d-423a-bcbc-688b44a62ec4
{ "language": "Batchfile" }
```batchfile @echo off :: Copyright (c) 2012 The The Chromium Authors. All rights reserved. :: Use of this source code is governed by a BSD-style license that can be :: found in the LICENSE file. setlocal :: TODO(noelallen) Share list with POSIX gcl try %* -b naclsdkm-mac -b naclsdkm-linux -b naclsdkm-linux ^ -b naclsdkm-pnacl-linux -b naclsdkm-pnacl-mac -b naclsdkm-windows32 ^ -b naclsdkm-windows64 -S svn://svn.chromium.org/chrome-try/try-nacl``` Fix Windows bat file for SDK try
```batchfile @echo off :: Copyright (c) 2012 The The Chromium Authors. All rights reserved. :: Use of this source code is governed by a BSD-style license that can be :: found in the LICENSE file. setlocal :: TODO(noelallen) Share list with POSIX gcl try %* -b naclsdkm-mac -b naclsdkm-linux -b naclsdkm-pnacl-linux ^ -b naclsdkm-windows32 -b naclsdkm-windows64 ^ -S svn://svn.chromium.org/chrome-try/try-nacl ```
59db01ec-ec26-4e3c-ad13-0e53683dff9b
{ "language": "Batchfile" }
```batchfile @echo off setlocal if not defined VisualStudioVersion ( if defined VS140COMNTOOLS ( call "%VS140COMNTOOLS%\VsDevCmd.bat" goto :EnvSet ) if defined VS120COMNTOOLS ( call "%VS120COMNTOOLS%\VsDevCmd.bat" goto :EnvSet ) echo Error: %~nx0 requires Visual Studio 2013 or 2015. echo Please see https://github.com/dotnet/wcf/blob/master/Documentation/developer-guide.md for build instructions. exit /b 1 ) :EnvSet :: Log build command line set _buildproj=%~dp0..\CertificateGenerator\CertificateGenerator.sln set _buildlog=%~dp0..\..\..\..\msbuildCertificateGenerator.log set _buildprefix=echo set _buildpostfix=^> "%_buildlog%" set cmd=msbuild /p:Configuration=Release /t:restore;build "%_buildproj%" /nologo /maxcpucount /verbosity:minimal /nodeReuse:false /fileloggerparameters:Verbosity=diag;LogFile="%_buildlog%";Append %* echo %cmd% %cmd% set BUILDERRORLEVEL=%ERRORLEVEL% :AfterBuild echo. :: Pull the build summary from the log file findstr /ir /c:".*Warning(s)" /c:".*Error(s)" /c:"Time Elapsed.*" "%_buildlog%" echo Build Exit Code = %BUILDERRORLEVEL% exit /b %BUILDERRORLEVEL% ``` Fix script to require VS 2019.
```batchfile @echo off setlocal if not defined VisualStudioVersion ( if defined VS160COMNTOOLS ( call "%VS160COMNTOOLS%\VsDevCmd.bat" goto :EnvSet ) echo Error: %~nx0 requires Visual Studio 2019 because the .NET Core 3.0 SDK is needed. echo Please see https://github.com/dotnet/wcf/blob/master/Documentation/developer-guide.md for build instructions. exit /b 1 ) :EnvSet :: Log build command line set _buildproj=%~dp0..\CertificateGenerator\CertificateGenerator.sln set _buildlog=%~dp0..\..\..\..\msbuildCertificateGenerator.log set _buildprefix=echo set _buildpostfix=^> "%_buildlog%" set cmd=msbuild /p:Configuration=Release /t:restore;build "%_buildproj%" /nologo /maxcpucount /verbosity:minimal /nodeReuse:false /fileloggerparameters:Verbosity=diag;LogFile="%_buildlog%";Append %* echo %cmd% %cmd% set BUILDERRORLEVEL=%ERRORLEVEL% :AfterBuild echo. :: Pull the build summary from the log file findstr /ir /c:".*Warning(s)" /c:".*Error(s)" /c:"Time Elapsed.*" "%_buildlog%" echo Build Exit Code = %BUILDERRORLEVEL% exit /b %BUILDERRORLEVEL% ```
b7609d8d-7b2a-406f-bbfa-f3cea8bb9cfa
{ "language": "Batchfile" }
```batchfile set S7Z=%~dp0.\bin\7za.exe mkdir Package copy Source\*.txt Package\ copy Source\*LICENSE* Package\ copy Source\*README* Package\ "%S7Z%" x -oPackage Build\package-*.7z echo [Paths]>>Package\bin\qt.conf echo Prefix=..>>Package\bin\qt.conf pushd Package\include for /f "delims=" %%D in ('dir /ad /b /s ^| sort /r') DO @rmdir "%%D" popd move Package "%1" "%S7Z%" a "%1.7z" "%1" ``` Update script, seems to work for Qt-5.7.0 now.
```batchfile set S7Z=%~dp0.\bin\7za.exe mkdir Package copy Source\*.txt Package\ copy Source\*LICENSE* Package\ copy Source\*README* Package\ "%S7Z%" x -oPackage Build\package-*.7z echo [Paths]>>Package\bin\qt.conf echo Prefix=..>>Package\bin\qt.conf pushd Package\include for /f "delims=" %%D in ('dir /ad /b /s ^| sort /r') DO @rmdir "%%D" popd xcopy /e /y Package\lib\cmake\install Package\lib\cmake move Package "%1" "%S7Z%" a "%1.7z" "%1" ```
12ce9ad1-23eb-48be-a630-f2ca46bc47eb
{ "language": "Batchfile" }
```batchfile @echo off set zipcmd=%~dp0\tools\7z\7z.exe pushd %~dp0\..\.. %zipcmd% a -r -x!scripts -xr!.* -x!__pycache__ -x!docs -x!README.md blenderseed-x.x.x.zip blenderseed popd move ..\..\blenderseed-x.x.x.zip . pause ``` Tweak packaging script for spaces in filenames
```batchfile @echo off set zipcmd="%~dp0\tools\7z\7z.exe" pushd %~dp0\..\.. %zipcmd% a -r -x!scripts -xr!.* -x!__pycache__ -x!docs -x!README.md blenderseed-x.x.x.zip blenderseed popd move ..\..\blenderseed-x.x.x.zip . pause ```
188464b5-1e37-4ce8-a36c-19bee45a6703
{ "language": "Batchfile" }
```batchfile ``` Add functional Windows pull script
```batchfile @echo off REM Emacs XCOPY /Y emacs\.emacs "%APPDATA%\.emacs" REM nano XCOPY /Y nano\.nanorc "%USERPROFILE%\.nanorc" REM Vim XCOPY /Y vim\.vimrc "%USERPROFILE%\.vimrc" REM bash XCOPY /Y bash\.bashrc "%USERPROFILE%\.bashrc" XCOPY /Y bash\.bash_aliases "%USERPROFILE%\.bash_aliases" REM Sublime Text 3 MKDIR "%APPDATA%\Sublime Text 3\Packages\Custom Color Schemes\" MKDIR "%APPDATA%\Sublime Text 3\Packages\User\" XCOPY /Y sublime\Preferences.sublime-settings "%APPDATA%\Sublime Text 3\Packages\User\" XCOPY /Y sublime\Default.sublime-keymap "%APPDATA%\Sublime Text 3\Packages\User\" XCOPY /Y sublime\jcd.tmTheme "%APPDATA%\Sublime Text 3\Packages\Custom Color Schemes\" ```
657d8191-0177-4f5d-865d-5a64784b0964
{ "language": "Batchfile" }
```batchfile @echo off cls :start echo Starting server... "Nomad Server\NomadServer.exe" -name "My Oxide Server" -port 5127 -slots 10 -clientVersion "0.607" -password "" -tcpLobby "149.202.51.185" 25565 echo. echo Restarting server... echo. goto start ``` Patch for version 0.608 update
```batchfile @echo off cls :start echo Starting server... "Nomad Server\NomadServer.exe" -name "My Oxide Server" -port 5127 -slots 10 -clientVersion "0.608" -password "" -tcpLobby "149.202.51.185" 25565 echo. echo Restarting server... echo. goto start ```
800aee2f-bc3a-45d5-a6b7-096922742d94
{ "language": "Batchfile" }
```batchfile ``` Add Windows wrapper for preprocessing ImageNet using Pillow.
```batchfile rem rem CK wrapper for preprocessing the ImageNet dataset using Pillow. rem rem See CK LICENSE.txt for licensing details. rem rem See CK COPYRIGHT.txt for copyright details. rem rem rem rem Developer(s): rem rem - Anton Lokhmotov, anton@dividiti.com, 2020 rem echo Preprocessing ImageNet using Pillow ... "%CK_ENV_COMPILER_PYTHON_FILE%" "%PACKAGE_DIR%/preprocess_image_dataset.py" "%CK_ENV_DATASET_IMAGENET_VAL%" "%INSTALL_DIR%" if %errorlevel% neq 0 ( echo. echo Error: Failed preprocessing ImageNet using Pillow ... goto err ) exit /b 0 :err exit /b 1 ```
dda1d26b-0388-4924-969d-947a9bb60a2f
{ "language": "Batchfile" }
```batchfile @echo on choco install -y --allowEmptyChecksum firefox googlechrome wget notepadplusplus sublimetext3 mono monodevelop gtksharp visualstudiocode microsoft-build-tools visualstudio2015community p4merge dotnet4.5 ruby nodejs.install stylecop conemu dejavufonts call refreshenv wget -c https://cygwin.com/setup-x86_64.exe setup-x86_64.exe -R "C:\cygwin64" -s http://mirror.switch.ch/ftp/mirror/cygwin/ -q -g -P curl,zsh,git,vim,wget,xz,tar,gawk,bzip2,subversion,zlib,fontconfig,clang,cmake,lua,perl,the_silver_searcher set script_path=%~dp0 set repo_path=%script_path%\..\ set bash=c:\cygwin64\bin\bash.exe --login -c for /f "delims=" %%A in ('%bash% "cd `cygpath $HOMEPATH`/dev/dotfiles && git rev-parse --abbrev-ref HEAD"') do set "branch=%%A" %bash% 'echo "branch is $branch"' %bash% "cp -vr `cygpath $HOMEPATH`/.ssh $HOME/" %bash% "export OUTER_CLONE=`cygpath $repo_path` && $script_path/build_insider.sh" ``` Add more lightweigth tools instead of full VS suite
```batchfile @echo on choco install -y --allowEmptyChecksum firefox googlechrome wget notepadplusplus sublimetext3 mono monodevelop gtksharp visualstudiocode p4merge dotnet4.5 ruby nodejs.install stylecop conemu dejavufonts ag call refreshenv wget -c https://cygwin.com/setup-x86_64.exe setup-x86_64.exe -R "C:\cygwin64" -s http://mirror.switch.ch/ftp/mirror/cygwin/ -q -g -P curl,zsh,git,vim,wget,xz,tar,gawk,bzip2,subversion,zlib,fontconfig,clang,cmake,lua,perl,the_silver_searcher set script_path=%~dp0 set repo_path=%script_path%\..\ set bash=c:\cygwin64\bin\bash.exe --login -c for /f "delims=" %%A in ('%bash% "cd `cygpath $HOMEPATH`/dev/dotfiles && git rev-parse --abbrev-ref HEAD"') do set "branch=%%A" %bash% 'echo "branch is $branch"' %bash% "cp -vr `cygpath $HOMEPATH`/.ssh $HOME/" %bash% "export OUTER_CLONE=`cygpath $repo_path` && $script_path/build_insider.sh" ```
ea02a128-0eea-40dd-acd7-fbe9a31ab993
{ "language": "Batchfile" }
```batchfile @echo off IF %1.==. GOTO No1 set CONFIG=%1 REM set debug parameters REM set DEBUG_OPTS="-Xdebug -Xrunjdwp:transport=dt_socket,address=1044,server=y,suspend=y" @powershell -Command "java -cp \"..\lib\*\" %DEBUG_OPTS% \"-Daerobase.config.dir=%CONFIG%\" org.jboss.aerogear.unifiedpush.DBMaintenance" GOTO End1 :No1 ECHO Missing Config file GOTO End1 :End1 @ECHO ON ``` Revert usage to power shell
```batchfile @ECHO OFF IF %1.==. GOTO No1 set CONFIG=%1 REM set debug parameters REM set DEBUG_OPTS="-Xdebug -Xrunjdwp:transport=dt_socket,address=1044,server=y,suspend=y" @powershell -Command "java -cp '..\lib\*' %DEBUG_OPTS% \"-Daerobase.config.dir=%CONFIG%\" org.jboss.aerogear.unifiedpush.DBMaintenance" GOTO End1 :No1 ECHO Missing Config file GOTO End1 :End1 @ECHO ON ```
2b4d9935-a2e8-44a2-af7b-c7e3afb71929
{ "language": "Batchfile" }
```batchfile set PWD=%~dp0 start /MIN "%PWD%dbserver\bin\openmole-dbserver.bat" mkdir "%UserProfile%\.openmole\.tmp" set ran="%UserProfile%\.openmole\.tmp\%random%" java -d64 -version >nul 2>&1 if errorlevel 1 goto is32bit set FLAG="-XX:+UseCompressedOops" :is32bit java -Dosgi.locking=none -Dopenmole.location="%PWD%\" -Dosgi.classloader.singleThreadLoads=true -Dosgi.configuration.area=%ran% -splash:splashscreen.png -XX:MaxPermSize=128M -XX:+UseG1GC -Xmx1G -XX:MaxPermSize=128M %FLAG% -jar "%PWD%/plugins/org.eclipse.equinox.launcher.jar" -consoleLog -cp "%PWD%/openmole-plugins" -gp "%PWD%/openmole-plugins-gui" %* rmdir /s /q %ran% ``` Fix launch script for windows.
```batchfile set startdir=%cd% set PWD=%~dp0 cd /d %~dp0 start /MIN dbserver\bin\openmole-dbserver.bat cd %cd% mkdir "%UserProfile%\.openmole\.tmp" set ran="%UserProfile%\.openmole\.tmp\%random%" java -d64 -version >nul 2>&1 if errorlevel 1 goto is32bit set FLAG="-XX:+UseCompressedOops" :is32bit java -Dosgi.locking=none -Dopenmole.location="%PWD%\" -Dosgi.classloader.singleThreadLoads=true -Dosgi.configuration.area=%ran% -splash:splashscreen.png -XX:MaxPermSize=128M -XX:+UseG1GC -Xmx1G -XX:MaxPermSize=128M %FLAG% -jar "%PWD%/plugins/org.eclipse.equinox.launcher.jar" -consoleLog -cp "%PWD%/openmole-plugins" -gp "%PWD%/openmole-plugins-gui" %* rmdir /s /q %ran% ```
a6dae09d-340e-4d1f-b36d-a604531a3ae9
{ "language": "Batchfile" }
```batchfile copy ..\..\..\Rel\_Deployment\RelDBMS.jar . copy ..\..\..\Rel\_Deployment\commons-codec-1.4.jar . copy ..\..\..\Rel\_Deployment\commons-logging-1.1.1.jar . copy ..\..\..\Rel\_Deployment\ecj-4.4.2.jar . copy ..\..\..\Rel\_Deployment\httpclient-4.1.3.jar . copy ..\..\..\Rel\_Deployment\httpclient-cache-4.1.3.jar . copy ..\..\..\Rel\_Deployment\httpcore-4.1.4.jar . copy ..\..\..\Rel\_Deployment\httpmime-4.1.3.jar . copy ..\..\..\Rel\_Deployment\je-6.3.8.jar . copy ..\..\..\Rel\_Deployment\rel0000.jar . copy ..\..\..\Rel\_Deployment\relclient.jar . copy ..\..\..\Rel\_Deployment\relshared.jar . ``` Fix reference to Berkeley Java DB .jar file
```batchfile copy ..\..\..\Rel\_Deployment\RelDBMS.jar . copy ..\..\..\Rel\_Deployment\commons-codec-1.4.jar . copy ..\..\..\Rel\_Deployment\commons-logging-1.1.1.jar . copy ..\..\..\Rel\_Deployment\ecj-4.4.2.jar . copy ..\..\..\Rel\_Deployment\httpclient-4.1.3.jar . copy ..\..\..\Rel\_Deployment\httpclient-cache-4.1.3.jar . copy ..\..\..\Rel\_Deployment\httpcore-4.1.4.jar . copy ..\..\..\Rel\_Deployment\httpmime-4.1.3.jar . copy ..\..\..\Rel\_Deployment\je-7.0.6.jar . copy ..\..\..\Rel\_Deployment\rel0000.jar . copy ..\..\..\Rel\_Deployment\relclient.jar . copy ..\..\..\Rel\_Deployment\relshared.jar . ```
05ffacc3-a1bb-4796-ac9a-97dd73c27f96
{ "language": "Batchfile" }
```batchfile copy /B objfre\i386\winpmc.sys c:\winnt\system32\drivers ntaddsvc winpmc net start winpmc``` Update directory tree for latest install of ddkbuild
```batchfile copy /B objfre_wnet_x86\i386\winpmc.sys c:\winnt\system32\drivers ntaddsvc winpmc net start winpmc```
8a29544f-a0c1-495f-aa6e-37bc7036e7fc
{ "language": "Batchfile" }
```batchfile cd /d %~dp0 mkdir OSVR-Unity-Dist mkdir OSVR-Unity-Dist\src mkdir OSVR-Unity-Dist\src\OSVR-Unity mkdir OSVR-Unity-Dist\src\Managed-OSVR xcopy Managed-OSVR OSVR-Unity-Dist\src\Managed-OSVR /Y /S xcopy OSVR-Unity OSVR-Unity-Dist\src\OSVR-Unity /Y /S ``` Convert the README file to HTML and include it in the bundle.
```batchfile cd /d %~dp0 mkdir OSVR-Unity-Dist mkdir OSVR-Unity-Dist\src mkdir OSVR-Unity-Dist\src\OSVR-Unity mkdir OSVR-Unity-Dist\src\Managed-OSVR xcopy Managed-OSVR OSVR-Unity-Dist\src\Managed-OSVR /Y /S xcopy OSVR-Unity OSVR-Unity-Dist\src\OSVR-Unity /Y /S rem the -F 0x4 is to turn off smartypants. third-party/discount-2.1.6-win32/markdown.exe -F 0x4 -o README.html OSVR-Unity/README.md move README.html OSVR-Unity-Dist\```
1f67caa0-fd9d-44b1-986f-1041e3ec357a
{ "language": "Batchfile" }
```batchfile ``` Add cmd script to run the new single test case
```batchfile @echo off pushd %~dp0 "%VS120COMNTOOLS%..\IDE\mstest" /test:Microsoft.Protocols.TestSuites.MS_ONESTORE.S02_OneNoteRevisionStore.MSONESTORE_S02_TC06_LoadOneNoteWithAlternativePackaging /testcontainer:..\..\MS-ONESTORE\TestSuite\bin\Debug\MS-ONESTORE_TestSuite.dll /runconfig:..\..\MS-ONESTORE\MS-ONESTORE.testsettings /unique pause```
4d14ae22-fddc-48be-972e-ed2dd220250c
{ "language": "Batchfile" }
```batchfile @echo off ::Move into chrome directory, zip it, then return here. cd chrome && call "7-zip.bat" && cd .. ::Merge psdle.js, psdle.user.js, and psdle.min.js to gh-pages. call "deploy-sync.bat" pause``` Deploy - Open webstore editing page.
```batchfile ::This is a near full-circle deployment script for PSDLE. ::It does two major things: :: - ./chrome/7-zip.bat - Zip up the PSDLE chrome extension properly for the webstore (and then opens the webstore for uploading). :: - ./deploy-sync.bat - Copy psdle.js, psdle.user.js, and psdle.min.js to the gh-pages branch for everything else. ::Generally, only actual developers will find this useful. The 7-zip.bat is universally functional though. ::Currently the min file is generated manually with Notepad++'s JSTool plugin which has JSMin built in. This may change in the future. ::deploy-sync expects git available in PATH and ready to go. @echo off ::Move into chrome directory, zip it, then return here. cd chrome && call "7-zip.bat" && cd .. ::Open the chrome extension editing page on webstore. explorer "https://chrome.google.com/webstore/developer/edit/jdjhhapoddhnimgdemnpbfagndcnmhii" ::Checkout psdle.js, psdle.user.js, and psdle.min.js to gh-pages. call "deploy-sync.bat" pause```
4631205c-e4cb-4495-82b5-9d993f6393ca
{ "language": "Batchfile" }
```batchfile msbuild /p:Configuration=Build ..\XSerializer\XSerializer.csproj ildasm ..\XSerializer\bin\Build\XSerializer.dll /out:..\XSerializer\bin\Build\XSerializer.il ren ..\XSerializer\bin\Build\XSerializer.dll ..\XSerializer\bin\Build\XSerializer.dll.orig ilasm ..\XSerializer\bin\Build\XSerializer.il /res:..\XSerializer\bin\Build\XSerializer.res /dll /key=..\XSerializer\XSerializer.snk nuget pack ..\XSerializer\XSerializer.csproj -Properties Configuration=Build``` Fix ren command in build script
```batchfile msbuild /p:Configuration=Build ..\XSerializer\XSerializer.csproj ildasm ..\XSerializer\bin\Build\XSerializer.dll /out:..\XSerializer\bin\Build\XSerializer.il ren ..\XSerializer\bin\Build\XSerializer.dll XSerializer.dll.orig ilasm ..\XSerializer\bin\Build\XSerializer.il /res:..\XSerializer\bin\Build\XSerializer.res /dll /key=..\XSerializer\XSerializer.snk nuget pack ..\XSerializer\XSerializer.csproj -Properties Configuration=Build```
9c10a607-8b49-4634-a5d7-9874d77f47dd
{ "language": "Batchfile" }
```batchfile ``` Add script to start bot on Windows
```batchfile @echo off REM StarBot run script for Windows. REM Get latest version and star bot. echo Updating... git pull echo Starting bot... python main.py REM Loop back again. goto start ```
ad55f92a-3114-45f5-998a-469a948aef2d
{ "language": "Batchfile" }
```batchfile ``` Add jenkins script for windows
```batchfile cd %WORKSPACE% set PYTHON=c:\python26\python set EASY_INSTALL=c:\python26\scripts\easy_install.exe set NEXUSDIR="C:\Program Files (x86)\NeXus Data Format\" set PATH=c:\python26;c:\mingw\bin;%PATH% echo %SVN_REVISION%> svn_revision.txt %PYTHON% check_packages.py set PYTHONPATH=%WORKSPACE%\sansview-install;%PYTHONPATH% RD /S /Q sansview-install MD sansview-install RD /S /Q dist RD /S /Q build %PYTHON% setup.py build -cmingw32 %PYTHON% setup.py bdist_egg --skip-build cd dist %EASY_INSTALL% -d ..\sansview-install sasview*.egg cd %WORKSPACE%\test %PYTHON% utest_sansview.py```
d0eac6e1-8ef6-4577-a3dd-c7019ba1a23a
{ "language": "Batchfile" }
```batchfile :: Build tcplotter command-line utilities using cmake :: Change working directory to archive directory cd "%PKG_NAME%" :: Create build directory cd "src" mkdir build if errorlevel 1 exit 1 cd build if errorlevel 1 exit 1 :: Build with cmake cmake -G "MinGW Makefiles" -D CMAKE_CXX_STANDARD=11 -D CMAKE_INSTALL_PREFIX=%PREFIX% .. if errorlevel 1 exit 1 cmake --build . if errorlevel 1 exit 1 :: Install executables to bin directory cmake --build . --target install if errorlevel 1 exit 1 :: Install tcplotter cd "%SRC_DIR%" $PYTHON -m pip install . -vv``` Fix typo for Windows build
```batchfile :: Build tcplotter command-line utilities using cmake :: Change working directory to archive directory cd "%PKG_NAME%" :: Create build directory cd "src" mkdir build if errorlevel 1 exit 1 cd build if errorlevel 1 exit 1 :: Build with cmake cmake -G "MinGW Makefiles" -D CMAKE_CXX_STANDARD=11 -D CMAKE_INSTALL_PREFIX=%PREFIX% .. if errorlevel 1 exit 1 cmake --build . if errorlevel 1 exit 1 :: Install executables to bin directory cmake --build . --target install if errorlevel 1 exit 1 :: Install tcplotter cd "%SRC_DIR%" %PYTHON% -m pip install . -vv```
e1313e2c-e43b-4e4f-8eff-43e6e46e42ea
{ "language": "Batchfile" }
```batchfile @if defined ECHO (echo %ECHO%) else (echo off) REM REM Builds everything and drops it into the Build folder. REM You may specify additional arguments for MetaBuild also. REM "%~dp0tools\MetaBuild\bin\MetaBuild.bat" /rootdir "%~dp0." /metabuildconfig "%~dp0bin\MetaBuild.config.custom" %* ``` Revert previous change. Bug is actually elsewhere.
```batchfile @if defined ECHO (echo %ECHO%) else (echo off) REM REM Builds everything and drops it into the Build folder. REM You may specify additional arguments for MetaBuild also. REM "%~dp0tools\MetaBuild\bin\MetaBuild.bat" /rootdir "%~dp0" /metabuildconfig "%~dp0bin\MetaBuild.config.custom" %* ```
bb24a016-f807-4dad-9694-780a78abe6f3
{ "language": "Batchfile" }
```batchfile mvn clean jacoco:prepare-agent verify jacoco:report -Dmaven.javadoc.failOnError=false -s dev\settings-sonarqube.xml %* ``` Add missing `sonar:sonar` for windows script
```batchfile mvn clean jacoco:prepare-agent verify jacoco:report sonar:sonar -Dmaven.javadoc.failOnError=false -s dev\settings-sonarqube.xml %* ```
47e83563-45d0-4702-a18f-ee5d3646a565
{ "language": "Batchfile" }
```batchfile set PYTHON=c:\Python27\python set EASY_INSTALL=c:\python27\scripts\easy_install.exe set PATH=c:\python27;c:\mingw\bin;%PATH% set PYLINT=c:\python27\scripts\pylint set PYTHONPATH=%WORKSPACE%\sasview-install;%PYTHONPATH% cd %WORKSPACE% del /F test\sasview.txt %PYLINT% --rcfile "%WORKSPACE%/build_tools/pylint.rc" -f parseable sasview-install/sasview*.egg/sas sasview > test/sasview.txt cd %WORKSPACE%``` Update new windows pylint script
```batchfile set PYTHON=c:\Python27\python set EASY_INSTALL=c:\python27\scripts\easy_install.exe set PATH=c:\python27;c:\mingw\bin;%PATH% set PYLINT=c:\python27\scripts\pylint set PYTHONPATH=%WORKSPACE%\sasview-install;%PYTHONPATH% cd %WORKSPACE% %PYLINT% --rcfile "%WORKSPACE%cd /build_tools/pylint.rc" -f parseable sasview-install/sasview*.egg/sas sasview > test/sasview.txt cd %WORKSPACE%```
e9fe0614-1039-432d-a6e7-48b5d7915245
{ "language": "Batchfile" }
```batchfile @echo off SET "memParams=-Xms4g -Xmx10g" SET debugParams= SET "rf2Archive=G:\incoming\SnomedCT_RF2Release_INT_20160131.zip" SET "secondDrive=D:\" SET newMemory= set /p newMemory="How much memory do you have available? [10g]: " IF NOT [%newMemory%]==[] SET "memParams=-Xms4g -Xmx%newMemory%" SET driveParam= set /p driveAvailable="Do you have a 2nd drive (eg %secondDrive%) Y/N: " IF /I "%driveAvailable%"=="Y" SET "driveParam=-u %secondDrive%" SET newLocation= SET /p newLocation="Where is the RF2 Archive? [%rf2Archive%]: " IF NOT [%newLocation%]==[] SET "rf2Archive=%newLocation%" FOR %%a IN (%*) DO ( IF /I "%%a"=="-d" SET "debugParams=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8080" ) @echo on java -jar %memParams% %debugParams% target\RF2toRF1Converter.jar %driveParam% %* %rf2Archive% ``` Add question mark for questions
```batchfile @echo off SET "memParams=-Xms4g -Xmx10g" SET debugParams= SET "rf2Archive=G:\incoming\SnomedCT_RF2Release_INT_20160131.zip" SET "secondDrive=D:\" SET newMemory= set /p newMemory="How much memory do you have available? [10g]: " IF NOT [%newMemory%]==[] SET "memParams=-Xms4g -Xmx%newMemory%" SET driveParam= set /p driveAvailable="Do you have a 2nd drive? (eg %secondDrive%) Y/N: " IF /I "%driveAvailable%"=="Y" SET "driveParam=-u %secondDrive%" SET newLocation= SET /p newLocation="Where is the RF2 Archive? [%rf2Archive%]: " IF NOT [%newLocation%]==[] SET "rf2Archive=%newLocation%" FOR %%a IN (%*) DO ( IF /I "%%a"=="-d" SET "debugParams=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8080" ) @echo on java -jar %memParams% %debugParams% target\RF2toRF1Converter.jar %driveParam% %* %rf2Archive% ```
d754c710-a45e-44a3-bb0b-b157bf6a9c56
{ "language": "Batchfile" }
```batchfile @ECHO OFF ECHO. ECHO APPVEYOR_BUILD_NUMBER : %APPVEYOR_BUILD_NUMBER% ECHO APPVEYOR_BUILD_VERSION : %APPVEYOR_BUILD_VERSION% :: ensure we have Version.txt IF NOT EXIST Version.txt ( ECHO Version.txt is missing! GOTO error ) :: get the version and comment from Version.txt lines 2 and 3 SET RELEASE= SET COMMENT= FOR /F "skip=1 delims=" %%i IN (Version.txt) DO IF NOT DEFINED RELEASE SET RELEASE=%%i FOR /F "skip=2 delims=" %%i IN (Version.txt) DO IF NOT DEFINED COMMENT SET COMMENT=%%i SET VERSION=%RELEASE% IF [%COMMENT%] EQU [] (SET VERSION=%RELEASE%) ELSE (SET VERSION=%RELEASE%-%COMMENT%) ECHO. ECHO Building CallMeMaybe %VERSION% ECHO. CALL dotnet restore CallMeMaybe.sln CALL dotnet msbuild CallMeMaybe.sln /p:OutputPath=..\artifacts /p:Configuration=Release :success ECHO. ECHO No errors were detected! ECHO There may still be some in the output, which you would need to investigate. ECHO Warnings are usually normal. ECHO. GOTO :EOF :error ECHO. ECHO Errors were detected! ECHO.``` Set default version to .yml file
```batchfile @ECHO OFF ECHO. ECHO APPVEYOR_BUILD_NUMBER : %APPVEYOR_BUILD_NUMBER% ECHO APPVEYOR_BUILD_VERSION : %APPVEYOR_BUILD_VERSION% :: ensure we have Version.txt IF NOT EXIST Version.txt ( ECHO Version.txt is missing! GOTO error ) :: get the version and comment from Version.txt lines 2 and 3 SET RELEASE=%APPVEYOR_BUILD_VERSION% SET COMMENT=%MAYBE_PRERELEASE_SUFFIX% FOR /F "skip=1 delims=" %%i IN (Version.txt) DO IF NOT DEFINED RELEASE SET RELEASE=%%i FOR /F "skip=2 delims=" %%i IN (Version.txt) DO IF NOT DEFINED COMMENT SET COMMENT=%%i SET VERSION=%RELEASE% IF [%COMMENT%] EQU [] (SET VERSION=%RELEASE%) ELSE (SET VERSION=%RELEASE%-%COMMENT%) ECHO. ECHO Building CallMeMaybe %VERSION% ECHO. CALL dotnet restore CallMeMaybe.sln CALL dotnet msbuild CallMeMaybe.sln /p:OutputPath=..\artifacts /p:Configuration=Release :success ECHO. ECHO No errors were detected! ECHO There may still be some in the output, which you would need to investigate. ECHO Warnings are usually normal. ECHO. GOTO :EOF :error ECHO. ECHO Errors were detected! ECHO.```
ec732108-6af9-43a2-852e-f55df2c47ec9
{ "language": "Batchfile" }
```batchfile ``` Add .bat wrapper around version header generation script
```batchfile @echo off REM Windows batch script wrapper around the writeGitVersionHeader.sh bash script REM Author: Peter Nordin REM Date: 2017-02-07 set filepath="%~1" set name="%~2" set rev="%~3" set shorthash="%~4" REM Check where git bash is installed and use it if defined ProgramFiles(x86) ( REM Check for 32-bit version, even though system is 64-bit if exist "%ProgramFiles(x86)%\Git\bin" ( set "bash=%ProgramFiles(x86)%\Git\bin\bash.exe" ) else ( REM Use 64-bit version set "bash=%ProgramFiles%\Git\bin\bash.exe" ) ) else ( REM Use 32-bit version set "bash=%ProgramFiles%\Git\bin\bash.exe" ) REM Execute the bash script to do the work "%bash%" --login -i -c "exec ./writeGitVersionHeader.sh %filepath% %name% %rev% %shorthash%" ```
0a960899-09f6-4036-9b7c-e6d48079258f
{ "language": "Batchfile" }
```batchfile ``` Add CMD file for new cases
```batchfile @echo off pushd %~dp0 "%VS120COMNTOOLS%..\IDE\mstest" /test:Microsoft.Protocols.TestSuites.MS_ADMINS.S01_CreateAndDeleteSite.MSADMINS_S01_TC29_CreateSiteSuccessfully_WithoutTemplate /testcontainer:..\..\MS-ADMINS\TestSuite\bin\Debug\MS-ADMINS_TestSuite.dll /runconfig:..\..\MS-ADMINS\MS-ADMINS.testsettings /unique pause```
a92b57aa-3235-4d36-8beb-0d7a6ea1d945
{ "language": "Batchfile" }
```batchfile ``` Add windows batch file to install jamberoo libs
```batchfile mvn install:install-file -DgroupId=jamberoo -DartifactId=bsh-2.0b4 -Dversion=1.0 -Dpackaging=jar -Dfile=./bsh-2.0b4.jar mvn install:install-file -DgroupId=jamberoo -DartifactId=cct-globus -Dversion=1.0 -Dpackaging=jar -Dfile=./cct-globus.jar mvn install:install-file -DgroupId=jamberoo -DartifactId=Fragments -Dversion=1.0 -Dpackaging=jar -Dfile=./Fragments.jar mvn install:install-file -DgroupId=jamberoo -DartifactId=j2ssh-common -Dversion=1.0 -Dpackaging=jar -Dfile=./j2ssh-common.jar mvn install:install-file -DgroupId=jamberoo -DartifactId=j2ssh-core -Dversion=1.0 -Dpackaging=jar -Dfile=./j2ssh-core.jar mvn install:install-file -DgroupId=jamberoo -DartifactId=Jamberoo-help -Dversion=1.0 -Dpackaging=jar -Dfile=./Jamberoo-help.jar mvn install:install-file -DgroupId=jamberoo -DartifactId=jbzip2-0.9.1 -Dversion=1.0 -Dpackaging=jar -Dfile=./jbzip2-0.9.1.jar mvn install:install-file -DgroupId=jamberoo -DartifactId=jcommon-1.0.12 -Dversion=1.0 -Dpackaging=jar -Dfile=./jcommon-1.0.12.jar mvn install:install-file -DgroupId=jamberoo -DartifactId=jfreechart-1.0.9 -Dversion=1.0 -Dpackaging=jar -Dfile=./jfreechart-1.0.9.jar mvn install:install-file -DgroupId=jamberoo -DartifactId=jhall -Dversion=1.0 -Dpackaging=jar -Dfile=./jhall.jar mvn install:install-file -DgroupId=jamberoo -DartifactId=mysql-connector-java-5.1.33-bin -Dversion=1.0 -Dpackaging=jar -Dfile=./mysql-connector-java-5.1.33-bin.jar mvn install:install-file -DgroupId=jamberoo -DartifactId=Solvents -Dversion=1.0 -Dpackaging=jar -Dfile=./Solvents.jar```
23d697ff-9806-4d1d-ad4d-bb1a0713be67
{ "language": "Batchfile" }
```batchfile CD git/re2 || EXIT /B 1 cmake -D CMAKE_BUILD_TYPE=Debug -A x64 . || EXIT /B 1 cmake --build . --config Debug --clean-first || EXIT /B 1 ctest -C Debug --output-on-failure -E dfa^|exhaustive^|random || EXIT /B 1 cmake -D CMAKE_BUILD_TYPE=Release -A x64 . || EXIT /B 1 cmake --build . --config Release --clean-first || EXIT /B 1 ctest -C Release --output-on-failure -E dfa^|exhaustive^|random || EXIT /B 1 EXIT /B 0 ``` Use MSVC 2013 for continuous integration.
```batchfile CD git/re2 || EXIT /B 1 cmake -D CMAKE_BUILD_TYPE=Debug -G "Visual Studio 12 2013" -A x64 . || EXIT /B 1 cmake --build . --config Debug --clean-first || EXIT /B 1 ctest -C Debug --output-on-failure -E dfa^|exhaustive^|random || EXIT /B 1 cmake -D CMAKE_BUILD_TYPE=Release -G "Visual Studio 12 2013" -A x64 . || EXIT /B 1 cmake --build . --config Release --clean-first || EXIT /B 1 ctest -C Release --output-on-failure -E dfa^|exhaustive^|random || EXIT /B 1 EXIT /B 0 ```
f393da92-8955-4ab9-8320-9300f06cc861
{ "language": "Batchfile" }
```batchfile ``` Add a simple local checkin gate
```batchfile @ECHO OFF git status ECHO.=========================================== WARNING =========================================== ECHO.This will call git clean, all untracked change will be lost. Use Ctrl+C to break. ECHO.=========================================== WARNING =========================================== PAUSE call %~dp0scorch.cmd call %~dp0restore.cmd call %~dp0buildRelease.cmd call %~dp0runtest.cmd ```
d50bb8bf-a60c-484a-96a7-3afad4de4cf6
{ "language": "Batchfile" }
```batchfile ``` Add unit test bat script
```batchfile @echo off SETLOCAL EnableDelayedExpansion set failed=0 cd bin for /r "." %%a in (tst_*.exe) do ( "%%~fa" if not ERRORLEVEL 0 ( echo Test FAILED: "%%~fa" set failed=1 ) ) cd .. if %failed% EQU 1 ( echo ERROR: At least one unit test failed! if "%HOPSAN_BUILD_SCRIPT_NOPAUSE%" == "" ( pause ) exit /B 1 ) echo All tests passed if "%HOPSAN_BUILD_SCRIPT_NOPAUSE%" == "" ( pause ) ```
ef1f4328-1933-45db-bf10-6ac1226006ea
{ "language": "Batchfile" }
```batchfile ``` Add build release convenience script
```batchfile @echo off @echo . @echo .. @echo ... @echo Running full Build Script, capturing output to buildlog.txt file... @echo Start Time: %time% build-support\tools\nant\bin\nant clean package -f:spring.build -D:project.build.sign=true -D:mstest.exe="c:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\mstest.exe" -D:package.version=1.3.1 -D:vs-net.mstest.bin.dir="c:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE" > buildlog.txt @echo . @echo .. @echo ... @echo Launching text file viewer to display buildlog.txt contents... start "ignored but required placeholder window title argument" buildlog.txt @echo . @echo .. @echo ... @echo ************************ @echo Build Complete! @echo ************************ @echo End Time: %time% @echo    ```
887a8f59-dd72-4f5f-a099-2d320067ca31
{ "language": "Batchfile" }
```batchfile @@@ setlocal @@@ for /f %%i in ('dir /b /ad /on "%windir%\Microsoft.NET\Framework\v*"') do @if exist "%windir%\Microsoft.NET\Framework\%%i\msbuild".exe set msbuild=%windir%\Microsoft.NET\Framework\%%i\msbuild.exe @@@ if not defined msbuild (echo MSBuild.exe not found>&2 & exit /b 42) @@@ if defined msbuild "%msbuild%" NUnitFramework.msbuild %*``` Build using xbuild on Windows for mono
```batchfile @echo off setlocal for %%a in (%*) do echo "%%a" | findstr /C:"mono">nul && set buildtool=xbuild.bat if not defined buildtool for /f %%i in ('dir /b /ad /on "%windir%\Microsoft.NET\Framework\v*"') do @if exist "%windir%\Microsoft.NET\Framework\%%i\msbuild".exe set buildtool=%windir%\Microsoft.NET\Framework\%%i\msbuild.exe if not defined buildtool (echo no MSBuild.exe or xbuild was found>&2 & exit /b 42) if defined buildtool "%buildtool%" %~dp0NUnitFramework.msbuild %*```
f12eade8-4db3-4b22-b4ae-b942b351e3ca
{ "language": "Batchfile" }
```batchfile ``` Add a batch file to build on Windows with MSVC.
```batchfile @setlocal @set SCHEME_H_DIR=..\src @set TSCOMPILE=cl /nologo /O2 /W3 /c /D_CRT_SECURE_NO_DEPRECATE /DWIN32 /DUSE_DL=1 /I%SCHEME_H_DIR% @set TSLIB=lib /nologo @set TSLINK=link /nologo @if "%1" == "static" goto STATIC @if not exist dll\ ( mkdir dll ) %TSCOMPILE% /MT tsx.c %TSLINK% /DLL /out:dll\tsx.dll /export:init_tsx tsx.obj ws2_32.lib %TSCOMPILE% /MDd tsx.c %TSLINK% /DLL /out:dll\tsx_d.dll /export:init_tsx tsx.obj ws2_32.lib @goto END :STATIC @if not exist lib\ ( mkdir lib ) %TSCOMPILE% /MT tsx.c %TSLIB% /out:lib\tsx.lib tsx.obj ws2_32.lib %TSCOMPILE% /MDd tsx.c %TSLIB% /out:lib\tsx_d.lib tsx.obj ws2_32.lib :END del tsx.obj ```
5e2c438a-f7ca-4d18-b528-f4b6e7050bc7
{ "language": "Batchfile" }
```batchfile @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. 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" && buildkite-agent.exe artifact upload "%current_path%\installer\*.exe" ``` Fix installer uploaded artifact filename.
```batchfile @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. 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" ```
4517eef4-dacc-466f-90e1-a4380c1bef3c
{ "language": "Batchfile" }
```batchfile REM This script will checkout Banshee from git (and a few submodules that are needed). REM It will result in a banshee/ directory under where it's launched from. REM See banshee\build\windows\README.txt for more information REM (this file is tracked in version control at: http://git.gnome.org/browse/banshee/plain/build/windows/checkout-banshee.bat ) call git clone git://git.gnome.org/banshee if not exist banshee goto failure cd banshee call git submodule update --init call git clone git://gitorious.org/banshee/windows-binaries.git bin if not exist bin goto failure echo "Checkout script finished. Banshee is now checked out into the banshee folder. Build it with build\windows\build-banshee.bat or your favorite IDE using Banshee.sln" pause :failure echo "There was a problem during the checkout. Please see the message above." ``` Clean output of the checkout script
```batchfile REM This script will checkout Banshee from git (and a few submodules that are needed). REM It will result in a banshee/ directory under where it's launched from. REM See banshee\build\windows\README.txt for more information REM (this file is tracked in version control at: http://git.gnome.org/browse/banshee/plain/build/windows/checkout-banshee.bat ) @echo off call git clone git://git.gnome.org/banshee if not exist banshee goto failure cd banshee call git submodule update --init call git clone git://gitorious.org/banshee/windows-binaries.git bin if not exist bin goto failure echo "Checkout script finished. Banshee is now checked out into the banshee folder. Build it with build\windows\build-banshee.bat or your favorite IDE using Banshee.sln" pause goto :eof :failure echo "There was a problem during the checkout. Please see the message above." ```
066bba84-6c74-4e0b-9805-9f65697fae7c
{ "language": "Batchfile" }
```batchfile @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/185e757b03239f556e73bead91b261f5fe3c8004 IF %ERRORLEVEL% NEQ 0 goto error goto end :error if %counter% GEQ %attempts% goto :lastError goto retry :lastError popd echo An error has occured during npm install. exit /b 1 :end popd echo Finished successfully. exit /b 0 ``` Update to kuduscript version 0.1.7
```batchfile @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/3076c2ce36a3e11a71ea092098a40b11cb55d548 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 ```
682f4038-8b11-4013-8369-42ac83f7f493
{ "language": "Batchfile" }
```batchfile @echo off set PYTHON=%~1 set PATH=%PYTHON%;%PYTHON%\Scripts;%PATH% python -m pytest python -m flake8 ``` Use pytest and flake8 commands.
```batchfile set PYTHON=%~1 set PATH=%PYTHON%;%PYTHON%\Scripts;%PATH% pytest flake8 ```
fe216e73-7b69-4f45-a3db-f1132459397c
{ "language": "Batchfile" }
```batchfile if "%ACC%" == "" goto emptyacc if "%SEPARATOR%" == "" goto noseparator set ACC=%ACC%%SEPARATOR%%1 goto end :noseparator set ACC=%ACC% %1 goto end :emptyacc set ACC=%1 goto end :end``` Support = signs in accumulator.
```batchfile if not defined ACC goto emptyacc if "%SEPARATOR%" == "" goto noseparator set ACC=%ACC%%SEPARATOR%%1 goto end :noseparator set ACC=%ACC% %1 goto end :emptyacc set ACC=%1 goto end :end```
397ae4f8-7a6c-49e6-8a91-b51b2d424f46
{ "language": "Batchfile" }
```batchfile @echo off REM This file is part of the Zephir. REM REM (c) Zephir Team <team@zephir-lang.com> REM REM For the full copyright and license information, please view the LICENSE REM file that was distributed with this source code. cls if "%PHP_PEAR_PHP_BIN%" neq "" ( set PHPBIN=%PHP_PEAR_PHP_BIN% ) else set PHPBIN=php SET mypath=%~dp0 echo %mypath:~0,-1% "%PHPBIN%" "%mypath%\zephir" %* ``` Correct code style for batch file
```batchfile @echo off rem This file is part of the Zephir. rem rem (c) Zephir Team <team@zephir-lang.com> rem rem For the full copyright and license information, please view the LICENSE rem file that was distributed with this source code. cls if "%PHP_PEAR_PHP_BIN%" neq "" ( set PHPBIN=%PHP_PEAR_PHP_BIN% ) else set PHPBIN=php SET mypath=%~dp0 echo %mypath:~0,-1% "%PHPBIN%" "%mypath%\zephir" %* ```
5c2b1318-2edb-4a3d-aa69-8bd9a61e0112
{ "language": "Batchfile" }
```batchfile C:\Python27\Scripts\pip.exe install -r requirements.txt --allow-external pypubsub C:\Python27\Scripts\pip.exe install -r requirements-building.txt --allow-external pypubsub cd iridaUploader/docs C:\Python27\Scripts\sphinx-build -b html -d _build/doctrees . _build/html echo. 2>_build/__init__.py echo. 2>_build/html/__init__.py echo. 2>_build/html/_images/__init__.py echo. 2>_build/html/_sources/__init__.py echo. 2>_build/html/_static/__init__.py cd ../.. C:\Python27\python.exe setup.py bdist_msi move dist\* prerequisites "C:\Program Files (x86)\NSIS\makensis.exe" "iridaUploader_installer.nsi" PAUSE ``` Add a 'set -e'-like fail on command failure for batch script.
```batchfile C:\Python27\Scripts\pip.exe install -r requirements.txt --allow-external pypubsub || exit /b C:\Python27\Scripts\pip.exe install -r requirements-building.txt --allow-external pypubsub || exit /b cd iridaUploader/docs || exit /b C:\Python27\Scripts\sphinx-build -b html -d _build/doctrees . _build/html || exit /b echo. 2>_build/__init__.py echo. 2>_build/html/__init__.py echo. 2>_build/html/_images/__init__.py echo. 2>_build/html/_sources/__init__.py echo. 2>_build/html/_static/__init__.py cd ../.. C:\Python27\python.exe setup.py bdist_msi || exit /b move dist\* prerequisites "C:\Program Files (x86)\NSIS\makensis.exe" "iridaUploader_installer.nsi" PAUSE ```
2b2f9cb0-ba2d-4f7b-a0aa-0084b493e3d3
{ "language": "Batchfile" }
```batchfile openssl aes-256-cbc -k %ENCRYPTION_SECRET% -in .\build\resources\authenticode-signing-cert.p12.enc -out .\build\resources\authenticode-signing-cert.p12 -d -a certutil -p %KEY_PASSWORD% -importpfx .\build\resources\authenticode-signing-cert.p12 ``` Add key to user's store
```batchfile openssl aes-256-cbc -k %ENCRYPTION_SECRET% -in .\build\resources\authenticode-signing-cert.p12.enc -out .\build\resources\authenticode-signing-cert.p12 -d -a certutil -p %KEY_PASSWORD% -user -importpfx .\build\resources\authenticode-signing-cert.p12 NoRoot ```
c1bbe9e4-e095-41e2-95bc-4128a4034e60
{ "language": "Batchfile" }
```batchfile @echo off setlocal set mypath=%~dp0 set PATH=%mypath%\python2.7;%PATH% set PYTHONPATH=%mypath%\lib set OQ_SITE_CFG_PATH=%mypath%\openquake.cfg set OQ_HOST=127.0.0.1 set OQ_PORT=8800 echo Please wait ... REM Start the WebUI using django start "OpenQuake WebUI server" /B python.exe -m openquake.commands webui start %OQ_HOST%:%OQ_PORT% REM Make sure that the dbserver is up and running call:check_django REM Start the browser start http://localhost:%OQ_PORT% endlocal exit /b 0 :check_django setlocal ping -n 1 %OQ_HOST if ERRORLEVEL 1 goto check_django endlocal :sleep setlocal if exist C:\Windows\System32\timeout.exe ( timeout /t %~1 /nobreak > NUL ) else ( REM Windows XP hack ping 192.0.2.2 -n %~1 -w 1000 > NUL ) endlocal ``` Revert to sleep in oq-webui.bat
```batchfile @echo off setlocal set mypath=%~dp0 set PATH=%mypath%\python2.7;%PATH% set PYTHONPATH=%mypath%\lib set OQ_SITE_CFG_PATH=%mypath%\openquake.cfg set OQ_HOST=127.0.0.1 set OQ_PORT=8800 echo Please wait ... REM Start the WebUI using django start "OpenQuake WebUI server" /B python.exe -m openquake.commands webui start %OQ_HOST%:%OQ_PORT% REM Make sure that the dbserver is up and running call:sleep 10 REM Start the browser start http://localhost:%OQ_PORT% endlocal exit /b 0 :sleep setlocal if exist C:\Windows\System32\timeout.exe ( timeout /t %~1 /nobreak > NUL ) else ( REM Windows XP hack ping 192.0.2.2 -n %~1 -w 1000 > NUL ) endlocal ```
f97dc869-5d43-4275-acde-b2237700d998
{ "language": "Batchfile" }
```batchfile call ..\gradlew clean installDist call "C:\Program Files\Java\jdk11\bin\jlink.exe" --verbose --no-header-files --no-man-pages --compress=2 --strip-debug --add-modules java.base,java.desktop,java.logging,java.management,java.naming,java.sql,java.xml,jdk.unsupported --output build\install\plus-f\runtime call "C:\Program Files (x86)\Inno Setup 5\iscc.exe" package\windows\plus-f.iss /Obuild /FPlus-F call aws s3 cp build/Plus-F.exe s3://download.socialthingy.com/Plus-F.exe ``` Set JAVA_HOME for Windows builds
```batchfile set JAVA_HOME="C:\Program Files\Java\jdk11" call ..\gradlew clean installDist call "C:\Program Files\Java\jdk11\bin\jlink.exe" --verbose --no-header-files --no-man-pages --compress=2 --strip-debug --add-modules java.base,java.desktop,java.logging,java.management,java.naming,java.sql,java.xml,jdk.unsupported --output build\install\plus-f\runtime call "C:\Program Files (x86)\Inno Setup 5\iscc.exe" package\windows\plus-f.iss /Obuild /FPlus-F call aws s3 cp build/Plus-F.exe s3://download.socialthingy.com/Plus-F.exe ```
88c431a6-2830-4665-928b-89ee50a51fdb
{ "language": "Batchfile" }
```batchfile @echo off rem Source this script to set up the ROOT build that this script is part of. rem rem Author: Axel Naumann, 10/07/2007 set OLDPATH=%CD% set THIS=%0 set THIS=%THIS:~0,-12%. cd /D %THIS%\.. set ROOTSYS=%CD% cd /D %OLDPATH% set PATH=%ROOTSYS%\bin;%PATH% set OLDPATH= set THIS= ``` Add also %ROOTSYS%\bin to PYTHONPATH if not already set
```batchfile @echo off rem Source this script to set up the ROOT build that this script is part of. rem rem Author: Axel Naumann, 10/07/2007 set OLDPATH=%CD% set THIS=%0 set THIS=%THIS:~0,-12%. cd /D %THIS%\.. set ROOTSYS=%CD% cd /D %OLDPATH% set PATH=%ROOTSYS%\bin;%PATH% echo %PYTHONPATH%|find /i "%ROOTSYS%\bin">nul || set PYTHONPATH=%ROOTSYS%\bin;%PYTHONPATH% set OLDPATH= set THIS= ```
644e8e9b-54af-45c5-9d3a-f0df8624c5ff
{ "language": "Batchfile" }
```batchfile ## @file # # Copyright (c) 2007 - 2010, Intel Corporation # All rights reserved. This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License # which accompanies this distribution. The full text of the license may be found at # http://opensource.org/licenses/bsd-license.php # # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. @echo off setlocal SET NMAKE_COMMAND=%1 SHIFT :loop if "%1"=="" goto success ECHO Building %1 pushd %1 nmake %NMAKE_COMMAND% if ERRORLEVEL 1 goto error ECHO %1 built successfully (%NMAKE_COMMAND%) ECHO. shift popd goto loop :success goto exit :error popd ENDLOCAL ECHO Error while making %1! VERIFY OTHER 2>NUL :exit ``` Add @REM for windows BAT file comment
```batchfile @REM ## @file @REM # @REM # Copyright (c) 2007 - 2010, Intel Corporation @REM # All rights reserved. This program and the accompanying materials @REM # are licensed and made available under the terms and conditions of the BSD License @REM # which accompanies this distribution. The full text of the license may be found at @REM # http://opensource.org/licenses/bsd-license.php @REM # @REM # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, @REM # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. @echo off setlocal SET NMAKE_COMMAND=%1 SHIFT :loop if "%1"=="" goto success ECHO Building %1 pushd %1 nmake %NMAKE_COMMAND% if ERRORLEVEL 1 goto error ECHO %1 built successfully (%NMAKE_COMMAND%) ECHO. shift popd goto loop :success goto exit :error popd ENDLOCAL ECHO Error while making %1! VERIFY OTHER 2>NUL :exit ```
153010fc-da16-45c4-b292-5b1cb19f290c
{ "language": "Batchfile" }
```batchfile ``` Add game runner script for Windows to C++ bot
```batchfile SET PATH=C:\Program Files (x86)\MSBuild\14.0\Bin;%PATH% CALL "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" amd64 cl.exe /std:c++14 /O2 /MT /EHsc .\MyBot.cpp /link /out:MyBot.exe ..\..\environment\halite.exe -d "96 96" ".\MyBot.exe" ".\MyBot.exe" ```
d5af957e-bd1e-4e1c-b30c-71716c7fcf8c
{ "language": "Batchfile" }
```batchfile @echo off SETLOCAL SET ARGC=0 FOR %%x IN (%*) DO SET /A ARGC+=1 IF %ARGC% NEQ 2 ( echo Usage: %0 BindingIdInCamelCase BindingIdInLowerCase exit /B 1 ) mvn archetype:generate -DarchetypeGroupId=org.eclipse.smarthome.archetype -DarchetypeArtifactId=org.eclipse.smarthome.archetype.binding -DarchetypeVersion=0.8.0-SNAPSHOT -DgroupId=org.eclipse.smarthome.binding -DartifactId=org.eclipse.smarthome.binding.%2 -Dpackage=org.eclipse.smarthome.binding.%2 -DarchetypeCatalog='file://../archetype-catalog.xml' -Dversion=0.8.0-SNAPSHOT -DbindingId=%2 -DbindingIdCamelCase=%1 ENDLOCAL``` Add parameter -N (Do not recurse into sub-projects) to skeleton generation script for Windows.
```batchfile @echo off SETLOCAL SET ARGC=0 FOR %%x IN (%*) DO SET /A ARGC+=1 IF %ARGC% NEQ 2 ( echo Usage: %0 BindingIdInCamelCase BindingIdInLowerCase exit /B 1 ) mvn archetype:generate -N -DarchetypeGroupId=org.eclipse.smarthome.archetype -DarchetypeArtifactId=org.eclipse.smarthome.archetype.binding -DarchetypeVersion=0.8.0-SNAPSHOT -DgroupId=org.eclipse.smarthome.binding -DartifactId=org.eclipse.smarthome.binding.%2 -Dpackage=org.eclipse.smarthome.binding.%2 -DarchetypeCatalog='file://../archetype-catalog.xml' -Dversion=0.8.0-SNAPSHOT -DbindingId=%2 -DbindingIdCamelCase=%1 ENDLOCAL ```
ac02b045-c33d-4515-bce0-e6dbee7e007d
{ "language": "Batchfile" }
```batchfile if not exist trunk exit 1 cd trunk svn info if errorlevel 1 exit 1 for /f "delims=" %%i in ('svn info | grep "Revision"') do set svnrev=%%i if not svnrev=="Revision: 1157" exit 1 ``` Fix source_svn test recipe on Windows
```batchfile if not exist trunk exit 1 cd trunk svn info if errorlevel 1 exit 1 for /f "delims=" %%i in ('svn info ^| grep "Revision"') do set svnrev=%%i if errorlevel 1 exit 1 echo %svnrev% if not "%svnrev%"=="Revision: 1157" exit 1 ```
a23b936b-e351-415c-821b-952bf2cfba33
{ "language": "Batchfile" }
```batchfile @set JAVA_OPTS=-Djava.awt.headless=true @set ROOT_DIR=%~dp0 @cd "%ROOT_DIR%" @set CLASS_PATH="%ROOT_DIR%\*;." @java %JAVA_OPTS% -cp %CLASS_PATH% scalive.AgentLoader %ROOT_DIR% %* ``` Use "@echo off" for brevity
```batchfile @echo off set JAVA_OPTS=-Djava.awt.headless=true set ROOT_DIR=%~dp0 cd "%ROOT_DIR%" set CLASS_PATH="%ROOT_DIR%\*;." java %JAVA_OPTS% -cp %CLASS_PATH% scalive.AgentLoader %ROOT_DIR% %* ```
e9ad9092-675e-449f-bc13-0f70ea7983a5
{ "language": "Batchfile" }
```batchfile mklink ./lib/ansible/release.py ./lib/ansible/ansible_release.py %PYTHON% -m pip install . -vv ``` Fix order of arguments in mklink and prefix path with build/
```batchfile mklink build/lib/ansible/ansible_release.py build/lib/ansible/release.py %PYTHON% -m pip install . -vv ```
10b47b2d-4565-4a3c-89b3-8c4cc7ed7b5f
{ "language": "Batchfile" }
```batchfile @echo off echo building prefuse... if "%JAVA_HOME%" == "" goto error set LOCALCLASSPATH=%JAVA_HOME%\lib\tools.jar;.\lib\ant.jar;%CLASSPATH% set ANT_HOME=./lib echo ... using classpath %LOCALCLASSPATH% %JAVA_HOME%\bin\java.exe -Dant.home="%ANT_HOME%" -classpath "%LOCALCLASSPATH%" org.apache.tools.ant.Main %1 %2 %3 %4 %5 goto end :error echo "... BUILD FAILED" echo " The JAVA_HOME environment variable was not found." echo " Please set the environment variable JAVA_HOME to the location" echo " of your preferred Java installation." :end set LOCALCLASSPATH=``` Allow spaces in JAVA_HOME directory
```batchfile @echo off echo building prefuse... if "%JAVA_HOME%" == "" goto error set LOCALCLASSPATH=%JAVA_HOME%\lib\tools.jar;.\lib\ant.jar;%CLASSPATH% set ANT_HOME=./lib echo ... using classpath %LOCALCLASSPATH% "%JAVA_HOME%\bin\java.exe" -Dant.home="%ANT_HOME%" -classpath "%LOCALCLASSPATH%" org.apache.tools.ant.Main %1 %2 %3 %4 %5 goto end :error echo "... BUILD FAILED" echo " The JAVA_HOME environment variable was not found." echo " Please set the environment variable JAVA_HOME to the location" echo " of your preferred Java installation." :end set LOCALCLASSPATH=```
555509e5-ad51-4531-b9cd-0b0eda8f7c15
{ "language": "Batchfile" }
```batchfile echo off REM leave a pid file so that a non-DC process REM like configd can be notified for shutdown copy /y nul > %cd%\.pid%1 REM set this sleep value to be at least twice REM as long as the QMF_CONFIGD_WIN_INTERVAL set cntr=0 :LoopStart IF NOT EXIST %cd%\.pid%1 Goto EndClean ping 127.0.0.1 -n 1 -w 1000 > nul IF %cntr%==5 Goto EndBad set /A cntr=%cntr%+1 Goto LoopStart :EndClean REM Give an extra second to clean up ping 127.0.0.1 -n 1 -w 1000 > nul EXIT /B 0 :EndBad EXIT /B 1``` Update for ping wait to use invalid address so timeouts are reached.
```batchfile echo off REM leave a pid file so that a non-DC process REM like configd can be notified for shutdown copy /y nul > %cd%\.pid%1 REM set this sleep value to be at least twice REM as long as the QMF_CONFIGD_WIN_INTERVAL set cntr=0 :LoopStart IF NOT EXIST %cd%\.pid%1 Goto EndClean ping 1.1.1.1 -n 1 -w 1000 > nul IF %cntr%==5 Goto EndBad set /A cntr=%cntr%+1 Goto LoopStart :EndClean REM Give an extra second to clean up ping 1.1.1.1 -n 1 -w 1000 > nul EXIT /B 0 :EndBad EXIT /B 1 ```
a0b8de1f-9bac-46d1-bb98-317910eafc44
{ "language": "Batchfile" }
```batchfile @if "%_echo%" neq "on" echo off setlocal if defined VisualStudioVersion goto :Run set _VSWHERE="%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" if exist %_VSWHERE% ( for /f "usebackq tokens=*" %%i in (`%_VSWHERE% -latest -property installationPath`) do set _VSCOMNTOOLS=%%i\Common7\Tools ) if not exist "%_VSCOMNTOOLS%" set _VSCOMNTOOLS=%VS140COMNTOOLS% if not exist "%_VSCOMNTOOLS%" ( echo Error: Visual Studio 2015 or 2017 required. echo Please see https://github.com/dotnet/corefx/blob/master/Documentation/project-docs/developer-guide.md for build instructions. exit /b 1 ) call "%_VSCOMNTOOLS%\VsDevCmd.bat" :Run :: We do not want to run the first-time experience. set DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1 powershell -NoProfile -ExecutionPolicy unrestricted -Command "%~dp0run.ps1 -- %*" exit /b %ERRORLEVEL%``` Change to current directory after calling VSDevCmd.bat
```batchfile @if "%_echo%" neq "on" echo off setlocal if defined VisualStudioVersion goto :Run set _VSWHERE="%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" if exist %_VSWHERE% ( for /f "usebackq tokens=*" %%i in (`%_VSWHERE% -latest -property installationPath`) do set _VSCOMNTOOLS=%%i\Common7\Tools ) if not exist "%_VSCOMNTOOLS%" set _VSCOMNTOOLS=%VS140COMNTOOLS% if not exist "%_VSCOMNTOOLS%" ( echo Error: Visual Studio 2015 or 2017 required. echo Please see https://github.com/dotnet/corefx/blob/master/Documentation/project-docs/developer-guide.md for build instructions. exit /b 1 ) call "%_VSCOMNTOOLS%\VsDevCmd.bat" :Run :: We do not want to run the first-time experience. set DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1 pushd %~dp0 powershell -NoProfile -ExecutionPolicy unrestricted -Command "%~dp0run.ps1 -- %*" exit /b %ERRORLEVEL%```
bcb567fc-d8d7-4a4f-b8cf-7887ab315836
{ "language": "Batchfile" }
```batchfile ``` Add batch script to build the samples in the Windows SDK
```batchfile cd %VULKAN_SDK% cd glslang md build cd build cmake -G "Visual Studio 12 Win64" .. msbuild ALL_BUILD.vcxproj /p:Platform=x64 /p:Configuration=Debug /verbosity:quiet cd ..\.. cd spirv-tools md build cd build cmake -G "Visual Studio 12 Win64" .. msbuild ALL_BUILD.vcxproj /p:Platform=x64 /p:Configuration=Debug /verbosity:quiet cd ..\.. cd samples md build cd build cmake -G "Visual Studio 12 Win64" .. msbuild ALL_BUILD.vcxproj /p:Platform=x64 /p:Configuration=Debug /verbosity:quiet ```
cde303c3-e300-4b9c-b379-c68785583c52
{ "language": "Batchfile" }
```batchfile @echo off Nuget.exe restore "Source\MSBuild.Community.Tasks.sln" NuGet.exe install MSBuildTasks -OutputDirectory .\Tools\ -ExcludeVersion -NonInteractive NuGet.exe install ILRepack.MSBuild.Task -OutputDirectory .\Tools\ -ExcludeVersion -NonInteractive ``` Use ILRepack.MSBuild.Task from sympa public myget feed
```batchfile @echo off Nuget.exe restore "Source\MSBuild.Community.Tasks.sln" NuGet.exe install MSBuildTasks -OutputDirectory .\Tools\ -ExcludeVersion -NonInteractive Nuget.exe install ILRepack.MSBuild.Task -Version 1.1.0 -Source https://www.myget.org/F/sympa-public/api/v3/index.json -OutputDirectory .\Tools\ -ExcludeVersion -NonInteractive ```
7e2d8d6f-ff49-47b7-a0e0-99cf1e516fd2
{ "language": "Batchfile" }
```batchfile @echo off chcp 65001>nul prompt [%USERNAME%@%COMPUTERNAME% $p]$_$$$s rem Fake a UNIX environment doskey clear=cls doskey ls=dir /d $* doskey cp=copy $* doskey mv=move $* doskey rm=del $* doskey cat=type $* doskey touch=type nul$G$G$* doskey pwd=echo %CD% rem Easier navigation doskey cd=cd /D $* doskey cd..=cd .. doskey ..=cd .. doskey ...=cd ../.. doskey ....=cd ../../.. rem List files properly doskey l=dir /b $* doskey ll=dir /b $* rem Edit functionality if exist ""%PROGRAMFILES%\Sublime Text 3"" ( doskey edit="%PROGRAMFILES%\Sublime Text 3\sublime_text" $* ) where atom >nul 2>&1 if %ERRORLEVEL% EQU 0 ( doskey edit=atom $* ) where code >nul 2>&1 if %ERRORLEVEL% EQU 0 ( doskey edit=code $* ) rem Open functionality doskey open=start $* @echo on ``` Make sure we can exit cmd when we start code
```batchfile @echo off chcp 65001>nul prompt [%USERNAME%@%COMPUTERNAME% $p]$_$$$s rem Fake a UNIX environment doskey clear=cls doskey ls=dir /d $* doskey cp=copy $* doskey mv=move $* doskey rm=del $* doskey cat=type $* doskey touch=type nul$G$G$* doskey pwd=echo %CD% rem Easier navigation doskey cd=cd /D $* doskey cd..=cd .. doskey ..=cd .. doskey ...=cd ../.. doskey ....=cd ../../.. rem List files properly doskey l=dir /b $* doskey ll=dir /b $* rem Edit functionality if exist ""%PROGRAMFILES%\Sublime Text 3"" ( doskey edit="%PROGRAMFILES%\Sublime Text 3\sublime_text" $* ) where atom >nul 2>&1 if %ERRORLEVEL% EQU 0 ( doskey edit=atom $* ) where code >nul 2>&1 if %ERRORLEVEL% EQU 0 ( doskey edit=start /min code $* ) rem Open functionality doskey open=start $* @echo on ```
a6978eaf-6abe-4548-9ac8-928b9b86a234
{ "language": "Batchfile" }
```batchfile @rem Schema downloader @rem @rem Tool to download schemas. @echo off setlocal if "%XMLBEANS_HOME%" EQU "" (set XMLBEANS_HOME=%~dp0..) set cp= set cp=%cp%;%XMLBEANS_HOME%\build\ar\xbean.jar java -classpath %cp% org.apache.xmlbeans.impl.tool.SchemaResourceManager %* :done ``` Fix for sDownload tool. Added correct v2 classpath entries. Submitted by: Jacob Danner
```batchfile @rem Schema downloader @rem @rem Tool to download schemas. @echo off setlocal if "%XMLBEANS_HOME%" EQU "" (set XMLBEANS_HOME=%~dp0..) set cp= set cp=%cp%;%XMLBEANS_HOME%\build\ar\xbean.jar set cp=%cp%;%XMLBEANS_HOME%\build\lib\jsr173_api.jar set cp=%cp%;%XMLBEANS_HOME%\build\lib\resolver.jar java -classpath %cp% org.apache.xmlbeans.impl.tool.SchemaResourceManager %* :done ```
cd3ad698-031d-4cda-b126-c3d9fb663dc1
{ "language": "Batchfile" }
```batchfile SET PACKAGE_VERSION=3.0.1 cd .\src\Templates nuget pack -Version %PACKAGE_VERSION% dotnet new -u GeneticSharp.Templates dotnet new -i GeneticSharp.Templates.%PACKAGE_VERSION%.nupkg echo GeneticSharpTspBlazorApp dotnet new GeneticSharpTspBlazorApp -n TspBlazorApp -o TspBlazorApp echo GeneticSharpConsoleApp dotnet new GeneticSharpConsoleApp -n ConsoleApp -o ConsoleApp dotnet build ConsoleApp/ConsoleApp.csproj echo GeneticSharpTspConsoleApp dotnet new GeneticSharpTspConsoleApp -n TspConsoleApp -o TspConsoleApp dotnet build TspConsoleApp/TspConsoleApp.csproj echo GeneticSharpTspUnity3d dotnet new GeneticSharpTspUnity3d -n TspUnity3d -o TspUnity3d cd ..\..``` Fix the nuget templates version
```batchfile SET PACKAGE_VERSION=3.0.0 cd .\src\Templates nuget pack -Version %PACKAGE_VERSION% dotnet new -u GeneticSharp.Templates dotnet new -i GeneticSharp.Templates.%PACKAGE_VERSION%.nupkg echo GeneticSharpTspBlazorApp dotnet new GeneticSharpTspBlazorApp -n TspBlazorApp -o TspBlazorApp echo GeneticSharpConsoleApp dotnet new GeneticSharpConsoleApp -n ConsoleApp -o ConsoleApp dotnet build ConsoleApp/ConsoleApp.csproj echo GeneticSharpTspConsoleApp dotnet new GeneticSharpTspConsoleApp -n TspConsoleApp -o TspConsoleApp dotnet build TspConsoleApp/TspConsoleApp.csproj echo GeneticSharpTspUnity3d dotnet new GeneticSharpTspUnity3d -n TspUnity3d -o TspUnity3d cd ..\..```
87031afc-17a3-44b1-b885-bba73dcb310d
{ "language": "Batchfile" }
```batchfile @echo off echo HTTP/1.1 200 OK echo Connection: close echo. echo CGI test: echo. set ``` Fix up batch script line endings
```batchfile @echo off echo HTTP/1.1 200 OK echo Connection: close echo. echo CGI test: echo. set ```
087ed428-f387-4000-a986-34129d74253d
{ "language": "Batchfile" }
```batchfile ``` Add utility script to quick re-generate the wiki pages
```batchfile @ECHO OFF PUSHD "%~dp0." PUSHD wiki npm install node airbit.wiki.js POPD IF EXIST public\wiki RD /Q public\wiki MKLINK /J public\wiki wiki\_site POPD```
51417ed0-252f-4e17-8cb8-afed836f2c9a
{ "language": "Batchfile" }
```batchfile md build cd build cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CONFIGURATION_TYPES=Release -G "Visual Studio 14 2015" .. devenv musicgame.sln /build pause``` Fix slight issue with the windows build script not returning to the original folder it was invoked from.
```batchfile md build cd build cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CONFIGURATION_TYPES=Release -G "Visual Studio 14 2015" .. devenv musicgame.sln /build cd .. pause ```
34472719-eb53-42e9-9cd0-b603e4bfdf4a
{ "language": "Batchfile" }
```batchfile cd /d "%~dp0" cd .. rmdir /s /q install rmdir /s /q build mkdir build cd build cmake .. -G "Visual Studio 12" "-DCMAKE_INSTALL_PREFIX=%WORKSPACE%\install" %* cmake --build . --config Debug cmake --build . --config RelWithDebInfo cmake --build . --config RelWithDebInfo -- /p:RunCodeAnalysis=True cmake --build . --config RelWithDebInfo --target INSTALL rem bin\Debug\LoadTest.exe --gtest_output=xml:test_details.Debug.xml rem bin\RelWithDebInfo\LoadTest.exe --gtest_output=xml:test_details.RelWithDebInfo.xml pause``` Change build order for CI.
```batchfile cd /d "%~dp0" cd .. rmdir /s /q install rmdir /s /q build mkdir build cd build cmake .. -G "Visual Studio 12" "-DCMAKE_INSTALL_PREFIX=%WORKSPACE%\install" %* cmake --build . --config Debug cmake --build . --config RelWithDebInfo cmake --build . --config RelWithDebInfo --target INSTALL cmake --build . --config RelWithDebInfo -- /p:RunCodeAnalysis=True rem bin\Debug\LoadTest.exe --gtest_output=xml:test_details.Debug.xml rem bin\RelWithDebInfo\LoadTest.exe --gtest_output=xml:test_details.RelWithDebInfo.xml pause```
69bb1290-0e04-4afb-8a6b-6e93502545c0
{ "language": "Batchfile" }
```batchfile @echo off echo node.js > 5.3.0 must be installed for this script to work. echo If this script fails, try closing editors and running it again first. echo Any warnings about optional dependencies can be safely ignored. pause REM Install Gulp cmd /c npm install gulp-cli -g REM Install tgui dependencies cmd /c npm install REM Flatten dependency tree cmd /c npm dedupe REM Clean dependency tree cmd /c npm prune pause ``` Fix message in install script
```batchfile @echo off echo node.js 5.3.0 or newer must be installed for this script to work. echo If this script fails, try closing editors and running it again first. echo Any warnings about optional dependencies can be safely ignored. pause REM Install Gulp cmd /c npm install gulp-cli -g REM Install tgui dependencies cmd /c npm install REM Flatten dependency tree cmd /c npm dedupe REM Clean dependency tree cmd /c npm prune pause ```