doc_id
stringlengths
36
36
metadata
dict
input
stringlengths
28
4.3k
output
stringlengths
11
5.45k
dd7a87a2-ccbb-414a-bd9b-15fcb9cb9f04
{ "language": "Batchfile" }
```batchfile echo Running Windows build and testscript %cd%/matlab/CIBuildAndTest.m call "C:\Program Files\MATLAB\R2015b\bin\matlab.exe" -wait -nodisplay -nosplash -nodesktop -r "try, run('%cd%/matlab/CIBuildAndTest.m'), catch ex, disp(['Exception during CIBuildAndTest.m: ' ex.message]), exit(1), end, exit(0);" if not "%ERRORLEVEL%" == "0" ( echo Exit Code = %ERRORLEVEL% exit /b 1 )``` Fix paths in CI script
```batchfile echo Running Windows build and testscript %cd%/matlab/CIBuildAndTest.m call "C:\Program Files\MATLAB\R2015b\bin\matlab.exe" -wait -nodisplay -nosplash -nodesktop -r "try, run('%cd%\matlab\CIBuildAndTest.m'), catch ex, disp(['Exception during CIBuildAndTest.m: ' ex.message]), exit(1), end, exit(0);" if not "%ERRORLEVEL%" == "0" ( echo Exit Code = %ERRORLEVEL% exit /b 1 )```
eb1d9b70-b417-4be9-9b32-01f9a8522730
{ "language": "Batchfile" }
```batchfile pushd .. rem === BUILDING ActionScriptSDK === node generate.js ..\API_Specs actionscript=..\sdks\ActionScriptSDK\PfApiTest popd ``` Delete model files from AS3 SDK for a cleaner build.
```batchfile rem === Cleaning existing files from ActionScriptSDK === pushd ../../sdks/ActionScriptSDK/PfApiTest/com/playfab pushd AdminModels del *.as >nul 2>&1 popd pushd ClientModels del *.as >nul 2>&1 popd pushd MatchmakerModels del *.as >nul 2>&1 popd pushd ServerModels del *.as >nul 2>&1 popd popd pushd .. rem === BUILDING ActionScriptSDK === node generate.js ..\API_Specs actionscript=..\sdks\ActionScriptSDK\PfApiTest popd ```
a7ccecfc-68c0-4a54-a14b-c6cca5cfea52
{ "language": "Batchfile" }
```batchfile REM Configure Jemalloc build with options CMake -G "Visual Studio 12 Win64" -Ddisable-fill=1 -Ddisable-stats=1 -Ddisable-cache-oblivious=1 ..``` Use the latest experimental build settings.
```batchfile REM Configure Jemalloc build with options CMake -G "Visual Studio 12 Win64" -Ddisable-fill=1 -Dwith-malloc-conf=purge:decay .. REM Debug build settings REM CMake -G "Visual Studio 12 Win64" -Denable-debug=1 -Dwith-malloc-conf=junk:true ..```
c298ee3f-a805-4acb-8669-44826cc4e449
{ "language": "Batchfile" }
```batchfile @echo off setlocal set "output=nul" set "times=1" goto :parsePackage :help :: TODO: put something here. goto :eof :usage call :help 1>&2 exit /b 1 :parsePackage if "%~1" == "" goto usage set "package=%~1" shift :parseArgs if "%~1" == "" goto main if /i %1 == "-?" goto help if /i %1 == "-h" goto help if /i %1 == "--help" goto help if /i %1 == "-t" ( set "times=%~2" shift ) if /i %1 == "--times" ( set "times=%~2" shift ) if /i %1 == "-o" ( set "output=%~2" shift ) if /i %1 == "--output" ( set "output=%~2" shift ) shift goto parseArgs :curl @powershell -NoProfile "iwr %~1 -OutFile %~2" 2> nul goto :eof :downloadPackage set "url=https://www.nuget.org/api/v2/package/%~1" call :curl "%url%" %2 goto :eof :main for /l %%i in (1, 1, %times%) do ( call :downloadPackage "%package%" "%output%" ) ``` Revert "Remove unnecessary uses of "%~1""
```batchfile @echo off setlocal set "output=nul" set "times=1" goto :parsePackage :help :: TODO: put something here. goto :eof :usage call :help 1>&2 exit /b 1 :parsePackage if "%~1" == "" goto usage set "package=%~1" shift :parseArgs if "%~1" == "" goto main if /i "%~1" == "-?" goto help if /i "%~1" == "-h" goto help if /i "%~1" == "--help" goto help if /i "%~1" == "-t" ( set "times=%~2" shift ) if /i "%~1" == "--times" ( set "times=%~2" shift ) if /i "%~1" == "-o" ( set "output=%~2" shift ) if /i "%~1" == "--output" ( set "output=%~2" shift ) shift goto parseArgs :curl @powershell -NoProfile "iwr %~1 -OutFile %~2" 2> nul goto :eof :downloadPackage set "url=https://www.nuget.org/api/v2/package/%~1" call :curl "%url%" %2 goto :eof :main for /l %%i in (1, 1, %times%) do ( call :downloadPackage "%package%" "%output%" ) ```
f30fe024-65dd-440f-aeba-8e0d87f593d3
{ "language": "Batchfile" }
```batchfile @echo off :: Arguments check ::if [%~1]==[] ( :: echo. :: echo ERROR: Not enough Arguments :: echo USAGE: build.bat [C:\path\to\project] :: exit /b 1 ::) ::set projectPath=%~f1 :: Set .NET 4.6 framework path set msbuildPath="%WINDIR%\Microsoft.NET\Framework64\v4.0.30319\" :: Run build command cd.. %msbuildPath%\msbuild.exe PowerPing.sln /p:configuration=release /p:Platform="x86" %msbuildPath%\msbuild.exe PowerPing.sln /p:configuration=release /p:Platform="x64" pause``` Switch build script to use visual studio msbuild instead 4.0 msbuild
```batchfile @echo off cd "%~dp0" :: Arguments check ::if [%~1]==[] ( :: echo. :: echo ERROR: Not enough Arguments :: echo USAGE: build.bat [C:\path\to\project] :: exit /b 1 ::) ::set projectPath=%~f1 :: Set .NET 4.6 framework path set windows_msbuild_path="%WINDIR%\Microsoft.NET\Framework64\v4.0.30319\" set vs_msbuild_path="C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\amd64\msbuild.exe" :: Run build command cd.. ::%windows_msbuild_path%\msbuild.exe PowerPing.sln /p:Configuration=Release /p:Platform="x86" ::%windows_msbuild_path%\msbuild.exe PowerPing.sln /p:Configuration=Release /p:Platform="x64" %vs_msbuild_path% PowerPing.sln /p:Configuration=Release /p:Platform="x86" %vs_msbuild_path% PowerPing.sln /p:Configuration=Release /p:Platform="x64"```
900b7299-c263-4bea-beb6-fb1d05bb2cfd
{ "language": "Batchfile" }
```batchfile ``` Include the cmd script for notebook execution
```batchfile echo "Running the notebooks..." jupyter nbconvert --to notebook --execute "Pulse Building Tutorial.ipynb" jupyter nbconvert --to notebook --execute "Filter compensation.ipynb" jupyter nbconvert --to notebook --execute "Subsequences.ipynb" echo "Cleaning up the generated output..." rm *nbconvert.ipynb ```
56772c01-460a-46d9-9772-25127978786e
{ "language": "Batchfile" }
```batchfile gcloud beta emulators datastore start --project=spine --host-port=localhost:8080 --consistency 1.0 --no-store-on-disk ``` Set correct default project name during the Windows-based Datastore emulator start.
```batchfile gcloud beta emulators datastore start --project=spine-dev --host-port=localhost:8080 --consistency 1.0 --no-store-on-disk ```
8b4d96a0-e9b4-4800-a6dc-d1f3e3e06219
{ "language": "Batchfile" }
```batchfile @echo off setlocal set mypath=%~dp0 set PATH=%PATH%;%mypath%\python2.7 set PYTHONPATH=%mypath%\lib set OQ_SITE_CFG_PATH=%mypath% REM Create the DB or update it python.exe -m openquake.server.db.upgrade_manager "%HOMEPATH%\db.sqlite3" echo Please wait ... REM Start the DbServer in background but within the same context start "OpenQuake DB server" /B python.exe -m openquake.server.dbserver REM Make sure that the dbserver is up and running call:sleep 5 REM Start the WebUI using django start "OpenQuake WebUI server" /B python.exe -m openquake.server.manage runserver %* REM Make sure that the dbserver is up and running call:sleep 2 REM Start the browser start http://localhost:8000 endlocal exit /b 0 :sleep setlocal if exist C:\Windows\System32\timeout.exe ( timeout /t %~1 /nobreak > NUL ) else ( REM Windows XP hack ping 192.0.2.2 -n %~1 -w 1000 > NUL ) endlocal ``` Fix db creation in windows now it'd done by the dbserver and it's under oqdata
```batchfile @echo off setlocal set mypath=%~dp0 set PATH=%PATH%;%mypath%\python2.7 set PYTHONPATH=%mypath%\lib set OQ_SITE_CFG_PATH=%mypath% echo Please wait ... REM Start the DbServer in background but within the same context start "OpenQuake DB server" /B python.exe -m openquake.server.dbserver REM Make sure that the dbserver is up and running call:sleep 5 REM Start the WebUI using django start "OpenQuake WebUI server" /B python.exe -m openquake.server.manage runserver %* REM Make sure that the dbserver is up and running call:sleep 2 REM Start the browser start http://localhost:8000 endlocal exit /b 0 :sleep setlocal if exist C:\Windows\System32\timeout.exe ( timeout /t %~1 /nobreak > NUL ) else ( REM Windows XP hack ping 192.0.2.2 -n %~1 -w 1000 > NUL ) endlocal ```
eb85c6db-df8f-4785-ba38-05006581e217
{ "language": "Batchfile" }
```batchfile svn info c:\dev\sipXtapi | sed -n -e /Revision:/p | cut -c 11- ``` Tweak to update version -- which will now work regardless of your checkout directory structure.
```batchfile svn info . | sed -n -e /Revision:/p | cut -c 11- ```
bec944bb-2e6e-4353-92f3-f78a85755d2c
{ "language": "Batchfile" }
```batchfile mkdir %SCRIPTS% echo "hello world" > %SCRIPTS%\example.txt set >> %SCRIPTS%\example.txt ``` Fix for windows failure in example package
```batchfile mkdir %SCRIPTS% echo "hello world" > %SCRIPTS%\example.txt set >> %SCRIPTS%\example.txt echo "Finished" >> %SCRIPTS%\example.txt ```
1fcf02d9-6afa-4881-93a2-ed356e95edfd
{ "language": "Batchfile" }
```batchfile if not exist "C:\Windows\Temp\build-tools.exe" ( powershell -Command "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::TLS12; (New-Object System.Net.WebClient).DownloadFile('https://download.microsoft.com/download/5/f/7/5f7acaeb-8363-451f-9425-68a90f98b238/visualcppbuildtools_full.exe', 'C:\Windows\Temp\build-tools.exe')" <NUL ) start /wait C:\Windows\Temp\build-tools.exe /Passive /AdminFile A:\buildtools-adminfile.xml setx PATH "%PATH%;C:\Program Files (x86)\Windows Kits\8.1\bin\x86\signtool.exe" /m ``` Fix path to use directory
```batchfile if not exist "C:\Windows\Temp\build-tools.exe" ( powershell -Command "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::TLS12; (New-Object System.Net.WebClient).DownloadFile('https://download.microsoft.com/download/5/f/7/5f7acaeb-8363-451f-9425-68a90f98b238/visualcppbuildtools_full.exe', 'C:\Windows\Temp\build-tools.exe')" <NUL ) start /wait C:\Windows\Temp\build-tools.exe /Passive /AdminFile A:\buildtools-adminfile.xml setx PATH "%PATH%;C:\Program Files (x86)\Windows Kits\8.1\bin\x86\" /m ```
e53bac09-ace2-4e13-8aa4-dcae9fb905af
{ "language": "Batchfile" }
```batchfile @echo off "C:\Program Files (x86)\MSBuild\14.0\Bin\msbuild.exe" mkdir Releases copy GitMind\bin\Debug\GitMind.exe Releases\GitMindSetup.exe /Y pause``` Add NuGet restore to batch file
```batchfile @echo off nuget restore "C:\Program Files (x86)\MSBuild\14.0\Bin\msbuild.exe" mkdir Releases copy GitMind\bin\Debug\GitMind.exe Releases\GitMindSetup.exe /Y pause```
a0330265-b2cd-4183-a715-42647f1ed724
{ "language": "Batchfile" }
```batchfile REM Using the artifacts plugin v1.3 on Windows seems to break the whole step buildkite-agent artifact download "Bugsnag.unitypackage" . cd features\scripts C:\Progra~1\Git\bin\bash.exe build_maze_runner.sh windows cd ..\fixtures\maze_runner\build 7z a -r Windows-%UNITY_VERSION%.zip Windows ``` Return exit code from batch script if build fails [full ci]
```batchfile REM Using the artifacts plugin v1.3 on Windows seems to break the whole step buildkite-agent artifact download "Bugsnag.unitypackage" . cd features\scripts C:\Progra~1\Git\bin\bash.exe build_maze_runner.sh windows IF NOT [%ERRORLEVEL%] EQU [0] EXIT /B %ERRORLEVEL% cd ..\fixtures\maze_runner\build 7z a -r Windows-%UNITY_VERSION%.zip Windows ```
c215f024-5301-4b5a-b45d-6a9e01a0a986
{ "language": "Batchfile" }
```batchfile @echo off title PostgreSQL Portable cls :: set default code page chcp 1252 > nul :: initialise a new database on first use if not exist "%PGDATA%" ( echo. echo Initialising database for first use, please wait... "%PGSQL%\bin\initdb" -U %PGUSER% -A trust -E utf8 --locale=C >nul ) :: startup postgres server echo. "%PGSQL%\bin\pg_ctl" -D "%PGDATA%" -l "%PGLOG%" -w start cls echo. echo Type \q to quit and shutdown server echo. "%PGSQL%\bin\psql.exe" --port=%PGPORT% --dbname="%PGDATABASE%" --username="%PGUSER%" echo. "%PGSQL%\bin\pg_ctl" -D "%PGDATA%" stop ``` Add port number to server output
```batchfile @echo off title PostgreSQL Portable cls :: set default code page chcp 1252 > nul :: initialise a new database on first use if not exist "%PGDATA%" ( echo. echo Initialising database for first use, please wait... "%PGSQL%\bin\initdb" -U %PGUSER% -A trust -E utf8 --locale=C >nul ) :: startup postgres server echo. "%PGSQL%\bin\pg_ctl" -D "%PGDATA%" -l "%PGLOG%" -w start cls echo. echo Running on port %PGPORT%. Type \q to quit and shutdown the server. echo. "%PGSQL%\bin\psql.exe" --port=%PGPORT% --dbname="%PGDATABASE%" --username="%PGUSER%" echo. "%PGSQL%\bin\pg_ctl" -D "%PGDATA%" stop ```
c1cf571d-59ba-466a-b931-8614efd90f9b
{ "language": "Batchfile" }
```batchfile @echo off cd %~dp0 SETLOCAL SET CACHED_NUGET=%LocalAppData%\NuGet\NuGet.exe IF EXIST %CACHED_NUGET% goto copynuget echo Downloading latest version of NuGet.exe... IF NOT EXIST %LocalAppData%\NuGet md %LocalAppData%\NuGet @powershell -NoProfile -ExecutionPolicy unrestricted -Command "$ProgressPreference = 'SilentlyContinue'; Invoke-WebRequest 'https://www.nuget.org/nuget.exe' -OutFile '%CACHED_NUGET%'" :copynuget IF EXIST .nuget\nuget.exe goto restore md .nuget copy %CACHED_NUGET% .nuget\nuget.exe > nul :restore .nuget\NuGet.exe install FSharpSupport -ExcludeVersion -o packages -nocache -pre .nuget\NuGet.exe install KoreBuild -ExcludeVersion -o packages -nocache -pre .nuget\NuGet.exe install FAKE -ExcludeVersion -o packages IF "%SKIP_KRE_INSTALL%"=="1" goto run REM CALL packages\KoreBuild\build\kvm upgrade -svr50 -x86 REM CALL packages\KoreBuild\build\kvm install default -svrc50 -x86 :run REM Run FAKE packages\FAKE\tools\Fake.exe build.fsx %*``` Make sure to update nuget
```batchfile @echo off cd %~dp0 SETLOCAL SET CACHED_NUGET=%LocalAppData%\NuGet\NuGet.exe IF EXIST %CACHED_NUGET% goto copynuget echo Downloading latest version of NuGet.exe... IF NOT EXIST %LocalAppData%\NuGet md %LocalAppData%\NuGet @powershell -NoProfile -ExecutionPolicy unrestricted -Command "$ProgressPreference = 'SilentlyContinue'; Invoke-WebRequest 'https://www.nuget.org/nuget.exe' -OutFile '%CACHED_NUGET%'" :copynuget IF EXIST .nuget\nuget.exe goto restore md .nuget copy %CACHED_NUGET% .nuget\nuget.exe > nul .nuget\NuGet.exe update -self :restore .nuget\NuGet.exe install FSharpSupport -ExcludeVersion -o packages -nocache -pre .nuget\NuGet.exe install KoreBuild -ExcludeVersion -o packages -nocache -pre .nuget\NuGet.exe install FAKE -ExcludeVersion -o packages IF "%SKIP_KRE_INSTALL%"=="1" goto run REM CALL packages\KoreBuild\build\kvm upgrade -svr50 -x86 REM CALL packages\KoreBuild\build\kvm install default -svrc50 -x86 :run REM Run FAKE packages\FAKE\tools\Fake.exe build.fsx %*```
434f347d-899a-47ab-ae68-3e3198585fff
{ "language": "Batchfile" }
```batchfile :: Symbolically link to all of the dot files in this directory from the :: home directory. @echo off net file >nul 2> nul && goto :Elevated echo error: Administrator rights are required to make symbolic links on Windows. exit /b 1 :Elevated if not defined HOME ( set HOME=%USERPROFILE% ) for %%f in (%~dp0.\.*) do ( if exist %HOME%\%%~nxf ( del /P %HOME%\%%~nxf ) mklink %HOME%\%%~nxf %%f ) ``` Make HOME environment var permanent on Windows
```batchfile :: Symbolically link to all of the dot files in this directory from the :: home directory. @echo off net file >nul 2> nul && goto :Elevated echo error: Administrator rights are required to make symbolic links on Windows. exit /b 1 :Elevated if not defined HOME ( set HOME=%USERPROFILE% ) setx HOME %HOME% for %%f in (%~dp0.\.*) do ( if exist %HOME%\%%~nxf ( del /P %HOME%\%%~nxf ) mklink %HOME%\%%~nxf %%f ) ```
7fd66d50-461d-4210-906f-ea861d220560
{ "language": "Batchfile" }
```batchfile set app_title=WhackEd4 set app_description=A Windows Dehacked editor. set app_name=WhackEd4 set app_name_lower=whacked4 set app_version=1.2.1 set app_version_value=1.2.1 set app_version_title=1.2.1 set build_path=".\build\exe.win32-2.7" set python_interpreter="c:\python27\python.exe" set setup_compiler="C:\Program Files (x86)\Inno Setup 5\ISCC.exe" set zip=7za rmdir .\build /S /Q %python_interpreter% setup.py build del %app_name_lower%-setup-*.exe %setup_compiler% %app_name_lower%.iss del %app_name_lower%-*.7z %zip% a %app_name_lower%-%app_version%.7z %build_path%\* -r -mx=9 -ms=on pause ``` Reduce installer and package size a little bit by excluding some unneeded wxWidgets files.
```batchfile set app_title=WhackEd4 set app_description=A Windows Dehacked editor. set app_name=WhackEd4 set app_name_lower=whacked4 set app_version=1.2.1 set app_version_value=1.2.1 set app_version_title=1.2.1 set build_path=".\build\exe.win32-2.7" set python_interpreter="c:\python27\python.exe" set setup_compiler="C:\Program Files (x86)\Inno Setup 5\ISCC.exe" set zip=7za rmdir .\build /S /Q %python_interpreter% setup.py build rmdir .\build\exe.win32-2.7\wx\tools /S /Q del %app_name_lower%-setup-*.exe %setup_compiler% %app_name_lower%.iss del %app_name_lower%-*.7z %zip% a %app_name_lower%-%app_version%.7z %build_path%\* -r -mx=9 -ms=on pause ```
7b9fd132-64e6-4a8c-9481-59e2dcff05a1
{ "language": "Batchfile" }
```batchfile "C:\Program Files (x86)\MSBuild\14.0\Bin\MSBuild.exe" ..\Yoga\Yoga.vcxproj /p:configuration=Release /property:Platform=x64 xcopy "..\Yoga\x64\Release\yoga.dll" %~dp0 /s /d /y ``` Fix dll path in Unity build script
```batchfile "C:\Program Files (x86)\MSBuild\14.0\Bin\MSBuild.exe" ..\Yoga\Yoga.vcxproj /p:configuration=Release /property:Platform=x64 xcopy "..\Yoga\bin\x64\Release\yoga.dll" %~dp0 /s /d /y ```
61a64893-d009-45c7-a2a2-9071ad1ff981
{ "language": "Batchfile" }
```batchfile @ECHO off CHCP 65001 > NUL CD /d "%~dp0" SETLOCAL ENABLEEXTENSIONS SET KEY_NAME="HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" SET VALUE_NAME=HideFileExt FOR /F "usebackq tokens=1-3" %%A IN (`REG QUERY %KEY_NAME% /v %VALUE_NAME% 2^>nul`) DO ( SET ValueName=%%A SET ValueType=%%B SET ValueValue=%%C ) IF x%ValueValue:0x0=%==x%ValueValue% ( ECHO Unhiding file extensions... START CMD /c REG ADD HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced /v HideFileExt /t REG_DWORD /d 0 /f ) ENDLOCAL IF EXIST %SYSTEMROOT%\py.exe ( CMD /k py.exe -3.5 run.py EXIT ) python --version > NUL 2>&1 IF %ERRORLEVEL% NEQ 0 GOTO nopython CMD /k python run.py GOTO end :nopython ECHO ERROR: Python has either not been installed or not added to your PATH. :end PAUSE ``` Use sysroot var in py.exe invoke
```batchfile @ECHO off CHCP 65001 > NUL CD /d "%~dp0" SETLOCAL ENABLEEXTENSIONS SET KEY_NAME="HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" SET VALUE_NAME=HideFileExt FOR /F "usebackq tokens=1-3" %%A IN (`REG QUERY %KEY_NAME% /v %VALUE_NAME% 2^>nul`) DO ( SET ValueName=%%A SET ValueType=%%B SET ValueValue=%%C ) IF x%ValueValue:0x0=%==x%ValueValue% ( ECHO Unhiding file extensions... START CMD /c REG ADD HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced /v HideFileExt /t REG_DWORD /d 0 /f ) ENDLOCAL IF EXIST %SYSTEMROOT%\py.exe ( CMD /k %SYSTEMROOT%\py.exe -3.5 run.py EXIT ) python --version > NUL 2>&1 IF %ERRORLEVEL% NEQ 0 GOTO nopython CMD /k python run.py GOTO end :nopython ECHO ERROR: Python has either not been installed or not added to your PATH. :end PAUSE ```
cb0500a1-740b-402b-bea8-65e06e79a96c
{ "language": "Batchfile" }
```batchfile :: hard link to all of the dot files in this directory from the :: home directory. @echo off setx HOME %HOME% for %%f in (%~dp0.\.*) do ( if exist %HOME%\%%~nxf ( del /P %HOME%\%%~nxf ) mklink /h %HOME%\%%~nxf %%f ) ``` Set HOME to USERPROFILE by default
```batchfile :: hard link to all of the dot files in this directory from the :: home directory. @echo off if not defined HOME ( set HOME=%USERPROFILE% ) setx HOME %HOME% for %%f in (%~dp0.\.*) do ( if exist %HOME%\%%~nxf ( del /P %HOME%\%%~nxf ) mklink /h %HOME%\%%~nxf %%f ) ```
b101feec-e8d7-4a31-967b-de8091d00c09
{ "language": "Batchfile" }
```batchfile ``` Add cmd file to regenerate all bindings.
```batchfile set ORIGINAL_DIR=%CD% cd JavaScript\CoreBindings call RegenerateCoreBindings.cmd cd %ORIGINAL_DIR% cd JavaScript\JavaScriptBindings call RegenerateJavaScriptBindings.cmd cd %ORIGINAL_DIR% cd BulletPhysics\BulletPhysicsBindings call RegenerateBulletPhysicsBindings.cmd cd %ORIGINAL_DIR% cd UrhoRenderer\UrhoRendererBindings call RegenerateUrhoRendererBindings.cmd cd %ORIGINAL_DIR% cd TundraLogic\TundraLogicBindings call RegenerateTundraLogicBindings.cmd cd %ORIGINAL_DIR% ```
f8ebdc21-8b82-4b61-8994-d0e4905e24ca
{ "language": "Batchfile" }
```batchfile ``` Add simple wrapper batch file for Windows
```batchfile @echo off setlocal :: attempt to add defalt Cygwin paths to Windows path path C:\cygwin\bin;%PATH% path C:\cygwin64\bin;%PATH% :: allow Windows new lines in shell scripts with Cygwin set SHELLOPTS=igncr :: TODO check and create C:\temp? set DBNAME=%1 bash or_tests.bash %DBNAME% endlocal ```
28a5b4e8-3ea9-4598-a4a0-54a93e2048d6
{ "language": "Batchfile" }
```batchfile REG DELETE "HKEY_CURRENT_USER\Software\MPC-HC\MPC-HC\Favorites\Files" /va /f``` Support case where settings are not stored in the Registry but on disk
```batchfile @echo off CLS ECHO. ECHO ============================= ECHO Running Admin shell ECHO ============================= :init setlocal DisableDelayedExpansion set cmdInvoke=1 set winSysFolder=System32 set "batchPath=%~0" for %%k in (%0) do set batchName=%%~nk set "vbsGetPrivileges=%temp%\OEgetPriv_%batchName%.vbs" setlocal EnableDelayedExpansion :checkPrivileges NET FILE 1>NUL 2>NUL if '%errorlevel%' == '0' ( goto gotPrivileges ) else ( goto getPrivileges ) :getPrivileges if '%1'=='ELEV' (echo ELEV & shift /1 & goto gotPrivileges) ECHO. ECHO ************************************** ECHO Invoking UAC for Privilege Escalation ECHO ************************************** ECHO Set UAC = CreateObject^("Shell.Application"^) > "%vbsGetPrivileges%" ECHO args = "ELEV " >> "%vbsGetPrivileges%" ECHO For Each strArg in WScript.Arguments >> "%vbsGetPrivileges%" ECHO args = args ^& strArg ^& " " >> "%vbsGetPrivileges%" ECHO Next >> "%vbsGetPrivileges%" if '%cmdInvoke%'=='1' goto InvokeCmd ECHO UAC.ShellExecute "!batchPath!", args, "", "runas", 1 >> "%vbsGetPrivileges%" goto ExecElevation :InvokeCmd ECHO args = "/c """ + "!batchPath!" + """ " + args >> "%vbsGetPrivileges%" ECHO UAC.ShellExecute "%SystemRoot%\%winSysFolder%\cmd.exe", args, "", "runas", 1 >> "%vbsGetPrivileges%" :ExecElevation "%SystemRoot%\%winSysFolder%\WScript.exe" "%vbsGetPrivileges%" %* exit /B :gotPrivileges setlocal & cd /d %~dp0 if '%1'=='ELEV' (del "%vbsGetPrivileges%" 1>nul 2>nul & shift /1) :::::::::::::::::::::::::::: ::START :::::::::::::::::::::::::::: SET startDirectory=%~dp0 SET iniFile="C:\Program Files\MPC-HC\mpc-hc64.ini" SET iniFileModified="C:\Program Files\MPC-HC\mpc-hc64.ini.modified" IF EXIST %iniFile% ( REM If favorites are stored in the INI file node "%startDirectory%..\js\remove_mpc-hc_favorites.js" %iniFile% %iniFileModified% ) ELSE ( REM If favorites are stored in the Registry REG DELETE "HKEY_CURRENT_USER\Software\MPC-HC\MPC-HC\Favorites\Files" /va /f ) ECHO MPC-HC favorites deleted successfully```
7abda796-5b6a-4722-8afd-b1c1cef9eae5
{ "language": "Batchfile" }
```batchfile @if defined ELIXIR_CLI_ECHO (@echo on) else (@echo off) call "%~dp0\elixir.bat" +iex --erl "-user Elixir.IEx.CLI" --no-halt %ELIXIR_IEX_FLAGS% %* ``` Use IEX_WITH_WERL environment variable to enable --werl by default.
```batchfile @if defined ELIXIR_CLI_ECHO (@echo on) else (@echo off) @if defined IEX_WITH_WERL (@set __ELIXIR_IEX_FLAGS=--werl) else (set __ELIXIR_IEX_FLAGS=) call "%~dp0\elixir.bat" +iex --erl "-user Elixir.IEx.CLI" --no-halt %__ELIXIR_IEX_FLAGS% %* @set __ELIXIR_IEX_FLAGS= ```
42aad0ed-72e3-41a3-8029-d1362fe4b3ef
{ "language": "Batchfile" }
```batchfile @echo off set "INCLUDE=%LIBRARY_INC%;%INCLUDE%" set "LIB=%LIBRARY_LIB%;%LIB%" xcopy %LIBRARY_LIB%\fftw3.lib %LIBRARY_LIB%\libfftw3-3.lib %PYTHON% setup.py build %PYTHON% setup.py install --single-version-externally-managed --record=record.txt``` Copy fftw library to correct file-name
```batchfile @echo off set "INCLUDE=%LIBRARY_INC%;%INCLUDE%" set "LIB=%LIBRARY_LIB%;%LIB%" xcopy /i %LIBRARY_LIB%\fftw3.lib %LIBRARY_LIB%\libfftw3-3.lib %PYTHON% setup.py build %PYTHON% setup.py install --single-version-externally-managed --record=record.txt```
acdee55f-fc86-441e-813f-6661bb8ed2a7
{ "language": "Batchfile" }
```batchfile mvn clean jacoco:prepare-agent verify jacoco:report -Dmaven.javadoc.failOnError=false -s dev\settings-sonarqube.xml %* ``` Add missing `sonar:sonar` for windows script
```batchfile mvn clean jacoco:prepare-agent verify jacoco:report sonar:sonar -Dmaven.javadoc.failOnError=false -s dev\settings-sonarqube.xml %* ```
e3de0a5f-114e-4cf7-8397-75110fb64adb
{ "language": "Batchfile" }
```batchfile @echo off @REM This script was based on the original conda activate.bat @setlocal @set "CONDA_DEFAULT_ENV=__CONDA_ENV_DIR__" @set PATH="%CONDA_DEFAULT_ENV%";"%CONDA_DEFAULT_ENV%\Scripts";"%CONDA_DEFAULT_ENV%\Library\bin";%PATH% @REM Run any activate scripts @if exist "%CONDA_DEFAULT_ENV%\etc\conda\activate.d" ( @pushd "%CONDA_DEFAULT_ENV%\etc\conda\activate.d" @for %%g in (*.bat) do @call "%%g" @popd ) @REM Execute the given command %* @endlocal ``` Fix conda wrapper for Windows
```batchfile @echo off @REM This script was based on the original conda activate.bat @setlocal @set "CONDA_DEFAULT_ENV=__CONDA_ENV_DIR__" @set "PATH=%CONDA_DEFAULT_ENV%;%CONDA_DEFAULT_ENV%\Scripts;%CONDA_DEFAULT_ENV%\Library\bin;%PATH%" @REM Run any activate scripts @if exist "%CONDA_DEFAULT_ENV%\etc\conda\activate.d" ( @pushd "%CONDA_DEFAULT_ENV%\etc\conda\activate.d" @for %%g in (*.bat) do @call "%%g" @popd ) @REM Execute the given command %* @endlocal ```
a9f994a4-3083-44f1-b2d7-b7b6138c4565
{ "language": "Batchfile" }
```batchfile ::Get the current batch file's short path for %%x in (%0) do set BatchPath=%%~dpsx for %%x in (%BatchPath%) do set BatchPath=%%~dpsx java -Xmx1200m -Dproduction=true -Djava.net.preferIPv4Stack=true -Dsun.java2d.noddraw=true -jar %BatchPath%\igv.jar %* ``` Update memory settings for window .bat file (from 1200 mb to 4000 mb)
```batchfile ::Get the current batch file's short path for %%x in (%0) do set BatchPath=%%~dpsx for %%x in (%BatchPath%) do set BatchPath=%%~dpsx java -Xmx4000m -Dproduction=true -Djava.net.preferIPv4Stack=true -Dsun.java2d.noddraw=true -jar %BatchPath%\igv.jar %* ```
65385d6d-5970-4223-8b85-2e2af8d06d1a
{ "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% ```
0ec3f839-c788-40b2-bba7-17c5b2120744
{ "language": "Batchfile" }
```batchfile @REM @REM Copyright (c) 2013 mgm technology partners GmbH @REM @REM Licensed under the Apache License, Version 2.0 (the "License"); @REM you may not use this file except in compliance with the License. @REM You may obtain a copy of the License at @REM @REM http://www.apache.org/licenses/LICENSE-2.0 @REM @REM Unless required by applicable law or agreed to in writing, software @REM distributed under the License is distributed on an "AS IS" BASIS, @REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @REM See the License for the specific language governing permissions and @REM limitations under the License. @REM @echo off @setlocal cd %~dp0 if exist setenv.cmd call setenv.cmd @echo Initializing... gradlew -b DemoInstaller.gradle -q pause @endlocal ``` Use "call" for running Gradle
```batchfile @REM @REM Copyright (c) 2013 mgm technology partners GmbH @REM @REM Licensed under the Apache License, Version 2.0 (the "License"); @REM you may not use this file except in compliance with the License. @REM You may obtain a copy of the License at @REM @REM http://www.apache.org/licenses/LICENSE-2.0 @REM @REM Unless required by applicable law or agreed to in writing, software @REM distributed under the License is distributed on an "AS IS" BASIS, @REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @REM See the License for the specific language governing permissions and @REM limitations under the License. @REM @echo off @setlocal cd %~dp0 if exist setenv.cmd call setenv.cmd @echo Initializing... call gradlew -b DemoInstaller.gradle -q pause @endlocal ```
e045b099-de72-4daf-9f65-632814481f16
{ "language": "Batchfile" }
```batchfile @echo off python "%~dp0\rossum.py" %* ``` Add missing license to wrapper batch.
```batchfile @echo off REM REM Copyright (c) 2016, G.A. vd. Hoorn REM REM Licensed under the Apache License, Version 2.0 (the "License"); REM you may not use this file except in compliance with the License. REM You may obtain a copy of the License at REM REM http://www.apache.org/licenses/LICENSE-2.0 REM REM Unless required by applicable law or agreed to in writing, software REM distributed under the License is distributed on an "AS IS" BASIS, REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. REM See the License for the specific language governing permissions and REM limitations under the License. REM python "%~dp0\rossum.py" %* ```
567cad8d-d427-448b-ac68-9e69512e0387
{ "language": "Batchfile" }
```batchfile @echo off pushd %1 set attempts=5 set counter=0 :retry set /a counter+=1 echo Attempt %counter% out of %attempts% if exist %1\node_modules\azure-cli\bin\azure ( cmd /c npm update https://github.com/amitapl/azure-sdk-tools-xplat/tarball/kudu ) else ( cmd /c npm install https://github.com/amitapl/azure-sdk-tools-xplat/tarball/kudu ) 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 azure-cli's kudu specific branch.
```batchfile @echo off pushd %1 set attempts=5 set counter=0 :retry set /a counter+=1 echo Attempt %counter% out of %attempts% if exist %1\node_modules\azure-cli\bin\azure ( cmd /c npm update https://github.com/amitapl/azure-sdk-tools-xplat/tarball/kudu_s20 ) else ( cmd /c npm install https://github.com/amitapl/azure-sdk-tools-xplat/tarball/kudu_s20 ) 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 ```
a1adda10-3d35-4046-b2d0-4d5647dc006c
{ "language": "Batchfile" }
```batchfile @echo off pushd %1 if exist %1\node_modules\azure-cli\bin\azure ( cmd /c npm update azure-cli ) else ( cmd /c npm install azure-cli ) IF %ERRORLEVEL% NEQ 0 goto error if exist %1\node_modules\kudusync\bin\kudusync ( cmd /c npm update kudusync ) else ( cmd /c npm install kudusync ) IF %ERRORLEVEL% NEQ 0 goto error popd goto end :error echo An error has occured during npm install. exit /b 1 :end echo Finished successfully. ``` Change script to install azure-cli from a private branch, so we have the latest fixes (not dependant on azure-cli schedule for them).
```batchfile @echo off pushd %1 if exist %1\node_modules\azure-cli\bin\azure ( cmd /c npm update https://github.com/amitapl/azure-sdk-tools-xplat/tarball/latest ) else ( cmd /c npm install https://github.com/amitapl/azure-sdk-tools-xplat/tarball/latest ) IF %ERRORLEVEL% NEQ 0 goto error if exist %1\node_modules\kudusync\bin\kudusync ( cmd /c npm update kudusync ) else ( cmd /c npm install kudusync ) IF %ERRORLEVEL% NEQ 0 goto error popd goto end :error echo An error has occured during npm install. exit /b 1 :end echo Finished successfully. ```
cafadd09-cc00-4aa0-b416-9cb57d674911
{ "language": "Batchfile" }
```batchfile @echo off REM This file is part of the DITA Open Toolkit project hosted on REM Sourceforge.net. See the accompanying license.txt file for REM applicable licenses. REM (c) Copyright IBM Corp. 2006 All Rights Reserved. REM Get the absolute path of DITAOT's home directory set DITA_DIR=%~dp0 REM Set environment variables set ANT_OPTS=-Xmx512m %ANT_OPTS% set ANT_OPTS=%ANT_OPTS% -Djavax.xml.transform.TransformerFactory=net.sf.saxon.TransformerFactoryImpl set ANT_HOME=%DITA_DIR%tools\ant set PATH=%DITA_DIR%tools\ant\bin;%PATH% set CLASSPATH=%DITA_DIR%lib;%DITA_DIR%lib\dost.jar;%DITA_DIR%lib\commons-codec-1.4.jar;%DITA_DIR%lib\dost.jar;%DITA_DIR%lib\resolver.jar;%DITA_DIR%lib\icu4j.jar;%CLASSPATH% set CLASSPATH=%DITA_DIR%lib\saxon\saxon9.jar;%DITA_DIR%lib\saxon\saxon9-dom.jar;%CLASSPATH% start "DITA-OT" cmd.exe ``` Remove duplicate dost.jar from CLASSPATH - ID: 3499953
```batchfile @echo off REM This file is part of the DITA Open Toolkit project hosted on REM Sourceforge.net. See the accompanying license.txt file for REM applicable licenses. REM (c) Copyright IBM Corp. 2006 All Rights Reserved. REM Get the absolute path of DITAOT's home directory set DITA_DIR=%~dp0 REM Set environment variables set ANT_OPTS=-Xmx512m %ANT_OPTS% set ANT_OPTS=%ANT_OPTS% -Djavax.xml.transform.TransformerFactory=net.sf.saxon.TransformerFactoryImpl set ANT_HOME=%DITA_DIR%tools\ant set PATH=%DITA_DIR%tools\ant\bin;%PATH% set CLASSPATH=%DITA_DIR%lib;%DITA_DIR%lib\dost.jar;%DITA_DIR%lib\commons-codec-1.4.jar;%DITA_DIR%lib\resolver.jar;%DITA_DIR%lib\icu4j.jar;%CLASSPATH% set CLASSPATH=%DITA_DIR%lib\saxon\saxon9.jar;%DITA_DIR%lib\saxon\saxon9-dom.jar;%CLASSPATH% start "DITA-OT" cmd.exe ```
a8c054b4-9828-4a0d-9a4e-31b02259c7c5
{ "language": "Batchfile" }
```batchfile ``` Add the script that is used to setup CI test server
```batchfile @echo off setlocal if [%2]==[] goto :Usage if [%1]==[/?] goto :Usage if [%1]==[-?] goto :Usage if [%1]==[/help] goto :Usage if [%1]==[-help] goto :Usage set _n=%1 set _exitCode=0 set _cmd= set _cmd1= :Loop shift if [%1]==[] goto :Continue if [%1]==[#] ( set _cmd1=%_cmd1% %_cmd% set _cmd= goto :Loop ) set _cmd=%_cmd% %1 goto :Loop :Continue for /L %%i in (1,1,%_n%) do ( echo Iteration: %%i if defined _cmd1 ( call :Run %_cmd1% %%i %_cmd% ) else ( call :Run %_cmd% ) if ERRORLEVEL 1 goto :Failed echo. ) echo All %_n% iterations completed successfully! goto :Done :Usage echo. echo Usage: echo %~n0 n command [parameters] echo n: [Required] The number of iterations to repeat the command echo command: [Required] The command to run for n iterations echo parameters: [Optional] The parameters of the command echo #: When parameters contain #, the last occurance in the parameter echo will be replace with the number of iteration. echo. echo Example: echo %~n0 42 work.cmd # param echo :The script 'work.cmd' will be called 42 times like echo work.cmd 1 param, work.cmd 2 param, ..., work.cmd 42 param goto :Done :Run set cmdLine=%* echo %cmdLine% call %cmdLine% exit /b :Failed set _exitCode=1 echo. echo Aborted! Failed to complete all iterations. :Done exit /b %_exitCode% endlocal ```
2484c332-35a8-40fd-88ae-2466d0d2341a
{ "language": "Batchfile" }
```batchfile @C:\Python26\python.exe %~dp0\clcache.py %* ``` Use "python.exe" in PATH too, instead of only relying on fixed location.
```batchfile @echo off if exist C:\Python26\python.exe ( C:\Python26\python.exe %~dp0\clcache.py %* ) else ( python.exe %~dp0\clcache.py %* ) ```
2fe18ecc-fe9e-4b68-8750-786df88caf49
{ "language": "Batchfile" }
```batchfile @echo off echo [INFO] create db. echo [INFO] please confirm db encoding utf-8. echo [INFO] please confirm has modified es/web/pom.xml--^>profile--^>development---^>connection.admin.url/connection.username/password cd %~dp0 cd ../web call mvn db:create -e -X cd ../bin pause``` Revert "print detailed debug info when creating DB"
```batchfile @echo off echo [INFO] create db. echo [INFO] please confirm db encoding utf-8. echo [INFO] please confirm has modified es/web/pom.xml--^>profile--^>development---^>connection.admin.url/connection.username/password cd %~dp0 cd ../web call mvn db:create cd ../bin pause```
17539b2c-9a2b-4279-a5cb-bbb2ec263c6a
{ "language": "Batchfile" }
```batchfile @ECHO OFF SET BASEDIR=%~dp0.. SET USERINI=%BASEDIR%\user.ini FOR /F "tokens=1,2 delims=:" %%a in ("%STEELTOE_PCF_CREDENTIALS%") do ( set CF_USER=%%a set CF_PASS=%%b ) SET PYTHON_HOME=C:\Python36 SET DOTNET_HOME=C:\Program Files\dotnet SET JAVA_HOME=C:\opt\oracle-jdk-8 SET GIT_HOME=C:\Program Files\Git SET MAVEN_HOME=C:\opt\apache-maven-3.3.9 SET CF_HOME=C:\ProgramData\chocolatey\bin SET TEST_OUT=C:\st\%~nx1 ECHO [behave.userdata] > %USERINI% ECHO cf_apiurl = api.run.pcfbeta.io >> %USERINI% ECHO cf_org = STEELTOE >> %USERINI% ECHO cf_username = %CF_USER% >> %USERINI% ECHO cf_password = %CF_PASS% >> %USERINI% ECHO cf_max_attempts = 250 >> %USERINI% ECHO output = %TEST_OUT% >> %USERINI% SET PATH=%PYTHON_HOME%;%PYTHON_HOME%\Scripts;%DOTNET_HOME%;%CF_HOME%;%JAVA_HOME%\bin;%GIT_HOME%\bin;%MAVEN_HOME%\bin;%PATH% PATH RMDIR /S /Q %TEST_OUT% CALL %BASEDIR%\test-setup CALL %BASEDIR%\test-run %* ``` Disable Python virtualenv on Jenkins
```batchfile @ECHO OFF SET BASEDIR=%~dp0.. SET USERINI=%BASEDIR%\user.ini FOR /F "tokens=1,2 delims=:" %%a in ("%STEELTOE_PCF_CREDENTIALS%") do ( set CF_USER=%%a set CF_PASS=%%b ) SET PYTHON_HOME=C:\Python36 SET DOTNET_HOME=C:\Program Files\dotnet SET JAVA_HOME=C:\opt\oracle-jdk-8 SET GIT_HOME=C:\Program Files\Git SET MAVEN_HOME=C:\opt\apache-maven-3.3.9 SET CF_HOME=C:\ProgramData\chocolatey\bin SET TEST_OUT=C:\st\%~nx1 ECHO [behave.userdata] > %USERINI% ECHO cf_apiurl = api.run.pcfbeta.io >> %USERINI% ECHO cf_org = STEELTOE >> %USERINI% ECHO cf_username = %CF_USER% >> %USERINI% ECHO cf_password = %CF_PASS% >> %USERINI% ECHO cf_max_attempts = 250 >> %USERINI% ECHO output = %TEST_OUT% >> %USERINI% SET PATH=%PYTHON_HOME%;%PYTHON_HOME%\Scripts;%DOTNET_HOME%;%CF_HOME%;%JAVA_HOME%\bin;%GIT_HOME%\bin;%MAVEN_HOME%\bin;%PATH% PATH RMDIR /S /Q %TEST_OUT% REM CALL %BASEDIR%\test-setup REM CALL %BASEDIR%\test-run %* behave %* ```
4ece722d-1e3c-4469-a1f2-f0ab1817b802
{ "language": "Batchfile" }
```batchfile if "%NUGET_API_KEY%" == "" goto NO_KEY if "%1" == "" goto MISSING_INPUT_FOLDER REM dotnet nuget push %1\*.nupkg --api-key %NUGET_API_KEY% for %%f in (%1\*.nupkg) do dotnet nuget push %%f --api-key %NUGET_API_KEY% --source https://nuget.org/ GOTO END :NO_KEY ECHO Couldn't find 'NUGET_API_KEY' environment variable. EXIT /B 1 :MISSING_INPUT_FOLDER ECHO You must supply the folder in which the nuget packages live. EXIT /B 2 :END ``` Remove echo so the API key doesn't appear on screen.
```batchfile @ECHO OFF if "%NUGET_API_KEY%" == "" goto NO_KEY if "%1" == "" goto MISSING_INPUT_FOLDER REM dotnet nuget push %1\*.nupkg --api-key %NUGET_API_KEY% for %%f in (%1\*.nupkg) do dotnet nuget push %%f --api-key %NUGET_API_KEY% --source https://nuget.org/ GOTO END :NO_KEY ECHO Couldn't find 'NUGET_API_KEY' environment variable. EXIT /B 1 :MISSING_INPUT_FOLDER ECHO You must supply the folder in which the nuget packages live. EXIT /B 2 :END ```
87c549d2-504c-4a83-bc5c-f1f547d52ad0
{ "language": "Batchfile" }
```batchfile if not exist .git exit 1 git describe if errorlevel 1 exit 1 for /f "delims=" %%i in ('git describe') do set gitdesc=%%i if errorlevel 1 exit 1 echo "%gitdesc%" if not "%gitdesc%"=="1.8.1" exit 1 git status if errorlevel 1 exit 1 set PYTHONPATH=. python -c "import conda_build; assert conda_build.__version__ == '1.8.1', conda_build.__version__" if errorlevel 1 exit 1 ``` Use proper flags to git describe command in test
```batchfile if not exist .git exit 1 git describe --tags --dirty if errorlevel 1 exit 1 for /f "delims=" %%i in ('git describe') do set gitdesc=%%i if errorlevel 1 exit 1 echo "%gitdesc%" if not "%gitdesc%"=="1.8.1" exit 1 git status if errorlevel 1 exit 1 set PYTHONPATH=. python -c "import conda_build; assert conda_build.__version__ == '1.8.1', conda_build.__version__" if errorlevel 1 exit 1 ```
965b6aa5-c144-4e7f-ac69-d9921746e592
{ "language": "Batchfile" }
```batchfile ``` Make a Microsoft import library for the x64 csound64.dll.
```batchfile @echo CREATING MICROSOFT IMPORT LIBRARY FOR CSOUND64.DLL FOR X64 dumpbin /exports csound-mingw64/csound64.dll > exports.txt @echo LIBRARY CSOUND64 >> csound64.def @echo EXPORTS >> csound64.def FOR /F "skip=19 tokens=4" %%l in (exports.txt) do @echo %%l >> csound64.def lib /def:csound64.def /out:csound64.lib /machine:x64 ```
a32d1a7a-10a4-43d7-a9c2-5b30f83f1237
{ "language": "Batchfile" }
```batchfile @ECHO off IF NOT "x%1" == "x" GOTO :%1 :luvit IF NOT EXIST lit.exe CALL Make.bat lit ECHO "Building luvit" SET LUVI_APP=app/ SET LUVI_TARGET=luvit.exe lit\luvi-binaries\Windows\luvi.exe SET "LUVI_APP=" SET "LUVI_TARGET=" GOTO :end :lit ECHO "Building lit" git clone --recursive --depth 10 https://github.com/luvit/lit.git lit SET LUVI_APP=lit/ SET LUVI_TARGET=lit.exe lit\luvi-binaries\Windows\luvi.exe SET "LUVI_APP=" SET "LUVI_TARGET=" GOTO :end :test IF NOT EXIST luvit.exe CALL Make.bat luvit SET LUVI_APP=app luvit.exe tests\run.lua SET "LUVI_APP=" GOTO :end :clean IF EXIST luvit.exe DEL /F /Q luvit.exe IF EXIST lit.exe DEL /F /Q lit.exe IF EXIST lit RMDIR /S /Q lit IF EXIST luvi-binaries RMDIR /S /Q luvi-binaries :end ``` Move luvit windows make to new style
```batchfile @ECHO off IF NOT "x%1" == "x" GOTO :%1 :luvit IF NOT EXIST lit.exe CALL Make.bat lit ECHO "Building luvit" lit.exe make GOTO :end :lit ECHO "Building lit" PowerShell -NoProfile -ExecutionPolicy unrestricted -Command "iex ((new-object net.webclient).DownloadString('https://github.com/luvit/lit/raw/0.9.8/web-install.ps1'))" IF EXIST lit.zip DEL /F /Q lit.zip GOTO :end :test IF NOT EXIST luvit.exe CALL Make.bat luvit ECHO "Testing luvit" SET LUVI_APP=. luvit.exe tests\run.lua SET "LUVI_APP=" GOTO :end :clean IF EXIST luvit.exe DEL /F /Q luvit.exe IF EXIST lit.exe DEL /F /Q lit.exe :end ```
cfdc0f4c-7699-47ee-a5e6-4aeaaba6def1
{ "language": "Batchfile" }
```batchfile ``` Add a helper sync script
```batchfile pushd %~dp0 setlocal if "%2" == "" ( set source=%~dp0\Plugins set dest=%1\Plugins shift ) else ( set source=%1\Plugins set dest=%2\Plugins shift shift ) robocopy /mir /l %source% %dest% -xd Binaries -xd Resources -xd Intermediate popd ```
66a2c2fd-8522-4e79-8cc1-cb94f50021f4
{ "language": "Batchfile" }
```batchfile -lint_fatal -parse_fatal sv_file.sv -lint_fatal -parse_fatal vlog_file.v -lint_fatal -parse_fatal vlog05_file.v ``` Fix golden reference in verible lint test
```batchfile --lint_fatal --parse_fatal sv_file.sv --lint_fatal --parse_fatal vlog_file.v --lint_fatal --parse_fatal vlog05_file.v ```
ee1f55a3-cc2c-404c-b7ce-18f1b3d64106
{ "language": "Batchfile" }
```batchfile @echo off rem Optional batch file to quickly build with some defaults. rem Alternatively, this batch file can be invoked passing msbuild parameters, like: build.cmd /v:detailed /t:Rebuild cd %~dp0 SETLOCAL SET CACHED_NUGET=%LocalAppData%\NuGet\NuGet.exe IF EXIST %CACHED_NUGET% goto copynuget echo Downloading latest version of NuGet.exe... IF NOT EXIST %LocalAppData%\NuGet md %LocalAppData%\NuGet @powershell -NoProfile -ExecutionPolicy unrestricted -Command "$ProgressPreference = 'SilentlyContinue'; Invoke-WebRequest 'https://www.nuget.org/nuget.exe' -OutFile '%CACHED_NUGET%'" :copynuget IF EXIST .nuget\nuget.exe goto restore md .nuget copy %CACHED_NUGET% .nuget\nuget.exe > nul .nuget\nuget.exe update -self :restore rem Build script packages have no version in the path, so we install them to .nuget\packages to avoid conflicts with rem solution/project packages. IF NOT EXIST packages.config goto run .nuget\NuGet.exe install packages.config -OutputDirectory .nuget\packages -ExcludeVersion :run rem NOTE: this needs to be a developer command prompt with MSBuild in the path. msbuild build.proj /t:build,test,package /v:normal %1 %2 %3 %4 %5 %6 %7 %8 %9``` Switch to using the latest v3.3 nuget.exe
```batchfile @echo off rem Optional batch file to quickly build with some defaults. rem Alternatively, this batch file can be invoked passing msbuild parameters, like: build.cmd /v:detailed /t:Rebuild cd %~dp0 SETLOCAL SET CACHED_NUGET=%LocalAppData%\NuGet\NuGet.exe IF EXIST %CACHED_NUGET% goto copynuget echo Downloading latest version of NuGet.exe... IF NOT EXIST %LocalAppData%\NuGet md %LocalAppData%\NuGet @powershell -NoProfile -ExecutionPolicy unrestricted -Command "$ProgressPreference = 'SilentlyContinue'; Invoke-WebRequest 'https://dist.nuget.org/win-x86-commandline/v3.3.0/nuget.exe' -OutFile '%CACHED_NUGET%'" :copynuget IF EXIST .nuget\nuget.exe goto restore md .nuget copy %CACHED_NUGET% .nuget\nuget.exe > nul .nuget\nuget.exe update -self :restore rem Build script packages have no version in the path, so we install them to .nuget\packages to avoid conflicts with rem solution/project packages. IF NOT EXIST packages.config goto run .nuget\NuGet.exe install packages.config -OutputDirectory .nuget\packages -ExcludeVersion :run rem NOTE: this needs to be a developer command prompt with MSBuild in the path. msbuild build.proj /t:build,test,package /v:normal %1 %2 %3 %4 %5 %6 %7 %8 %9```
f49f5f87-9cdf-49f2-b52c-73a97422e56b
{ "language": "Batchfile" }
```batchfile @ECHO OFF rem %~dp0 is the expanded pathname of the current script under NT set LOCAL_FOP_HOME= if "%OS%"=="Windows_NT" set LOCAL_FOP_HOME=%~dp0 set LIBDIR=%LOCAL_FOP_HOME%lib set LOCALCLASSPATH=%LOCAL_FOP_HOME%build\fop.jar set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\xml-apis.jar set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\xercesImpl-2.2.1.jar set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\xalan-2.4.1.jar set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\batik.jar set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\avalon-framework-4.1.4.jar set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\commons-io-1.0-dev.jar set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\jimi-1.0.jar set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\jai_core.jar set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\jai_codec.jar java -cp %LOCALCLASSPATH% org.apache.fop.apps.Fop %1 %2 %3 %4 %5 %6 %7 %8 ``` Adjust to version change of Commons IO
```batchfile @ECHO OFF rem %~dp0 is the expanded pathname of the current script under NT set LOCAL_FOP_HOME= if "%OS%"=="Windows_NT" set LOCAL_FOP_HOME=%~dp0 set LIBDIR=%LOCAL_FOP_HOME%lib set LOCALCLASSPATH=%LOCAL_FOP_HOME%build\fop.jar set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\xml-apis.jar set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\xercesImpl-2.2.1.jar set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\xalan-2.4.1.jar set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\batik.jar set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\avalon-framework-4.1.4.jar set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\commons-io-dev-20030703.jar set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\jimi-1.0.jar set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\jai_core.jar set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\jai_codec.jar java -cp %LOCALCLASSPATH% org.apache.fop.apps.Fop %1 %2 %3 %4 %5 %6 %7 %8 ```
f903287e-60ff-410c-9fed-1efe05da3349
{ "language": "Batchfile" }
```batchfile ``` Add script to set environment variables and run tests locally
```batchfile setlocal REM set VALIDATE_MODIFIED_ONLY=false set PARALLEL_DEPLOYMENT_NUMBER=6 set VALIDATION_HOST=http://qst9494f4f5c44dd94d84049.westus.cloudapp.azure.com set VALIDATION_SKIP_VALIDATE=true set VALIDATION_SKIP_DEPLOY=true call mocha endlocal```
3def5ced-6309-4b61-b822-a2abe6e8b646
{ "language": "Batchfile" }
```batchfile thrift-0.9.1.exe -gen java -strict -out src\main\java jdbc.thrift pause``` Fix path in thrift compiler tool
```batchfile thrift-0.9.1.exe -gen java -strict -out ..\src\main\java jdbc.thrift pause ```
5b8b7bc8-39ce-480e-a996-36723b03dc49
{ "language": "Batchfile" }
```batchfile ``` Add batch file to run IronPython tests under TeamCity.
```batchfile @echo off setlocal set _test_root=%DLR_ROOT%\Test set _runner_sln=%_test_root%\TestRunner\TestRunner.sln set _runner=%_test_root%\TestRunner\TestRunner\bin\Debug\TestRunner.exe if not exist "%_runner%" call :build_runner "%_runner%" "%_test_root%\IronPython.tests" /verbose /all /binpath:"%DLR_BIN%" /nunitoutput:"%_test_root%\TestResult.xml" endlocal goto:eof :build_runner msbuild %_runner_sln% goto:eof ```
6759c7f3-efb4-45fb-ac65-27b2ee38deb0
{ "language": "Batchfile" }
```batchfile "%sdkver%" -q -version:v7.0 call setenv /x64 rem install python packages pip install --cache-dir c:/temp nose pip install --cache-dir c:/temp Sphinx pip install --cache-dir c:/temp coverage pip install --cache-dir c:/temp numpy pip install --cache-dir c:/temp pyside pip install --cache-dir c:/temp git+http://github.com/enthought/traits.git#egg=traits pip install --cache-dir c:/temp git+http://github.com/enthought/traitsui.git#egg=traitsui pip install --cache-dir c:/temp git+http://github.com/enthought/apptools.git#egg=apptools pip install --cache-dir c:/temp git+http://github.com/enthought/pyface.git#egg=pyface pip install --cache-dir c:/temp git+http://github.com/enthought/envisage.git#egg=envisage rem install mayavi python setup.py develop ``` Add missing psutil dependency for appveyor
```batchfile "%sdkver%" -q -version:v7.0 call setenv /x64 rem install python packages pip install --cache-dir c:/temp nose pip install --cache-dir c:/temp Sphinx pip install --cache-dir c:/temp coverage pip install --cache-dir c:/temp numpy pip install --cache-dir c:/temp pyside pip install --cache-dir c:/temp psutil pip install --cache-dir c:/temp git+http://github.com/enthought/traits.git#egg=traits pip install --cache-dir c:/temp git+http://github.com/enthought/traitsui.git#egg=traitsui pip install --cache-dir c:/temp git+http://github.com/enthought/apptools.git#egg=apptools pip install --cache-dir c:/temp git+http://github.com/enthought/pyface.git#egg=pyface pip install --cache-dir c:/temp git+http://github.com/enthought/envisage.git#egg=envisage rem install mayavi python setup.py develop ```
20e9e2b9-471e-488c-b998-b66cde1661ad
{ "language": "Batchfile" }
```batchfile call .\packages\psake.4.2.0.1\tools\psake.cmd build.ps1 %* pause``` Build script and nuget now automatically grabs missing dependencies
```batchfile set EnableNuGetPackageRestore=true call .\packages\psake.4.2.0.1\tools\psake.cmd build.ps1 %* pause```
a176df1b-7770-4217-ba63-3e36b5d059c1
{ "language": "Batchfile" }
```batchfile @echo off setlocal enabledelayedexpansion where /q msbuild if "%ERRORLEVEL%" == "0" ( goto :SkipDeveloperSetup ) set DeveloperCommandPrompt=%VS140COMNTOOLS%\VsDevCmd.bat if not exist "%DeveloperCommandPrompt%" ( echo In order to build this repository, you either need 'msbuild' on the path or Visual Studio 2015 installed. echo. echo Visit this page to download: echo. echo https://go.microsoft.com/fwlink/?LinkId=691978^&clcid=0x409 exit /b 1 ) call "%DeveloperCommandPrompt%" || goto :BuildFailed :SkipDeveloperSetup powershell -NoProfile -NoLogo -ExecutionPolicy Bypass -Command "& \"%~dp0build.ps1\" %*; exit $LastExitCode;" exit /b %ERRORLEVEL% :BuildFailed echo Build failed with ERRORLEVEL %ERRORLEVEL% exit /b 1 ``` Build with VS 15 dev tools
```batchfile @echo off setlocal enabledelayedexpansion where /q msbuild if "%ERRORLEVEL%" == "0" ( goto :SkipDeveloperSetup ) set DeveloperCommandPrompt=%VS150COMNTOOLS%\VsDevCmd.bat if not exist "%DeveloperCommandPrompt%" ( echo In order to build this repository, you either need 'msbuild' on the path or Visual Studio 2015 installed. echo. echo Visit this page to download: echo. echo https://go.microsoft.com/fwlink/?LinkId=691978^&clcid=0x409 exit /b 1 ) call "%DeveloperCommandPrompt%" || goto :BuildFailed :SkipDeveloperSetup powershell -NoProfile -NoLogo -ExecutionPolicy Bypass -Command "& \"%~dp0build.ps1\" %*; exit $LastExitCode;" exit /b %ERRORLEVEL% :BuildFailed echo Build failed with ERRORLEVEL %ERRORLEVEL% exit /b 1 ```
0ff9d30c-41fe-4f79-b6c9-e7253059a338
{ "language": "Batchfile" }
```batchfile @echo off call "..\VsDevCmd.cmd" set platform="%1" if "%1" == "AnyCPU" ( set platform="x86" ) set vstest="%VSINSTALLDIR%\Common7\IDE\Extensions\TestPlatform\vstest.console.exe" for /r ..\..\Tests\Magick.NET.Tests\bin %%a in (*.dll) do ( if "%%~nxa"=="Magick.NET.Tests.dll" ( echo "Running tests from: %%~dpnxa" %vstest% %%~dpnxa /platform:%platform% /TestAdapterPath:%%~dpa /logger:AppVeyor if %errorlevel% neq 0 exit /b %errorlevel% ) ) ``` Disable logger because it does not work with this preview version of vstest.console.exe
```batchfile @echo off call "..\VsDevCmd.cmd" set platform="%1" if "%1" == "AnyCPU" ( set platform="x86" ) set vstest="%VSINSTALLDIR%\Common7\IDE\Extensions\TestPlatform\vstest.console.exe" for /r ..\..\Tests\Magick.NET.Tests\bin %%a in (*.dll) do ( if "%%~nxa"=="Magick.NET.Tests.dll" ( echo "Running tests from: %%~dpnxa" %vstest% %%~dpnxa /platform:%platform% /TestAdapterPath:%%~dpa if %errorlevel% neq 0 exit /b %errorlevel% ) ) ```
c64215b0-d60b-4474-8a3a-54a88cfc3d5d
{ "language": "Batchfile" }
```batchfile # © 2013 the Mid Authors under the MIT license. See AUTHORS for the list of authors. T := $(TARG) TARG := cmd/$(T)/$(T) ALL += $(TARG) OFILES := $(OFILES:%=cmd/$(T)/%) ALLO += $(OFILES) LIBHFILES := $(LIBDEPS:%=include/%.h) LIBDEPS := $(shell echo $(LIBDEPS) | awk '{ for(i = 1; i <= NF; i++) printf("lib/%s/%s.a ", $$i, $$i) }') HFILES := $(HFILES:%=cmd/$(T)/%) $(LIBHFILES) $(TARG): $(OFILES) $(LIBDEPS) @echo ld -o $@ @$(LD) -o $@ $^ $(LDFLAGS) $(OFILES): $(HFILES) $(LIBHFILES) ``` Remove that -o; everybody knows what's going on
```batchfile # © 2013 the Mid Authors under the MIT license. See AUTHORS for the list of authors. T := $(TARG) TARG := cmd/$(T)/$(T) ALL += $(TARG) OFILES := $(OFILES:%=cmd/$(T)/%) ALLO += $(OFILES) LIBHFILES := $(LIBDEPS:%=include/%.h) LIBDEPS := $(shell echo $(LIBDEPS) | awk '{ for(i = 1; i <= NF; i++) printf("lib/%s/%s.a ", $$i, $$i) }') HFILES := $(HFILES:%=cmd/$(T)/%) $(LIBHFILES) $(TARG): $(OFILES) $(LIBDEPS) @echo ld $@ @$(LD) -o $@ $^ $(LDFLAGS) $(OFILES): $(HFILES) $(LIBHFILES) ```
21cc66fb-1a3d-4d45-b825-b2362c822100
{ "language": "Batchfile" }
```batchfile SET SOL_DIR=%1 SET ALT_SOL_DIR=..\ IF "%SOL_DIR%" == "" SET SOL_DIR=%ALT_SOL_DIR% IF "%SOL_DIR%" == "*Undefined*" SET SOL_DIR=%ALT_SOL_DIR% echo SOL_DIR is %SOL_DIR% SET PROJ_DIR=%2 SET ALT_PROJ_DIR=%SOL_DIR%\SoundMetrics.Aris.BeamWidths\ IF "%PROJ_DIR%" == "" SET PROJ_DIR=%ALT_PROJ_DIR% IF "%PROJ_DIR%" == "*Undefined*" SET PROJ_DIR=%ALT_PROJ_DIR% echo PROJ_DIR is %PROJ_DIR% IF NOT EXIST "%PROJ_DIR%\generated" MKDIR "%PROJ_DIR%\generated" for %%f in (BeamWidths_ARIS_Telephoto_48 BeamWidths_ARIS_Telephoto_96 BeamWidths_ARIS1800_96 BeamWidths_ARIS1800_1200_48 BeamWidths_ARIS3000_64 BeamWidths_ARIS3000_128) do ^ call %SOL_DIR%\run-fsi.cmd "%PROJ_DIR%ParseBeamWidthDefs.fsx" -- "%SOL_DIR%..\beam-width-metrics\%%f.h" "%PROJ_DIR%generated\%%f.cs" dir "%PROJ_DIR%\generated\" ``` Convert script from Unicode to ANSI
```batchfile SET SOL_DIR=%1 SET ALT_SOL_DIR=..\ IF "%SOL_DIR%" == "" SET SOL_DIR=%ALT_SOL_DIR% IF "%SOL_DIR%" == "*Undefined*" SET SOL_DIR=%ALT_SOL_DIR% echo SOL_DIR is %SOL_DIR% SET PROJ_DIR=%2 SET ALT_PROJ_DIR=%SOL_DIR%\SoundMetrics.Aris.BeamWidths\ IF "%PROJ_DIR%" == "" SET PROJ_DIR=%ALT_PROJ_DIR% IF "%PROJ_DIR%" == "*Undefined*" SET PROJ_DIR=%ALT_PROJ_DIR% echo PROJ_DIR is %PROJ_DIR% IF NOT EXIST "%PROJ_DIR%\generated" MKDIR "%PROJ_DIR%\generated" for %%f in (BeamWidths_ARIS_Telephoto_48 BeamWidths_ARIS_Telephoto_96 BeamWidths_ARIS1800_96 BeamWidths_ARIS1800_1200_48 BeamWidths_ARIS3000_64 BeamWidths_ARIS3000_128) do ^ call %SOL_DIR%\run-fsi.cmd "%PROJ_DIR%ParseBeamWidthDefs.fsx" -- "%SOL_DIR%..\beam-width-metrics\%%f.h" "%PROJ_DIR%generated\%%f.cs" dir "%PROJ_DIR%\generated\" ```
a8f5a255-f0a5-4b5f-8c1d-e222b12fa92a
{ "language": "Batchfile" }
```batchfile :: Build tcplotter command-line utilities using cmake :: Change working directory to archive directory cd "%PKG_NAME%" :: Create build directory cd "src" mkdir build if errorlevel 1 exit 1 cd build if errorlevel 1 exit 1 :: Build with cmake cmake -G "MinGW Makefiles" .. if errorlevel 1 exit 1 cmake --build -DCMAKE_CXX_STANDARD=11 . if errorlevel 1 exit 1 :: Install executables to bin directory cmake --build . --target install --prefix=%PREFIX% if errorlevel 1 exit 1 :: Install tcplotter cd "%SRC_DIR%" $PYTHON -m pip install . -vv``` Fix typo in Windows build
```batchfile :: Build tcplotter command-line utilities using cmake :: Change working directory to archive directory cd "%PKG_NAME%" :: Create build directory cd "src" mkdir build if errorlevel 1 exit 1 cd build if errorlevel 1 exit 1 :: Build with cmake cmake -G "MinGW Makefiles" -DCMAKE_CXX_STANDARD=11 .. if errorlevel 1 exit 1 cmake --build . if errorlevel 1 exit 1 :: Install executables to bin directory cmake --build . --target install --prefix=%PREFIX% if errorlevel 1 exit 1 :: Install tcplotter cd "%SRC_DIR%" $PYTHON -m pip install . -vv```
0de0b1db-a185-4ae7-9d80-cecfdce02b5c
{ "language": "Batchfile" }
```batchfile @ECHO OFF if not "%1" == "" goto continue for %%i in (imaginary) do for %%j in (yca\%%i\*.yca) do call %0 %%j goto end :continue echo Processing %1 firstify %1 -himlv > %1.txt 2>&1 :end ``` Add support for specifying what benchmark suite you want to run
```batchfile @ECHO OFF if "%1" == "goto" shift && goto continue REM If they enter nothing, do all the benchmarks set def=imaginary,spectral,real if not "%1" == "" set def=%1 for %%i in (%def%) do for %%j in (yca\%%i\*.yca) do call %0 goto %%j goto end :continue echo Processing %1 firstify %1 -himlv > %1.txt 2>&1 :end ```
c85315ea-00aa-4454-984d-6374f9aa4263
{ "language": "Batchfile" }
```batchfile REM QuantConnect Lean Engine -- Python Build Script. del Python.Runtime.dll REM Python Compile the Algorithm with all the files in current directory nPython -m compileall -lq . REM Copy to the Lean Algorithm Project copy *.pyc ..\..\..\Launcher\bin\Debug >NUL copy *.pyc ..\..\..\Launcher\bin\Release >NUL copy *.pyc ..\..\..\Tests\bin\Debug >NUL``` Remove the byte order mark
```batchfile REM QuantConnect Lean Engine -- Python Build Script. del Python.Runtime.dll REM Python Compile the Algorithm with all the files in current directory nPython -m compileall -lq . REM Copy to the Lean Algorithm Project copy *.pyc ..\..\..\Launcher\bin\Debug >NUL copy *.pyc ..\..\..\Launcher\bin\Release >NUL copy *.pyc ..\..\..\Tests\bin\Debug >NUL```
fe9813dc-3f40-4570-b699-02fcf7be781d
{ "language": "Batchfile" }
```batchfile @echo off Rem Generate visual studio project files Rem This file is a part of llbc library echo Visual Studio solution and project files generate tool. echo For now supported Visual Studio versions: echo vs2005 echo vs2008 echo vs2010 echo vs2012 echo vs2013 echo vs2015 set /p choose=Please input: cd tools\premake && premake5_windows.exe %choose% if errorlevel 1 ( echo Failed to generate Visual Studio solution and project files, error: %errorlevel% pause ) else ( echo Succcess to generate Visual Studio solution and project files echo Solution file path: build/%choose%/llbc_%choose%.sln echo Press any key to open target directory... pause >nul explorer ..\..\build\%choose% ) ``` Delete pause command after generated visual studio solution
```batchfile @echo off Rem Generate visual studio project files Rem This file is a part of llbc library echo Visual Studio solution and project files generate tool. echo For now supported Visual Studio versions: echo vs2005 echo vs2008 echo vs2010 echo vs2012 echo vs2013 echo vs2015 set /p choose=Please input: cd tools\premake && premake5_windows.exe %choose% if errorlevel 1 ( echo Failed to generate Visual Studio solution and project files, error: %errorlevel% pause ) else ( echo Succcess to generate Visual Studio solution and project files echo Solution file path: build/%choose%/llbc_%choose%.sln explorer ..\..\build\%choose% ) ```
72e15dc4-adca-4d1f-a4e9-bd87f900ba92
{ "language": "Batchfile" }
```batchfile @"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin" choco install vagrant chefdk virtualbox visualstudiocode 7zip googlechrome notepadplusplus.install firefox git.install tortoisegit -y refreshenv vagrant plugin install vagrant-winrm chef gem install kitchen-all vagrant box add mwrock/Windows2016 --provider virtualbox vagrant box add mwrock/Windows2012R2 --provider virtualbox vagrant box add jacqinthebox/windowsserver2016core --provider virtualbox code --install-extension ms-vscode.powershell code --install-extension msazurermtools.azurerm-vscode-tools code --install-extension HookyQR.beautify code --install-extension Pendrica.chef code --install-extension ms-vscode.PeterJausovec.vscode-docker code --install-extension alefragnani.project-manager code --install-extension Borke.puppet code --install-extension mauve.terraform code --install-extension bbenoist.vagrant code --list-extensions mkdir c:\github cd c:\github git clone https://github.com/iaingblack/Automation.git ``` Install seems to stop after the kitch gem install. Putting at end
```batchfile @"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin" choco install vagrant chefdk virtualbox visualstudiocode 7zip googlechrome notepadplusplus.install firefox git.install tortoisegit -y refreshenv vagrant plugin install vagrant-winrm vagrant box add mwrock/Windows2016 --provider virtualbox vagrant box add mwrock/Windows2012R2 --provider virtualbox vagrant box add jacqinthebox/windowsserver2016core --provider virtualbox code --install-extension ms-vscode.powershell code --install-extension msazurermtools.azurerm-vscode-tools code --install-extension HookyQR.beautify code --install-extension Pendrica.chef code --install-extension ms-vscode.PeterJausovec.vscode-docker code --install-extension alefragnani.project-manager code --install-extension Borke.puppet code --install-extension mauve.terraform code --install-extension bbenoist.vagrant code --list-extensions mkdir c:\github cd c:\github git clone https://github.com/iaingblack/Automation.git chef gem install kitchen-all ```
9422c4f8-f60e-4e8b-8efa-4f32ecefe5ba
{ "language": "Batchfile" }
```batchfile @echo off if exist %1\web.config ( set message=Warning: We detected a Web.config in your app. This probably means that you want to use the hwc-buildpack. If you really want to use the binary-buildpack, you must specify a start command. ) else ( set message=Error: no start command specified during staging or launch ) echo --- echo default_process_types: echo web: "cmd /c \"echo %message% ^>^&2 ^& exit 1\"" ``` Update warning message with clear buildpack names
```batchfile @echo off if exist %1\web.config ( set message=Warning: We detected a Web.config in your app. This probably means that you want to use the HWC Buildpack (run cf buildpacks for exact buildpack name). If you really want to use the Binary Buildpack, you must specify a start command. ) else ( set message=Error: no start command specified during staging or launch ) echo --- echo default_process_types: echo web: "cmd /c \"echo %message% ^>^&2 ^& exit 1\"" ```
8d0e33b1-6e9a-4f13-966d-f63fbdad8244
{ "language": "Batchfile" }
```batchfile REM Installing Chocolatey @powershell -NoProfile -ExecutionPolicy unrestricted -Command "iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))" && SET PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin REM Installing virtualbox choco install virtualbox -y REM Killing the default adapter and DHCP server to avoid network issues down the road VBoxManage dhcpserver remove --netname "HostInterfaceNetworking-VirtualBox Host-Only Ethernet Adapter" VBoxManage hostonlyif remove "VirtualBox Host-Only Ethernet Adapter" REM Installing vagrant choco install vagrant -y ``` Fix path to VirtualBox in PATH on Windows
```batchfile REM Installing Chocolatey @powershell -NoProfile -ExecutionPolicy unrestricted -Command "iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))" && SET PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin REM Installing virtualbox choco install virtualbox -y REM Killing the default adapter and DHCP server to avoid network issues down the road "C:\Program Files\Oracle\VirtualBox\VBoxManage" dhcpserver remove --netname "HostInterfaceNetworking-VirtualBox Host-Only Ethernet Adapter" "C:\Program Files\Oracle\VirtualBox\VBoxManage" hostonlyif remove "VirtualBox Host-Only Ethernet Adapter" REM Installing vagrant choco install vagrant -y ```
d915643c-3987-4daf-9a18-eecac7fb5e85
{ "language": "Batchfile" }
```batchfile @ECHO off IF NOT "x%1" == "x" GOTO :%1 GOTO :tiny :large ECHO "Building large" cmake -DWithOpenSSL=ON -DWithSharedOpenSSL=OFF -H. -Bbuild GOTO :build :tiny ECHO "Building tiny" cmake -H. -Bbuild GOTO :build :build cmake --build build --config Release -- /maxcpucount COPY build\Release\luvi.exe . GOTO :end :test SET LUVI_APP=samples\test.app luvi.exe SET LUVI_TARGET=test.exe luvi.exe SET "LUVI_APP=" SET "LUVI_TARGET=" test.exe DEL /Q test.exe GOTO :end :clean IF EXIST build RMDIR /S /Q build IF EXIST luvi.exe DEL /F /Q luvi.exe GOTO :end :publish ECHO "Building all versions" git submodule update --init --recursive CALL make.bat clean CALL make.bat tiny CALL make.bat test COPY build\Release\luvi.exe luvi-binaries\Windows\luvi-tiny.exe CALL make.bat clean CALL make.bat large CALL make.bat test COPY build\Release\luvi.exe luvi-binaries\Windows\luvi.exe CD luvi-binaries git pull git add Windows git commit git push CD .. :end ``` Enable zlib in the Windows build
```batchfile @ECHO off IF NOT "x%1" == "x" GOTO :%1 GOTO :tiny :large ECHO "Building large" cmake -DWithOpenSSL=ON -DWithSharedOpenSSL=OFF -DWithZLIB=ON -DWithSharedZLIB=OFF -H. -Bbuild GOTO :build :tiny ECHO "Building tiny" cmake -H. -Bbuild GOTO :build :build cmake --build build --config Release -- /maxcpucount COPY build\Release\luvi.exe . GOTO :end :test SET LUVI_APP=samples\test.app luvi.exe SET LUVI_TARGET=test.exe luvi.exe SET "LUVI_APP=" SET "LUVI_TARGET=" test.exe DEL /Q test.exe GOTO :end :clean IF EXIST build RMDIR /S /Q build IF EXIST luvi.exe DEL /F /Q luvi.exe GOTO :end :publish ECHO "Building all versions" git submodule update --init --recursive CALL make.bat clean CALL make.bat tiny CALL make.bat test COPY build\Release\luvi.exe luvi-binaries\Windows\luvi-tiny.exe CALL make.bat clean CALL make.bat large CALL make.bat test COPY build\Release\luvi.exe luvi-binaries\Windows\luvi.exe CD luvi-binaries git pull git add Windows git commit git push CD .. :end ```
19b772cc-f88d-4c21-ab17-123d08617b03
{ "language": "Batchfile" }
```batchfile "%R%" CMD INSTALL --build . IF %ERRORLEVEL% NEQ 0 exit 1 ``` Test set CXX14 for win build
```batchfile %SRC_DIR%>set "CXX_STD=CXX14" %SRC_DIR%>set "CXX14STD=-std=c++1y" "%R%" CMD INSTALL --build . IF %ERRORLEVEL% NEQ 0 exit 1 ```
d6fda0d6-9b4c-4949-9894-a8aada4e9800
{ "language": "Batchfile" }
```batchfile @echo off @rem Change here the default JVM options @rem SET JEKA_OPTS == "" @rem set terminal encoding to utf-8 chcp 65001 > nul if not "%JEKA_JDK%" == "" set "JAVA_HOME=%JEKA_JDK%" if "%JAVA_HOME%" == "" set "JAVA_CMD=java" if not "%JAVA_HOME%" == "" set "JAVA_CMD=%JAVA_HOME%\bin\java" if exist %cd%\jeka\boot set "LOCAL_BUILD_DIR=.\jeka\boot\*;" if "%JEKA_HOME%" == "" set "JEKA_HOME=%~dp0" set "COMMAND="%JAVA_CMD%" %JEKA_OPTS% -cp "%LOCAL_BUILD_DIR%%JEKA_HOME%\dev.jeka.jeka-core.jar" dev.jeka.core.tool.Main %*" if not "%JEKA_ECHO_CMD%" == "" ( @echo on echo %COMMAND% @echo off) %COMMAND% ``` Check the Jeka jar is actually present at JEKA_HOME
```batchfile @echo off @rem Change here the default JVM options @rem SET JEKA_OPTS == "" @rem set terminal encoding to utf-8 chcp 65001 > nul if not "%JEKA_JDK%" == "" set "JAVA_HOME=%JEKA_JDK%" if "%JAVA_HOME%" == "" set "JAVA_CMD=java" if not "%JAVA_HOME%" == "" set "JAVA_CMD=%JAVA_HOME%\bin\java" if exist %cd%\jeka\boot set "LOCAL_BUILD_DIR=.\jeka\boot\*;" if "%JEKA_HOME%" == "" set "JEKA_HOME=%~dp0" rem Ensure that the Jeka jar is actually in JEKA_HOME if not exist %JEKA_HOME%\dev.jeka.jeka-core.jar ( echo Could not find "dev.jeka.jeka-core.jar" in "%JEKA_HOME%" echo Please ensure JEKA_HOME points to the correct directory echo or that the distrib.zip file has been extracted fully rem Pause before exiting so the user can read the message first pause exit /b 1 ) set "COMMAND="%JAVA_CMD%" %JEKA_OPTS% -cp "%LOCAL_BUILD_DIR%%JEKA_HOME%\dev.jeka.jeka-core.jar" dev.jeka.core.tool.Main %*" if not "%JEKA_ECHO_CMD%" == "" ( @echo on echo %COMMAND% @echo off) %COMMAND% ```
5e985d6e-b654-4c88-842d-2bd92fa7dbf5
{ "language": "Batchfile" }
```batchfile @echo off rem config.bat: master configuration file for the batch files rem Running this command directly has no effect, rem but you can tweak the settings to your liking. rem Set the amount of RAM available to the command line tools. set JFLAGS=-Xmx512m rem Set the NO_UPDATE_CHECK flag to skip the update check. rem NO_UPDATE_CHECK=1 rem If you are behind a proxy server, the host name and port must be set. set PROXY_HOST= set PROXY_PORT= rem If your CLASSPATH already includes the needed classes, rem you can set the SCIFIO_DEVEL environment variable to rem disable the required JAR library checks. rem SCIFIO_DEVEL=1 ``` Add missing set commands to commented-out code
```batchfile @echo off rem config.bat: master configuration file for the batch files rem Running this command directly has no effect, rem but you can tweak the settings to your liking. rem Set the amount of RAM available to the command line tools. set JFLAGS=-Xmx512m rem Set the NO_UPDATE_CHECK flag to skip the update check. rem set NO_UPDATE_CHECK=1 rem If you are behind a proxy server, the host name and port must be set. set PROXY_HOST= set PROXY_PORT= rem If your CLASSPATH already includes the needed classes, rem you can set the SCIFIO_DEVEL environment variable to rem disable the required JAR library checks. rem set SCIFIO_DEVEL=1 ```
abcdbe3f-c1c7-4a21-8d2d-009cf89c725a
{ "language": "Batchfile" }
```batchfile ``` Add batch file for project creation
```batchfile @echo off echo =========================================================================== echo 1. Create bower.json, package.json echo 2. Download gulpfile.js echo 3. Make directories echo. pause && npm init && bower init && ^ npm install gulp gulp-sass gulp-jade gulp-shell gulp-coffee && ^ curl -O https://raw.githubusercontent.com/PixxxeL/regular-gulpfile/master/gulpfile.js && ^ mkdir jade html coffee js sass css img exit 0 ```
5769072f-5fc6-485b-ae94-aa623c4a81e5
{ "language": "Batchfile" }
```batchfile @echo off SET STATUS=, :START: python.exe mcedit.py ECHO. ECHO ^|-----------------^| ECHO ^|Mcedit Terminated^| ECHO ^|-----------------^| ECHO. SET /P K=Press R or Enter to restart MCEdit%STATUS% any other key to exit: IF /I %K%==R GOTO CLEAR GOTO EXIT :CLEAR: CLS SET STATUS= again, GOTO START :EXIT:``` Improve bat not accepting enter first loop
```batchfile @echo off SET STATUS=, :START: python.exe mcedit.py ECHO. ECHO ^|-----------------^| ECHO ^|Mcedit Terminated^| ECHO ^|-----------------^| ECHO. SET K==R SET /P K=Press R or Enter to restart MCEdit%STATUS% any other key to exit: IF /I %K%==R GOTO CLEAR GOTO EXIT :CLEAR: CLS SET STATUS= again, GOTO START :EXIT:```
65032b4d-cfcf-492a-8b5f-397730d91608
{ "language": "Batchfile" }
```batchfile if not exist .git exit 1 git describe if errorlevel 1 exit 1 for /f "delims=" %%i in ('git describe') do set gitdesc=%%i if errorlevel 1 exit 1 echo "%gitdesc%" if not "%gitdesc%"=="1.8.1" exit 1 set PYTHONPATH=. python -c "import conda_build; assert conda_build.__version__ == '1.8.1', conda_build.__version__" if errorlevel 1 exit 1 ``` Add git status debug output to test
```batchfile if not exist .git exit 1 git describe if errorlevel 1 exit 1 for /f "delims=" %%i in ('git describe') do set gitdesc=%%i if errorlevel 1 exit 1 echo "%gitdesc%" if not "%gitdesc%"=="1.8.1" exit 1 git status if errorlevel 1 exit 1 set PYTHONPATH=. python -c "import conda_build; assert conda_build.__version__ == '1.8.1', conda_build.__version__" if errorlevel 1 exit 1 ```
a4447d7f-eb27-497b-b1ae-5d80512c659c
{ "language": "Batchfile" }
```batchfile powershell -Command "(gc .build/projects/vs2015/unit_test.vcxproj) -replace '<ExceptionHandling>false', '<ExceptionHandling>Sync' | Out-File -encoding UTF8 .build/projects/vs2015/unit_test.vcxproj" powershell -Command "(gc .build/projects/vs2015/unit_test.vcxproj) -replace '<RuntimeTypeInfo>false', '<RuntimeTypeInfo>true' | Out-File -encoding UTF8 .build/projects/vs2015/unit_test.vcxproj"``` Add toolset as commandline parameter
```batchfile powershell -Command "(gc .build/projects/%1/unit_test.vcxproj) -replace '<ExceptionHandling>false', '<ExceptionHandling>Sync' | Out-File -encoding UTF8 .build/projects/%1/unit_test.vcxproj" powershell -Command "(gc .build/projects/%1/unit_test.vcxproj) -replace '<RuntimeTypeInfo>false', '<RuntimeTypeInfo>true' | Out-File -encoding UTF8 .build/projects/%1/unit_test.vcxproj"```
4c106b8e-5d1d-4938-9212-ebf8445c17f6
{ "language": "Batchfile" }
```batchfile @echo off if exist src\fscanner.l goto dir_okay echo !!!! Must run this batch file from the main source directory! exit :dir_okay echo ---- Start by patching the ylwrap script to avoid problems echo with "ln -s": patch -p1 -i contrib/msdos/ylwrap.pat echo ---- Now configure and make it. echo -- NOTE --: this assumes you have pdcurses installed! echo -- NOTE --: Will be using '-f' mode of flex, for faster scanning bash configure make CURSES_LIBS=-lpdcurses LFLAGS="-f8B" echo ---- You may now call "make install", if desired. echo -- DONE -- ``` Fix pathname of patch file
```batchfile @echo off if exist src\fscanner.l goto dir_okay echo !!!! Must run this batch file from the main source directory! exit :dir_okay echo ---- Start by patching the ylwrap script to avoid problems echo with "ln -s": patch -p1 -i packages/MSDOS/ylwrap.pat echo ---- Now configure and make it. echo -- NOTE --: this assumes you have pdcurses installed! echo -- NOTE --: Will be using '-f' mode of flex, for faster scanning bash configure make CURSES_LIBS=-lpdcurses LFLAGS="-f8B" echo ---- You may now call "make install", if desired. echo -- DONE -- ```
b920233b-a06e-48bb-a220-4f0e3f07cfc5
{ "language": "Batchfile" }
```batchfile @call set_vars.bat copy %QTPATH%\Qt5Charts.dll %ROOTPATH%\release\ copy %QTPATH%\Qt5Core.dll %ROOTPATH%\release\ copy %QTPATH%\Qt5Gui.dll %ROOTPATH%\release\ copy %QTPATH%\Qt5Network.dll %ROOTPATH%\release\ copy %QTPATH%\Qt5Widgets.dll %ROOTPATH%\release\ copy %QTPATH%\libgcc_s_dw2-1.dll %ROOTPATH%\release\ copy %QTPATH%\libstdc++-6.dll %ROOTPATH%\release\ copy %QTPATH%\libgcc_s_dw2-1.dll %ROOTPATH%\release\ copy %QTPATH%\libwinpthread-1.dll %ROOTPATH%\release\ @if not "%RUNALL%"=="1" pause ``` Add other dlls to copy for release. Fix libstc++-6.dll not being found as requires quotations
```batchfile @call set_vars.bat copy %QTDIR%\5.8\mingw53_32\Qt5Charts.dll %ROOTPATH%\release\ copy %QTDIR%\5.8\mingw53_32\Qt5Core.dll %ROOTPATH%\release\ copy %QTDIR%\5.8\mingw53_32\Qt5Gui.dll %ROOTPATH%\release\ copy %QTDIR%\5.8\mingw53_32\Qt5Network.dll %ROOTPATH%\release\ copy %QTDIR%\5.8\mingw53_32\Qt5Widgets.dll %ROOTPATH%\release\ copy %QTDIR%\5.8\mingw53_32\bin\libgcc_s_dw2-1.dll %ROOTPATH%\release\ copy "%QTDIR%\5.8\mingw53_32\bin\libstdc++-6.dll" %ROOTPATH%\release\ copy %QTDIR%\5.8\mingw53_32\bin\libwinpthread-1.dll %ROOTPATH%\release\ copy %QTDIR%\5.8\mingw53_32\plugins\iconengines\qsvgicon.dll %ROOTPATH%\release\iconengines\qsvgicon.dll copy %QTDIR%\5.8\mingw53_32\plugins\imageformats\qsvg.dll %ROOTPATH%\release\imageformats\qsvg.dll copy %QTDIR%\5.8\mingw53_32\plugins\platforms\qwindows.dll %ROOTPATH%\release\platforms\qwindows.dll @if not "%RUNALL%"=="1" pause ```
a10af095-b1b2-4dec-aef2-b010168eb238
{ "language": "Batchfile" }
```batchfile @echo off ..\..\.nuget\NuGet.exe pack ..\Q42.RijksmuseumApi.nuspec -Prop Configuration=Release``` Create NuGet package based on csproj instead of nuspec
```batchfile @echo off ..\..\.nuget\NuGet.exe pack ..\Q42.RijksmuseumApi.csproj -Prop Configuration=Release```
3f338510-ce41-4bb5-aaac-0a158dd7f91a
{ "language": "Batchfile" }
```batchfile ``` Add a Stack build script for Windows
```batchfile @rem Change the current directory to the one containing this script @cd %~dp0 @rem Build Hadrian and dependencies @stack build @rem Run Hadrian in GHC top directory forwarding additional user arguments @stack exec hadrian -- --lint --directory ".." %* ```
1e209214-de46-41a7-9beb-498cf2146d8b
{ "language": "Batchfile" }
```batchfile @echo off rem Repack the installer contents into a ZIP archive. mkdir .\unpacked msiexec /a CormanLispInstaller.msi /qn TARGETDIR="%~dp0unpacked" del CormanLispBinaries.zip powershell Compress-Archive -Path \"%~dp0unpacked\Corman Lisp\" -DestinationPath \"%~dp0CormanLispBinaries.zip\" rd /s /q .\unpacked ``` Copy the necessary Visual C++ Runtime files into the ZIP archive.
```batchfile @echo off rem Repack the installer contents into a ZIP archive. mkdir .\unpacked msiexec /a CormanLispInstaller.msi /qn TARGETDIR="%~dp0unpacked" move ".\unpacked\System\*" ".\unpacked\Corman Lisp\" del CormanLispBinaries.zip rem rem Visual C++ Runtime DLL files and Universal CRT files Local Deployment rem copy "%VS140COMNTOOLS%..\..\VC\redist\x86\Microsoft.VC140.CRT\*.dll" ".\unpacked\Corman Lisp\" rem copy "%VS140COMNTOOLS%..\..\VC\redist\x86\Microsoft.VC140.MFC\*.dll" ".\unpacked\Corman Lisp\" rem copy "%VS140COMNTOOLS%..\..\VC\redist\x86\Microsoft.VC140.MFCLOC\*.dll" ".\unpacked\Corman Lisp\" rem rem Visual Studio 2015 only rem if exist "%SystemRoot%\SysWOW64\" ( rem copy "%SystemRoot%\SysWOW64\mfc140.dll" ".\unpacked\Corman Lisp\" rem copy "%SystemRoot%\SysWOW64\mfcm140.dll" ".\unpacked\Corman Lisp\" rem ) else ( rem copy "%SystemRoot%\System32\mfc140.dll" ".\unpacked\Corman Lisp\" rem copy "%SystemRoot%\System32\mfcm140.dll" ".\unpacked\Corman Lisp\" rem ) rem rem Universal C Runtime rem if exist "%ProgramFiles(x86)%\" ( rem copy "%ProgramFiles(x86)%\Windows Kits\10\Redist\ucrt\DLLs\x86\*.dll" ".\unpacked\Corman Lisp\" rem ) else ( rem copy "%ProgramFiles%\Windows Kits\10\Redist\ucrt\DLLs\x86\*.dll" ".\unpacked\Corman Lisp\" rem ) powershell Compress-Archive -Path \"%~dp0unpacked\Corman Lisp\" -DestinationPath \"%~dp0CormanLispBinaries.zip\" rd /s /q .\unpacked ```
96831ac7-b06e-4f62-a8a8-061794760855
{ "language": "Batchfile" }
```batchfile @echo off set drive=%~dp0 set drivep=%drive% set PERLVER=5.20.3.1 set PERLDIR=%drivep%\%ARCH%\perl set RELVERSION=3.3.0_01 if #%drive:~-1%# == #\# set drivep=%drive:~0,-1% set PATH=%PERLDIR%\perl\site\bin;%PERLDIR%\perl\bin;%PERLDIR%\c\bin;%PATH% ``` Update perl module version to be built
```batchfile @echo off set drive=%~dp0 set drivep=%drive% set PERLVER=5.20.3.1 set PERLDIR=%drivep%\%ARCH%\perl set RELVERSION=3.3.0_02 if #%drive:~-1%# == #\# set drivep=%drive:~0,-1% set PATH=%PERLDIR%\perl\site\bin;%PERLDIR%\perl\bin;%PERLDIR%\c\bin;%PATH% ```
202c90bd-9663-4cc9-89f2-285957efecb0
{ "language": "Batchfile" }
```batchfile @ECHO off @SET LIT_VERSION=1.1.4 IF NOT "x%1" == "x" GOTO :%1 :luvit IF NOT EXIST lit.exe CALL make.bat lit ECHO "Building luvit" lit.exe make GOTO :end :lit ECHO "Building lit" PowerShell -NoProfile -ExecutionPolicy unrestricted -Command "iex ((new-object net.webclient).DownloadString('https://github.com/luvit/lit/raw/%LIT_VERSION%/get-lit.ps1'))" GOTO :end :test IF NOT EXIST luvit.exe CALL make.bat luvit ECHO "Testing luvit" SET LUVI_APP=. luvit.exe tests\run.lua SET "LUVI_APP=" GOTO :end :clean IF EXIST luvit.exe DEL /F /Q luvit.exe IF EXIST lit.exe DEL /F /Q lit.exe :end ``` Update lit version to fix windows build
```batchfile @ECHO off @SET LIT_VERSION=1.1.8 IF NOT "x%1" == "x" GOTO :%1 :luvit IF NOT EXIST lit.exe CALL make.bat lit ECHO "Building luvit" lit.exe make GOTO :end :lit ECHO "Building lit" PowerShell -NoProfile -ExecutionPolicy unrestricted -Command "iex ((new-object net.webclient).DownloadString('https://github.com/luvit/lit/raw/%LIT_VERSION%/get-lit.ps1'))" GOTO :end :test IF NOT EXIST luvit.exe CALL make.bat luvit ECHO "Testing luvit" SET LUVI_APP=. luvit.exe tests\run.lua SET "LUVI_APP=" GOTO :end :clean IF EXIST luvit.exe DEL /F /Q luvit.exe IF EXIST lit.exe DEL /F /Q lit.exe :end ```
863f8b8c-b75d-4c80-842f-e00047ed7abc
{ "language": "Batchfile" }
```batchfile @echo off chcp 65001 > NUL set PIPENV_VENV_IN_PROJECT=1 python --version > NUL 2>&1 if %ERRORLEVEL% neq 0 ( echo Cannot find Python executable, make sure it is installed and added to your PATH. pause exit /B 0 ) python -c "import pipenv" > NUL 2>&1 if %ERRORLEVEL% neq 0 ( python -m pip install --user pipenv ) pipenv --version > NUL 2>&1 if %ERRORLEVEL% neq 0 ( echo Adding pipenv to PATH... for /F %%p IN ('python -m site --user-site') do set path_pipenv=%%p set PATH=%PATH%;%path_pipenv:site-packages=Scripts% ) if not exist ".venv" ( pipenv --bare install ) pipenv run python3 -c "exit(__import__('discord').opus.is_loaded())" > NUL 2>&1 if %ERRORLEVEL% equ 0 ( echo Cannot find libopus on your system, make sure it is installed. pause exit /B 0 ) del /Q panda.log pipenv run python panda.py pause``` Fix pipenv addition to PATH when PATH contains parenthsis.
```batchfile @echo off SETLOCAL EnableDelayedExpansion chcp 65001 > NUL set PIPENV_VENV_IN_PROJECT=1 python --version > NUL 2>&1 if %ERRORLEVEL% neq 0 ( echo Cannot find Python executable, make sure it is installed and added to your PATH. pause exit /B 0 ) python -c "import pipenv" > NUL 2>&1 if %ERRORLEVEL% neq 0 ( python -m pip install --user pipenv ) pipenv --version > NUL 2>&1 if %ERRORLEVEL% neq 0 ( echo Adding pipenv to PATH... for /F %%p IN ('python -m site --user-site') do set path_pipenv=%%p set PATH=!PATH!;!path_pipenv:site-packages=Scripts! ) if not exist ".venv" ( pipenv --bare install ) pipenv run python3 -c "exit(__import__('discord').opus.is_loaded())" > NUL 2>&1 if %ERRORLEVEL% equ 0 ( echo Cannot find libopus on your system, make sure it is installed. pause exit /B 0 ) del /Q panda.log pipenv run python panda.py pause```
ee244dfa-6144-4fdc-8c9e-7f3fb5769c39
{ "language": "Batchfile" }
```batchfile @echo off setlocal ``` Add the logic for the Windows script
```batchfile @echo off setlocal set "output=nul" set "times=1" :help :parseArgs if "%~1" == "" goto main if /i "%~1" == "-?" goto help if /i "%~1" == "-h" goto help if /i "%~1" == "--help" goto help if /i "%~1" == "-t" ( set "times=%~2" shift ) if /i "%~1" == "--times" ( set "times=%~2" shift ) if /i "%~1" == "-o" ( set "output=%~2" shift ) if /i "%~1" == "--output" ( set "output=%~2" shift ) shift :curl @powershell -NoProfile "iwr %~1 -OutFile %~2" 2> nul goto :eof :downloadPackage set "url=https://www.nuget.org/api/v2/package/%~1" call :curl "%url%" %2 goto :eof :main for /l %%i in (1, 1, %times%) do ( call :downloadPackage "%package%" "%output%" ) ```
3c1445f2-d46e-4a68-8258-22d2f130092b
{ "language": "Batchfile" }
```batchfile scons withMSVC=1 custom=custom-msvc.py useJack=0 buildRelease=1 buildCsoundVST=1 buildvst4cs=1 buildInterfaces=1 buildCsoundAC=1 buildJavaWrapper=1 useOSC=1 buildPythonOpcodes=1 buildLoris=0 buildStkOpcodes=1 buildWinsound=1 noFLTKThreads=0 noDebug=1 buildPDClass=1 buildVirtual=1 buildCsound5GUI=1 buildTclcsound=1 buildLua=1 useDouble=1 dynamicCsoundLibrary=1 buildCSEditor=1 %1 %2 %3 %4 ``` Use MSVC import lib for MSVC DLL for Fluidsynth in MSVC build.
```batchfile scons withMSVC=1 custom=custom-msvc.py useJack=0 buildRelease=1 buildCsoundVST=1 buildvst4cs=1 buildInterfaces=1 buildCsoundAC=1 buildJavaWrapper=1 useOSC=0 buildPythonOpcodes=1 buildLoris=0 buildStkOpcodes=1 buildWinsound=1 noFLTKThreads=0 noDebug=1 buildPDClass=0 buildVirtual=1 buildCsound5GUI=1 buildTclcsound=1 buildLua=1 useDouble=1 dynamicCsoundLibrary=1 buildCSEditor=1 %1 %2 %3 %4 ```
387848ad-e493-42f7-966f-b21f99388dd0
{ "language": "Batchfile" }
```batchfile ``` Add build script for windows
```batchfile set CONDA_LOC=C:\Users\mcraig\AppData\Local\Continuum\Anaconda\Scripts\ set CMD_IN_ENV=cmd /E:ON /V:ON /C %CONDA_LOC%obvci_appveyor_python_build_env.cmd conda config --add channels astropy python affiliate-builder\build_recipes.py for /F "tokens=*" %%A in (.\build_order.txt) do ( cd bdist_conda\%%A python setup.py bdist_conda cd ..\.. ) ```
54fa5c2d-e4db-49f3-bacf-5de9a0819f96
{ "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 (ase latexcodec pybtex spglib pyhull pymatgen pymatgen-db seekpath) DO conda build --user matsci %%A cd .. ``` Add skip existing to appveyor.
```batchfile cd conda-skeletons conda install conda-build anaconda-client conda config --add channels matsci conda config --set anaconda_upload yes FOR %%A IN (ase latexcodec pybtex spglib pyhull pymatgen pymatgen-db seekpath) DO conda build --skip-existing --user matsci %%A cd .. ```
444eff10-6226-40cc-adb3-b8655ba9b83f
{ "language": "Batchfile" }
```batchfile @echo off call "%~dp0\SetVsEnv.bat" x86 for /r "%~dp0\..\" %%i in (*.sys) do "signtool.exe" sign /f "%~dp0\VirtIOTestCert.pfx" "%%i" for /r "%~dp0\..\" %%i in (*.cat) do "signtool.exe" sign /f "%~dp0\VirtIOTestCert.pfx" "%%i" ``` Update command line for new version of signtool
```batchfile @echo off call "%~dp0\SetVsEnv.bat" x86 for /r "%~dp0\..\" %%i in (*.sys) do "signtool.exe" sign /fd SHA256 /f "%~dp0\VirtIOTestCert.pfx" "%%i" for /r "%~dp0\..\" %%i in (*.cat) do "signtool.exe" sign /fd SHA256 /f "%~dp0\VirtIOTestCert.pfx" "%%i" ```
c120fca5-bc16-4b92-bb06-1497a3bb4ea4
{ "language": "Batchfile" }
```batchfile @echo off setlocal title Build slave if not exist %~dp0..\..\depot_tools\. ( echo You must put a copy of depot_tools in %~dp0..\depot_tools echo Did you read the instructions carefully?? goto :EOF ) set PATH=%~dp0..\..\depot_tools;%PATH% :: Running it once will make sure svn and python were downloaded. call gclient.bat > nul :: run_slave.py will overwrite the PATH and PYTHONPATH environment variables. python %~dp0\run_slave.py --no_save -y buildbot.tac %* ``` Fix auto-sync on start for Windows.
```batchfile @echo off setlocal title Build slave if not exist %~dp0..\..\depot_tools\. ( echo You must put a copy of depot_tools in %~dp0..\depot_tools echo Did you read the instructions carefully?? goto :EOF ) set PATH=%~dp0..\..\depot_tools;%PATH% cd /d %~dp0 :: Running it once will make sure svn and python were downloaded. call gclient.bat > nul :: run_slave.py will overwrite the PATH and PYTHONPATH environment variables. python %~dp0\run_slave.py --no_save -y buildbot.tac %* ```
4dda86c4-5ece-44b7-84bc-7d52a2530c7d
{ "language": "Batchfile" }
```batchfile echo Current build setup MSVS="%MSVS%" PLATFORM="%PLATFORM%" TARGET="%TARGET%" if %MSVS% == 2013 call "%ProgramFiles(x86)%\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" %PLATFORM% 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% rem check compiler version cl appveyor DownloadFile http://download.qt.io/official_releases/jom/jom.zip -FileName jom.zip 7z e jom.zip ``` Use jom via botan-ci-tools repo
```batchfile echo Current build setup MSVS="%MSVS%" PLATFORM="%PLATFORM%" TARGET="%TARGET%" if %MSVS% == 2013 call "%ProgramFiles(x86)%\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" %PLATFORM% 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% rem check compiler version cl git clone --depth 1 https://github.com/randombit/botan-ci-tools 7z e botan-ci-tools/jom_1_1_2.zip ```
aad463de-cf3a-4083-91ff-4f200ddc4476
{ "language": "Batchfile" }
```batchfile export set "JAVA_HOME_CONDA_BACKUP=%JAVA_HOME%" export set "JAVA_HOME=%CONDA_PREFIX%\Library" ``` Remove export from windows script.
```batchfile set "JAVA_HOME_CONDA_BACKUP=%JAVA_HOME%" set "JAVA_HOME=%CONDA_PREFIX%\Library" ```
26c8f9b2-0eec-41e3-93ee-70ab7655f9d9
{ "language": "Batchfile" }
```batchfile NuGet.exe pack ../Springboard365.Tools.CommandLine.Core.csproj -Build -symbols pause``` Add NuGet push to NuGet build script.
```batchfile NuGet.exe pack ../Springboard365.Tools.CommandLine.Core.csproj -Build -symbols NuGet.exe push *.nupkg pause```
d7c15f8e-2c64-490c-a80c-d32ed4696a3c
{ "language": "Batchfile" }
```batchfile REM @echo off set MYDIRBLOCK=%~dp0 call %MYDIRBLOCK%..\..\..\config_env_base.bat %HIDEWINDOW% h set EPICS_CAS_INTF_ADDR_LIST=127.0.0.1 set EPICS_CAS_BEACON_ADDR_LIST=127.255.255.255 set PYTHONUNBUFFERED=TRUE set MYDIRGATE=%MYDIRBLOCK%..\..\..\gateway\master if exist "%ICPSETTINGSDIR%/gwblock.pvlist" ( set GWBLOCK_PVLIST=%ICPSETTINGSDIR%/gwblock.pvlist ) else ( set GWBLOCK_PVLIST=%MYDIRGATE%\gwblock_dummy.pvlist ) set MYDIRVC=%MYDIRBLOCK%..\..\ConfigVersionControl\master %PYTHONW% %MYDIRBLOCK%BlockServer\block_server.py -od %MYDIRBLOCK%..\..\..\iocstartup -sd %MYDIRBLOCK%..\..\..\schema\configurations -cd %ICPCONFIGROOT% -pv %GWBLOCK_PVLIST% ``` Fix path to dummy pvlist file
```batchfile REM @echo off set MYDIRBLOCK=%~dp0 call %MYDIRBLOCK%..\..\..\config_env_base.bat %HIDEWINDOW% h set EPICS_CAS_INTF_ADDR_LIST=127.0.0.1 set EPICS_CAS_BEACON_ADDR_LIST=127.255.255.255 set PYTHONUNBUFFERED=TRUE set MYDIRGATE=%MYDIRBLOCK%..\..\..\gateway if exist "%ICPSETTINGSDIR%/gwblock.pvlist" ( set GWBLOCK_PVLIST=%ICPSETTINGSDIR%/gwblock.pvlist ) else ( set GWBLOCK_PVLIST=%MYDIRGATE%\gwblock_dummy.pvlist ) set MYDIRVC=%MYDIRBLOCK%..\..\ConfigVersionControl\master %PYTHONW% %MYDIRBLOCK%BlockServer\block_server.py -od %MYDIRBLOCK%..\..\..\iocstartup -sd %MYDIRBLOCK%..\..\..\schema\configurations -cd %ICPCONFIGROOT% -pv %GWBLOCK_PVLIST% ```
51b6caaf-b26a-4561-9309-6046e75e1885
{ "language": "Batchfile" }
```batchfile ::THIS FILE IS BEING UNTRACKED FROM GIT with the command: git update-index --skip-worktree <file> ::To resume the tracking of changes to this file use the command: git update-index --no-skip-worktree <file> ::Set the path below as you need and then run this bat to copy the files and make them debuggeable ::SET KSPPATH=C:\work\builds\Kerbal Space Program ::Set another path in case you run two KSP instances otherwise leave empty ::SET KSPPATH2=C:\work\builds\Kerbal Space Program2``` Fix example paths in batch file.
```batchfile ::THIS FILE IS BEING UNTRACKED FROM GIT with the command: git update-index --skip-worktree <file> ::To resume the tracking of changes to this file use the command: git update-index --no-skip-worktree <file> ::Set the path below as you need and then run this bat to copy the files and make them debuggeable ::SET KSPPATH=C:\Kerbal Space Program ::Set another path in case you run two KSP instances otherwise leave empty ::SET KSPPATH2=C:\Kerbal Space Program2```
db7529e9-43a9-44a0-a7b1-cdee077b7223
{ "language": "Batchfile" }
```batchfile call "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" x86 ..\..\deps\llvm\build\RelWithDebInfo\bin\clang Runtime.c -emit-llvm -c -o Runtime.bc -O3 ..\..\deps\llvm\build\RelWithDebInfo\bin\llc -march=cpp Runtime.bc -cppgen=functions -o RuntimeInline.inc``` Use %VS120COMNTOOLS% to find vcvarsall.bat when building inline runtime
```batchfile call "%VS120COMNTOOLS%..\..\VC\vcvarsall.bat" x86 ..\..\deps\llvm\build\RelWithDebInfo\bin\clang Runtime.c -emit-llvm -c -o Runtime.bc -O3 ..\..\deps\llvm\build\RelWithDebInfo\bin\llc -march=cpp Runtime.bc -cppgen=functions -o RuntimeInline.inc```
748704b9-374e-49b5-8cb0-097540d98995
{ "language": "Batchfile" }
```batchfile @echo off :: Author: Mark Gottscho <[email protected]> echo Building X-Mem for Windows x86-64... :: Do a little trick to ensure build datetime are correct :: DO NOT remove this code -- otherwise X-Mem will fail to build. set build_datetime=%DATE% %TIME% echo #ifndef __BUILD_DATETIME_H>src\include\build_datetime.h echo #define __BUILD_DATETIME_H>>src\include\build_datetime.h echo #define BUILD_DATETIME "%build_datetime%">>src\include\build_datetime.h echo #endif>>src\include\build_datetime.h :: Build call scons -f SConstruct_win_x64 :: Check if build was successful if ERRORLEVEL 1 goto buildFailure :: Copy executable copy build\win\release\xmem.exe .\xmem.exe echo Done! The executable is at the top of the project tree: xmem.exe exit /B 0 :buildFailure echo X-Mem for Windows build FAILED. exit /B 1 ``` Fix to windows build script
```batchfile @echo off :: Author: Mark Gottscho <[email protected]> set ARCH=%1 echo Building X-Mem for Windows on %ARCH%... :: Do a little trick to ensure build datetime are correct :: DO NOT remove this code -- otherwise X-Mem will fail to build. set build_datetime=%DATE% %TIME% echo #ifndef __BUILD_DATETIME_H>src\include\build_datetime.h echo #define __BUILD_DATETIME_H>>src\include\build_datetime.h echo #define BUILD_DATETIME "%build_datetime%">>src\include\build_datetime.h echo #endif>>src\include\build_datetime.h :: Build call scons -f SConstruct_win_%ARCH% :: Check if build was successful if ERRORLEVEL 1 goto buildFailure :: Copy executable copy build\win\%ARCH%\release\xmem.exe .\xmem.exe echo Done! The executable is at the top of the project tree: xmem.exe exit /B 0 :buildFailure echo X-Mem for Windows build FAILED. exit /B 1 ```
72178870-cd7a-4363-ac14-69cd9d84e25e
{ "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/3362e1a069445bc83767cd41bb1160d239cfac7b 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/cf97bbbb26b0442de8cafa99275e3ea8fedf8849 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 ```
25cfa415-f772-417e-b3d5-cd7364a75ffc
{ "language": "Batchfile" }
```batchfile ``` Add Batch File PackageRestore tools
```batchfile @Echo off Title %CD% - Restore Clangbuilder Packages PowerShell -NoProfile -NoLogo -ExecutionPolicy unrestricted -Command "[System.Threading.Thread]::CurrentThread.CurrentCulture = ''; [System.Threading.Thread]::CurrentThread.CurrentUICulture = '';& '%~dp0RestorePackages.ps1' %*"```
b64c98f4-f012-41cb-b2b7-741a2d3c4382
{ "language": "Batchfile" }
```batchfile @echo off setlocal set WEB_PROCESS_TITLE=Skywalking-Web set WEB_BASE_PATH=%~dp0%.. set WEB_RUNTIME_OPTIONS="-Xms256M -Xmx512M" set CLASSPATH=%WEB_BASE_PATH%\config; SET CLASSPATH=%WEB_BASE_PATH%\libs\*;%CLASSPATH% if ""%JAVA_HOME%"" == """" ( set _EXECJAVA=java ) else ( set _EXECJAVA="%JAVA_HOME%"/bin/java ) start /MIN "%WEB_PROCESS_TITLE%" %_EXECJAVA% "%WEB_RUNTIME_OPTIONS%" -cp "%CLASSPATH%" org.skywalking.apm.ui.ApplicationStartUp & echo Skywalking Web started successfully! endlocal ``` Fix windows script start failure
```batchfile @echo off setlocal set WEB_PROCESS_TITLE=Skywalking-Web set WEB_BASE_PATH=%~dp0%.. set WEB_RUNTIME_OPTIONS="-Xms256M -Xmx512M" set CLASSPATH=%WEB_BASE_PATH%\config; SET CLASSPATH=%WEB_BASE_PATH%\libs\*;%CLASSPATH% if defined JAVA_HOME ( set _EXECJAVA="%JAVA_HOME:"=%"\bin\java ) if not defined JAVA_HOME ( echo "JAVA_HOME not set." set _EXECJAVA=java ) start /MIN "%WEB_PROCESS_TITLE%" %_EXECJAVA% "%WEB_RUNTIME_OPTIONS%" -cp "%CLASSPATH%" org.skywalking.apm.ui.ApplicationStartUp & echo Skywalking Web started successfully! endlocal ```
2f5d1915-bd12-462b-bbda-34587decd7c8
{ "language": "Batchfile" }
```batchfile ``` Add script to build and test the projects.
```batchfile @echo off setlocal set _projectName=CommandLine set _testProject=test\%_projectName%.tests.csproj set _analyzerTestProject=analyzer\%_projectName%.Analyzer.Test\%_projectName%.Analyzer.Test.csproj set _config=%1 if not defined _config ( set _config=Debug ) echo -------------------------- echo !!! Restoring packages !!! echo -------------------------- dotnet restore call build.cmd echo --------------------- echo !!! Running tests !!! echo --------------------- dotnet test --no-build -c %_config% %_testProject% dotnet test --no-build -c %_config% %_analyzerTestProject% endlocal @echo on```
86af1bb7-d43a-4586-8468-71762bfe1366
{ "language": "Batchfile" }
```batchfile set PATH=C:\Ruby192\bin;%PATH% REM Chef 10 contains the client in the chef/ sub-directory cd chef ruby -v call bundle install --binstubs --path vendor/bundle || ( call rm Gemfile.lock && call bundle install --binstubs --path vendor/bundle ) ruby bin\rspec -r rspec_junit_formatter -f RspecJunitFormatter -o test.xml -f documentation spec/functional spec/unit move test.xml .. ``` Add stress tests to jenkins on windows
```batchfile set PATH=C:\Ruby192\bin;%PATH% REM Chef 10 contains the client in the chef/ sub-directory cd chef ruby -v call bundle install --binstubs --path vendor/bundle || ( call rm Gemfile.lock && call bundle install --binstubs --path vendor/bundle ) ruby bin\rspec -r rspec_junit_formatter -f RspecJunitFormatter -o test.xml -f documentation spec/functional spec/unit spec/stress move test.xml .. ```
ec56ec44-7ba2-41e9-b665-bbd4be9226f4
{ "language": "Batchfile" }
```batchfile ``` Add batch file for Sphinx doc generation on Windows
```batchfile @ECHO OFF pushd %~dp0 REM Command file for Sphinx documentation if "%SPHINXBUILD%" == "" ( set SPHINXBUILD=sphinx-build ) set SOURCEDIR=source set BUILDDIR=build if "%1" == "" goto help %SPHINXBUILD% >NUL 2>NUL if errorlevel 9009 ( echo. echo.The 'sphinx-build' command was not found. Make sure you have Sphinx echo.installed, then set the SPHINXBUILD environment variable to point echo.to the full path of the 'sphinx-build' executable. Alternatively you echo.may add the Sphinx directory to PATH. echo. echo.If you don't have Sphinx installed, grab it from echo.http://sphinx-doc.org/ exit /b 1 ) %SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% goto end :help %SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% :end popd ```
edaae96d-8ebf-480a-9eb9-9358460a5a8d
{ "language": "Batchfile" }
```batchfile @echo off setlocal title VSCode Dev pushd %~dp0\.. :: Get electron, compile, built-in extensions if "%VSCODE_SKIP_PRELAUNCH%"=="" node build/lib/preLaunch.js for /f "tokens=2 delims=:," %%a in ('findstr /R /C:"\"nameShort\":.*" product.json') do set NAMESHORT=%%~a set NAMESHORT=%NAMESHORT: "=% set NAMESHORT=%NAMESHORT:"=%.exe set CODE=".build\electron\%NAMESHORT%" :: Manage built-in extensions if "%1"=="--builtin" goto builtin :: Configuration set NODE_ENV=development set VSCODE_DEV=1 set VSCODE_CLI=1 set ELECTRON_ENABLE_LOGGING=1 set ELECTRON_ENABLE_STACK_DUMPING=1 :: Launch Code %CODE% . %* goto end :builtin %CODE% build/builtin :end popd endlocal ``` Use "%~1" instead of "%1" in bat argument parsing.
```batchfile @echo off setlocal title VSCode Dev pushd %~dp0\.. :: Get electron, compile, built-in extensions if "%VSCODE_SKIP_PRELAUNCH%"=="" node build/lib/preLaunch.js for /f "tokens=2 delims=:," %%a in ('findstr /R /C:"\"nameShort\":.*" product.json') do set NAMESHORT=%%~a set NAMESHORT=%NAMESHORT: "=% set NAMESHORT=%NAMESHORT:"=%.exe set CODE=".build\electron\%NAMESHORT%" :: Manage built-in extensions if "%~1"=="--builtin" goto builtin :: Configuration set NODE_ENV=development set VSCODE_DEV=1 set VSCODE_CLI=1 set ELECTRON_ENABLE_LOGGING=1 set ELECTRON_ENABLE_STACK_DUMPING=1 :: Launch Code %CODE% . %* goto end :builtin %CODE% build/builtin :end popd endlocal ```
881dba80-e999-41b2-b74a-e47fd461b962
{ "language": "Batchfile" }
```batchfile del log.txt for %%i in (CalcEBNF, ComplexRightNull, EpsilonCycle, ManyAndOne, ManyAndOpt, RightNull, SimpleEpsilon, SimpleOpt, SimpleRightNull, SimpleSome, StackingConflict, TwoEpsilonsMiddle) do ( echo . >> log.txt echo %%i >> log.txt ..\..\Bin\Release\v40\YC.YaccConstructor.exe -i %%i.yrd -c ExpandMeta ^ -g "RNGLR.EBNFGenerator -pos int -token int -module RNGLR.Parse%%i -translate true -table LR -o %%i.yrd.fs" >> log.txt )``` Add unnecessary files to .gitignore
```batchfile del log.txt for %%i in (CalcEBNF, ComplexRightNull, EpsilonCycle, ManyAndOne, ManyAndOpt, RightNull, SimpleEpsilon, SimpleOpt, SimpleRightNull, SimpleSome, StackingConflict, TwoEpsilonsMiddle) do ( echo . >> log.txt echo %%i >> log.txt ..\..\Bin\Release\v40\YC.YaccConstructor.exe -i %%i.yrd -c ExpandMeta ^ -g "RNGLR.EBNFGenerator -pos int -token int -module RNGLR.Parser%%i -translate true -table LR -o %%i.yrd.fs" >> log.txt )```
4e0ff66b-f250-443d-a43f-113dc43bc25f
{ "language": "Batchfile" }
```batchfile @echo off rmdir bin mkdir bin haxe -cp src -neko bin/HxpectTests.n -main "hxpect.tests.Main" cd bin neko HxpectTests.n ``` Fix for test runner to capture a failing exit code.
```batchfile @echo off rmdir bin mkdir bin haxe -cp src -neko bin/HxpectTests.n -main "hxpect.tests.Main" cd bin set errorlevel= neko HxpectTests.n exit /b %errorlevel% ```