doc_id
stringlengths
36
36
metadata
dict
input
stringlengths
28
4.3k
output
stringlengths
11
5.45k
f3ed3e09-5d41-41bd-8e5b-42e6d7074357
{ "language": "Batchfile" }
```batchfile md assets\Data xcopy ..\..\Bin\Data\*.* assets\Data /S /E /C /Y xcopy ..\..\Bin\*.json assets /S /E /C /Y rd /S /Q assets\Data\Shaders\HLSL ``` Copy also Scenes & Assets directories to apk.
```batchfile md assets\Data md assets\Scenes md assets\Assets xcopy ..\..\Bin\Data\*.* assets\Data /S /E /C /Y xcopy ..\..\Bin\Scenes\*.* assets\Scenes /S /E /C /Y xcopy ..\..\Bin\Assets\*.* assets\Assets /S /E /C /Y xcopy ..\..\Bin\*.json assets /S /E /C /Y rd /S /Q assets\Data\Shaders\HLSL ```
29b68c0f-66cc-449a-afdc-709ba6cc6753
{ "language": "Batchfile" }
```batchfile set version=%1 runhaskell ..\BuildFromSource.hs %version% mkdir files mkdir files\bin mkdir files\share mkdir files\share\compiler mkdir files\share\reactor set platform=Elm-Platform\%version% xcopy %platform%\bin\elm*.exe files\bin /s /e xcopy %platform%\Elm\data\* files\share\compiler /s /e xcopy %platform%\elm-reactor\assets\* files\share\reactor /s /e xcopy updatepath.vbs files "%ProgramFiles% (x86)\NSIS\makensis.exe" /DPLATFORM_VERSION=%version% Nsisfile.nsi rd /s /q files ``` Solve the x86 vs not x86 issue for good
```batchfile set version=%1 runhaskell ..\BuildFromSource.hs %version% mkdir files mkdir files\bin mkdir files\share mkdir files\share\compiler mkdir files\share\reactor set platform=Elm-Platform\%version% xcopy %platform%\bin\elm*.exe files\bin /s /e xcopy %platform%\Elm\data\* files\share\compiler /s /e xcopy %platform%\elm-reactor\assets\* files\share\reactor /s /e xcopy updatepath.vbs files if EXIST "%ProgramFiles%" ( set nsis=%ProgramFiles%\NSIS ) else ( set nsis=%ProgramFiles(x86)%\NSIS ) "%nsis%\makensis.exe" /DPLATFORM_VERSION=%version% Nsisfile.nsi rd /s /q files ```
eba8e036-63ba-4a9f-b6db-6215731d8dc3
{ "language": "Batchfile" }
```batchfile @echo off rem Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one rem or more contributor license agreements. Licensed under the Elastic License; rem you may not use this file except in compliance with the Elastic License. setlocal enabledelayedexpansion setlocal enableextensions call "%~dp0elasticsearch-env.bat" || exit /b 1 call "%~dp0x-pack-env.bat" || exit /b 1 set CLI_JAR=%ES_HOME%/plugins/bin/* %JAVA% ^ -cp "%CLI_JAR%" ^ -Des.distribution.flavor="%ES_DISTRIBUTION_FLAVOR%" ^ -Des.distribution.type="%ES_DISTRIBUTION_TYPE%" ^ org.elasticsearch.xpack.sql.cli.Cli ^ %* endlocal endlocal ``` Fix SQL CLI on Windows
```batchfile @echo off rem Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one rem or more contributor license agreements. Licensed under the Elastic License; rem you may not use this file except in compliance with the Elastic License. setlocal enabledelayedexpansion setlocal enableextensions call "%~dp0elasticsearch-env.bat" || exit /b 1 call "%~dp0x-pack-env.bat" || exit /b 1 set CLI_JAR=%ES_HOME%/bin/* %JAVA% ^ -cp "%CLI_JAR%" ^ -Des.distribution.flavor="%ES_DISTRIBUTION_FLAVOR%" ^ -Des.distribution.type="%ES_DISTRIBUTION_TYPE%" ^ org.elasticsearch.xpack.sql.cli.Cli ^ %* endlocal endlocal ```
21e2ad43-270e-4e79-ab41-71477fe74bc8
{ "language": "Batchfile" }
```batchfile ECHO OFF REM - Check for OS. This script works in Vista or later. REM Running it on XP may delete the entire Brackets repo if 'Release\dev' is a junction point. ver | findstr /i "5\.1\." > nul IF %ERRORLEVEL% EQU 0 GOTO XPNotSupported REM Remove existing links rmdir Debug include lib libcef_dll Release REM Make new links mklink /j Debug deps\cef\Debug mklink /j include deps\cef\include mklink /j lib deps\cef\lib mklink /j libcef_dll deps\cef\libcef_dll mklink /j Release deps\cef\Release GOTO Exit :XPNotSupported ECHO Sorry, this script doesn't run in Windows XP. Build brackets-shell on a newer computer and ECHO manually place the results in brackets-shell\Release. :Exit``` Remove dev symlinks before deleting Release and Debug dirs.
```batchfile ECHO OFF REM - Check for OS. This script works in Vista or later. REM Running it on XP may delete the entire Brackets repo if 'Release\dev' is a junction point. ver | findstr /i "5\.1\." > nul IF %ERRORLEVEL% EQU 0 GOTO XPNotSupported REM Remove existing links to dev folder rmdir Release\dev rmdir Debug\dev REM Remove existing links rmdir Debug include lib libcef_dll Release REM Make new links mklink /j Debug deps\cef\Debug mklink /j include deps\cef\include mklink /j lib deps\cef\lib mklink /j libcef_dll deps\cef\libcef_dll mklink /j Release deps\cef\Release GOTO Exit :XPNotSupported ECHO Sorry, this script doesn't run in Windows XP. Build brackets-shell on a newer computer and ECHO manually place the results in brackets-shell\Release. :Exit```
f1f8bc01-10b3-4ac2-9917-780a70e62cc8
{ "language": "Batchfile" }
```batchfile @echo off setlocal set DOTNET_SCRIPT_PATH= for %%i in (dotnet-script.exe) do set DOTNET_SCRIPT_PATH=%%~$PATH:i if not defined DOTNET_SCRIPT_PATH call :no-dotnet set LINQPADLESS=__LINQPADLESS__ "%DOTNET_SCRIPT_PATH%" "%~dpn0.csx" -- %* goto :EOF :no-dotnet-script >&2 echo dotnet does not appear to be installed, which is needed to run this >&2 echo script. For instructions on how to download and install, visit: >&2 echo https://github.com/filipw/dotnet-script exit /b 1 ``` Fix label jump typo in script cmd template
```batchfile @echo off setlocal set DOTNET_SCRIPT_PATH= for %%i in (dotnet-script.exe) do set DOTNET_SCRIPT_PATH=%%~$PATH:i if not defined DOTNET_SCRIPT_PATH call :no-dotnet-script set LINQPADLESS=__LINQPADLESS__ "%DOTNET_SCRIPT_PATH%" "%~dpn0.csx" -- %* goto :EOF :no-dotnet-script >&2 echo dotnet does not appear to be installed, which is needed to run this >&2 echo script. For instructions on how to download and install, visit: >&2 echo https://github.com/filipw/dotnet-script exit /b 1 ```
7a528aa2-dff4-4472-8e0e-4129a3b0ef1b
{ "language": "Batchfile" }
```batchfile ``` Add batch script to run SWMM5 from command line
```batchfile @echo off REM Test SWMM5 simulation REM This is an example script to run SWMM5 from command line REM Syntax: REM [PATH TO swmm5.exe] [PATH TO SWMM5 INPUT FILE (*.inp)] [PATH TO SWMM5 OUTPUT SUMMARY FILE (*.rpt)] [(OPTIONAL) PATH TO SWMM5 OUTPUT BINARY FILE (*.out)] REM Save only the summary (text) output file (*.rpt) with given time series at the end of the file "../../../swmm/swmm5.exe" "../demo_catchment/out/SWMM_in/demo_catchment_adap.inp" "../demo_catchment/out/SWMM_out/demo_catchment_adap.rpt" REM Save the summary (text) output file (*.rpt) and the binary file (*.out) with detailed simulation results only in the binary file "../../../swmm/swmm5.exe" "../demo_catchment/out/SWMM_in/demo_catchment_rect.inp" "../demo_catchment/out/SWMM_out/demo_catchment_rect.rpt" "../demo_catchment/out/SWMM_out/demo_catchment_rect.out" REM Wait for user input before closing terminal pause ```
15eca4f4-c3fa-40f9-9d9b-3705f92e02d1
{ "language": "Batchfile" }
```batchfile ``` Add run script for Windows
```batchfile SET "AIR_SDK=%USERPROFILE%\Documents\AdobeAIRSDK" set "STEAM_SDK=%USERPROFILE%\Documents\Steam\sdk" SET ANE_PATH=..\..\lib\bin set "PATH=%STEAM_SDK%\redistributable_bin;%PATH%" "%AIR_SDK%\bin\adl.exe" -extdir "%ANE_PATH%" FRESteamWorksTest-app.xml ```
2d03c979-8347-42d9-a433-8699855d74a5
{ "language": "Batchfile" }
```batchfile echo off php pre.php %1 %2 %3 ``` Add comments (REM) to bat file.
```batchfile echo off rem To simplify using pre on multiple sites/directories, install this bat file in the Windows path. php pre.php %1 %2 %3 ```
9cf1998c-f619-4bcd-b788-53ef06c97071
{ "language": "Batchfile" }
```batchfile rem This script use MinGW to build the MDSP. rem But still we use certain CygWin utilities: SVN PATH=C:\mingw\bin\;c:\mingw\mingw32\bin\;c:\mingw\msys\1.0\bin;C:\MinGW\libexec\gcc\mingw32\4.5.0\;C:\cygwin\bin\;c:\buildbot\bin;%PATH% set HOME=/c/buildbot/ bash mdsp_test_suite.sh mail ``` Disable MinGW test - currently we don't have Boost libs verified for it.
```batchfile rem This script use MinGW to build the MDSP. rem But still we use certain CygWin utilities: SVN rem Currently MingGW version is disabled - we don't have validated Boost libs version for it. exit PATH=C:\mingw\bin\;c:\mingw\mingw32\bin\;c:\mingw\msys\1.0\bin;C:\MinGW\libexec\gcc\mingw32\4.5.0\;C:\cygwin\bin\;c:\buildbot\bin;%PATH% set HOME=/c/buildbot/ bash mdsp_test_suite.sh mail ```
0dc679c2-b3b1-43f5-8a74-310475eeda11
{ "language": "Batchfile" }
```batchfile ``` Add a Batch script for running tests on Windows
```batchfile @echo off REM Run tests on Windows. REM REM To run these tests, you should set up your Windows machine with the same REM paths that are used in AppVeyor. set tests=test/*.vader test/*/*.vader test/*/*/*.vader test/*/*/*/*.vader REM Use the first argument for selecting tests to run. if not "%1"=="" set tests=%1 set VADER_OUTPUT_FILE=%~dp0\vader_output type nul > "%VADER_OUTPUT_FILE%" C:\vim\vim\vim80\vim.exe -u test/vimrc "+Vader! %tests%" type "%VADER_OUTPUT_FILE%" del "%VADER_OUTPUT_FILE%" ```
cb9cce8b-8c41-41dd-884c-b0a57a585c08
{ "language": "Batchfile" }
```batchfile xcopy /Y /F "../../dist/preview release/babylon.d.ts" . xcopy /Y /F "../../dist/preview release/babylon.js" . xcopy /Y /F "../../dist/preview release/babylon.max.js" . xcopy /Y /F "../../dist/preview release/babylon.noworker.js" . xcopy /Y /F "../../dist/preview release/babylon.core.js" . xcopy /Y /F "../../dist/preview release/oimo.js" . pause``` Add Canvas2D to the npm release script
```batchfile xcopy /Y /F "../../dist/preview release/babylon.d.ts" . xcopy /Y /F "../../dist/preview release/babylon.js" . xcopy /Y /F "../../dist/preview release/babylon.max.js" . xcopy /Y /F "../../dist/preview release/babylon.noworker.js" . xcopy /Y /F "../../dist/preview release/babylon.core.js" . xcopy /Y /F "../../dist/preview release/canvas2D/babylon.canvas2d.js" . xcopy /Y /F "../../dist/preview release/oimo.js" . pause ```
f9c84ed2-4b18-4b24-aaf5-9dfec1a60910
{ "language": "Batchfile" }
```batchfile curl -sSf https://static.rust-lang.org/dist/rust-nightly-${env:TARGET}.exe -o rust-nightly-%TARGET%.exe rust-nightly-%TARGET%.exe /VERYSILENT /NORESTART /DIR="C:\Program Files (x86)\Rust" set PATH=%PATH%;C:\Program Files (x86)\Rust\bin if defined MSYS_BITS set PATH=C:\msys64\mingw%MSYS_BITS%\bin;C:\msys64\usr\bin;%PATH% set CARGO_TARGET_DIR=%APPVEYOR_BUILD_FOLDER%\target rustc -V cargo -V git submodule update --init --recursive ``` Change symbols to var resolve for windows builds
```batchfile curl -sSf https://static.rust-lang.org/dist/rust-nightly-%TARGET%.exe -o rust-nightly-%TARGET%.exe rust-nightly-%TARGET%.exe /VERYSILENT /NORESTART /DIR="C:\Program Files (x86)\Rust" set PATH=%PATH%;C:\Program Files (x86)\Rust\bin if defined MSYS_BITS set PATH=C:\msys64\mingw%MSYS_BITS%\bin;C:\msys64\usr\bin;%PATH% set CARGO_TARGET_DIR=%APPVEYOR_BUILD_FOLDER%\target rustc -V cargo -V git submodule update --init --recursive ```
8237b326-5e5f-4ee1-b00a-2c7f58cb4e7a
{ "language": "Batchfile" }
```batchfile @echo off rem This script is in use by the Windows buildslaves to upload the package to openphdguiding.org set exitcode=1 for /F "usebackq" %%f in (`dir phd2-*-win32.exe /O-D /B` ) do ( if EXIST %%f ( ( echo cd upload echo put %%f echo quit ) | psftp [email protected] set exitcode=%errorlevel% ) goto :end ) :end exit /B %exitcode% ``` Use a putty saved session instead of pageant
```batchfile @echo off rem This script is in use by the Windows buildslaves to upload the package to openphdguiding.org rem rem Before to run this script you need to install putty and add it to PATH. rem As we cannot use pageant from the buildbot service we need to create rem a saved session named phd2buildbot in putty using the same user as the service. rem Set the hostname, auto-login user name and private key in the session. set exitcode=1 for /F "usebackq" %%f in (`dir phd2-*-win32.exe /O-D /B` ) do ( if EXIST %%f ( ( echo cd upload echo put %%f echo quit ) | psftp phd2buildbot set exitcode=%errorlevel% ) goto :end ) :end exit /B %exitcode% ```
e88e5b1b-34a9-4569-8c96-692889002ee2
{ "language": "Batchfile" }
```batchfile @echo off echo Press any key to publish pause ".nuget\NuGet.exe" push Rssdp.3.5.0-beta.nupkg -Source https://www.nuget.org/api/v2/package pause``` Update command file for publishing nuget.
```batchfile @echo off echo Press any key to publish pause ".nuget\NuGet.exe" push Rssdp.3.5.3.nupkg -Source https://www.nuget.org/api/v2/package pause```
b836bc3b-f615-4588-bbfb-813609607778
{ "language": "Batchfile" }
```batchfile ECHO Clone Dolphin image environment git clone -q --branch=master https://github.com/dolphinsmalltalk/Dolphin.git Dolphin ECHO Copy executables copy ..\..\Dolphin7.exe Dolphin copy ..\..\DolphinVM7.dll Dolphin copy ..\..\DolphinCR7.dll Dolphin copy ..\..\DolphinDR7.dll Dolphin copy ..\..\DolphinSureCrypto.dll Dolphin ECHO Boot and test image cd Dolphin Dolphin7 DBOOT.img7 DolphinProfessional CALL TestDPRO ``` Revert "Don't do a BootDPRO but instead call the boot directly."
```batchfile ECHO Clone Dolphin image environment git clone -q --branch=master https://github.com/dolphinsmalltalk/Dolphin.git Dolphin ECHO Copy executables copy ..\..\Dolphin7.exe Dolphin copy ..\..\DolphinVM7.dll Dolphin copy ..\..\DolphinCR7.dll Dolphin copy ..\..\DolphinDR7.dll Dolphin copy ..\..\DolphinSureCrypto.dll Dolphin ECHO Boot and test image cd Dolphin CALL BootDPRO CALL TestDPRO```
2e0af477-22f5-4772-9f84-7da932731bba
{ "language": "Batchfile" }
```batchfile @echo off cls :start echo Starting server... "Nomad Server\NomadServer.exe" -name "My Oxide Server" -port 5127 -slots 10 -clientVersion "0.72" -password "" -tcpLobby "149.202.51.185" 25565 echo. echo Restarting server... echo. goto start ``` Patch for version 0.73 update
```batchfile @echo off cls :start echo Starting server... "Nomad Server\NomadServer.exe" -name "My Oxide Server" -port 5127 -slots 10 -clientVersion "0.73" -password "" -tcpLobby "149.202.51.185" 25565 echo. echo Restarting server... echo. goto start ```
00648438-ec12-45a6-80ff-0200ca741e22
{ "language": "Batchfile" }
```batchfile ``` Add script to conditionally start Bridge
```batchfile echo off setlocal tasklist /FI "IMAGENAME eq Bridge.exe" 2>NUL | find /I /N "Bridge.exe">NUL if "%ERRORLEVEL%"=="0" ( echo The Bridge is already running. goto running ) pushd %~dp0 echo Building the Bridge... call BuildWCFTestService.cmd popd if '%BridgeResourceFolder%' == '' ( set _bridgeResourceFolder=..\..\Bridge\Resources ) else ( set _bridgeResourceFolder=%BridgeResourceFolder% ) pushd %~dp0..\..\..\..\bin\wcf\tools\Bridge echo Invoking Bridge.exe with arguments: /BridgeResourceFolder:%_bridgeResourceFolder% %* start /MIN Bridge.exe /BridgeResourceFolder:%_bridgeResourceFolder% %* popd :running exit /b ```
a79da0fd-af34-4efa-811c-b2becf42345c
{ "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/66dd7e2a3966c06180df0eb66cc9400d4b961e5e 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 use latest KuduScript
```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/254116790e41bc69bce809e46c9998f03addcfc4 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 ```
7c9f2cce-7b14-4c11-8ddb-abffd2c36779
{ "language": "Batchfile" }
```batchfile ``` Add bat for building solution from CLI
```batchfile SET PATH=C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk\bin;%PATH%; CALL "C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\Tools\VsDevCmd.bat" git pull --recurse-submodules git submodule update msbuild /p:Configuration=Normal gsutil cp Normal/engine/engine.exe gs://grit-engine/ gsutil cp Normal/launcher/launcher.exe gs://grit-engine/ gsutil cp Normal/extract/extract.exe gs://grit-engine/ gsutil cp Normal/GritXMLConverter/GritXMLConverter.exe gs://grit-engine/ ```
36853508-7cf0-49a6-b3a3-6955043f24a1
{ "language": "Batchfile" }
```batchfile @echo on set config=%1 if "%config%" == "" ( set config=Release ) set version= if not "%PackageVersion%" == "" ( set version=-Version %PackageVersion% ) if "%NuGet%" == "" ( set NuGet=".nuget\nuget.exe" ) REM Package restore call %NuGet% restore PropertyCopier\packages.config -OutputDirectory %cd%\packages -NonInteractive REM Build %WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild PropertyCopier.sln /p:Configuration="%config%" /m /v:M /fl /flp:LogFile=msbuild.log;Verbosity=Normal /nr:false REM Unit tests %nunit% PropertyCopier.Tests\bin\%config%\PropertyCopier.Tests.dll if not "%errorlevel%"=="0" goto failure REM Package mkdir Build mkdir Build\net40 copy PropertyCopier\bin\%config%\PropertyCopier.dll Build\net40 copy PropertyCopier\bin\%config%\PropertyCopier.pdb Build\net40 call %NuGet% pack "PropertyCopier\PropertyCopier.csproj" -IncludeReferencedProjects -symbols -o Build\net40 -p Configuration=%config% %version% :success exit 0 :failure exit -1 ``` Fix batch file unit tests
```batchfile @echo on set config=%1 if "%config%" == "" ( set config=Release ) set version= if not "%PackageVersion%" == "" ( set version=-Version %PackageVersion% ) if "%NuGet%" == "" ( set NuGet=".nuget\nuget.exe" ) REM Package restore call %NuGet% restore PropertyCopier\packages.config -OutputDirectory %cd%\packages -NonInteractive REM Build %WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild PropertyCopier.sln /p:Configuration="%config%" /m /v:M /fl /flp:LogFile=msbuild.log;Verbosity=Normal /nr:false REM Unit tests packages\NUnit.Runners.2.6.4\tools PropertyCopier.Tests\bin\%config%\PropertyCopier.Tests.dll if not "%errorlevel%"=="0" goto failure REM Package mkdir Build mkdir Build\net40 copy PropertyCopier\bin\%config%\PropertyCopier.dll Build\net40 copy PropertyCopier\bin\%config%\PropertyCopier.pdb Build\net40 call %NuGet% pack "PropertyCopier\PropertyCopier.csproj" -IncludeReferencedProjects -symbols -o Build\net40 -p Configuration=%config% %version% :success exit 0 :failure exit -1 ```
7cdff92b-175e-4c6f-9289-8b28fb077ca0
{ "language": "Batchfile" }
```batchfile ``` Add bat file for creating project with MSVC12 toolchain
```batchfile call "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" amd64 rmdir buildRelease /s /q rmdir buildDebug /s /q mkdir buildRelease mkdir buildDebug cd buildRelease cmake ../ -GNinja^ -DCMAKE_BUILD_TYPE=Release^ -DCMAKE_PREFIX_PATH=c:/Qt/Qt5.5.1/msvc2013_64/^ -DGTEST_ROOT=e:/Dev/Libs/external/ cd ..\buildDebug cmake ../ -GNinja^ -DCMAKE_BUILD_TYPE=Debug^ -DCMAKE_PREFIX_PATH=c:/Qt/Qt5.5.1/msvc2013_64/^ -DGTEST_ROOT=e:/Dev/Libs/external/ cd .. ```
773fc9dd-d4c1-474f-905a-7fa30dc5b471
{ "language": "Batchfile" }
```batchfile @echo off SETLOCAL enabledelayedexpansion TITLE Elasticsearch ${project.version} SET params='%*' :loop FOR /F "usebackq tokens=1* delims= " %%A IN (!params!) DO ( SET current=%%A SET params='%%B' SET silent=N IF "!current!" == "-s" ( SET silent=Y ) IF "!current!" == "--silent" ( SET silent=Y ) IF "!silent!" == "Y" ( SET nopauseonerror=Y ) ELSE ( IF "x!newparams!" NEQ "x" ( SET newparams=!newparams! !current! ) ELSE ( SET newparams=!current! ) ) IF "x!params!" NEQ "x" ( GOTO loop ) ) SET HOSTNAME=%COMPUTERNAME% CALL "%~dp0elasticsearch.in.bat" IF ERRORLEVEL 1 ( IF NOT DEFINED nopauseonerror ( PAUSE ) EXIT /B %ERRORLEVEL% ) "%JAVA_HOME%\bin\java" %JAVA_OPTS% %ES_JAVA_OPTS% %ES_PARAMS% -cp "%ES_CLASSPATH%" "org.elasticsearch.bootstrap.Elasticsearch" start !newparams! ENDLOCAL ``` Remove positional parameter from bat file
```batchfile @echo off SETLOCAL enabledelayedexpansion TITLE Elasticsearch ${project.version} SET params='%*' :loop FOR /F "usebackq tokens=1* delims= " %%A IN (!params!) DO ( SET current=%%A SET params='%%B' SET silent=N IF "!current!" == "-s" ( SET silent=Y ) IF "!current!" == "--silent" ( SET silent=Y ) IF "!silent!" == "Y" ( SET nopauseonerror=Y ) ELSE ( IF "x!newparams!" NEQ "x" ( SET newparams=!newparams! !current! ) ELSE ( SET newparams=!current! ) ) IF "x!params!" NEQ "x" ( GOTO loop ) ) SET HOSTNAME=%COMPUTERNAME% CALL "%~dp0elasticsearch.in.bat" IF ERRORLEVEL 1 ( IF NOT DEFINED nopauseonerror ( PAUSE ) EXIT /B %ERRORLEVEL% ) "%JAVA_HOME%\bin\java" %JAVA_OPTS% %ES_JAVA_OPTS% %ES_PARAMS% -cp "%ES_CLASSPATH%" "org.elasticsearch.bootstrap.Elasticsearch" !newparams! ENDLOCAL ```
b4f55a1e-50f4-4342-a88f-1e082efdd044
{ "language": "Batchfile" }
```batchfile :: This script assumes the standard setup on tensorflow Jenkins windows machines. :: It is NOT guaranteed to work on any other machine. Use at your own risk! :: :: REQUIREMENTS: :: * All installed in standard locations: :: - JDK8, and JAVA_HOME set. :: - Microsoft Visual Studio 2015 Community Edition :: - Msys2 :: - Anaconda3 :: - CMake :: Record the directory we are in. Script should be invoked from the root of the repository. SET REPO_ROOT=%cd% :: Make sure we have a clean directory to build things in. SET BUILD_DIR=cmake_build RMDIR %BUILD_DIR% /S /Q MKDIR %BUILD_DIR% CD %BUILD_DIR% :: Set which tests to build SET BUILD_CC_TESTS=OFF SET BUILD_PYTHON_TESTS=ON :: Run the CMAKE build to build the pip package. CALL %REPO_ROOT%\tensorflow\tools\ci_build\windows\cpu\cmake\run_build.bat SET PIP_EXE="C:\Program Files\Anaconda3\Scripts\pip.exe" :: Uninstall tensorflow pip package, which might be a leftover from old runs. %PIP_EXE% uninstall tensorflow :: Install the pip package. %PIP_EXE% install %REPO_ROOT%\%BUILD_DIR%\tf_python\dist\tensorflow-0.11.0rc2_cmake_experimental-py3-none-any.whl :: Run all python tests ctest -C Release --output-on-failure ``` Make sure to uninstall the old pip package and install the newly built one when running windows tests on TF CI.
```batchfile :: This script assumes the standard setup on tensorflow Jenkins windows machines. :: It is NOT guaranteed to work on any other machine. Use at your own risk! :: :: REQUIREMENTS: :: * All installed in standard locations: :: - JDK8, and JAVA_HOME set. :: - Microsoft Visual Studio 2015 Community Edition :: - Msys2 :: - Anaconda3 :: - CMake :: Record the directory we are in. Script should be invoked from the root of the repository. SET REPO_ROOT=%cd% :: Make sure we have a clean directory to build things in. SET BUILD_DIR=cmake_build RMDIR %BUILD_DIR% /S /Q MKDIR %BUILD_DIR% CD %BUILD_DIR% :: Set which tests to build SET BUILD_CC_TESTS=OFF SET BUILD_PYTHON_TESTS=ON :: Run the CMAKE build to build the pip package. CALL %REPO_ROOT%\tensorflow\tools\ci_build\windows\cpu\cmake\run_build.bat SET PIP_EXE="C:\Program Files\Anaconda3\Scripts\pip.exe" :: Uninstall tensorflow pip package, which might be a leftover from old runs. %PIP_EXE% uninstall -y tensorflow :: Install the pip package. %PIP_EXE% install --upgrade %REPO_ROOT%\%BUILD_DIR%\tf_python\dist\tensorflow-0.11.0rc2_cmake_experimental-py3-none-any.whl :: Run all python tests ctest -C Release --output-on-failure ```
d43b768b-4131-4f4e-b1b5-a3095b3f739d
{ "language": "Batchfile" }
```batchfile @echo off call config.bat echo Installing PIP... %PYTHON% %BINDIR%\get-pip.py echo Installing KCAA Python server prerequisites... %PIP% install python-dateutil %PIP% install requests %PIP% install selenium pause ``` Create a user data directory on Windows.
```batchfile @echo off call config.bat echo Creating USERDATADIR: %USERDATADIR% mkdir %USERDATADIR% echo Installing PIP... %PYTHON% %BINDIR%\get-pip.py echo Installing KCAA Python server prerequisites... %PIP% install python-dateutil %PIP% install requests %PIP% install selenium pause ```
7283ae35-30cf-4d60-afc7-50a1e529c5bc
{ "language": "Batchfile" }
```batchfile @echo off ..\..\Tools\PhpNetTester.exe /compiler:..\..\Deployment\Debug\phpc.exe /php:..\..\Tools\PHP\php.exe del /s *.pdb *.exe EmittedNodes.csv LibraryCalls.csv UnknownCalls.csv __input.txt Debug.log > nul @echo Deleting empty log files... for /f "delims=" %%i in ('dir /s/b/a-d *.log') do if %~zi==0 del %%i pause ``` Test runner batch now takes optional command-line arguments.
```batchfile @echo off ..\..\Tools\PhpNetTester.exe /compiler:..\..\Deployment\Debug\phpc.exe /php:..\..\Tools\PHP\php.exe %* del /s *.pdb *.exe EmittedNodes.csv LibraryCalls.csv UnknownCalls.csv __input.txt Debug.log > nul @rem Deleting empty log files... for /f "delims=" %%i in ('dir /s/b/a-d *.log') do if %%~zi==0 del %%i pause ```
1543a0bb-9f4d-4141-9cd2-ddd1787910ff
{ "language": "Batchfile" }
```batchfile cd conda-skeletons conda install conda-build anaconda-client conda config --add channels matsci conda config --set anaconda_upload yes FOR %%A IN (latexcodec pybtex spglib pyhull pymatgen seekpath) DO conda build --user matsci %%A cd .. ``` ADd pymatgen-db to windwos build.
```batchfile cd conda-skeletons conda install conda-build anaconda-client conda config --add channels matsci conda config --set anaconda_upload yes FOR %%A IN (latexcodec pybtex spglib pyhull pymatgen pymatgen-db seekpath) DO conda build --user matsci %%A cd .. ```
d294d80a-d57f-4dac-a94d-af7a4fe80bb4
{ "language": "Batchfile" }
```batchfile @echo off set /P NVM_PATH="Enter the absolute path where the zip file is extracted/copied to: " setx /M NVM_HOME "%NVM_PATH%" setx /M NVM_SYMLINK "C:\Program Files\nodejs" setx /M PATH "%PATH%;%NVM_HOME%;%NVM_SYMLINK%" if exist "%SYSTEMDRIVE%\Program Files (x86)\" ( set SYS_ARCH=64 ) else ( set SYS_ARCH=32 ) (echo root: %NVM_HOME% && echo path: %NVM_SYMLINK% && echo arch: %SYS_ARCH% && echo proxy: none) > %NVM_HOME%\settings.txt notepad %NVM_HOME%\settings.txt @echo on ``` Set environment variables for current process
```batchfile @echo off set /P NVM_PATH="Enter the absolute path where the zip file is extracted/copied to: " set NVM_HOME=%NVM_PATH% set NVM_SYMLINK=C:\Program Files\nodejs setx /M NVM_HOME "%NVM_HOME%" setx /M NVM_SYMLINK "%NVM_SYMLINK%" setx /M PATH "%PATH%;%NVM_HOME%;%NVM_SYMLINK%" if exist "%SYSTEMDRIVE%\Program Files (x86)\" ( set SYS_ARCH=64 ) else ( set SYS_ARCH=32 ) (echo root: %NVM_HOME% && echo path: %NVM_SYMLINK% && echo arch: %SYS_ARCH% && echo proxy: none) > %NVM_HOME%\settings.txt notepad %NVM_HOME%\settings.txt @echo on ```
f34b1536-38ef-406a-8961-82795e786b9f
{ "language": "Batchfile" }
```batchfile ``` Build script for Windows users
```batchfile @echo off :: Requirements for building :: Download "Open Source Flex SDK" from http://www.adobe.com/devnet/flex/flex-sdk-download-all.html :: file similar to: flex_sdk_4.1.0.16076_mpl.zip :: :: create directory on disc e.g "C:\Program Files\FlexSdk" :: Copy and extract downloaded .zip to this location :: :: Go to Start>My Computer (right click)>Properties>Advanced System Settings>Environment Variables :: Edit System variable called "Path" :: Add ";C:\Program Files\FlexSdk\bin" (without quotes) at the end of its value echo ----- Generating new SWF ----- mxmlc Recorder.as -output recorder.swf echo ----- Copying SWF file to demo ----- xcopy /s/y "recorder.swf" "..\html\recorder.swf" exit```
39fb2ed9-ad00-420f-a2ac-3992237b18e4
{ "language": "Batchfile" }
```batchfile @echo off rem Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one rem or more contributor license agreements. Licensed under the Elastic License; rem you may not use this file except in compliance with the Elastic License. setlocal enabledelayedexpansion setlocal enableextensions call "%~dp0elasticsearch-env.bat" || exit /b 1 call "%~dp0x-pack-env.bat" || exit /b 1 set CLI_JAR=%ES_HOME%/plugins/bin/* %JAVA% ^ -cp "%CLI_JAR%" ^ -Des.distribution.flavor="%ES_DISTRIBUTION_FLAVOR%" ^ -Des.distribution.type="%ES_DISTRIBUTION_TYPE%" ^ org.elasticsearch.xpack.sql.cli.Cli ^ %* endlocal endlocal ``` Fix SQL CLI on Windows
```batchfile @echo off rem Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one rem or more contributor license agreements. Licensed under the Elastic License; rem you may not use this file except in compliance with the Elastic License. setlocal enabledelayedexpansion setlocal enableextensions call "%~dp0elasticsearch-env.bat" || exit /b 1 call "%~dp0x-pack-env.bat" || exit /b 1 set CLI_JAR=%ES_HOME%/bin/* %JAVA% ^ -cp "%CLI_JAR%" ^ -Des.distribution.flavor="%ES_DISTRIBUTION_FLAVOR%" ^ -Des.distribution.type="%ES_DISTRIBUTION_TYPE%" ^ org.elasticsearch.xpack.sql.cli.Cli ^ %* endlocal endlocal ```
e9756a13-b14a-4c44-9c71-89bdacb02cb4
{ "language": "Batchfile" }
```batchfile pip install --upgrade wxPython pip install -r requirements.txt pip install pywin32 pyinstaller -p bundledApps --onefile --windowed --clean --version-file=build/version.txt --icon=build/icons/wail_blue.ico bundledApps/WAIL.py ::Windows shell (CMD.exe) move /Y ".\dist\WAIL.exe" ".\WAIL.exe" ::Unix shell (e.g., from Git Bash on Windows) ::mv "./dist/WAIL.exe" "./WAIL.exe" ``` Update Windows python binary to use py
```batchfile py -m pip install --upgrade wxPython py -m pip install -r requirements.txt py -m pip install pywin32 pyinstaller -p bundledApps --onefile --windowed --clean --version-file=build/version.txt --icon=build/icons/wail_blue.ico bundledApps/WAIL.py ::Windows shell (CMD.exe) move /Y ".\dist\WAIL.exe" ".\WAIL.exe" ::Unix shell (e.g., from Git Bash on Windows) ::mv "./dist/WAIL.exe" "./WAIL.exe" ```
2b351926-7861-46f2-971e-a7566581e3c0
{ "language": "Batchfile" }
```batchfile @echo off setlocal EnableDelayedExpansion set registryRoot=HKCU\Software\Classes set key=OfficeScan NT reg add "%registryRoot%\*\shellex\ContextMenuHandlers\%key%" /d "---" /f ``` Disable officescan context menu on drives
```batchfile @echo off setlocal EnableDelayedExpansion set registryRoot=HKCU\Software\Classes set key=OfficeScan NT reg add "%registryRoot%\*\shellex\ContextMenuHandlers\%key%" /d "---" /f reg add "%registryRoot%\Drive\shellex\ContextMenuHandlers\%key%" /d "---" /f ```
78583914-c9ec-4a87-9135-f584d93af481
{ "language": "Batchfile" }
```batchfile ``` Add Windows development environment creator
```batchfile mkdir "C:\RestafariEnvironment" cd "C:\RestafariEnvironment" @powershell -NoProfile -ExecutionPolicy unrestricted -Command "iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))" && SET PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin choco install wget -y wget -c -O atom_setup.exe --no-check-certificate "https://atom.io/download/windows" atom_setup.exe /quiet "%APPDATA%\..\Local\atom\bin\apm.cmd" install script choco install git -y choco install python -y choco install easy.install -y easy_install.exe PyYAML colorclass anyjson pycurl git clone https://github.com/manoelhc/restafari.git @echo "%APPDATA%\..\Local\atom\bin\atom.cmd" restafari > C:\RestafariEnvironment\OpenInAtom.bat C:\RestafariEnviroment\OpenInAtom.bat ```
ad123bc3-95f0-43aa-8cf7-9348261a3b42
{ "language": "Batchfile" }
```batchfile "C:\Program Files\qemu\qemu-system-x86_64.exe" -cdrom "C:\solutions\os_c\build\os-x86_64.iso" -d int -no-shutdown -no-reboot -s``` Add telnet connection to qemu monitor
```batchfile "C:\Program Files\qemu\qemu-system-x86_64.exe" -cdrom "C:\solutions\os_c\build\os-x86_64.iso" -d int -no-shutdown -no-reboot -s -monitor telnet:127.0.0.1:2222,server,nowait```
ac04f58d-3f1b-4eb9-9ec7-5cec376a0712
{ "language": "Batchfile" }
```batchfile @echo off setlocal set SCRIPTDIR=%~dp0 set PROJDIR=%SCRIPTDIR%..\..\ set MSBUILDBIN="C:\Program Files (x86)\MSBuild\14.0\Bin\msbuild.exe" cd %PROJDIR% @echo on set BUILDDIR=%PROJDIR%build_win32\ set OUTPUTDIR=%PROJDIR%output\win32\ rmdir /S/Q %BUILDDIR% mkdir %BUILDDIR% cd %BUILDDIR% cmake %PROJDIR% -G"Visual Studio 14 2015" -DBUILD_SHARED_LIBS=ON -DENABLE_TESTING=ON -DCMAKE_CONFIGURATION_TYPES=Release || EXIT /B 1 cmake --build . --config Release --clean-first || EXIT /B 1 ctest -C Release . || EXIT /B 1 cd .. set BUILDDIR=%PROJDIR%build_win64\ set OUTPUTDIR=%PROJDIR%output\win64\ rmdir /S/Q %BUILDDIR% mkdir %BUILDDIR% cd %BUILDDIR% cmake %PROJDIR% -G"Visual Studio 14 2015 Win64" -DBUILD_SHARED_LIBS=ON -DENABLE_TESTING=ON -DENABLE_AVX2=ON -DCMAKE_CONFIGURATION_TYPES=Release || EXIT /B 1 cmake --build . --config Release --clean-first || EXIT /B 1 ctest -C Release . || EXIT /B 1 cd .. ``` Revert "add enable avx2 flag to windows build script"
```batchfile @echo off setlocal set SCRIPTDIR=%~dp0 set PROJDIR=%SCRIPTDIR%..\..\ set MSBUILDBIN="C:\Program Files (x86)\MSBuild\14.0\Bin\msbuild.exe" cd %PROJDIR% @echo on set BUILDDIR=%PROJDIR%build_win32\ set OUTPUTDIR=%PROJDIR%output\win32\ rmdir /S/Q %BUILDDIR% mkdir %BUILDDIR% cd %BUILDDIR% cmake %PROJDIR% -G"Visual Studio 14 2015" -DBUILD_SHARED_LIBS=ON -DCMAKE_CONFIGURATION_TYPES=Release %MSBUILDBIN% ALL_BUILD.vcxproj /property:Configuration=Release cd .. set BUILDDIR=%PROJDIR%build_win64\ set OUTPUTDIR=%PROJDIR%output\win64\ rmdir /S/Q %BUILDDIR% mkdir %BUILDDIR% cd %BUILDDIR% cmake %PROJDIR% -G"Visual Studio 14 2015 Win64" -DBUILD_SHARED_LIBS=ON -DCMAKE_CONFIGURATION_TYPES=Release %MSBUILDBIN% ALL_BUILD.vcxproj /property:Configuration=Release cd .. ```
f4549727-46df-49fb-b614-89ceb56ca7d3
{ "language": "Batchfile" }
```batchfile @echo off setlocal if "%1" == "--help" ( echo Usage: rbenv --version echo. echo Displays the version number of this rbenv release, including the echo current revision from git, if available. echo. echo The format of the git revision is: echo ^<version^>-^<num_commits^>-^<git_sha^> echo where `num_commits` is the number of commits since `version` was echo tagged. echo. EXIT /B ) echo rbenv 0.0.0-01 ``` Change '--version' command for release
```batchfile @echo off setlocal if "%1" == "--help" ( echo Usage: rbenv --version echo. echo Displays the version number of this rbenv release, including the echo current revision from git, if available. echo. echo The format of the git revision is: echo ^<version^>-^<num_commits^>-^<git_sha^> echo where `num_commits` is the number of commits since `version` was echo tagged. echo. EXIT /B ) echo rbenv 0.0.1-02 ```
66a8f588-ec46-434b-a741-ffd2da2ed77f
{ "language": "Batchfile" }
```batchfile @ECHO OFF REM - Use full path of this batch file to determine root directory set root_path=%~f0 set root_path=%root_path:~0,-27% REM - Check for parameter IF %1.==. GOTO Error REM - Check for OS. This script works in Vista or later. ver | findstr /i "5\.1\." > nul IF %ERRORLEVEL% EQU 0 GOTO XPNotSupported REM - Remove existing 'dev' directory (if present) rmdir %1\dev REM - Make symlink REM (doesn't work on XP - see instructions below) mklink /d %1\dev %root_path% GOTO Exit :Error ECHO Usage: setup_for_hacking.bat application_path ECHO Setup Brackets to use the HTML/CSS/JS files pulled from GitHub. ECHO Parameters: application_path - path that contains the Brackets application ECHO Example: setup_for_hacking.bat "c:\Program Files (x86)\Brackets Sprint 14" GOTO Exit :XPNotSupported ECHO Sorry, this script doesn't run in Windows XP. ECHO To enable hacking, use the junction tool (http://technet.microsoft.com/en-us/sysinternals/bb896768) ECHO as follows: junction.exe %1\dev %root_path% ECHO (in the folder containing Brackets.exe) :Exit ``` Check if directory exists before trying to delete it.
```batchfile @ECHO OFF REM - Use full path of this batch file to determine root directory set root_path=%~f0 set root_path=%root_path:~0,-27% REM - Check for parameter IF %1.==. GOTO Error REM - Check for OS. This script works in Vista or later. ver | findstr /i "5\.1\." > nul IF %ERRORLEVEL% EQU 0 GOTO XPNotSupported REM - Remove existing 'dev' directory (if present) if exist %1\dev rmdir %1\dev REM - Make symlink REM (doesn't work on XP - see instructions below) mklink /d %1\dev %root_path% GOTO Exit :Error ECHO Usage: setup_for_hacking.bat application_path ECHO Setup Brackets to use the HTML/CSS/JS files pulled from GitHub. ECHO Parameters: application_path - path that contains the Brackets application ECHO Example: setup_for_hacking.bat "c:\Program Files (x86)\Brackets Sprint 14" GOTO Exit :XPNotSupported ECHO Sorry, this script doesn't run in Windows XP. ECHO To enable hacking, use the junction tool (http://technet.microsoft.com/en-us/sysinternals/bb896768) ECHO as follows: junction.exe %1\dev %root_path% ECHO (in the folder containing Brackets.exe) :Exit ```
86459ae7-4557-466b-a08e-1620bbf25a48
{ "language": "Batchfile" }
```batchfile "C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\MSTest.exe" /testcontainer:AgateLib.Tests\UnitTests\bin\Debug\AgateLib.UnitTests.dll if %ERRORLEVEL% NEQ 0 exit /b %ERRORLEVEL% ``` Remove hard path to mstest.exe.
```batchfile MSTest.exe /testcontainer:AgateLib.Tests\UnitTests\bin\Debug\AgateLib.UnitTests.dll if %ERRORLEVEL% NEQ 0 exit /b %ERRORLEVEL% ```
adf108dc-702a-44ba-a9f9-51cf69e2b486
{ "language": "Batchfile" }
```batchfile @echo off rem $Id$ ::remove any quotes from JAVA_HOME and EXIST_HOME env var, will be re-added below for /f "delims=" %%G IN (%JAVA_HOME%) DO SET JAVA_HOME=%%G for /f "delims=" %%G IN (%EXIST_HOME%) DO SET EXIST_HOME=%%G rem will be set by the installer set EXIST_HOME=$INSTALL_PATH rem will be set by the installer set JAVA_HOME=$JAVA_HOME :gotJavaHome set JAVA_CMD="%JAVA_HOME%\bin\java" set JAVA_OPTS="-Xms64m -Xmx768m" rem make sure there's the jetty tmp directory mkdir "%EXIST_HOME%\tools\jetty\tmp" rem echo "JAVA_HOME: %JAVA_HOME%" rem echo "EXIST_HOME: %EXIST_HOME%" echo %JAVA_OPTS% %JAVA_CMD% "%JAVA_OPTS%" -Dexist.home="%EXIST_HOME%" -Duse.autodeploy.feature=false -jar "%EXIST_HOME%\start.jar" org.exist.installer.Setup %1 %2 %3 %4 %5 %6 %7 %8 %9 :eof ``` Make sure to correctly quote/unquote Windows paths in the installer
```batchfile @echo off ::will be set by the installer set JAVA_HOME="$JAVA_HOME" set EXIST_HOME="$INSTALL_PATH" ::remove any quotes from JAVA_HOME and EXIST_HOME env var, will be re-added below for /f "delims=" %%G IN (%JAVA_HOME%) DO SET JAVA_HOME=%%G for /f "delims=" %%G IN (%EXIST_HOME%) DO SET EXIST_HOME=%%G :gotJavaHome set JAVA_CMD="%JAVA_HOME%\bin\java" set JAVA_OPTS="-Xms64m -Xmx768m" ::make sure there's the jetty tmp directory mkdir "%EXIST_HOME%\tools\jetty\tmp" echo "JAVA_HOME: [%JAVA_HOME%]" echo "EXIST_HOME: [%EXIST_HOME%]" echo "EXIST_OPTS: [%JAVA_OPTS%]" echo: echo: %JAVA_CMD% "%JAVA_OPTS%" -Dexist.home="%EXIST_HOME%" -Duse.autodeploy.feature=false -jar "%EXIST_HOME%\start.jar" org.exist.installer.Setup %1 %2 %3 %4 %5 %6 %7 %8 %9 :eof ```
d602f283-3561-4a26-95c2-c57ca2cdc00f
{ "language": "Batchfile" }
```batchfile set OPTS=no-asm perl Configure VC-WIN32 perl util\mk1mf.pl %OPTS% debug VC-WIN32 >d32.mak perl util\mk1mf.pl %OPTS% VC-WIN32 >32.mak perl util\mk1mf.pl %OPTS% debug dll VC-WIN32 >d32dll.mak perl util\mk1mf.pl %OPTS% dll VC-WIN32 >32dll.mak nmake -f d32.mak nmake -f 32.mak nmake -f d32dll.mak nmake -f 32dll.mak ``` Stop build when an error occurs. "Peter 'Luna' Runestig" <[email protected]>
```batchfile set OPTS=no-asm perl Configure VC-WIN32 perl util\mk1mf.pl %OPTS% debug VC-WIN32 >d32.mak perl util\mk1mf.pl %OPTS% VC-WIN32 >32.mak perl util\mk1mf.pl %OPTS% debug dll VC-WIN32 >d32dll.mak perl util\mk1mf.pl %OPTS% dll VC-WIN32 >32dll.mak nmake -f d32.mak @if errorlevel 1 goto end nmake -f 32.mak @if errorlevel 1 goto end nmake -f d32dll.mak @if errorlevel 1 goto end nmake -f 32dll.mak :end ```
8831f14d-ee8e-4baa-bfc0-800edcd192d9
{ "language": "Batchfile" }
```batchfile jruby .\generate-sample-midi-stream.rb g++ .\make-sample-wav-file.cc -o .\make-sample-wav-file.exe .\make-sample-wav-file.exe .\sample-midi-stream.bin .\sample-wav-file-cc.wav del .\make-sample-wav-file.exe ``` Remove an instruction of a JRuby (Ruby) script execution
```batchfile g++ .\make-sample-wav-file.cc -o .\make-sample-wav-file.exe .\make-sample-wav-file.exe .\sample-midi-stream.bin .\sample-wav-file-cc.wav del .\make-sample-wav-file.exe ```
222f1a1e-d828-4b0a-8006-1e0437ab088d
{ "language": "Batchfile" }
```batchfile echo Current build setup MSVS="%MSVS%" PLATFORM="%PLATFORM%" TARGET="%TARGET%" if %MSVS% == 2015 call "%ProgramFiles(x86)%\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" %PLATFORM% if %MSVS% == 2017 call "%ProgramFiles(x86)%\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" %PLATFORM% if %MSVS% == 2019 call "%ProgramFiles(x86)%\Microsoft Visual Studio\2019\Preview\VC\Auxiliary\Build\vcvarsall.bat" %PLATFORM% rem check compiler version cl git clone --depth 1 https://github.com/randombit/botan-ci-tools set PATH=C:\Qt\Tools\QtCreator\bin;%PATH%;botan-ci-tools ``` Add a comment explaining why this path is set
```batchfile echo Current build setup MSVS="%MSVS%" PLATFORM="%PLATFORM%" TARGET="%TARGET%" if %MSVS% == 2015 call "%ProgramFiles(x86)%\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" %PLATFORM% if %MSVS% == 2017 call "%ProgramFiles(x86)%\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" %PLATFORM% if %MSVS% == 2019 call "%ProgramFiles(x86)%\Microsoft Visual Studio\2019\Preview\VC\Auxiliary\Build\vcvarsall.bat" %PLATFORM% rem check compiler version cl git clone --depth 1 https://github.com/randombit/botan-ci-tools rem include QtCreator bin dir to get jom set PATH=C:\Qt\Tools\QtCreator\bin;%PATH%;botan-ci-tools ```
93a50eab-1c89-4fd3-bdd8-6656dea7842d
{ "language": "Batchfile" }
```batchfile set MAJOR_PREVIOUS=1 set MINOR_PREVIOUS=5 set PATCH_PREVIOUS=12 set PRERELEASE_PREVIOUS=-developer set MAJOR=1 set MINOR=5 set PATCH=13 set PRERELEASE=-developer ``` Fix error in version file
```batchfile set MAJOR_PREVIOUS=1 set MINOR_PREVIOUS=5 set PATCH_PREVIOUS=12 set PRERELEASE_PREVIOUS=-beta set MAJOR=1 set MINOR=5 set PATCH=13 set PRERELEASE=-developer ```
09b05525-adab-49e7-8851-149bb4813874
{ "language": "Batchfile" }
```batchfile @echo Off set config=%1 if "%config%" == "" ( set config=Release ) set version=1.0.0 if not "%PackageVersion%" == "" ( set version=%PackageVersion% ) set nuget= if "%nuget%" == "" ( set nuget=nuget ) set nunit="tools\nunit\nunit-console.exe" %WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild src\Frankie.sln /p:Configuration=%config% /v:M %nunit% /noresult ^ src\Tests\bin\%config%\RDumont.Frankie.Tests.dll ^ src\Specs\bin\%config%\RDumont.Frankie.Specs.dll mkdir Build %nuget% pack src\Core\Core.csproj -verbosity detailed -o Build -Version %version% %nuget% pack src\CommandLine\CommandLine.csproj -IncludeReferencedProjects -verbosity detailed -o Build -Version %version%``` Fix for the MyGet packaging
```batchfile @echo Off set config=%1 if "%config%" == "" ( set config=Release ) set version=1.0.0 if not "%PackageVersion%" == "" ( set version=%PackageVersion% ) set nuget= if "%nuget%" == "" ( set nuget=nuget ) set nunit="tools\nunit\nunit-console.exe" %WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild src\Frankie.sln /p:Configuration=%config% /v:M %nunit% /noresult ^ src\Tests\bin\%config%\RDumont.Frankie.Tests.dll ^ src\Specs\bin\%config%\RDumont.Frankie.Specs.dll mkdir Build call %nuget% pack src\Core\Core.csproj -verbosity detailed -o Build -Version %version% call %nuget% pack src\CommandLine\CommandLine.csproj -IncludeReferencedProjects -verbosity detailed -o Build -Version %version%```
d10d7452-a4f0-4f61-add9-650b6277be14
{ "language": "Batchfile" }
```batchfile @echo off rem Get current assembly version in environment variable for /f %%i in ('PowerShell -File Scripts\get-version.ps1') do set CUSTOM_MAJOR_VERSION=%%i set CUSTOM_VERSION=%CUSTOM_MAJOR_VERSION%.%APPVEYOR_BUILD_NUMBER% set CUSTOM_INFORMATIONAL_VERSION=%CUSTOM_VERSION% if not %APPVEYOR_REPO_BRANCH%==master ( set CUSTOM_INFORMATIONAL_VERSION=%CUSTOM_INFORMATIONAL_VERSION%-prerelease ) set APPVEYOR_BUILD_VERSION=%CUSTOM_INFORMATIONAL_VERSION% echo Patched version: %CUSTOM_VERSION% echo Patched informational version: %CUSTOM_INFORMATIONAL_VERSION% echo AppVeyor build version: %APPVEYOR_BUILD_VERSION%``` Update AppVeyor build version with branch and assembly version.
```batchfile @echo off echo Patching version numbers... rem Get current assembly version in environment variable for /f %%i in ('PowerShell -File Scripts\get-version.ps1') do set CUSTOM_MAJOR_VERSION=%%i set CUSTOM_VERSION=%CUSTOM_MAJOR_VERSION%.%APPVEYOR_BUILD_NUMBER% set CUSTOM_INFORMATIONAL_VERSION=%CUSTOM_VERSION% if not %APPVEYOR_REPO_BRANCH%==master ( set CUSTOM_INFORMATIONAL_VERSION=%CUSTOM_INFORMATIONAL_VERSION%-prerelease ) set APPVEYOR_BUILD_VERSION=%APPVEYOR_REPO_BRANCH%-%CUSTOM_INFORMATIONAL_VERSION% appveyor UpdateBuild -Version "%APPVEYOR_BUILD_VERSION%" echo Patched version: %CUSTOM_VERSION% echo Patched informational version: %CUSTOM_INFORMATIONAL_VERSION% echo AppVeyor build version: %APPVEYOR_BUILD_VERSION%```
89e201f8-703c-46be-98ee-2e7c1d725aab
{ "language": "Batchfile" }
```batchfile set CONFIGURATION=%1 set OUTPUT=%2 set OPENCOVER=".\packages\OpenCover.4.6.519\tools\OpenCover.Console.exe" set TARGET="%VSINSTALLDIR%\Common7\IDE\CommonExtensions\Microsoft\TestWindow\vstest.console.exe" set TARGET_ARGS=".\ThScoreFileConverterTests\bin\%CONFIGURATION%\ThScoreFileConverterTests.dll" set FILTER="+[*]*" %OPENCOVER% ^ -register:user ^ -target:%TARGET% ^ -targetargs:%TARGET_ARGS% ^ -filter:%FILTER% ^ -output:%OUTPUT% ``` Exclude ThScoreFileConverterTests from the coverage result
```batchfile set CONFIGURATION=%1 set OUTPUT=%2 set OPENCOVER=".\packages\OpenCover.4.6.519\tools\OpenCover.Console.exe" set TARGET="%VSINSTALLDIR%\Common7\IDE\CommonExtensions\Microsoft\TestWindow\vstest.console.exe" set TARGET_ARGS=".\ThScoreFileConverterTests\bin\%CONFIGURATION%\ThScoreFileConverterTests.dll" set FILTER="+[*]* -[ThScoreFileConverterTests]*" %OPENCOVER% ^ -register:user ^ -target:%TARGET% ^ -targetargs:%TARGET_ARGS% ^ -filter:%FILTER% ^ -output:%OUTPUT% ```
107d2321-c891-4875-a165-61da09e8d3a4
{ "language": "Batchfile" }
```batchfile ``` Add windows .bat for automatically building foreign dependencies
```batchfile @echo off SET GENERATOR="Visual Studio 14 2015" SET GENERATOR64="Visual Studio 14 2015 Win64" rem SET GENERATOR"Visual Studio 15 2017" rem SET GENERATOR64="Visual Studio 15 2017 Win64" cd ../foreign/ cd SPIRV-Tools mkdir build cd build cmake -G%GENERATOR% -DSPIRV-Headers_SOURCE_DIR=%cd%/../../SPIRV-Headers .. cmake --build . cd .. mkdir build64 cd build64 cmake -G%GENERATOR64% -DSPIRV-Headers_SOURCE_DIR=%cd%/../../SPIRV-Headers .. cmake --build . cd .. cd .. cd SPIRV-Cross mkdir build cd build cmake -G%GENERATOR% .. cmake --build . cd .. mkdir build64 cd build64 cmake -G%GENERATOR64% .. cmake --build . cd .. cd .. cd ../windows ```
417e74e3-4a49-49e7-a787-8f1c93a64b66
{ "language": "Batchfile" }
```batchfile @echo off dotnet tool install --global AzureSignTool azuresigntool sign --description-url "https://starschema.com" \ --file-digest sha256 --azure-key-vault-url https://billiant-keyvault.vault.azure.net \ --azure-key-vault-client-id %AZURE_KEY_VAULT_CLIENT_ID% \ --azure-key-vault-client-secret %AZURE_KEY_VAULT_CLIENT_SECRET% \ --azure-key-vault-certificate StarschemaCodeSigning \ --timestamp-rfc3161 http://timestamp.digicert.com --timestamp-digest sha256 \ --no-page-hashing \ %* ``` Use ^ as line continuation character
```batchfile @echo off dotnet tool install --global AzureSignTool azuresigntool sign --description-url "https://starschema.com" ^ --file-digest sha256 --azure-key-vault-url https://billiant-keyvault.vault.azure.net ^ --azure-key-vault-client-id %AZURE_KEY_VAULT_CLIENT_ID% ^ --azure-key-vault-client-secret %AZURE_KEY_VAULT_CLIENT_SECRET% ^ --azure-key-vault-certificate StarschemaCodeSigning ^ --timestamp-rfc3161 http://timestamp.digicert.com --timestamp-digest sha256 ^ --no-page-hashing ^ %* ```
4fa7faee-eb3c-4e3c-955e-3c616d2e71df
{ "language": "Batchfile" }
```batchfile REM remove unneeded librar stubs rd /S /Q %SRC_DIR%\include rd /S /Q %SRC_DIR%\lib rd /S /Q %SRC_DIR%\share\man if errorlevel 1 exit 1 mkdir %SRC_DIR%\share\doc\graphviz move %SRC_DIR%\share\graphviz\doc %SRC_DIR%\share\doc\graphviz if errorlevel 1 exit 1 move %SRC_DIR%\bin %SRC_DIR%\graphviz if errorlevel 1 exit 1 xcopy /S %SRC_DIR% %LIBRARY_PREFIX% if errorlevel 1 exit 1 mkdir %LIBRARY_BIN% move %LIBRARY_PREFIX%\graphviz %LIBRARY_BIN%\graphviz if errorlevel 1 exit 1 del %LIBRARY_PREFIX%\bld.bat if errorlevel 1 exit 1 pushd %LIBRARY_BIN% for /r "%LIBRARY_BIN%\graphviz" %%f in (*.exe) do ( echo %%f %* > %%~nf.bat if errorlevel 1 exit 1 ) ``` Fix bat links on Windows
```batchfile REM remove unneeded librar stubs rd /S /Q %SRC_DIR%\include rd /S /Q %SRC_DIR%\lib rd /S /Q %SRC_DIR%\share\man if errorlevel 1 exit 1 mkdir %SRC_DIR%\share\doc\graphviz move %SRC_DIR%\share\graphviz\doc %SRC_DIR%\share\doc\graphviz if errorlevel 1 exit 1 move %SRC_DIR%\bin %SRC_DIR%\graphviz if errorlevel 1 exit 1 xcopy /S %SRC_DIR% %LIBRARY_PREFIX% if errorlevel 1 exit 1 mkdir %LIBRARY_BIN% move %LIBRARY_PREFIX%\graphviz %LIBRARY_BIN%\graphviz if errorlevel 1 exit 1 del %LIBRARY_PREFIX%\bld.bat if errorlevel 1 exit 1 pushd %LIBRARY_BIN% for /r "%LIBRARY_BIN%\graphviz" %%f in (*.exe) do ( echo @echo off > %%~nf.bat echo %%~dp0.\graphviz\%%~nf.exe %%* >> %%~nf.bat if errorlevel 1 exit 1 ) ```
1ed46927-eb1c-4ab2-b6d9-ab677c73aa78
{ "language": "Batchfile" }
```batchfile if exist yc ( rd /s /q yc ) mkdir yc xcopy /Y ..\YaccConstructor\YaccConstructor\bin\Release\*.dll yc xcopy /Y ..\YaccConstructor\YaccConstructor\bin\Release\*.exe yc xcopy /Y ..\YaccConstructor\CYK\bin\Release\*.exe yc xcopy /Y ..\YaccConstructor\CYK\bin\Release\*.dll yc xcopy /Y ..\YaccConstructor\RNGLRCommon\bin\Release\*.dll yc xcopy /Y ..\YaccConstructor\RNGLRParser\bin\Release\*.dll yc xcopy /Y ..\YaccConstructor\RNGLRGenerator\bin\Release\*.dll yc xcopy /Y ..\YaccConstructor\Constraints\bin\Release\*.dll yc xcopy /Y ..\YaccConstructor\Utils.SourceText\bin\Release\*.dll yc xcopy /Y ..\YaccConstructor\FsYard\bin\Release\*.exe yc xcopy /Y ..\YaccConstructor\FsYard\bin\Release\*.targets yc ``` Copy GLL to yc for Examples.
```batchfile if exist yc ( rd /s /q yc ) mkdir yc xcopy /Y ..\YaccConstructor\YaccConstructor\bin\Release\*.dll yc xcopy /Y ..\YaccConstructor\YaccConstructor\bin\Release\*.exe yc xcopy /Y ..\YaccConstructor\CYK\bin\Release\*.exe yc xcopy /Y ..\YaccConstructor\GLLGenerator\bin\Release\*.dll yc xcopy /Y ..\YaccConstructor\CYK\bin\Release\*.dll yc xcopy /Y ..\YaccConstructor\RNGLRCommon\bin\Release\*.dll yc xcopy /Y ..\YaccConstructor\RNGLRParser\bin\Release\*.dll yc xcopy /Y ..\YaccConstructor\RNGLRGenerator\bin\Release\*.dll yc xcopy /Y ..\YaccConstructor\Constraints\bin\Release\*.dll yc xcopy /Y ..\YaccConstructor\Utils.SourceText\bin\Release\*.dll yc xcopy /Y ..\YaccConstructor\FsYard\bin\Release\*.exe yc xcopy /Y ..\YaccConstructor\FsYard\bin\Release\*.targets yc ```
a0f7a23c-9814-4ddd-a56c-d57ec6fcf31f
{ "language": "Batchfile" }
```batchfile @echo off SETLOCAL enabledelayedexpansion IF DEFINED JAVA_HOME ( set JAVA=%JAVA_HOME%\bin\java.exe ) ELSE ( FOR %%I IN (java.exe) DO set JAVA=%%~$PATH:I ) IF NOT EXIST "%JAVA%" ( ECHO Could not find any executable java binary. Please install java in your PATH or set JAVA_HOME 1>&2 EXIT /B 1 ) set SCRIPT_DIR=%~dp0 for %%I in ("%SCRIPT_DIR%..") do set ES_HOME=%%~dpfI TITLE Elasticsearch Plugin Manager ${project.version} SET path_props=-Des.path.home="%ES_HOME%" IF DEFINED CONF_DIR ( SET path_props=!path_props! -Des.path.conf="%CONF_DIR%" ) SET args=%* SET HOSTNAME=%COMPUTERNAME% "%JAVA%" %ES_JAVA_OPTS% !path_props! -cp "%ES_HOME%/lib/*;" "org.elasticsearch.plugins.PluginCli" !args! ENDLOCAL ``` Fix handling of spaces in plugin script on Windows
```batchfile @echo off SETLOCAL enabledelayedexpansion IF DEFINED JAVA_HOME ( set JAVA="%JAVA_HOME%\bin\java.exe" ) ELSE ( FOR %%I IN (java.exe) DO set JAVA=%%~$PATH:I ) IF NOT EXIST %JAVA% ( ECHO Could not find any executable java binary. Please install java in your PATH or set JAVA_HOME 1>&2 EXIT /B 1 ) set SCRIPT_DIR=%~dp0 for %%I in ("%SCRIPT_DIR%..") do set ES_HOME=%%~dpfI TITLE Elasticsearch Plugin Manager ${project.version} SET path_props=-Des.path.home="%ES_HOME%" IF DEFINED CONF_DIR ( SET path_props=!path_props! -Des.path.conf="%CONF_DIR%" ) SET args=%* SET HOSTNAME=%COMPUTERNAME% %JAVA% %ES_JAVA_OPTS% !path_props! -cp "%ES_HOME%/lib/*;" "org.elasticsearch.plugins.PluginCli" !args! ENDLOCAL ```
b1abdc09-ded8-4600-8421-41e07c953157
{ "language": "Batchfile" }
```batchfile @echo off set OLDDIR=%CD% cd %~dp0 cd .. set AGILE_HOME=%CD% set CMD_LINE_ARGS= :getArgs if %1x==x goto doneArgs set CMD_LINE_ARGS=%CMD_LINE_ARGS% %1 shift goto getArgs :doneArgs SET JAVA_EXE="%JAVA_HOME%\bin\java.exe" set JAVA_OPTS=-Xmx512m -Djava.awt.headless=true -Duser.timezone=UTC cd %AGILE_HOME% %JAVA_EXE% %JAVA_OPTS% -cp conf;bin\${project.artifactId}-${project.version}.jar org.headsupdev.agile.runtime.Main %CMD_LINE_ARGS% set CMD_LINE_ARGS= set JAVA_EXE= set JAVA_OPTS= cd %OLDDIR% set OLDDIR= ``` Update windows script so cmd-c works properly
```batchfile @echo off :: Try to get around "Terminate batch job?" - use start, which spawns a new window :: Establish if we were launched from the command line. :: If so, run a start /wait otherwise we want the original window to close set SCRIPT=%0 set DQUOTE=" @echo %SCRIPT:~0,1% | findstr /l %DQUOTE% > NUL if NOT %ERRORLEVEL% EQU 0 set START_PARAMS=/wait set OLDDIR=%CD% cd %~dp0 cd .. set AGILE_HOME=%CD% set CMD_LINE_ARGS= :getArgs if %1x==x goto doneArgs set CMD_LINE_ARGS=%CMD_LINE_ARGS% %1 shift goto getArgs :doneArgs SET JAVA_EXE="%JAVA_HOME%\bin\java.exe" set JAVA_OPTS=-Xmx512m -Djava.awt.headless=true -Duser.timezone=UTC cd %AGILE_HOME% @start %START_PARAMS% cmd /c %JAVA_EXE% %JAVA_OPTS% -cp conf;bin\${project.artifactId}-${project.version}.jar org.headsupdev.agile.runtime.Main %CMD_LINE_ARGS% set CMD_LINE_ARGS= set JAVA_EXE= set JAVA_OPTS= cd %OLDDIR% set OLDDIR= ```
59fbb98a-032c-445c-9eca-2b674b6a10c9
{ "language": "Batchfile" }
```batchfile ..\Build\tools\7zip\7za.exe -r a CosmosBoot.zip ProjectTemplate ..\Build\tools\7zip\7za.exe a -tzip Cosmos.vsi Cosmos.vscontent CosmosBoot.zip del CosmosBoot.zip``` Remove old .vsi file before creating new
```batchfile del Cosmos.vsi ..\Build\tools\7zip\7za.exe -r a CosmosBoot.zip ProjectTemplate ..\Build\tools\7zip\7za.exe a -tzip Cosmos.vsi Cosmos.vscontent CosmosBoot.zip del CosmosBoot.zip```
068dc059-a546-40fc-a261-022d8f808928
{ "language": "Batchfile" }
```batchfile @echo off :: To build extensions for 64 bit Python 3, we need to configure environment :: variables to use the MSVC 2010 C++ compilers from GRMSDKX_EN_DVD.iso of: :: MS Windows SDK for Windows 7 and .NET Framework 4 :: :: More details at: :: https://github.com/cython/cython/wiki/64BitCythonExtensionsOnWindows :: IF "%DISTUTILS_USE_SDK%"=="1" ( IF "%PLATFORM%"=="x64" ( ECHO Configuring environment to build with MSVC on a 64bit architecture ECHO Using Windows SDK v7.0 "C:\Program Files\Microsoft SDKs\Windows\v7.0\Setup\WindowsSdkVer.exe" -q -version:v7.0 CALL "C:\Program Files\Microsoft SDKs\Windows\v7.0\Bin\SetEnv.cmd" /x64 /release SET MSSdk=1 REM Need the following to allow tox to see the SDK compiler SET TOX_TESTENV_PASSENV=DISTUTILS_USE_SDK MSSdk INCLUDE LIB ) ELSE ( ECHO Using default MSVC build environment for 32 bit architecture ECHO Executing: %* call %* || EXIT 1 ) ) ELSE ( ECHO Using default MSVC build environment ) CALL %* ``` Set SDK version depending on Python 2 or 3.
```batchfile @echo off :: To build extensions for 64 bit Python 3, we need to configure environment :: variables to use the MSVC 2010 C++ compilers from GRMSDKX_EN_DVD.iso of: :: MS Windows SDK for Windows 7 and .NET Framework 4 :: :: More details at: :: https://github.com/cython/cython/wiki/64BitCythonExtensionsOnWindows :: IF "%DISTUTILS_USE_SDK%"=="1" ( SET MAJOR_PYTHON_VERSION="%PYTHON_VERSION:~0,1%" IF %MAJOR_PYTHON_VERSION% == "2" ( SET WINDOWS_SDK_VERSION="v7.0" ) ELSE IF %MAJOR_PYTHON_VERSION% == "3" ( SET WINDOWS_SDK_VERSION="v7.1" ) ELSE ( ECHO Unsupported Python version: "%MAJOR_PYTHON_VERSION%" EXIT 1 ) IF "%PLATFORM%"=="x64" ( ECHO Configuring environment to build with MSVC on a 64bit architecture ECHO Using Windows SDK %WINDOWS_SDK_VERSION% "C:\Program Files\Microsoft SDKs\Windows\%WINDOWS_SDK_VERSION%\Setup\WindowsSdkVer.exe" -q -version:%WINDOWS_SDK_VERSION% CALL "C:\Program Files\Microsoft SDKs\Windows\%WINDOWS_SDK_VERSION%\Bin\SetEnv.cmd" /x64 /release SET MSSdk=1 REM Need the following to allow tox to see the SDK compiler SET TOX_TESTENV_PASSENV=DISTUTILS_USE_SDK MSSdk INCLUDE LIB ) ELSE ( ECHO Using default MSVC build environment for 32 bit architecture ECHO Executing: %* call %* || EXIT 1 ) ) ELSE ( ECHO Using default MSVC build environment ) CALL %* ```
1fba6eb8-35cb-42fe-8940-906719a117a9
{ "language": "Batchfile" }
```batchfile rem Copy runtime DLLs echo "" | stack exec -- where libstdc++-6.dll > lib.txt echo "" | stack exec -- where libgcc_s_seh-1.dll >> lib.txt echo "" | stack exec -- where libwinpthread-1.dll >> lib.txt for /F %i IN (lib.txt) do copy /Y %i .\ del /q lib.txt``` Fix path in FOR loop
```batchfile rem Copy runtime DLLs echo "" | stack exec -- where libstdc++-6.dll > lib.txt echo "" | stack exec -- where libgcc_s_seh-1.dll >> lib.txt echo "" | stack exec -- where libwinpthread-1.dll >> lib.txt for /F %i IN (lib.txt) do copy /Y "%i" .\ del /q lib.txt```
5a4ce276-24ce-42c9-bbaa-00e2c75f082e
{ "language": "Batchfile" }
```batchfile @echo off SET pathToVS12=C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe SET pathToVS11=C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\devenv.exe IF EXIST %pathToVS12%( "%pathToVS12%" /RootSuffix YC /ReSharper.Internal Exit /b ) IF EXIST %pathToVS11% ( "%pathToVS11%" /RootSuffix YC /ReSharper.Internal Exit /b ) ELSE ( echo "Microsoft Visual Studio 11 and Microsoft Visual Studio 12 weren't found. Try run plugin manually with keys /RootSuffix YC /ReSharper.Internal" )``` Add logging into studio with plugin
```batchfile @echo off SET pathToVS12=C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe SET pathToVS11=C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\devenv.exe rem info about resharper logging https://www.jetbrains.com/resharper/devguide/Platform/Logging.html IF EXIST %pathToVS12%( "%pathToVS12%" /RootSuffix YC /ReSharper.Internal /ReSharper.LogLevel TRACE Exit /b ) IF EXIST %pathToVS11% ( "%pathToVS11%" /RootSuffix YC /ReSharper.Internal /ReSharper.LogFile /ReSharper.LogLevel TRACE Exit /b ) ELSE ( echo "Microsoft Visual Studio 11 and Microsoft Visual Studio 12 weren't found. Try run plugin manually with keys /RootSuffix YC /ReSharper.Internal" )```
4a206e7c-a54c-4ea3-b16c-b4ee6753ee4b
{ "language": "Batchfile" }
```batchfile SET GOPATH=%CD%\gopath SET GATSPATH=%GOPATH%\src\code.cloudfoundry.org\cli-acceptance-tests SET PATH=C:\Go\bin;%PATH% SET PATH=C:\Program Files\Git\cmd\;%PATH% SET PATH=%GOPATH%\bin;%PATH% SET PATH=C:\Program Files\GnuWin32\bin;%PATH% SET PATH=C:\Program Files\cURL\bin;%PATH% SET PATH=%CD%;%PATH% SET /p DOMAIN=<%CD%\bosh-lite-lock\name SET CF_API=api.%DOMAIN% call %CD%\cli-ci\ci\cli\tasks\create-cats-config.bat SET CONFIG=%CD%\config.json pushd %CD%\cf-cli-binaries gzip -d cf-cli-binaries.tgz tar -xvf cf-cli-binaries.tar MOVE %CD%\cf-cli_winx64.exe ..\cf.exe popd go get -v github.com/onsi/ginkgo/ginkgo cd %GATSPATH% ginkgo.exe -r -nodes=4 $GINKGO_ARGS ``` Use Windows environment variable substitution
```batchfile SET GOPATH=%CD%\gopath SET GATSPATH=%GOPATH%\src\code.cloudfoundry.org\cli-acceptance-tests SET PATH=C:\Go\bin;%PATH% SET PATH=C:\Program Files\Git\cmd\;%PATH% SET PATH=%GOPATH%\bin;%PATH% SET PATH=C:\Program Files\GnuWin32\bin;%PATH% SET PATH=C:\Program Files\cURL\bin;%PATH% SET PATH=%CD%;%PATH% SET /p DOMAIN=<%CD%\bosh-lite-lock\name SET CF_API=api.%DOMAIN% call %CD%\cli-ci\ci\cli\tasks\create-cats-config.bat SET CONFIG=%CD%\config.json pushd %CD%\cf-cli-binaries gzip -d cf-cli-binaries.tgz tar -xvf cf-cli-binaries.tar MOVE %CD%\cf-cli_winx64.exe ..\cf.exe popd go get -v github.com/onsi/ginkgo/ginkgo cd %GATSPATH% ginkgo.exe -r -nodes=4 %GINKGO_ARGS% ```
58f47efe-80b5-46bf-82e4-fdc7650a41a4
{ "language": "Batchfile" }
```batchfile set CARGO_HOME=%CONDA_PREFIX%.cargo.win set CARGO_CONFIG=%CARGO_HOME%\config set RUSTUP_HOME=%CARGO_HOME%\rustup set PATH=%CARGO_HOME%\bin:%PATH% if not exist "%CARGO_HOME%" mkdir "%CARGO_HOME%" echo [target.x86_64-pc-windows-msvc]>> %CARGO_CONFIG% echo linker = "%LD%">> %CARGO_CONFIG% ``` Fix 2 bugs with Windows activation
```batchfile set CARGO_HOME=%CONDA_PREFIX%\.cargo.win set CARGO_CONFIG=%CARGO_HOME%\config set RUSTUP_HOME=%CARGO_HOME%\rustup set PATH=%CARGO_HOME%\bin:%PATH% if not exist "%CARGO_HOME%" mkdir "%CARGO_HOME%" echo [target.x86_64-pc-windows-msvc]>> %CARGO_CONFIG% if [%LD%] == [] ( echo linker = "link.exe">> %CARGO_CONFIG% ) else ( echo linker = "%LD%">> %CARGO_CONFIG% ) ```
444b61c2-3bcb-4702-a622-1707769d06be
{ "language": "Batchfile" }
```batchfile mkdir ..\Output\Release mkdir ..\Output\Release\NET40 mkdir ..\Output\Release\NET45 mkdir ..\Output\Release\NetCore45 mkdir ..\Output\Release\NetCore45\Themes mkdir ..\Output\Release\SL5 copy ..\Output\NET45\OxyPlot.??? ..\Output\Release copy ..\Output\NET40\OxyPlot.WindowsForms.??? ..\Output\Release\NET40 copy ..\Output\NET45\OxyPlot.WindowsForms.??? ..\Output\Release\NET45 copy ..\Output\NET40\OxyPlot.WPF.??? ..\Output\Release\NET40 copy ..\Output\NET45\OxyPlot.WPF.??? ..\Output\Release\NET45 copy ..\Output\SL5\OxyPlot.Silverlight.??? ..\Output\Release\SL5 copy ..\Output\NetCore45\OxyPlot.Metro.??? ..\Output\Release\NetCore45 copy ..\Output\NetCore45\Themes\*.* ..\Output\Release\NetCore45\Themes "C:\Program Files\7-Zip\7z.exe" a -r ..\Output\OxyPlot-%1.zip ..\Output\Release\*.* > ZipRelease.log``` Add OxyPlot.Xps to Release download (discussions/545072)
```batchfile mkdir ..\Output\Release mkdir ..\Output\Release\NET40 mkdir ..\Output\Release\NET45 mkdir ..\Output\Release\NetCore45 mkdir ..\Output\Release\NetCore45\Themes mkdir ..\Output\Release\SL5 copy ..\Output\NET45\OxyPlot.??? ..\Output\Release copy ..\Output\NET40\OxyPlot.WindowsForms.??? ..\Output\Release\NET40 copy ..\Output\NET45\OxyPlot.WindowsForms.??? ..\Output\Release\NET45 copy ..\Output\NET40\OxyPlot.WPF.??? ..\Output\Release\NET40 copy ..\Output\NET45\OxyPlot.WPF.??? ..\Output\Release\NET45 copy ..\Output\NET40\OxyPlot.Xps.??? ..\Output\Release\NET40 copy ..\Output\NET45\OxyPlot.Xps.??? ..\Output\Release\NET45 copy ..\Output\SL5\OxyPlot.Silverlight.??? ..\Output\Release\SL5 copy ..\Output\NetCore45\OxyPlot.Metro.??? ..\Output\Release\NetCore45 copy ..\Output\NetCore45\Themes\*.* ..\Output\Release\NetCore45\Themes "C:\Program Files\7-Zip\7z.exe" a -r ..\Output\OxyPlot-%1.zip ..\Output\Release\*.* > ZipRelease.log```
8296991f-d9ac-4489-a20a-a53f498a4181
{ "language": "Batchfile" }
```batchfile @echo on @setlocal :: Sample usage: :: purge-ngenix http://chopard-st.cdn.ngenix.net/test2.txt :: This file is set up for a specific property tag, the property tag variable can also be set to be passed as an input set ConfigFile=Ngenix-config.txt :: Set auth variables from config file if not exist %ConfigFile% ( echo Configuration file: %ConfigFile% does not exist. Aborting purge! goto finish ) set PATH=%PATH%;..\..\common @call source %ConfigFile% set APIendpoint=https://api.ngenix.net set URL=%1 curl -v -X POST -u "%User%:%Password%" -H "Accept: application/json" -H "Content-Type: text/plain" -d "%URL%" %APIendpoint%/v1/commands/purge/%Property_Tag% :finish echo. ``` Remove verbose from curl command
```batchfile @echo on @setlocal :: Sample usage: :: purge-ngenix http://chopard-st.cdn.ngenix.net/test2.txt :: This file is set up for a specific property tag, the property tag variable can also be set to be passed as an input set ConfigFile=Ngenix-config.txt :: Set auth variables from config file if not exist %ConfigFile% ( echo Configuration file: %ConfigFile% does not exist. Aborting purge! goto finish ) set PATH=%PATH%;..\..\common @call source %ConfigFile% set APIendpoint=https://api.ngenix.net set URL=%1 curl -s -X POST -u "%User%:%Password%" -H "Accept: application/json" -H "Content-Type: text/plain" -d "%URL%" %APIendpoint%/v1/commands/purge/%Property_Tag% :finish echo. ```
25c800dd-a71b-41cc-acff-ca464db44c1c
{ "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. rem To sign the Windows installer set the `SIGN_WINDOWS_INSTALLER=true` environment variable. IF NOT "%SIGN_WINDOWS_INSTALLER%" == "true" (GOTO DONT_SIGN) set current_path=%cd% buildkite-agent.exe artifact download "dist/*.exe" . --step "Build kolibri windows installer" --build %BUILDKITE_BUILD_ID% --agent-access-token %BUILDKITE_AGENT_ACCESS_TOKEN% %WINDOWS_SIGN_SCRIPT_PATH% "%current_path%\dist" && cd "%current_path%\installer\" && buildkite-agent.exe artifact upload "*.exe" GOTO END :DONT_SIGN echo Set the SIGN_WINDOWS_INSTALLER=true environment variable to sign the Windows installer. :END ``` Change windows installer signing script based on the current step name
```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. rem To sign the Windows installer set the `SIGN_WINDOWS_INSTALLER=true` environment variable. IF NOT "%SIGN_WINDOWS_INSTALLER%" == "true" (GOTO DONT_SIGN) set current_path=%cd% buildkite-agent.exe artifact download "dist/*.exe" . --step "Build Windows installer" --build %BUILDKITE_BUILD_ID% --agent-access-token %BUILDKITE_AGENT_ACCESS_TOKEN% %WINDOWS_SIGN_SCRIPT_PATH% "%current_path%\dist" && cd "%current_path%\installer\" && buildkite-agent.exe artifact upload "*.exe" GOTO END :DONT_SIGN echo Set the SIGN_WINDOWS_INSTALLER=true environment variable to sign the Windows installer. :END ```
dd826721-d73a-4c00-a517-c369b1c69de9
{ "language": "Batchfile" }
```batchfile mkdir c:\projects\plib-build if "%APPVEYOR_REPO_BRANCH%"=="appveyor_test" ( set "BOOST_ARGS=-DPLIB_TESTS_STATIC=ON -DBOOST_ROOT=C:\Libraries\boost_1_59_0" ) if "%USE_MINGW%"=="1" ( cd c:\projects\plib-build set "PATH=C:\MinGW\bin;C:\Program Files (x86)\CMake\bin" set BUILD_TYPE=-DCMAKE_BUILD_TYPE=%configuration% cmake %BUILD_TYPE% -G"%CMAKE_GENERATOR%" %BOOST_ARGS% c:\projects\plib mingw32-make ctest ) else ( if "%USE_MSYS%"=="1" ( set "PATH=C:\msys64\usr\bin" bash c:\projects\plib\contrib\appveyor\build_msys.sh ) else ( if "%USE_CYGWIN%"=="1" ( set "PATH=C:\cygwin\bin" bash c:\projects\plib\contrib\appveyor\build_msys.sh ) ) ) ``` Fix path to Cygwin build script
```batchfile mkdir c:\projects\plib-build if "%APPVEYOR_REPO_BRANCH%"=="appveyor_test" ( set "BOOST_ARGS=-DPLIB_TESTS_STATIC=ON -DBOOST_ROOT=C:\Libraries\boost_1_59_0" ) if "%USE_MINGW%"=="1" ( cd c:\projects\plib-build set "PATH=C:\MinGW\bin;C:\Program Files (x86)\CMake\bin" set BUILD_TYPE=-DCMAKE_BUILD_TYPE=%configuration% cmake %BUILD_TYPE% -G"%CMAKE_GENERATOR%" %BOOST_ARGS% c:\projects\plib mingw32-make ctest ) else ( if "%USE_MSYS%"=="1" ( set "PATH=C:\msys64\usr\bin" bash c:\projects\plib\contrib\appveyor\build_msys.sh ) else ( if "%USE_CYGWIN%"=="1" ( set "PATH=C:\cygwin\bin" bash c:\projects\plib\contrib\appveyor\build_cygwin.sh ) ) ) ```
0ea102b2-0891-4f59-9091-e73435f26a57
{ "language": "Batchfile" }
```batchfile @echo off rem /*############################################################################## rem rem Copyright (C) 2011 HPCC Systems. rem rem All rights reserved. This program is free software: you can redistribute it and/or modify rem it under the terms of the GNU Affero General Public License as rem published by the Free Software Foundation, either version 3 of the rem License, or (at your option) any later version. rem rem This program is distributed in the hope that it will be useful, rem but WITHOUT ANY WARRANTY; without even the implied warranty of rem MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the rem GNU Affero General Public License for more details. rem rem You should have received a copy of the GNU Affero General Public License rem along with this program. If not, see <http://www.gnu.org/licenses/>. rem ############################################################################## */ setlocal enableextensions md %regresstgt% 2>nul call %~dp0\regress1 -m %* if EXIST %~dp0\rcompare.bat. call %~dp0\rcompare %~n1 ``` Add time information when running a single test
```batchfile @echo off rem /*############################################################################## rem rem Copyright (C) 2011 HPCC Systems. rem rem All rights reserved. This program is free software: you can redistribute it and/or modify rem it under the terms of the GNU Affero General Public License as rem published by the Free Software Foundation, either version 3 of the rem License, or (at your option) any later version. rem rem This program is distributed in the hope that it will be useful, rem but WITHOUT ANY WARRANTY; without even the implied warranty of rem MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the rem GNU Affero General Public License for more details. rem rem You should have received a copy of the GNU Affero General Public License rem along with this program. If not, see <http://www.gnu.org/licenses/>. rem ############################################################################## */ setlocal enableextensions md %regresstgt% 2>nul set start=%time% call %~dp0\regress1 -m %* echo Time: %start% %time% if EXIST %~dp0\rcompare.bat. call %~dp0\rcompare %~n1 ```
74d3cabb-35bd-4529-934c-cf1961683dc4
{ "language": "Batchfile" }
```batchfile @ECHO OFF SET SUFFIX=%1 IF '%SUFFIX%' == '' GOTO NOSUFFIX for /f %%a in ('findstr /sm packOptions project.json %~dp0..\src') do dotnet pack %%a --no-build -c Release -o "%~dp0..\nugets" --version-suffix %SUFFIX% GOTO END :NOSUFFIX for /f %%a in ('findstr /sm packOptions project.json %~dp0..\src') do dotnet pack %%a --no-build -c Release -o "%~dp0..\nugets" GOTO END :END``` Update findstr search pattern for creating nupkgs
```batchfile @ECHO OFF pushd "%~dp0.." SET parentDir=%cd% popd SET SUFFIX=%1 IF '%SUFFIX%' == '' GOTO NOSUFFIX for /f %%a in ('findstr /sm packOptions %parentDir%\src\project.json') do dotnet pack %%a --no-build -c Release -o "%parentDir%\nugets" --version-suffix %SUFFIX% GOTO END :NOSUFFIX for /f %%a in ('findstr /sm packOptions %parentDir%\src\project.json') do dotnet pack %%a --no-build -c Release -o "%parentDir%\nugets" GOTO END :END```
a1d07315-94db-4ef1-8f62-3644fd4d0585
{ "language": "Batchfile" }
```batchfile @echo off "%~dp0\..\Prerequisites\Pandoc\pandoc.exe" --from markdown --to html5 --toc -N --standalone --self-contained -c "%~dp0\etc\css\github-pandoc.css" --output "%~dp0\README.html" "%~dp0\README.md" pause ``` Update make script for documentation.
```batchfile @echo off if not exist "%JAVA_HOME%\bin\java.exe" ( echo Java could not be found, please make sure JAVA_HOME is set correctly! pause && goto:eof ) "%~dp0\..\Prerequisites\Pandoc\pandoc.exe" --from markdown --to html5 --toc -N --standalone --self-contained -c "%~dp0\etc\css\github-pandoc.css" --output "%~dp0\README.html" "%~dp0\README.md" "%JAVA_HOME%\bin\java.exe" -jar "%~dp0\..\Prerequisites\HTMLCompressor\bin\htmlcompressor-1.5.3.jar" --compress-css -o "%~dp0\README.min.html" "%~dp0\README.html" move /Y "%~dp0\README.min.html" "%~dp0\README.html" pause ```
1c67efb9-ccb8-4f2e-90e7-e3e2f1ebf1c8
{ "language": "Batchfile" }
```batchfile inject.exe --run "C:\Users\Joshua\AppData\Local\MyComGames\MyComGames.exe" --inject --export Load --add-path --path-resolution --module cerberus.dll``` Adjust path (I reinstalled Windows).
```batchfile inject.exe --run "C:\Users\Admin\AppData\Local\MyComGames\MyComGames.exe" --inject --export Load --add-path --path-resolution --module cerberus.dll```
cf433acc-9029-4d75-b761-9b08c563eb09
{ "language": "Batchfile" }
```batchfile REM Install Internet Information Server (IIS). c:\Windows\Sysnative\WindowsPowerShell\v1.0\powershell.exe -Command Import-Module -Name ServerManager c:\Windows\Sysnative\WindowsPowerShell\v1.0\powershell.exe -Command Install-WindowsFeature Web-Server c:\Windows\Sysnative\WindowsPowerShell\v1.0\powershell.exe -Command Start-Sleep -s 2000 ``` Remove commands from before install script
```batchfile REM Install Internet Information Server (IIS). c:\Windows\Sysnative\WindowsPowerShell\v1.0\powershell.exe -Command Start-Sleep -s 20 ```
dfa36f1c-fc97-4373-8032-c4f446899d12
{ "language": "Batchfile" }
```batchfile @rem Copyright 2018 gRPC authors. @rem @rem Licensed under the Apache License, Version 2.0 (the "License"); @rem you may not use this file except in compliance with the License. @rem You may obtain a copy of the License at @rem @rem http://www.apache.org/licenses/LICENSE-2.0 @rem @rem Unless required by applicable law or agreed to in writing, software @rem distributed under the License is distributed on an "AS IS" BASIS, @rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @rem See the License for the specific language governing permissions and @rem limitations under the License. @echo "Starting Windows build" powershell -c "& { iwr https://raw.githubusercontent.com/grumpycoders/nvm-ps/master/nvm.ps1 | iex }" SET PATH=%APPDATA%\nvm-ps;%APPDATA%\nvm-ps\nodejs;%PATH% call nvm install 10 call nvm use 10 call npm install -g npm @rem https://github.com/mapbox/node-pre-gyp/issues/362 call npm install -g node-gyp cd /d %~dp0 cd ..\.. git submodule update --init git submodule foreach --recursive git submodule update --init set ARTIFACTS_OUT=%cd%\artifacts cd packages\grpc-native-core call tools\run_tests\artifacts\build_artifact_node.bat || goto :error cd ..\.. goto :EOF :error exit /b 1 ``` Use older version of node-gyp
```batchfile @rem Copyright 2018 gRPC authors. @rem @rem Licensed under the Apache License, Version 2.0 (the "License"); @rem you may not use this file except in compliance with the License. @rem You may obtain a copy of the License at @rem @rem http://www.apache.org/licenses/LICENSE-2.0 @rem @rem Unless required by applicable law or agreed to in writing, software @rem distributed under the License is distributed on an "AS IS" BASIS, @rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @rem See the License for the specific language governing permissions and @rem limitations under the License. @echo "Starting Windows build" powershell -c "& { iwr https://raw.githubusercontent.com/grumpycoders/nvm-ps/master/nvm.ps1 | iex }" SET PATH=%APPDATA%\nvm-ps;%APPDATA%\nvm-ps\nodejs;%PATH% call nvm install 10 call nvm use 10 call npm install -g npm @rem https://github.com/mapbox/node-pre-gyp/issues/362 call npm install -g node-gyp@4 cd /d %~dp0 cd ..\.. git submodule update --init git submodule foreach --recursive git submodule update --init set ARTIFACTS_OUT=%cd%\artifacts cd packages\grpc-native-core call tools\run_tests\artifacts\build_artifact_node.bat || goto :error cd ..\.. goto :EOF :error exit /b 1 ```
6e78a210-f6ac-4fcf-bd93-e61b2d0c054b
{ "language": "Batchfile" }
```batchfile set PKG_CONFIG_PATH=%LIBRARY_LIB%\pkgconfig python setup.py config --compiler=msvc build --compiler=msvc install if errorlevel 1 exit 1 ``` Make some renames so that it can detect the libraries it needs
```batchfile set PKG_CONFIG_PATH=%LIBRARY_LIB%\pkgconfig rem Library renames necessary for python-pcl to compile for %%x in (io registration segmentation features filters sample_consensus surface search kdtree octree common) do ( copy %LIBRARY_LIB%\pcl_%%x_release.lib %LIBRARY_LIB%\pcl_%%x.lib if errorlevel 1 exit 1 ) copy %LIBRARY_LIB%\flann_cpp_s.lib %LIBRARY_LIB%\flann_cpp.lib if errorlevel 1 exit 1 python setup.py config --compiler=msvc build --compiler=msvc install if errorlevel 1 exit 1 ```
24461f77-c701-4d2d-ab96-dc962cf6ac36
{ "language": "Batchfile" }
```batchfile @rem Open "Visual Studio .NET Command Prompt" to run this script @setlocal @set LUA=../../luajit-2.0 @set LSCOMPILE=cl /nologo /c /LD /MD /O2 /W3 /D_CRT_SECURE_NO_DEPRECATE /I%LUA%/src @set LSLINK=link /nologo %LSCOMPILE% /DLUA_BUILD_AS_DLL /DWIN32_VISTA luasys.c sock/sys_sock.c isa/isapi/isapi_dll.c @if errorlevel 1 goto :END %LSLINK% /DLL /OUT:sys.dll /DEF:isa/isapi/isapi_dll.def *.obj %LUA%/src/lua*.lib kernel32.lib user32.lib winmm.lib shell32.lib advapi32.lib ws2_32.lib @if errorlevel 1 goto :END @del *.obj *.manifest *.lib *.exp :END ``` Disable compiling for Vista+ by default.
```batchfile @rem Open "Visual Studio .NET Command Prompt" to run this script @setlocal @set LUA=../../luajit-2.0 @set LSCOMPILE=cl /nologo /c /LD /MD /O2 /W3 /D_CRT_SECURE_NO_DEPRECATE /I%LUA%/src @set LSLINK=link /nologo %LSCOMPILE% /DLUA_BUILD_AS_DLL /DWIN32_VISTA_ luasys.c sock/sys_sock.c isa/isapi/isapi_dll.c @if errorlevel 1 goto :END %LSLINK% /DLL /OUT:sys.dll /DEF:isa/isapi/isapi_dll.def *.obj %LUA%/src/lua*.lib kernel32.lib user32.lib winmm.lib shell32.lib advapi32.lib ws2_32.lib @if errorlevel 1 goto :END @del *.obj *.manifest *.lib *.exp :END ```
f466894d-5df6-46c1-946b-34125e6d2fa0
{ "language": "Batchfile" }
```batchfile cd /d %~dp0 rem Check to make sure we've actually copied over at least something that could be the OSVR and Managed-OSVR binaries. if not exist OSVR-Unity\Assets\OSVRUnity\Plugins\x86\*.dll exit /B 1 "C:\Program Files (x86)\Unity\Editor\Unity.exe" -quit -batchmode -projectPath "%~dp0OSVR-Unity" -logFile "%~dp0unity.log" -executeMethod OSVRUnityBuild.build type "%~dp0unity.log" rem Fail the build if we didn't get a unitypackage out. if not exist OSVR-Unity\*.unitypackage exit /B 1 rem Copy the unitypackage to the dist directory if it exists. if exist OSVR-Unity-Dist xcopy OSVR-Unity\*.unitypackage OSVR-Unity-Dist /Y ``` Update Unity install directory in build script
```batchfile cd /d %~dp0 rem Check to make sure we've actually copied over at least something that could be the OSVR and Managed-OSVR binaries. if not exist OSVR-Unity\Assets\OSVRUnity\Plugins\x86\*.dll exit /B 1 "C:\Program Files\Unity\Editor\Unity.exe" -quit -batchmode -projectPath "%~dp0OSVR-Unity" -logFile "%~dp0unity.log" -executeMethod OSVRUnityBuild.build type "%~dp0unity.log" rem Fail the build if we didn't get a unitypackage out. if not exist OSVR-Unity\*.unitypackage exit /B 1 rem Copy the unitypackage to the dist directory if it exists. if exist OSVR-Unity-Dist xcopy OSVR-Unity\*.unitypackage OSVR-Unity-Dist /Y ```
ee5584ec-ff08-4a9f-b3ea-ec9c9ba1b017
{ "language": "Batchfile" }
```batchfile @echo off set SELF_PATH=%~dp0 call %SELF_PATH%\env.bat set QTC_SOURCE=%cd%\qtcreator-latest\src set QTC_BUILD=%cd%\qtcreator-latest\compiled rmdir /s /q build mkdir build cd build lrelease %SELF_PATH%\..\..\qtc-cppcheck.pro qmake %SELF_PATH%\..\.. nmake cd .. set /p VERSION=<qtcreator-latest\version set PLUGIN_NAME=QtcCppcheck if not exist qtcreator-latest\compiled\lib\qtcreator\plugins\%PLUGIN_NAME%4.dll exit /b 1 rd /Q /S dist mkdir dist\lib\qtcreator\plugins mkdir dist\share\qtcreator\translations copy /Y qtcreator-latest\compiled\lib\qtcreator\plugins\%PLUGIN_NAME%4.dll dist\lib\qtcreator\plugins copy /Y %SELF_PATH%\..\..\translation\*.qm dist\share\qtcreator\translations if exist %PLUGIN_NAME%-%VERSION%-win.zip del /Q %PLUGIN_NAME%-%VERSION%-win.zip cd dist zip -q -r ..\%PLUGIN_NAME%-%VERSION%-win.zip * cd .. ``` Use 7zip instead of zip.
```batchfile @echo off set SELF_PATH=%~dp0 call %SELF_PATH%\env.bat set QTC_SOURCE=%cd%\qtcreator-latest\src set QTC_BUILD=%cd%\qtcreator-latest\compiled rmdir /s /q build mkdir build cd build lrelease %SELF_PATH%\..\..\qtc-cppcheck.pro qmake %SELF_PATH%\..\.. nmake cd .. set /p VERSION=<qtcreator-latest\version set PLUGIN_NAME=QtcCppcheck if not exist qtcreator-latest\compiled\lib\qtcreator\plugins\%PLUGIN_NAME%4.dll exit /b 1 rd /Q /S dist mkdir dist\lib\qtcreator\plugins mkdir dist\share\qtcreator\translations copy /Y qtcreator-latest\compiled\lib\qtcreator\plugins\%PLUGIN_NAME%4.dll dist\lib\qtcreator\plugins copy /Y %SELF_PATH%\..\..\translation\*.qm dist\share\qtcreator\translations if exist %PLUGIN_NAME%-%VERSION%-win.zip del /Q %PLUGIN_NAME%-%VERSION%-win.zip cd dist 7z a ..\%PLUGIN_NAME%-%VERSION%-win.zip * cd .. ```
5bc6e420-cc74-43d1-91dd-f7524f1b7c93
{ "language": "Batchfile" }
```batchfile ``` Add FFmpeg setup helper script
```batchfile @echo off setlocal EnableDelayedExpansion REM This script automatically extracts the downloaded FFmpeg 7-zip archives and sets up the required folder structure SET version=ffmpeg-2.8.2 SET platforms="win32" "win64" SET disttypes="dev" "shared" REM 7-Zip REM echo without newline at end ECHO|SET /p=Searching for 7-zip... WHERE 7z >nul 2>nul IF %ERRORLEVEL% EQU 0 ( ECHO found on path SET sevenzip=7z ) ELSE ( IF EXIST "%PROGRAMFILES%\7-zip\7z.exe" ( ECHO found in program files SET sevenzip="%PROGRAMFILES%\7-zip\7z.exe" ) ELSE ( IF EXIST "%PROGRAMFILES(X86)%\7-zip\7z.exe" ( ECHO found in x86 program files SET sevenzip="%PROGRAMFILES(X86)%\7-zip\7z.exe" ) ELSE ( ECHO NOT FOUND ECHO ERROR: 7-zip not found... please install to default directory and retry, or extract files manually according to the instructions in ffmpeg-prepare.txt GOTO end ) ) ) REM FFmpeg archive files ECHO Looking for required archive files... SET filenotfound=0 FOR %%p in (%platforms%) DO ( FOR %%d in (%disttypes%) DO ( SET file=%version%-%%~p-%%~d.7z REM echo without newline at end ECHO|SET /p=Checking !file!... IF NOT EXIST !file! ( ECHO MISSING SET filenotfound=1 ) ELSE ( ECHO ok ) ) ) IF %filenotfound% EQU 1 ( ECHO ERROR: Missing file^(s^)^^! Please download the required files into this script's directory^^! GOTO end ) REM Extraction ECHO Extracting... FOR %%p in (%platforms%) DO ( REM create target dir, suppress errors if dir already exists mkdir %%~p >nul 2>nul FOR %%d in (%disttypes%) DO ( REM assemble archive name SET name=%version%-%%~p-%%~d REM extract archive without cmd output %sevenzip% x -y !name!.7z >nul REM move necessary folders from extracted archive to target folder REM (not every archive contains every folder) FOR %%d in (bin include lib) DO ( IF EXIST !name!\%%~d ( move !name!\%%~d %%~p\%%~d >nul ) ) REM force delete remainder of extracted folder rmdir /S /Q !name! ) ) ECHO Finished^^! FFmpeg is setup correctly^^! You can now safely delete the downloaded archive files. :end REM wait for key press, to display results also to users calling this script directly (not from a prompt) pause ```
1ea33342-db67-4710-8cd0-d59bdb614d43
{ "language": "Batchfile" }
```batchfile @set __e=%1 @if "%1" == "" set __e=off @echo %__e% rem builder_custom_init set VC_VER=14.0 set BUILDER_CFG_PLATFORM=Win64 set BUILDER_CFG_BUILD_TYPE=Release set PYTHON_VERSION=3.6 set PYTHON_FILE_VERSION=36 rem if Win64 then setup path to include the 64bit CL.exe rem when called in place this can fork bomb (lots of CMD.exe in task manager) call "C:\Program Files (x86)\Microsoft Visual Studio %VC_VER%\VC\bin\amd64\vcvars64.bat" @echo %__e% set PYTHON=c:\python%PYTHON_FILE_VERSION%.%BUILDER_CFG_PLATFORM%\python PATH c:\python%PYTHON_FILE_VERSION%.%BUILDER_CFG_PLATFORM%;%PATH% %PYTHON% -c "import sys;print( 'Python:', sys.version )" ``` Test for install location of the Visual Studio files
```batchfile @set __e=%1 @if "%1" == "" set __e=off @echo %__e% rem builder_custom_init set VC_VER=14.0 set BUILDER_CFG_PLATFORM=Win64 set BUILDER_CFG_BUILD_TYPE=Release set PYTHON_VERSION=3.6 set PYTHON_FILE_VERSION=36 rem if Win64 then setup path to include the 64bit CL.exe rem when called in place this can fork bomb (lots of CMD.exe in task manager) if exist "C:\Program Files (x86)\Microsoft Visual Studio %VC_VER%\VC\bin\amd64\vcvars64.bat" ( call "C:\Program Files (x86)\Microsoft Visual Studio %VC_VER%\VC\bin\amd64\vcvars64.bat" ) if exist "c:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars64.bat" ( call "c:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars64.bat" ) @echo %__e% set PYTHON=c:\python%PYTHON_FILE_VERSION%.%BUILDER_CFG_PLATFORM%\python PATH c:\python%PYTHON_FILE_VERSION%.%BUILDER_CFG_PLATFORM%;"c:\Program Files\gettext-iconv\bin";%PATH% %PYTHON% -c "import sys;print( 'Python:', sys.version )" ```
56a03bfb-ca73-4b3f-a8e4-94b3dbf56ce7
{ "language": "Batchfile" }
```batchfile ``` Add basic build and pack script
```batchfile SET MsBuildPath=C:\Windows\Microsoft.NET\Framework64\v4.0.30319 SET NuGetExe=.nuget\nuget.exe %MsBuildPath%\MsBuild.exe build.proj .nuget\NuGet.exe pack Caliburn.Metro\Caliburn.Metro.nuspec .nuget\NuGet.exe pack Caliburn.Metro.Autofac\Caliburn.Metro.Autofac.nuspec```
155d32a3-ff65-49ce-8531-2541c467b9a6
{ "language": "Batchfile" }
```batchfile ECHO off ECHO MOVE C:\mongo* C:\mongodb setx MYPATH "%PATH%;C:\mongodb\bin" ``` Revert "Removed for loop and used MOVE command with wildcards"
```batchfile ECHO on FOR /f %%i IN ('dir /ad /b "C:\" ^|findstr /I "mongo"') DO set dest=%%i ECHO MOVE C:\%dest% C:\mongodb\ setx MYPATH "%PATH%;C:\mongodb\bin" ```
d76e018b-88c5-4662-8bc5-29580f5c1389
{ "language": "Batchfile" }
```batchfile ::------------------------------------------------------------------------------------------------------- :: Copyright (C) Microsoft. All rights reserved. :: Licensed under the MIT license. See LICENSE.txt file in the project root for full license information. ::------------------------------------------------------------------------------------------------------- :: PGO Build Workflow: :: - pre_pgi.cmd :: - build (with PGI instrumentation enabled) :: - post_pgi.cmd :: - pogo_training.ps1 :: - pre_pgo.cmd :: - build (using PGO profile) :: * post_pgo.cmd @echo off if "%PogoConfig%"=="False" ( echo ---- Not a Pogo Config. Skipping step. exit /b 0 ) set binpath_pgo=%1 if "%binpath_pgo%"=="" ( goto:usage ) set POGO_TYPE= REM Clean binaries we no longer need if exist %binpath_pgo%\*.pgc ( del %binpath_pgo%\*.pgc ) if exist %binpath_pgo%\*.pgd ( del %binpath_pgo%\*.pgd ) if exist %binpath_pgo%\pgort* ( del %binpath_pgo%\pgort* ) goto:eof :usage echo Invalid/missing arguments echo. echo Usage: post_pgo.cmd ^<binary_path^> echo - binary_path: output path of your binaries exit /b 1 ``` Remove .lib artifact from pogo build
```batchfile ::------------------------------------------------------------------------------------------------------- :: Copyright (C) Microsoft. All rights reserved. :: Licensed under the MIT license. See LICENSE.txt file in the project root for full license information. ::------------------------------------------------------------------------------------------------------- :: PGO Build Workflow: :: - pre_pgi.cmd :: - build (with PGI instrumentation enabled) :: - post_pgi.cmd :: - pogo_training.ps1 :: - pre_pgo.cmd :: - build (using PGO profile) :: * post_pgo.cmd @echo off if "%PogoConfig%"=="False" ( echo ---- Not a Pogo Config. Skipping step. exit /b 0 ) set binpath_pgo=%1 if "%binpath_pgo%"=="" ( goto:usage ) set POGO_TYPE= REM Clean binaries we no longer need if exist %binpath_pgo%\*.lib ( del %binpath_pgo%\*.lib ) if exist %binpath_pgo%\*.pgc ( del %binpath_pgo%\*.pgc ) if exist %binpath_pgo%\*.pgd ( del %binpath_pgo%\*.pgd ) if exist %binpath_pgo%\pgort* ( del %binpath_pgo%\pgort* ) goto:eof :usage echo Invalid/missing arguments echo. echo Usage: post_pgo.cmd ^<binary_path^> echo - binary_path: output path of your binaries exit /b 1 ```
54c27dd3-ab80-4dcc-b738-1856d692e7e6
{ "language": "Batchfile" }
```batchfile @echo off setlocal set ReleaseName=%3-%5-%4 set ProjectPath=%6 set ReleasePath=%6\%1 set WinRAR=c:\Program Files\WinRAR\WinRAR.exe mkdir "%ReleaseName%" mkdir "%ReleaseName%\Scripts" copy "%ProjectPath%\*.txt" "%ReleaseName%" copy "%ProjectPath%\*.md" "%ReleaseName%" xcopy "%ProjectPath%\Scripts" "%ReleaseName%\Scripts" /E copy "%ReleasePath%\*.dll" "%ReleaseName%" copy "%ReleasePath%\%2" "%ReleaseName%" "%WinRAR%" a -ep1 -m5 -r -t "%ReleaseName%.zip" "%ReleaseName%\*" rmdir /S /Q "%ReleaseName%" endlocal``` Include Code folder in releases
```batchfile @echo off setlocal set ReleaseName=%3-%5-%4 set ProjectPath=%6 set ReleasePath=%6\%1 set WinRAR=c:\Program Files\WinRAR\WinRAR.exe mkdir "%ReleaseName%" mkdir "%ReleaseName%\Scripts" copy "%ProjectPath%\*.txt" "%ReleaseName%" copy "%ProjectPath%\*.md" "%ReleaseName%" xcopy "%ProjectPath%\Code" "%ReleaseName%\Code" /E xcopy "%ProjectPath%\Scripts" "%ReleaseName%\Scripts" /E copy "%ReleasePath%\*.dll" "%ReleaseName%" copy "%ReleasePath%\%2" "%ReleaseName%" "%WinRAR%" a -ep1 -m5 -r -t "%ReleaseName%.zip" "%ReleaseName%\*" rmdir /S /Q "%ReleaseName%" endlocal```
8ce36ffd-c6dc-4d8e-a111-17998c116dc7
{ "language": "Batchfile" }
```batchfile SET GOPATH=%CD%\gopath SET PATH=C:\Go\bin;C:\Program Files\Git\cmd\;%GOPATH%\bin;%PATH% cd %GOPATH%\src\code.cloudfoundry.org\cli powershell -command set-executionpolicy remotesigned go get github.com/onsi/ginkgo/ginkgo ginkgo -r -randomizeAllSpecs -randomizeSuites . ``` Revert "the integration package is not in the cli resource"
```batchfile SET GOPATH=%CD%\gopath SET PATH=C:\Go\bin;C:\Program Files\Git\cmd\;%GOPATH%\bin;%PATH% cd %GOPATH%\src\code.cloudfoundry.org\cli powershell -command set-executionpolicy remotesigned go get github.com/onsi/ginkgo/ginkgo ginkgo -r -randomizeAllSpecs -randomizeSuites -skipPackage integration . ```
f57f26bf-a221-4702-aca2-acee532bfa51
{ "language": "Batchfile" }
```batchfile set CONDA_PREFIX=%PREFIX% if errorlevel 1 exit 1 cmake -B build -S "%SRC_DIR%" ^ -G Ninja ^ -DCMAKE_BUILD_TYPE=Release if errorlevel 1 exit 1 cmake --build build -j ${CPU_COUNT} if errorlevel 1 exit 1 if not exist %SP_DIR% mkdir %SP_DIR% if errorlevel 1 exit 1 copy build/OCP.cp*-*.* %SP_DIR% if errorlevel 1 exit 1``` Use windows variable syntax in windows...
```batchfile set CONDA_PREFIX=%PREFIX% if errorlevel 1 exit 1 cmake -B build -S "%SRC_DIR%" ^ -G Ninja ^ -DCMAKE_BUILD_TYPE=Release if errorlevel 1 exit 1 cmake --build build -j %CPU_COUNT% if errorlevel 1 exit 1 if not exist "%SP_DIR%" mkdir "%SP_DIR%" if errorlevel 1 exit 1 copy build/OCP.cp*-*.* "%SP_DIR%" if errorlevel 1 exit 1```
b0bbb5b7-28f0-4257-88d1-f0d4e61fe3d2
{ "language": "Batchfile" }
```batchfile ``` Add installation script for Vundle on Windows
```batchfile @echo off REM Note: do not try installing into the vim subdirectory here. Vundle overwrites the git repo! if not exist %USERPROFILE%\vimfiles\bundle mkdir %USERPROFILE%\vimfiles\bundle git clone https://github.com/gmarik/Vundle.vim.git %USERPROFILE%\vimfiles\bundle\Vundle.vim cd %USERPROFILE%\vimfiles\bundle gvim +PluginInstall```
3213b384-ca5d-4625-9a46-7630d6d2a098
{ "language": "Batchfile" }
```batchfile @echo off if not defined build_dir goto :missing_variables del /s /q "%build_dir%\hehu_mf\" mkdir "%build_dir%\hehu_mf\functions" pushd %tools_dir%\binmake @echo on binmake.exe "%source_dir%\config.cpp" "%build_dir%\hehu_mf\config.bin" @echo off popd @echo on copy "%source_dir%\CQB_Params.hpp" "%build_dir%\hehu_mf\" xcopy /E "%source_dir%\functions" "%build_dir%\hehu_mf\functions" "%tools_dir%\filebank\filebank.exe" -property prefix=hehu_mf "%build_dir%\hehu_mf" @echo off mkdir "%target_dir%\@hehu_mf\addons" mkdir "%target_dir%\@hehu_mf\images" @echo on copy "%build_dir%\hehu_mf.pbo" "%target_dir%\@hehu_mf\addons" copy "%source_dir%\mod.cpp" "%target_dir%\@hehu_mf" copy "%source_dir%\README.md" "%target_dir%\@hehu_mf\readme.txt" xcopy /E "%source_dir%\images" "%target_dir%\@hehu_mf\images" exit 0 :missing_variables echo You need to set up your make.bat file and run that one instead! pause exit 1``` Build script should overwrite images automatically
```batchfile @echo off if not defined build_dir goto :missing_variables del /s /q "%build_dir%\hehu_mf\" mkdir "%build_dir%\hehu_mf\functions" pushd %tools_dir%\binmake @echo on binmake.exe "%source_dir%\config.cpp" "%build_dir%\hehu_mf\config.bin" @echo off popd @echo on copy "%source_dir%\CQB_Params.hpp" "%build_dir%\hehu_mf\" xcopy /E "%source_dir%\functions" "%build_dir%\hehu_mf\functions" "%tools_dir%\filebank\filebank.exe" -property prefix=hehu_mf "%build_dir%\hehu_mf" @echo off mkdir "%target_dir%\@hehu_mf\addons" mkdir "%target_dir%\@hehu_mf\images" @echo on copy "%build_dir%\hehu_mf.pbo" "%target_dir%\@hehu_mf\addons" copy "%source_dir%\mod.cpp" "%target_dir%\@hehu_mf" copy "%source_dir%\README.md" "%target_dir%\@hehu_mf\readme.txt" xcopy /E /Y "%source_dir%\images" "%target_dir%\@hehu_mf\images" exit 0 :missing_variables echo You need to set up your make.bat file and run that one instead! pause exit 1```
4a95e92d-aa42-4af5-98f2-6c4df9693629
{ "language": "Batchfile" }
```batchfile ``` Add simple batch script to tag new releases and update properties
```batchfile @echo off SET CURDIR=%CD% Set /P version=Enter release version number (e.g. 1.2.3): If "%version%"=="" goto :err goto:noerr :err echo No release version entered goto:end :noerr SET SRC=https://metageta.googlecode.com/svn/trunk SET DST=https://metageta.googlecode.com/svn/tags/%version% svn copy %SRC% %DST% -m "Tagging version %version%" svn checkout --depth=empty %DST% %TEMP%\metageta-%version% cd %TEMP%\metageta-%version% svn propset displayversion %version% . svn propset version %version%.$Revision$ . svn commit -m "Updating version properties %version%" cd %CURDIR% del /f /q %TEMP%\metageta-%version% :end pause```
f2b72693-c484-44f8-bcfc-2433ec5ee959
{ "language": "Batchfile" }
```batchfile @ECHO OFF REM Configure your favorite diff3/merge program here. SET DIFF3="C:\Program Files\Funky Stuff\My Merge Tool.exe" SET MINE=%9 SHIFT SET OLDER=%9 SHIFT SET YOURS=%9 REM Call the merge command (change the following line to make sense) %DIFF3% --older %OLDER% --mine %MINE% --yours %YOURS% REM After performing the merge, this script needs to print the contents REM of the merged file to stdout. Do that in whatever way you see fit. ``` Add a helpful comment for folks unfamiliar with the SHIFT construct.
```batchfile @ECHO OFF REM Configure your favorite diff3/merge program here. SET DIFF3="C:\Program Files\Funky Stuff\My Merge Tool.exe" REM We only have access to nine parameters at a time. We use SHIFT to slide REM our nine-parameter window a little bit so we can get to what we need. SET MINE=%9 SHIFT SET OLDER=%9 SHIFT SET YOURS=%9 REM Call the merge command (change the following line to make sense) %DIFF3% --older %OLDER% --mine %MINE% --yours %YOURS% REM After performing the merge, this script needs to print the contents REM of the merged file to stdout. Do that in whatever way you see fit. ```
34a76ff5-a99d-4460-80fb-368858b39726
{ "language": "Batchfile" }
```batchfile REM perform 32-bit build if "%1" == "clean" rmdir /s /q build mkdir build cd build del CMakeCache.txt rmdir /s /q build\_CPack_Packages cmake -G"MinGW Makefiles" -DRSTUDIO_TARGET=Desktop -DCMAKE_BUILD_TYPE=Release ..\..\.. mingw32-make cd .. REM perform 64-bit build and install it into the 32-bit tree REM (but only do this if we are on win64) IF DEFINED PROGRAMW6432 call make-install-win64.bat "%CD%\build\src\cpp\session" %1 REM create packages cd build cpack -G NSIS REM cpack -G ZIP cd .. ``` Make Win x64 build work on versions of Windows earlier than Win7/2008R2
```batchfile REM perform 32-bit build if "%1" == "clean" rmdir /s /q build mkdir build cd build del CMakeCache.txt rmdir /s /q build\_CPack_Packages cmake -G"MinGW Makefiles" -DRSTUDIO_TARGET=Desktop -DCMAKE_BUILD_TYPE=Release ..\..\.. mingw32-make cd .. REM perform 64-bit build and install it into the 32-bit tree REM (but only do this if we are on win64) IF "%PROCESSOR_ARCHITECTURE%" == "AMD64" call make-install-win64.bat "%CD%\build\src\cpp\session" %1 REM create packages cd build cpack -G NSIS REM cpack -G ZIP cd .. ```
8c0e6c21-c39f-4611-8a30-40536520652d
{ "language": "Batchfile" }
```batchfile ``` Add batch file to sign main executables
```batchfile @echo off set local rem Signing pattern taken from: rem https://textslashplain.com/2016/01/10/authenticode-in-2016/ rem Add path for signtool set path=%path%;C:\Program Files (x86)\Windows Kits\10\bin\x64 rem So far I see no indications that SHA1 signing is actually needed. rem signtool sign /d "UIforETW" /du "https://github.com/google/UIforETW/releases" /n "Bruce Dawson" /tr http://timestamp.digicert.com /fd SHA1 %~dp0bin\UIforETW.exe %~dp0bin\UIforETW32.exe rem @if not %errorlevel% equ 0 goto failure rem Sign both 64-bit and 32-bit versions of UIforETW with the same description. signtool sign /d "UIforETW" /du "https://github.com/google/UIforETW/releases" /n "Bruce Dawson" /tr http://timestamp.digicert.com /td SHA256 /fd SHA256 %~dp0bin\UIforETW.exe %~dp0bin\UIforETW32.exe @if not %errorlevel% equ 0 goto failure exit /b :failure echo Signing failed! ```
afb5c4d2-b34e-4403-a29a-cf9cefe2c493
{ "language": "Batchfile" }
```batchfile ``` Add odb init for run script buttons.
```batchfile mkdir /Script cd /Script create STRING "Restart DAQ" set "Restart DAQ" "/home/newg2/Applications/field-daq/online/bin/restart_daq.sh " create STRING "Restart Front-Ends" set "Restart Front-Ends" "/home/newg2/Applications/field-daq/online/bin/restart_frontends.sh"```
d437e48c-162d-45e8-8512-1cfdd6e48371
{ "language": "Batchfile" }
```batchfile cd /d %~dp0 java -jar pathvisio.jar -p visplugins.jar %* ``` Increase memory limit for standard installation
```batchfile cd /d %~dp0 java -Xmx1024m -jar pathvisio.jar -p visplugins.jar %* ```
52214070-002a-4f38-aa5a-4bf1adef86b6
{ "language": "Batchfile" }
```batchfile @rem Used by the buildbot "clean" step. call "%VS71COMNTOOLS%vsvars32.bat" cd PCbuild @echo Deleting .pyc/.pyo files ... python_d.exe rmpyc.py devenv.com /clean Debug pcbuild.sln ``` Clean both Release and Debug projects, to support the MSI builder.
```batchfile @rem Used by the buildbot "clean" step. call "%VS71COMNTOOLS%vsvars32.bat" cd PCbuild @echo Deleting .pyc/.pyo files ... python_d.exe rmpyc.py devenv.com /clean Release pcbuild.sln devenv.com /clean Debug pcbuild.sln ```
4b846071-18b7-49e7-bab2-1d076ed1658b
{ "language": "Batchfile" }
```batchfile ``` Add script to copy shaders back from device.
```batchfile :: Retrieve data files from Android device using ADB :: Grab only the shaders/ directory, where edited shaders are stored. echo off :: Guess the default installation location set ANDROID_HOME=%LOCALAPPDATA%\Android set ANDROID_SDK=%ANDROID_HOME%\sdk set ADB=%ANDROID_SDK%\platform-tools\adb ::echo %ADB% set SHADERS_PATH=data/shaders/ set APP_PATH=/sdcard/Android/data/com.android.flickercladding/ set REMOTE_PATH=%APP_PATH%/%SHADERS_PATH% set LOCAL_PATH=deploy/data/. %ADB% -d pull %REMOTE_PATH% %LOCAL_PATH% ```
b303846b-3c5b-4d0d-8faa-b8829f6cf1e2
{ "language": "Batchfile" }
```batchfile exit 1``` Make FFTW3 work for windows
```batchfile IF "%ARCH%"=="32" ( powershell -command "& { iwr ftp://ftp.fftw.org/pub/fftw/fftw-3.3.4-dll32.zip -OutFile fftw-3.3.4-dll32.zip }" 7z e .\fftw-3.3.4-dll32.zip -offtw3 ) ELSE ( powershell -command "& { iwr ftp://ftp.fftw.org/pub/fftw/fftw-3.3.4-dll64.zip -OutFile fftw-3.3.4-dll64.zip }" 7z e .\fftw-3.3.4-dll64.zip -offtw3 ) cd fftw3 lib /def:libfftw3f-3.def cd .. ls fftw3 move fftw3\libfftw3f-3.lib %LIBRARY_LIB%\ move fftw3\fftw3.f %LIBRARY_INC%\```
ab925cca-71aa-476f-888e-dc0e0b1915a5
{ "language": "Batchfile" }
```batchfile @echo off SETLOCAL ENABLEDELAYEDEXPANSION pushd %~dp0\..\Docs echo Dumping AngelScript API... ..\Bin\ScriptCompiler -dumpapi ScriptAPI.dox AngelScriptAPI.h if errorlevel 1 exit /B 1 pushd %~dp0\..\Source\Engine\LuaScript\pkgs\ echo Dumping LuaScript API... ..\..\..\..\Bin\tolua++ -L ToDoxHook.lua -P -o ..\..\..\..\Docs\LuaScriptAPI.dox Urho3D.tolua if errorlevel 1 exit /B 1 pushd %~dp0\..\Docs echo Converting Doxygen files to HTML... doxygen Doxyfile 1>nul echo Finish. popd``` Add new line at end of file.
```batchfile @echo off SETLOCAL ENABLEDELAYEDEXPANSION pushd %~dp0\..\Docs echo Dumping AngelScript API... ..\Bin\ScriptCompiler -dumpapi ScriptAPI.dox AngelScriptAPI.h if errorlevel 1 exit /B 1 pushd %~dp0\..\Source\Engine\LuaScript\pkgs\ echo Dumping LuaScript API... ..\..\..\..\Bin\tolua++ -L ToDoxHook.lua -P -o ..\..\..\..\Docs\LuaScriptAPI.dox Urho3D.tolua if errorlevel 1 exit /B 1 pushd %~dp0\..\Docs echo Converting Doxygen files to HTML... doxygen Doxyfile 1>nul echo Finish. popd ```
339ce282-d1b7-4473-ad6c-cd7fbdf0375c
{ "language": "Batchfile" }
```batchfile :: msbuild must be in path SET PATH=%PATH%;%WINDIR%\Microsoft.NET\Framework64\v4.0.30319 where msbuild if errorLevel 1 ( echo "msbuild was not found on PATH" && exit /b 1 ) git submodule update --init --recursive cd IronFrame call build.bat build || exit /b 1 cd .. rmdir /S /Q packages bin\nuget restore || exit /b 1 MSBuild Containerizer\Containerizer.csproj /t:Rebuild /p:Configuration=Release || exit /b 1 MSBuild Containerizer.Tests\Containerizer.Tests.csproj /t:Rebuild /p:Configuration=Release || exit /b 1 packages\nspec.0.9.68\tools\NSpecRunner.exe Containerizer.Tests\bin\Release\Containerizer.Tests.dll || exit /b 1 ``` Use visual studio instead of msbuild
```batchfile :: msbuild must be in path SET DEVENV_PATH=%programfiles(x86)%\Microsoft Visual Studio 12.0\Common7\IDE SET PATH=%PATH%;%DEVENV_PATH%;%WINDIR%\Microsoft.NET\Framework64\v4.0.30319 where msbuild if errorLevel 1 ( echo "msbuild was not found on PATH" && exit /b 1 ) git submodule update --init --recursive pushd IronFrame || exit /b 1 ..\bin\nuget restore || exit /b 1 devenv IronFrame.sln /build "Release" || exit /b 1 :: call build.bat build || exit /b 1 popd rmdir /S /Q packages bin\nuget restore || exit /b 1 MSBuild Containerizer\Containerizer.csproj /t:Rebuild /p:Configuration=Release || exit /b 1 MSBuild Containerizer.Tests\Containerizer.Tests.csproj /t:Rebuild /p:Configuration=Release || exit /b 1 packages\nspec.0.9.68\tools\NSpecRunner.exe Containerizer.Tests\bin\Release\Containerizer.Tests.dll || exit /b 1 ```
dde69854-5b5c-4d8a-87cf-80fb7ebcd51c
{ "language": "Batchfile" }
```batchfile mkdir build cd build cmake -G "Visual Studio 16 2019" ^ -DCMAKE_BUILD_TYPE=Rel ^ -DENABLE_TESTS=OFF ^ -DNETCDF_PREFIX="%LIBRARY_PREFIX%" ^ -DHDF5_ROOT="%LIBRARY_PREFIX%" ^ -DGDAL_DIR="%LIBRARY_PREFIX%" ^ -DGDAL_LIBRARY="%LIBRARY_PREFIX%\lib\gdal_i.lib" ^ -DGDAL_INCLUDE_DIR="%LIBRARY_PREFIX%\include" ^ -DLIBXML2_LIBRARIES="%LIBRARY_PREFIX%\lib\libxml2.lib" ^ -DLIBXML2_INCLUDE_DIR="%LIBRARY_PREFIX%\include\libxml2" ^ -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ -DCMAKE_PREFIX_PATH=%LIBRARY_PREFIX% ^ .. cmake --build . copy /B mdal\Debug\*.dll %LIBRARY_BIN% copy /B tools\Debug\*.exe %LIBRARY_BIN% ``` Fix incorrect VS version bug
```batchfile mkdir build cd build cmake ^ -DCMAKE_BUILD_TYPE=Rel ^ -DENABLE_TESTS=OFF ^ -DNETCDF_PREFIX="%LIBRARY_PREFIX%" ^ -DHDF5_ROOT="%LIBRARY_PREFIX%" ^ -DGDAL_DIR="%LIBRARY_PREFIX%" ^ -DGDAL_LIBRARY="%LIBRARY_PREFIX%\lib\gdal_i.lib" ^ -DGDAL_INCLUDE_DIR="%LIBRARY_PREFIX%\include" ^ -DLIBXML2_LIBRARIES="%LIBRARY_PREFIX%\lib\libxml2.lib" ^ -DLIBXML2_INCLUDE_DIR="%LIBRARY_PREFIX%\include\libxml2" ^ -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ -DCMAKE_PREFIX_PATH=%LIBRARY_PREFIX% ^ .. cmake --build . copy /B mdal\Debug\*.dll %LIBRARY_BIN% copy /B tools\Debug\*.exe %LIBRARY_BIN% ```
f463b5ef-4524-4bea-9742-fe84069f7a3f
{ "language": "Batchfile" }
```batchfile IF "%1"=="" ( GOTO HELL ) ELSE ( SET _TAG_=v%1 ) IF NOT "%2"=="" ( SET _TAG_=%_TAG_%.%2 ) git remote set-url origin https://%3:%[email protected]/wasteam/waslibs.git git tag -a %_TAG_% -m "Version built: %_TAG_%" git push origin %_TAG_% GOTO END :HELL ECHO VERSION NOT FOUND EXIT -1 :END ECHO PROCESS FINISHED EXIT 0``` Set git user.name and user.email
```batchfile IF "%1"=="" ( GOTO HELL ) ELSE ( SET _TAG_=v%1 ) IF NOT "%2"=="" ( SET _TAG_=%_TAG_%.%2 ) git config --global user.email "%[email protected]" git config --global user.name "%3" git remote set-url origin https://%3:%[email protected]/wasteam/waslibs.git git tag -a %_TAG_% -m "Version built: %_TAG_%" git push origin %_TAG_% GOTO END :HELL ECHO VERSION NOT FOUND EXIT -1 :END ECHO PROCESS FINISHED EXIT 0```
f442a0c4-7bb8-4f9c-af9c-7916bfdfd3f2
{ "language": "Batchfile" }
```batchfile git clone https://github.com/SFML/SFML.git cd SFML mkdir install mkdir build cd build cmake .. -G "Visual Studio 15 Win64" -DCMAKE_INSTALL_PREFIX=../install -DSFML_DEPENDENCIES_INSTALL_PREFIX=../install -DSFML_BUILD_FRAMEWORKS=FALSE -DBUILD_SHARED_LIBS=TRUE msbuild INSTALL.vcxproj cd ../../ mkdir install mkdir build cd build cmake .. -G "Visual Studio 15 Win64" -DCMAKE_BUILD_TYPE=$CONFIGURATION -DTARGET_CPU=$PLATFORM -DCMAKE_INSTALL_PREFIX=../install -DCMAKE_PREFIX_PATH=C:/projects/timle/SFML/install ``` Fix position to current directory
```batchfile git clone https://github.com/SFML/SFML.git cd SFML mkdir install mkdir build cd build cmake .. -G "Visual Studio 15 Win64" -DCMAKE_INSTALL_PREFIX=../install -DSFML_DEPENDENCIES_INSTALL_PREFIX=../install -DSFML_BUILD_FRAMEWORKS=FALSE -DBUILD_SHARED_LIBS=TRUE msbuild INSTALL.vcxproj cd ../../ mkdir install mkdir build cd build cmake .. -G "Visual Studio 15 Win64" -DCMAKE_BUILD_TYPE=$CONFIGURATION -DTARGET_CPU=$PLATFORM -DCMAKE_INSTALL_PREFIX=../install -DCMAKE_PREFIX_PATH=C:/projects/timle/SFML/install cd ../ ```
28901418-a8b6-4b89-b6e5-30d15bf77d41
{ "language": "Batchfile" }
```batchfile @rem https://github.com/numba/numba/blob/master/buildscripts/incremental/setup_conda_environment.cmd @rem The cmd /C hack circumvents a regression where conda installs a conda.bat @rem script in non-root environments. set CONDA_INSTALL=cmd /C conda install -q -y set PIP_INSTALL=pip install -q @echo on @rem Use clcache for faster builds pip install -q git+https://github.com/frerich/clcache.git clcache -s set CLCACHE_SERVER=1 set CLCACHE_HARDLINK=1 powershell.exe -Command "Start-Process clcache-server" if %errorlevel% neq 0 exit /b %errorlevel% ``` Change clcache size and set CLCACHE_NODIRECT
```batchfile @rem https://github.com/numba/numba/blob/master/buildscripts/incremental/setup_conda_environment.cmd @rem The cmd /C hack circumvents a regression where conda installs a conda.bat @rem script in non-root environments. set CONDA_INSTALL=cmd /C conda install -q -y set PIP_INSTALL=pip install -q @echo on @rem Use clcache for faster builds pip install -q git+https://github.com/frerich/clcache.git clcache -M 3221225472 clcache -s set CLCACHE_SERVER=1 set CLCACHE_HARDLINK=1 set CLCACHE_NODIRECT=1 powershell.exe -Command "Start-Process clcache-server" if %errorlevel% neq 0 exit /b %errorlevel% ```
d6e22749-f605-4307-b500-782911b23f51
{ "language": "Batchfile" }
```batchfile :: Open the input file at the input line. :: :: Bug: The line doesn't work :: "\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\devenv" /Edit "%1" /Command "Edit.GoTo %2" ``` Update VS open command to work with VS2015
```batchfile :: Open the input file at the input line. :: :: Bug: The line doesn't work :: :: VS2012 REM "c:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\devenv" /Edit "%1" /Command "Edit.GoTo %2" :: VS2013 REM "c:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv" /Edit "%1" /Command "Edit.GoTo %2" :: VS2015 "c:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\devenv" /Edit "%1" /Command "Edit.GoTo %2" :: TODO: Can I detect which Visual Studio is running? Above is not a great solution. Maybe something like this? REM :check REM :: Note: tasklist does not return a valid exit code, so we need to use findstr. REM tasklist /M UE4Editor-Core.dll | findstr "No tasks" > nul REM IF ERRORLEVEL 1 ( REM IF x%1 NEQ x-f GOTO :check REM ) ```
e81692ce-5e08-45de-9346-df3f5f2cc5f6
{ "language": "Batchfile" }
```batchfile if not exist deps git clone -b master http://buildserver.urbackup.org/git/urbackup_deps deps cd deps git reset --hard git pull``` Build with Visual Studio 2015
```batchfile if not exist deps git clone -b master http://buildserver.urbackup.org/git/urbackup_deps deps cd deps git reset --hard git pull cd ..```
e82458fa-00ee-4813-86f2-83336e6efda2
{ "language": "Batchfile" }
```batchfile copy Zusatz-Dateien\LiesMich.txt dist\LiesMich.txt copy Zusatz-Dateien\CV-Navi.sh dist\CV-Navi.sh copy Zusatz_Bibs\rxtxSerial.dll dist\rxtxSerial.dll copy Zusatz_Bibs\rxtxSerial64.dll dist\rxtxSerial64.dll copy Zusatz_Bibs\librxtxSerial.jnilib dist\rxtxSerial.dll copy Zusatz_Bibs\librxtxSerial64.jnilib dist\rxtxSerial64.dll ``` Fix fuer Windows basiertes Build-Skript
```batchfile copy Zusatz-Dateien\LiesMich.txt dist\LiesMich.txt copy Zusatz-Dateien\CV-Navi.sh dist\CV-Navi.sh copy Zusatz_Bibs\rxtxSerial.dll dist\rxtxSerial.dll copy Zusatz_Bibs\rxtxSerial64.dll dist\rxtxSerial64.dll copy Zusatz_Bibs\librxtxSerial.jnilib dist\librxtxSerial.jnilib copy Zusatz_Bibs\librxtxSerial64.jnilib dist\librxtxSerial64.jnilib ```
37b758f6-892c-4c80-abfa-68deee57f6b0
{ "language": "Batchfile" }
```batchfile @echo off SETLOCAL ENABLEDELAYEDEXPANSION :: Initialize system variables and check configuration call "%~dp0.etc\init.cmd" IF %ERRORLEVEL% NEQ 0 exit /B %ERRORLEVEL% pushd "!REGAIN_HOME!/runtime/crawler" TITLE Regain crawler java -Xmx1024m -Dfile.encoding=UTF-8 -cp !IK_EXT_HOME!/bin;!IK_HOME!/IKAnalyzer2012_u6.jar;!REGAIN_HOME!/runtime/crawler/regain-crawler.jar net.sf.regain.crawler.Main -config "!PROFILE_HOME!/.work/CrawlerConfiguration.xml" -logConfig "!PROFILE_HOME!/.work/log4j.properties" popd ENDLOCAL``` Add %JAVA_OPTS% to crawler, so some java options such as -Xmx can be adjusted by this variable.
```batchfile @echo off SETLOCAL ENABLEDELAYEDEXPANSION :: Initialize system variables and check configuration call "%~dp0.etc\init.cmd" IF %ERRORLEVEL% NEQ 0 exit /B %ERRORLEVEL% pushd "!REGAIN_HOME!/runtime/crawler" TITLE Regain crawler java %JAVA_OPTS% -Dfile.encoding=UTF-8 -cp !IK_EXT_HOME!/bin;!IK_HOME!/IKAnalyzer2012_u6.jar;!REGAIN_HOME!/runtime/crawler/regain-crawler.jar net.sf.regain.crawler.Main -config "!PROFILE_HOME!/.work/CrawlerConfiguration.xml" -logConfig "!PROFILE_HOME!/.work/log4j.properties" popd ENDLOCAL```