doc_id
stringlengths
36
36
metadata
dict
input
stringlengths
28
4.3k
output
stringlengths
11
5.45k
02ff9c64-426c-4446-8be0-bedb044b1c59
{ "language": "Batchfile" }
```batchfile Robocopy "./tools/googletest/googlemock" "./tools/protobuf/gmock" /E /MT:2 /R:0 /DCOPY:T Robocopy "./tools/googletest/googletest" "./tools/protobuf/gmock/gtest" /E /MT:2 /R:0 /DCOPY:T``` Fix appveyor failing on a successful robocopy
```batchfile Robocopy "./tools/googletest/googlemock" "./tools/protobuf/gmock" /E /MT:2 /R:0 /DCOPY:T Robocopy "./tools/googletest/googletest" "./tools/protobuf/gmock/gtest" /E /MT:2 /R:0 /DCOPY:T IF %ERRORLEVEL% LSS 8 goto end goto :eof :end exit 0 ```
454b75a9-a744-413d-85a0-91b606e980af
{ "language": "Batchfile" }
```batchfile @echo off echo Executing tests with No Compression, No SSL && copy /y tests\SideBySide.New\config.json.example tests\SideBySide.New\config.json && dotnet test tests/SideBySide.New --configuration Release echo Executing tests with Compression, No SSL && copy /y .ci\config.compression.json tests\SideBySide.New\config.json && dotnet test tests/SideBySide.New --configuration Release echo Executing tests with No Compression, SSL && copy /y .ci\config.ssl.json tests\SideBySide.New\config.json && dotnet test tests/SideBySide.New --configuration Release echo Executing tests with Compression, SSL && copy /y ".ci\config.compression+ssl.json" tests\SideBySide.New\config.json && dotnet test tests/SideBySide.New --configuration Release ``` Update to new CI paths.
```batchfile @echo off echo Executing tests with No Compression, No SSL && copy /y tests\SideBySide.New\config.json.example tests\SideBySide.New\config.json && dotnet test tests/SideBySide.New --configuration Release echo Executing tests with Compression, No SSL && copy /y .ci\config\config.compression.json tests\SideBySide.New\config.json && dotnet test tests/SideBySide.New --configuration Release echo Executing tests with No Compression, SSL && copy /y .ci\config\config.ssl.json tests\SideBySide.New\config.json && dotnet test tests/SideBySide.New --configuration Release echo Executing tests with Compression, SSL && copy /y ".ci\config\config.compression+ssl.json" tests\SideBySide.New\config.json && dotnet test tests/SideBySide.New --configuration Release ```
f1859615-518f-4c32-88e0-e812f7df0a4a
{ "language": "Batchfile" }
```batchfile @echo off set "VIRTUAL_ENV=__VIRTUAL_ENV__" if defined _OLD_VIRTUAL_PROMPT ( set "PROMPT=%_OLD_VIRTUAL_PROMPT%" ) else ( if not defined PROMPT ( set "PROMPT=$P$G" ) set "_OLD_VIRTUAL_PROMPT=%PROMPT%" ) set "PROMPT=__VIRTUAL_WINPROMPT__ %PROMPT%" REM Don't use () to avoid problems with them in %PATH% if not defined _OLD_VIRTUAL_PYTHONHOME set "_OLD_VIRTUAL_PYTHONHOME=%PYTHONHOME%" set PYTHONHOME= if defined _OLD_VIRTUAL_PATH set "PATH=%_OLD_VIRTUAL_PATH%" if not defined _OLD_VIRTUAL_PATH set "_OLD_VIRTUAL_PATH=%PATH%" set "PATH=%VIRTUAL_ENV%\__BIN_NAME__;%PATH%" ``` Correct syntax and control logic flow
```batchfile @echo off set "VIRTUAL_ENV=__VIRTUAL_ENV__" if defined _OLD_VIRTUAL_PROMPT ( set "PROMPT=%_OLD_VIRTUAL_PROMPT%" ) else ( if not defined PROMPT ( set "PROMPT=$P$G" ) set "_OLD_VIRTUAL_PROMPT=%PROMPT%" ) set "PROMPT=__VIRTUAL_WINPROMPT__ %PROMPT%" REM Don't use () to avoid problems with them in %PATH% if defined _OLD_VIRTUAL_PYTHONHOME goto ENDIFVHOME set "_OLD_VIRTUAL_PYTHONHOME=%PYTHONHOME%" :ENDIFVHOME set PYTHONHOME= REM if defined _OLD_VIRTUAL_PATH ( if not defined _OLD_VIRTUAL_PATH goto ENDIFVPATH1 set "PATH=%_OLD_VIRTUAL_PATH%" :ENDIFVPATH1 REM ) else ( if defined _OLD_VIRTUAL_PATH goto ENDIFVPATH2 set "_OLD_VIRTUAL_PATH=%PATH%" :ENDIFVPATH2 set "PATH=%VIRTUAL_ENV%\__BIN_NAME__;%PATH%" ```
762382e7-5455-42bd-84c3-7f21c3b66806
{ "language": "Batchfile" }
```batchfile REM REM Run tests for all available versions of Python between 2.3 & 3.3 REM @echo off for /l %%n in (23,1,33) do if exist c:\python%%n\python.exe (echo. & echo python%%n & c:\python%%n\python.exe -W ignore test_active_directory.py) pause ``` Switch to 2.4 as the lowest supported version
```batchfile REM REM Run tests for all available versions of Python between 2.3 & 3.3 REM @echo off for /l %%n in (24,1,33) do if exist c:\python%%n\python.exe (echo. & echo python%%n & c:\python%%n\python.exe -W ignore test_active_directory.py) pause ```
c3ba9ca8-e16a-4412-83c4-0f38632515c4
{ "language": "Batchfile" }
```batchfile @echo off chcp 65001>nul prompt [%USERNAME%@%COMPUTERNAME% $p]$_$$$s rem Fake a UNIX environment doskey clear=cls doskey ls=dir /d $* doskey cp=copy $* doskey mv=move $* doskey rm=del $* doskey cat=type $* rem Easier navigation doskey cd=cd /D $* doskey cd..=cd .. doskey ..=cd .. doskey ...=cd ../.. doskey ....=cd ../../.. rem List files properly doskey l=dir /b $* doskey ll=dir /b $* rem Edit functionality IF NOT EXIST "C:\Program Files\Sublime Text 3" GOTO NOSUBLIME doskey edit="C:\Program Files\Sublime Text 3\sublime_text" $* :NOSUBLIME rem Open functionality doskey open=start $* @echo on ``` Add touch tool that creates file if it does not exist
```batchfile @echo off chcp 65001>nul prompt [%USERNAME%@%COMPUTERNAME% $p]$_$$$s rem Fake a UNIX environment doskey clear=cls doskey ls=dir /d $* doskey cp=copy $* doskey mv=move $* doskey rm=del $* doskey cat=type $* doskey touch=type nul>>$* rem Easier navigation doskey cd=cd /D $* doskey cd..=cd .. doskey ..=cd .. doskey ...=cd ../.. doskey ....=cd ../../.. rem List files properly doskey l=dir /b $* doskey ll=dir /b $* rem Edit functionality IF NOT EXIST "C:\Program Files\Sublime Text 3" GOTO NOSUBLIME doskey edit="C:\Program Files\Sublime Text 3\sublime_text" $* :NOSUBLIME rem Open functionality doskey open=start $* @echo on ```
f7d85325-6efd-41df-940e-d1cdf1550a32
{ "language": "Batchfile" }
```batchfile REM Start copying files mkdir Src copy ..\..\Src\UI\Web\*.py Src\ copy ..\..\Src\UI\Web\*.bat Src\ xcopy /y /s /I ..\..\Src\UI\Web\data Src\data copy "..\..\Src\Bin Collector\*.py" Src\ copy "..\..\Src\Diff Inspector\*.py" Src\ copy "..\..\Src\Bin Collector\Bin\*.pyd" Src\ copy SetupDist.py Src\ copy ..\..\Src\UI\Web\DarunGrim3Sample01.cfg Src\DarunGrim3.cfg ``` Use xcopy to copy source files
```batchfile REM Start copying files mkdir Src xcopy /D /S /I /Y ..\..\Src\UI\Web\*.py Src\ xcopy /D /S /I /Y ..\..\Src\UI\Web\*.bat Src\ xcopy /D /S /I /Y ..\..\Src\UI\Web\data Src\data xcopy /D /S /I /Y "..\..\Src\Bin Collector\*.py" Src\ xcopy /D /S /I /Y "..\..\Src\Diff Inspector\*.py" Src\ xcopy /D /S /I /Y "..\..\Src\Bin Collector\Bin\*.pyd" Src\ xcopy /D /S /I /Y SetupDist.py Src\ xcopy /D /S /I /Y ..\..\Src\UI\Web\DarunGrim3Sample01.cfg Src\DarunGrim3.cfg ```
29950568-2985-41fd-a4c4-1eda3e01f170
{ "language": "Batchfile" }
```batchfile ``` Add UC11 happy path Windows script
```batchfile @echo off rem Download Data. Select variables, region and time right away to save bandwith cate ds copy esacci.SST.day.L4.SSTdepth.multi-sensor.multi-platform.OSTIA.1-1.r1 --name "SST_polar_2007" --time 2007-01-01,2007-01-15 --vars "analysed_sst, sea_ice_fraction" --region "-180, 60, 180, 90" cate ds copy esacci.CLOUD.mon.L3C.CLD_PRODUCTS.AVHRR.multi-platform.AVHRR-AM.2-0.r1 --name "CLOUDS_polar_2007" --time 2007-01-01,2007-01-31 --vars "cfc, cee" --region "-180, 60, 180, 90" cate ds copy esacci.AEROSOL.mon.L3.AAI.multi-sensor.multi-platform.ms_uvai.1-5-7.r1 --name "AEROSOL_polar_2007" --time 2007-01-01,2007-03-31 --region "-180, 60, 180, 90" rmdir /S /Q uc11 mkdir uc11 cd uc11 rem Start interactive session by initialising an empty workspace rem This will write a hidden directory .\.cate-workspace cate ws init rem Open the datasets cate res open sst local.SST_polar_2007 cate res open clouds local.CLOUDS_polar_2007 cate res open aerosol local.AEROSOL_polar_2007 rem Create scalable map plots of the datasets cate res set plot1 plot_map ds=@sst var="sea_ice_fraction" region='-180,60,180,90' projection='NorthPolarStereo' contour_plot=True file='sst_polar.svg' cate res set plot2 plot_map ds=@clouds var='cfc' region='-180,60,180,90' projection='NorthPolarStereo' file='clouds_polar.svg' cate res set plot3 plot_map ds=@aerosol region='-180,60,180,90' var='absorbing_aerosol_index' projection='NorthPolarStereo' file='aerosol_polar.svg' rem Save the workspace cate ws save rem Close the workspace cate ws close rem Exit interactive session. Don't ask, answer is always "yes". cate ws exit --yes cd ..```
85dca88c-8dd7-4743-82c4-dfe0f12a0656
{ "language": "Batchfile" }
```batchfile @echo off cls jshell --show-version ^ --enable-preview ^ -R-ea ^ -R-Djava.util.logging.config.file=src/logging.properties ^ -R-Debug ^ build.jsh ``` Call generated single-file source-code program and custom runtime image
```batchfile @echo off cls jshell --show-version ^ --enable-preview ^ -R-ea ^ -R-Djava.util.logging.config.file=src/logging.properties ^ -R-Debug ^ build.jsh java .bach/src/Bach.java help .bach/workspace/image/bin/bach version ```
351040b1-857d-45f9-9441-f8685a2eb86d
{ "language": "Batchfile" }
```batchfile ``` Add a rununittests script for Windows CE
```batchfile set DEPOT="%CD%" IF NOT EXIST mobility.pro GOTO NOSOURCE set CETESTCOMMAND=cetest -cache %QTDIR%\.qmake.cache -libpath \Windows IF NOT EXIST %DEPOT%\..\..\qa-dungeon\mainline\tests\wince\deploy\ GOTO SKIPDEPLOY cd %DEPOT%\..\..\qa-dungeon\mainline\tests\wince\deploy\ call %CETESTCOMMAND% :SKIPDEPLOY cd %DEPOT%\tests\auto\qcontact call %CETESTCOMMAND% cd %DEPOT%\tests\auto\qcontactactions\unittest call %CETESTCOMMAND% cd %DEPOT%\tests\auto\qcontactasync\unittest call %CETESTCOMMAND% cd %DEPOT%\tests\auto\qcontactdetail call %CETESTCOMMAND% cd %DEPOT%\tests\auto\qcontactdetaildefinition call %CETESTCOMMAND% cd %DEPOT%\tests\auto\qcontactdetails call %CETESTCOMMAND% cd %DEPOT%\tests\auto\qcontactfilter call %CETESTCOMMAND% cd %DEPOT%\testsauto\qcontactgroup call %CETESTCOMMAND% cd %DEPOT%\tests\auto\qcontactmanager call %CETESTCOMMAND% cd %DEPOT%\tests\auto\qcontactmanagerfiltering call %CETESTCOMMAND% cd %DEPOT%\tests\auto\qcontactmanagerplugins\unittest call %CETESTCOMMAND% GOTO EOF :NOSOURCE echo "Unable to find mobility.pro check current directory is QtContacts source" GOTO EOF :EOF cd %DEPOT% ```
2b96b2ea-3d5b-4541-8d6b-819da4c38722
{ "language": "Batchfile" }
```batchfile @ECHO on SETLOCAL FOR /f %%i IN ( 'dir /ad /b "C:\" |findstr /I "mongo"' ) DO CALL :movedir %%i :movedir SET "dest=%1" ECHO MOVE "C:\"%1 "C:\mongodb\" setx MYPATH "%PATH%;C:\mongodb\bin" ``` Revert "Minor change in batch script for finding directory"
```batchfile ECHO on FOR /f %%i IN ( 'dir /ad /b "C:\" ^|findstr /I "mongo"' ) DO CALL :movedir %%i :movedir SET "dest=%1" ECHO MOVE "C:\"%1 "C:\mongodb\" setx MYPATH "%PATH%;C:\mongodb\bin" ```
7e2b5e70-7ed6-42dc-affe-60661b339691
{ "language": "Batchfile" }
```batchfile @echo off echo user=monetdb> .monetdb echo password=monetdb>> .monetdb set LANG=en_US.UTF-8 prompt # $t $g echo on call mjclient -h %HOST% -p %MAPIPORT% -d %TSTDB% -f "%RELSRCDIR%\local_temp_table_data.SF-1865953.sql" call mjclient -h %HOST% -p %MAPIPORT% -d %TSTDB% " @del .monetdb ``` Align it with the sh script....
```batchfile @echo off echo user=monetdb> .monetdb echo password=monetdb>> .monetdb set LANG=en_US.UTF-8 prompt # $t $g echo on call mclient -lsql -h %HOST% -p %MAPIPORT% -d %TSTDB% "%RELSRCDIR%\local_temp_table_data.SF-1865953.sql" call mclient -lsql -h %HOST% -p %MAPIPORT% -d %TSTDB% " @del .monetdb ```
d38b6da5-f522-477d-a55f-3ebd2026ce0e
{ "language": "Batchfile" }
```batchfile ### application.bat - 2015 - Merel ### echo "Copyright Benoit MEREL - 2015" version = "2" build_hour = "11H00" echo "Build ${build_hour}" echo "version ${version}" ``` Update header for New Member
```batchfile ### application.bat - 2015 - Guillet ### echo "Copyright Thomas Guillet - 2015" version = "2" build_hour = "11H00" echo "Build ${build_hour}" echo "version ${version}" ```
d203a819-188d-46bd-92e6-a5ea5c845130
{ "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 ```
1eef1287-bafc-4e9f-b5b0-40edc5852d88
{ "language": "Batchfile" }
```batchfile ``` Set value for a reference given a variable
```batchfile @ECHO OFF :USAGE :START :INITIALIZE SETLOCAL ENABLEDELAYEDEXPANSION SET BASE_DIR=%~DP0 SET IN_VAR_NAME=%1 SET IN_VALUE=%2 :CODE SET GLOBALS_FILE=%BASE_DIR%\globals.txt SET REFERENCE=!%IN_VAR_NAME%! CALL SET-GLOBAL %GLOBALS_FILE% %REFERENCE% %IN_VALUE% :RETURN ENDLOCAL :EOF ```
520495e7-97b9-400f-bb1f-c3ce68b27b5e
{ "language": "Batchfile" }
```batchfile @ECHO OFF set TOOLS_BIN=%~dp0 set JRUBY_BASE=%~dp0\..\jruby-1.7.11 set GEM_HOME= set GEM_PATH= set PATH=%TOOLS_BIN%\;%JRUBY_BASE%\bin;%PATH% set JRUBY_OPTS="-J-XX:+TieredCompilation -J-XX:TieredStopAtLevel=1 -J-Djruby.compile.invokedynamic=false -J-Djruby.compile.mode=OFF" %JRUBY_BASE%\bin\jruby.bat %* ``` Append to JRUBY_OPTS instead of overriding it
```batchfile @ECHO OFF set TOOLS_BIN=%~dp0 set JRUBY_BASE=%~dp0\..\jruby-1.7.11 set GEM_HOME= set GEM_PATH= set PATH=%TOOLS_BIN%\;%JRUBY_BASE%\bin;%PATH% set JRUBY_OPTS='-J-XX:+TieredCompilation -J-XX:TieredStopAtLevel=1 -J-Djruby.compile.invokedynamic=false -J-Djruby.compile.mode=OFF %JRUBY_OPTS%' %JRUBY_BASE%\bin\jruby.bat %* ```
409f13a7-25a9-490e-9b56-debba670505a
{ "language": "Batchfile" }
```batchfile mkdir %LIBRARY_INC%\cspice copy "makeDynamicSpice.bat" %SRC_DIR%\src\cspice cd %SRC_DIR%\src\cspice call makeDynamicSpice.bat copy "cspice.dll" %LIBRARY_LIB% if errorlevel 1 exit 1 cd %SRC_DIR% copy "include\\*.h" %LIBRARY_INC%\cspice if errorlevel 1 exit 1 ``` Copy required files to source directory
```batchfile mkdir %LIBRARY_INC%\cspice copy "%RECIPE_DIR%\\makeDynamicSpice.bat" %SRC_DIR%\src\cspice copy "%RECIPE_DIR%\\cspice.def" %SRC_DIR%\src\cspice cd %SRC_DIR%\src\cspice call makeDynamicSpice.bat copy "cspice.dll" %LIBRARY_LIB% if errorlevel 1 exit 1 cd %SRC_DIR% copy "include\\*.h" %LIBRARY_INC%\cspice if errorlevel 1 exit 1 ```
f2da0f84-2f2d-4e5d-a89e-6952212c3e64
{ "language": "Batchfile" }
```batchfile @echo off echo This script is meant for the Couchbase build server. It cannot be used by developers. pushd %~dp0..\Couchbase.Lite if not exist ..\couchbase.snk ( echo Private key not found, aborting... popd exit /b 1 ) "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\MSBuild.exe" Couchbase.Lite.csproj /t:Transform /p:TransformFile="Properties\DynamicAssemblyInfo.tt" dotnet restore dotnet build -c Packaging pushd ..\Couchbase.Lite.Support.UWP if not exist ..\..\nuget.exe ( powershell -Command "Invoke-WebRequest https://dist.nuget.org/win-x86-commandline/latest/nuget.exe -OutFile ..\..\nuget.exe" ) ..\..\nuget.exe restore "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\MSBuild.exe" Couchbase.Lite.Support.UWP.csproj /p:Configuration=Packaging popd popd ``` Modify build script to pass in the source of the CI nuget packages
```batchfile @echo off echo This script is meant for the Couchbase build server. It cannot be used by developers. pushd %~dp0..\Couchbase.Lite if not exist ..\couchbase.snk ( echo Private key not found, aborting... popd exit /b 1 ) if not defined NUGET_REPO ( echo NUGET_REPO not defined, aborting... popd exit /b 1 ) "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\MSBuild.exe" Couchbase.Lite.csproj /t:Transform /p:TransformFile="Properties\DynamicAssemblyInfo.tt" dotnet restore -s %NUGET_REPO% dotnet build -c Packaging pushd ..\Couchbase.Lite.Support.UWP if not exist ..\..\nuget.exe ( powershell -Command "Invoke-WebRequest https://dist.nuget.org/win-x86-commandline/latest/nuget.exe -OutFile ..\..\nuget.exe" ) ..\..\nuget.exe restore -Source %NUGET_REPO% "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\MSBuild.exe" Couchbase.Lite.Support.UWP.csproj /p:Configuration=Packaging popd popd ```
868ed40d-9c56-4e05-ab6a-26ee5a336b2a
{ "language": "Batchfile" }
```batchfile @echo off rem $Id$ ::remove any quotes from JAVA_HOME and EXIST_HOME env var, will be re-added below for /f "delims=" %%G IN (%JAVA_HOME%) DO SET JAVA_HOME=%%G for /f "delims=" %%G IN (%EXIST_HOME%) DO SET EXIST_HOME=%%G rem will be set by the installer set EXIST_HOME=$INSTALL_PATH rem will be set by the installer set JAVA_HOME=$JAVA_HOME :gotJavaHome set JAVA_CMD="%JAVA_HOME%\bin\java" set JAVA_OPTS="-Xms64m -Xmx768m" rem make sure there's the jetty tmp directory mkdir "%EXIST_HOME%\tools\jetty\tmp" rem echo "JAVA_HOME: %JAVA_HOME%" rem echo "EXIST_HOME: %EXIST_HOME%" echo %JAVA_OPTS% %JAVA_CMD% "%JAVA_OPTS%" -Dexist.home="%EXIST_HOME%" -Duse.autodeploy.feature=false -jar "%EXIST_HOME%\start.jar" org.exist.installer.Setup %1 %2 %3 %4 %5 %6 %7 %8 %9 :eof ``` Make sure to correctly quote/unquote Windows paths in the installer
```batchfile @echo off ::will be set by the installer set JAVA_HOME="$JAVA_HOME" set EXIST_HOME="$INSTALL_PATH" ::remove any quotes from JAVA_HOME and EXIST_HOME env var, will be re-added below for /f "delims=" %%G IN (%JAVA_HOME%) DO SET JAVA_HOME=%%G for /f "delims=" %%G IN (%EXIST_HOME%) DO SET EXIST_HOME=%%G :gotJavaHome set JAVA_CMD="%JAVA_HOME%\bin\java" set JAVA_OPTS="-Xms64m -Xmx768m" ::make sure there's the jetty tmp directory mkdir "%EXIST_HOME%\tools\jetty\tmp" echo "JAVA_HOME: [%JAVA_HOME%]" echo "EXIST_HOME: [%EXIST_HOME%]" echo "EXIST_OPTS: [%JAVA_OPTS%]" echo: echo: %JAVA_CMD% "%JAVA_OPTS%" -Dexist.home="%EXIST_HOME%" -Duse.autodeploy.feature=false -jar "%EXIST_HOME%\start.jar" org.exist.installer.Setup %1 %2 %3 %4 %5 %6 %7 %8 %9 :eof ```
1cf0b2b6-1bb6-41ee-b9cc-c3fc52075fb2
{ "language": "Batchfile" }
```batchfile echo Creating map files copy /y helpid.hm+resource.hm+hlp\HexEdit.hm+I:\Micros~1\vc98\mfc\include\afxhelp.hm+D:\bcg590\BCGControlBar\help\BCGControlBar.hm HexeditMap.tmp sed "s/^HID/#define HID/" <HexeditMap.tmp >HexeditMap2.tmp del HexeditMap.tmp sed "s/^AFX_HID/#define AFX_HID/" <HexeditMap2.tmp >HTMLHelp\HexeditMap.hm del HexeditMap2.tmp ``` Fix creation of help map file for Robohelp - different location for MFC and BCG .hm file - changes needed to handle spaces in file name - output to HexEditMap.h (not .hm)
```batchfile echo Creating map files REM Get MFC help IDs rem copy /y I:\Micros~1\vc98\mfc\include\afxhelp.hm afxhelp.tmp copy /y "C:\Program Files\Microsoft Visual Studio .NET\Vc7\atlmfc\include\afxhelp.hm" afxhelp.tmp REM Get BCG help IDs rem copy /y D:\bcg590\BCGControlBar\help\BCGControlBar.hm bcghelp.tmp copy /y "I:\Devel\BCG6_2\BCGControlBar\Help\BCGControlBar.hm" .\bcghelp.tmp REM Copy all help IDs into one file copy /y helpid.hm+resource.hm+hlp\HexEdit.hm+afxhelp.tmp+bcghelp.tmp HexeditMap.tmp rem del afxhelp.tmp rem del bcghelp.tmp REM Make sure they all start with #define which is what RoboHelp expects sed "s/^HID/#define HID/" <HexeditMap.tmp >HexeditMap2.tmp rem del HexeditMap.tmp sed "s/^AFX_HID/#define AFX_HID/" <HexeditMap2.tmp >HTMLHelp\HexeditMap.h rem del HexeditMap2.tmp ```
150eb880-b5e5-4b2f-87a0-5204aa123e87
{ "language": "Batchfile" }
```batchfile :: Helper script to build Spectrecoin on Windows using VS2017 and QT. IF "%QTDIR%" == "" GOTO NOQT :YESQT set CALL_DIR=%cd% set SRC_DIR=%cd%\src set DIST_DIR=%SRC_DIR%\dist set BUILD_DIR=%SRC_DIR%\build set OUT_DIR=%SRC_DIR%\bin call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars64.bat" cd cd %SRC_DIR% dir echo on rmdir /S /Q "%DIST_DIR%" mkdir "%DIST_DIR%" mkdir "%BUILD_DIR%" mkdir "%OUT_DIR%" pushd "%BUILD_DIR%" %QTDIR%\bin\qmake.exe ^ -spec win32-msvc ^ "CONFIG += release" ^ "%SRC_DIR%\src.pro" nmake popd %QTDIR%\bin\windeployqt "%OUT_DIR%\Spectrecoin.exe" ::ren "%OUT_DIR%" Spectrecoin ::echo "The prepared package is in: %SRC_DIR%\Spectrecoin" echo "Everything is OK" GOTO END :NOQT @ECHO The QTDIR environment variable was NOT detected! :END cd %CALL_DIR% ``` Remove previous win executable before build
```batchfile :: Helper script to build Spectrecoin on Windows using VS2017 and QT. IF "%QTDIR%" == "" GOTO NOQT :YESQT set CALL_DIR=%cd% set SRC_DIR=%cd%\src set DIST_DIR=%SRC_DIR%\dist set BUILD_DIR=%SRC_DIR%\build set OUT_DIR=%SRC_DIR%\bin call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars64.bat" cd cd %SRC_DIR% dir echo on del "%OUT_DIR%\Spectrecoin.exe" 2>nul rmdir /S /Q "%DIST_DIR%" mkdir "%DIST_DIR%" mkdir "%BUILD_DIR%" mkdir "%OUT_DIR%" pushd "%BUILD_DIR%" %QTDIR%\bin\qmake.exe ^ -spec win32-msvc ^ "CONFIG += release" ^ "%SRC_DIR%\src.pro" nmake popd %QTDIR%\bin\windeployqt "%OUT_DIR%\Spectrecoin.exe" ::ren "%OUT_DIR%" Spectrecoin ::echo "The prepared package is in: %SRC_DIR%\Spectrecoin" echo "Everything is OK" GOTO END :NOQT @ECHO The QTDIR environment variable was NOT detected! :END cd %CALL_DIR% ```
6cd222d6-f9aa-407b-bcf7-ee1383bf0a3c
{ "language": "Batchfile" }
```batchfile ``` Load Applications list into a Folder for viewing
```batchfile REM Load all Windows Apps / Programs in a folder to view icons %windir%\explorer.exe shell:::{4234d49b-0245-4df3-b780-3893943456e1}```
cf5b0eaf-c001-4b33-817f-21bfb55cfe3c
{ "language": "Batchfile" }
```batchfile @ECHO OFF REM $Id$ REM Bat script building FMILibrary dependency automatically REM Author: Peter Nordin [email protected] set basedir=%~dp0 set name=FMILibrary set codedir=%basedir%\%name%_code set builddir=%basedir%\%name%_build set installdir=%basedir%\%name% set OLDPATH=%PATH% call setHopsanBuildPaths.bat REM We don want msys in the path so we have to set it manually set PATH=%mingw_path%;%cmake_path%;%OLDPATH% REM build mkdir %builddir% cd %builddir% cmake -Wno-dev -G "MinGW Makefiles" -DFMILIB_FMI_PLATFORM="win64" -DFMILIB_INSTALL_PREFIX=%installdir% %codedir% mingw32-make.exe -j4 mingw32-make.exe install cd %basedir% echo. echo setupFMILibrary.bat done pause ``` Add zip file unpacking to FMILibrary windows setup script
```batchfile @ECHO OFF REM $Id$ REM Bat script building FMILibrary dependency automatically REM Author: Peter Nordin [email protected] set basedir=%~dp0 set name=FMILibrary set zipdir=%name%-2.0.2 set zipfile=tools\%zipdir%-src.zip set codedir=%basedir%\%name%_code set builddir=%basedir%\%name%_build set installdir=%basedir%\%name% REM Unpack echo. echo Clearing old directory (if it exists) if exist %codedir% rd /s/q %codedir% echo Unpacking %zipfile% tools\7z\7za.exe x %zipfile% -y > nul move %zipdir% %codedir% set OLDPATH=%PATH% call setHopsanBuildPaths.bat REM We don want msys in the path so we have to set it manually set PATH=%mingw_path%;%cmake_path%;%OLDPATH% REM build mkdir %builddir% cd %builddir% cmake -Wno-dev -G "MinGW Makefiles" -DFMILIB_FMI_PLATFORM="win64" -DFMILIB_INSTALL_PREFIX=%installdir% %codedir% mingw32-make.exe -j4 mingw32-make.exe install cd %basedir% echo. echo setupFMILibrary.bat done pause ```
88a2fd94-ec66-49f1-9510-72587f6e4fd5
{ "language": "Batchfile" }
```batchfile ``` Add BAT file for recording of binary trace
```batchfile echo off pushd "%~dp0" logman stop usbdkm -ets >nul 2>&1 logman delete usbdkm -ets >nul 2>&1 logman create trace usbdkm -o usbdk.etl -ow -ets logman update usbdkm -p {88e1661f-48b6-410f-b096-ba84e9f0656f} 0x7fffffff 6 -ets echo Recording started. echo Reproduce the problem, then press ENTER pause > nul logman stop usbdkm -ets dir usbdk.etl echo Please collect usbdk.etl file now pause popd ```
18e992f5-296a-4097-833b-9fb66d67f0f2
{ "language": "Batchfile" }
```batchfile @echo off pushd %~dp0 set DEPLOYMENT=deploy set NUGET=packages echo > build.info call deploy.cmd call run_tests.cmd %* popd``` Write empty build.info on local run
```batchfile @echo off pushd %~dp0 set DEPLOYMENT=deploy set NUGET=packages echo. 2> build.info call deploy.cmd call run_tests.cmd %* popd```
d9ecccee-198e-47da-ad14-cf37d78674fb
{ "language": "Batchfile" }
```batchfile @echo off pushd %~dp0 SET PACKAGEPATH=.\packages\ SET NUGET=.\tools\nuget\NuGet.exe SET NUGETOPTIONS=-ConfigFile .\tools\nuget\NuGet.Config -OutputDirectory %PACKAGEPATH% -ExcludeVersion IF NOT EXIST %PACKAGEPATH%FAKE\Ver_4.23.0 ( %NUGET% install FAKE -Version 4.23.0 %NUGETOPTIONS% COPY NUL %PACKAGEPATH%FAKE\Ver_4.23.0 ) IF NOT EXIST %PACKAGEPATH%FAKE.BuildLib\Ver_0.1.4 ( %NUGET% install FAKE.BuildLib -Version 0.1.4 %NUGETOPTIONS% COPY NUL %PACKAGEPATH%FAKE.BuildLib\Ver_0.1.4 ) set encoding=utf-8 "%PACKAGEPATH%FAKE\tools\FAKE.exe" build.fsx %* popd ``` Use Fake.BuildLib 0.1.5 in Build.cmd
```batchfile @echo off pushd %~dp0 SET PACKAGEPATH=.\packages\ SET NUGET=.\tools\nuget\NuGet.exe SET NUGETOPTIONS=-ConfigFile .\tools\nuget\NuGet.Config -OutputDirectory %PACKAGEPATH% -ExcludeVersion IF NOT EXIST %PACKAGEPATH%FAKE\Ver_4.23.0 ( %NUGET% install FAKE -Version 4.23.0 %NUGETOPTIONS% COPY NUL %PACKAGEPATH%FAKE\Ver_4.23.0 ) IF NOT EXIST %PACKAGEPATH%FAKE.BuildLib\Ver_0.1.5 ( %NUGET% install FAKE.BuildLib -Version 0.1.5 %NUGETOPTIONS% COPY NUL %PACKAGEPATH%FAKE.BuildLib\Ver_0.1.5 ) set encoding=utf-8 "%PACKAGEPATH%FAKE\tools\FAKE.exe" build.fsx %* popd ```
406ed572-8700-44c2-86e0-a84031fac74c
{ "language": "Batchfile" }
```batchfile "c:\Program Files\7-Zip\7z" a -tzip ..\folderAccountBeta.xpi * -x!PackUp.bat ``` Fix packup script to work with git repo
```batchfile "c:\Program Files\7-Zip\7z" a -tzip ..\folderAccountBeta.xpi * -x!PackUp.bat -x!.git ```
d4ee41cc-201e-4f9d-a97e-337768363620
{ "language": "Batchfile" }
```batchfile @echo off cd C:\Users\dzony\Documents\projects\system\env\system\Scripts start cmd /k "activate && cd C:\Users\dzony\Documents\projects\system\server__client\ && python start_server.py" sleep 0.1 start cmd /k "activate && cd C:\Users\dzony\Documents\projects\system\backend\ && python start.py" ``` Update bat file for starting system
```batchfile @echo off cd C:\Users\dzony\Documents\projects\system\env\system\Scripts start cmd /k "activate && cd C:\Users\dzony\Documents\projects\system\server__client\ && python start.py" sleep 0.1 start cmd /k "activate && cd C:\Users\dzony\Documents\projects\system\backend\ && python start.py" ```
6d73ac04-d58b-4ced-af81-fb5a5873d5c5
{ "language": "Batchfile" }
```batchfile ``` Add .bat script for Deathstar_Win7VM.
```batchfile REM Start from a clean build directory rmdir /Q /S C:\Dashboards\TubeTK\TubeTK-Release REM Update the TubeTK Dashboard scripts cd C:\Dashboards\TubeTK\TubeTK-DashboardScripts REM "C:\Program Files (x86)\Git\bin\git" reset --hard HEAD "C:\Program Files (x86)\Git\bin\git" pull cd .. REM Run the nightly CTest "C:\Program Files (x86)\CMake 2.8\bin\ctest.exe" -S "C:\Dashboards\TubeTK\TubeTK-DashboardScripts\Deathstar_Win7VM_Kitware_TubeTK.cmake" -O "C:\Dashboards\TubeTK\TubeTK_CDashClient_Nightly_log.txt" ```
10ce6cf9-d844-4129-bc2f-d586dfd38e2c
{ "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% doskey oq=python.exe -m openquake.commands.__main__ $* doskey oq-engine=python.exe -m openquake.commonlib.commands engine $* echo OpenQuake environment loaded cmd /k endlocal ``` Add deprecation warnign and fix a command
```batchfile @echo off setlocal set mypath=%~dp0 set PATH=%PATH%;%mypath%\python2.7 set PYTHONPATH=%mypath%\lib set OQ_SITE_CFG_PATH=%mypath% doskey oq=python.exe -m openquake.commands.__main__ $* doskey oq-engine=python.exe -m openquake.commands.__main__ engine $* echo OpenQuake environment loaded echo The command 'oq-engine' is deprecated and will be removed. Please use 'oq engine' instead cmd /k endlocal ```
ac4a0bad-b71b-44f7-9271-0992a37117ce
{ "language": "Batchfile" }
```batchfile @echo Off echo ====== Starting to build dvc installer for Windows... ====== if not exist dvc\NUL (echo Error: Please run this script from repository root && goto :error) rmdir /Q /S build rmdir /Q /S dist del /Q /S dvc.spec del /Q /S "dvc-*.exe" where pip if %errorlevel% neq 0 (echo Error: pip not found && goto :error) if not exist "C:\Program Files (x86)\Inno Setup 5\ISCC.exe" (echo Error: Couldn't find Inno Setup compiler. Please go to jrsoftware.org/isinfo.php and install Inno Setup 5 && goto :error) echo ====== Installing requirements... ====== call pip install -r requirements.txt || goto :error call pip install pyinstaller || goto :error echo ====== Building dvc binary... ====== call pyinstaller --onefile --additional-hooks-dir scripts\hooks dvc/__main__.py --name dvc --specpath build echo ====== Building dvc installer... ====== set PYTHONPATH=%cd% call python scripts\innosetup\config_gen.py || goto :error call "C:\Program Files (x86)\Inno Setup 5\iscc" scripts\innosetup\setup.iss || goto :error echo ====== DONE ====== goto :EOF :error echo ====== FAIL ====== exit /b 1 ``` Revert "build: win: don't look for symlink ps script"
```batchfile @echo Off echo ====== Starting to build dvc installer for Windows... ====== if not exist dvc\NUL (echo Error: Please run this script from repository root && goto :error) rmdir /Q /S build rmdir /Q /S dist del /Q /S dvc.spec del /Q /S "dvc-*.exe" where pip if %errorlevel% neq 0 (echo Error: pip not found && goto :error) if not exist "C:\Program Files (x86)\Inno Setup 5\ISCC.exe" (echo Error: Couldn't find Inno Setup compiler. Please go to jrsoftware.org/isinfo.php and install Inno Setup 5 && goto :error) echo ====== Installing requirements... ====== call pip install -r requirements.txt || goto :error call pip install pyinstaller || goto :error echo ====== Building dvc binary... ====== call pyinstaller --onefile --additional-hooks-dir scripts\hooks dvc/__main__.py --name dvc --specpath build echo ====== Copying additional files... ====== copy scripts\innosetup\addSymLinkPermissions.ps1 dist\ || goto :error echo ====== Building dvc installer... ====== set PYTHONPATH=%cd% call python scripts\innosetup\config_gen.py || goto :error call "C:\Program Files (x86)\Inno Setup 5\iscc" scripts\innosetup\setup.iss || goto :error echo ====== DONE ====== goto :EOF :error echo ====== FAIL ====== exit /b 1 ```
1dfa7476-7d29-403b-8f15-005b938c08d5
{ "language": "Batchfile" }
```batchfile @echo off set PTOOLSPATH="%~dp0\" php %PTOOLSPATH%phalcon.php %*``` Fix initialization home directory in Windows batch file.
```batchfile @echo off set PTOOLSPATH=%~dp0 php %PTOOLSPATH%phalcon.php %*```
10460116-656e-43d9-bebd-6b7d9976ca8f
{ "language": "Batchfile" }
```batchfile "C:\Program Files\7-Zip\7z.exe" u -uq0 -mx9 psdle.zip ./psdle/* -r -x!*.db -x!*.ini``` Update Chrome 7z bat file.
```batchfile "C:\Program Files\7-Zip\7z.exe" u -uq0 -mx9 psdle.zip -mtc- ./psdle/* -r -x!*.db -x!*.ini```
a4830bff-1004-4c72-ba66-6580a18810fe
{ "language": "Batchfile" }
```batchfile dotnet test "test\Infrastructure\Skeleton.Common.Tests" -c %1 dotnet test "test\Infrastructure\Skeleton.CQRS.Implementations.Tests" -c %1 dotnet test "test\Infrastructure\Skeleton.Dapper.Tests" -c %1 cd "test\Web.Tests" dotnet test -c %1``` Fix for tests running script was added
```batchfile dotnet test "test\Infrastructure\Skeleton.Common.Tests" -c %1 dotnet test "test\Infrastructure\Skeleton.CQRS.Implementations.Tests" -c %1 dotnet test "test\Infrastructure\Skeleton.Dapper.Tests" -c %1 cd "test\Web.Tests" dotnet test -c %1 cd "..\.."```
1a59727d-a668-4700-a31e-df34f53754f7
{ "language": "Batchfile" }
```batchfile @ECHO OFF :: Performs necessary setup steps to allow the use of :: virtualenv commands such as "mkvirtualenv [ENV_NAME]" :: for creating and using Python virtual environments. python -m pip install --upgrade virtualenv python -m pip install --upgrade virtualenvwrapper-win echo: echo: echo: *** You may now use virtualenv commands in your command shell. *** echo: echo: virtualenv commands: echo: * "mkvirtualenv [ENV_NAME]" - Create a Python virtual environment echo: * "deactivate" - Exit the current virtual environment echo: * "workon [ENV_NAME]" - Enter an existing virtual environment echo: * "lsvirtualenv" OR "workon" - List all virtual environments echo: * "rmvirtualenv [ENV_NAME]" - Delete a virtual environment echo: echo: Example: echo: mkvirtualenv seleniumbase echo: mkvirtualenv seleniumbase --python=[PATH_TO_PYTHON] echo: ``` Simplify virtualenv installation on Windows
```batchfile @ECHO OFF :: Performs necessary setup steps to allow the use of :: virtualenv commands such as "mkvirtualenv [ENV_NAME]" :: for creating and using Python virtual environments. python -m pip install --upgrade virtualenvwrapper-win echo: echo: echo: *** You may now use virtualenv commands in your command shell. *** echo: echo: virtualenv commands: echo: * "mkvirtualenv [ENV_NAME]" - Create a Python virtual environment echo: * "deactivate" - Exit the current virtual environment echo: * "workon [ENV_NAME]" - Enter an existing virtual environment echo: * "lsvirtualenv" OR "workon" - List all virtual environments echo: * "rmvirtualenv [ENV_NAME]" - Delete a virtual environment echo: echo: Example: echo: mkvirtualenv seleniumbase echo: mkvirtualenv seleniumbase --python=[PATH_TO_PYTHON] echo: ```
4a34b9d5-e617-4dd8-ab09-e1c2d16b5d3a
{ "language": "Batchfile" }
```batchfile @call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\Tools\VsDevCmd.bat" SET PATH=%PROJECT_PATH%\3rdparty\bin;%MYSQL_CONNECTOR_PATH%\lib;%MYSQL_PATH%\bin;%PYTHON_PATH%\Scripts;%PATH% cp "%MYSQL_CONNECTOR_PATH%\lib\libmysql.dll" "%PROJECT_PATH%\build\bin\%CONFIGURATION% cp "%MYSQL_CONNECTOR_PATH%\lib\libmysql.dll" "%PROJECT_PATH%\build\bin\ cmake -GNinja -D%CONFIGURATION%=TRUE -DCMAKE_BUILD_TYPE=%CONFIGURATION% .. cmake --build . --config %CONFIGURATION%``` Update uploaded artifact on appveyor to include the scripts dir
```batchfile @call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\Tools\VsDevCmd.bat" SET PATH=%PROJECT_PATH%\3rdparty\bin;%MYSQL_CONNECTOR_PATH%\lib;%MYSQL_PATH%\bin;%PYTHON_PATH%\Scripts;%PATH% REM cp "%MYSQL_CONNECTOR_PATH%\lib\libmysql.dll" "%PROJECT_PATH%\build\bin\%CONFIGURATION% cp "%MYSQL_CONNECTOR_PATH%\lib\libmysql.dll" "%PROJECT_PATH%\build\bin\" %PROJECT_PATH%\cmake\scripts\robocopy.bat "%PROJECT_PATH%\scripts" "%PROJECT_PATH%\build\bin\scripts" "*.lua" cmake -GNinja -D%CONFIGURATION%=TRUE -DCMAKE_BUILD_TYPE=%CONFIGURATION% .. cmake --build . --config %CONFIGURATION%```
197c7897-be8f-461b-9ed8-fda27bb3f950
{ "language": "Batchfile" }
```batchfile @echo off pushd "%~dp0" if exist cs (goto okcs) else (echo "No cs folder found." && goto exit) :okcs if exist vb (goto okvb) else (echo "No vb folder found." && goto exit) :okvb if [%1]==[] ( echo Please specify Visual Studio version, e.g., 2017 goto exit ) else ( echo Using version %1 set "D=%userprofile%\Documents\Visual Studio %1\Templates\ProjectTemplates" ) set "F=%TEMP%\Revit2020AddinWizardCs0.zip" echo Creating C# wizard archive %F%... cd cs ..\zip\zip.exe -r "%F%" * cd .. echo Copying C# wizard archive to %D%\Visual C#... copy "%F%" "%D%\Visual C#" set "F=%TEMP%\Revit2020AddinWizardVb0.zip" echo Creating VB wizard archive %F%... cd vb ..\zip\zip.exe -r "%F%" * cd .. echo Copying VB wizard archive to %D%\Visual Basic... copy "%F%" "%D%\Visual Basic" :exit ``` Use xcopy rather than copy
```batchfile @echo off pushd "%~dp0" if exist cs (goto okcs) else (echo "No cs folder found." && goto exit) :okcs if exist vb (goto okvb) else (echo "No vb folder found." && goto exit) :okvb if [%1]==[] ( echo Please specify Visual Studio version, e.g., 2017 goto exit ) else ( echo Using version %1 set "D=%userprofile%\Documents\Visual Studio %1\Templates\ProjectTemplates" ) set "F=%TEMP%\Revit2020AddinWizardCs0.zip" echo Creating C# wizard archive %F%... cd cs ..\zip\zip.exe -r "%F%" * cd .. echo Copying C# wizard archive to %D%\Visual C#... xcopy "%F%" "%D%\Visual C#\" set "F=%TEMP%\Revit2020AddinWizardVb0.zip" echo Creating VB wizard archive %F%... cd vb ..\zip\zip.exe -r "%F%" * cd .. echo Copying VB wizard archive to %D%\Visual Basic... xcopy "%F%" "%D%\Visual Basic\" :exit ```
7a9c8abd-9741-422a-b0e5-84de8a6ba94b
{ "language": "Batchfile" }
```batchfile ``` Add script for disabling grepWin context menu
```batchfile @echo off setlocal EnableDelayedExpansion set registryRoot=HKCU\Software\Classes reg add "%registryRoot%\*\shell\grepWin..." /v LegacyDisable /t REG_SZ /f reg add "%registryRoot%\*\shell\grepWin..." /v LegacyDisable /t REG_SZ /f reg add "%registryRoot%\Directory\background\shell\grepWin..." /v LegacyDisable /t REG_SZ /f reg add "%registryRoot%\Directory\shell\grepWin..." /v LegacyDisable /t REG_SZ /f reg add "%registryRoot%\Drive\shell\grepWin..." /v LegacyDisable /t REG_SZ /f reg add "%registryRoot%\Folder\shell\grepWin..." /v LegacyDisable /t REG_SZ /f ```
522e7009-3d43-46b3-a690-f1ba87e654bb
{ "language": "Batchfile" }
```batchfile @echo off call "..\VsDevCmd.cmd" set platform="%1" if "%1" == "AnyCPU" ( set platform="x86" ) set vstest="%VSINSTALLDIR%Common7\IDE\CommonExtensions\Microsoft\TestWindow\vstest.console.exe" for /r ..\..\Tests\Magick.NET.Tests\bin %%a in (*.dll) do ( if "%%~nxa"=="Magick.NET.Tests.dll" ( echo "Running tests from: %%~dpnxa" %vstest% %%~dpnxa /inIsolation /platform:%platform% /TestAdapterPath:%%~dpa /logger:AppVeyor if %errorlevel% neq 0 exit /b %errorlevel% ) ) ``` Use correct path for 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 /inIsolation /platform:%platform% /TestAdapterPath:%%~dpa /logger:AppVeyor if %errorlevel% neq 0 exit /b %errorlevel% ) ) ```
5c4c81ea-0202-4f7c-9b37-96954363a542
{ "language": "Batchfile" }
```batchfile @if defined ELIXIR_CLI_ECHO (@echo on) else (@echo off) setlocal if /I ""%1""==""--help"" goto documentation if /I ""%1""==""-h"" goto documentation if /I ""%1""==""/h"" goto documentation if ""%1""==""/?"" goto documentation goto run :documentation echo Usage: %~nx0 [options] [.exs file] [data] echo. echo The following options are exclusive to IEx: echo. echo --dot-iex "PATH" Overrides default .iex.exs file and uses path instead; echo path can be empty, then no file will be loaded echo --remsh NAME Connects to a node using a remote shell echo --werl Uses Erlang's Windows shell GUI (Windows only) echo. echo Set the IEX_WITH_WERL environment variable to always use werl. echo It accepts all other options listed by "elixir --help". goto end :run if defined IEX_WITH_WERL (@set __ELIXIR_IEX_FLAGS=--werl) else (set __ELIXIR_IEX_FLAGS=) call "%~dp0\elixir.bat" --no-halt --erl "-noshell -user Elixir.IEx.CLI" +iex %__ELIXIR_IEX_FLAGS% %* :end endlocal ``` Remove unecessary @ in bat file
```batchfile @if defined ELIXIR_CLI_ECHO (@echo on) else (@echo off) setlocal if /I ""%1""==""--help"" goto documentation if /I ""%1""==""-h"" goto documentation if /I ""%1""==""/h"" goto documentation if ""%1""==""/?"" goto documentation goto run :documentation echo Usage: %~nx0 [options] [.exs file] [data] echo. echo The following options are exclusive to IEx: echo. echo --dot-iex "PATH" Overrides default .iex.exs file and uses path instead; echo path can be empty, then no file will be loaded echo --remsh NAME Connects to a node using a remote shell echo --werl Uses Erlang's Windows shell GUI (Windows only) echo. echo Set the IEX_WITH_WERL environment variable to always use werl. echo It accepts all other options listed by "elixir --help". goto end :run if defined IEX_WITH_WERL (set __ELIXIR_IEX_FLAGS=--werl) else (set __ELIXIR_IEX_FLAGS=) call "%~dp0\elixir.bat" --no-halt --erl "-noshell -user Elixir.IEx.CLI" +iex %__ELIXIR_IEX_FLAGS% %* :end endlocal ```
a752eaf7-2d97-471b-98d7-0a52814509ce
{ "language": "Batchfile" }
```batchfile @ECHO OFF ECHO + Checking shellcode for NULL bytes: ECHO + w32-dl-loadlib-shellcode.bin BETA3 h --nullfree w32-dl-loadlib-shellcode.bin > nul IF ERRORLEVEL 1 GOTO :FAILED ECHO + w32-dl-loadlib-shellcode-esp.bin BETA3 h --nullfree w32-dl-loadlib-shellcode-esp.bin > nul IF ERRORLEVEL 1 GOTO :FAILED ECHO + Running shellcode: ECHO + w32-dl-loadlib-shellcode.bin w32-testival.exe [$]=ascii:w32-dl-loadlib-shellcode.bin eip=$ --EH | match_output.py "Hello, world![\r\n]*" --verbose > nul IF ERRORLEVEL 1 GOTO :FAILED ECHO + w32-dl-loadlib-shellcode-esp.bin w32-testival.exe [$+800]=ascii:w32-dl-loadlib-shellcode-esp.bin eip=$+800 esp=$+7FF --EH | match_output.py "Hello, world![\r\n]*" --verbose > nul IF ERRORLEVEL 1 GOTO :FAILED EXIT /B 0 :FAILED ECHO * Test failed! EXIT /B %ERRORLEVEL%``` Use CALL for BETA3 as it may be a .cmd file, which would terminate this script
```batchfile @ECHO OFF ECHO + Checking shellcode for NULL bytes: ECHO + w32-dl-loadlib-shellcode.bin CALL BETA3 h --nullfree w32-dl-loadlib-shellcode.bin > nul IF ERRORLEVEL 1 GOTO :FAILED ECHO + w32-dl-loadlib-shellcode-esp.bin CALL BETA3 h --nullfree w32-dl-loadlib-shellcode-esp.bin > nul IF ERRORLEVEL 1 GOTO :FAILED ECHO + Running shellcode: ECHO + w32-dl-loadlib-shellcode.bin w32-testival.exe [$]=ascii:w32-dl-loadlib-shellcode.bin eip=$ --EH | match_output.py "Hello, world![\r\n]*" --verbose > nul IF ERRORLEVEL 1 GOTO :FAILED ECHO + w32-dl-loadlib-shellcode-esp.bin w32-testival.exe [$+800]=ascii:w32-dl-loadlib-shellcode-esp.bin eip=$+800 esp=$+7FF --EH | match_output.py "Hello, world![\r\n]*" --verbose > nul IF ERRORLEVEL 1 GOTO :FAILED EXIT /B 0 :FAILED ECHO * Test failed! EXIT /B %ERRORLEVEL%```
2a27b1ce-6d2b-407e-a4df-1cee24079c4e
{ "language": "Batchfile" }
```batchfile del "spec/*.js" call tsc "spec/ActorSpec.ts" -out "spec/ActorSpec.js" call tsc "spec/ColorSpec.ts" -out "spec/ColorSpec.js" call tsc "spec/PromiseSpec.ts" -out "spec/PromiseSpec.js" call tsc "spec/CollectionSpec.ts" -out "spec/CollectionSpec.js" call tsc "spec/LogSpec.ts" -out "spec/LogSpec.js" call jasmine-node --verbose spec/``` Add new specs to bat
```batchfile del "spec/*.js" call tsc "spec/ActorSpec.ts" -out "spec/ActorSpec.js" call tsc "spec/ColorSpec.ts" -out "spec/ColorSpec.js" call tsc "spec/PromiseSpec.ts" -out "spec/PromiseSpec.js" call tsc "spec/CollectionSpec.ts" -out "spec/CollectionSpec.js" call tsc "spec/LogSpec.ts" -out "spec/LogSpec.js" call tsc "spec/ClassSpec.ts" -out "spec/ClassSpec.js" call tsc "spec/TimerSpec.ts" -out "spec/TimerSpec.js" call jasmine-node --verbose spec/```
40dffc35-d87a-4aa0-b3e1-9c55204599e0
{ "language": "Batchfile" }
```batchfile @echo off :: To run tests outside of MSBuild.exe :: %1 is the path to the tests\<OSConfig> folder pushd %1 FOR /D %%F IN (*.Tests) DO ( pushd %%F\dnxcore50 @echo "corerun.exe xunit.console.netcore.exe %%F.dll -xml testResults.xml -notrait category=failing -notrait category=nonwindowstests" corerun.exe xunit.console.netcore.exe %%F.dll -notrait category=failing -notrait category=nonwindowstests popd ) popd``` Exclude perf tests from nano runs.
```batchfile @echo off :: To run tests outside of MSBuild.exe :: %1 is the path to the tests\<OSConfig> folder pushd %1 FOR /D %%F IN (*.Tests) DO ( pushd %%F\dnxcore50 @echo "corerun.exe xunit.console.netcore.exe %%F.dll -xml testResults.xml -notrait category=failing -notrait category=nonwindowstests -notrait Benchmark=true" corerun.exe xunit.console.netcore.exe %%F.dll -notrait category=failing -notrait category=nonwindowstests -notrait Benchmark=true popd ) popd```
9e9de264-4169-4731-8e4e-3ffe0e579836
{ "language": "Batchfile" }
```batchfile @rem Copyright 2018 gRPC authors. @rem @rem Licensed under the Apache License, Version 2.0 (the "License"); @rem you may not use this file except in compliance with the License. @rem You may obtain a copy of the License at @rem @rem http://www.apache.org/licenses/LICENSE-2.0 @rem @rem Unless required by applicable law or agreed to in writing, software @rem distributed under the License is distributed on an "AS IS" BASIS, @rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @rem See the License for the specific language governing permissions and @rem limitations under the License. @echo "Starting Windows build" cd /d %~dp0 cd ..\.. git submodule update --init git submodule foreach --recursive git submodule update --init set ARTIFACTS_OUT=artifacts cd packages\grpc-native-core call tools\run_tests\artifacts\build_artifact_node.bat cd ..\.. move packages\grpc-native-core\artifacts . ``` Build failures on Windows should be noticed.
```batchfile @rem Copyright 2018 gRPC authors. @rem @rem Licensed under the Apache License, Version 2.0 (the "License"); @rem you may not use this file except in compliance with the License. @rem You may obtain a copy of the License at @rem @rem http://www.apache.org/licenses/LICENSE-2.0 @rem @rem Unless required by applicable law or agreed to in writing, software @rem distributed under the License is distributed on an "AS IS" BASIS, @rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @rem See the License for the specific language governing permissions and @rem limitations under the License. @echo "Starting Windows build" cd /d %~dp0 cd ..\.. git submodule update --init git submodule foreach --recursive git submodule update --init set ARTIFACTS_OUT=artifacts cd packages\grpc-native-core call tools\run_tests\artifacts\build_artifact_node.bat || goto :error cd ..\.. move packages\grpc-native-core\artifacts . goto :EOF :error exit /b 1 ```
21c5e2f4-1365-4c9c-ae4e-1c7cb0a64c05
{ "language": "Batchfile" }
```batchfile ECHO Clone Dolphin image environment git clone -q --branch=master https://github.com/dolphinsmalltalk/Dolphin.git Dolphin ECHO Copy executables copy ..\..\Dolphin7.exe Dolphin copy ..\..\DolphinVM7.dll Dolphin copy ..\..\DolphinCR7.dll Dolphin copy ..\..\DolphinDR7.dll Dolphin copy ..\..\DolphinSureCrypto.dll Dolphin ECHO Boot and test image cd Dolphin Dolphin7 DBOOT.img7 DolphinProfessional DIR DBOOT*, DPRO* CALL TestDPRO set errorCode=%ERRORLEVEL% DIR DPRO* EXIT errorCode ``` Use proper reference to error code.
```batchfile ECHO Clone Dolphin image environment git clone -q --branch=master https://github.com/dolphinsmalltalk/Dolphin.git Dolphin ECHO Copy executables copy ..\..\Dolphin7.exe Dolphin copy ..\..\DolphinVM7.dll Dolphin copy ..\..\DolphinCR7.dll Dolphin copy ..\..\DolphinDR7.dll Dolphin copy ..\..\DolphinSureCrypto.dll Dolphin ECHO Boot and test image cd Dolphin Dolphin7 DBOOT.img7 DolphinProfessional DIR DBOOT*, DPRO* CALL TestDPRO set errorCode=%ERRORLEVEL% DIR DPRO* EXIT %errorCode% ```
d400f2ab-2548-4400-9b34-d969c91e3855
{ "language": "Batchfile" }
```batchfile @echo off set DIR=%~dp0 set LIB="%DIR%\..\lib\*" set BIN="%DIR%\..\bin\*" REM ??? echo {^ "type" : "jdbc",^ "jdbc" : {^ "url" : "jdbc:mysql://localhost:3306/test",^ "user" : "",^ "password" : "",^ "sql" : "select *, page_id as _id from page",^ "treat_binary_as_string" : true,^ "elasticsearch" : {^ "cluster" : "elasticsearch",^ "host" : "localhost",^ "port" : 9300^ },^ "index" : "metawiki"^ }^ } "%JAVA_HOME%\bin\java" -cp "%LIB%" -Dlog4j.configurationFile="%BIN%\log4j2.xml" "org.xbib.tools.Runner" "org.xbib.tools.JDBCImporter" ``` Update the windows bat file to make it work.Pass the parameters to next java command as an argument
```batchfile @echo off set DIR=%~dp0 set LIB=%DIR%..\lib\* set BIN=%DIR%..\bin REM ??? echo {^ "type" : "jdbc",^ "jdbc" : {^ "url" : "jdbc:mysql://localhost:3306/test",^ "user" : "",^ "password" : "",^ "sql" : "select *, page_id as _id from page",^ "treat_binary_as_string" : true,^ "elasticsearch" : {^ "cluster" : "elasticsearch",^ "host" : "localhost",^ "port" : 9300^ },^ "index" : "metawiki"^ }^ }^ | "%JAVA_HOME%\bin\java" -cp "%LIB%" -Dlog4j.configurationFile="%BIN%\log4j2.xml" "org.xbib.tools.Runner" "org.xbib.tools.JDBCImporter" ```
9b267aba-4be6-4ece-bf68-8e01ab154dfa
{ "language": "Batchfile" }
```batchfile ``` Add database startup script for Windows
```batchfile @echo off REM This script starts PostgreSQL on Windows. It assumes that you: REM - installed PostgreSQL to the default folder; REM - are using the postgres account; REM - have configured the 'trust' authentication mechanism (no password). set PGDATA=C:\Program Files\PostgreSQL\9.5\data set PGHOST=127.0.0.1 set PGPORT=5432 set PGUSER=postgres "C:\Program Files\PostgreSQL\9.5\bin\postgres.exe"```
b1f696dc-9632-400b-b517-1eb9a8195548
{ "language": "Batchfile" }
```batchfile @echo on :: ``` Add Windows version of demo.
```batchfile @echo on :: :: Demo _some_ of the stompngo examples. :: IF [%SNGD%]==[] SET SNGD=C:\gosrc\src\github.com\gmallard\stompngo_examples echo %SNGD% IF [%STOMP_HOST%]==[] SET STOMP_HOST=192.168.1.200 echo %STOMP_HOST% :: set STOMP_NMSGS=1 set STOMP_NQS=1 :: cd %SNGD% :: set STOMP_DEST=/queue/snge.ack go run publish\publish.go set STOMP_DEST=/queue/snge.ack.1 go run ack\ack.go :: set STOMP_USEEOF=y set STOMP_DEST=/queue/snge.rdr go run publish\publish.go set STOMP_USEEOF=y set STOMP_DEST=/queue/snge.rdr.1 go run adhoc\reader\reader.go :: go run conndisc\conndisc.go :: :: Port 61611: AMQ, TLS, No cert required set STOMP_PORT=61611 go run conndisc_tls\conndisc_tls.go :: set STOMP_PORT=61613 go run srmgor_1conn\srmgor_1conn.go go run srmgor_1smrconn\srmgor_1smrconn.go go run srmgor_2conn\srmgor_2conn.go go run srmgor_manyconn\srmgor_manyconn.go :: set STOMP_USEEOF=y set STOMP_DEST=/queue/snge.sub go run publish\publish.go set STOMP_USEEOF=y set STOMP_DEST=/queue/snge.sub.1 set STOMP_NMSGS=2 go run subscribe\subscribe.go :: ```
4a51e33b-544d-4ff0-95ca-b82259063706
{ "language": "Batchfile" }
```batchfile @echo on call "%VS110COMNTOOLS%vsvars32.bat" REM Portable project msbuild.exe /ToolsVersion:4.0 "..\Espera\Espera.sln" /p:configuration=Release set ReleaseDir=..\Release\ REM Cleanup before we create and copy everything rmdir %ReleaseDir% /s /q set ReleaseDirPortable=%ReleaseDir%Portable\ mkdir %ReleaseDirPortable% set bin=..\Espera\Espera.View\bin\Release\ copy %bin%*.dll %ReleaseDirPortable% copy %bin%Espera.exe %ReleaseDirPortable% copy %bin%Espera.exe.config %ReleaseDirPortable% copy ..\Changelog.txt %ReleaseDirPortable% REM ClickOnce project msbuild.exe /target:publish /p:configuration=Release ..\Espera\Espera.sln" set ReleaseDirSetup=%ReleaseDir%Setup\ mkdir %ReleaseDirSetup% xcopy /S /Y %bin%\app.publish %ReleaseDirSetup% pause``` Make build script less verbose
```batchfile @echo on call "%VS110COMNTOOLS%vsvars32.bat" REM Portable project msbuild.exe /ToolsVersion:4.0 /p:configuration=Release /v:minimal "..\Espera\Espera.sln" set ReleaseDir=..\Release\ REM Cleanup before we create and copy everything rmdir %ReleaseDir% /s /q set ReleaseDirPortable=%ReleaseDir%Portable\ mkdir %ReleaseDirPortable% set bin=..\Espera\Espera.View\bin\Release\ copy %bin%*.dll %ReleaseDirPortable% copy %bin%Espera.exe %ReleaseDirPortable% copy %bin%Espera.exe.config %ReleaseDirPortable% copy ..\Changelog.txt %ReleaseDirPortable% REM ClickOnce project msbuild.exe /target:publish /p:configuration=Release /v:minimal ..\Espera\Espera.sln" set ReleaseDirSetup=%ReleaseDir%Setup\ mkdir %ReleaseDirSetup% xcopy /S /Y %bin%\app.publish %ReleaseDirSetup% pause```
c07f001e-8191-4101-9ac9-b8e12411da02
{ "language": "Batchfile" }
```batchfile ``` Add support for compiling with cl on Windows
```batchfile @rem Turn off echoing of commands. @echo off rem Make sure local variables don't spill into the global environment. setlocal EnableExtensions rem Make sure we're in the src directory. pushd "%~dp0src" rem Treat the first parameter to this batch script as a target. set target=%1 rem If a target is specified, call the subroutine if "%target%"=="" (call :build) else (call :%target%) goto :end :build rem Compiler flags: rem /nologo Don't print tedious MS logo stuff in the beginning rem /DEBUG Compile in debug mode. rem /Z7 Create debug symbols as .pdb files rem /TC Compile as C, not C++ set CFLAGS=/nologo /DEBUG /Z7 /TC rem Compile the sources. cl %CFLAGS% main.c cpu.c gfx.c interconnect.c util.c exit /B :clean rem Delete all intermediate files. del *.obj *.exe *.o *.a *.lib *.pdb *.ilk exit /B :end rem Restore previous directory. popd ```
9417b2bb-43df-462d-97a3-549cb1c04cbc
{ "language": "Batchfile" }
```batchfile @ECHO OFF REM GIT Tag and Build nuget package IF "%1" == "" GOTO SyntaxError IF "%2" == "" GOTO SyntaxError REM main code git tag -a %1 -m "%2" cd GFDN.ThaiBahtText nuget pack GFDN.ThaiBahtText.csproj ^ -Version %1 ^ -Prop Configuration=Release ^ -OutputDirectory "Nuget Packages" cd .. @ECHO. @ECHO Push to GitHub git push origin --tags @ECHO. @ECHO Push to NuGet nuget push "GFDN.ThaiBahtText\NuGet Packages\ThaiBahtText.%1.nupkg" GOTO End :SyntaxError @ECHO Usage syntax: @ECHO. @ECHO nugetpack tag_number tag_name @ECHO. @ECHO Sample: @ECHO nugetpack 0.1 baby-peter GOTO End :End @ECHO ON ``` Make sure that push all updates before tagging them
```batchfile @ECHO OFF REM GIT Tag and Build nuget package IF "%1" == "" GOTO SyntaxError IF "%2" == "" GOTO SyntaxError REM main code git tag -a %1 -m "%2" cd GFDN.ThaiBahtText nuget pack GFDN.ThaiBahtText.csproj ^ -Version %1 ^ -Prop Configuration=Release ^ -OutputDirectory "Nuget Packages" cd .. @ECHO. @ECHO Push to GitHub git push origin master git push origin --tags @ECHO. @ECHO Push to NuGet nuget push "GFDN.ThaiBahtText\NuGet Packages\ThaiBahtText.%1.nupkg" GOTO End :SyntaxError @ECHO Usage syntax: @ECHO. @ECHO nugetpack tag_number tag_name @ECHO. @ECHO Sample: @ECHO nugetpack 0.1 baby-peter GOTO End :End @ECHO ON ```
92bafdbd-c6e8-410e-934a-cb3d5c725bfc
{ "language": "Batchfile" }
```batchfile ``` Add a batch file to build on Windows with MSVC.
```batchfile @setlocal @set TSCOMPILE=cl /nologo /O2 /W3 /c /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE /DWIN32 /DUSE_DL=1 @set TSLINK=link /nologo @set TSLIB=lib /nologo @if "%1" == "static" goto STATIC @if not exist bin\ ( mkdir bin ) %TSCOMPILE% /MT scheme.c dynload.c %TSLINK% /out:bin\tinyscheme.exe scheme.obj dynload.obj %TSCOMPILE% /MDd scheme.c dynload.c %TSLINK% /out:bin\tinyscheme_d.exe scheme.obj dynload.obj @goto END :STATIC @if not exist lib\ ( mkdir lib ) %TSCOMPILE% /DSTANDALONE=0 /MT scheme.c dynload.c %TSLIB% /out:lib\tinyscheme.lib scheme.obj dynload.obj %TSCOMPILE% /DSTANDALONE=0 /MDd scheme.c dynload.c %TSLIB% /out:lib\tinyscheme_d.lib scheme.obj dynload.obj :END del scheme.obj dynload.obj ```
98dcf090-f088-45e2-b4bb-1bca234a3d46
{ "language": "Batchfile" }
```batchfile @echo off rem This needed for pkg-config to detect pcl and eigen3 pc files set PKG_CONFIG_PATH=%LIBRARY_LIB%\pkgconfig rem Override distutils VS detection set DISTUTILS_USE_SDK=1 set MSSdk=1 rem Renames necessary for python-pcl to detect the libraries it needs for %%x in (io registration segmentation features filters sample_consensus surface search kdtree octree common) do ( copy /y %LIBRARY_LIB%\pcl_%%x_release.lib %LIBRARY_LIB%\pcl_%%x.lib > nul if errorlevel 1 exit 1 ) copy /y %LIBRARY_LIB%\flann_cpp_s.lib %LIBRARY_LIB%\flann_cpp.lib > nul if errorlevel 1 exit 1 rem Compile extension python setup.py config --compiler=msvc build --compiler=msvc install if errorlevel 1 exit 1 rem Remove library renames for %%x in (io registration segmentation features filters sample_consensus surface search kdtree octree common) do ( del %LIBRARY_LIB%\pcl_%%x.lib if errorlevel 1 exit 1 ) del %LIBRARY_LIB%\flann_cpp.lib if errorlevel 1 exit 1 ``` Fix grammar in a comment
```batchfile @echo off rem This is needed for pkg-config to detect pcl and eigen3 pc files set PKG_CONFIG_PATH=%LIBRARY_LIB%\pkgconfig rem Override distutils VS detection set DISTUTILS_USE_SDK=1 set MSSdk=1 rem Renames necessary for python-pcl to detect the libraries it needs for %%x in (io registration segmentation features filters sample_consensus surface search kdtree octree common) do ( copy /y %LIBRARY_LIB%\pcl_%%x_release.lib %LIBRARY_LIB%\pcl_%%x.lib > nul if errorlevel 1 exit 1 ) copy /y %LIBRARY_LIB%\flann_cpp_s.lib %LIBRARY_LIB%\flann_cpp.lib > nul if errorlevel 1 exit 1 rem Compile extension python setup.py config --compiler=msvc build --compiler=msvc install if errorlevel 1 exit 1 rem Remove library renames for %%x in (io registration segmentation features filters sample_consensus surface search kdtree octree common) do ( del %LIBRARY_LIB%\pcl_%%x.lib if errorlevel 1 exit 1 ) del %LIBRARY_LIB%\flann_cpp.lib if errorlevel 1 exit 1 ```
3ee2a8ce-3382-4935-b595-667157049d5c
{ "language": "Batchfile" }
```batchfile ``` Configure script ported to Windows
```batchfile @echo off rem ----- Ignore system ANT_HOME variable set ORIGINAL_ANT_HOME=%ANT_HOME% set ANT_HOME=tools\apache-ant-1.6.5 call %ANT_HOME%\bin\ant -version rem call %ANT_HOME%\bin\ant -f src\build\build.xml call %ANT_HOME%\bin\ant -f src\build\build.xml config rem call %ANT_HOME%\bin\ant -f src\build\build.xml -Djava.endorsed.dirs=lib\endorsed -logger org.apache.tools.ant.NoBannerLogger -emacs config rem ----- Restore ANT_HOME set ANT_HOME=%ORIGINAL_ANT_HOME% set ORIGINAL_ANT_HOME= ```
8e94ebe3-57a8-4ddd-ac8d-3d830590f75c
{ "language": "Batchfile" }
```batchfile @echo off chcp 65001>nul prompt [%USERNAME%@%COMPUTERNAME% $p]$_$$$s rem Fake a UNIX environment doskey clear=cls doskey ls=dir /d $* doskey cp=copy $* doskey mv=move $* doskey rm=del $* doskey cat=type $* doskey touch=type nul$G$G$* rem Easier navigation doskey cd=cd /D $* doskey cd..=cd .. doskey ..=cd .. doskey ...=cd ../.. doskey ....=cd ../../.. rem List files properly doskey l=dir /b $* doskey ll=dir /b $* rem Edit functionality IF NOT EXIST "C:\Program Files\Sublime Text 3" GOTO NOSUBLIME doskey edit="C:\Program Files\Sublime Text 3\sublime_text" $* :NOSUBLIME rem Open functionality doskey open=start $* @echo on ``` Use vscode as editor in windows
```batchfile @echo off chcp 65001>nul prompt [%USERNAME%@%COMPUTERNAME% $p]$_$$$s rem Fake a UNIX environment doskey clear=cls doskey ls=dir /d $* doskey cp=copy $* doskey mv=move $* doskey rm=del $* doskey cat=type $* doskey touch=type nul$G$G$* rem Easier navigation doskey cd=cd /D $* doskey cd..=cd .. doskey ..=cd .. doskey ...=cd ../.. doskey ....=cd ../../.. rem List files properly doskey l=dir /b $* doskey ll=dir /b $* rem Edit functionality IF NOT EXIST "C:\Program Files (x86)\Microsoft VS Code" GOTO NOVSCODE doskey edit="C:\Program Files (x86)\Microsoft VS Code\bin\code.cmd" $* GOTO NOSUBLIME :NOVSCODE IF NOT EXIST "C:\Program Files\Sublime Text 3" GOTO NOSUBLIME doskey edit="C:\Program Files\Sublime Text 3\sublime_text" $* :NOSUBLIME rem Open functionality doskey open=start $* @echo on ```
311b505f-99ae-4b7f-ae57-9661b1151d5b
{ "language": "Batchfile" }
```batchfile Set Book=%BookName%%1 Call Generate %Book% name SongTi FontSize48 Call Generate %Book% name QuanZiKuFont FontSize48 :: The following fonts generated unreadable characters. :: Call Generate %Book% name FangSong FontSize48 :: Call Generate %Book% name KaiTi FontSize48 :: The following fonts generated incomplete text. :: Call Generate %Book% name BeiShiDaFont FontSize48 :: Call Generate %Book% name JinWen FontSize48 :: Call Generate %Book% name LiShu FontSize48 :: Call Generate %Book% name JiaGuWen FontSize48 Set Destinaton=%OutputFolder%\%1 RmDir %Destinaton% /s /q MkDir %Destinaton% Move /Y %Book%*.pdf %Destinaton%``` Create more books for other font families
```batchfile Set Book=%BookName%%1 Call Generate %Book% name SongTi FontSize48 Call Generate %Book% name QuanZiKuFont FontSize48 :: The following fonts generated unreadable characters. :: Call Generate %Book% name FangSong FontSize48 :: Call Generate %Book% name KaiTi FontSize48 :: The following fonts generated incomplete text. REM Call Generate %Book% name BeiShiDaFont FontSize48 REM Call Generate %Book% name JinWen FontSize48 REM Call Generate %Book% name LiShu FontSize48 REM Call Generate %Book% name JiaGuWen FontSize48 Set Destinaton=%OutputFolder%\%1 RmDir %Destinaton% /s /q MkDir %Destinaton% Move /Y %Book%*.pdf %Destinaton%```
5607ba26-c143-4074-b8c1-7a1797e96c53
{ "language": "Batchfile" }
```batchfile "%sdkverpath%" -q -version:"%sdkver%" call setenv /x64 rem install python packages pip install --cache-dir C:/egg_cache nose pip install --cache-dir C:/egg_cache coverage pip install --cache-dir C:/egg_cache numpy pip install --cache-dir C:/egg_cache cython pip install --cache-dir C:/egg_cache babel==1.3 pip install --cache-dir C:/egg_cache Sphinx rem install traits python setup.py develop ``` Add comment explaining why we're forcing babel 1.3
```batchfile "%sdkverpath%" -q -version:"%sdkver%" call setenv /x64 rem install python packages pip install --cache-dir C:/egg_cache nose pip install --cache-dir C:/egg_cache coverage pip install --cache-dir C:/egg_cache numpy pip install --cache-dir C:/egg_cache cython rem Work around bug in babel 2.0: see mitsuhiko/babel#174 pip install --cache-dir C:/egg_cache babel==1.3 pip install --cache-dir C:/egg_cache Sphinx rem install traits python setup.py develop ```
2d38c5e3-2dac-4370-8bb5-adb92bc8f9e8
{ "language": "Batchfile" }
```batchfile @echo off NET SESSION >nul 2>&1 IF %ERRORLEVEL% NEQ 0 ( ECHO Not an admin, exiting. EXIT /B 1 ) setlocal EnableDelayedExpansion :: ############################ :: # Create symlinks from the home directory to any desired dotfiles directory. :: ############################ :: dotfiles directory set dotfilesdir=%USERPROFILE%\.dotfiles :: backup directory set backupdir=%USERPROFILE%\dotfiles_backup :: list of files/folders to symlink in homedir set dotfiles=bashrc bash_profile bash dir_colors inputrc minttyrc gitconfig for %%A in (%dotfiles%) DO ( set target=%dotfilesdir%\%%A set link=%USERPROFILE%\.%%A set linkExists="0" if exist "!link!" ( set Z=&& for %%B in ("!link!") do set Z=%%~aB if "!Z:~8,1!" == "l" ( set linkExists="1" ) else ( if not exist "%backupdir%" ( mkdir "%backupdir%"" ) echo Moving existing !link! to %backupdir% move "!link!" "%backupdir%" ) ) if !linkExists! == "0" ( if exist "!target!\" ( mklink /d "!link!" "!target!" ) else ( mklink "!link!" "!target!" ) ) ) ``` Set hidden attribute of links
```batchfile @echo off NET SESSION >nul 2>&1 IF %ERRORLEVEL% NEQ 0 ( ECHO Not an admin, exiting. EXIT /B 1 ) setlocal EnableDelayedExpansion :: ############################ :: # Create symlinks from the home directory to any desired dotfiles directory. :: ############################ :: dotfiles directory set dotfilesdir=%USERPROFILE%\.dotfiles :: backup directory set backupdir=%USERPROFILE%\dotfiles_backup :: list of files/folders to symlink in homedir set dotfiles=bashrc bash_profile bash dir_colors inputrc minttyrc gitconfig for %%A in (%dotfiles%) DO ( set target=%dotfilesdir%\%%A set link=%USERPROFILE%\.%%A set linkExists="0" if exist "!link!" ( set Z=&& for %%B in ("!link!") do set Z=%%~aB if "!Z:~8,1!" == "l" ( set linkExists="1" ) else ( if not exist "%backupdir%" ( mkdir "%backupdir%"" ) echo Moving existing !link! to %backupdir% move "!link!" "%backupdir%" ) ) if !linkExists! == "0" ( if exist "!target!\" ( mklink /d "!link!" "!target!" ) else ( mklink "!link!" "!target!" ) attrib /L "!link!" +h ) ) ```
33604c70-b424-4405-ab96-e3e6dd42b573
{ "language": "Batchfile" }
```batchfile @echo off set PYTHONPATH=%CD% C:\Python27\python.exe reader_archive\reader_archive.py %* ``` Replace absolute path of python
```batchfile @echo off set PYTHONPATH=%CD% python reader_archive\reader_archive.py %* ```
3030c37f-c4f2-489f-b4e7-519f938ac790
{ "language": "Batchfile" }
```batchfile SETLOCAL call call_vcvars.cmd set "_=%CD%" cd .. for /F %%1 in ('dir *.exe /B /S /A:-D') do (mt.exe -manifest "%%1.manifest" -outputresource:"%%1";1) for /F %%1 in ('dir *.dll /B /S /A:-D') do (mt.exe -manifest "%%1.manifest" -outputresource:"%%1";2) cd %_% ENDLOCAL pause``` Embed manifests in all files
```batchfile @echo off SETLOCAL call call_vcvars.cmd set "_=%CD%" cd .. for /F "delims=" %%1 in ('dir *.exe /B /S /A:-D') do (echo "%%1" && mt.exe -nologo -manifest "%%1.manifest" -outputresource:"%%1";1) for /F "delims=" %%1 in ('dir *.dll /B /S /A:-D') do (echo "%%1" && mt.exe -nologo -manifest "%%1.manifest" -outputresource:"%%1";2) cd %_% ENDLOCAL ```
7ab57371-008e-4f54-b33e-1d487efd0167
{ "language": "Batchfile" }
```batchfile set CFG=%USERPROFILE%\pydistutils.cfg echo [config] > "%CFG%" echo compiler=mingw32 >> "%CFG%" echo [build] >> "%CFG%" echo compiler=mingw32 >> "%CFG%" echo [build_ext] >> "%CFG%" echo compiler=mingw32 >> "%CFG%" "%PYTHON%" setup.py install --single-version-externally-managed if errorlevel 1 exit 1 ``` Replace setup.py by pip install.
```batchfile set CFG=%USERPROFILE%\pydistutils.cfg echo [config] > "%CFG%" echo compiler=mingw32 >> "%CFG%" echo [build] >> "%CFG%" echo compiler=mingw32 >> "%CFG%" echo [build_ext] >> "%CFG%" echo compiler=mingw32 >> "%CFG%" "%PYTHON%" -m pip install . --no-deps -vv if errorlevel 1 exit 1 ```
5f7f49af-b649-4837-876f-67e182cd815b
{ "language": "Batchfile" }
```batchfile @echo off set CURDIR=%CD% cd /d %~dp0 rem Create Makefile by MakeItSo ======================================= ..\3rdparty\makeitso\output\MakeItSo.exe -file=makefile.sln -config=MakeItSo.config rem Copy Makefie ====================================================== xcopy /Y /D ..\vs2015\*.makefile .\ cd /d %CURDIR% exit /b 0 :error cd /d %CURDIR% echo "Error=====" pause exit /b 1``` Add option to specify line feed type.
```batchfile @echo off set CURDIR=%CD% cd /d %~dp0 rem Create Makefile by MakeItSo ======================================= ..\3rdparty\makeitso\output\MakeItSo.exe -file=makefile.sln -config=MakeItSo.config -nl=crlf rem Copy Makefie ====================================================== xcopy /Y /D ..\vs2015\*.makefile .\ cd /d %CURDIR% exit /b 0 :error cd /d %CURDIR% echo "Error=====" pause exit /b 1```
d23b4ae1-f0a0-4df9-9548-2b6aaa24834a
{ "language": "Batchfile" }
```batchfile @ECHO OFF :: Note: We're not using parallel build (/m) because it doesn't seem to :: work with Sandcastle Help File Builder. "%ProgramFiles(x86)%\MSBuild\12.0\Bin\MSBuild.exe" %~dp0\build.proj /nologo /v:m /flp:verbosity=detailed %1 %2 %3 %4 %5 %6 %7 %8 %9 ``` Replace individual parameters with wildcard
```batchfile @ECHO OFF :: Note: We're not using parallel build (/m) because it doesn't seem to :: work with Sandcastle Help File Builder. "%ProgramFiles(x86)%\MSBuild\12.0\Bin\MSBuild.exe" %~dp0\build.proj /nologo /v:m /flp:verbosity=detailed %* ```
777ac542-4505-4d7f-8dfd-ecbbd23dca51
{ "language": "Batchfile" }
```batchfile @mkdir .shake 2> nul @set ghcArgs=--make ^ -Wall ^ src/Main.hs ^ -isrc ^ -rtsopts ^ -with-rtsopts=-I0 ^ -outputdir=.shake ^ -j ^ -O ^ -o .shake/build @set shakeArgs=--lint ^ --directory ^ ".." ^ %* @rem Unset GHC_PACKAGE_PATH variable, as otherwise ghc-cabal complains @if defined GHC_PACKAGE_PATH ( set GHC_PACKAGE_PATH ) @ghc %ghcArgs% && .shake\build %shakeArgs% ``` Reset GHC_PACKAGE_PATH varialbe (4th try).
```batchfile @mkdir .shake 2> nul @set ghcArgs=--make ^ -Wall ^ src/Main.hs ^ -isrc ^ -rtsopts ^ -with-rtsopts=-I0 ^ -outputdir=.shake ^ -j ^ -O ^ -o .shake/build @set shakeArgs=--lint ^ --directory ^ ".." ^ %* @rem Unset GHC_PACKAGE_PATH variable, as otherwise ghc-cabal complains @set GHC_PACKAGE_PATH= @ghc %ghcArgs% && .shake\build %shakeArgs% ```
e0599408-ad07-4f26-bedd-866b08d641c8
{ "language": "Batchfile" }
```batchfile ``` Add batch file that generates the local directory structure to allow the new AVR32 UC3 demo to be build using an Eclipse managed make project.
```batchfile REM This file should be executed from the command line prior to the first REM build. It will be necessary to refresh the Eclipse project once the REM .bat file has been executed (normally just press F5 to refresh). REM Copies all the required files from their location within the standard REM FreeRTOS directory structure to under the Eclipse project directory. REM This permits the Eclipse project to be used in 'managed' mode and without REM having to setup any linked resources. REM Have the files already been copied? IF EXIST FreeRTOS Goto END REM Create the required directory structure. MD FreeRTOS MD FreeRTOS\include MD FreeRTOS\portable\GCC\AVR32_UC3 MD FreeRTOS\portable\MemMang MD Common_Demo_Tasks MD Common_Demo_Tasks\Minimal MD Common_Demo_Tasks\include REM Copy the core kernel files. copy ..\..\Source\*.* FreeRTOS REM Copy the common header files copy ..\..\Source\include\*.* FreeRTOS\include REM Copy the portable layer files copy ..\..\Source\portable\GCC\AVR32_UC3\*.* FreeRTOS\portable\GCC\AVR32_UC3 REM Copy the basic memory allocation files copy ..\..\Source\portable\MemMang\heap_3.c FreeRTOS\portable\MemMang REM Copy the files that define the common demo tasks. copy ..\common\Minimal\BlockQ.c Common_Demo_Tasks\Minimal copy ..\common\Minimal\comtest.c Common_Demo_Tasks\Minimal copy ..\common\Minimal\death.c Common_Demo_Tasks\Minimal copy ..\common\Minimal\dynamic.c Common_Demo_Tasks\Minimal copy ..\common\Minimal\flash.c Common_Demo_Tasks\Minimal copy ..\common\Minimal\flop.c Common_Demo_Tasks\Minimal copy ..\common\Minimal\integer.c Common_Demo_Tasks\Minimal copy ..\common\Minimal\PollQ.c Common_Demo_Tasks\Minimal copy ..\common\Minimal\semtest.c Common_Demo_Tasks\Minimal REM Copy the common demo file headers. copy ..\common\include\*.* Common_Demo_Tasks\include : END ```
81840270-9e1c-44d7-9784-14b071dcbb53
{ "language": "Batchfile" }
```batchfile del log.txt ..\..\Bin\Release\v40\YC.YaccConstructor.exe -i .\..\..\..\YC.Abstract.SQL\src\TSQL\mssqlNonAbstract.yrd -c Linearize -g "RNGLR.Generator -table LALR -o RNGLR.sql.yrd.fs" ..\..\Bin\Release\v40\YC.YaccConstructor.exe -i .\..\..\..\YC.Abstract.SQL\src\TSQL\mssqlNonAbstract.yrd -c Linearize -g "RNGLR.EBNFGenerator -table LALR -o RNGLREBNF.sql.yrd.fs"``` Change script for gen pasrer
```batchfile del log.txt ..\..\Bin\Release\v40\YC.YaccConstructor.exe -i .\..\..\..\YC.Abstract.SQL\src\Grammars\TSQL\mssqlNonAbstract.yrd -c Linearize -g "RNGLR.EBNFGenerator -table LALR -o RNGLREBNF.sql.yrd.fs"```
22bb7979-c6ca-44a8-8cb6-81df6dac7219
{ "language": "Batchfile" }
```batchfile @ECHO OFF SET oldPath=%PATH% git.exe 2> NUL if %ERRORLEVEL%==9009 GOTO :trydefaultpath GOTO :EOF :trydefaultpath path=C:\Program Files (x86)\Git\cmd;%PATH% git.exe 2> NUL if %ERRORLEVEL%==9009 GOTO :showerror GOTO :EOF :showerror path=%oldPath% ECHO Git is not in your path and could not be found in C:\Program Files (x86)\Git\bin set /p install=" Do you want to install Git through Chocolatey [y/n]? " %=% if %install%==y ( GOTO :installgit ) else ( GOTO :cantcontinue ) :cantcontinue ECHO Can't complete the build without Git being in the path. Please add it to be able to continue. GOTO :EOF :installgit ECHO Installing Chocolatey first @powershell -NoProfile -ExecutionPolicy unrestricted -Command "iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))" && SET PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin ECHO Installing Git through Chocolatey choco install git path=C:\Program Files (x86)\Git\cmd;%path% ``` Update in case people have 64bit git installed
```batchfile @ECHO OFF SET oldPath=%PATH% git.exe 2> NUL if %ERRORLEVEL%==9009 GOTO :trydefaultpath GOTO :EOF :trydefaultpath path=C:\Program Files (x86)\Git\cmd;C:\Program Files\Git\cmd;%PATH% git.exe 2> NUL if %ERRORLEVEL%==9009 GOTO :showerror GOTO :EOF :showerror path=%oldPath% ECHO Git is not in your path and could not be found in C:\Program Files (x86)\Git\cmd set /p install=" Do you want to install Git through Chocolatey [y/n]? " %=% if %install%==y ( GOTO :installgit ) else ( GOTO :cantcontinue ) :cantcontinue ECHO Can't complete the build without Git being in the path. Please add it to be able to continue. GOTO :EOF :installgit ECHO Installing Chocolatey first @powershell -NoProfile -ExecutionPolicy unrestricted -Command "iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))" && SET PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin ECHO Installing Git through Chocolatey choco install git path=C:\Program Files (x86)\Git\cmd;%path% ```
34995e1e-a784-41c0-9f22-32e22d74009b
{ "language": "Batchfile" }
```batchfile @echo off rem This batch file is not actually used for the nightly build, but performs rem similar steps and is handy for testing the build with similar settings. rem It also demonstrates how to set up an automated build by calling Ant rem directly. rem Note, however, that this batch file will not clean the source tree before rem building. set batch_file_dir=%~dp0 set src_root=%batch_file_dir%\..\.. set log_filename=%src_root%\buildlog.xml set report_filename=%src_root%\buildreport.html if exist %log_filename% ( del %log_filename% ) call ant -f %src_root%\buildscripts\nightly\nightlybuild_Windows.xml ^ -listener org.apache.tools.ant.XmlLogger ^ -logger org.apache.tools.ant.listener.SimpleBigProjectLogger ^ -DXmlLogger.file=%log_filename% ^ -Dmm.versionstring=test_build if not exist %log_filename% ( echo Ant failed without producing XML log file exit /b 1 ) python -c "import sys" -c "if sys.version_info.major != 3 or sys.version_info.minor < 3: sys.exit(1)" if errorlevel 1 ( echo Python 3.3 or later required to generate build error report exit /b ) python %src_root%\buildscripts\nightly\genreport_Windows.py %src_root% %log_filename% %report_filename% start %report_filename% ``` Tweak nightly build test script.
```batchfile @echo off setlocal enableextensions enabledelayedexpansion rem This batch file is not actually used for the nightly build, but performs rem similar steps and is handy for testing the build with similar settings. rem It also demonstrates how to set up an automated build by calling Ant rem directly. rem Note, however, that this batch file will not clean the source tree before rem building. set batch_file_dir=%~dp0 set src_root=%batch_file_dir%\..\.. set log_filename=%src_root%\buildlog.xml set report_filename=%src_root%\buildreport.html if exist %log_filename% ( del %log_filename% ) rem Prevent 'only one logger' error. set ANT_ARGS= call ant -f %src_root%\buildscripts\nightly\nightlybuild_Windows.xml ^ -listener org.apache.tools.ant.XmlLogger ^ -logger org.apache.tools.ant.listener.SimpleBigProjectLogger ^ -DXmlLogger.file=%log_filename% ^ -Dmm.versionstring=test_build if not exist %log_filename% ( echo Ant failed without producing XML log file exit /b 1 ) python -c "import sys" -c "if sys.version_info.major != 3 or sys.version_info.minor < 3: sys.exit(1)" if errorlevel 1 ( echo Python 3.3 or later required to generate build error report exit /b ) python %src_root%\buildscripts\nightly\genreport_Windows.py %src_root% %log_filename% %report_filename% start %report_filename% ```
4343cccc-9d96-4fd8-9627-be18d7a3dad1
{ "language": "Batchfile" }
```batchfile ``` Add worker batch script for windows
```batchfile cd C:\srhome\stoneridge C:\Python27\python.exe C:\srhome\stoneridge\srrun.py C:\srhome\stoneridge\windows\srwebworker.py --config C:\srhome\stoneridge.ini --log C:\srhome\srworker.log ```
e5d0d22a-8f02-40c7-b0c4-a0568eccadc8
{ "language": "Batchfile" }
```batchfile SET BUILD_ATOM_RELEASES_S3_KEY=%BUILD_ATOM_WIN_RELEASES_S3_KEY% SET BUILD_ATOM_RELEASES_S3_SECRET=%BUILD_ATOM_WIN_RELEASES_S3_SECRET% SET BUILD_ATOM_RELEASES_S3_BUCKET=%BUILD_ATOM_WIN_RELEASES_S3_BUCKET% ECHO Here I go Windowsing again @IF EXIST "%~dp0\node.exe" ( "%~dp0\node.exe" "%~dp0\cibuild" %* ) ELSE ( node "%~dp0\cibuild" %* ) ``` Revert "Let's see if we get here."
```batchfile SET BUILD_ATOM_RELEASES_S3_KEY=%BUILD_ATOM_WIN_RELEASES_S3_KEY% SET BUILD_ATOM_RELEASES_S3_SECRET=%BUILD_ATOM_WIN_RELEASES_S3_SECRET% SET BUILD_ATOM_RELEASES_S3_BUCKET=%BUILD_ATOM_WIN_RELEASES_S3_BUCKET% @IF EXIST "%~dp0\node.exe" ( "%~dp0\node.exe" "%~dp0\cibuild" %* ) ELSE ( node "%~dp0\cibuild" %* ) ```
883d0b5f-aa47-44f8-94af-17c631c8231d
{ "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% REM CALL %BASEDIR%\test-setup REM CALL %BASEDIR%\test-run %* behave %* ``` Remove override of output dir on Windows
```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% REM 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 %* ```
39588b64-950b-4500-bf9a-52c000541993
{ "language": "Batchfile" }
```batchfile ``` Add script to remove global grepWin context menu
```batchfile @echo off setlocal EnableDelayedExpansion set registryRoot=HKCU\Software\Classes reg delete %registryRoot%\*\shell\grepWin... reg delete %registryRoot%\*\shell\grepWin... reg delete %registryRoot%\Directory\background\shell\grepWin... reg delete %registryRoot%\Directory\shell\grepWin... reg delete %registryRoot%\Drive\shell\grepWin... reg delete %registryRoot%\Folder\shell\grepWin... ```
a1b441fe-1847-470d-82cf-7c15d3ac8618
{ "language": "Batchfile" }
```batchfile @ECHO OFF ECHO This will install Topographica and its package dependencies. if "%1"=="" ECHO If default path is not acceptable, enter path as parameter to setup.bat if NOT "%1"=="" ECHO Target is %1\Topographica\ REM Developer's Note: Install Python then call the setup.py script REM inside the external/win32 directory. REM $Id: setup.bat,v 1.6 2004/06/30 15:43:59 judah Exp $ external\win32\util\Y_OR_N /Q /A "Do you wish to continue? [Y/n]" IF ERRORLEVEL 3 GOTO :INSTALL IF ERRORLEVEL 2 GOTO :EXIT IF ERRORLEVEL 1 GOTO :INSTALL :INSTALL ftype Python.File | findstr "Python.File=" IF ERRORLEVEL 1 GOTO :INSTALL_PYTHON IF ERRORLEVEL 0 GOTO :RUN_SETUP :INSTALL_PYTHON ECHO Python file associations not detected: Installing Python 2.4 start /wait external\win32\python-2.4.msi :RUN_SETUP cd external\win32 cd start /wait setup.py configure start /wait /B setup.py install %1 :EXIT ECHO Install Complete ``` Upgrade Python 2.4.2 for Windows
```batchfile @ECHO OFF ECHO This will install Topographica and its package dependencies. if "%1"=="" ECHO If default path is not acceptable, enter path as parameter to setup.bat if NOT "%1"=="" ECHO Target is %1\Topographica\ REM Developer's Note: Install Python then call the setup.py script REM inside the external/win32 directory. REM $Id: setup.bat,v 1.6 2004/06/30 15:43:59 judah Exp $ external\win32\util\Y_OR_N /Q /A "Do you wish to continue? [Y/n]" IF ERRORLEVEL 3 GOTO :INSTALL IF ERRORLEVEL 2 GOTO :EXIT IF ERRORLEVEL 1 GOTO :INSTALL :INSTALL ftype Python.File | findstr "Python.File=" IF ERRORLEVEL 1 GOTO :INSTALL_PYTHON IF ERRORLEVEL 0 GOTO :RUN_SETUP :INSTALL_PYTHON ECHO Python file associations not detected: Installing Python 2.4 start /wait external\win32\python-2.4.2.msi :RUN_SETUP cd external\win32 cd start /wait setup.py configure start /wait /B setup.py install %1 :EXIT ECHO Install Complete ```
7bcb1e1c-13c0-4e18-a6a0-dc242dd7b750
{ "language": "Batchfile" }
```batchfile ``` Add a script for stress testing load/unload.
```batchfile :Beg driver --load --path C:\Code\hadesmem\dist\debug\x64\chimera.sys --name Chimera driver --unload --path C:\Code\hadesmem\dist\debug\x64\chimera.sys --name Chimera goto Beg ```
8f476635-90db-4229-80c2-130f5c351dc9
{ "language": "Batchfile" }
```batchfile @setlocal @prompt $G$S @set CMDHOME=%~dp0. @if NOT "%VS120COMNTOOLS%"=="" ( @set VSTOOLSDIR="%VS120COMNTOOLS%" @set VSVER=Visual Studio 2013 ) else ( @set VSTOOLSDIR="%VS110COMNTOOLS%" @set VSVER=Visual Studio 2012 ) @set PKG=Orleans Tools for %VSVER% @echo --- Uninstalling %PKG% @Echo -- VS Tools directory = %VSTOOLSDIR% @Echo - Unsetting OrleansSDK environment variable SetX.exe OrleansSDK "" @ECHO - Uninstalling Visual Studio extension package %PKG% %VSTOOLSDIR%\..\IDE\vsixinstaller.exe /uninstall:462db41f-31a4-48f0-834c-1bdcc0578511 @echo --- Finished uninstalling %PKG% @pause ``` Add path to 2015 VS Tools.
```batchfile @setlocal @prompt $G$S @set CMDHOME=%~dp0. @if NOT "%VS140COMNTOOLS%"=="" ( @set VSTOOLSDIR="%VS140COMNTOOLS%" @set VSVER=Visual Studio 2015 ) else ( @if NOT "%VS120COMNTOOLS%"=="" ( @set VSTOOLSDIR="%VS120COMNTOOLS%" @set VSVER=Visual Studio 2013 ) else ( @set VSTOOLSDIR="%VS110COMNTOOLS%" @set VSVER=Visual Studio 2012 ) ) @set PKG=Orleans Tools for %VSVER% @echo --- Uninstalling %PKG% @Echo -- VS Tools directory = %VSTOOLSDIR% @Echo - Unsetting OrleansSDK environment variable SetX.exe OrleansSDK "" @ECHO - Uninstalling Visual Studio extension package %PKG% %VSTOOLSDIR%\..\IDE\vsixinstaller.exe /uninstall:462db41f-31a4-48f0-834c-1bdcc0578511 @echo --- Finished uninstalling %PKG% @pause ```
475c45c2-cd3a-432d-8300-6bcf6e5d2dd5
{ "language": "Batchfile" }
```batchfile curl -sSf https://static.rust-lang.org/dist/rust-1.22.1-i686-pc-windows-msvc.exe -o rust.exe rust.exe /VERYSILENT /NORESTART /DIR="C:\Rust" set PATH=%PATH%;C:\Rust\bin curl -sSf http://releases.llvm.org/%LLVM_VERSION%/LLVM-%LLVM_VERSION%-win32.exe -o LLVM.exe 7z x LLVM.exe -oC:\LLVM set PATH=%PATH%;C:\LLVM\bin set LIBCLANG_PATH=C:\LLVM\bin ``` Update Rust version used by Appveyor
```batchfile curl -sSf https://static.rust-lang.org/dist/rust-1.24.0-i686-pc-windows-msvc.exe -o rust.exe rust.exe /VERYSILENT /NORESTART /DIR="C:\Rust" set PATH=%PATH%;C:\Rust\bin curl -sSf http://releases.llvm.org/%LLVM_VERSION%/LLVM-%LLVM_VERSION%-win32.exe -o LLVM.exe 7z x LLVM.exe -oC:\LLVM set PATH=%PATH%;C:\LLVM\bin set LIBCLANG_PATH=C:\LLVM\bin ```
2b90d1c3-9c84-4e96-bc81-fcb33224493d
{ "language": "Batchfile" }
```batchfile REM Start Max patch START "" "C:\Program Files\Cycling '74\Max Runtime 6.1\maxRT.exe" C:\eim\EiMpatch\EmotionInMotion.maxproj TIMEOUT 15 REM Set Node.js environment to production SET NODE_ENV=production REM Switch to EiM directory CD c:\eim REM Start Node.js server C:\Users\EmotionInMotionV2\AppData\Roaming\npm\grunt default ``` Update startup script with new path and to bypass Grunt
```batchfile REM Start Max patch START "" "C:\Program Files\Cycling '74\Max Runtime 6.1\maxRT.exe" C:\eim\MaxMSP\EmotionInMotion\EmotionInMotion.maxproj TIMEOUT 15 REM Set Node.js environment to production SET NODE_ENV=production REM Switch to EiM directory CD c:\eim REM Start Node.js server #C:\Users\EmotionInMotionV2\AppData\Roaming\npm\grunt default node server.js ```
f486de03-64c3-4caf-b0b4-d81ea1e2f1a4
{ "language": "Batchfile" }
```batchfile ``` Add a script to install MSVC debugging visualizers from Eigen
```batchfile copy "%~dp0..\vendor\eigen-3.2.6\debug\msvc\*.natvis" "%USERPROFILE%\My Documents\Visual Studio 2015\Visualizers" copy "%~dp0..\vendor\eigen-3.2.6\debug\msvc\*.natvis" "%USERPROFILE%\My Documents\Visual Studio 2013\Visualizers"```
82cc221a-5518-464f-8891-2272d83c4a89
{ "language": "Batchfile" }
```batchfile powershell -File A:\scripts\docker\add-docker-group.ps1 powershell -File A:\scripts\docker\install-docker.ps1 powershell -File A:\scripts\docker\open-docker-insecure-port.ps1 powershell -File A:\scripts\docker\remove-docker-key-json.ps1 ``` Fix path to floppy files
```batchfile powershell -File A:\add-docker-group.ps1 powershell -File A:\install-docker.ps1 powershell -File A:\open-docker-insecure-port.ps1 powershell -File A:\remove-docker-key-json.ps1 ```
a66fad94-910c-48e5-83a3-7f5999f59f29
{ "language": "Batchfile" }
```batchfile @echo off setlocal cd "%~dp0" if exist "dist-examples" rmdir /s /q "dist-examples" for /d %%a in ("Examples/WPF/*") do ( echo Examples/WPF/%%~a mkdir "dist-examples/WPF/%%~a" xcopy /s /d /q "Examples/WPF/%%~a/bin/Release" "dist-examples/WPF/%%~a\" ) for /d %%a in ("Examples/WPF.SharpDX/*") do ( echo Examples/WPF.SharpDX/%%~a mkdir "dist-examples/WPF.SharpDX/%%~a" xcopy /s /d /q "Examples/WPF.SharpDX/%%~a/bin/Release" "dist-examples/WPF.SharpDX/%%~a\" ) ``` Add SharpDX.Core examples into example package
```batchfile @echo off setlocal cd "%~dp0" if exist "dist-examples" rmdir /s /q "dist-examples" for /d %%a in ("Examples/WPF/*") do ( echo Examples/WPF/%%~a mkdir "dist-examples/WPF/%%~a" xcopy /s /d /q "Examples/WPF/%%~a/bin/Release" "dist-examples/WPF/%%~a\" ) for /d %%a in ("Examples/WPF.SharpDX/*") do ( echo Examples/WPF.SharpDX/%%~a mkdir "dist-examples/WPF.SharpDX/%%~a" xcopy /s /d /q "Examples/WPF.SharpDX/%%~a/bin/Release" "dist-examples/WPF.SharpDX/%%~a\" ) for /d %%a in ("Examples/WPF.SharpDX/*") do ( echo Examples/SharpDX.Core/%%~a mkdir "dist-examples/SharpDX.Core/%%~a" xcopy /s /d /q "Examples/SharpDX.Core/%%~a/bin/Release" "dist-examples/SharpDX.Core/%%~a\" )```
696b2d9c-985c-402d-9f8b-0dfd96e1485b
{ "language": "Batchfile" }
```batchfile set LIB=%LIBRARY_LIB%;%LIB% set LIBPATH=%LIBRARY_LIB%;%LIBPATH% set INCLUDE=%LIBRARY_INC%;%INCLUDE% ECHO [directories] > setup.cfg ECHO basedirlist = %LIBRARY_PREFIX% >> setup.cfg ECHO [packages] >> setup.cfg ECHO tests = False >> setup.cfg ECHO sample_data = False >> setup.cfg ECHO toolkits_tests = False >> setup.cfg rem matplotlib will link to png, zlib statically if it exists. Replace the static library with shared del %LIBRARY_LIB%\libpng16_static.lib copy %LIBRARY_LIB%\libpng16.lib %LIBRARY_LIB%\libpng16_static.lib del %LIBRARY_LIB%\zlibstatic.lib copy %LIBRARY_LIB%\z.lib %LIBRARY_LIB%\zlibstatic.lib %PYTHON% -m pip install . --no-deps -vv if errorlevel 1 exit 1 ``` Remove unneeded handling of static libraries on windows
```batchfile set LIB=%LIBRARY_LIB%;%LIB% set LIBPATH=%LIBRARY_LIB%;%LIBPATH% set INCLUDE=%LIBRARY_INC%;%INCLUDE% ECHO [directories] > setup.cfg ECHO basedirlist = %LIBRARY_PREFIX% >> setup.cfg ECHO [packages] >> setup.cfg ECHO tests = False >> setup.cfg ECHO sample_data = False >> setup.cfg ECHO toolkits_tests = False >> setup.cfg %PYTHON% -m pip install . --no-deps -vv if errorlevel 1 exit 1 ```
6071c006-f903-41ff-92ab-84b0b4495d1c
{ "language": "Batchfile" }
```batchfile java -Xmx256m -Xms32m -jar SimpleServer.jar pause ``` Revert "fix console input echo"
```batchfile @echo off java -Xmx256m -Xms32m -jar SimpleServer.jar pause ```
bf82ccf1-06c2-4e8f-ae4e-03728da8251a
{ "language": "Batchfile" }
```batchfile @ECHO OFF pushd "%~dp0.." SET parentDir=%cd% popd SET SUFFIX=%1 IF '%SUFFIX%' == '' GOTO NOSUFFIX for /f %%a in ('findstr /sm packOptions %parentDir%\src\project.json') do dotnet pack %%a --no-build -c Release -o "%parentDir%\nugets" --version-suffix %SUFFIX% "%~dp0\nuget.exe" pack "%parentDir%\nuspecs\Suite\Microsoft.Diagnostics.EventFlow.Suite.nuspec" -OutputDirectory "%parentDir%\nugets" -Suffix %SUFFIX% GOTO END :NOSUFFIX for /f %%a in ('findstr /sm packOptions %parentDir%\src\project.json') do dotnet pack %%a --no-build -c Release -o "%parentDir%\nugets" "%~dp0\nuget.exe" pack "%parentDir%\nuspecs\Suite\Microsoft.Diagnostics.EventFlow.Suite.nuspec" -OutputDirectory "%parentDir%\nugets" GOTO END :END``` Allow building Nuget packages out of Debug binaries
```batchfile @ECHO OFF pushd "%~dp0.." SET parentDir=%cd% popd SET CONFIGURATION=%2 IF '%CONFIGURATION%' == '' SET CONFIGURATION=Release SET SUFFIX=%1 IF '%SUFFIX%' == '' GOTO NOSUFFIX for /f %%a in ('findstr /sm packOptions %parentDir%\src\project.json') do dotnet pack %%a --no-build -c %CONFIGURATION% -o "%parentDir%\nugets" --version-suffix %SUFFIX% "%~dp0\nuget.exe" pack "%parentDir%\nuspecs\Suite\Microsoft.Diagnostics.EventFlow.Suite.nuspec" -OutputDirectory "%parentDir%\nugets" -Suffix %SUFFIX% GOTO END :NOSUFFIX for /f %%a in ('findstr /sm packOptions %parentDir%\src\project.json') do dotnet pack %%a --no-build -c %CONFIGURATION% -o "%parentDir%\nugets" "%~dp0\nuget.exe" pack "%parentDir%\nuspecs\Suite\Microsoft.Diagnostics.EventFlow.Suite.nuspec" -OutputDirectory "%parentDir%\nugets" GOTO END :END```
bb7ce041-5751-4ff9-9782-9ce9f6f35540
{ "language": "Batchfile" }
```batchfile @echo off echo "Not yet" ``` Switch statement in batch file
```batchfile @echo off IF "%~1"=="" ( goto usage ) ELSE IF "%~1"=="init" ( mkdir _pill\bin set CONDA_BIN_PATH="conda info --root" set CONDA_DEFAULT_ENV ) ELSE IF "%~1"=="in" ( echo "Ready to go in" ) ELSE IF "%~1" == "out" ( echo "Ready to go out" ) ELSE ( echo "error" goto usage exit /b 1 ) exit /b :usage echo usage: pill [COMMAND] echo. echo SYNOPSIS echo Create a local python and conda environment in the current directory. echo When activated all the libraries will be installed and imported from echo the '_pill' directory in the root of your project. echo. echo USAGE echo Create and run temporal/local environments. echo. echo $ pill init echo $ source pill in echo $ source pill out echo. echo COMMANDS echo init Creates the .pill directory and create links. echo in Modifies CONDA_DEFAULT_ENV and PATH to use echo the .pill directory and sets the PILL_NAME variable. echo out Restores the previous CONDA_DEFAULT_ENV and PATH. Also echo unsets PILL_NAME. echo. exit /b :create_symlinks exit /b :backup set PILL_OLD_PATH=%PATH% set PILL_OLD_CONDA_DEFAULT_ENV=%CONDA_DEFAULT_ENV% set PILL_PROMPT=%PROMPT% exit /b :remove_current_conda set CONDA_BIN_PATH="conda info --root" set CONDA_BIN_PATH="%CONDA_BIN_PATH%\bin" PATH=:$PATH: PATH=${PATH//:$CONDA_BIN_PATH:/:} exit /b ```
96f0e716-b8e8-4143-823f-5ab008ce084f
{ "language": "Batchfile" }
```batchfile @echo off echo. echo === TEST === echo. dotnet test --configuration Release src/DeepEqual.Test/DeepEqual.Test.csproj echo. echo === PACKAGE === echo. dotnet pack --include-symbols --include-source --configuration Release --output ..\.. src\DeepEqual\DeepEqual.csproj echo. pause``` Add steps for packaging Json extension. Use snupkg format for symbols.
```batchfile @echo off echo. echo === TEST === echo. dotnet test --configuration Release src/DeepEqual.Test/DeepEqual.Test.csproj echo. echo === PACKAGE === echo. dotnet pack ^ --include-symbols ^ -p:SymbolPackageFormat=snupkg ^ --include-source ^ --configuration Release ^ --output . ^ src\DeepEqual\DeepEqual.csproj dotnet pack ^ --include-symbols ^ -p:SymbolPackageFormat=snupkg ^ --include-source ^ --configuration Release ^ --output . ^ src\DeepEqual.System.Text.Json\DeepEqual.System.Text.Json.csproj echo. pause```
b37aa46a-7d66-43cf-b99b-b6f64140ff5d
{ "language": "Batchfile" }
```batchfile ``` Add a script to set up symlinks in P: and game dir
```batchfile @echo off set source_dir=%~dp0\.. set arma3_dir=C:\Program Files (x86)\Steam\steamApps\common\Arma 3 IF NOT EXIST P: GOTO NODRIVE IF NOT EXIST %arma3_dir% GOTO NOARMA3DIR mkdir P:\z mkdir "%arma3_dir%\z" echo "Run this script as administrator!" mklink /D "%arma3_dir%\z\hehu" "%source_dir%" mklink /D "P:\z\hehu" "%source_dir%" pause exit 0 :NODRIVE echo "OMFG. Set up the P: drive!" pause exit 1 :NOARMA3DIR echo You don't have a %arma3_dir% directory. Please adjust the path in this script! pause exit 1```
5457b7e3-c6a8-421a-b952-e3720364f0d5
{ "language": "Batchfile" }
```batchfile REM To avoid building in work/ alongside the source. Rather build in work/build/ mkdir build cd build REM Remove dot from PY_VER for use in library name set MY_PY_VER=%PY_VER:.=% REM Configure step cmake -G "%CMAKE_GENERATOR%" ^ -DPYTHON_EXECUTABLE:FILEPATH="%PYTHON%" ^ -DPYTHON_INCLUDE_DIR:PATH="%PREFIX%"/include ^ -DPYTHON_LIBRARY:FILEPATH="%PREFIX%"/libs/python%MY_PY_VER%.lib ^ --config "%CONFIGURATION%" ^ -DENABLE_MODULE_IRRLICHT=ON ^ -DENABLE_MODULE_FEA=OFF ^ -DENABLE_MODULE_POSTPROCESS=OFF ^ -DENABLE_MODULE_PYTHON=ON ^ -DBUILD_DEMOS=OFF ^ -DBUILD_TESTING=OFF ^ -DCH_IRRLICHTDIR="C:\irrlicht-1.8.2" ^ -DCH_IRRLICHTLIB="C:\irrlicht-1.8.2\lib\Win64-visualStudio\Irrlicht.lib" ^ .. if errorlevel 1 exit 1 REM Build step cmake --build . --config "%CONFIGURATION%" if errorlevel 1 exit 1 REM Install step cmake --build . --config "%CONFIGURATION%" --target install if errorlevel 1 exit 1 REM Install step REM ninja install REM if errorlevel 1 exit 1 ``` Build into virtual environment of Conda
```batchfile REM To avoid building in work/ alongside the source. Rather build in work/build/ mkdir build cd build REM Remove dot from PY_VER for use in library name set MY_PY_VER=%PY_VER:.=% REM Configure step cmake -G "%CMAKE_GENERATOR%" ^ -DCMAKE_INSTALL_PREFIX="%PREFIX%" ^ -DPYTHON_EXECUTABLE:FILEPATH="%PYTHON%" ^ -DPYTHON_INCLUDE_DIR:PATH="%PREFIX%"/include ^ -DPYTHON_LIBRARY:FILEPATH="%PREFIX%"/libs/python%MY_PY_VER%.lib ^ --config "%CONFIGURATION%" ^ -DENABLE_MODULE_IRRLICHT=ON ^ -DENABLE_MODULE_FEA=OFF ^ -DENABLE_MODULE_POSTPROCESS=OFF ^ -DENABLE_MODULE_PYTHON=ON ^ -DBUILD_DEMOS=OFF ^ -DBUILD_TESTING=OFF ^ -DCH_IRRLICHTDIR="C:\irrlicht-1.8.2" ^ -DCH_IRRLICHTLIB="C:\irrlicht-1.8.2\lib\Win64-visualStudio\Irrlicht.lib" ^ .. if errorlevel 1 exit 1 REM Build step cmake --build . --config "%CONFIGURATION%" if errorlevel 1 exit 1 REM Install step cmake --build . --config "%CONFIGURATION%" --target install if errorlevel 1 exit 1 REM Install step REM ninja install REM if errorlevel 1 exit 1 ```
bd10347c-b55b-43b6-b682-b189a6276535
{ "language": "Batchfile" }
```batchfile call DeletePdbFiles.cmd ..\Output\NET45\Examples call DeletePdbFiles.cmd ..\Output\NET40\Examples del /S /Q ..\Output\NET40\Examples "C:\Program Files\7-Zip\7z.exe" a -r ..\Output\HelixToolkit-%1.zip ..\Output\*.* > ZipRelease.log``` Remove examples from Codeplex Release package.
```batchfile mkdir ..\Output\Release mkdir ..\Output\Release\NET40 mkdir ..\Output\Release\NET45 copy ..\Output\NET45\HelixToolkit.??? ..\Output\Release copy ..\Output\NET45\HelixToolkit.Wpf.??? ..\Output\Release\NET45 copy ..\Output\NET40\HelixToolkit.Wpf.??? ..\Output\Release\NET40 copy ..\Output\NET45\HelixToolkit.Wpf.Input.??? ..\Output\Release\NET45 copy ..\Output\NET40\HelixToolkit.Wpf.Input.??? ..\Output\Release\NET40 copy ..\Output\NET45\HelixToolkit.Wpf.SharpDX.??? ..\Output\Release\NET45 copy ..\Output\NET40\HelixToolkit.Wpf.SharpDX.??? ..\Output\Release\NET40 "C:\Program Files\7-Zip\7z.exe" a -r ..\Output\HelixToolkit-%1.zip ..\Output\Release\*.* > ZipRelease.log```
92a38a38-fd4e-4eb8-8f6c-636e1e4a6fb0
{ "language": "Batchfile" }
```batchfile @echo off set NODE_ENV=production set AUTH_TOKEN=changeme set PORT=80 if %AUTH_TOKEN%==changeme ( echo ***************************************************** echo Please change the AUTH_TOKEN in server/bin/server.bat echo ***************************************************** pause > nul EXIT ) coffee ./bin/server.coffee ``` Make app use forever on windows
```batchfile @echo off set NODE_ENV=production set AUTH_TOKEN=changeme set PORT=80 if %AUTH_TOKEN%==changeme ( echo ***************************************************** echo Please change the AUTH_TOKEN in server/bin/server.bat echo ***************************************************** pause > nul EXIT ) forever ./bin/server.coffee ```
2db7139c-94e7-4707-8ace-1d92eadc9543
{ "language": "Batchfile" }
```batchfile ``` Add in a new build bat for teh windoze
```batchfile anvil copy ./lib/standard/postal.* ./example/standard/js copy ./lib/amd/postal.* ./example/amd/js/libs/postal copy ./lib/amd/postal.js ./example/node/client/js/lib copy ./lib/node/postal.js ./example/node/messaging```
17677c7b-ad3a-4496-8419-ebe9b51aec75
{ "language": "Batchfile" }
```batchfile cd .. del/q scite.zip zip scite.zip scintilla\*.* scintilla\*\*.* scite\*.* scite\*\*.* scite\*\*\*.* scite\*\*\*\*.* -x *.o -x *.obj -x *.lib -x *.dll -x *.exe -x *.pdb -x *.res -x *.exp -x *.ncb -x *.sbr -x *.bsc -x *.ilk -x *.idb -x *.dpsession -x *.bak cd scite ``` Store OS X files in zips.
```batchfile cd .. del/q scite.zip zip scite.zip scintilla\*.* scintilla\*\*.* scintilla\*\*\*.* scintilla\*\*\*\*.* scintilla\*\*\*\*\*.* scite\*.* scite\*\*.* scite\*\*\*.* scite\*\*\*\*.* -x *.o -x *.obj -x *.lib -x *.dll -x *.exe -x *.pdb -x *.res -x *.exp -x *.ncb -x *.sbr -x *.bsc -x *.ilk -x *.idb -x *.dpsession -x *.bak cd scite ```
7e9f7fcc-6ebe-4cc8-aa75-d5893ee26fd2
{ "language": "Batchfile" }
```batchfile nuget pack AgateLib/AgateLib.csproj nuget pack AgateLib.AgateSDL/AgateLib.SDL.csproj nuget pack AgateLib.OpenGL/AgateLib.OpenGL.csproj nuget pack AgateLib.Platform.WinForms/AgateLib.Platform.WinForms.csproj nuget pack AgateLib.Platform.Test/AgateLib.Platform.Test.csproj nuget pack AgateLib.Platform.IntegrationTest/AgateLib.Platform.IntegrationTest.csproj mkdir packages move *.nupkg packages ``` Add error checking to package.bat.
```batchfile nuget pack AgateLib/AgateLib.csproj if %ERRORLEVEL% NEQ 0 exit /b %ERRORLEVEL% nuget pack AgateLib.AgateSDL/AgateLib.SDL.csproj if %ERRORLEVEL% NEQ 0 exit /b %ERRORLEVEL% nuget pack AgateLib.OpenGL/AgateLib.OpenGL.csproj if %ERRORLEVEL% NEQ 0 exit /b %ERRORLEVEL% nuget pack AgateLib.Platform.WinForms/AgateLib.Platform.WinForms.csproj if %ERRORLEVEL% NEQ 0 exit /b %ERRORLEVEL% nuget pack AgateLib.Platform.Test/AgateLib.Platform.Test.csproj if %ERRORLEVEL% NEQ 0 exit /b %ERRORLEVEL% nuget pack AgateLib.Platform.IntegrationTest/AgateLib.Platform.IntegrationTest.csproj if %ERRORLEVEL% NEQ 0 exit /b %ERRORLEVEL% ```
e2fe6b6c-ddb8-45dc-b912-0d7201bffd2d
{ "language": "Batchfile" }
```batchfile @echo off chcp 65001>nul prompt [%USERNAME%@%COMPUTERNAME% $p]$_$$$s rem Fake a UNIX environment doskey clear=cls doskey ls=dir /b $* doskey cp=copy $* doskey mv=move $* doskey rm=del $* doskey cat=type $* rem Easier navigation doskey cd=cd /D $* doskey cd..=cd .. doskey ..=cd .. doskey ...=cd ../.. doskey ....=cd ../../.. rem List files properly doskey l=dir /b $* doskey ll=dir /b $* rem Edit functionality IF NOT EXIST "C:\Program Files\Sublime Text 3" GOTO NOSUBLIME doskey edit="C:\Program Files\Sublime Text 3\sublime_text" $* :NOSUBLIME rem Open functionality doskey open=start $* @echo on ``` Use /d switch for ls
```batchfile @echo off chcp 65001>nul prompt [%USERNAME%@%COMPUTERNAME% $p]$_$$$s rem Fake a UNIX environment doskey clear=cls doskey ls=dir /d $* doskey cp=copy $* doskey mv=move $* doskey rm=del $* doskey cat=type $* rem Easier navigation doskey cd=cd /D $* doskey cd..=cd .. doskey ..=cd .. doskey ...=cd ../.. doskey ....=cd ../../.. rem List files properly doskey l=dir /b $* doskey ll=dir /b $* rem Edit functionality IF NOT EXIST "C:\Program Files\Sublime Text 3" GOTO NOSUBLIME doskey edit="C:\Program Files\Sublime Text 3\sublime_text" $* :NOSUBLIME rem Open functionality doskey open=start $* @echo on ```
730df811-03f7-4b4f-bb44-ddbc48d31191
{ "language": "Batchfile" }
```batchfile @echo off rem NuGet Package Script rem ==================== rem Creates a release build then generates the NuGet package into the output directory. rem Remember to update the version number and release notes in the "nuspec" file before each release. echo. echo Creating Release build msbuild "%~dp0Emlid.WindowsIot.Hardware.csproj" /p:Configuration=Release if %errorlevel% neq 0 goto error echo. echo Creating NuGet Package "%~dp0..\..\Tools\NuGet\nuget.exe" pack "%~dp0Emlid.WindowsIot.Hardware.csproj" -Prop Configuration=Release -OutputDirectory "%~dp0bin\ARM\Release" if %errorlevel% neq 0 goto error echo. echo Packaging successful. exit /b 0 :error set result=%errorlevel% echo. echo Error %result% exit /b %result% ``` Add VS tools initialization to NuGet package command so it can run standalone.
```batchfile @echo off rem NuGet Package Script rem ==================== rem Creates a release build then generates the NuGet package into the output directory. rem Remember to update the version number and release notes in the "nuspec" file before each release. echo. echo Initializing Visual Studio tools... call "%vs140comntools%\vsvars32.bat" if %errorlevel% neq 0 goto error echo. echo Creating Release build msbuild "%~dp0Emlid.WindowsIot.Hardware.csproj" /p:Configuration=Release if %errorlevel% neq 0 goto error echo. echo Creating NuGet Package "%~dp0..\..\Tools\NuGet\nuget.exe" pack "%~dp0Emlid.WindowsIot.Hardware.csproj" -Prop Configuration=Release -OutputDirectory "%~dp0bin\ARM\Release" if %errorlevel% neq 0 goto error echo. echo Packaging successful. exit /b 0 :error set result=%errorlevel% echo. echo Error %result% exit /b %result% ```
53197083-9bc0-4119-aefa-74a4621180e2
{ "language": "Batchfile" }
```batchfile @echo off SET sdkpath=%xilinxpath%\SDK\%xilinxversion%\bin SET cfile=%~1 SET jsonfile=%~2 SET projectname=%~3 SET cswfile=%cfile:~3,-2%_sw.c SET ciffile=%cfile:~3,-2%_if.c SET toolchainpath=%~4 if not {%~1} == {} if not {%~2} == {} if not {%~3} == {} ( mkdir software copy %ciffile% software copy %cswfile% software\helloworld.c copy %toolchainpath%\utils\lscript.ld software rem copy %toolchainpath%\utils\timer.c software rem copy %toolchainpath%\utils\timer.h software python %toolchainpath%\python\generatesdktcl.py %cfile% %jsonfile% %projectname% %toolchainpath% %sdkpath%\xsdk.bat -batch -source %projectname%_build_sdk.tcl ) else ( echo "few arguments!" ) ``` Delete copy statements of timer.[ch]
```batchfile @echo off SET sdkpath=%xilinxpath%\SDK\%xilinxversion%\bin SET cfile=%~1 SET jsonfile=%~2 SET projectname=%~3 SET cswfile=%cfile:~3,-2%_sw.c SET ciffile=%cfile:~3,-2%_if.c SET toolchainpath=%~4 if not {%~1} == {} if not {%~2} == {} if not {%~3} == {} ( mkdir software copy %ciffile% software copy %cswfile% software\helloworld.c copy %toolchainpath%\utils\lscript.ld software python %toolchainpath%\python\generatesdktcl.py %cfile% %jsonfile% %projectname% %toolchainpath% %sdkpath%\xsdk.bat -batch -source %projectname%_build_sdk.tcl ) else ( echo "few arguments!" ) ```
3ed6a8b3-e731-4bf2-9444-55ac69c302f5
{ "language": "Batchfile" }
```batchfile ``` Add window capture script for windows
```batchfile "C:\Program Files\ffmpeg\bin\ffmpeg.exe" -f gdigrab -framerate 30 -i title="REACT RUNNING" -c:v h264_nvenc -qp 0 output-4.mkv ```
51c5256f-ed04-4803-8bce-7cdfa9039504
{ "language": "Batchfile" }
```batchfile cd /d %~dp0 mkdir OSVR-Unity-Dist mkdir OSVR-Unity-Dist\src mkdir OSVR-Unity-Dist\src\OSVR-Unity mkdir OSVR-Unity-Dist\src\Managed-OSVR xcopy Managed-OSVR OSVR-Unity-Dist\src\Managed-OSVR /Y /S xcopy OSVR-Unity OSVR-Unity-Dist\src\OSVR-Unity /Y /S rem the -F 0x4 is to turn off smartypants. third-party/discount-2.1.6-win32/markdown.exe -F 0x4 -o README.html OSVR-Unity/README.md move README.html OSVR-Unity-Dist\``` Fix slashes in batch file.
```batchfile cd /d %~dp0 mkdir OSVR-Unity-Dist mkdir OSVR-Unity-Dist\src mkdir OSVR-Unity-Dist\src\OSVR-Unity mkdir OSVR-Unity-Dist\src\Managed-OSVR xcopy Managed-OSVR OSVR-Unity-Dist\src\Managed-OSVR /Y /S xcopy OSVR-Unity OSVR-Unity-Dist\src\OSVR-Unity /Y /S rem the -F 0x4 is to turn off smartypants. third-party\discount-2.1.6-win32\markdown.exe -F 0x4 -o README.html OSVR-Unity/README.md move README.html OSVR-Unity-Dist\```
213c4755-cd85-42b1-bfda-3026e3b93b7d
{ "language": "Batchfile" }
```batchfile :: Set $HOME to the current dir so msys runs here set HOME=%cd% :: Configure, build, test, and install using `make`. bash -lc "make FC=gfortran DYNAMIC_ARCH=1 BINARY=$ARCH NO_LAPACK=0 NO_AFFINITY=1 USE_THREAD=1 PREFIX=$LIBRARY_PREFIX" if errorlevel 1 exit 1 bash -lc "make test" if errorlevel 1 exit 1 bash -lc "make PREFIX=$LIBRARY_PREFIX install" if errorlevel 1 exit 1 ``` Fix Windows paths to play nice with MinGW.
```batchfile :: Set $HOME to the current dir so msys runs here set HOME=%cd% :: Configure, build, test, and install using `make`. bash -lc "make FC=gfortran DYNAMIC_ARCH=1 BINARY=$ARCH NO_LAPACK=0 NO_AFFINITY=1 USE_THREAD=1 PREFIX=`echo $LIBRARY_PREFIX | tr '\\' '/'`" if errorlevel 1 exit 1 bash -lc "make test" if errorlevel 1 exit 1 bash -lc "make PREFIX=`echo $LIBRARY_PREFIX | tr '\\' '/'` install" if errorlevel 1 exit 1 ```
0518ba5c-ace8-445b-8748-26c96e2a70f0
{ "language": "Batchfile" }
```batchfile ``` Add a script to restore nuget packages for all projects needing them.
```batchfile @echo off REM TODO: detect these automatically. Probably a job for PowerShell... set PROJECTS=Benchmarks,CodeDiagnostics,CodeDiagnostics.Test,Demo set PROJECTS=%PROJECTS%,Serialization.JsonNet,Serialization.Test,Test set PROJECTS=%PROJECTS%,TzdbCompiler.Test,Web for %%p in (%PROJECTS%) DO ( echo Restoring NodaTime.%%p packages nuget restore -NonInteractive -PackagesDirectory src\packages src\NodaTime.%%p\packages.config ) ```
4c65011e-9ae0-42b2-869e-e31aa7cb98a1
{ "language": "Batchfile" }
```batchfile cd C:\projects\lexington-pentaho-etl\ call git pull origin master :: set KETTLE_HOME="C:\projects\lexington-pentaho-etl\.kettle\" call data-integration\Pan.bat -level=Basic -file "pull-last-day-of-foreclosure-sales.ktr" ``` Call parcel lookup after pulling foreclosures
```batchfile cd C:\projects\lexington-pentaho-etl\ call git pull origin master cd data-integration call Pan.bat -level=Basic -file "../pull-last-day-of-foreclosure-sales.ktr" call Pan.bat -level=Basic -file "../parcel-lookup-foreclosure-sales.ktr" ```
a7257890-2975-4eea-ba0f-543db70fa1aa
{ "language": "Batchfile" }
```batchfile @echo off cd %~dp0 "%VS140COMNTOOLS%\VsMSBuildCmd.bat" && ^ msbuild pugixml_vs2015.vcxproj /t:Rebuild /p:Configuration=Debug /p:Platform=x86 /v:minimal /nologo && ^ msbuild pugixml_vs2015.vcxproj /t:Rebuild /p:Configuration=Release /p:Platform=x86 /v:minimal /nologo && ^ msbuild pugixml_vs2015.vcxproj /t:Rebuild /p:Configuration=Debug /p:Platform=x64 /v:minimal /nologo && ^ msbuild pugixml_vs2015.vcxproj /t:Rebuild /p:Configuration=Release /p:Platform=x64 /v:minimal /nologo && ^ powershell Write-NuGetPackage nuget.autopkg ``` Expand build to include VS 2013.
```batchfile @echo off cd %~dp0 "%VS120COMNTOOLS%\VsMSBuildCmd.bat" && ^ msbuild pugixml_vs2013_static.vcxproj /t:Rebuild /p:Configuration=Debug /p:Platform=x86 /v:minimal /nologo && ^ msbuild pugixml_vs2013_static.vcxproj /t:Rebuild /p:Configuration=Release /p:Platform=x86 /v:minimal /nologo && ^ msbuild pugixml_vs2013_static.vcxproj /t:Rebuild /p:Configuration=Debug /p:Platform=x64 /v:minimal /nologo && ^ msbuild pugixml_vs2013_static.vcxproj /t:Rebuild /p:Configuration=Release /p:Platform=x64 /v:minimal /nologo "%VS140COMNTOOLS%\VsMSBuildCmd.bat" && ^ msbuild pugixml_vs2015.vcxproj /t:Rebuild /p:Configuration=Debug /p:Platform=x86 /v:minimal /nologo && ^ msbuild pugixml_vs2015.vcxproj /t:Rebuild /p:Configuration=Release /p:Platform=x86 /v:minimal /nologo && ^ msbuild pugixml_vs2015.vcxproj /t:Rebuild /p:Configuration=Debug /p:Platform=x64 /v:minimal /nologo && ^ msbuild pugixml_vs2015.vcxproj /t:Rebuild /p:Configuration=Release /p:Platform=x64 /v:minimal /nologo && ^ powershell Write-NuGetPackage nuget.autopkg ```