doc_id
stringlengths
36
36
metadata
dict
input
stringlengths
28
4.3k
output
stringlengths
11
5.45k
13c7f03c-a92b-49c3-9c32-2de64c1634c9
{ "language": "Batchfile" }
```batchfile @echo off pushd "%~dp0" for %%i in (Debug Release) do "%SystemRoot%\Microsoft.NET\Framework\v4.0.30319\msbuild" /target:Clean /p:Configuration=%%i src\NCrontab.sln popd ``` Clean script can simply delegate to build script
```batchfile @"%~dp0build" /v:n /target:Clean ```
5f6af458-3c68-4f93-b171-d232f3200194
{ "language": "Batchfile" }
```batchfile ``` Add Windows Installer for Realms 1.9.
```batchfile @echo off SET version=v1.0.1 SET for_minecraft=1.9 SET for_realms=1.8.3 :: Minecraft path SET minecraft=%appdata%\.minecraft echo Sphinx Client Patch Installer %version% echo For Minecraft %for_minecraft%. echo For Realms %for_realms%. echo. :: Check to see if Minecraft can run Sphinx. echo Checking system requirements... if not exist "%minecraft%\versions\1.9" ( echo Cannot install Sphinx! echo You must have Minecraft installed in the default location and Minecraft 1.9 installed. goto end ) if exist "%minecraft%\versions\1.9-Sphinx" ( echo Sphinx is already installed! goto end ) :: Create tempoary directory. If it already exists, delete it and recreate it. if exist tmp ( del /F /S /Q tmp 1>nul rmdir /S /Q tmp ) mkdir tmp :: Download Sphinx version json file. echo Downloading patch... powershell -Command "(New-Object Net.WebClient).DownloadFile('https://raw.githubusercontent.com/mitchfizz05/Sphinx/master/Sphinx-Patch/patches/1.9/1.9-Sphinx.json', 'tmp/Sphinx.json')" :: Install the patch. echo Installing patch... mkdir "%minecraft%\versions\1.9-Sphinx" >NUL copy /Y "%minecraft%\versions\1.9\1.9.jar" "%minecraft%\versions\1.9-Sphinx\1.9-Sphinx.jar" >NUL copy /Y "tmp\Sphinx.json" "%minecraft%\versions\1.9-Sphinx\1.9-Sphinx.json" >NUL echo. echo Patch successfully installed! :: Remove tempoary directory. (with a short delay so files can be unlocked) ping localhost -n 1 >NUL del /F /S /Q tmp 1>NUL rmdir /S /Q tmp >NUL goto end :end echo. pause ```
a0d2949d-8ca6-4ce0-b201-784ab125ddc8
{ "language": "Batchfile" }
```batchfile PATH=C:\python26;C:\progra~2\7-zip;%PATH% del /q /s dist\*.* python setup.py py2exe cd dist 7z d library.zip jinja2\* dns\* 'graphy\* del /s w9xpopen.exe copy ..\README.txt . 7z a namebench_for_Windows.zip -r * namebench -x -O 8.8.8.8 -t5 -o test.html start test.html cd .. ``` Add Program Files\7-Zip to path
```batchfile PATH=C:\python26;C:\progra~1\7-zip;C:\progra~2\7-zip;%PATH% del /q /s dist\*.* python setup.py py2exe cd dist 7z d library.zip jinja2\* dns\* 'graphy\* del /s w9xpopen.exe copy ..\README.txt . 7z a namebench_for_Windows.zip -r * namebench -x -O 8.8.8.8 -t5 -o test.html start test.html cd .. ```
d05c61e5-a82d-4994-afd3-0e12a012820e
{ "language": "Batchfile" }
```batchfile if not exist "C:\Windows\Temp\build-tools.exe" ( powershell -Command "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::TLS12; (New-Object System.Net.WebClient).DownloadFile('https://download.microsoft.com/download/5/f/7/5f7acaeb-8363-451f-9425-68a90f98b238/visualcppbuildtools_full.exe', 'C:\Windows\Temp\build-tools.exe')" <NUL ) start /wait C:\Windows\Temp\build-tools.exe /Passive /AdminFile A:\buildtools-adminfile.xml setx PATH "%PATH%;C:\Program Files (x86)\Windows Kits\8.1\bin\x86\" /m ``` Fix path update to not include trailing backslash
```batchfile if not exist "C:\Windows\Temp\build-tools.exe" ( powershell -Command "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::TLS12; (New-Object System.Net.WebClient).DownloadFile('https://download.microsoft.com/download/5/f/7/5f7acaeb-8363-451f-9425-68a90f98b238/visualcppbuildtools_full.exe', 'C:\Windows\Temp\build-tools.exe')" <NUL ) start /wait C:\Windows\Temp\build-tools.exe /Passive /AdminFile A:\buildtools-adminfile.xml setx PATH "%PATH%;C:\Program Files (x86)\Windows Kits\8.1\bin\x86" /m ```
007d410c-f1b0-4ff7-ad71-fc70c4a74a7a
{ "language": "Batchfile" }
```batchfile ``` Add unit testing script for Windows.
```batchfile :: Run all unit tests @echo off setlocal EnableDelayedExpansion dir /b unit-tests > tempFile1 findstr /e /c:".py" tempFile1 > tempFile2 findstr /B /R /C:"[^__]" tempFile2 > tempFile3 del tempFile1 del tempFile2 set /A testIndex=1 for /F "tokens=*" %%A in (tempFile3) do ( echo|set /p=Test !testIndex!: echo %%~nA echo ---------------------------------------------------------------------- call python -m unit-tests.%%~nA -v set /A "testIndex+=1" echo. ) del tempFile3 ```
2e08dc02-4d6f-4722-9a6f-82c194986b54
{ "language": "Batchfile" }
```batchfile @echo off rem ======================================================= rem Settings rem ======================================================= set Platform=Win64 set BuildMode=Development rem ======================================================= rem Release variables rem ======================================================= set VersionName=%1 set InputProject=%2 set OutputDir=%3 set UAT=%4 rem ======================================================= rem Run UAT rem ======================================================= %UAT% -ScriptsForProject=%InputProject% BuildCookRun -nocompile -nocompileeditor -installed -nop4 -project=%InputProject% -cook -stage -archive -archivedirectory=%OutputDir% -package -clientconfig=%BuildMode% -ue4exe=UE4Editor-Cmd.exe -clean -pak -compressed -prereqs -distribution -nodebuginfo -createreleaseversion=%VersionName% -targetplatform=%Platform% -build -utf8output ``` Upgrade build script to include en-EN, fr-FR cultures
```batchfile @echo off rem ======================================================= rem Settings rem ======================================================= set Platform=Win64 set BuildMode=Development rem ======================================================= rem Release variables rem ======================================================= set VersionName=%1 set InputProject=%2 set OutputDir=%3 set UAT=%4 rem ======================================================= rem Run UAT rem ======================================================= %UAT% -ScriptsForProject=%InputProject% BuildCookRun -nocompile -nocompileeditor -installed -nop4 -project=%InputProject% -cook -stage -archive -archivedirectory=%OutputDir% -package -clientconfig=%BuildMode% -ue4exe=UE4Editor-Cmd.exe -clean -pak -compressed -prereqs -distribution -nodebuginfo -createreleaseversion=%VersionName% -targetplatform=%Platform% -build -utf8output -CookCultures=en-US+fr-FR ```
bf3e3ff3-2e66-4bb4-8b0a-5edd45bd76d1
{ "language": "Batchfile" }
```batchfile @echo "mkDistribution v1.3" if exist current ( rmdir /s /q current ) mkdir current mkdir current\netcf-10 nant -t:netcf-1.0 -D:build.output.dir=current\netcf-10 -buildfile:sharpZLib.build build mkdir current\netcf-20 nant -t:netcf-2.0 -D:build.output.dir=current\netcf-20 -buildfile:sharpZLib.build build mkdir current\net-11 nant -t:net-1.1 -D:build.output.dir=current\net-11 -buildfile:sharpZLib.build build mkdir current\net-20 nant -t:net-2.0 -D:build.output.dir=current\net-20 -buildfile:sharpZLib.build build mkdir current\doc copy doc\readme.rtf current\doc copy doc\Changes.txt current\doc copy doc\Copying.txt current\doc copy SharpZipLib.chm current\doc copy installGAC.bat current copy uninstallGAC.bat current "c:\Program Files\EWSoftware\Sandcastle Help File Builder\SandcastleBuilderConsole.exe" .\SharpZipLib.shfb samples\cs\bin\sz -rc current\SharpZipLib.zip current\*.dll @echo TODO Compress source to SharpZipLib_SourceSamples.zip @echo TODO Build Bin Zip files ``` Build help file before copying it!
```batchfile @echo "mkDistribution v1.4" if exist current ( rmdir /s /q current ) mkdir current mkdir current\netcf-10 nant -t:netcf-1.0 -D:build.output.dir=current\netcf-10 -buildfile:sharpZLib.build build mkdir current\netcf-20 nant -t:netcf-2.0 -D:build.output.dir=current\netcf-20 -buildfile:sharpZLib.build build mkdir current\net-11 nant -t:net-1.1 -D:build.output.dir=current\net-11 -buildfile:sharpZLib.build build mkdir current\net-20 nant -t:net-2.0 -D:build.output.dir=current\net-20 -buildfile:sharpZLib.build build "c:\Program Files\EWSoftware\Sandcastle Help File Builder\SandcastleBuilderConsole.exe" .\SharpZipLib.shfb mkdir current\doc copy doc\readme.rtf current\doc copy doc\Changes.txt current\doc copy doc\Copying.txt current\doc copy SharpZipLib.chm current\doc copy installGAC.bat current copy uninstallGAC.bat current samples\cs\bin\sz -rc current\SharpZipLib.zip current\*.dll @echo TODO Compress source to SharpZipLib_SourceSamples.zip @echo TODO Build Bin Zip files ```
fa4d3fe9-6e22-4c4f-80e0-282fd8ff4657
{ "language": "Batchfile" }
```batchfile @echo off cd /D %~dp0 call settings.cmd call ..\unxutils.cmd cd dist\%ARCH% call pp -B -o psass.exe ^ -I ../../../blib/lib ^ -M Encode::Byte ^ -M List::MoreUtils::XS ^ -M List::MoreUtils::PP ^ -M Win32::ChangeNotify ^ -M Filesys::Notify::Simple ^ CSS-Sass-%RELVERSION%/bin/psass cd ..\.. REM tested and working, but much bigger size REM -l "%PERLPATH%/c/bin/_libsass-0.dll" ^ copy %CD%\dist\%ARCH%\psass.exe %CD%\..\create\%XARCH% ``` Add missing perl dependency for packer
```batchfile @echo off cd /D %~dp0 call settings.cmd call ..\unxutils.cmd cd dist\%ARCH% call pp -B -o psass.exe ^ -I ../../../blib/lib ^ -M Encode::Byte ^ -M PerlIO::encoding ^ -M List::MoreUtils::XS ^ -M List::MoreUtils::PP ^ -M Win32::ChangeNotify ^ -M Filesys::Notify::Simple ^ CSS-Sass-%RELVERSION%/bin/psass cd ..\.. REM tested and working, but much bigger size REM -l "%PERLPATH%/c/bin/_libsass-0.dll" ^ copy %CD%\dist\%ARCH%\psass.exe %CD%\..\create\%XARCH% ```
a4ebbebf-a9c9-491f-b989-47481e7c8db3
{ "language": "Batchfile" }
```batchfile <!-- : @echo off echo ==^> Enabling updates for other products from Microsoft Update net stop wuauserv reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update" /v EnableFeaturedSoftware /t REG_DWORD /d 1 /f reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update" /v IncludeRecommendedUpdates /t REG_DWORD /d 1 /f cscript //nologo "%~f0?.wsf" net start wuauserv exit /b ----- Begin wsf script ---> <job><script language="VBScript"> Set ServiceManager = CreateObject("Microsoft.Update.ServiceManager") Set NewUpdateService = ServiceManager.AddService2("7971f918-a847-4430-9279-4a52d1efe18d",7,"") </script></job> ``` Disable updates on Windows 2008 R2 and Windows 7
```batchfile <!-- : @echo off echo ==^> Enabling updates for other products from Microsoft Update net stop wuauserv reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update" /v EnableFeaturedSoftware /t REG_DWORD /d 1 /f reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update" /v IncludeRecommendedUpdates /t REG_DWORD /d 1 /f cscript //nologo "%~f0?.wsf" net start wuauserv exit /b ----- Begin wsf script ---> <job><script language="VBScript"> Set ServiceManager = CreateObject("Microsoft.Update.ServiceManager") Set NewUpdateService = ServiceManager.AddService2("7971f918-a847-4430-9279-4a52d1efe18d",7,"") Const NOT_CONFIGURED = 0 Const DISABLED = 1 Const PROMPT_TO_APPROVE_BEFORE_DOWNLOAD = 2 Const DOWNLOAD_AUTOMATICALLY = 3 Const SCHEDULED_INSTALLATION = 4 Set AutoUpdate = CreateObject("Microsoft.Update.AutoUpdate") Set AutoUpdateSettings = AutoUpdate.Settings AutoUpdateSettings.NotificationLevel = DISABLED AutoUpdateSettings.Save AutoUpdateSettings.Refresh </script></job> ```
0da66409-1866-424d-92c2-d691db94eba9
{ "language": "Batchfile" }
```batchfile call \ned\bin\switchpy 23 python setup.py develop nosetests call \ned\bin\switchpy 24 python setup.py develop nosetests call \ned\bin\switchpy 25 python setup.py develop nosetests call \ned\bin\switchpy 26 python setup.py develop nosetests ``` Test the code without a C extension.
```batchfile call \ned\bin\switchpy 23 python setup.py develop nosetests del coverage\tracer.pyd nosetests call \ned\bin\switchpy 24 python setup.py develop nosetests del coverage\tracer.pyd nosetests call \ned\bin\switchpy 25 python setup.py develop nosetests del coverage\tracer.pyd nosetests call \ned\bin\switchpy 26 python setup.py develop nosetests del coverage\tracer.pyd nosetests ```
75653b51-604a-402c-88df-0bfbc943d4ee
{ "language": "Batchfile" }
```batchfile ``` Add bat to help sign unsigned dependencies
```batchfile @echo off set ildasmFolder=%~1 set ilasmFolder=%~2 set inputFolder=%~3 set inputFilename=%~4 set debug=%~5 mkdir tempSigning "%ildasmFolder%\sn.exe" -k tempSigning\keyPair.snk echo Key Written "%ildasmFolder%\ildasm.exe" "%inputFolder%\%inputFilename%" /out:"tempSigning\%inputFilename%.il" echo Disassembled "%ilasmFolder%\ilasm.exe" "tempSigning\%inputFilename%.il" /dll /key=tempSigning\keyPair.snk /output="tempSigning\%inputFilename%" echo Assembled move /Y "tempSigning\%inputFilename%" "%inputFolder%\%inputFilename%" echo Overwritten IF "%debug%"=="" rmdir /s /q tempSigning```
420ffe9c-621f-49f4-b1b4-3c004c87df5b
{ "language": "Batchfile" }
```batchfile rem @echo off set VIBE_BIN=%~dps0 set LIBDIR=%VIBE_BIN%..\lib\win-i386 set BINDIR=%VIBE_BIN%..\lib\bin set LIBS="%LIBDIR%\event2.lib" "%LIBDIR%\eay.lib" "%LIBDIR%\ssl.lib" ws2_32.lib set EXEDIR=%TEMP%\.rdmd\source set START_SCRIPT=%EXEDIR%\vibe.cmd if NOT EXIST %EXEDIR% ( mkdir %EXEDIR% ) copy "%VIBE_BIN%*.dll" %EXEDIR% > nul 2>&1 copy "%VIBE_BIN%*.dll" . > nul 2>&1 copy "%VIBE_BIN%vpm.d" %EXEDIR% > nul 2>&1 rem Run, execute, do everything.. but when you do it, do it with the vibe! rdmd -debug -g -w -property -of%EXEDIR%\vpm.exe -I%VIBE_BIN%..\source %LIBS% %EXEDIR%\vpm.d %VIBE_BIN% %START_SCRIPT% %1 %2 %3 %4 %5 %6 %7 %8 %9 rem Finally, start the app, if vpm succeded. if ERRORLEVEL 0 %START_SCRIPT% ``` Put back the @echo off..
```batchfile @echo off set VIBE_BIN=%~dps0 set LIBDIR=%VIBE_BIN%..\lib\win-i386 set BINDIR=%VIBE_BIN%..\lib\bin set LIBS="%LIBDIR%\event2.lib" "%LIBDIR%\eay.lib" "%LIBDIR%\ssl.lib" ws2_32.lib set EXEDIR=%TEMP%\.rdmd\source set START_SCRIPT=%EXEDIR%\vibe.cmd if NOT EXIST %EXEDIR% ( mkdir %EXEDIR% ) copy "%VIBE_BIN%*.dll" %EXEDIR% > nul 2>&1 copy "%VIBE_BIN%*.dll" . > nul 2>&1 copy "%VIBE_BIN%vpm.d" %EXEDIR% > nul 2>&1 rem Run, execute, do everything.. but when you do it, do it with the vibe! rdmd -debug -g -w -property -of%EXEDIR%\vpm.exe -I%VIBE_BIN%..\source %LIBS% %EXEDIR%\vpm.d %VIBE_BIN% %START_SCRIPT% %1 %2 %3 %4 %5 %6 %7 %8 %9 rem Finally, start the app, if vpm succeded. if ERRORLEVEL 0 %START_SCRIPT% ```
ffa26611-2a67-40fa-bbd1-aabb06c6a27e
{ "language": "Batchfile" }
```batchfile :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: :: Cake is a Windows batch script for invoking CakePHP shell commands :: :: CakePHP(tm) : Rapid Development Framework (http://cakephp.org) :: Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org) :: :: Licensed under The MIT License :: Redistributions of files must retain the above copyright notice. :: :: @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org) :: @link http://cakephp.org CakePHP(tm) Project :: @since 2.0.0 :: @license http://www.opensource.org/licenses/mit-license.php MIT License :: :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: In order for this script to work as intended, the cake\console\ folder must be in your PATH @echo. @echo off SET app=%0 SET lib=%~dp0 php "%lib%cake.php" %* echo. exit /B %ERRORLEVEL% ``` Remove an empty line output
```batchfile :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: :: Cake is a Windows batch script for invoking CakePHP shell commands :: :: CakePHP(tm) : Rapid Development Framework (http://cakephp.org) :: Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org) :: :: Licensed under The MIT License :: Redistributions of files must retain the above copyright notice. :: :: @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org) :: @link http://cakephp.org CakePHP(tm) Project :: @since 2.0.0 :: @license http://www.opensource.org/licenses/mit-license.php MIT License :: :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: In order for this script to work as intended, the cake\console\ folder must be in your PATH @echo off SET app=%0 SET lib=%~dp0 php "%lib%cake.php" %* echo. exit /B %ERRORLEVEL% ```
12912abc-187d-4579-aa1e-d301a6283ef7
{ "language": "Batchfile" }
```batchfile ``` Add utility to force dynamic compilation
```batchfile @echo off REM Delete all compiled module binaries to force dynamic compilation (.csproj) to kick in set SRC=src\Orchard.Web\Modules for /f %%i in ('dir %SRC% /b /ad') do del /q %SRC%\%%i\bin\%%i.dll ```
5a1237a6-9d09-4aca-bb0d-30c2baf20bb2
{ "language": "Batchfile" }
```batchfile set PYTHON=C:\Python27\python set EASY_INSTALL=c:\python27\scripts\easy_install.exe set NEXUSDIR="C:\Program Files (x86)\NeXus Data Format\" set PATH=C:\Python27;C:\Python27\Scripts;C:\mingw\bin;%PATH% cd %WORKSPACE% %PYTHON% check_packages.py cd %WORKSPACE% python setup.py build -cmingw32 cd %WORKSPACE% python setup.py docs cd %WORKSPACE% python setup.py bdist_egg --skip-build cd %WORKSPACE%\test %PYTHON% utest_sasview.py cd %WORKSPACE% mkdir sasview-install set PYTHONPATH=%WORKSPACE%\sasview-install;%PYTHONPATH% cd %WORKSPACE% cd dist %EASY_INSTALL% -d ..\sasview-install sasview-3.1.2-py2.7-win32.egg cd %WORKSPACE%\sasview python setup_exe.py py2exe python installer_generator.py "C:\Program Files (x86)\Inno Setup 5\ISCC.exe" installer.iss cd Output xcopy setupSasView.exe %WORKSPACE%\dist cd %WORKSPACE% ``` Update new windows build script
```batchfile set PYTHON=C:\Python27\python set EASY_INSTALL=c:\python27\scripts\easy_install.exe set NEXUSDIR="C:\Program Files (x86)\NeXus Data Format\" set PATH=C:\Python27;C:\Python27\Scripts;C:\mingw\bin;%PATH% set PYLINT=c:\python27\scripts\pylint cd %WORKSPACE% %PYTHON% check_packages.py cd %WORKSPACE% python setup.py build -cmingw32 cd %WORKSPACE% python setup.py docs cd %WORKSPACE% python setup.py bdist_egg --skip-build cd %WORKSPACE%\test %PYTHON% utest_sasview.py cd %WORKSPACE% mkdir sasview-install set PYTHONPATH=%WORKSPACE%\sasview-install;%PYTHONPATH% cd %WORKSPACE% cd dist %EASY_INSTALL% -d ..\sasview-install sasview-3.1.2-py2.7-win32.egg cd %WORKSPACE%\sasview python setup_exe.py py2exe python installer_generator.py "C:\Program Files (x86)\Inno Setup 5\ISCC.exe" installer.iss cd Output xcopy setupSasView.exe %WORKSPACE%\dist cd %WORKSPACE% %PYLINT% --rcfile "%WORKSPACE%cd /build_tools/pylint.rc" -f parseable sasview-install/sasview*.egg/sas sasview > test/sasview.txt cd %WORKSPACE% ```
5c4fc57f-c51f-4666-8487-2883fbdb1727
{ "language": "Batchfile" }
```batchfile :: Copyright 2015 Rouslan Solomakhin :: :: Licensed under the Apache License, Version 2.0 (the "License") :: you may not use this file except in compliance with the License. :: You may obtain a copy of the License at :: :: http://www.apache.org/licenses/LICENSE-2.0 :: :: Unless required by applicable law or agreed to in writing, software :: distributed under the License is distributed on an "AS IS" BASIS, :: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. :: See the License for the specific language governing permissions and :: limitations under the License. set EDITOR=runemacs set GYP_DEFINES="component=shared_library fastbuild=2" set GYP_GENERATORS=ninja set HOME=%USERPROFILE% set PATH=%PATH%;%SYSTEMDRIVE%\emacs\bin;%SYSTEMDRIVE%\console2;%SYSTEMDRIVE%\src\depot_tools;%USERPROFILE%\.third_party\cask\bin;%SYSTEMDRIVE%\java\jdk\bin call "%ProgramFiles(x86)%\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" ``` Add maven path on windows.
```batchfile :: Copyright 2015 Rouslan Solomakhin :: :: Licensed under the Apache License, Version 2.0 (the "License") :: you may not use this file except in compliance with the License. :: You may obtain a copy of the License at :: :: http://www.apache.org/licenses/LICENSE-2.0 :: :: Unless required by applicable law or agreed to in writing, software :: distributed under the License is distributed on an "AS IS" BASIS, :: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. :: See the License for the specific language governing permissions and :: limitations under the License. set EDITOR=runemacs set GYP_DEFINES="component=shared_library fastbuild=2" set GYP_GENERATORS=ninja set HOME=%USERPROFILE% set PATH=%PATH%;%SYSTEMDRIVE%\emacs\bin;%SYSTEMDRIVE%\console2;%SYSTEMDRIVE%\src\depot_tools;%USERPROFILE%\.third_party\cask\bin;%SYSTEMDRIVE%\java\jdk\bin;%SYSTEMDRIVE%\maven\bin call "%ProgramFiles(x86)%\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" ```
38e62cc0-efaa-4821-a3b2-d00e28f1b59d
{ "language": "Batchfile" }
```batchfile ``` Add batch script to test 64bit and 32bit MSVC from the terminal
```batchfile @SET SUBDIR=%~dp0 @cd %SUBDIR% @ctest -V -S test.cmake @SET PATH=C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin;%PATH% @ctest -V -S test.cmake ```
bdc5fbfa-7c53-4812-a91f-4d169ef1143e
{ "language": "Batchfile" }
```batchfile copy mpi.f.single mpi.f copy mpif.h.single mpif.h if errorlevel 1 exit 1 flang -g -w -O -Wall -o genesis2 main.f check.f diagno.f esource.f field.f incoherent.f math.f partsim.f pushp.f loadbeam.f loadrad.f magfield.f tdepend.f track.f string.f rpos.f scan.f source.f stepz.f timerec.f initrun.f input.f output.f mpi.f > output.txt 2>&1 if errorlevel 1 exit 1 echo "DEBUG Info..." dir echo "The build output was: " type output.txt echo "-----------------------------------------------" echo "Copying the file to Library Bin at %LIBRARY_BIN%" copy genesis2.exe %LIBRARY_BIN% if errorlevel 1 exit 1 exit 0 ``` Remove errorlevel 1 after compile to be able to print the errors.
```batchfile copy mpi.f.single mpi.f copy mpif.h.single mpif.h if errorlevel 1 exit 1 flang -g -w -O -Wall -o genesis2 main.f check.f diagno.f esource.f field.f incoherent.f math.f partsim.f pushp.f loadbeam.f loadrad.f magfield.f tdepend.f track.f string.f rpos.f scan.f source.f stepz.f timerec.f initrun.f input.f output.f mpi.f > output.txt 2>&1 echo "DEBUG Info..." dir echo "The build output was: " type output.txt echo "-----------------------------------------------" echo "Copying the file to Library Bin at %LIBRARY_BIN%" copy genesis2.exe %LIBRARY_BIN% if errorlevel 1 exit 1 exit 0 ```
cc28770b-60c5-4109-b70a-b5dd19b290e2
{ "language": "Batchfile" }
```batchfile @echo off REM This build script allows you to build the TTR Mouse Click Simulator. REM For information about prerequisites, see the Wiki page at REM https://github.com/TTExtensions/MouseClickSimulator/wiki/Running-the-Simulator SetLocal ENABLEDELAYEDEXPANSION REM Change the working directory to the script's directory. REM E.g. if the user right-clicks on the script and selects "Run as Administrator", REM the working directory would be the windows\system32 dir. cd %~dp0 echo.Building the TTR Mouse Click Simulator... echo. REM MSBuild is always installed in the 32-Bit program files folder if "!ProgramFiles(x86)!"=="" ( set "ProgramFiles32Bit=!ProgramFiles!" ) else ( set "ProgramFiles32Bit=!ProgramFiles(x86)!" ) set "BuildExe=!ProgramFiles32Bit!\MSBuild\14.0\Bin\MSBuild.exe" if not exist "!BuildExe!" ( echo.ERROR: MSBuild not found at "!BuildExe!"^^! pause exit /b 1 ) "!BuildExe!" /v:minimal /nologo /p:Configuration=Release "TTMouseclickSimulator\TTMouseclickSimulator.csproj" if not errorlevel 1 ( echo. echo.Build successful^^! ) pause exit /b !ERRORLEVEL!``` Use quotation marks for path parameters.
```batchfile @echo off REM This build script allows you to build the TTR Mouse Click Simulator. REM For information about prerequisites, see the Wiki page at REM https://github.com/TTExtensions/MouseClickSimulator/wiki/Running-the-Simulator SetLocal ENABLEDELAYEDEXPANSION REM Change the working directory to the script's directory. REM E.g. if the user right-clicks on the script and selects "Run as Administrator", REM the working directory would be the windows\system32 dir. cd "%~dp0" echo.Building the TTR Mouse Click Simulator... echo. REM MSBuild is always installed in the 32-Bit program files folder if "!ProgramFiles(x86)!"=="" ( set "ProgramFiles32Bit=!ProgramFiles!" ) else ( set "ProgramFiles32Bit=!ProgramFiles(x86)!" ) set "BuildExe=!ProgramFiles32Bit!\MSBuild\14.0\Bin\MSBuild.exe" if not exist "!BuildExe!" ( echo.ERROR: MSBuild not found at "!BuildExe!"^^! pause exit /b 1 ) "!BuildExe!" /v:minimal /nologo /p:Configuration=Release "TTMouseclickSimulator\TTMouseclickSimulator.csproj" if not errorlevel 1 ( echo. echo.Build successful^^! ) pause exit /b !ERRORLEVEL!```
b81fb0f8-818d-4092-8091-a5925f1e7ebb
{ "language": "Batchfile" }
```batchfile @echo off mkdir public\compiled set ts_apps=common chess ceval game tree for %%t in (%ts_apps%) do @( call echo Building TypeScript: %%t call cd ui\%%t call yarn install --non-interactive call yarn run compile --non-interactive call cd ..\.. ) set apps=site chat challenge notify learn insight editor puzzle round analyse lobby tournament tournamentSchedule simul perfStat dasher for %%a in (%apps%) do @( call echo Building: %%a call cd ui\%%a call yarn install --non-interactive call gulp dev call cd ..\.. ) ``` Replace a tab with 4 spaces
```batchfile @echo off mkdir public\compiled set ts_apps=common chess ceval game tree for %%t in (%ts_apps%) do @( call echo Building TypeScript: %%t call cd ui\%%t call yarn install --non-interactive call yarn run compile --non-interactive call cd ..\.. ) set apps=site chat challenge notify learn insight editor puzzle round analyse lobby tournament tournamentSchedule simul perfStat dasher for %%a in (%apps%) do @( call echo Building: %%a call cd ui\%%a call yarn install --non-interactive call gulp dev call cd ..\.. ) ```
31afda1f-0e29-46b6-a41a-65487f8aae8c
{ "language": "Batchfile" }
```batchfile @echo off rem installer bug. http://stackoverflow.com/a/25095327 mkdir "%APPDATA%\npm" > NUL 2>&1 set PATH=node_modules\.bin;node_modules\lisb-hubot\node_modules\.bin;%PATH% call npm install for /f "delims=\" %%i in ("%CD%") do set UID=%%i if "%REDIS_URL%" = "" ( set REDIS_URL=redis://localhost:6379/%UID% ) if "%1" == "start" ( forever start ^ --uid "%UID%" ^ --minUptime 10000 --spinSleepTime 600000 ^ -o hubot.log -a ^ -w --watchDirectory scripts ^ -c coffee node_modules\.bin\hubot.cmd -a direct %* ) else if "%1" == "stop" ( forever stop "%UID%" ) else if "%1" == "restart" ( forever restart "%UID%" ) else if "%1" == "status" ( forever list | find "] %UID% " ) else if "%1" == "logs" ( cat hubot.log | more ) else ( node_modules\.bin\hubot.cmd -a direct %* ) ``` Fix the condition to compare strings in the script on Windows.
```batchfile @echo off rem installer bug. http://stackoverflow.com/a/25095327 mkdir "%APPDATA%\npm" > NUL 2>&1 set PATH=node_modules\.bin;node_modules\lisb-hubot\node_modules\.bin;%PATH% call npm install for /f "delims=\" %%i in ("%CD%") do set UID=%%i if "%REDIS_URL%" == "" ( set REDIS_URL=redis://localhost:6379/%UID% ) if "%1" == "start" ( forever start ^ --uid "%UID%" ^ --minUptime 10000 --spinSleepTime 600000 ^ -o hubot.log -a ^ -w --watchDirectory scripts ^ -c coffee node_modules\.bin\hubot.cmd -a direct %* ) else if "%1" == "stop" ( forever stop "%UID%" ) else if "%1" == "restart" ( forever restart "%UID%" ) else if "%1" == "status" ( forever list | find "] %UID% " ) else if "%1" == "logs" ( cat hubot.log | more ) else ( node_modules\.bin\hubot.cmd -a direct %* ) ```
15f7da31-ebb8-4312-ba60-b2c78e157dbb
{ "language": "Batchfile" }
```batchfile set CMAKE_CONFIG=Release mkdir build_%CMAKE_CONFIG% pushd build_%CMAKE_CONFIG% cmake -G "NMake Makefiles" ^ -DCMAKE_BUILD_TYPE:STRING=%CMAKE_CONFIG% ^ -DBLA_VENDOR:STRING=OpenBLAS ^ -DENABLE_PYTHON:BOOL=ON ^ -DBUILD_DOCUMENTATION:BOOL=OFF ^ "%SRC_DIR%" if errorlevel 1 exit rem 1 cmake --build . --target install --config %CMAKE_CONFIG% if errorlevel 1 exit 1 popd ``` Set install prefix in windows
```batchfile set CMAKE_CONFIG=Release mkdir build_%CMAKE_CONFIG% pushd build_%CMAKE_CONFIG% cmake -G "NMake Makefiles" ^ -DCMAKE_BUILD_TYPE:STRING=%CMAKE_CONFIG% ^ -DBLA_VENDOR:STRING=OpenBLAS ^ -DENABLE_PYTHON:BOOL=ON ^ -DCMAKE_INSTALL_PREFIX:PATH="%LIBRARY_PREFIX%" ^ -DBUILD_DOCUMENTATION:BOOL=OFF ^ -DVCOMP_WORKAROUND=OFF ^ "%SRC_DIR%" if errorlevel 1 exit rem 1 cmake --build . --target install --config %CMAKE_CONFIG% if errorlevel 1 exit 1 popd ```
479e56dd-590b-42cd-bb89-e86b4256ef04
{ "language": "Batchfile" }
```batchfile SETLOCAL SET Version=2.5.0 SET Prerelease=auto @SET Config=%1% @IF [%1] == [] SET Config=Debug IF NOT DEFINED VisualStudioVersion CALL "%VS140COMNTOOLS%VsDevCmd.bat" || ECHO ERROR: Cannot find Visual Studio 2015, missing VS140COMNTOOLS variable. && GOTO Error0 @ECHO ON REM Updating the version of all projects PowerShell .\ChangeVersion.ps1 %Version% %Prerelease% || GOTO Error0 REM NuGet Automatic Package Restore requires "NuGet.exe restore" to be executed before the command-line build. WHERE /Q NuGet.exe || ECHO ERROR: Please download the NuGet.exe command line tool. && GOTO Error0 NuGet.exe restore Rhetos.sln -NonInteractive || GOTO Error0 MSBuild.exe "Rhetos.sln" /target:rebuild /p:Configuration=%Config% /verbosity:minimal /fileLogger || GOTO Error0 CALL CreateInstallationPackage.bat %Config% /NOPAUSE || GOTO Error0 REM Updating the version of all projects back to "dev" (internal development build), to avoid spamming git history. PowerShell .\ChangeVersion.ps1 %Version% dev || GOTO Error0 @REM ================================================ @ECHO. @ECHO %~nx0 SUCCESSFULLY COMPLETED. @EXIT /B 0 :Error0 @ECHO. @ECHO %~nx0 FAILED. @IF /I [%2] NEQ [/NOPAUSE] @PAUSE @EXIT /B 1 ``` Set Powershell ExecutionPolicy for build.
```batchfile SETLOCAL SET Version=2.5.0 SET Prerelease=auto @SET Config=%1% @IF [%1] == [] SET Config=Debug IF NOT DEFINED VisualStudioVersion CALL "%VS140COMNTOOLS%VsDevCmd.bat" || ECHO ERROR: Cannot find Visual Studio 2015, missing VS140COMNTOOLS variable. && GOTO Error0 @ECHO ON REM Updating the version of all projects PowerShell -ExecutionPolicy ByPass .\ChangeVersion.ps1 %Version% %Prerelease% || GOTO Error0 REM NuGet Automatic Package Restore requires "NuGet.exe restore" to be executed before the command-line build. WHERE /Q NuGet.exe || ECHO ERROR: Please download the NuGet.exe command line tool. && GOTO Error0 NuGet.exe restore Rhetos.sln -NonInteractive || GOTO Error0 MSBuild.exe "Rhetos.sln" /target:rebuild /p:Configuration=%Config% /verbosity:minimal /fileLogger || GOTO Error0 CALL CreateInstallationPackage.bat %Config% /NOPAUSE || GOTO Error0 REM Updating the version of all projects back to "dev" (internal development build), to avoid spamming git history. PowerShell -ExecutionPolicy ByPass .\ChangeVersion.ps1 %Version% dev || GOTO Error0 @REM ================================================ @ECHO. @ECHO %~nx0 SUCCESSFULLY COMPLETED. @EXIT /B 0 :Error0 @ECHO. @ECHO %~nx0 FAILED. @IF /I [%2] NEQ [/NOPAUSE] @PAUSE @EXIT /B 1 ```
10e0e052-295a-452c-ba92-0f865bbffed4
{ "language": "Batchfile" }
```batchfile mkdir mage composer install rem Actions after deploy (database creation, files copy, etc) copy ..\src\app\etc\nmmlm mage\app\etc``` Deploy script changed from copy to xcopy
```batchfile mkdir mage composer install rem Actions after deploy (database creation, files copy, etc) xcopy ..\src\app\etc\nmmlm mage\app\etc\nmmlm /E /Y /I```
b5ceab61-9b57-4d97-a3c9-36b395d5f6a5
{ "language": "Batchfile" }
```batchfile @echo Off set config=%1 if "%config%" == "" ( set config=Release ) set version=1.0.0 if not "%PackageVersion%" == "" ( set version=%PackageVersion% ) set nuget= if "%nuget%" == "" ( set nuget=nuget ) %WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild Bot.Messenger.sln /p:Configuration="%config%" /m /v:M /fl /flp:LogFile=msbuild.log;Verbosity=diag /nr:false mkdir Build mkdir Build\lib mkdir Build\lib\net45 %nuget% pack "Bot.Messenger.nuspec" -NoPackageAnalysis -verbosity detailed -o Build -Version %version% -p Configuration="%config%" ``` Build commant updated to target MSBuild\14.0
```batchfile @echo Off set config=%1 if "%config%" == "" ( set config=Release ) set version=1.0.0 if not "%PackageVersion%" == "" ( set version=%PackageVersion% ) set nuget= if "%nuget%" == "" ( set nuget=nuget ) %programfiles(x86)%\MSBuild\14.0\Bin\MSBuild.exe Bot.Messenger.sln /p:Configuration="%config%" /m /v:M /fl /flp:LogFile=msbuild.log;Verbosity=diag /nr:false mkdir Build mkdir Build\lib mkdir Build\lib\net461 %nuget% pack "Bot.Messenger.nuspec" -NoPackageAnalysis -verbosity detailed -o Build -Version %version% -p Configuration="%config%" ```
85025325-cd36-405e-9048-8d897c5b4c57
{ "language": "Batchfile" }
```batchfile @ECHO OFF :: Note: We've disabled node reuse because it causes file locking issues. :: The issue is that we extend the build with our own targets which :: means that that rebuilding cannot successully delete the task :: assembly. "%SystemRoot%\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe" /nologo /m /v:m /nr:false /flp:verbosity=normal %1 %2 %3 %4 %5 %6 %7 %8 %9 ``` Replace individual parameters with wildcard
```batchfile @ECHO OFF :: Note: We've disabled node reuse because it causes file locking issues. :: The issue is that we extend the build with our own targets which :: means that that rebuilding cannot successfully delete the task :: assembly. "%SystemRoot%\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe" /nologo /m /v:m /nr:false /flp:verbosity=normal %* ```
7f6d9114-ad01-4e5c-93f8-33744041eb4d
{ "language": "Batchfile" }
```batchfile ``` Add bat script that is added into choosenim zip release.
```batchfile @echo off .\choosenim\choosenim.exe stable --firstInstall for /f "delims=" %%a in ('.\choosenim\choosenim.exe --getNimbleBin') do @set NIMBLEBIN=%%a copy .\choosenim\choosenim.exe "%NIMBLEBIN%\choosenim.exe" echo Work finished. echo Now you must ensure that the Nimble bin dir is in your PATH: echo %NIMBLEBIN% pause```
e0012f8d-c625-4962-87b8-6dbc88e53424
{ "language": "Batchfile" }
```batchfile @ECHO OFF ECHO. ECHO =============================================================== ECHO. ECHO Building: %1 ECHO. ECHO =============================================================== ECHO. Call "C:\Program Files (x86)\MSBuild\12.0\Bin\MsBuild.exe" %1 /p:Configuration=Release /p:PostBuildEvent= ``` Build Parameters (less logging in console)
```batchfile @ECHO OFF ECHO. ECHO =============================================================== ECHO. ECHO Building: %1 ECHO. ECHO =============================================================== ECHO. Call "C:\Program Files (x86)\MSBuild\12.0\Bin\MsBuild.exe" %1 /p:Configuration=Release /consoleloggerparameters:Summary;ErrorsOnly /nologo /p:PostBuildEvent= ```
3a1539e6-8106-4f85-8414-6cf90d355a52
{ "language": "Batchfile" }
```batchfile call "%ProgramFiles(x86)%\Microsoft Visual Studio 9.0\VC\bin\vcvars32.bat" nmake dir WIN2000_DEBUG\*.exe copy WIN2000_DEBUG\*.exe ..\Bin\ pause ``` Use RETAIL mode for Python Library Issues
```batchfile call "%ProgramFiles(x86)%\Microsoft Visual Studio 9.0\VC\bin\vcvars32.bat" nmake nodebug=1 dir WIN2000_DEBUG\*.exe copy WIN2000_DEBUG\*.exe ..\Bin\ pause ```
1156ef4f-3345-441f-88f4-20f406b508f3
{ "language": "Batchfile" }
```batchfile @echo off setlocal set OUTDIR=%1 set JSENG=%2 set CYGWIN_ROOT=%~dp0..\..\..\third_party\cygwin\ set GNU_ROOT=%~dp0..\..\..\third_party\gnu\files set PATH=%CYGWIN_ROOT%bin;%GNU_ROOT%;%SystemRoot%;%SystemRoot%\system32 :: Ensure that the cygwin mount points are defined CALL %CYGWIN_ROOT%setup_mount.bat > NUL bash -x create-config.sh %OUTDIR% %JSENG% ``` Fix a build issue with Vista. Stop cp.exe from trying to emulate POSIX security on top of NTFS.
```batchfile @echo off setlocal set OUTDIR=%1 set JSENG=%2 set CYGWIN_ROOT=%~dp0..\..\..\third_party\cygwin\ set GNU_ROOT=%~dp0..\..\..\third_party\gnu\files :: Fix cp.exe on vista: without this flag, the files that it creates are not accessible. set CYGWIN=nontsec set PATH=%CYGWIN_ROOT%bin;%GNU_ROOT%;%SystemRoot%;%SystemRoot%\system32 :: Ensure that the cygwin mount points are defined CALL %CYGWIN_ROOT%setup_mount.bat > NUL bash -x create-config.sh %OUTDIR% %JSENG% ```
45a92a14-e4b0-4da1-bcf1-d87f009d9e9c
{ "language": "Batchfile" }
```batchfile ``` Add script to start all services at once.
```batchfile start nodemon SimulationManager/server.js start nodemon FloodSim/server.js start nodemon CriticalObjectSim/server.js start nodemon ElectricalNetworkSim/server.js start nodemon HazardousObjectSim/server.js start nodemon RoadSim/server.js start nodemon CommunicationSim/server.js```
98cc811d-ae45-44c7-84f6-90d65ff81692
{ "language": "Batchfile" }
```batchfile @ECHO OFF set GO_ROOT=%~dp0\..\..\.. set JRUBY_BASE=%GO_ROOT%\tools\jruby-1.7.11 set SERVER_ROOT=%GO_ROOT%\server set RAILS_ROOT=%SERVER_ROOT%\webapp\WEB-INF\rails.new set GEM_HOME=%RAILS_ROOT%\vendor\bundle\jruby\1.9 set GEM_PATH=%JRUBY_BASE%\lib\ruby\gems\shared;%GEM_HOME% set PATH=%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 GO_ROOT=%~dp0\..\..\.. set JRUBY_BASE=%GO_ROOT%\tools\jruby-1.7.11 set SERVER_ROOT=%GO_ROOT%\server set RAILS_ROOT=%SERVER_ROOT%\webapp\WEB-INF\rails.new set GEM_HOME=%RAILS_ROOT%\vendor\bundle\jruby\1.9 set GEM_PATH=%JRUBY_BASE%\lib\ruby\gems\shared;%GEM_HOME% set PATH=%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 %* ```
1e8d432d-3da9-4281-8947-8dcac6c4da34
{ "language": "Batchfile" }
```batchfile setlocal set MYDIRBLOCK=%~dp0 call %MYDIRBLOCK%..\..\..\config_env_base.bat %HIDEWINDOW% h set EPICS_CAS_INTF_ADDR_LIST=127.0.0.1 set EPICS_CAS_BEACON_ADDR_LIST=127.255.255.255 set PYTHONUNBUFFERED=TRUE %PYTHON% %MYDIRBLOCK%ArchiverAccess\archiver_access.py ``` Put back echo and python
```batchfile @echo off setlocal set MYDIRBLOCK=%~dp0 call %MYDIRBLOCK%..\..\..\config_env_base.bat %HIDEWINDOW% h set EPICS_CAS_INTF_ADDR_LIST=127.0.0.1 set EPICS_CAS_BEACON_ADDR_LIST=127.255.255.255 set PYTHONUNBUFFERED=TRUE %PYTHONW% %MYDIRBLOCK%ArchiverAccess\archiver_access.py ```
4e15d44d-0482-4db6-8740-2ff0c04ea8eb
{ "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 "" ``` Fix echo commands in a virtualenv Windows batch file
```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: ```
354a0cc0-1f39-4617-ad80-995f13011681
{ "language": "Batchfile" }
```batchfile @echo off python "%~dp0\ktransw.py" %* ``` Add missing license to wrapper batch.
```batchfile @echo off REM REM Copyright (c) 2016, G.A. vd. Hoorn REM REM Licensed under the Apache License, Version 2.0 (the "License"); REM you may not use this file except in compliance with the License. REM You may obtain a copy of the License at REM REM http://www.apache.org/licenses/LICENSE-2.0 REM REM Unless required by applicable law or agreed to in writing, software REM distributed under the License is distributed on an "AS IS" BASIS, REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. REM See the License for the specific language governing permissions and REM limitations under the License. REM python "%~dp0\ktransw.py" %* ```
22419ebf-ee8b-4af7-8992-7324797277fd
{ "language": "Batchfile" }
```batchfile @echo off cd "%~dp0" IF EXIST ..\composer.json IF NOT EXIST ..\vendor\.composer ( ECHO Composer installing vendors... >> ..\startup-tasks-log.txt 'D:\Program Files (x86)\PHP\v5.3\php.exe' ..\bin\composer.phar install ECHO Vendors installed >> ..\startup-tasks-log.txt ) ECHO Starting Symfony Setup... >> ..\startup-tasks-log.txt 'D:\Program Files (x86)\PHP\v5.3\php.exe' ..\app\console --env=prod cache:clear ECHO Symfony Cache warmed up >> ..\startup-tasks-log.txt ``` Remove composer optimization as this doesnt work at the moment.
```batchfile @echo off cd "%~dp0" ECHO Starting Symfony Setup... >> ..\startup-tasks-log.txt 'D:\Program Files (x86)\PHP\v5.3\php.exe' ..\app\console --env=prod cache:clear ECHO Symfony Cache warmed up >> ..\startup-tasks-log.txt ```
5bd96085-9091-479c-9b97-fe259affdf76
{ "language": "Batchfile" }
```batchfile @echo off if "%1" == "build" goto build if "%1" == "tar" goto zip if "%1" == "zip" goto zip goto eof :build electron-packager . %npm_package_name% --platform=all --arch=x64 --version=%npm_package_electronVersion% --out=build --ignore="(build|node_modules)" --app-version="%npm_package_version%" --version-string.FileDescription="%npm_package_productName%" --version-string.ProductName="%npm_package_productName%" --overwrite goto eof :zip set ZIP_NAME=%~2 set BUILD_NAME=%npm_package_name%-%ZIP_NAME%-x64 set "BUILD_PATH=build/%BUILD_NAME%" echo =============== echo Zip name: %ZIP_NAME% echo Zip type: %1 echo Build name: %BUILD_NAME% echo Build path: %BUILD_PATH% echo =============== cd %BUILD_PATH% if "%1" == "tar" ( 7za a -ttar -so -snl "..\%BUILD_NAME%.tar" . | 7za a -si "..\%BUILD_NAME%.tgz" | find /I "ing" ) else ( 7za a -tzip "..\%BUILD_NAME%.zip" . | find /I "ing" ) goto eof :eof ``` Delete old zip files before zip process
```batchfile @echo off if "%1" == "build" goto build if "%1" == "tar" goto zip if "%1" == "zip" goto zip goto eof :build electron-packager . %npm_package_name% --platform=all --arch=x64 --version=%npm_package_electronVersion% --out=build --ignore="(build|node_modules)" --app-version="%npm_package_version%" --version-string.FileDescription="%npm_package_productName%" --version-string.ProductName="%npm_package_productName%" --overwrite goto eof :zip set ZIP_NAME=%~2 set BUILD_NAME=%npm_package_name%-%ZIP_NAME%-x64 set "BUILD_PATH=build/%BUILD_NAME%" echo =============== echo Zip name: %ZIP_NAME% echo Zip type: %1 echo Build name: %BUILD_NAME% echo Build path: %BUILD_PATH% echo =============== cd %BUILD_PATH% echo Zip process started if "%1" == "tar" ( del "..\%BUILD_NAME%.tgz" >nul 2>&1 7za a -ttar -so -snl "..\%BUILD_NAME%.tar" . | 7za a -si "..\%BUILD_NAME%.tgz" | find /I "ing" ) else ( del "..\%BUILD_NAME%.zip" >nul 2>&1 7za a -tzip "..\%BUILD_NAME%.zip" . | find /I "ing" ) echo Zip process finished echo =============== goto eof :eof ```
c012a7d6-0655-4d09-9cfd-fbbbfd623563
{ "language": "Batchfile" }
```batchfile ``` Add script for studio with plugin running
```batchfile SET pathToVS12=C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe SET pathToVS11=C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\devenv.exe IF EXIST %pathToVS12%( "%pathToVS12%" /RootSuffix YC /ReSharper.Internal Exit /b ) IF EXIST %pathToVS11% ( "%pathToVS11%" /RootSuffix YC /ReSharper.Internal Exit /b ) ELSE ( echo "Microsoft Visual Studio 11 and Microsoft Visual Studio 12 weren't found. Try run plugin manually with keys /RootSuffix YC /ReSharper.Internal" )```
16e6b08a-60b7-4abe-a7a6-ab5148b9f707
{ "language": "Batchfile" }
```batchfile @rem enter repo root cd /d %~dp0\..\..\..\.. cd csharp @rem see what dotnet version is available dotnet --version @rem TODO(jtattermusch): Kokoro workers currently only have dotnet SDK 2.1.3 @rem so we just overwrite the SDK requirement in global.json as the results @rem should be fully compatible. echo { "sdk": { "version": "2.1.3" } } >global.json call build_packages.bat ``` Revert "overcome the global.json constraint with a hack"
```batchfile @rem enter repo root cd /d %~dp0\..\..\..\.. cd csharp call build_packages.bat ```
abdbf104-d0d8-4160-81cb-56c85309f5a9
{ "language": "Batchfile" }
```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 ``` Use copy for configuration file copy
```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\ copy ..\..\Src\UI\Web\DarunGrim3Sample01.cfg Src\DarunGrim3.cfg ```
eda150fc-a2d0-420d-8458-4c3a35a8570a
{ "language": "Batchfile" }
```batchfile @setlocal EnableDelayedExpansion EnableExtensions @for %%i in (%~dp0\_packer_config*.cmd) do @call "%%~i" @if defined PACKER_DEBUG (@echo on) else (@echo off) if not defined PACKER_SERVICES set PACKER_SERVICES=opensshd sshd BvSshServer winrm title Starting services: %PACKER_SERVICES%. Please wait... :: Intentionally named with zz so it runs last by 00-run-all-scripts.cmd so :: that the Packer winrm/ssh connections is not inadvertently dropped during the :: Sysprep run for %%i in (%PACKER_SERVICES%) do ( echo ==^> Checking if the %%i service is installed sc query %%i >nul 2>nul && ( echo ==^> Starting the %%i service sc start %%i ) ) :exit0 ver>nul goto :exit :exit1 verify other 2>nul :exit ``` Configure winrm service to autostart
```batchfile @setlocal EnableDelayedExpansion EnableExtensions @for %%i in (%~dp0\_packer_config*.cmd) do @call "%%~i" @if defined PACKER_DEBUG (@echo on) else (@echo off) if not defined PACKER_SERVICES set PACKER_SERVICES=opensshd sshd BvSshServer winrm title Starting services: %PACKER_SERVICES%. Please wait... :: Intentionally named with zz so it runs last by 00-run-all-scripts.cmd so :: that the Packer winrm/ssh connections is not inadvertently dropped during the :: Sysprep run for %%i in (%PACKER_SERVICES%) do ( echo ==^> Checking if the %%i service is installed sc query %%i >nul 2>nul && ( echo ==^> Configuring %%i service to autostart sc config %%i start= auto echo ==^> Starting the %%i service sc start %%i ) ) :exit0 ver>nul goto :exit :exit1 verify other 2>nul :exit ```
6c56e0db-2ff9-418a-b959-15606573c5b2
{ "language": "Batchfile" }
```batchfile :: :: Microsoft Azure SDK for Net - Generate library code :: Copyright (C) Microsoft Corporation. All Rights Reserved. :: :: https://github.com/Azure/azure-rest-api-specs/commits/master @echo off set autoRestVersion=0.16.0-Nightly20160406 if "%1" == "" ( set specFile="https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/arm-storage/2015-06-15/swagger/storage.json" ) else ( set specFile="%1" ) set repoRoot=%~dp0..\..\..\.. set generateFolder=%~dp0Generated if exist %generateFolder% rd /S /Q %generateFolder% call "%repoRoot%\tools\autorest.gen.cmd" %specFile% Microsoft.Azure.Management.Storage %autoRestVersion% %generateFolder% "-FT 2" ``` Undo unintentional change to storage project
```batchfile :: :: Microsoft Azure SDK for Net - Generate library code :: Copyright (C) Microsoft Corporation. All Rights Reserved. :: @echo off set autoRestVersion=0.16.0-Nightly20160406 if "%1" == "" ( set specFile="https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/arm-storage/2015-06-15/swagger/storage.json" ) else ( set specFile="%1" ) set repoRoot=%~dp0..\..\..\.. set generateFolder=%~dp0Generated if exist %generateFolder% rd /S /Q %generateFolder% call "%repoRoot%\tools\autorest.gen.cmd" %specFile% Microsoft.Azure.Management.Storage %autoRestVersion% %generateFolder% "-FT 2" ```
49391afa-fc0e-4927-aca8-8f817d7b8a62
{ "language": "Batchfile" }
```batchfile @rem Schema downloader @rem @rem Tool to download schemas. @echo off setlocal if "%XMLBEANS_HOME%" EQU "" (set XMLBEANS_HOME=%~dp0..) set cp= set cp=%cp%;%XMLBEANS_HOME%\build\ar\xbean.jar java -classpath %cp% org.apache.xmlbeans.impl.tool.SchemaResourceManager %* :done ``` Fix for sDownload tool. Added correct v2 classpath entries. Submitted by: Jacob Danner
```batchfile @rem Schema downloader @rem @rem Tool to download schemas. @echo off setlocal if "%XMLBEANS_HOME%" EQU "" (set XMLBEANS_HOME=%~dp0..) set cp= set cp=%cp%;%XMLBEANS_HOME%\build\ar\xbean.jar set cp=%cp%;%XMLBEANS_HOME%\build\lib\jsr173_api.jar set cp=%cp%;%XMLBEANS_HOME%\build\lib\resolver.jar java -classpath %cp% org.apache.xmlbeans.impl.tool.SchemaResourceManager %* :done ```
7ef11ffb-6960-462f-874c-5f6bc527e40a
{ "language": "Batchfile" }
```batchfile ``` Add batch file for Windows support
```batchfile @echo off rem %~dp0 returns the absolute path where the current script is. We just append 'iban-check' to it, and forward all the arguments with %* ruby "%~dp0iban-check" %* ```
da769b4f-f701-445c-9e8b-e89d37bb22b2
{ "language": "Batchfile" }
```batchfile @echo off setlocal set OUTDIR=%1 set JSENG=%2 set CYGWIN_ROOT=%~dp0..\..\..\third_party\cygwin\ set GNU_ROOT=%~dp0..\..\..\third_party\gnu\files set PATH=%CYGWIN_ROOT%bin;%GNU_ROOT%;%SystemRoot%;%SystemRoot%\system32 :: Ensure that the cygwin mount points are defined CALL %CYGWIN_ROOT%setup_mount.bat > NUL bash -x create-config.sh %OUTDIR% %JSENG% ``` Fix a build issue with Vista. Stop cp.exe from trying to emulate POSIX security on top of NTFS.
```batchfile @echo off setlocal set OUTDIR=%1 set JSENG=%2 set CYGWIN_ROOT=%~dp0..\..\..\third_party\cygwin\ set GNU_ROOT=%~dp0..\..\..\third_party\gnu\files :: Fix cp.exe on vista: without this flag, the files that it creates are not accessible. set CYGWIN=nontsec set PATH=%CYGWIN_ROOT%bin;%GNU_ROOT%;%SystemRoot%;%SystemRoot%\system32 :: Ensure that the cygwin mount points are defined CALL %CYGWIN_ROOT%setup_mount.bat > NUL bash -x create-config.sh %OUTDIR% %JSENG% ```
1d07d76f-3c4f-4182-b2de-dcbb123a12dd
{ "language": "Batchfile" }
```batchfile :: This script assumes the standard setup on tensorflow Jenkins windows machines. :: It is NOT guaranteed to work on any other machine. Use at your own risk! :: :: REQUIREMENTS: :: * All installed in standard locations: :: - JDK8, and JAVA_HOME set. :: - Microsoft Visual Studio 2015 Community Edition :: - Msys2 :: - Anaconda3 :: - CMake :: Record the directory we are in. Script should be invoked from the root of the repository. SET REPO_ROOT=%cd% :: Make sure we have a clean directory to build things in. SET BUILD_DIR=cmake_build RMDIR %BUILD_DIR% /S /Q MKDIR %BUILD_DIR% CD %BUILD_DIR% :: Set which tests to build SET BUILD_CC_TESTS=OFF SET BUILD_PYTHON_TESTS=ON :: Run the CMAKE build to build the pip package. CALL %REPO_ROOT%\tensorflow\tools\ci_build\windows\cpu\cmake\run_build.bat SET PIP_EXE="C:\Program Files\Anaconda3\Scripts\pip.exe" :: Uninstall tensorflow pip package, which might be a leftover from old runs. %PIP_EXE% uninstall -y tensorflow :: Install the pip package. %PIP_EXE% install --upgrade %REPO_ROOT%\%BUILD_DIR%\tf_python\dist\tensorflow-0.11.0rc2_cmake_experimental-py3-none-any.whl :: Run all python tests ctest -C Release --output-on-failure ``` Update name of PIP package
```batchfile :: This script assumes the standard setup on tensorflow Jenkins windows machines. :: It is NOT guaranteed to work on any other machine. Use at your own risk! :: :: REQUIREMENTS: :: * All installed in standard locations: :: - JDK8, and JAVA_HOME set. :: - Microsoft Visual Studio 2015 Community Edition :: - Msys2 :: - Anaconda3 :: - CMake :: Record the directory we are in. Script should be invoked from the root of the repository. SET REPO_ROOT=%cd% :: Make sure we have a clean directory to build things in. SET BUILD_DIR=cmake_build RMDIR %BUILD_DIR% /S /Q MKDIR %BUILD_DIR% CD %BUILD_DIR% :: Set which tests to build SET BUILD_CC_TESTS=OFF SET BUILD_PYTHON_TESTS=ON :: Run the CMAKE build to build the pip package. CALL %REPO_ROOT%\tensorflow\tools\ci_build\windows\cpu\cmake\run_build.bat SET PIP_EXE="C:\Program Files\Anaconda3\Scripts\pip.exe" :: Uninstall tensorflow pip package, which might be a leftover from old runs. %PIP_EXE% uninstall -y tensorflow :: Install the pip package. %PIP_EXE% install --upgrade %REPO_ROOT%\%BUILD_DIR%\tf_python\dist\tensorflow-0.11.0rc2-cp35-cp35m-win_amd64.whl :: Run all python tests ctest -C Release --output-on-failure ```
2757d9d0-3c7a-46fc-8dab-22444beda4ba
{ "language": "Batchfile" }
```batchfile Set DecorateName=DecorateName Set Book=mencius Set FontType=Traditional Set BookFont=%Book%_%FontType% Set CSSExt=.css Set CSS_=--css=..\css\ Set NameStyle=%CSS_%%DecorateName%%CSSExt% Set Output=%BookFont% If "%1" == "name" ( Set Output=%Output%_%DecorateName% Set Style=%NameStyle% ) If Not "%2" == "" ( Set Output=%Output%_%2 Set Style=%Style% %CSS_%%2%CSSExt% ) If Not "%3" == "" ( Set Output=%Output%_%3 Set Style=%Style% %CSS_%%3%CSSExt% ) Set HTMLExt=.html Set HTMLOutput=%Output%%HTMLExt% Call pandoc ..\source\%Book%.md -o %HTMLOutput% --standalone --toc %Style% --verbose Call wkhtmltopdf.exe %HTMLOutput% %Output%.pdf``` Build header and footer for the pdf file
```batchfile Set DecorateName=DecorateName Set Book=mencius Set FontType=Traditional Set BookFont=%Book%_%FontType% Set CSSExt=.css Set CSS_=--css=..\css\ Set NameStyle=%CSS_%%DecorateName%%CSSExt% Set Output=%BookFont% If "%1" == "name" ( Set Output=%Output%_%DecorateName% Set Style=%NameStyle% ) If Not "%2" == "" ( Set Output=%Output%_%2 Set Style=%Style% %CSS_%%2%CSSExt% ) If Not "%3" == "" ( Set Output=%Output%_%3 Set Style=%Style% %CSS_%%3%CSSExt% ) Set HTMLExt=.html Set HTMLOutput=%Output%%HTMLExt% Call pandoc ..\source\%Book%.md -o %HTMLOutput% --standalone --toc %Style% --verbose Call wkhtmltopdf.exe --margin-top 15 --margin-bottom 15 --header-center [section] --header-left [subsection] --header-right [page] --header-line --header-spacing 5 --footer-center "Version 0.1" --footer-line --footer-spacing 5 %HTMLOutput% %Output%.pdf```
4326fdd8-4ccb-409a-81fc-659d5bf72540
{ "language": "Batchfile" }
```batchfile setlocal EnableDelayedExpansion echo Running Windows build and testscript %~dp0..\matlab\CIBuildAndTest.m echo Path: %PATH% set MATCOMMAND="try, run('%~dp0..\matlab\CIBuildAndTest.m'), catch ex, system(['ECHO Exception during CIBuildAndTest.m: ' ex.message]), exit(1), end, exit(0);" "C:\Program Files\MATLAB\R2015b\bin\matlab.exe" -wait -nodisplay -nosplash -nodesktop -logfile ci-output.log -r %MATCOMMAND% set LEVEL=!ERRORLEVEL! type ci-output.log if not "!LEVEL!" == "0" ( echo ERROR: Exit Code = !LEVEL! exit /b 1 ) ``` Add file check before printing log file
```batchfile setlocal EnableDelayedExpansion echo Running Windows build and testscript %~dp0..\matlab\CIBuildAndTest.m echo Path: %PATH% set MATCOMMAND="try, run('%~dp0..\matlab\CIBuildAndTest.m'), catch ex, system(['ECHO Exception during CIBuildAndTest.m: ' ex.message]), exit(1), end, exit(0);" "C:\Program Files\MATLAB\R2015b\bin\matlab.exe" -wait -nodisplay -nosplash -nodesktop -logfile ci-output.log -r %MATCOMMAND% set LEVEL=!ERRORLEVEL! if exist ci-output.log ( type ci-output.log ) else ( echo Log file not found ) if not "!LEVEL!" == "0" ( echo ERROR: Exit Code = !LEVEL! exit /b 1 ) ```
592d5426-80fb-4f10-8c5b-a050988545b6
{ "language": "Batchfile" }
```batchfile ::I use PortableGit\bin in PATH git init ::Ensure we have these for the next step git checkout master && git commit -a -m "Deployment" && git push ::Switch to gh-pages, pull from master, commit, then switch back to master. git checkout gh-pages && git checkout master psdle*.js && git checkout master psdle.xpi && git commit -a -m "Sync with master." && git push && git checkout master git checkout master``` Deploy - Remove XPI checkout to gh-pages
```batchfile ::I use PortableGit\bin in PATH git init ::Ensure we have these for the next step git checkout master && git commit -a -m "Deployment" && git push ::Switch to gh-pages, pull from master, commit, then switch back to master. git checkout gh-pages && git checkout master psdle*.js && git commit -a -m "Sync with master." && git push && git checkout master git checkout master```
f5f614a2-5740-4551-a5fd-a2199588c467
{ "language": "Batchfile" }
```batchfile ``` Add publish.bat to push packages to vnext nuget server
```batchfile @echo off dotnet pack src/AspectCore.Lite.Abstractions --configuration Release --output packages dotnet pack src/AspectCore.Lite.Abstractions.Generator --configuration Release --output ../packages dotnet pack src/AspectCore.Lite.Abstractions.Resolution --configuration Release --output packages dotnet pack src/AspectCore.Lite.DynamicProxy --configuration Release --output ../packages set /p key=input key: for /R "../packages" %%s in (*symbols.nupkg) do ( call nuget push %%s -s http://servicepackages.chinacloudsites.cn/nuget %key% ) pause ```
6c7a27d0-4737-4469-b0f1-b82a96d0b9da
{ "language": "Batchfile" }
```batchfile @echo off cd build nuget restore packages.config -PackagesDirectory . cd .. build\OpenCover.4.6.519\tools\OpenCover.Console.exe -target:"dotnet.exe" -targetargs:"test tests\LineBot.Tests\LineBot.Tests.csproj --no-build -c release /p:codecov=true" -register:user -threshold:10 -oldStyle -safemode:off -output:.\LineBot.Coverage.xml -hideskipped:All -returntargetcode" if %errorlevel% neq 0 exit /b %errorlevel% SET PATH=C:\\Python34;C:\\Python34\\Scripts;%PATH% pip install codecov codecov -f "LineBot.Coverage.xml"``` Make sure codecov can understand ExcludeFromCodeCoverage.
```batchfile @echo off cd build nuget restore packages.config -PackagesDirectory . cd .. build\OpenCover.4.6.519\tools\OpenCover.Console.exe -target:"dotnet.exe" -targetargs:"test tests\LineBot.Tests\LineBot.Tests.csproj --no-build -c release /p:codecov=true" -register:user -threshold:10 -oldStyle -safemode:off -output:.\LineBot.Coverage.xml -hideskipped:All -excludebyattribute:*.ExcludeFromCodeCoverage* -returntargetcode" if %errorlevel% neq 0 exit /b %errorlevel% SET PATH=C:\\Python34;C:\\Python34\\Scripts;%PATH% pip install codecov codecov -f "LineBot.Coverage.xml"```
de458e75-440b-41c8-88ab-12653c363681
{ "language": "Batchfile" }
```batchfile echo off call "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\Common7\Tools\VsDevCmd.bat" -host_arch=amd64 -arch=amd64 call "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\Common7\Tools\VsDevCmd.bat" -test cd dist/msvc-compatible cl *.c /I ../kremlin/include /I . /I ../kremlin/kremlib/dist/minimal /c || goto :error for /F %i in ('dir /b *-x86_64-msvc.asm') do (ml64 /c %i || goto :error) lib *.obj || goto :error echo "SUCCESS" :error echo "Failed" exit /b %errorlevel% ``` Fix syntax of for loops in batch files
```batchfile echo off call "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\Common7\Tools\VsDevCmd.bat" -host_arch=amd64 -arch=amd64 call "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\Common7\Tools\VsDevCmd.bat" -test cd dist/msvc-compatible cl *.c /I ../kremlin/include /I . /I ../kremlin/kremlib/dist/minimal /c || goto :error for /F %%i in ('dir /b *-x86_64-msvc.asm') do ( ml64 /c %%i || goto :error ) lib *.obj || goto :error echo "SUCCESS" exit /b 0 :error echo "Failed" exit /b %errorlevel% ```
b0b3702f-5cce-4868-b4fa-dff13c2a8376
{ "language": "Batchfile" }
```batchfile cscript msvc-scripts/rep.vbs //Nologo s/@VERSION@/1.0.12/ < src\libsodium\include\sodium\version.h.in > tmp cscript msvc-scripts/rep.vbs //Nologo s/@SODIUM_LIBRARY_VERSION_MAJOR@/9/ < tmp > tmp2 cscript msvc-scripts/rep.vbs //Nologo s/@SODIUM_LIBRARY_VERSION_MAJOR@/9/ < tmp2 > tmp3 cscript msvc-scripts/rep.vbs //Nologo s/@SODIUM_LIBRARY_MINIMAL_DEF@// < tmp3 > src\libsodium\include\sodium\version.h del tmp tmp2 tmp3 ``` Correct @SODIUM_LIBRARY_VERSION_MINOR@ substitution for Visual Studio
```batchfile cscript msvc-scripts/rep.vbs //Nologo s/@VERSION@/1.0.12/ < src\libsodium\include\sodium\version.h.in > tmp cscript msvc-scripts/rep.vbs //Nologo s/@SODIUM_LIBRARY_VERSION_MAJOR@/9/ < tmp > tmp2 cscript msvc-scripts/rep.vbs //Nologo s/@SODIUM_LIBRARY_VERSION_MINOR@/4/ < tmp2 > tmp3 cscript msvc-scripts/rep.vbs //Nologo s/@SODIUM_LIBRARY_MINIMAL_DEF@// < tmp3 > src\libsodium\include\sodium\version.h del tmp tmp2 tmp3 ```
262aaa18-2f62-489a-a4f1-3f3879cc36e1
{ "language": "Batchfile" }
```batchfile @Echo Off REM set your api key once: nuget setApiKey Your-API-Key SET "nuget_basedir=" "%ProgramFiles(x86)%/Microsoft Visual Studio 14.0/Common7/IDE/devenv" /build release ../proj/SecurityServer/proj/SecurityServer.sln IF %ERRORLEVEL% NEQ 0 ( echo. && echo. && echo Build failed. exit /B 1 ) %nuget_basedir%nuget.exe pack Dragon.SecurityServer.AccountSTS.Client.nuspec %nuget_basedir%nuget.exe pack Dragon.SecurityServer.ProfileSTS.Client.nuspec %nuget_basedir%nuget.exe pack Dragon.SecurityServer.PermissionSTS.Client.nuspec REM %nuget_basedir%nuget push Dragon.SecurityServer.AccountSTS.Client*.nupkg REM %nuget_basedir%nuget push Dragon.SecurityServer.ProfileSTS.Client*.nupkg REM %nuget_basedir%nuget push Dragon.SecurityServer.PermissionSTS.Client*.nupkg ``` Exclude PermissionSTS from NuGet package generation
```batchfile @Echo Off REM set your api key once: nuget setApiKey Your-API-Key SET "nuget_basedir=" "%ProgramFiles(x86)%/Microsoft Visual Studio 14.0/Common7/IDE/devenv" /build release ../proj/SecurityServer/proj/SecurityServer.sln IF %ERRORLEVEL% NEQ 0 ( echo. && echo. && echo Build failed. exit /B 1 ) %nuget_basedir%nuget.exe pack Dragon.SecurityServer.AccountSTS.Client.nuspec %nuget_basedir%nuget.exe pack Dragon.SecurityServer.ProfileSTS.Client.nuspec REM %nuget_basedir%nuget.exe pack Dragon.SecurityServer.PermissionSTS.Client.nuspec echo. echo. echo To publish, run: echo %nuget_basedir%nuget push Dragon.SecurityServer.AccountSTS.Client*.nupkg echo %nuget_basedir%nuget push Dragon.SecurityServer.ProfileSTS.Client*.nupkg REM %nuget_basedir%nuget push Dragon.SecurityServer.PermissionSTS.Client*.nupkg ```
32e265e9-469d-4bcf-80bb-f9a26489baad
{ "language": "Batchfile" }
```batchfile @echo off set /P NVM_PATH="Enter the absolute path where the zip file is extracted/copied to: " set NVM_HOME=%NVM_PATH% set NVM_SYMLINK=C:\Program Files\nodejs setx /M NVM_HOME "%NVM_HOME%" setx /M NVM_SYMLINK "%NVM_SYMLINK%" for /f "skip=2 tokens=2,*" %%A in ('reg query "HKLM\System\CurrentControlSet\Control\Session Manager\Environment" /v Path 2^>nul') do ( setx /M PATH "%%B;%%NVM_HOME%%;%%NVM_SYMLINK%%" ) if exist "%SYSTEMDRIVE%\Program Files (x86)\" ( set SYS_ARCH=64 ) else ( set SYS_ARCH=32 ) (echo root: %NVM_HOME% && echo path: %NVM_SYMLINK% && echo arch: %SYS_ARCH% && echo proxy: none) > %NVM_HOME%\settings.txt notepad %NVM_HOME%\settings.txt @echo on ``` Define that NVM_PATH is for nvm
```batchfile @echo off set /P NVM_PATH="Enter the absolute path where the nvm-windows zip file is extracted/copied to: " set NVM_HOME=%NVM_PATH% set NVM_SYMLINK=C:\Program Files\nodejs setx /M NVM_HOME "%NVM_HOME%" setx /M NVM_SYMLINK "%NVM_SYMLINK%" for /f "skip=2 tokens=2,*" %%A in ('reg query "HKLM\System\CurrentControlSet\Control\Session Manager\Environment" /v Path 2^>nul') do ( setx /M PATH "%%B;%%NVM_HOME%%;%%NVM_SYMLINK%%" ) if exist "%SYSTEMDRIVE%\Program Files (x86)\" ( set SYS_ARCH=64 ) else ( set SYS_ARCH=32 ) (echo root: %NVM_HOME% && echo path: %NVM_SYMLINK% && echo arch: %SYS_ARCH% && echo proxy: none) > %NVM_HOME%\settings.txt notepad %NVM_HOME%\settings.txt @echo on ```
bde1e5b2-0e94-48b9-a3d8-f69a59abb70c
{ "language": "Batchfile" }
```batchfile @echo off cd %~dp0.. rake -f Build\build-win.rb "build:no_test_build[., SevenDigital.Messaging.sln, build, full, local, Release]" ``` Update build.cmd to use platform agnostic rakefile
```batchfile @echo off cd %~dp0.. rake -f build\build.rb "build:no_test_build[., SevenDigital.Messaging.sln, build, full, local, Release]" ```
7e187ac1-c9f9-4a52-845b-9d6b5f21b6cc
{ "language": "Batchfile" }
```batchfile @rem Change the current directory to the one containing this script @cd %~dp0 @rem Build Hadrian and dependencies @stack build @rem Run Hadrian in GHC top directory forwarding additional user arguments @stack exec hadrian -- --lint --directory ".." %* ``` Exit the build script if Hadrian cannot be built
```batchfile @rem Change the current directory to the one containing this script @cd %~dp0 @rem Build Hadrian and dependencies and exit the script if the build failed @stack build @if %errorlevel% neq 0 exit /B %errorlevel% @rem Run Hadrian in GHC top directory forwarding additional user arguments @stack exec hadrian -- --lint --directory ".." %* ```
a5f0d86c-59e7-4c61-812c-d68453e36ff7
{ "language": "Batchfile" }
```batchfile @echo off setlocal set PATH=C:\Program Files (x86)\Git\bin\;%PATH% call "C:\Program Files (x86)\Microsoft Visual Studio 10.0\vc\vcvarsall.bat" x86 REM call "C:\Program Files (x86)\Microsoft Visual Studio 11.0\vc\vcvarsall.bat" x86 set DXROOT=C:\Program Files\Sandcastle %~dp0\External\nant\bin\nant %*``` Switch to Visual Studio 2012 for build release
```batchfile @echo off setlocal set PATH=C:\Program Files (x86)\Git\bin\;%PATH% REM call "C:\Program Files (x86)\Microsoft Visual Studio 10.0\vc\vcvarsall.bat" x86 call "C:\Program Files (x86)\Microsoft Visual Studio 11.0\vc\vcvarsall.bat" x86 set DXROOT=C:\Program Files\Sandcastle %~dp0\External\nant\bin\nant %*```
f49e4348-1f4e-4db4-9e35-c796546105a5
{ "language": "Batchfile" }
```batchfile ``` Add Windows bat file for flashing arduino firmware
```batchfile @echo off if "%1"=="" goto :usage if "%2"=="" ( echo Error! No hex file provided. goto :usage ) if not exist "%2" ( echo %2 does not exist goto :eof ) if not exist avrdude.exe ( echo Error! This script must be executed within the "avr" directory goto :eof ) avrdude.exe -c stk500v2 -b 115200 -p atmega2560 -P %1 -U %2 -C avrdude.conf goto :eof :usage echo Usage: flash_firmware.bat COM_PORT HEX_FILE :eof ```
bb5fd55e-6a42-4543-a553-e632bf7dbb7d
{ "language": "Batchfile" }
```batchfile echo Running Windows build and test call "C:\Program Files\MATLAB\R2015b\bin\matlab.exe" -wait -nodisplay -nosplash -nodesktop -r "try, run('$(pwd)/matlab/CIBuildAndTest.m'), catch ex, disp(['Exception during CIBuildAndTest.m: ' ex.message]), exit(1), end, exit(0);" if not "%ERRORLEVEL%" == "0" ( echo Exit Code = %ERRORLEVEL% exit /b 1 )``` Fix current directory for batch file
```batchfile echo Running Windows build and test call "C:\Program Files\MATLAB\R2015b\bin\matlab.exe" -wait -nodisplay -nosplash -nodesktop -r "try, run('%cd%/matlab/CIBuildAndTest.m'), catch ex, disp(['Exception during CIBuildAndTest.m: ' ex.message]), exit(1), end, exit(0);" if not "%ERRORLEVEL%" == "0" ( echo Exit Code = %ERRORLEVEL% exit /b 1 )```
14708f4c-04b3-42d3-9567-c1c5342e1f47
{ "language": "Batchfile" }
```batchfile call clean ..\Output\NET40\Examples call clean ..\Output\NET45\Examples REM "C:\Program Files\7-Zip\7z.exe" a ..\Output\OxyPlot-NET40-%1.zip ..\Output\NET40\*.* > ZipRelease.log REM "C:\Program Files\7-Zip\7z.exe" a ..\Output\OxyPlot-NET45-%1.zip ..\Output\NET45\*.* >> ZipRelease.log REM "C:\Program Files\7-Zip\7z.exe" a ..\Output\OxyPlot-SL4-%1.zip ..\Output\SL4\*.* >> ZipRelease.log REM "C:\Program Files\7-Zip\7z.exe" a ..\Output\OxyPlot-SL5-%1.zip ..\Output\SL5\*.* >> ZipRelease.log REM "C:\Program Files\7-Zip\7z.exe" a -r ..\Output\OxyPlot-NET40-Examples-%1.zip ..\Output\NET40\Examples\*.* >> ZipRelease.log REM "C:\Program Files\7-Zip\7z.exe" a -r ..\Output\OxyPlot-NET45-Examples-%1.zip ..\Output\NET45\Examples\*.* >> ZipRelease.log "C:\Program Files\7-Zip\7z.exe" a -r ..\Output\OxyPlot-%1.zip ..\Output\*.* > ZipRelease.log``` Remove examples from Codeplex Release package. Include NET40/NET45/SL5/NetCore45 libraries, remove OpenXml and Pdf packages (use NuGet if you need these).
```batchfile mkdir ..\Output\Release mkdir ..\Output\Release\NET40 mkdir ..\Output\Release\NET45 mkdir ..\Output\Release\NetCore45 mkdir ..\Output\Release\NetCore45\Themes mkdir ..\Output\Release\SL5 copy ..\Output\NET45\OxyPlot.??? ..\Output\Release copy ..\Output\NET40\OxyPlot.WindowsForms.??? ..\Output\Release\NET40 copy ..\Output\NET45\OxyPlot.WindowsForms.??? ..\Output\Release\NET45 copy ..\Output\NET40\OxyPlot.WPF.??? ..\Output\Release\NET40 copy ..\Output\NET45\OxyPlot.WPF.??? ..\Output\Release\NET45 copy ..\Output\SL5\OxyPlot.Silverlight.??? ..\Output\Release\SL5 copy ..\Output\NetCore45\OxyPlot.Metro.??? ..\Output\Release\NetCore45 copy ..\Output\NetCore45\Themes\*.* ..\Output\Release\NetCore45\Themes "C:\Program Files\7-Zip\7z.exe" a -r ..\Output\OxyPlot-%1.zip ..\Output\Release\*.* > ZipRelease.log```
e1b482de-7636-4061-b8bb-7e30ca64ce69
{ "language": "Batchfile" }
```batchfile ``` Add batch file for windows
```batchfile @echo off @rem Check for mvn in path, use it if found, otherwise use maven wrapper @set MAVEN_CMD=mvn @WHERE /Q mvn @IF %ERRORLEVEL% NEQ 0 set MAVEN_CMD=.\mvnw.bat @if "%1" == "" call:help @if "%1" == "copy" call:copy @if "%1" == "clean" call:clean %2 %3 %4 @if "%1" == "package" call:package %2 %3 %4 @if "%1" == "bootrun" call:bootrun %2 %3 %4 @if "%1" == "debug" call:debug %2 %3 %4 @if "%1" == "run" call:run %2 %3 %4 @if "%1" == "help" call:help @rem function section starts here @goto:eof :copy set CONFIG_DIR=\etc\cas\config @echo "Creating configuration directory under %CONFIG_DIR%" if not exist %CONFIG_DIR% mkdir %CONFIG_DIR% @echo "Copying configuration files from etc/cas to /etc/cas" xcopy /S /Y etc\cas\* \etc\cas @goto:eof :help @echo "Usage: build.bat [copy|clean|package|run|debug|bootrun] [optional extra args for maven]" @goto:eof :clean call %MAVEN_CMD% clean %1 %2 %3 exit /B %ERRORLEVEL% @goto:eof :package call %MAVEN_CMD% clean package -T 5 %1 %2 %3 exit /B %ERRORLEVEL% @goto:eof :bootrun call %MAVEN_CMD% clean package spring-boot:run -T 5 %1 %2 %3 exit /B %ERRORLEVEL% @goto:eof :debug call:package %1 %2 %3 & java -Xdebug -Xrunjdwp:transport=dt_socket,address=5000,server=y,suspend=n -jar target/cas.war @goto:eof :run call:package %1 %2 %3 & java -jar target/cas.war @goto:eof ```
cce8767f-516a-44ed-81ac-a749ad197a70
{ "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 CALL BootDPRO CALL TestDPRO``` Fix failing VersionResourceTests caused by removal of EXE/DLLs from image repo.
```batchfile ECHO Clone Dolphin image environment git clone -q --branch=master https://github.com/dolphinsmalltalk/Dolphin.git Dolphin ECHO Copy executables copy ..\..\*.exe Dolphin copy ..\..\*.dll Dolphin ECHO Boot and test image cd Dolphin CALL BootDPRO CALL TestDPRO```
0db9c4d0-9864-48f6-9962-35c974792dd3
{ "language": "Batchfile" }
```batchfile REM Clean Up rmdir /Q /S Src rmdir /Q /S Bin del /Q DarunGrim3.zip mkdir Src\bin copy ..\DarunGrim2\* Src\bin\ copy ..\..\Publish\Docs\*.pdf Src\bin call CopySrc.bat REM Generate binaries pushd Src c:\python26\python SetupDist.py py2exe popd REM Prepare binary directory REM Copy necessary files copy ..\..\Src\UI\Web\DarunGrim3Sample01.cfg Src\bin\DarunGrim3.cfg REM Clean up some unncessary files del /Q Src\Bin\w9xpopen.exe del /Q Src\Bin\Test.exe del /Q Src\Bin\tcl*.dll del /Q Src\Bin\tk*.dll rmdir /Q /S Src\Bin\tcl REM Put data directory to binary directory xcopy /y /s /I ..\..\Src\UI\Web\data Src\bin\data REM move bin directory location mv Src\bin Bin REM zip a package zip -r DarunGrim3.zip Bin\* pause ``` Remove *.pyc files from distribution files
```batchfile REM Clean Up rmdir /Q /S Src rmdir /Q /S Bin del /Q DarunGrim3.zip mkdir Src\bin copy ..\DarunGrim2\* Src\bin\ copy ..\..\Publish\Docs\*.pdf Src\bin call CopySrc.bat del Src\*.pyc REM Generate binaries pushd Src c:\python26\python SetupDist.py py2exe popd REM Prepare binary directory REM Copy necessary files copy ..\..\Src\UI\Web\DarunGrim3Sample01.cfg Src\bin\DarunGrim3.cfg REM Clean up some unncessary files del /Q Src\Bin\w9xpopen.exe del /Q Src\Bin\Test.exe del /Q Src\Bin\tcl*.dll del /Q Src\Bin\tk*.dll rmdir /Q /S Src\Bin\tcl REM Put data directory to binary directory xcopy /y /s /I ..\..\Src\UI\Web\data Src\bin\data REM move bin directory location mv Src\bin Bin REM zip a package zip -r DarunGrim3.zip Bin\* pause ```
709fe8ee-f12f-4d89-b913-d924b402fe6a
{ "language": "Batchfile" }
```batchfile setlocal pushd %~dp0 set msBuildDir=%WINDIR%\Microsoft.NET\Framework\v4.0.30319 call %msBuildDir%\msbuild.exe ClientKit\ClientKit.csproj /p:Configuration=Release20 /p:OutputPath=..\Managed-OSVR-Unity /p:NativeOutputSuffix32=x86 /p:NativeOutputSuffix64=x86_64%* endlocal ``` Fix build by restoring a missing space.
```batchfile setlocal pushd %~dp0 set msBuildDir=%WINDIR%\Microsoft.NET\Framework\v4.0.30319 call %msBuildDir%\msbuild.exe ClientKit\ClientKit.csproj /p:Configuration=Release20 /p:OutputPath=..\Managed-OSVR-Unity /p:NativeOutputSuffix32=x86 /p:NativeOutputSuffix64=x86_64 %* endlocal ```
071d7dbc-a4e4-4302-8921-2c46cb799565
{ "language": "Batchfile" }
```batchfile @echo off SETLOCAL cd /D %~dp0 call settings.cmd call ..\unxutils.cmd cd dist\%ARCH% call pp -B -o psass.exe ^ -I ../../../blib/lib ^ -M Encode::Byte ^ -M PerlIO::encoding ^ -M List::MoreUtils::XS ^ -M List::MoreUtils::PP ^ -M Win32::ChangeNotify ^ -M Filesys::Notify::Simple ^ -l "%PERLDIR%/perl/site/lib/libsass.dll" ^ -a "%PERLDIR%/perl/site/lib/auto/CSS/Sass/plugins;lib/auto/CSS/Sass/plugins" ^ CSS-Sass-%RELVERSION%/bin/psass cd ..\.. REM tested and working, but much bigger size REM -l "%PERLPATH%/c/bin/_libsass-0.dll" ^ copy %CD%\dist\%ARCH%\psass.exe %CD%\..\create\%XARCH% ``` Include perl benchmark module for psass utility
```batchfile @echo off SETLOCAL cd /D %~dp0 call settings.cmd call ..\unxutils.cmd cd dist\%ARCH% call pp -B -o psass.exe ^ -I ../../../blib/lib ^ -M Benchmark ^ -M Encode::Byte ^ -M PerlIO::encoding ^ -M List::MoreUtils::XS ^ -M List::MoreUtils::PP ^ -M Win32::ChangeNotify ^ -M Filesys::Notify::Simple ^ -l "%PERLDIR%/perl/site/lib/libsass.dll" ^ -a "%PERLDIR%/perl/site/lib/auto/CSS/Sass/plugins;lib/auto/CSS/Sass/plugins" ^ CSS-Sass-%RELVERSION%/bin/psass cd ..\.. REM tested and working, but much bigger size REM -l "%PERLPATH%/c/bin/_libsass-0.dll" ^ copy %CD%\dist\%ARCH%\psass.exe %CD%\..\create\%XARCH% ```
6fcf52d6-3009-411b-b928-2099c9f4c7d5
{ "language": "Batchfile" }
```batchfile @echo off set cwd=%cd% cd /D %~dp0 set DevCmd="C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\Tools\VsDevCmd.bat" set MSBuildOptions=/v:m /p:Configuration=Release set BuildDir64="build-exe-64" set BuildDir32="build-exe-32" call %DevCmd% echo Building 64-bit tev... mkdir %BuildDir64% cd %BuildDir64% cmake -DTEV_DEPLOY=1 -G "Visual Studio 15 2017 Win64" ..\.. msbuild %MSBuildOptions% tev.sln move "Release\tev.exe" "..\..\tev.exe" cd .. rmdir /S /Q %BuildDir64% echo Building 32-bit tev... mkdir %BuildDir32% cd %BuildDir32% cmake -DTEV_DEPLOY=1 -G "Visual Studio 15 2017" ..\.. msbuild %MSBuildOptions% tev.sln move "Release\tev.exe" "..\..\tev-32bit.exe" cd .. rmdir /S /Q %BuildDir32% echo Returning to original directory. cd /D %cwd% pause ``` Update automated release build scripts on Windows
```batchfile @echo off set cwd=%cd% cd /D %~dp0 set DevCmd="C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars64.bat" set MSBuildOptions=/v:m /p:Configuration=Release set BuildDir64="build-exe-64" call %DevCmd% echo Building 64-bit tev... mkdir %BuildDir64% cd %BuildDir64% cmake -DTEV_DEPLOY=1 -G "Visual Studio 16 2019" ..\.. msbuild %MSBuildOptions% tev.sln move "Release\tev.exe" "..\..\tev.exe" cd .. rmdir /S /Q %BuildDir64% echo Returning to original directory. cd /D %cwd% pause ```
d1ce2c08-85ca-4b96-b290-8dcccf9fa766
{ "language": "Batchfile" }
```batchfile ``` Add script to disable offiescan context menu
```batchfile @echo off setlocal EnableDelayedExpansion set registryRoot=HKCU\Software\Classes set key=OfficeScan NT reg add "%registryRoot%\*\shellex\ContextMenuHandlers\%key%" /d "---" /f ```
f2a91cea-8beb-4d93-866a-18facaee8191
{ "language": "Batchfile" }
```batchfile ``` Add script to generate gold CSVs
```batchfile :: Copyright 2020 Intel Corporation :: :: Permission is hereby granted, free of charge, to any person obtaining a copy :: of this software and associated documentation files (the "Software"), to :: deal in the Software without restriction, including without limitation the :: rights to use, copy, modify, merge, publish, distribute, sublicense, and/or :: sell copies of the Software, and to permit persons to whom the Software is :: furnished to do so, subject to the following conditions: :: :: The above copyright notice and this permission notice shall be included in :: all copies or substantial portions of the Software. :: :: THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR :: IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, :: FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE :: AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER :: LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING :: FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS :: IN THE SOFTWARE. @echo off setlocal enabledelayedexpansion set presentmon=%1 set rootdir=%~2 set force=0 if not exist %presentmon% goto usage if not exist "%rootdir%\." goto usage if "%~3"=="force" ( set force=1 ) else ( if not "%~3"=="" goto usage ) goto args_ok :usage echo usage: create_fold_csvs PresentMonPath GoldEtlCsvRootDir [force] exit /b 1 :args_ok set pmargs=-no_top -stop_existing_session -qpc_time -verbose -captureall for /f "tokens=*" %%a in ('dir /s /b /a-d "%rootdir%\*.etl"') do call :create_csv %%a exit /b 0 :create_csv if exist "%~dpn1.csv" if %force% neq 1 exit /b 0 echo %presentmon% %pmargs% -etl_file %1 -output_file "%~dpn1.csv" %presentmon% %pmargs% -etl_file %1 -output_file "%~dpn1.csv" echo. exit /b 0 ```
3c7dd7df-ab22-4dc5-93e7-2a6815144173
{ "language": "Batchfile" }
```batchfile ``` Add windows start batch script
```batchfile @echo off @title AvaIre Windows Launcher setlocal enabledelayedexpansion set Looping=False cls :START echo. echo Welcome to AvaIre's window launcher echo Please select an option to begin: echo. echo 1. Start the bot normally echo 2. Start the bot with automatic restarts echo 3. Update the bot using the nightly build echo 9. Exit program echo. set /p in="Enter your option: " if !in! == 1 ( goto START_BOT ) if !in! == 2 ( goto RESTART_LOOP ) if !in! == 3 ( goto UPDATE ) if !in! == 9 ( goto EOF ) else ( echo. echo Invalid option given goto START ) :RESTART_LOOP set Looping=True goto START_BOT :START_BOT java -Dfile.encoding=UTF-8 -jar AvaIre.jar --no-colors if !Looping! == False ( goto START ) echo. echo Restarting the bot in 5 second, press CTRL + C to cancel the process. echo. choice /d y /t 5 > nul goto START_BOT :UPDATE echo. echo Updating to the latest version using the nightly build echo Note: The script will download and unzip some files, this echo might cause your antivirus to see the script as a threat, echo just make an exception for the script so it can download echo the updates. echo. echo Tasks: echo|set /p=" - Downloading the nightly-build.jar file... " powershell -Command "(New-Object Net.WebClient).DownloadFile('https://avairebot.com/nightly-build.jar', 'nightly-build.jar')" echo Done echo|set /p=" - Deleting existing AvaIre.jar file... " rm AvaIre.jar > nul 2> nul echo Done echo|set /p=" - Renaming nightly-build.jar to AvaIre.jar... " ren nightly-build.jar AvaIre.jar > nul 2> nul echo Done echo. echo Ava has been successfully updated, going back to the menu. GOTO START :EOF exit ```
80cd850b-c2f8-46e9-825c-760d964baebc
{ "language": "Batchfile" }
```batchfile @echo off npm i&& for /D %%i in (zeronet-*) do (cd "%%i"&& npm i&& cd ..) goto :eof ``` Use symlink for windows too
```batchfile @echo off npm i&& for /D %%i in (zeronet-*) do (cd "%%i"&& mklink /D node_modules ..\node_modules&& cd ..) goto :eof ```
d08eba5f-c109-4fbe-b9c5-e690b21ea7a8
{ "language": "Batchfile" }
```batchfile CD git/re2 || EXIT /B 1 cmake . || EXIT /B 1 cmake --build . --clean-first || EXIT /B 1 ctest -E dfa^|exhaustive^|random || EXIT /B 1 cmake -DCMAKE_BUILD_TYPE=Release . || EXIT /B 1 cmake --build . --clean-first || EXIT /B 1 ctest -E dfa^|exhaustive^|random || EXIT /B 1 EXIT /B 0 ``` Tweak the CI script for CMake on Windows.
```batchfile CD git/re2 || EXIT /B 1 cmake -D CMAKE_BUILD_TYPE=Debug -A x64 . || EXIT /B 1 cmake --build . --config Debug --clean-first || EXIT /B 1 ctest --build-config Debug -E dfa^|exhaustive^|random || EXIT /B 1 cmake -D CMAKE_BUILD_TYPE=Release -A x64 . || EXIT /B 1 cmake --build . --config Release --clean-first || EXIT /B 1 ctest --build-config Release -E dfa^|exhaustive^|random || EXIT /B 1 EXIT /B 0 ```
abd01400-4c3a-4ce2-b8a6-41a56d1eb1cc
{ "language": "Batchfile" }
```batchfile @java -Xbootclasspath/a:.;nqp-runtime.jar;3rdparty/asm/asm-4.1.jar nqp %* ``` Fix Windows runner to load jline JAR.
```batchfile @java -Xbootclasspath/a:.;nqp-runtime.jar;3rdparty/asm/asm-4.1.jar;3rdparty/jline/jline-1.0.jar nqp %* ```
9f25bd5a-b7e3-4f96-b516-b23b73b724e2
{ "language": "Batchfile" }
```batchfile @rem if we don't have nmake in the path, we need to run setup where nmake.exe 2> NUL if %ERRORLEVEL% GTR 0 set need_setup=1 @rem if we don't have the include path set, we need to run setup if not defined INCLUDE set need_setup=1 @rem run setup if we need to if %need_setup% == 1 call "c:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" amd64 @rem Allow python build to succeed: @rem http://stackoverflow.com/questions/2817869/error-unable-to-find-vcvarsall-bat SET VS90COMNTOOLS=%VS120COMNTOOLS% @rem finally, run make nmake /nologo /s /f winbuild\Makefile %1 ``` Adjust windows build script some more
```batchfile @rem if we don't have nmake in the path, we need to run setup where nmake.exe 2> NUL if %ERRORLEVEL% GTR 0 set need_setup=1 @rem if we don't have the include path set, we need to run setup if not defined INCLUDE set need_setup=1 @rem run setup if we need to if %need_setup% == 1 call "c:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" amd64 @rem Allow python build to succeed: @rem http://stackoverflow.com/questions/2817869/error-unable-to-find-vcvarsall-bat SET VS90COMNTOOLS=%VS120COMNTOOLS% where python.exe 2> NUL if %ERRORLEVEL% GTR 0 set PATH=c:\Python27;%PATH% where php.exe 2> NUL if %ERRORLEVEL% GTR 0 set PATH=c:\php;%PATH% @rem finally, run make nmake /nologo /s /f winbuild\Makefile %1 ```
fba78d2f-a6b6-4985-b005-7300ad84ee03
{ "language": "Batchfile" }
```batchfile @echo off setlocal enabledelayedexpansion where /q msbuild if "%ERRORLEVEL%" == "0" ( goto :SkipDeveloperSetup ) set DeveloperCommandPrompt=%VS140COMNTOOLS%\VsDevCmd.bat if not exist "%DeveloperCommandPrompt%" ( echo In order to build this repository, you either need 'msbuild' on the path or Visual Studio 2015 installed. echo. echo Visit this page to download: echo. echo https://go.microsoft.com/fwlink/?LinkId=691978^&clcid=0x409 exit /b 1 ) call "%DeveloperCommandPrompt%" || goto :BuildFailed :SkipDeveloperSetup powershell -NoProfile -NoLogo -ExecutionPolicy Bypass -Command "& \"%~dp0build.ps1\" %*; exit $LastExitCode;" exit /b %ERRORLEVEL% :BuildFailed echo Build failed with ERRORLEVEL %ERRORLEVEL% exit /b 1 ``` Build with VS 15 dev tools
```batchfile @echo off setlocal enabledelayedexpansion where /q msbuild if "%ERRORLEVEL%" == "0" ( goto :SkipDeveloperSetup ) set DeveloperCommandPrompt=%VS150COMNTOOLS%\VsDevCmd.bat if not exist "%DeveloperCommandPrompt%" ( echo In order to build this repository, you either need 'msbuild' on the path or Visual Studio 2015 installed. echo. echo Visit this page to download: echo. echo https://go.microsoft.com/fwlink/?LinkId=691978^&clcid=0x409 exit /b 1 ) call "%DeveloperCommandPrompt%" || goto :BuildFailed :SkipDeveloperSetup powershell -NoProfile -NoLogo -ExecutionPolicy Bypass -Command "& \"%~dp0build.ps1\" %*; exit $LastExitCode;" exit /b %ERRORLEVEL% :BuildFailed echo Build failed with ERRORLEVEL %ERRORLEVEL% exit /b 1 ```
857f646b-af9a-4987-851b-6381550ccafa
{ "language": "Batchfile" }
```batchfile @ECHO OFF REM Sample usages: REM REM Building and running tests REM - build.libgit2sharp.cmd REM REM Building and identifying potential leaks while running tests REM - build.libgit2sharp.cmd "LEAKS_IDENTIFYING" SETLOCAL SET EXTRADEFINE=%~1 where dotnet 1>nul 2>nul IF ERRORLEVEL 1 ( ECHO Cannot find dotnet.exe. Run from a VS2017 Developer Prompt. EXIT /B 1 ) ECHO ON SET Configuration=Release :: Restore packages dotnet restore "%~dp0\" @IF ERRORLEVEL 1 EXIT /B %ERRORLEVEL% :: Build dotnet build "%~dp0\" /v:minimal /nologo /property:ExtraDefine="%EXTRADEFINE%" @IF ERRORLEVEL 1 EXIT /B %ERRORLEVEL% :: Run tests on Desktop and CoreCLR "%userprofile%\.nuget\packages\xunit.runner.console\2.2.0\tools\xunit.console.exe" "%~dp0bin\LibGit2Sharp.Tests\%Configuration%\net46\LibGit2Sharp.Tests.dll" -noshadow @IF ERRORLEVEL 1 EXIT /B %ERRORLEVEL% dotnet test "%~dp0LibGit2Sharp.Tests/LibGit2Sharp.Tests.csproj" --no-build -f netcoreapp1.0 @IF ERRORLEVEL 1 EXIT /B %ERRORLEVEL% EXIT /B %ERRORLEVEL% ``` Fix build script comments to match new name
```batchfile @ECHO OFF REM Sample usages: REM REM Building and running tests REM - buildandtest.cmd REM REM Building and identifying potential leaks while running tests REM - buildandtest.cmd "LEAKS_IDENTIFYING" SETLOCAL SET EXTRADEFINE=%~1 where dotnet 1>nul 2>nul IF ERRORLEVEL 1 ( ECHO Cannot find dotnet.exe. Run from a VS2017 Developer Prompt. EXIT /B 1 ) ECHO ON SET Configuration=Release :: Restore packages dotnet restore "%~dp0\" @IF ERRORLEVEL 1 EXIT /B %ERRORLEVEL% :: Build dotnet build "%~dp0\" /v:minimal /nologo /property:ExtraDefine="%EXTRADEFINE%" @IF ERRORLEVEL 1 EXIT /B %ERRORLEVEL% :: Run tests on Desktop and CoreCLR "%userprofile%\.nuget\packages\xunit.runner.console\2.2.0\tools\xunit.console.exe" "%~dp0bin\LibGit2Sharp.Tests\%Configuration%\net46\LibGit2Sharp.Tests.dll" -noshadow @IF ERRORLEVEL 1 EXIT /B %ERRORLEVEL% dotnet test "%~dp0LibGit2Sharp.Tests/LibGit2Sharp.Tests.csproj" --no-build -f netcoreapp1.0 @IF ERRORLEVEL 1 EXIT /B %ERRORLEVEL% EXIT /B %ERRORLEVEL% ```
71a83f86-4ef0-46df-81d0-01d6c9ccaa37
{ "language": "Batchfile" }
```batchfile @echo off set PYTHON=%~1 set PATH=%PYTHON%;%PYTHON%\Scripts;%PATH% python -m pytest python -m flake8 ``` Use pytest and flake8 commands.
```batchfile set PYTHON=%~1 set PATH=%PYTHON%;%PYTHON%\Scripts;%PATH% pytest flake8 ```
310a642f-6f3e-4b2f-b57e-c1b4e1ca7be0
{ "language": "Batchfile" }
```batchfile set projectPath=%~dp0 set androidStudioBin=A:\AndroidStudio\bin rem Android Studio needs the project path without a trailing backslash if %projectPath:~-1%==\ set projectPath=%projectPath:~0,-1% start "" /D "%androidStudioBin%" "studio.exe" "%projectPath%"``` Use studio64.exe instead of studio.exe
```batchfile set projectPath=%~dp0 set androidStudioBin=A:\AndroidStudio\bin rem Android Studio needs the project path without a trailing backslash if %projectPath:~-1%==\ set projectPath=%projectPath:~0,-1% start "" /D "%androidStudioBin%" "studio64.exe" "%projectPath%"```
975b0354-e8bb-4587-b3fa-f4bdec06467c
{ "language": "Batchfile" }
```batchfile @echo off :: install chocolatey @powershell -NoProfile -ExecutionPolicy unrestricted -Command "(iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))) >$null 2>&1" && SET PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin choco feature enable -n allowGlobalConfirmation :: general apps choco upgrade chocolatey 7zip 7zip.commandline putty filezilla adobereader slack javaruntime choco upgrade autoruns sdelete procexp procmon choco upgrade curl wget wput zip unzip optipng :: dev apps choco upgrade postgresql-9.3 pgadmin3 choco upgrade tortoisesvn git gitkraken choco upgrade atom visualstudiocode choco upgrade visualstudio2012professional -packageParameters "/Features:'OfficeTools'" choco upgrade ankhsvn wixtoolset ilspy depends choco upgrade dotnet4.6 dotnet4.5.2 dotnet4.5.1 dotnet4.5 dotnet3.5 ``` Add gimp, paint.net and inconsolata
```batchfile @echo off :: install chocolatey @powershell -NoProfile -ExecutionPolicy unrestricted -Command "(iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))) >$null 2>&1" && SET PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin choco feature enable -n allowGlobalConfirmation :: general apps choco upgrade chocolatey choco upgrade 7zip 7zip.commandline putty filezilla adobereader slack javaruntime gimp paint.net choco upgrade autoruns sdelete procexp procmon choco upgrade curl wget wput zip unzip optipng choco upgrade inconsolata :: dev apps choco upgrade postgresql-9.3 pgadmin3 choco upgrade tortoisesvn git gitkraken choco upgrade atom visualstudiocode choco upgrade visualstudio2012professional -packageParameters "/Features:'OfficeTools'" choco upgrade ankhsvn wixtoolset ilspy depends choco upgrade dotnet4.6 dotnet4.5.2 dotnet4.5.1 dotnet4.5 dotnet3.5 ```
0443fd6f-fec7-4b75-ba58-855616827196
{ "language": "Batchfile" }
```batchfile @echo off Rem Run UnRAVL's main entry point. Rem Command line arguments are UnRAVL script files to execute: Rem unravl.bat script1.json script2.json script3.json set UNRAVL_DIR=%~dp0..\..\.. set UNRAVL_JAR_DIR=%UNRAVL_DIR%\build\libs set UNRAVL_LIB_DIR=%UNRAVL_DIR%\build\output\lib java -Dapp.name=UnRAVL ^ -classpath %UNRAVL_JAR_DIR%\*;%UNRAVL_LIB_DIR%\* ^ %UNRAVL_OPT% ^ com.sas.unravl.Main ^ "%*" ``` Remove quotes around file from Windows batch
```batchfile @echo off Rem Run UnRAVL's main entry point. Rem Command line arguments are UnRAVL script files to execute: Rem unravl.bat script1.json script2.json script3.json set UNRAVL_DIR=%~dp0..\..\.. set UNRAVL_JAR_DIR=%UNRAVL_DIR%\build\libs set UNRAVL_LIB_DIR=%UNRAVL_DIR%\build\output\lib java -Dapp.name=UnRAVL ^ -classpath %UNRAVL_JAR_DIR%\*;%UNRAVL_LIB_DIR%\* ^ %UNRAVL_OPT% ^ com.sas.unravl.Main ^ %* ```
796c37b0-045c-436a-9101-5bd13da48db8
{ "language": "Batchfile" }
```batchfile ``` Add sample commands for using Glacier
```batchfile C:\Python27\Scripts\aws glacier initiate-job --account-id - ^ --vault-name demschooltools-backups ^ --job-parameters "{\"Type\": \"inventory-retrieval\"}" rem request an archive rem C:\Python27\Scripts\aws glacier initiate-job --account-id - ^ rem --vault-name demschooltools-backups ^ rem --job-parameters file://args.json rem put this in a file to request an archive rem { rem "Type": "archive-retrieval", rem "ArchiveId": "...", rem "Description": "6/14" rem } rem get finished archive retrieval or inventory rem C:\Python27\Scripts\aws glacier get-job-output --account-id - ^ rem --vault-name demschooltools-backups ^ rem --job-id Ip0zLTco2QAzzxlVZSVxJaCEHDmw8ozVwR_iFKE3xkaN79CXDSZ8gCihliK_N25IhsEN2U2QLzj1Bo_ttzxze1rv_voR ^ rem june_14.zip rem show jobs that are in progress rem C:\Python27\Scripts\aws glacier list-jobs ^ rem --account-id - --vault-name demschooltools-backups ```
3c49db29-3f3e-4ed6-af19-dd6b3f3e9650
{ "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 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 output = C:\steeltoe-test >> %USERINI% SET PATH=%PYTHON_HOME%\Scripts;%DOTNET_HOME%;%JAVA_HOME%\bin;%GIT_HOME%\bin;%MAVEN_HOME%\bin;%PATH% CALL %BASEDIR%\test-setup CALL %BASEDIR%\test-run %* ``` Use unique test out for each sample
```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 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 output = %TEST_OUT% >> %USERINI% SET PATH=%PYTHON_HOME%\Scripts;%DOTNET_HOME%;%JAVA_HOME%\bin;%GIT_HOME%\bin;%MAVEN_HOME%\bin;%PATH% CALL %BASEDIR%\test-setup CALL %BASEDIR%\test-run %* ```
fa31771f-8fe8-4bad-aec7-53928c6a4069
{ "language": "Batchfile" }
```batchfile ``` Add script to bump all prerelease corefx package build numbers
```batchfile @echo off if "%1" == "" goto :usage if "%2" == "" goto :usage goto :main :usage echo Usage: %~n0 [directory] [build] echo. echo Recursively replaces all occurrences of 4.0.XX-beta-YYYYY in echo [directory]\*.config;*.csproj;*.nuspec with 4.0.XX-beta-[build] goto :eof :main pushd %1 && git clean -f packages && call :replace %2 && call :cleanup && popd goto :eof :replace for /r %%f in (*.config *.csproj *.nuspec) do ( perl -i.tmp_spb -p -e "s/(4\.0\.[0-9]+-beta)-([0-9]+)/$1-%1/" %%f || goto :eof ) goto :eof :cleanup del /s *.tmp_spb goto :eof```
8f6e7cda-b5f9-44d9-b8a6-67467bdd1872
{ "language": "Batchfile" }
```batchfile @ECHO OFF Setlocal EnableDelayedExpansion CALL __Global.cmd ECHO *** Go Build *** ECHO Build compiles packages and dependencies with race condition detector ECHO. FOR /F "tokens=*" %%A IN (Packages.txt) DO ( SET PACKAGE=%%A ECHO Building: !PACKAGE! cd "%GOPATH%\src\!PACKAGE!" go build -v -race %LDFLAGS% !PACKAGE! ECHO. IF !ERRORLEVEL! NEQ 0 PAUSE ) ``` Delete syso file before building with race detector
```batchfile @ECHO OFF Setlocal EnableDelayedExpansion CALL __Global.cmd ECHO *** Go Build *** ECHO Build compiles packages and dependencies with race condition detector ECHO. FOR /F "tokens=*" %%A IN (Packages.txt) DO ( SET PACKAGE=%%A ECHO Building: !PACKAGE! cd "%GOPATH%\src\!PACKAGE!" DEL /Q /F *.syso go build -v -race %LDFLAGS% !PACKAGE! ECHO. IF !ERRORLEVEL! NEQ 0 PAUSE ) ```
3703ed63-76d0-44f5-acd1-995d1f520a60
{ "language": "Batchfile" }
```batchfile ``` Add script to build a Windows package on Windows
```batchfile @echo off :: This script will create a packaged version of the app in firmware_flasher in your home folder. :: After executing this script, use NSIS to create an installer from the firmware_flasher.win32.nsi file located there. :: You may need to run npm install electron-packager --global once before this will work correctly. set PLATFORM=win32 set ARCH=ia32 set OUTPUT_DIR=%userprofile%\firmware_flasher set PACKAGE_DIR="%OUTPUT_DIR%\QMK Firmware Flasher-%PLATFORM%-%ARCH%" call electron-packager . --platform=%PLATFORM% --arch=%ARCH% --out %OUTPUT_DIR% --overwrite copy firmware_flasher.win32.nsi %PACKAGE_DIR%```
192c1594-d255-4f22-bea1-9733b91ad9c5
{ "language": "Batchfile" }
```batchfile @echo off cd src pip install -r requirements.txt pause ``` Add local.py to windows install
```batchfile @echo off cd src pip install -r requirements.txt copy src\settings\local.py.example src\settings\local.py pause ```
1747a6e8-02f6-4f59-8cef-74e1204906ad
{ "language": "Batchfile" }
```batchfile call "%VS140COMNTOOLS%\..\..\VC\vcvarsall.bat" x64 set DISTUTILS_USE_SDK=1 set MSSdk=1 "%PYTHON%" setup.py install if errorlevel 1 exit 1 ``` Fix conda build on 32-bit Windows
```batchfile if "%ARCH%" == "32" (set PLATFORM=x86) else (set PLATFORM=x64) call "%VS140COMNTOOLS%\..\..\VC\vcvarsall.bat" %PLATFORM% set DISTUTILS_USE_SDK=1 set MSSdk=1 "%PYTHON%" setup.py install if errorlevel 1 exit 1 ```
42565b31-d3ce-4742-b0f0-8360793b2b44
{ "language": "Batchfile" }
```batchfile @rem Used by the buildbot "buildmsi" step. cmd /c Tools\buildbot\external.bat @rem build release versions of things call "%VS90COMNTOOLS%vsvars32.bat" if not exist ..\db-4.4.20\build_win32\release\libdb44s.lib ( vcbuild db-4.4.20\build_win32\Berkeley_DB.sln /build Release /project db_static ) @rem build Python cmd /q/c Tools\buildbot\kill_python.bat vcbuild /useenv PCbuild\pcbuild.sln "Release|Win32" @rem build the documentation bash.exe -c 'cd Doc;make PYTHON=python2.5 update htmlhelp' "%ProgramFiles%\HTML Help Workshop\hhc.exe" Doc\build\htmlhelp\pydoc.hhp @rem buold the MSI file cd PC nmake /f icons.mak cd ..\Tools\msi del *.msi nmake /f msisupport.mak %HOST_PYTHON% msi.py ``` Remove the building of Berkeley DB step; _bsddb44.vcproj takes care of this for us now.
```batchfile @rem Used by the buildbot "buildmsi" step. cmd /c Tools\buildbot\external.bat @rem build release versions of things call "%VS90COMNTOOLS%vsvars32.bat" @rem build Python cmd /q/c Tools\buildbot\kill_python.bat vcbuild /useenv PCbuild\pcbuild.sln "Release|Win32" @rem build the documentation bash.exe -c 'cd Doc;make PYTHON=python2.5 update htmlhelp' "%ProgramFiles%\HTML Help Workshop\hhc.exe" Doc\build\htmlhelp\pydoc.hhp @rem buold the MSI file cd PC nmake /f icons.mak cd ..\Tools\msi del *.msi nmake /f msisupport.mak %HOST_PYTHON% msi.py ```
e36c8961-6d35-4224-b8ed-9b60e50eba0b
{ "language": "Batchfile" }
```batchfile @echo off echo Building Module. echo Dependencies: GIT, PREMAKE5, VISUAL STUDIO 2015/2013. echo. :: Hacky way to ensure we've got a git repository & submodules at our disposal git init git submodule update --init --recursive echo. :: Fire up a Visual Studio command-line environment and generate our solution IF DEFINED VS140COMNTOOLS ( echo Preparing for build with Visual Studio 2015. premake5 vs2015 CALL "%VS140COMNTOOLS%VsMSBuildCmd.bat" ) ELSE IF DEFINED VS120COMNTOOLS ( echo Preparing for build with Visual Studio 2013. premake5 vs2013 CALL "%VS120COMNTOOLS%VsMSBuildCmd.bat" ) ELSE ( echo Failed to detect Visual Studio installation. timeout 5 exit /B 1 ) echo. for /R project %%X in (*.sln) do ( msbuild %%X ) :: We're done! timeout 5 exit /B %ERRORLEVEL% ``` Use VsDevCmd.Bat rather than VsMSBuildCmd.bat
```batchfile @echo off echo Building Module. echo Dependencies: GIT, PREMAKE5, VISUAL STUDIO 2015/2013. echo. :: Hacky way to ensure we've got a git repository & submodules at our disposal git init git submodule update --init --recursive echo. :: Fire up a Visual Studio command-line environment and generate our solution IF DEFINED VS140COMNTOOLS ( echo Preparing for build with Visual Studio 2015. premake5 vs2015 CALL "%VS140COMNTOOLS%VSDevCmd.bat" ) ELSE IF DEFINED VS120COMNTOOLS ( echo Preparing for build with Visual Studio 2013. premake5 vs2013 CALL "%VS120COMNTOOLS%VSDevCmd.bat" ) ELSE ( echo Failed to detect Visual Studio installation. timeout 5 exit /B 1 ) echo. for /R project %%X in (*.sln) do ( msbuild %%X ) :: We're done! timeout 5 exit /B %ERRORLEVEL% ```
b46de198-43db-476d-bf48-be9839db2001
{ "language": "Batchfile" }
```batchfile @if "%DEBUG%" == "" @echo off setlocal set SOURCE_DIR=%CD% set BUILD_DIR=%CD%\cppbuild\Release if EXIST %BUILD_DIR% rd /S /Q %BUILD_DIR% md %BUILD_DIR% pushd %BUILD_DIR% cmake -G "Visual Studio 16 2019" -DBUILD_AERON_DRIVER=ON %SOURCE_DIR% cmake --build . --clean-first --config Release ctest -C Release ``` Exit on first error (Windows)
```batchfile @if "%DEBUG%" == "" @echo off setlocal set SOURCE_DIR=%CD% set BUILD_DIR=%CD%\cppbuild\Release if EXIST %BUILD_DIR% rd /S /Q %BUILD_DIR% md %BUILD_DIR% pushd %BUILD_DIR% cmake -G "Visual Studio 16 2019" -DBUILD_AERON_DRIVER=ON %SOURCE_DIR% if %ERRORLEVEL% neq 0 exit /b %ERRORLEVEL% cmake --build . --clean-first --config Release if %ERRORLEVEL% neq 0 exit /b %ERRORLEVEL% ctest -C Release if %ERRORLEVEL% neq 0 exit /b %ERRORLEVEL% ```
55e352dd-c01f-46c8-8698-1770a5ea8bf0
{ "language": "Batchfile" }
```batchfile @ECHO OFF REM Run all code generation scripts REM Requires iMatix GSL4, from http:\\www.nuget.org\packages\gslgen REM Use this when: REM - you add a socket option (sockopts.xml) REM - add a new project class (project.xml) REM - modify one of the referenced gsl templates (*.gsl) mkdir ..\builds\mingw32 mkdir ..\builds\android mkdir ..\builds\msvc\vs2008\czmq mkdir ..\builds\msvc\vs2008\czmq_selftest mkdir ..\builds\msvc\vs2010\czmq mkdir ..\builds\msvc\vs2010\czmq_selftest mkdir ..\builds\msvc\vs2012\czmq mkdir ..\builds\msvc\vs2012\czmq_selftest mkdir ..\builds\msvc\vs2013\czmq mkdir ..\builds\msvc\vs2013\czmq_selftest gslgen -q -script:sockopts.gsl sockopts.xml gslgen -q -script:project.gsl project.xml ``` Use gsl vs. gslgen for batch model builds.
```batchfile @ECHO OFF REM Run all code generation scripts REM Requires iMatix GSL4, from http:\\www.nuget.org\packages\gsl REM Use this when: REM - you add a socket option (sockopts.xml) REM - add a new project class (project.xml) REM - modify one of the referenced gsl templates (*.gsl) mkdir ..\builds\mingw32 mkdir ..\builds\android mkdir ..\builds\msvc\vs2008\czmq mkdir ..\builds\msvc\vs2008\czmq_selftest mkdir ..\builds\msvc\vs2010\czmq mkdir ..\builds\msvc\vs2010\czmq_selftest mkdir ..\builds\msvc\vs2012\czmq mkdir ..\builds\msvc\vs2012\czmq_selftest mkdir ..\builds\msvc\vs2013\czmq mkdir ..\builds\msvc\vs2013\czmq_selftest gsl -q -script:sockopts.gsl sockopts.xml gsl -q -script:project.gsl project.xml ```
6aedffa6-fbd3-46cf-a1fa-0588e6c376ec
{ "language": "Batchfile" }
```batchfile @echo off rem math/big tests set PATH_TO_ODIN==..\..\..\..\odin set TEST_ARGS=-fast-tests set TEST_ARGS=-no-random set TEST_ARGS= set OUT_NAME=math_big_test_library set COMMON=-build-mode:shared -show-timings -no-bounds-check -define:MATH_BIG_EXE=false -vet -strict-style echo --- echo Running core:math/big tests echo --- %PATH_TO_ODIN% build . %COMMON% -o:speed -out:%OUT_NAME% python3 test.py %TEST_ARGS%``` Update CI for math library.
```batchfile @echo off rem math/big tests set PATH_TO_ODIN==..\..\..\..\odin set TEST_ARGS=-fast-tests set TEST_ARGS=-no-random set TEST_ARGS= set OUT_NAME=math_big_test_library.dll set COMMON=-build-mode:shared -show-timings -no-bounds-check -define:MATH_BIG_EXE=false -vet -strict-style echo --- echo Running core:math/big tests echo --- %PATH_TO_ODIN% build . %COMMON% -o:speed -out:%OUT_NAME% python3 test.py %TEST_ARGS%```
16ccee23-0cf3-4024-8383-51e559d9aed4
{ "language": "Batchfile" }
```batchfile @echo off pushd %~dp0 dotnet ArchiSteamFarm.dll %ASF_ARGS% ``` Add arguments parsing to batch script
```batchfile @echo off pushd %~dp0 :loop IF NOT "%1" == "" ( SET ASF_ARGS=%ASF_ARGS% %1 SHIFT GOTO :loop ) dotnet ArchiSteamFarm.dll %ASF_ARGS% ```
c87916e4-c4a4-4392-9efb-473827a6a0ed
{ "language": "Batchfile" }
```batchfile @echo off cls cd ".\src\Pickles\packages\NuGet.CommandLine.2.8.3\tools\" ".\NuGet.exe" "Install" "FAKE" "-OutputDirectory" "..\..\..\..\..\packages" "-ExcludeVersion" cd ..\..\..\..\.. "packages\FAKE\tools\Fake.exe" build.fsx --envvar version 0.19.0 "packages\FAKE\tools\Fake.exe" nuget.fsx --envvar version 0.19.0 "packages\FAKE\tools\Fake.exe" chocolatey.fsx --envvar version 0.19.0``` Set the version in an environment variable
```batchfile @echo off set "picklesVersion=0.19.0" cls cd ".\src\Pickles\packages\NuGet.CommandLine.2.8.3\tools\" ".\NuGet.exe" "Install" "FAKE" "-OutputDirectory" "..\..\..\..\..\packages" "-ExcludeVersion" cd ..\..\..\..\.. "packages\FAKE\tools\Fake.exe" build.fsx --envvar version %picklesVersion% "packages\FAKE\tools\Fake.exe" nuget.fsx --envvar version %picklesVersion% "packages\FAKE\tools\Fake.exe" chocolatey.fsx --envvar version %picklesVersion% ```
eb321b39-1ec8-4a32-9d83-da0aa1864385
{ "language": "Batchfile" }
```batchfile ``` Add script to reduce distributable size from 358 MB to 162 MB
```batchfile :: Script to trim size of unpacked build output. :: Removes extraneous contents not required to run Zephyr. :: Expected to be run from `.scripts` directory. @ECHO off set WORKING_DIRECTORY=..\dist\win-unpacked\resources\app.asar.unpacked\node_modules\node-openvr :: Check that working directory exists IF NOT EXIST %WORKING_DIRECTORY% ( echo Unable to find directory: %WORKING_DIRECTORY% exit /b 1 ) :: Naive check that script hasn't already run IF NOT EXIST %WORKING_DIRECTORY%\overlay ( echo Already trimmed! exit ) echo Cleaning up... :: Cleanup OpenVR directory rmdir /s /q %WORKING_DIRECTORY%\lib\openvr\bin rmdir /s /q %WORKING_DIRECTORY%\lib\openvr\controller_callouts rmdir /s /q %WORKING_DIRECTORY%\lib\openvr\lib rmdir /s /q %WORKING_DIRECTORY%\lib\openvr\samples rmdir /s /q %WORKING_DIRECTORY%\lib\openvr\src del %WORKING_DIRECTORY%\lib\openvr\CMakeLists.txt del %WORKING_DIRECTORY%\lib\openvr\README.md del %WORKING_DIRECTORY%\lib\openvr\Toolchain-clang.cmake :: Remove other directories/files rmdir /s /q %WORKING_DIRECTORY%\overlay rmdir /s /q %WORKING_DIRECTORY%\samples rmdir /s /q %WORKING_DIRECTORY%\src rmdir /s /q %WORKING_DIRECTORY%\tools del %WORKING_DIRECTORY%\.gitmodules echo Done!```
73e867ec-f0b6-4fee-8feb-15e3e3795e09
{ "language": "Batchfile" }
```batchfile @echo off cls java -Dj3d.rend=d3d -Djava.util.logging.config.file=conf/logging.properties -Xms512m -Xmx1384m -cp MZmine.jar net.sf.mzmine.main.MZmineClient ``` Complete implementation of module io running as a task.
```batchfile @echo off cls java -Dj3d.rend=d3d -Djava.library.path=lib -Djava.util.logging.config.file=conf/logging.properties -Xms512m -Xmx1384m -cp MZmine.jar net.sf.mzmine.main.MZmineClient ```
8da09fa4-e028-4972-a2f6-4676d6afe641
{ "language": "Batchfile" }
```batchfile @rem Fetches (and builds if necessary) external dependencies @rem Assume we start inside the Python source directory call "Tools\buildbot\external-common.bat" call "%VS90COMNTOOLS%\vsvars32.bat" if not exist tcltk\bin\tcl85g.dll ( cd tcl-8.5.2.1\win nmake -f makefile.vc COMPILERFLAGS=-DWINVER=0x0500 DEBUG=1 INSTALLDIR=..\..\tcltk clean all install cd ..\.. ) if not exist tcltk\bin\tk85g.dll ( cd tk-8.5.2.0\win nmake -f makefile.vc COMPILERFLAGS=-DWINVER=0x0500 DEBUG=1 INSTALLDIR=..\..\tcltk TCLDIR=..\..\tcl-8.5.2.1 clean all install cd ..\.. ) ``` Split Tcl make targets into separate ones.
```batchfile @rem Fetches (and builds if necessary) external dependencies @rem Assume we start inside the Python source directory call "Tools\buildbot\external-common.bat" call "%VS90COMNTOOLS%\vsvars32.bat" if not exist tcltk\bin\tcl85.dll ( @rem all and install need to be separate invocations, otherwise nmakehlp is not found on install cd tcl-8.5.2.1\win nmake -f makefile.vc COMPILERFLAGS=-DWINVER=0x0500 DEBUG=1 INSTALLDIR=..\..\tcltk clean all nmake -f makefile.vc DEBUG=1 INSTALLDIR=..\..\tcltk install cd ..\.. ) if not exist tcltk\bin\tk85.dll ( cd tk-8.5.2.0\win nmake -f makefile.vc COMPILERFLAGS=-DWINVER=0x0500 DEBUG=1 INSTALLDIR=..\..\tcltk TCLDIR=..\..\tcl-8.5.2.1 clean nmake -f makefile.vc COMPILERFLAGS=-DWINVER=0x0500 DEBUG=1 INSTALLDIR=..\..\tcltk TCLDIR=..\..\tcl-8.5.2.1 all nmake -f makefile.vc COMPILERFLAGS=-DWINVER=0x0500 DEBUG=1 INSTALLDIR=..\..\tcltk TCLDIR=..\..\tcl-8.5.2.1 install cd ..\.. ) ```
690b4604-d373-4b83-851d-459d510eb2f5
{ "language": "Batchfile" }
```batchfile set ssh_key=%1 set ssh_server_name=%2 set ssh_uname=%3 set client_session_dir=%4 set server_session_dir=%5 set session_name=%6 set container_path=%7 set algorithm=%8 @echo %algorithm% @echo here 1 @echo %client_session_dir% @echo %server_session_dir% pscp -noagent -r %client_session_dir% %ssh_uname%@%ssh_server_name%:%server_session_dir% @echo "here 2" set bindingPath=%server_session_dir%/%session_name%:/scratch @echo "here 3" plink -noagent -ssh %ssh_uname%@%ssh_server_name% (source /admin/lsf/mph/conf/profile.lsf; bsub -R rusage[mem=30] -q research -n 1 -W 1:00 -gpu "num=1:gmem=4GB:mode=exclusive_process:mps=no:j_exclusive=yes" -Is singularity run --app %algorithm% --nv --bind %bindingPath% %container_path% %server_session_dir%/%session_name%) @echo "here 4" pscp -noagent -r %ssh_uname%@%ssh_server_name%:%server_session_dir%/%session_name%/outputH5 %client_session_dir% @echo "here 5" ``` Debug print statements for executing container in client-server configuration
```batchfile set ssh_key=%1 set ssh_server_name=%2 set ssh_uname=%3 set client_session_dir=%4 set server_session_dir=%5 set session_name=%6 set container_path=%7 set algorithm=%8 @echo %algorithm% @echo Copying session dir from client to server... @echo %client_session_dir% @echo %server_session_dir% pscp -noagent -r %client_session_dir% %ssh_uname%@%ssh_server_name%:%server_session_dir% @echo Setting bind path for container set bindingPath=%server_session_dir%/%session_name%:/scratch @echo Executing container plink -noagent -ssh %ssh_uname%@%ssh_server_name% (source /admin/lsf/mph/conf/profile.lsf; bsub -R rusage[mem=30] -q research -n 1 -W 1:00 -gpu "num=1:gmem=4GB:mode=exclusive_process:mps=no:j_exclusive=yes" -Is singularity run --app %algorithm% --nv --bind %bindingPath% %container_path% %server_session_dir%/%session_name%) @echo Copying result back to Client from Server pscp -noagent -r %ssh_uname%@%ssh_server_name%:%server_session_dir%/%session_name%/outputH5 %client_session_dir% @echo DONE ```
39352a44-add0-48ef-9d15-85f9f1c2bc55
{ "language": "Batchfile" }
```batchfile nuget pack Pelasoft.AspNet.Mvc.Slack.csproj -Verbosity detailed -Build -IncludeReferencedProjects -Properties Configuration=Release``` Add package action remind notice.
```batchfile @echo off echo. echo ###### Nuget Creation Checklist ###### echo ## ## echo ## * Update assembly version number ## echo ## * Update nuspec revision notes ## echo ## * Create tag after final commit ## echo ## ## echo ######################################## echo. nuget pack Pelasoft.AspNet.Mvc.Slack.csproj -Verbosity detailed -Build -IncludeReferencedProjects -Properties Configuration=Release```
cc6a69c6-219a-401c-abb6-e681c0b53ffd
{ "language": "Batchfile" }
```batchfile @REM Configure the build of phreeqc4rkt cmake -S . -B build ^ -DCMAKE_BUILD_TYPE=Release ^ -DCMAKE_PREFIX_PATH=%LIBRARY_PREFIX% ^ -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ -DBUILD_SHARED_LIBS=ON ^ -DYAML_BUILD_SHARED_LIBS=ON ^ -DYAML_CPP_BUILD_TESTS=OFF @REM Build and install phreeqc4rkt in %LIBRARY_PREFIX% @REM Note: No need for --parallel below, since cmake takes care of the /MP flag for MSVC cmake --build build --config Release --target install ``` Fix comment lines refering to other lib
```batchfile @REM Configure the build of yaml-cpp4rkt cmake -S . -B build ^ -DCMAKE_BUILD_TYPE=Release ^ -DCMAKE_PREFIX_PATH=%LIBRARY_PREFIX% ^ -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ -DBUILD_SHARED_LIBS=ON ^ -DYAML_BUILD_SHARED_LIBS=ON ^ -DYAML_CPP_BUILD_TESTS=OFF @REM Build and install yaml-cpp4rkt in %LIBRARY_PREFIX% @REM Note: No need for --parallel below, since cmake takes care of the /MP flag for MSVC cmake --build build --config Release --target install ```