doc_id
stringlengths 36
36
| metadata
dict | input
stringlengths 28
4.3k
| output
stringlengths 11
5.45k
|
---|---|---|---|
fb1ba12d-e006-45a1-8d0c-849f814eeaa3 | {
"language": "Batchfile"
} | ```batchfile
echo off
setlocal
REM elevated window does not set current directory correctly.
REM Workaround it by passing the current directory around
pushd %1
echo BridgeKeepRunning=%BridgeKeepRunning%
if '%BridgeKeepRunning%' neq 'true' (
echo Stopping the Bridge.exe task locally...
Taskkill /IM bridge.exe /F
netsh http delete sslcert ipport=0.0.0.0:44285
certutil.exe -delstore my "85 58 be 22 44 5e 00 96 4d 0e 4c 7e 47 7a a6 3a"
certutil -delstore Root "68 66 63 1a d6 d4 28 ab 49 82 7f ba 24 cc 33 26"
) else (
echo Bridge is left running because BridgeKeepRunning is true
)
exit /b
```
Clean script no longer requires working folder passed in | ```batchfile
echo off
setlocal
pushd %~dp0
echo BridgeKeepRunning=%BridgeKeepRunning%
if '%BridgeKeepRunning%' neq 'true' (
echo Stopping the Bridge.exe task locally...
Taskkill /IM bridge.exe /F
netsh http delete sslcert ipport=0.0.0.0:44285
certutil.exe -delstore my "85 58 be 22 44 5e 00 96 4d 0e 4c 7e 47 7a a6 3a"
certutil -delstore Root "68 66 63 1a d6 d4 28 ab 49 82 7f ba 24 cc 33 26"
) else (
echo Bridge is left running because BridgeKeepRunning is true
)
exit /b
``` |
dac9a39d-c311-41d7-87b3-d338b6f70478 | {
"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\*
7z a namebench_for_Windows.zip -r *
namebench -x -O 8.8.8.8 -t5 -o test.html
start test.html
cd ..
```
Remove w9xopen.exe and add README.txt to Windows build | ```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 ..
``` |
7bacc836-f26d-4670-a26a-5f00d1368f6e | {
"language": "Batchfile"
} | ```batchfile
mkdir uvision_release
git rev-parse --verify HEAD > uvision_release\git_info.txt
git diff --no-ext-diff --quiet --exit-code >> uvision_release\git_info.txt
echo Uncommitted Changes: %errorlevel% >> uvision_release\git_info.txt
virtualenv env
call env\Scripts\activate
pip install -r requirements.txt
pip freeze > uvision_release\build_requirements.txt
pgen export -t uvision -b
python tools/copy_release_files.py
```
Allow requirements file to be specified for build | ```batchfile
mkdir uvision_release
git rev-parse --verify HEAD > uvision_release\git_info.txt
git diff --no-ext-diff --quiet --exit-code >> uvision_release\git_info.txt
echo Uncommitted Changes: %errorlevel% >> uvision_release\git_info.txt
virtualenv env
call env\Scripts\activate
REM use project requirements if not specified
if [%1]==[] pip install -r requirements.txt
REM use custom requirements if specified
if not [%1]==[] pip install -r %1
pip freeze > uvision_release\build_requirements.txt
pgen export -t uvision -b
python tools/copy_release_files.py
``` |
809ce693-e242-4d37-b845-d0ab9f6817fe | {
"language": "Batchfile"
} | ```batchfile
echo=off
set ssleay=%1%
set tmp1=pem.out
set cmp=fc.exe
call tpem.bat crl ..\test\testcrl.pem
if errorlevel 1 goto err
call tpem.bat pkcs7 ..\test\testp7.pem
if errorlevel 1 goto err
call tpem.bat req ..\test\testreq.pem
if errorlevel 1 goto err
call tpem.bat req ..\test\testreq2.pem
if errorlevel 1 goto err
call tpem.bat rsa ..\test\testrsa.pem
if errorlevel 1 goto err
call tpem.bat x509 ..\test\testx509.pem
if errorlevel 1 goto err
call tpem.bat x509 ..\test\v3-cert1.pem
if errorlevel 1 goto err
call tpem.bat x509 ..\test\v3-cert1.pem
if errorlevel 1 goto err
call tpem.bat sess_id ..\test\testsid.pem
if errorlevel 1 goto err
echo OK
del %tmp1%
:err
```
Delete Win32 test with testreq.pem and req: there is already a test with testreq2.pem. | ```batchfile
echo=off
set ssleay=%1%
set tmp1=pem.out
set cmp=fc.exe
call tpem.bat crl ..\test\testcrl.pem
if errorlevel 1 goto err
call tpem.bat pkcs7 ..\test\testp7.pem
if errorlevel 1 goto err
call tpem.bat req ..\test\testreq2.pem
if errorlevel 1 goto err
call tpem.bat rsa ..\test\testrsa.pem
if errorlevel 1 goto err
call tpem.bat x509 ..\test\testx509.pem
if errorlevel 1 goto err
call tpem.bat x509 ..\test\v3-cert1.pem
if errorlevel 1 goto err
call tpem.bat x509 ..\test\v3-cert1.pem
if errorlevel 1 goto err
call tpem.bat sess_id ..\test\testsid.pem
if errorlevel 1 goto err
echo OK
del %tmp1%
:err
``` |
e89d0b9a-a3c9-45ef-a143-b6af59730e6c | {
"language": "Batchfile"
} | ```batchfile
cd bin
project_generate.exe --enable-gpl --enable-version3 --enable-avisynth --enable-nonfree --enable-libmp3lame --enable-libvorbis --enable-libspeex --enable-libopus --enable-libilbc --enable-libfdk-aac --enable-libtheora --enable-libx264 --enable-libx265 --enable-libxvid --enable-libvpx --enable-libgme --enable-libmodplug --enable-libsoxr --enable-libfreetype --enable-fontconfig --enable-libfribidi --enable-libass --enable-gnutls --enable-librtmp --enable-libssh --enable-libcdio --enable-libbluray --enable-opengl --enable-opencl --enable-nvenc --toolchain=msvc```
Update projects to support Quick Sync video by default. | ```batchfile
cd bin
project_generate.exe --enable-gpl --enable-version3 --enable-avisynth --enable-nonfree --enable-libmp3lame --enable-libvorbis --enable-libspeex --enable-libopus --enable-libilbc --enable-libfdk-aac --enable-libtheora --enable-libx264 --enable-libx265 --enable-libxvid --enable-libvpx --enable-libgme --enable-libmodplug --enable-libsoxr --enable-libfreetype --enable-fontconfig --enable-libfribidi --enable-libass --enable-gnutls --enable-librtmp --enable-libssh --enable-libcdio --enable-libbluray --enable-opengl --enable-opencl --enable-nvenc --enable-libmfx --toolchain=msvc``` |
681eae08-8a54-47c0-9351-06dc60b06096 | {
"language": "Batchfile"
} | ```batchfile
set projectPath=%~dp0
if %projectPath:~-1%==\ set projectPath=%projectPath:~0,-1%
set projectPath=%projectPath%\..
set releasePath=%projectPath%\.release
mkdir "%releasePath%"
copy "%projectPath%\version.json" versiontemp.json
for /f "tokens=*" %%a in ('jq .Version versiontemp.json --raw-output') do set version=%%a
del versiontemp.json
del "%releasePath%\grocy_%version%.zip"
7za a -r "%releasePath%\grocy_%version%.zip" "%projectPath%\*" -xr!.* -xr!build.bat -xr!composer.json -xr!composer.lock -xr!package.json -xr!yarn.lock -xr!publication_assets
7za a "%releasePath%\grocy_%version%.zip" "%projectPath%\public\.htaccess"
7za rn "%releasePath%\grocy_%version%.zip" .htaccess public\.htaccess
7za d "%releasePath%\grocy_%version%.zip" data\*.* data\storage data\viewcache\*
```
Make sure to include /data/.htaccess in release ZIPs | ```batchfile
set projectPath=%~dp0
if %projectPath:~-1%==\ set projectPath=%projectPath:~0,-1%
set projectPath=%projectPath%\..
set releasePath=%projectPath%\.release
mkdir "%releasePath%"
copy "%projectPath%\version.json" versiontemp.json
for /f "tokens=*" %%a in ('jq .Version versiontemp.json --raw-output') do set version=%%a
del versiontemp.json
del "%releasePath%\grocy_%version%.zip"
7za a -r "%releasePath%\grocy_%version%.zip" "%projectPath%\*" -xr!.* -xr!build.bat -xr!composer.json -xr!composer.lock -xr!package.json -xr!yarn.lock -xr!publication_assets
7za a "%releasePath%\grocy_%version%.zip" "%projectPath%\public\.htaccess"
7za rn "%releasePath%\grocy_%version%.zip" .htaccess public\.htaccess
7za d "%releasePath%\grocy_%version%.zip" data\*.* data\storage data\viewcache\*
7za a "%releasePath%\grocy_%version%.zip" "%projectPath%\data\.htaccess"
7za rn "%releasePath%\grocy_%version%.zip" .htaccess data\.htaccess
``` |
b4526366-c70f-4da3-98f1-3888ec256364 | {
"language": "Batchfile"
} | ```batchfile
%windir%\Microsoft.NET\Framework\v4.0.30319\MSBuild debugler.sln /p:VisualStudioVersion=11.0 /m /nologo /t:Build /p:Configuration=Release;platform=x64
if %errorlevel% neq 0 exit /b %errorlevel%
%windir%\Microsoft.NET\Framework\v4.0.30319\MSBuild debugler.sln /p:VisualStudioVersion=11.0 /m /nologo /t:Build /p:Configuration=Release;platform=Win32```
Build Win32 first, than x64. This is WiX installer requirement. | ```batchfile
%windir%\Microsoft.NET\Framework\v4.0.30319\MSBuild debugler.sln /p:VisualStudioVersion=11.0 /m /nologo /t:Build /p:Configuration=Release;platform=Win32
if %errorlevel% neq 0 exit /b %errorlevel%
%windir%\Microsoft.NET\Framework\v4.0.30319\MSBuild debugler.sln /p:VisualStudioVersion=11.0 /m /nologo /t:Build /p:Configuration=Release;platform=x64``` |
130d4748-b81c-4570-b26a-d170d7bda611 | {
"language": "Batchfile"
} | ```batchfile
%NUGET% restore GladNetV2.sln -NoCache -NonInteractive -ConfigFile Nuget.config
msbuild GladNetV2.sln /p:Configuration=Release```
Remove config file from myget build | ```batchfile
%NUGET% restore GladNetV2.sln -NoCache -NonInteractive
msbuild GladNetV2.sln /p:Configuration=Release``` |
d7fddf4e-0cba-4922-ba32-4b128898d9e2 | {
"language": "Batchfile"
} | ```batchfile
SET "JAVA_HOME=C:\opt\jdk-8"
cd git-repo
./mvnw clean install```
Fix Windows build to use Java 17 | ```batchfile
SET "JAVA_HOME=C:\opt\jdk-17"
cd git-repo
./mvnw clean install``` |
2346b662-7ea2-4667-93fd-fc062bc6410d | {
"language": "Batchfile"
} | ```batchfile
if %PY3K% equ 1 (
set BUILD_PYTHON="-DBUILD_PYTHON_INTERFACE=ON"
) else (
set BUILD_PYTHON="-DBUILD_PYTHON2_INTERFACE=ON"
)
mkdir "%SRC_DIR%"\build
pushd "%SRC_DIR%"\build
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="%LIBRARY_PREFIX%" %BUILD_PYTHON%" -G "Ninja" ..
ninja
ninja install
move %LIBRARY_PREFIX%\python\_helics.pyd %SP_DIR%
move %LIBRARY_PREFIX%\python\helics.py %SP_DIR%
popd
```
Add -DCMAKE_PREFIX_PATH=%PREFIX% to cmake script | ```batchfile
if %PY3K% equ 1 (
set BUILD_PYTHON="-DBUILD_PYTHON_INTERFACE=ON"
) else (
set BUILD_PYTHON="-DBUILD_PYTHON2_INTERFACE=ON"
)
mkdir "%SRC_DIR%"\build
pushd "%SRC_DIR%"\build
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH=%PREFIX% -DCMAKE_INSTALL_PREFIX="%LIBRARY_PREFIX%" %BUILD_PYTHON%" -G "Ninja" ..
ninja
ninja install
move %LIBRARY_PREFIX%\python\_helics.pyd %SP_DIR%
move %LIBRARY_PREFIX%\python\helics.py %SP_DIR%
popd
``` |
10426e69-5e89-411c-9c5f-22569741b810 | {
"language": "Batchfile"
} | ```batchfile
pip install -e ./kervi-devices
pip install -e ./kervi-hal-generic
pip install -e ./kervi-hal-rpi
pip install -e ./kervi-hal-windows
pip install -e ./kervi-cli
pip install -e ./kervi-core
pip install -e ./kervi-ui
pip install --no-dependencies -e ./kervi
pause
```
Fix issue with windows path | ```batchfile
pip install -e ./kervi-devices
pip install -e ./kervi-hal-generic
pip install -e ./kervi-hal-rpi
pip install -e ./kervi-hal-win
pip install -e ./kervi-cli
pip install -e ./kervi-core
pip install -e ./kervi-ui
pip install --no-dependencies -e ./kervi
pause
``` |
7fbc0b18-aa8f-4168-b624-62cc4fa09f08 | {
"language": "Batchfile"
} | ```batchfile
cd ..
set "destination=testcoverage"
rmdir /q /s %destination%
mkdir %destination%
cd content/tests
dotnet test /p:AltCover=true
mv coverage.xml ../../%destination%/coverage.xml
cd ../../%destination%
set "reportgenerator=%UserProfile%\.nuget\packages\reportgenerator\4.0.13.1\tools\net47\ReportGenerator.exe"
set "targetdir=."
"%reportGenerator%" -reports:coverage.xml -reporttypes:HtmlInline -targetdir:%targetdir%```
Update Report Generator to 4.0.15 | ```batchfile
cd ..
set "destination=testcoverage"
rmdir /q /s %destination%
mkdir %destination%
cd content/tests
dotnet test /p:AltCover=true
mv coverage.xml ../../%destination%/coverage.xml
cd ../../%destination%
set "reportgenerator=%UserProfile%\.nuget\packages\reportgenerator\4.0.15\tools\net47\ReportGenerator.exe"
set "targetdir=."
"%reportGenerator%" -reports:coverage.xml -reporttypes:HtmlInline -targetdir:%targetdir%``` |
2e19a173-6e96-4591-b032-a1cde9922647 | {
"language": "Batchfile"
} | ```batchfile
cmake -DCMAKE_INSTALL_PREFIX=%PREFIX% -G "Ninja" -DCMAKE_PREFIX_PATH=%PREFIX%
ninja
ninja install
```
Update build script on windows | ```batchfile
cmake -G "Ninja" ^
-DCMAKE_PREFIX_PATH=%PREFIX% ^
-DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^
-DCMAKE_FIND_ROOT_PATH="%LIBRARY_PREFIX%" ^
-DCMAKE_BUILD_TYPE=Release
ninja
ninja install
``` |
24cf4096-768d-451a-b573-65776c2cdd36 | {
"language": "Batchfile"
} | ```batchfile
if exist "%CATALINA_HOME%/jre${jdk.windows.version}/win" (
if not "%JAVA_HOME%" == "" (
set JAVA_HOME=
)
set "JRE_HOME=%CATALINA_HOME%/jre${jdk.windows.version}/win"
)
set "CATALINA_OPTS=%CATALINA_OPTS% -Dfile.encoding=UTF8 -Djava.net.preferIPv4Stack=true -Dorg.apache.catalina.loader.WebappClassLoader.ENABLE_CLEAR_REFERENCES=false -Duser.timezone=GMT -Xmx1024m -XX:MaxPermSize=256m"
set JMX_OPTS="-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.port=8099 -Dcom.sun.management.jmxremote.ssl=false"
set CATALINA_OPTS="%CATALINA_OPTS% %JMX_OPTS%"
set CATALINA_OPTS="%CATALINA_OPTS% %DEBUG_OPTS%"
set DEBUG_OPTS=-agentlib:jdwp=transport=dt_socket,address=9000,server=y,suspend=n
```
Remove unnecessary double quotes for setting environment variables on Windows | ```batchfile
if exist "%CATALINA_HOME%/jre${jdk.windows.version}/win" (
if not "%JAVA_HOME%" == "" (
set JAVA_HOME=
)
set JRE_HOME="%CATALINA_HOME%/jre${jdk.windows.version}/win"
)
set CATALINA_OPTS=%CATALINA_OPTS% -Dfile.encoding=UTF8 -Djava.net.preferIPv4Stack=true -Dorg.apache.catalina.loader.WebappClassLoader.ENABLE_CLEAR_REFERENCES=false -Duser.timezone=GMT -Xmx1024m -XX:MaxPermSize=256m
set JMX_OPTS=-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.port=8099 -Dcom.sun.management.jmxremote.ssl=false
set CATALINA_OPTS=%CATALINA_OPTS% %JMX_OPTS%
set DEBUG_OPTS=-agentlib:jdwp=transport=dt_socket,address=9000,server=y,suspend=n
set CATALINA_OPTS=%CATALINA_OPTS% %DEBUG_OPTS%
``` |
06652d2b-1f4e-4d42-a35a-66c49ca42f4b | {
"language": "Batchfile"
} | ```batchfile
@echo off
REM TODO: detect these automatically. Probably a job for PowerShell...
set PROJECTS=Benchmarks,CodeDiagnostics,CodeDiagnostics.Test,Demo
set PROJECTS=%PROJECTS%,Serialization.JsonNet,Serialization.Test,Test
set PROJECTS=%PROJECTS%,TzdbCompiler.Test,Web
for %%p in (%PROJECTS%) DO (
echo Restoring NodaTime.%%p packages
nuget restore -NonInteractive -PackagesDirectory src\packages src\NodaTime.%%p\packages.config
)
```
Fix restorepackages.bat to restore all packages in all solutions. | ```batchfile
@echo off
pushd src
for %%s in (*.sln) DO (
echo Restoring %%s packages
nuget restore %%s
)
popd src
``` |
200a5183-755b-4e56-87f7-3720bb48ac67 | {
"language": "Batchfile"
} | ```batchfile
@ECHO OFF
SET BASEDIR=%~dp0
PUSHD %BASEDIR%
IF NOT EXIST pyenv\NUL GOTO NOENVDIR
ECHO removing existing environment
RMDIR /S /Q pyenv
:NOENVDIR
virtualenv pyenv
CALL pyenv\Scripts\activate
python -m pip install -r pyenv.pkgs --no-cache-dir
CALL pyenv\Scripts\deactivate
POPD
```
Install mechanical soup first on Windows | ```batchfile
@ECHO OFF
SET BASEDIR=%~dp0
PUSHD %BASEDIR%
IF NOT EXIST pyenv\NUL GOTO NOENVDIR
ECHO removing existing environment
RMDIR /S /Q pyenv
:NOENVDIR
virtualenv pyenv
CALL pyenv\Scripts\activate
pip install mechanicalsoup
pip install -r pyenv.pkgs
CALL pyenv\Scripts\deactivate
POPD
``` |
be95c3b1-fd8b-4919-91da-bc91902dd4d7 | {
"language": "Batchfile"
} | ```batchfile
IF "%1"=="" (
GOTO HELL
) ELSE (
SET _TAG_=v%1
)
IF NOT "%2"=="" (
SET _TAG_=%_TAG_%.%2
)
rem git remote set-url origin https://%3:%[email protected]/wasteam/waslibs.git
git tag -a %_TAG_% -m "Version built: %_TAG_%"
git push origin %_TAG_%
GOTO END
:HELL
ECHO VERSION NOT FOUND
EXIT -1
:END
ECHO PROCESS FINISHED
EXIT 0```
Add user identity to git in tagging | ```batchfile
IF "%1"=="" (
GOTO HELL
) ELSE (
SET _TAG_=v%1
)
IF NOT "%2"=="" (
SET _TAG_=%_TAG_%.%2
)
git config user.email "%[email protected]"
git config user.name "%3"
git remote set-url origin https://%3:%[email protected]/wasteam/waslibs.git
git tag -a %_TAG_% -m "Version built: %_TAG_%"
git push origin %_TAG_%
GOTO END
:HELL
ECHO VERSION NOT FOUND
EXIT -1
:END
ECHO PROCESS FINISHED
EXIT 0``` |
921b841a-7c6a-45a1-b0e8-9f177c9b13f1 | {
"language": "Batchfile"
} | ```batchfile
del "spec/*.js"
call tsc "spec/ActorSpec.ts" -out "spec/ActorSpec.js"
call tsc "spec/ColorSpec.ts" -out "spec/ColorSpec.js"
call tsc "spec/PromiseSpec.ts" -out "spec/PromiseSpec.js"
call tsc "spec/CollectionSpec.ts" -out "spec/CollectionSpec.js"
call tsc "spec/LogSpec.ts" -out "spec/LogSpec.js"
call jasmine-node --verbose spec/```
Add new specs to bat | ```batchfile
del "spec/*.js"
call tsc "spec/ActorSpec.ts" -out "spec/ActorSpec.js"
call tsc "spec/ColorSpec.ts" -out "spec/ColorSpec.js"
call tsc "spec/PromiseSpec.ts" -out "spec/PromiseSpec.js"
call tsc "spec/CollectionSpec.ts" -out "spec/CollectionSpec.js"
call tsc "spec/LogSpec.ts" -out "spec/LogSpec.js"
call tsc "spec/ClassSpec.ts" -out "spec/ClassSpec.js"
call tsc "spec/TimerSpec.ts" -out "spec/TimerSpec.js"
call jasmine-node --verbose spec/``` |
f6889fd6-4417-44e3-81cd-e72c130be571 | {
"language": "Batchfile"
} | ```batchfile
set DEST=install
set SRC=deps\install
xcopy %SRC%\bin\osg*-osg.dll %DEST% /Y
xcopy %SRC%\bin\osg*-osgDB.dll %DEST% /Y
xcopy %SRC%\bin\osg*-osgGA.dll %DEST% /Y
xcopy %SRC%\bin\osg*-osgText.dll %DEST% /Y
xcopy %SRC%\bin\osg*-osgUtil.dll %DEST% /Y
xcopy %SRC%\bin\osg*-osgViewer.dll %DEST% /Y
xcopy %SRC%\bin\*-OpenThreads.dll %DEST% /Y
xcopy %SRC%\bin\osgPlugins* %DEST% /Y /S
xcopy %SRC%\osvr-ver.txt %SRC%\bin\osvrClientKit.dll %SRC%\bin\osvrClient.dll %SRC%\bin\osvrTransform.dll %SRC%\bin\osvrUtil.dll %DEST% /Y
xcopy redist\*.* %DEST% /Y
set /p VER=<%SRC%\osvr-ver.txt
move install OSVR-Tracker-View-built-with-%VER%
7za a OSVR-Tracker-View-built-with-%VER%.7z OSVR-Tracker-View-built-with-%VER%\*```
Update postbuild script to try to include all the things that we need. | ```batchfile
set DEST=install
set SRC=deps\install
xcopy %SRC%\bin\osg*-osg.dll %DEST% /Y
xcopy %SRC%\bin\osg*-osgDB.dll %DEST% /Y
xcopy %SRC%\bin\osg*-osgGA.dll %DEST% /Y
xcopy %SRC%\bin\osg*-osgText.dll %DEST% /Y
xcopy %SRC%\bin\osg*-osgUtil.dll %DEST% /Y
xcopy %SRC%\bin\osg*-osgViewer.dll %DEST% /Y
xcopy %SRC%\bin\*-OpenThreads.dll %DEST% /Y
xcopy %SRC%\bin\osgPlugins*.* %DEST% /Y /S
for %%F in (%SRC%\osvr-ver.txt,%SRC%\bin\osvrClientKit.dll,%SRC%\bin\osvrClient.dll,%SRC%\bin\osvrTransform.dll,%SRC%\bin\osvrUtil.dll) do ( xcopy %%F %DEST% /Y )
xcopy redist\*.* %DEST% /Y
set /p VER=<%SRC%\osvr-ver.txt
set OUTPUT=OSVR-Tracker-View-built-with-%VER%-viewer-%BUILD_NUMBER%
move install %OUTPUT%
7za a %OUTPUT%.7z %OUTPUT%\*``` |
6a890c52-7b7a-482f-9894-16458f7ffb3e | {
"language": "Batchfile"
} | ```batchfile
mkdir c:\projects\plib-build
if "%APPVEYOR_REPO_BRANCH%"=="appveyor_test" (
set BOOST_ARGS=-DPLIB_TESTS_STATIC=ON -DBOOST_ROOT=C:\Libraries\boost_1_59_0
)
if "%USE_MINGW%"=="1" (
cd c:\projects\plib-build
set PATH=C:\MinGW\bin;C:\Program Files (x86)\CMake\bin
set BUILD_TYPE=-DCMAKE_BUILD_TYPE=%configuration%
cmake %BUILD_TYPE% -G"%CMAKE_GENERATOR%" %BOOST_ARGS% c:\projects\plib
mingw32-make
ctest
) else (
if "%USE_MSYS%"=="1" (
set PATH=C:\msys2\bin;C:\Program Files (x86)\CMake\bin
c:\msys2\bin\bash c:\projects\plib\contrib\appveyor\build_msys.sh
)
)
```
Use quotes for PATH environment variable | ```batchfile
mkdir c:\projects\plib-build
if "%APPVEYOR_REPO_BRANCH%"=="appveyor_test" (
set BOOST_ARGS=-DPLIB_TESTS_STATIC=ON -DBOOST_ROOT=C:\Libraries\boost_1_59_0
)
if "%USE_MINGW%"=="1" (
cd c:\projects\plib-build
set PATH="C:\MinGW\bin;C:\Program Files (x86)\CMake\bin"
set BUILD_TYPE="-DCMAKE_BUILD_TYPE=%configuration%"
cmake %BUILD_TYPE% -G"%CMAKE_GENERATOR%" %BOOST_ARGS% c:\projects\plib
mingw32-make
ctest
) else (
if "%USE_MSYS%"=="1" (
set PATH="C:\msys2\bin;C:\Program Files (x86)\CMake\bin"
c:\msys2\bin\bash c:\projects\plib\contrib\appveyor\build_msys.sh
)
)
``` |
5774452f-e4a2-4604-bd51-54b3cd54f935 | {
"language": "Batchfile"
} | ```batchfile
fsi^
--optimize+^
--lib:NHol^
--use:system.fsx^
--use:lib.fs^
--use:fusion.fs^
--use:basics.fs^
--use:nets.fs^
--use:printer.fs^
--use:preterm.fs^
--use:parser.fs^
--use:equal.fs^
--use:bool.fs^
--use:drule.fs^
--use:tactics.fs^
--use:itab.fs^
--use:simp.fs^
--use:theorems.fs^
--use:ind_defs.fs^
--use:class.fs^
--use:trivia.fs^
--use:canon.fs^
--use:meson.fs^
--use:quot.fs^
--use:pair.fs^
--use:nums.fs^
--use:recursion.fs^
--use:arith.fs^
--use:wf.fs^
--use:calc_num.fs^
--use:normalizer.fs^
--use:grober.fs^
--use:ind_types.fs^
--use:lists.fs^
--use:realax.fs^
--use:calc_int.fs^
--use:realarith.fs^
--use:real.fs^
--use:calc_rat.fs^
--use:int.fs^
--use:sets.fs^
--use:iterate.fs^
--use:cart.fs^
--use:define.fs^
--use:help.fs^
--use:database.fs
```
Remove optimization flag, for now. This'll help provide better error information whilst we're working out remaining bugs. | ```batchfile
fsi^
--lib:NHol^
--use:system.fsx^
--use:lib.fs^
--use:fusion.fs^
--use:basics.fs^
--use:nets.fs^
--use:printer.fs^
--use:preterm.fs^
--use:parser.fs^
--use:equal.fs^
--use:bool.fs^
--use:drule.fs^
--use:tactics.fs^
--use:itab.fs^
--use:simp.fs^
--use:theorems.fs^
--use:ind_defs.fs^
--use:class.fs^
--use:trivia.fs^
--use:canon.fs^
--use:meson.fs^
--use:quot.fs^
--use:pair.fs^
--use:nums.fs^
--use:recursion.fs^
--use:arith.fs^
--use:wf.fs^
--use:calc_num.fs^
--use:normalizer.fs^
--use:grober.fs^
--use:ind_types.fs^
--use:lists.fs^
--use:realax.fs^
--use:calc_int.fs^
--use:realarith.fs^
--use:real.fs^
--use:calc_rat.fs^
--use:int.fs^
--use:sets.fs^
--use:iterate.fs^
--use:cart.fs^
--use:define.fs^
--use:help.fs^
--use:database.fs
``` |
bae90bc8-2db5-4aae-b37a-8dbf50d2acfd | {
"language": "Batchfile"
} | ```batchfile
@ECHO OFF
ECHO Compiling pony-game...
REM Link to Windows Kits and native libraries.
REM http://tutorial.ponylang.org/appendices/compiler-args.html
ponyc -p "C:\Program Files (x86)\Windows Kits\10\Lib\10.0.10240.0\ucrt\x64" -p "Bin\PonyGameNative\x64\Debug" -o Bin\PonyGame Source\PonyGame
ECHO Copying native libs...
COPY "Bin\PonyGameNative\x64\Debug\PonyGameNative.dll" "Bin\PonyGame"```
Build - Pause at the end of build batch file. | ```batchfile
@ECHO OFF
ECHO Compiling pony-game...
REM Link to Windows Kits and native libraries.
REM http://tutorial.ponylang.org/appendices/compiler-args.html
ponyc -p "C:\Program Files (x86)\Windows Kits\10\Lib\10.0.10240.0\ucrt\x64" -p "Bin\PonyGameNative\x64\Debug" -o Bin\PonyGame Source\PonyGame
ECHO Copying native libs...
COPY "Bin\PonyGameNative\x64\Debug\PonyGameNative.dll" "Bin\PonyGame"
PAUSE``` |
02f15213-39d0-43bb-9724-67df6310498c | {
"language": "Batchfile"
} | ```batchfile
setlocal
rem Put curl on the PATH
set PATH=C:\Program Files\Git\mingw64\bin;%PATH%
set VERSION=2.0.5
mkdir %TEMP%\hlint
curl -o%TEMP%\hlint\hlint-%VERSION%.zip -L --insecure https://github.com/ndmitchell/hlint/releases/download/v%VERSION%/hlint-%VERSION%.zip
7z x %TEMP%\hlint\hlint-%VERSION%.zip -o%TEMP%\hlint -y
%TEMP%\hlint\hlint-%VERSION%\hlint.exe %*
```
Update the Appveyor script to fetch with the full architecture name | ```batchfile
setlocal
rem Put curl on the PATH
set PATH=C:\Program Files\Git\mingw64\bin;%PATH%
set VERSION=2.0.5
mkdir %TEMP%\hlint
curl -o%TEMP%\hlint\hlint.zip -L --insecure https://github.com/ndmitchell/hlint/releases/download/v%VERSION%/hlint-%VERSION%-x86_64-windows.zip
7z x %TEMP%\hlint\hlint.zip -o%TEMP%\hlint -y
%TEMP%\hlint\hlint-%VERSION%\hlint.exe %*
``` |
af8e99c5-cc90-447c-98f5-5ac4074416c0 | {
"language": "Batchfile"
} | ```batchfile
@echo on
mkdir build-cpp
if errorlevel 1 exit 1
cd build-cpp
cmake .. ^
-GNinja ^
-DCMAKE_BUILD_TYPE=Release ^
-DCMAKE_PREFIX_PATH=%CONDA_PREFIX% ^
-DCMAKE_INSTALL_PREFIX=%PREFIX% ^
-DgRPC_CARES_PROVIDER="package" ^
-DgRPC_GFLAGS_PROVIDER="package" ^
-DgRPC_PROTOBUF_PROVIDER="package" ^
-DgRPC_SSL_PROVIDER="package" ^
-DgRPC_ZLIB_PROVIDER="package"
dir %PREFIX% /S
cmake --build . --config Release --target install
if errorlevel 1 exit 1
dir %PREFIX% /S
```
Fix package size issue on Windows | ```batchfile
@echo on
@rem The `vs2015_win-64` compiler activate package sets CFLAGS and CXXFLAGS
@rem to "-MD -GL". Unfortunately that causes a huge ballooning in static
@rem library size (more than 100MB per .lib file). Unsetting those flags
@rem simply works.
set CFLAGS=
set CXXFLAGS=
mkdir build-cpp
if errorlevel 1 exit 1
cd build-cpp
cmake .. ^
-GNinja ^
-DCMAKE_BUILD_TYPE=Release ^
-DCMAKE_PREFIX_PATH=%CONDA_PREFIX% ^
-DCMAKE_INSTALL_PREFIX=%PREFIX% ^
-DgRPC_CARES_PROVIDER="package" ^
-DgRPC_GFLAGS_PROVIDER="package" ^
-DgRPC_PROTOBUF_PROVIDER="package" ^
-DgRPC_SSL_PROVIDER="package" ^
-DgRPC_ZLIB_PROVIDER="package"
cmake --build . --config Release --target install
if errorlevel 1 exit 1
``` |
b0e9ad1a-6317-4276-a962-1603d2efc4e1 | {
"language": "Batchfile"
} | ```batchfile
echo Running Windows build and testscript %~dp0%\matlab\CIBuildAndTest.m
call "C:\Program Files\MATLAB\R2015b\bin\matlab.exe" -wait -nodisplay -nosplash -nodesktop -r "try, run('%~dp0%\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 windows CI batch script | ```batchfile
echo Running Windows build and testscript %~dp0..\\matlab\CIBuildAndTest.m
call "C:\Program Files\MATLAB\R2015b\bin\matlab.exe" -wait -nodisplay -nosplash -nodesktop -r "try, run('%~dp0..\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
)``` |
fe9a91ee-8bed-48ae-828c-5bc8a126be5c | {
"language": "Batchfile"
} | ```batchfile
@echo off
echo "Installing ONC/RPC for NT..."
..\bin\inst_pm remove
copy ..\bin\oncrpc.dll %SystemRoot%\system32
copy ..\bin\portmap.exe %SystemRoot%\system32
if exist %SystemRoot%\system32\drivers\etc\rpc goto inst_pm
mkdir %SystemRoot%\system32\drivers\etc
copy ..\etc\rpc %SystemRoot%\system32\drivers\etc
:inst_pm
..\bin\inst_pm %SystemRoot%\system32\portmap.exe
echo "Done."
```
Update path: get oncrpc.dll from ../lib | ```batchfile
@echo off
echo "Installing ONC/RPC for NT..."
..\bin\inst_pm remove
copy ..\lib\oncrpc.dll %SystemRoot%\system32
copy ..\bin\portmap.exe %SystemRoot%\system32
if exist %SystemRoot%\system32\drivers\etc\rpc goto inst_pm
mkdir %SystemRoot%\system32\drivers\etc
copy ..\etc\rpc %SystemRoot%\system32\drivers\etc
:inst_pm
..\bin\inst_pm %SystemRoot%\system32\portmap.exe
echo "Done."
``` |
7d1a1a42-d80c-4984-a098-def1f42f6e1f | {
"language": "Batchfile"
} | ```batchfile
@echo off
setlocal
set ELECTRON_RUN_AS_NODE=
pushd %~dp0\..
:: Get Code.exe location
for /f "tokens=2 delims=:," %%a in ('findstr /R /C:"\"nameShort\":.*" product.json') do set NAMESHORT=%%~a
set NAMESHORT=%NAMESHORT: "=%
set NAMESHORT=%NAMESHORT:"=%.exe
set CODE=".build\electron\%NAMESHORT%"
:: Download Electron if needed
for /f "tokens=2 delims=:," %%a in ('findstr /R /C:"\"electronVersion\":.*" package.json') do set DESIREDVERSION=%%~a
set DESIREDVERSION=%DESIREDVERSION: "=%
set DESIREDVERSION=v%DESIREDVERSION:"=%
if exist .\.build\electron\version (set /p INSTALLEDVERSION=<.\.build\electron\version) else (set INSTALLEDVERSION="")
if not exist %CODE% node .\node_modules\gulp\bin\gulp.js electron
if not "%INSTALLEDVERSION%" == "%DESIREDVERSION%" node .\node_modules\gulp\bin\gulp.js electron
:: Run tests
%CODE% .\test\electron\index.js %*
popd
endlocal
exit /b %errorlevel%
```
Set errorlevel to 0 if it's 255 | ```batchfile
@echo off
setlocal
set ELECTRON_RUN_AS_NODE=
pushd %~dp0\..
:: Get Code.exe location
for /f "tokens=2 delims=:," %%a in ('findstr /R /C:"\"nameShort\":.*" product.json') do set NAMESHORT=%%~a
set NAMESHORT=%NAMESHORT: "=%
set NAMESHORT=%NAMESHORT:"=%.exe
set CODE=".build\electron\%NAMESHORT%"
:: Download Electron if needed
for /f "tokens=2 delims=:," %%a in ('findstr /R /C:"\"electronVersion\":.*" package.json') do set DESIREDVERSION=%%~a
set DESIREDVERSION=%DESIREDVERSION: "=%
set DESIREDVERSION=v%DESIREDVERSION:"=%
if exist .\.build\electron\version (set /p INSTALLEDVERSION=<.\.build\electron\version) else (set INSTALLEDVERSION="")
if not exist %CODE% node .\node_modules\gulp\bin\gulp.js electron
if not "%INSTALLEDVERSION%" == "%DESIREDVERSION%" node .\node_modules\gulp\bin\gulp.js electron
:: Run tests
%CODE% .\test\electron\index.js %*
popd
endlocal
if %errorlevel% == 255 set errorlevel=0
exit /b %errorlevel%
``` |
3605f379-2822-4629-8ce6-5e74702ba3be | {
"language": "Batchfile"
} | ```batchfile
@echo off
pushd %~dp0
SET PACKAGEPATH=.\packages\
SET NUGET=.\tools\nuget\NuGet.exe
SET NUGETOPTIONS=-ConfigFile .\tools\nuget\NuGet.Config -OutputDirectory %PACKAGEPATH% -ExcludeVersion
IF NOT EXIST %PACKAGEPATH%FAKE\Ver_4.23.0 (
RD /S/Q %PACKAGEPATH%FAKE
%NUGET% install FAKE -Version 4.23.0 %NUGETOPTIONS%
COPY NUL %PACKAGEPATH%FAKE\Ver_4.23.0
)
IF NOT EXIST %PACKAGEPATH%FAKE.BuildLib\Ver_0.1.8 (
RD /S/Q %PACKAGEPATH%FAKE.BuildLib
%NUGET% install FAKE.BuildLib -Version 0.1.8 %NUGETOPTIONS%
COPY NUL %PACKAGEPATH%FAKE.BuildLib\Ver_0.1.8
)
set encoding=utf-8
"%PACKAGEPATH%FAKE\tools\FAKE.exe" build.fsx %*
popd
```
Update FAKE.BuildLib 0.3.5 from 0.1.8 | ```batchfile
@echo off
pushd %~dp0
SET PACKAGEPATH=.\packages\
SET NUGET=.\tools\nuget\NuGet.exe
SET NUGETOPTIONS=-ConfigFile .\tools\nuget\NuGet.Config -OutputDirectory %PACKAGEPATH% -ExcludeVersion
IF NOT EXIST %PACKAGEPATH%FAKE\Ver_4.25.4 (
RD /S/Q %PACKAGEPATH%FAKE
%NUGET% install FAKE -Version 4.25.4 %NUGETOPTIONS%
COPY NUL %PACKAGEPATH%FAKE\Ver_4.25.4
)
IF NOT EXIST %PACKAGEPATH%FAKE.BuildLib\Ver_0.3.5 (
RD /S/Q %PACKAGEPATH%FAKE.BuildLib
%NUGET% install FAKE.BuildLib -Version 0.3.5 %NUGETOPTIONS%
COPY NUL %PACKAGEPATH%FAKE.BuildLib\Ver_0.3.5
)
set encoding=utf-8
"%PACKAGEPATH%FAKE\tools\FAKE.exe" build.fsx %*
popd
``` |
f46d0ba2-4526-4043-94dd-603149bb8257 | {
"language": "Batchfile"
} | ```batchfile
@echo off
if exist src\fscanner.l goto dir_okay
echo !!!! Must run this batch file from the main source directory!
exit
:dir_okay
echo ---- Start by patching the ylwrap script to avoid problems
echo with "ln -s":
patch -p1 -i contrib/msdos/ylwrap.pat
echo ---- Now configure and make it.
echo -- NOTE --: this assumes you have pdcurses installed!
echo -- NOTE --: Will be using '-f' mode of flex, for faster scanning
bash configure
make CURSES_LIBS=-lpdcurses LFLAGS="-f8B"
echo ---- You may now call "make install", if desired.
echo -- DONE --
```
Fix pathname of patch file | ```batchfile
@echo off
if exist src\fscanner.l goto dir_okay
echo !!!! Must run this batch file from the main source directory!
exit
:dir_okay
echo ---- Start by patching the ylwrap script to avoid problems
echo with "ln -s":
patch -p1 -i packages/MSDOS/ylwrap.pat
echo ---- Now configure and make it.
echo -- NOTE --: this assumes you have pdcurses installed!
echo -- NOTE --: Will be using '-f' mode of flex, for faster scanning
bash configure
make CURSES_LIBS=-lpdcurses LFLAGS="-f8B"
echo ---- You may now call "make install", if desired.
echo -- DONE --
``` |
b86fa628-bd76-4233-8102-32e3123fadb4 | {
"language": "Batchfile"
} | ```batchfile
@echo off
setlocal
set mypath=%~dp0
set PATH=%mypath%\python2.7\Scripts;%mypath%\python2.7;%PATH%
set PYTHONPATH=%mypath%\lib
set OQ_SITE_CFG_PATH=%mypath%\openquake.cfg
doskey oq=python.exe -m openquake.commands.__main__ $*
doskey oq-engine=python.exe -m openquake.commands.__main__ engine $*
echo OpenQuake environment loaded
echo The command 'oq-engine' is deprecated and will be removed. Please use 'oq engine' instead
cmd /k
endlocal
```
Remove deprecation warning from Win | ```batchfile
@echo off
setlocal
set mypath=%~dp0
set PATH=%mypath%\python2.7\Scripts;%mypath%\python2.7;%PATH%
set PYTHONPATH=%mypath%\lib
set OQ_SITE_CFG_PATH=%mypath%\openquake.cfg
doskey oq=python.exe -m openquake.commands.__main__ $*
doskey oq-engine=python.exe -m openquake.commands.__main__ engine $*
echo OpenQuake environment loaded
echo To run OpenQuake use 'oq' and 'oq engine'
cmd /k
endlocal
``` |
d31bf218-9b3e-48c0-b4b5-2dd6b211575a | {
"language": "Batchfile"
} | ```batchfile
```
Add a bat file to disable CEIP | ```batchfile
@echo off
REM A bat file to disable Microsoft Compatibility Telemetry
schtasks /End /TN "\Microsoft\Windows\Application Experience\AitAgent"
schtasks /Change /TN "\Microsoft\Windows\Application Experience\AitAgent" /DISABLE
schtasks /End /TN "\Microsoft\Windows\Application Experience\Microsoft Compatibility Appraiser"
schtasks /Change /TN "\Microsoft\Windows\Application Experience\Microsoft Compatibility Appraiser" /DISABLE
schtasks /End /TN "\Microsoft\Windows\Application Experience\ProgramDataUpdater"
schtasks /Change /TN "\Microsoft\Windows\Application Experience\ProgramDataUpdater" /DISABLE
pause
``` |
0b7bf178-f177-40e3-b23a-c00e2ec497cd | {
"language": "Batchfile"
} | ```batchfile
rem The MIT License (MIT)
rem Copyright (c) 2016, Microsoft
rem Permission is hereby granted, free of charge, to any person obtaining a copy
rem of this software and associated documentation files (the "Software"), to deal
rem in the Software without restriction, including without limitation the rights
rem to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
rem copies of the Software, and to permit persons to whom the Software is
rem furnished to do so, subject to the following conditions:
rem The above copyright notice and this permission notice shall be included in
rem all copies or substantial portions of the Software.
rem THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
rem IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
rem FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
rem AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
rem LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
rem OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
rem THE SOFTWARE.
setlocal
mkdir build
pushd build
cmake -G "Visual Studio 12 2013 Win64" ..
popd
```
Update make for VS 2015. This matches the instructions in the README, which suggests installing VS 2015. | ```batchfile
rem The MIT License (MIT)
rem Copyright (c) 2016, Microsoft
rem Permission is hereby granted, free of charge, to any person obtaining a copy
rem of this software and associated documentation files (the "Software"), to deal
rem in the Software without restriction, including without limitation the rights
rem to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
rem copies of the Software, and to permit persons to whom the Software is
rem furnished to do so, subject to the following conditions:
rem The above copyright notice and this permission notice shall be included in
rem all copies or substantial portions of the Software.
rem THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
rem IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
rem FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
rem AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
rem LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
rem OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
rem THE SOFTWARE.
setlocal
mkdir build
pushd build
cmake -G "Visual Studio 14 2015 Win64" ..
popd
``` |
fc9ac4b8-4fe0-40a2-a060-eb96dcec013b | {
"language": "Batchfile"
} | ```batchfile
@echo off
cls
:start
echo Starting server...
DedicatedServer64\SpaceEngineersDedicated.exe -console -path config -ip 0.0.0.0 -port 27016 -maxPlayers 10
echo.
echo Restarting server...
echo.
goto start
```
Remove -path config from example .bat | ```batchfile
@echo off
cls
:start
echo Starting server...
DedicatedServer64\SpaceEngineersDedicated.exe -console -ip 0.0.0.0 -port 27016 -maxPlayers 10
echo.
echo Restarting server...
echo.
goto start
``` |
5fd72408-2540-4a0e-b001-e9230e0b0070 | {
"language": "Batchfile"
} | ```batchfile
@echo off
SET TAR=
SET ZIP=
SET EXT=
SET CMD=
FOR /f "delims=" %%i IN ('where tar') DO SET TAR=%%i
FOR /f "delims=" %%i IN ('where zip') DO SET ZIP=%%i
IF NOT "%TAR" == "" (
SET EXT=.tar.gz
SET CMD=tar -C ../vendor/Popcorn/src/Pop -xpf
) ELSE IF NOT "%ZIP" == "" (
SET EXT=.zip
SET CMD=unzip -d ../vendor/Popcorn/src/Pop
)
SET SCRIPT_DIR=%~dp0
REM php %SCRIPT_DIR%pop.php %EXT% %*
if "%1" == "install" (
FOR /f "delims=" %%i IN ('dir /B ..\vendor\Popcorn\src\Pop\*%EXT%') DO (
echo Unpacking %%i...
%CMD% ../vendor/Popcorn/src/Pop/%%i
del ..\vendor\Popcorn\src\Pop\%%i
)
echo Complete!
)
```
Work on the CLI feature | ```batchfile
@echo off
SET TAR=
SET ZIP=
SET EXT=
SET CMD=
FOR /f "delims=" %%i IN ('where tar') DO SET TAR=%%i
FOR /f "delims=" %%i IN ('where zip') DO SET ZIP=%%i
IF NOT "%TAR" == "" (
SET EXT=.tar.gz
SET CMD=tar -C ../vendor/Popcorn/src/Pop -xpf
) ELSE IF NOT "%ZIP" == "" (
SET EXT=.zip
SET CMD=unzip -d ../vendor/Popcorn/src/Pop
)
SET SCRIPT_DIR=%~dp0
php %SCRIPT_DIR%pop.php %EXT% %*
if "%1" == "install" (
FOR /f "delims=" %%i IN ('dir /B ..\vendor\Popcorn\src\Pop\*%EXT%') DO (
echo Unpacking %%i...
%CMD% ../vendor/Popcorn/src/Pop/%%i
del ..\vendor\Popcorn\src\Pop\%%i
)
echo Complete!
)
``` |
5eb42a92-79b2-4ea6-b2cf-6058509d42c4 | {
"language": "Batchfile"
} | ```batchfile
@echo off
setlocal
set mypath=%~dp0
set PATH=%PATH%;%mypath%\python2.7
set PYTHONPATH=%mypath%\lib
set OQ_SITE_CFG_PATH=%mypath%
doskey oq-engine=python.exe -m openquake.engine.bin.openquake_cli $*
doskey oq-lite=python.exe -m openquake.commonlib.commands $*
echo OpenQuake environment loaded
cmd /k
endlocal
```
Update win to use new oq command | ```batchfile
@echo off
setlocal
set mypath=%~dp0
set PATH=%PATH%;%mypath%\python2.7
set PYTHONPATH=%mypath%\lib
set OQ_SITE_CFG_PATH=%mypath%
doskey oq=python.exe -m openquake.commands.__main__ $*
doskey oq-engine=python.exe -m openquake.commonlib.commands engine $*
echo OpenQuake environment loaded
cmd /k
endlocal
``` |
05bca449-cfbb-4725-8b02-6eb98b4475b5 | {
"language": "Batchfile"
} | ```batchfile
git subtree pull --squash --prefix=ThirdParty/WPFFutures https://github.com/FineRedMist/WPFFutures.git master```
Add ThemeSelector to the pull batch file. | ```batchfile
git subtree pull --squash --prefix=ThirdParty/WPFFutures https://github.com/FineRedMist/WPFFutures.git master
git subtree pull --squash --prefix=ThirdParty/ThemeSelector https://github.com/FineRedMist/ThemeSelector.git master``` |
22baa901-2924-4459-bec6-1a366f2a95d8 | {
"language": "Batchfile"
} | ```batchfile
"%PYTHON%" setup.py install --ofline
if errorlevel 1 exit 1
:: Add more build steps here, if they are necessary.
:: See
:: http://docs.continuum.io/conda/build.html
:: for a list of environment variables that are set during the build process.
```
Remove --offline option from astroml recipe | ```batchfile
"%PYTHON%" setup.py install
if errorlevel 1 exit 1
:: Add more build steps here, if they are necessary.
:: See
:: http://docs.continuum.io/conda/build.html
:: for a list of environment variables that are set during the build process.
``` |
0d0c8afe-6929-4145-8112-8113f691bb15 | {
"language": "Batchfile"
} | ```batchfile
START /B qdb\bin\qdbd.exe -a 127.0.0.1:28360 --security=false --transient -r qdb/db
START /B qdb\bin\qdbd.exe -a 127.0.0.1:28361 --security=true --cluster-private-file=cluster-secret-key.txt --user-list=users.txt --transient -r qdb/securedb
```
Update command line options for new windows services | ```batchfile
START /B qdb\bin\qdbd.exe -a 127.0.0.1:28360 --security=false --storage-engine=transient -r qdb/db
START /B qdb\bin\qdbd.exe -a 127.0.0.1:28361 --security=true --cluster-private-file=cluster-secret-key.txt --user-list=users.txt --storage-engine=transient -r qdb/securedb
``` |
ed31e0b5-017d-4fbd-874a-53e366e9b988 | {
"language": "Batchfile"
} | ```batchfile
REM Configure Jemalloc build with options
CMake -G "Visual Studio 12 Win64" -Ddisable-fill=1 -Dwith-malloc-conf=purge:decay ..
REM Debug build settings
REM CMake -G "Visual Studio 12 Win64" -Denable-debug=1 -Dwith-malloc-conf=junk:true ..```
Remove misleading comment causing some to configure Debug builds differently. Those seettings were for debugging unit tests. | ```batchfile
REM Configure Jemalloc build with options
CMake -G "Visual Studio 12 Win64" -Ddisable-fill=1 -Dwith-malloc-conf=purge:decay ..
``` |
b5bee1ef-cb94-43f9-8595-661eec028479 | {
"language": "Batchfile"
} | ```batchfile
@ECHO OFF
PUSHD %~DP0
SET CURDIR=%CD%
PUSHD ..
SET TOPDIR=%CD%
POPD
POPD
SET GDAL_ROOT=%TOPDIR%\OSGeo4W
SET GDAL_PAM_PROXY_DIR=%TEMP%
SET GDAL_DATA=%GDAL_ROOT%\apps\gdal-16\share\gdal
SET GEOTIFF_CSV=%GDAL_ROOT%\share\epsg_csv
SET PROJ_LIB=%GDAL_ROOT%\share\proj
SET GDAL_DRIVER_PATH=%GDAL_ROOT%\apps\gdal-16\bin\gdalplugins
SET PYTHONHOME=%GDAL_ROOT%\apps\Python25
SET PYTHONPATH=%PYTHONHOME%\Lib\lib-tk
SET PYTHONPATH=%PYTHONHOME%\Lib\site-packages\pywin32_system32;%PYTHONHOME%\Lib\site-packages\win32;%PYTHONHOME%\Lib\site-packages\win32\lib;%PYTHONHOME%\Lib\site-packages\pythonwin;%PYTHONPATH%
SET PYTHONPATH=%GDAL_ROOT%\bin;%GDAL_ROOT%\apps\gdal-16\pymod;%PYTHONPATH%
SET PYTHONPATH=%CURDIR%\lib;%PYTHONPATH%
PATH=%GDAL_ROOT%\bin;%PATH%
PATH=%GDAL_ROOT%\apps\gdal-16\bin;%PATH%
PATH=%GDAL_DRIVER_PATH%;%PATH%
PATH=%PYTHONPATH%;%PATH%
PATH=%PYTHONHOME%;%PATH%
PATH=%CURDIR%;%PATH%
```
Update paths to GDAL 1.7.1 and Python 2.6 | ```batchfile
@ECHO OFF
PUSHD %~DP0
SET CURDIR=%CD%
PUSHD ..
SET TOPDIR=%CD%
POPD
POPD
SET GDAL_ROOT=%TOPDIR%\bin\gdal
SET GDAL_PAM_PROXY_DIR=%TEMP%
SET GDAL_DATA=%GDAL_ROOT%\share\gdal-data
SET GEOTIFF_CSV=%GDAL_DATA%
SET PROJ_LIB=%GDAL_ROOT%\share\proj
SET GDAL_DRIVER_PATH=%GDAL_ROOT%\bin\plugins
SET PYTHONHOME=%TOPDIR%\bin\Python26
SET PYTHONPATH=%PYTHONHOME%\Lib\lib-tk
SET PYTHONPATH=%PYTHONHOME%\Lib\site-packages\pywin32_system32;%PYTHONHOME%\Lib\site-packages\win32;%PYTHONHOME%\Lib\site-packages\win32\lib;%PYTHONHOME%\Lib\site-packages\pythonwin;%PYTHONPATH%
SET PYTHONPATH=%GDAL_ROOT%\bin;%GDAL_ROOT%\lib;%PYTHONPATH%
SET PYTHONPATH=%CURDIR%\lib;%PYTHONPATH%
PATH=%GDAL_ROOT%\bin;%PATH%
PATH=%GDAL_ROOT%\bin\gdal\apps;%PATH%
PATH=%GDAL_DRIVER_PATH%;%PATH%
PATH=%PYTHONPATH%;%PATH%
PATH=%PYTHONHOME%;%PATH%
PATH=%CURDIR%;%PATH%
``` |
941476d1-6011-4e6a-a14b-7d340d2a463a | {
"language": "Batchfile"
} | ```batchfile
@echo off
rem ======================================================================== rem
rem Copyright 2015-2017 Intel Corporation rem
rem rem
rem Licensed under the Apache License, Version 2.0 (the "License"); rem
rem you may not use this file except in compliance with the License. rem
rem You may obtain a copy of the License at rem
rem rem
rem http://www.apache.org/licenses/LICENSE-2.0 rem
rem rem
rem Unless required by applicable law or agreed to in writing, software rem
rem distributed under the License is distributed on an "AS IS" BASIS, rem
rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. rem
rem See the License for the specific language governing permissions and rem
rem limitations under the License. rem
rem ======================================================================== rem
setlocal
md build
cd build
cmake -L ^
-G "%~1" ^
-T "%~2" ^
-D OSPRAY_BUILD_ISA=ALL ^
-D OSPRAY_MODULE_MPI=ON ^
-D OSPRAY_MODULE_BILINEAR_PATCH=ON ^
-D OSPRAY_ENABLE_TESTING=ON ^
-D USE_IMAGE_MAGICK=OFF ^
..
(cmake --build . --config Release --target ALL_BUILD -- /m /nologo) ^
-and ^
(ctest . -C Release)
:abort
endlocal
:end
```
Revert "have Windows ci build jobs fail if compilation fails" | ```batchfile
@echo off
rem ======================================================================== rem
rem Copyright 2015-2017 Intel Corporation rem
rem rem
rem Licensed under the Apache License, Version 2.0 (the "License"); rem
rem you may not use this file except in compliance with the License. rem
rem You may obtain a copy of the License at rem
rem rem
rem http://www.apache.org/licenses/LICENSE-2.0 rem
rem rem
rem Unless required by applicable law or agreed to in writing, software rem
rem distributed under the License is distributed on an "AS IS" BASIS, rem
rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. rem
rem See the License for the specific language governing permissions and rem
rem limitations under the License. rem
rem ======================================================================== rem
setlocal
md build
cd build
cmake -L ^
-G "%~1" ^
-T "%~2" ^
-D OSPRAY_BUILD_ISA=ALL ^
-D OSPRAY_MODULE_MPI=ON ^
-D OSPRAY_MODULE_BILINEAR_PATCH=ON ^
-D OSPRAY_ENABLE_TESTING=ON ^
-D USE_IMAGE_MAGICK=OFF ^
..
cmake --build . --config Release --target ALL_BUILD -- /m /nologo
ctest . -C Release
:abort
endlocal
:end
``` |
bd3189ab-6d13-4723-8012-4de6f47044a6 | {
"language": "Batchfile"
} | ```batchfile
mkdir -p classes
javac -d classes src/adaptorlib/*java src/adaptorlib/tests/*java src/templateadaptor/*java
cp src/logging.properties classes/
REM TODO: Reintroduce src/local-fs-adaptor/*java .
```
Use 'copy' instead of 'cp' on Windows | ```batchfile
mkdir -p classes
javac -d classes src/adaptorlib/*java src/adaptorlib/tests/*java src/templateadaptor/*java
copy src/logging.properties classes/
REM TODO: Reintroduce src/local-fs-adaptor/*java .
``` |
459a0e48-8683-4599-b2bd-1c070c0972c7 | {
"language": "Batchfile"
} | ```batchfile
cd ..
del/q scintilla.zip
zip scintilla.zip scintilla\*.* scintilla\*\*.* -x *.o -x *.obj -x *.dll -x *.lib -x *.res -x *.exp
cd scintilla
```
Store OS X files in zips. | ```batchfile
cd ..
del/q scintilla.zip
zip scintilla.zip scintilla\*.* scintilla\*\*.* scintilla\*\*\*.* scintilla\*\*\*\*.* scintilla\*\*\*\*\*.* -x *.o -x *.obj -x *.dll -x *.lib -x *.res -x *.exp
cd scintilla
``` |
231b8bc5-3c34-49ef-ae27-ecb1fda365d6 | {
"language": "Batchfile"
} | ```batchfile
@echo off
if not "%JAVA_HOME%" == "" goto gotJavaHome
echo Java environment not found. Please set
echo your JAVA_HOME environment variable to
echo the home of you JDK.
goto :eof
:gotJavaHome
set ANT_HOME=%EXIST_HOME%\tools
set _LIBJARS=%CLASSPATH%;%ANT_HOME%\lib\ant-launcher.jar;%ANT_HOME%\lib\junit.jar;%JAVA_HOME%\lib\tools.jar
set JAVA_ENDORSED_DIRS=%EXIST_HOME%\lib\endorsed
set JAVA_OPTS=-Xms32000k -Xmx256000k -Djava.endorsed.dirs=%JAVA_ENDORSED_DIRS% -Dant.home=%ANT_HOME%
echo eXist Build
echo -------------------
echo Building with classpath %_LIBJARS%
echo Starting Ant...
java %JAVA_OPTS% -classpath %_LIBJARS% org.apache.tools.ant.launch.Launcher %1 %2 %3 %4 %5
```
Correct java is used now (selected by %JAVA_HOME%) and EXIST_HOME is set now (if not set before) | ```batchfile
@echo off
if not "%JAVA_HOME%" == "" goto gotJavaHome
echo Java environment not found. Please set
echo your JAVA_HOME environment variable to
echo the home of you JDK.
goto :eof
:gotJavaHome
if not "%EXIST_HOME%" == "" goto gotExistHome
set EXIST_HOME=%CD%
:gotExistHome
set ANT_HOME=%EXIST_HOME%\tools
set _LIBJARS=%CLASSPATH%;%ANT_HOME%\lib\ant-launcher.jar;%ANT_HOME%\lib\junit.jar;%JAVA_HOME%\lib\tools.jar
set JAVA_ENDORSED_DIRS=%EXIST_HOME%\lib\endorsed
set JAVA_OPTS=-Xms64M -Xmx512M -Djava.endorsed.dirs="%JAVA_ENDORSED_DIRS%" -Dant.home="%ANT_HOME%"
echo eXist Build
echo -------------------
echo JAVA_HOME=%JAVA_HOME%
echo EXIST_HOME=%EXIST_HOME%
echo _LIBJARS=%_LIBJARS%
echo Starting Ant...
"%JAVA_HOME%\bin\java" %JAVA_OPTS% -classpath "%_LIBJARS%" org.apache.tools.ant.launch.Launcher %1 %2 %3 %4 %5
``` |
2f5596f1-aad6-4077-8a44-b09bbcb0a993 | {
"language": "Batchfile"
} | ```batchfile
@ECHO OFF
REM vundle requires git
WHERE git >nul 2>nul
IF %ERRORLEVEL% NEQ 0 ECHO Please install git first. && GOTO :EOF
REM vundle requires curl
WHERE curl >nul 2>nul
IF %ERRORLEVEL% NEQ 0 ECHO Please install curl first (see vundle windows install docs). && GOTO :EOF
REM If _vimrc file already exists, prompt user to overwrite it.
IF EXIST %USERPROFILE%\_vimrc (
set /p OVERWRITEVIMRC="vimrc file already exists, do you want to overwrite it? [yn] "
IF "%OVERWRITEVIMRC%" EQU "y" (
move /Y %USERPROFILE%\_vimrc %USERPROFILE%\_vimrc_bak
) ELSE (
ECHO Aborting...
GOTO :EOF
)
)
ECHO Copying new vimrc file.
copy .\files\vimrc %USERPROFILE%\_vimrc
SET VUNDLEDIR=%USERPROFILE%\vimfiles\bundle\
IF EXIST %VUNDLEDIR% (
ECHO Removing existing vundle install
rmdir /S/Q %VUNDLEDIR%
)
ECHO Installing vundle.
mkdir %VUNDLEDIR%
git clone https://github.com/VundleVim/Vundle.vim.git %VUNDLEDIR%\Vundle.vim
ECHO Installing plugins
gvim +PluginInstall +qall
```
Fix strange behaviour when prompting user. | ```batchfile
@ECHO OFF
REM This is required to enable reading of variables set in if statement blocks.
REM Variables read with "!" e.g. !errorlevel! use delayed expansion.
REM See http://ss64.com/nt/delayedexpansion.html for more info.
setlocal enabledelayedexpansion
REM vundle requires git
WHERE git >nul 2>nul
IF %ERRORLEVEL% NEQ 0 ECHO Please install git first. && GOTO :EOF
REM vundle requires curl
WHERE curl >nul 2>nul
IF %ERRORLEVEL% NEQ 0 ECHO Please install curl first (see vundle windows install docs). && GOTO :EOF
REM If _vimrc file already exists, prompt user to overwrite it.
IF EXIST %USERPROFILE%\_vimrc (
choice /c yn /m "vimrc file already exists, do you want to overwrite it? "
IF !errorlevel! equ 1 (
move /Y %USERPROFILE%\_vimrc %USERPROFILE%\_vimrc_bak
) ELSE (
ECHO Aborting...
GOTO :EOF
)
)
ECHO Copying new vimrc file.
copy .\files\vimrc %USERPROFILE%\_vimrc
SET VUNDLEDIR=%USERPROFILE%\vimfiles\bundle\
IF EXIST %VUNDLEDIR% (
ECHO Removing existing vundle install
rmdir /S/Q %VUNDLEDIR%
)
ECHO Installing vundle.
mkdir %VUNDLEDIR%
git clone https://github.com/VundleVim/Vundle.vim.git %VUNDLEDIR%\Vundle.vim
ECHO Installing plugins
gvim +PluginInstall +qall
``` |
f78996d0-6cdd-4bb2-8cd1-0db1dbc94cdb | {
"language": "Batchfile"
} | ```batchfile
@echo off
set DOTNET_VERSION=4.7.1
echo Check for installed .NET Framework %DOTNET_VERSION%
reg query "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\v4.0.30319\SKUs\.NETFramework,Version=v%DOTNET_VERSION%" /ve >nul 2>&1
if %ERRORLEVEL% neq 0 (
echo ".NET Framework %DOTNET_VERSION% is not installed. Please download it from https://www.microsoft.com/net/download/visual-studio-sdks"
pause
goto:eof
)
if not exist "%ProgramFiles(x86)%" (
set "ProgramFiles(x86)=%ProgramFiles%"
)
set "VSWhere=%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe"
:MSBuild
echo Looking for MSBuild
for /f "usebackq delims=" %%i in (`^""%VSWhere%" -latest -version "[15.0,16.0)" -products * -requires "Microsoft.Component.MSBuild" -property "installationPath"^"`) do (
set InstallDir=%%i
)
set "MSBuild=%InstallDir%\MSBuild\15.0\Bin\MSBuild.exe"
if not exist "%MSBuild%" (
echo MSBuild not found. Please make sure Visual Studio 15.2+ is installed.
pause
goto:eof
)
echo Building Builder.sln
"%MSBuild%" Builder.sln /nologo /maxcpucount /nodeReuse:false /verbosity:minimal /t:Restore;Build
start "Cosmos Builder" "source\Cosmos.Build.Builder\bin\Debug\net471\Cosmos.Build.Builder.exe" "-VSPATH=%InstallDir%" %*
```
Remove .net framework check from install. | ```batchfile
@echo off
if not exist "%ProgramFiles(x86)%" (
set "ProgramFiles(x86)=%ProgramFiles%"
)
set "VSWhere=%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe"
:MSBuild
echo Looking for MSBuild
for /f "usebackq delims=" %%i in (`^""%VSWhere%" -latest -version "[15.0,16.0)" -products * -requires "Microsoft.Component.MSBuild" -property "installationPath"^"`) do (
set InstallDir=%%i
)
set "MSBuild=%InstallDir%\MSBuild\15.0\Bin\MSBuild.exe"
if not exist "%MSBuild%" (
echo MSBuild not found. Please make sure Visual Studio 15.2+ is installed.
pause
goto:eof
)
echo Building Builder.sln
"%MSBuild%" Builder.sln /nologo /maxcpucount /nodeReuse:false /verbosity:minimal /t:Restore;Build
start "Cosmos Builder" "source\Cosmos.Build.Builder\bin\Debug\net471\Cosmos.Build.Builder.exe" "-VSPATH=%InstallDir%" %*
``` |
656b00d9-03f9-4a84-9259-36edd58955da | {
"language": "Batchfile"
} | ```batchfile
@echo off
WHERE dotnet >nul 2>nul
IF %ERRORLEVEL% NEQ 0 ECHO You need to install .NET Core from https://dot.net && EXIT \b 1
dotnet Decompiler.dll %*
```
Exit batch with dotnet's exit code | ```batchfile
@echo off
WHERE dotnet >nul 2>nul
IF %ERRORLEVEL% NEQ 0 ECHO You need to install .NET Core from https://dot.net && EXIT /B 1
dotnet Decompiler.dll %*
EXIT /B %errorlevel%
``` |
4588b128-91bc-4007-b9ef-e7a8196ca190 | {
"language": "Batchfile"
} | ```batchfile
if not exist "C:\Windows\Temp\puppet.msi" (
powershell -Command "(New-Object System.Net.WebClient).DownloadFile('http://downloads.puppetlabs.com/windows/puppet-3.3.0.msi', 'C:\Windows\Temp\puppet.msi')" <NUL
)
:: http://docs.puppetlabs.com/pe/latest/install_windows.html
msiexec /qn /i C:\Windows\Temp\puppet.msi /log C:\Windows\Temp\puppet.log
<nul set /p ".=;C:\Program Files (x86)\Puppet Labs\Puppet\bin" >> C:\Windows\Temp\PATH
set /p PATH=<C:\Windows\Temp\PATH
setx PATH "%PATH%" /m```
Update Puppet Version to 3.4.3 | ```batchfile
if not exist "C:\Windows\Temp\puppet.msi" (
powershell -Command "(New-Object System.Net.WebClient).DownloadFile('http://downloads.puppetlabs.com/windows/puppet-3.4.3.msi', 'C:\Windows\Temp\puppet.msi')" <NUL
)
:: http://docs.puppetlabs.com/pe/latest/install_windows.html
msiexec /qn /i C:\Windows\Temp\puppet.msi /log C:\Windows\Temp\puppet.log
<nul set /p ".=;C:\Program Files (x86)\Puppet Labs\Puppet\bin" >> C:\Windows\Temp\PATH
set /p PATH=<C:\Windows\Temp\PATH
setx PATH "%PATH%" /m``` |
74230dae-6dcb-4779-90c2-ab7d92b72538 | {
"language": "Batchfile"
} | ```batchfile
@echo off
pip install -r requirements.txt
cd src
copy src\settings\local.py.example src\settings\local.py
pause
```
Delete buggy line ("cd src") in windows installer | ```batchfile
@echo off
pip install -r requirements.txt
copy src\settings\local.py.example src\settings\local.py
pause
``` |
4d787fa7-b21c-4638-b887-3a8d23451113 | {
"language": "Batchfile"
} | ```batchfile
@ECHO OFF
SETLOCAL
SET LOG_PATH="H:\bravo_logs\"
SET LOG_FILE="marvin_errors.log"
IF NOT EXIST %LOG_PATH% (SET LOG_PATH="%USERPROFILE%\Desktop\")
SET SCRIPT="%USERPROFILE%\Repos\standalone_scripts\upload_robot_logs.py"
SET STB_CONF="%USERPROFILE%\Repos\statusdb.yaml"
SET STB_LOG="%USERPROFILE%\Repos\statusdb_upload.log"
FOR /F "DELIMS=" %%A IN ('DATE /T') DO (SET TODAY=%%A)
FOR /F "TOKENS=1-2 DELIMS=/:" %%A IN ("%TIME%") DO (SET NOW=%%A:%%B)
ECHO %TODAY% %NOW% %* >> %LOG_PATH%%LOG_FILE%
ECHO %* | python %SCRIPT% --name "Marvin" --conf %STB_CONF% --logfile %STB_LOG%```
Change path where error messages are saved on Homer | ```batchfile
@ECHO OFF
SETLOCAL
SET LOG_PATH="Y:\Bravo\bravo_logs\"
SET LOG_FILE="marvin_errors.log"
IF NOT EXIST %LOG_PATH% (SET LOG_PATH="%USERPROFILE%\Desktop\")
SET SCRIPT="%USERPROFILE%\Repos\standalone_scripts\upload_robot_logs.py"
SET STB_CONF="%USERPROFILE%\Repos\statusdb.yaml"
SET STB_LOG="%USERPROFILE%\Repos\statusdb_upload.log"
FOR /F "DELIMS=" %%A IN ('DATE /T') DO (SET TODAY=%%A)
FOR /F "TOKENS=1-2 DELIMS=/:" %%A IN ("%TIME%") DO (SET NOW=%%A:%%B)
ECHO %TODAY% %NOW% %* >> %LOG_PATH%%LOG_FILE%
ECHO %* | python %SCRIPT% --name "Marvin" --conf %STB_CONF% --logfile %STB_LOG%``` |
da6f0470-a958-4b7b-bed6-5d188c3ef44a | {
"language": "Batchfile"
} | ```batchfile
@echo off
rem Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
rem or more contributor license agreements. Licensed under the Elastic License;
rem you may not use this file except in compliance with the Elastic License.
setlocal enabledelayedexpansion
setlocal enableextensions
call "%~dp0..\elasticsearch-env.bat" || exit /b 1
call "%~dp0x-pack-env.bat" || exit /b 1
set CLI_JAR=!ES_CLASSPATH!;!ES_HOME!/plugins/x-pack/bin/sql-cli-*.jar
%JAVA% ^
-jar "%CLI_JAR%" ^
%*
endlocal
endlocal
```
Update cli to work on windows | ```batchfile
@echo off
rem Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
rem or more contributor license agreements. Licensed under the Elastic License;
rem you may not use this file except in compliance with the Elastic License.
setlocal enabledelayedexpansion
setlocal enableextensions
call "%~dp0..\elasticsearch-env.bat" || exit /b 1
call "%~dp0x-pack-env.bat" || exit /b 1
set CLI_JAR=%ES_HOME%/plugins/x-pack/bin/*
%JAVA% ^
-cp "%CLI_JAR%" ^
org.elasticsearch.xpack.sql.cli.Cli ^
%*
endlocal
endlocal
``` |
7c6d41a3-544c-4d4d-9955-50d10cbfac8b | {
"language": "Batchfile"
} | ```batchfile
```
Add testcode for skipping statements when IF FALSE | ```batchfile
@more +1 "%~0" | "%~dp0..\nyagos.exe" - 2>nul & exit /b
set FLAG=OK
if not 1 == 1 echo NG(1) ; set "FLAG=NG(2)"
echo %FLAG%
``` |
8b21b538-4b59-4ee9-abef-8fd20d5b9acf | {
"language": "Batchfile"
} | ```batchfile
@echo off
rem Licensed to the Apache Software Foundation (ASF) under one or more
rem contributor license agreements. See the NOTICE file distributed with
rem this work for additional information regarding copyright ownership.
rem The ASF licenses this file to You under the Apache License, Version 2.0
rem (the "License"); you may not use this file except in compliance with
rem the License. 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.
IF [%1] EQU [] (
echo USAGE: %0 server.properties
EXIT /B 1
)
SetLocal
IF ["%KAFKA_LOG4J_OPTS%"] EQU [""] (
set KAFKA_LOG4J_OPTS=-Dlog4j.configuration=file:%~dp0../../config/log4j.properties
)
IF ["%KAFKA_HEAP_OPTS%"] EQU [""] (
set KAFKA_HEAP_OPTS=-Xmx1G -Xms1G
)
%~dp0kafka-run-class.bat kafka.Kafka %*
EndLocal
```
Fix the server start script for Windows 32-bit OS | ```batchfile
@echo off
rem Licensed to the Apache Software Foundation (ASF) under one or more
rem contributor license agreements. See the NOTICE file distributed with
rem this work for additional information regarding copyright ownership.
rem The ASF licenses this file to You under the Apache License, Version 2.0
rem (the "License"); you may not use this file except in compliance with
rem the License. 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.
IF [%1] EQU [] (
echo USAGE: %0 server.properties
EXIT /B 1
)
SetLocal
IF ["%KAFKA_LOG4J_OPTS%"] EQU [""] (
set KAFKA_LOG4J_OPTS=-Dlog4j.configuration=file:%~dp0../../config/log4j.properties
)
IF ["%KAFKA_HEAP_OPTS%"] EQU [""] (
rem detect OS architecture
wmic os get osarchitecture | find /i "32-bit" >nul 2>&1
IF NOT ERRORLEVEL 1 (
rem 32-bit OS
set KAFKA_HEAP_OPTS=-Xmx512M -Xms512M
) ELSE (
rem 64-bit OS
set KAFKA_HEAP_OPTS=-Xmx1G -Xms1G
)
)
%~dp0kafka-run-class.bat kafka.Kafka %*
EndLocal
``` |
1108891c-6578-43fe-866e-93f822d0cc62 | {
"language": "Batchfile"
} | ```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"
)```
Edit script that runs studio with plugin | ```batchfile
@echo off
SET pathToVS12=C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe
SET pathToVS11=C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\devenv.exe
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"
)``` |
e1b14d25-4d9b-4d91-a22f-5cadaf8fb9e9 | {
"language": "Batchfile"
} | ```batchfile
@echo off
set targetDllPath="%~1\bin\SDL2.dll"
if not exist %targetDllPath% (
echo Copying SDL2.dll to %targetDllPath%
copy SDL2.dll %targetDllPath% || exit /b 1
)
cd /d %1
if not exist build mkdir build
cd build
set slnName="%~2.sln"
set binTargetName="%~2-gamebins"
IF NOT EXIST %slnName% (
cmake -G "Visual Studio 16 2019" ^
-A x64 ^
-DHALLEY_PATH=../halley ^
-DBUILD_HALLEY_TOOLS=0 ^
-DBUILD_HALLEY_TESTS=0 ^
-DCMAKE_INCLUDE_PATH="lib\include" ^
-DCMAKE_LIBRARY_PATH="lib\windows64" ^
-DBOOST_ROOT="lib\boost" ^
-DBoost_USE_STATIC_LIBS=1 ^
.. || exit /b 1
)
cmake.exe --build . --target %binTargetName% --config %3 || exit /b 1
echo Build successful.```
Create bin dir if needed | ```batchfile
@echo off
set targetDllDir="%~1\bin"
if not exist %targetDllDir% (
mkdir %targetDllDir%
)
set targetDllPath="%~1\bin\SDL2.dll"
if not exist %targetDllPath% (
echo Copying SDL2.dll to %targetDllPath%
copy SDL2.dll %targetDllPath% || exit /b 1
)
cd /d %1
if not exist build mkdir build
cd build
set slnName="%~2.sln"
set binTargetName="%~2-gamebins"
IF NOT EXIST %slnName% (
cmake -G "Visual Studio 16 2019" ^
-A x64 ^
-DHALLEY_PATH=../halley ^
-DBUILD_HALLEY_TOOLS=0 ^
-DBUILD_HALLEY_TESTS=0 ^
-DCMAKE_INCLUDE_PATH="lib\include" ^
-DCMAKE_LIBRARY_PATH="lib\windows64" ^
-DBOOST_ROOT="lib\boost" ^
-DBoost_USE_STATIC_LIBS=1 ^
.. || exit /b 1
)
cmake.exe --build . --target %binTargetName% --config %3 || exit /b 1
echo Build successful.``` |
fe510cf5-9f8c-4f21-b7f0-c9fa5ae89dcb | {
"language": "Batchfile"
} | ```batchfile
@ECHO OFF
REM create bin directory if it doesn't exist
if not exist ..\bin mkdir ..\bin
REM delete output from previous run
del actual.txt
REM compile the code into the bin folder
javac javac -cp ..\src -Xlint:none -d ..\bin ..\src\seedu\addressbook\Main.java
REM run the program, feed commands from input.txt file and redirect the output to the actual.txt
java -classpath ..\bin seedu.addressbook.Main < input.txt > actual.txt
REM compare the output to the expected output
FC actual.txt expected.txt```
Remove duplicate javac from test script | ```batchfile
@ECHO OFF
REM create bin directory if it doesn't exist
if not exist ..\bin mkdir ..\bin
REM delete output from previous run
del actual.txt
REM compile the code into the bin folder
javac -cp ..\src -Xlint:none -d ..\bin ..\src\seedu\addressbook\Main.java
REM run the program, feed commands from input.txt file and redirect the output to the actual.txt
java -classpath ..\bin seedu.addressbook.Main < input.txt > actual.txt
REM compare the output to the expected output
FC actual.txt expected.txt``` |
19e04b68-77e3-4035-a8bc-0bb8ed0b3a1a | {
"language": "Batchfile"
} | ```batchfile
```
Add script to execute tests on windows. | ```batchfile
@ECHO OFF
set BASE=%~dp0
set DEFAULT_TARGET=
IF [%1]==[] set DEFAULT_TARGET="%BASE%atest"
pybot -c regression -L DEBUG --pythonpath "%BASE%src" %DEFAULT_TARGET% %*
pause
``` |
f7b3ac33-9d72-4bd9-b133-d89b6d07574a | {
"language": "Batchfile"
} | ```batchfile
@echo off
echo Generating C-style Win32 APIs and tests
call dart %~dp0win32\generate_ffi_files.dart
call dart %~dp0win32\generate_tests.dart
echo.
echo Generating COM classes
call dart %~dp0generate\generate.dart %~dp0generate\com %~dp0..\lib\src\generated
echo.
echo Generating Windows Runtime classes from IDL
call dart %~dp0generate\generate.dart %~dp0generate\winrt %~dp0..\lib\src\generated
echo.
echo Generating Windows Runtime classes from inspection
call dart %~dp0winmd\winmd.dart %~dp0..\lib\src\generated
echo.
echo Formatting generated source code
call dart format %~dp0..\lib\src
call dart format %~dp0..\test\api_test.dart
echo.
echo Running tests
call dart pub run test```
Call non-nullable Dart for generators | ```batchfile
@echo off
echo Generating C-style Win32 APIs and tests
call dart --enable-experiment=non-nullable %~dp0win32\generate_ffi_files.dart
call dart --enable-experiment=non-nullable %~dp0win32\generate_tests.dart
echo.
echo Generating COM classes
call dart --enable-experiment=non-nullable %~dp0generate\generate.dart %~dp0generate\com %~dp0..\lib\src\generated
echo.
echo Generating Windows Runtime classes from IDL
call dart --enable-experiment=non-nullable %~dp0generate\generate.dart %~dp0generate\winrt %~dp0..\lib\src\generated
echo.
echo Generating Windows Runtime classes from inspection
call dart --enable-experiment=non-nullable %~dp0winmd\winmd.dart %~dp0..\lib\src\generated
echo.
echo Formatting generated source code
call dart --enable-experiment=non-nullable format %~dp0..\lib\src
call dart --enable-experiment=non-nullable format %~dp0..\test\api_test.dart
echo.
echo Running tests
call dart --enable-experiment=non-nullable pub run test``` |
18d2b55d-1de4-4ce5-abfd-ba7d9e9bbc3e | {
"language": "Batchfile"
} | ```batchfile
@echo off
setlocal enabledelayedexpansion
pushd %1
set attempts=5
set counter=0
:retry
set /a counter+=1
echo Attempt %counter% out of %attempts%
cmd /c npm install https://github.com/projectkudu/KuduScript/tarball/031b8bfe8230279dbd1bff99c33ecd07e373cb87
IF %ERRORLEVEL% NEQ 0 goto error
goto end
:error
if %counter% GEQ %attempts% goto :lastError
goto retry
:lastError
popd
echo An error has occured during npm install.
exit /b 1
:end
popd
echo Finished successfully.
exit /b 0
```
Update kudu to use new kuduscript with python3.6 support | ```batchfile
@echo off
setlocal enabledelayedexpansion
pushd %1
set attempts=5
set counter=0
:retry
set /a counter+=1
echo Attempt %counter% out of %attempts%
cmd /c npm install https://github.com/projectkudu/KuduScript/tarball/b27b514505b3d85ccb1396ab3dc7ed64d1dfd455
IF %ERRORLEVEL% NEQ 0 goto error
goto end
:error
if %counter% GEQ %attempts% goto :lastError
goto retry
:lastError
popd
echo An error has occured during npm install.
exit /b 1
:end
popd
echo Finished successfully.
exit /b 0
``` |
46a2eac6-8f27-4df1-9d33-e994c009cb62 | {
"language": "Batchfile"
} | ```batchfile
"%PYTHON%" setup.py install
if errorlevel 1 exit 1
:: Add more build steps here, if they are necessary.
:: See
:: http://docs.continuum.io/conda/build.html
:: for a list of environment variables that are set during the build process.
```
Fix conda recipe for Windows build | ```batchfile
"%PYTHON%" setup.py install --single-version-externally-managed --record=record.txt
if errorlevel 1 exit 1
:: Add more build steps here, if they are necessary.
:: See
:: http://docs.continuum.io/conda/build.html
:: for a list of environment variables that are set during the build process.
``` |
83ecc429-8a3d-4424-9a1a-41367df0954a | {
"language": "Batchfile"
} | ```batchfile
@PowerShell.exe -ExecutionPolicy RemoteSigned -Command "Invoke-Expression -Command ((Get-Content -Path '%~f0' | Select-Object -Skip 2) -join [environment]::NewLine)"
@exit /b %Errorlevel%
#Install scoop
set-executionpolicy unrestricted -s cu -f
iex (new-object net.webclient).downloadstring('https://get.scoop.sh')
scoop install sudo
# Add Enable Consent to Windows Registry
$registryPath = "HKLM:\Software\Microsoft\MicrosoftEdge"
$registryPathItem = "$($registryPath)\MediaCapture"
$name = "EnableConsentPrompt"
$value = "0"
echo "Adding enable consent to Windows registry..."
sudo New-Item -Path $registryPath -Force | Out-Null
sudo New-Item -Path $registryPathItem -Force | Out-Null
sudo New-ItemProperty -Path $registryPathItem -Name $name -Value $value -PropertyType DWORD -Force | Out-Null
echo "Success!"
```
Add Edge restarting once consent enabled | ```batchfile
@PowerShell.exe -ExecutionPolicy RemoteSigned -Command "Invoke-Expression -Command ((Get-Content -Path '%~f0' | Select-Object -Skip 2) -join [environment]::NewLine)"
@exit /b %Errorlevel%
#Install scoop
set-executionpolicy unrestricted -s cu -f
iex (new-object net.webclient).downloadstring('https://get.scoop.sh')
scoop install sudo
# Add Enable Consent to Windows Registry
$registryPath = "HKLM:\Software\Microsoft\MicrosoftEdge"
$registryPathItem = "$($registryPath)\MediaCapture"
$name = "EnableConsentPrompt"
$value = "0"
echo "Adding enable consent to Windows registry..."
sudo New-Item -Path $registryPath -Force | Out-Null
sudo New-Item -Path $registryPathItem -Force | Out-Null
sudo New-ItemProperty -Path $registryPathItem -Name $name -Value $value -PropertyType DWORD -Force | Out-Null
echo "Restarting Microsoft Edge..."
Stop-Process -Name "MicrosoftEdge"
Stop-Process -Name "MicrosoftEdgeCP"
Start-Sleep -s 10
Start-Process -FilePath "MicrosoftEdge" -Wait -WindowStyle Maximized
echo "Success!"
``` |
6729d3ef-0b96-4a11-a43e-7c5529835d5b | {
"language": "Batchfile"
} | ```batchfile
```
Add stray file from 1.11a1 | ```batchfile
@ECHO OFF
REM gdump - JSTOR/Harvard Object Validation Environment
REM Copyright 2004-2005 by the President and Fellows of Harvard College
REM JHOVE is made available under the GNU General Public License (see the
REM file LICENSE for details)
REM
REM Driver script for the GIF dump utility
REM
REM Usage: gdump file
REM
REM where file is a GIF file
REM
REM Configuration constants:
REM JHOVE_HOME Jhove installation directory
REM JAVA_HOME Java JRE directory
REM JAVA Java interpreter
REM EXTRA_JARS Extra jar files to add to CLASSPATH
SET JHOVE_HOME="C:\Program Files\jhove"
SET JAVA_HOME="C:\Program Files\java\j2re1.4.1_02"
SET JAVA=%JAVA_HOME%\bin\java
SET EXTRA_JARS=
REM NOTE: Nothing below this line should be edited
REM #########################################################################
SET CP=%JHOVE_HOME%\bin\JhoveApp.jar
IF "%EXTRA_JARS%"=="" GOTO FI
SET CP=%CP%:%EXTRA_JARS
:FI
REM Retrieve a copy of all command line arguments to pass to the application
SET ARGS=
:WHILE
IF "%1"=="" GOTO LOOP
SET ARGS=%ARGS% %1
SHIFT
GOTO WHILE
:LOOP
REM Set the CLASSPATH and invoke the Java loader
%JAVA% -classpath %CP% GDump %ARGS%
``` |
bab7cbe8-9a6e-4438-b2ec-7fc9a6bf4546 | {
"language": "Batchfile"
} | ```batchfile
@echo off
setlocal EnableDelayedExpansion
echo Test discovery started...
dir C:\projects\spectre\*Tests.exe /b /s | findstr /v obj > __tmp_gtest.txt
echo Testing (Google Test)...
set failures=0
FOR /F %%i IN (__tmp_gtest.txt) DO (
echo %%i
%%i --gtest_output="xml:%%i.xml"
powershell C:\projects\spectre\scripts\Upload-TestResult.ps1 -fileName %%i.xml
IF %ERRORLEVEL% NEQ 0 (
set /A failures=%failures%+1
)
)
del __tmp_gtest.txt
EXIT /B %failures%
```
Solve problem of non-failing native tests | ```batchfile
@echo off
setlocal EnableDelayedExpansion
echo Test discovery started...
dir C:\projects\spectre\*Tests.exe /b /s | findstr /v obj > __tmp_gtest.txt
echo Testing (Google Test)...
set failures=0
FOR /F %%i IN (__tmp_gtest.txt) DO (
echo %%i
%%i --gtest_output="xml:%%i.xml"
IF %ERRORLEVEL% NEQ 0 (
set /A failures=%failures%+1
)
powershell C:\projects\spectre\scripts\Upload-TestResult.ps1 -fileName %%i.xml
)
del __tmp_gtest.txt
EXIT /B %failures%
``` |
0f25004a-5ef9-4fbe-804e-94854f1fa704 | {
"language": "Batchfile"
} | ```batchfile
set CFG=%USERPROFILE%\pydistutils.cfg
echo [config] > "%CFG%"
echo compiler=mingw32 >> "%CFG%"
echo [build] >> "%CFG%"
echo compiler=mingw32 >> "%CFG%"
echo [build_ext] >> "%CFG%"
echo compiler=mingw32 >> "%CFG%"
"%PYTHON%" setup.py install --single-version-externally-managed --record=record.txt
if errorlevel 1 exit 1
```
Switch all recipes to pip install instead of setup.py install | ```batchfile
set CFG=%USERPROFILE%\pydistutils.cfg
echo [config] > "%CFG%"
echo compiler=mingw32 >> "%CFG%"
echo [build] >> "%CFG%"
echo compiler=mingw32 >> "%CFG%"
echo [build_ext] >> "%CFG%"
echo compiler=mingw32 >> "%CFG%"
"%PYTHON%" -m pip install . --no-deps -vv
if errorlevel 1 exit 1
``` |
371fb6f8-a7a4-41fc-90ad-c20e9d35929e | {
"language": "Batchfile"
} | ```batchfile
setlocal
IF "%1"=="" (
set BUILD_CONFIG="Debug"
) ELSE (
set BUILD_CONFIG=%1
)
REM Presence of a second argument indicates that the caller has already run vsvars32.bat
IF "%2"=="" (
if not "%VS120COMNTOOLS%" == "" (
echo Setting up Visual Studio Pro 2013 Tools...
@call "%VS120COMNTOOLS%vsvars32.bat"
goto build
)
if not "%VS100COMNTOOLS%" == "" (
echo Setting up Visual Studio Pro 2010 Tools...
@call "%VS100COMNTOOLS%vsvars32.bat"
goto build
)
if not "%VS110COMNTOOLS%" == "" (
echo Setting up Visual Studio Express 2010 Tools...
@call "%VS110COMNTOOLS%vsvars32.bat"
goto build
)
)
:build
git pull --rebase
msbuild "Palaso.sln" /verbosity:quiet /maxcpucount /p:Configuration=%BUILD_CONFIG%
```
Update GetAndBuild script to match TC Build Step | ```batchfile
setlocal
IF "%1"=="" (
set BUILD_CONFIG="Debug"
) ELSE (
set BUILD_CONFIG=%1
)
REM Presence of a second argument indicates that the caller has already run vsvars32.bat
IF "%2"=="" (
if not "%VS120COMNTOOLS%" == "" (
echo Setting up Visual Studio Pro 2013 Tools...
@call "%VS120COMNTOOLS%vsvars32.bat"
goto build
)
if not "%VS100COMNTOOLS%" == "" (
echo Setting up Visual Studio Pro 2010 Tools...
@call "%VS100COMNTOOLS%vsvars32.bat"
goto build
)
if not "%VS110COMNTOOLS%" == "" (
echo Setting up Visual Studio Express 2010 Tools...
@call "%VS110COMNTOOLS%vsvars32.bat"
goto build
)
)
:build
git pull --rebase
msbuild "build/Palaso.proj" /target:build /verbosity:quiet /maxcpucount /p:Configuration=%BUILD_CONFIG%
``` |
80f1610f-f138-4e69-977d-64706a944a5a | {
"language": "Batchfile"
} | ```batchfile
"C:\Program Files (x86)\Java\jre1.8.0_45\bin\java.exe" -jar compiler.jar ^
--js=translate.js ^
--js=jquery/jquery-1.11.2.js ^
--js=jquery/jquery-ui.1.11.2.min.js ^
--js=jquery/jquery.qtip.js ^
--js=jquery/jquery.blockUI.js ^
--js=jquery/jquery.color.js ^
--js=jquery/jquery.tablesorter.js ^
--js=jquery/jquery.flot.js ^
--js=jquery/jquery.ui.position.js ^
--js=jquery/jquery.contextMenu.js ^
--js=jquery/jquery.hotkeys.js ^
--js=jquery/jquery.jsPlumb-1.6.4.js ^
--js=jquery/jquery.placeholder.js ^
--js=jquery/jquery.simplePagination.js ^
--js=handlebars-v2.0.0.js ^
--js=handlebars.form-helpers.js ^
--js=dropdown.js ^
--js=tab.js ^
--js=typeahead.bundle.js ^
--source_map_format=V3 ^
--create_source_map thirdparty.compiled.js.map ^
--js_output_file=thirdparty.compiled.js
echo //# sourceMappingURL=thirdparty.compiled.js.map >> thirdparty.compiled.js
@pause```
Bump versiona nd update third party build to use latest jquery ui we have | ```batchfile
"C:\Program Files (x86)\Java\jre1.8.0_45\bin\java.exe" -jar compiler.jar ^
--js=translate.js ^
--js=jquery/jquery-1.11.2.js ^
--js=jquery/jquery-ui.1.11.4.min.js ^
--js=jquery/jquery.qtip.js ^
--js=jquery/jquery.blockUI.js ^
--js=jquery/jquery.color.js ^
--js=jquery/jquery.tablesorter.js ^
--js=jquery/jquery.flot.js ^
--js=jquery/jquery.ui.position.js ^
--js=jquery/jquery.contextMenu.js ^
--js=jquery/jquery.hotkeys.js ^
--js=jquery/jquery.jsPlumb-1.6.4.js ^
--js=jquery/jquery.placeholder.js ^
--js=jquery/jquery.simplePagination.js ^
--js=handlebars-v2.0.0.js ^
--js=handlebars.form-helpers.js ^
--js=dropdown.js ^
--js=tab.js ^
--js=typeahead.bundle.js ^
--source_map_format=V3 ^
--create_source_map thirdparty.compiled.js.map ^
--js_output_file=thirdparty.compiled.js
echo //# sourceMappingURL=thirdparty.compiled.js.map >> thirdparty.compiled.js
@pause``` |
07121bc6-e140-4f55-bdb2-abd51cf73bad | {
"language": "Batchfile"
} | ```batchfile
:: Copyright (c) 2011, Jon Maken
:: License: 3-clause BSD (see project LICENSE file)
:: Revision: 01/29/2011 10:20:16 AM
@echo off
setlocal
:: echo initial:
:: echo %%0 = %0
:: echo %%* = %*
:: fix ruby.exe invocation when explicitly disabling RubyGems
if "x%1" == "x--disable-gems" (
set NOGEM=%1
for /F "tokens=1*" %%i in ("%*") do set RB_ARGS=%%j
) else (
set NOGEM=
set RB_ARGS=%*
)
:: echo pre call ruby:
:: echo NOGEM = %NOGEM%
:: echo RB_ARGS = %RB_ARGS%
ruby.exe %NOGEM% -x %~f0 %RB_ARGS%
endlocal
exit /b
#!ruby
__DIR__ = File.expand_path(File.dirname(__FILE__))
$LOAD_PATH.unshift(File.join(__DIR__, 'lib'))
require 'inquisitor'
Inquisitor.run
```
Add project root dir to $LOAD_PATH. | ```batchfile
:: Copyright (c) 2011, Jon Maken
:: License: 3-clause BSD (see project LICENSE file)
:: Revision: 01/29/2011 10:20:16 AM
@echo off
setlocal
:: echo initial:
:: echo %%0 = %0
:: echo %%* = %*
:: fix ruby.exe invocation when explicitly disabling RubyGems
if "x%1" == "x--disable-gems" (
set NOGEM=%1
for /F "tokens=1*" %%i in ("%*") do set RB_ARGS=%%j
) else (
set NOGEM=
set RB_ARGS=%*
)
:: echo pre call ruby:
:: echo NOGEM = %NOGEM%
:: echo RB_ARGS = %RB_ARGS%
ruby.exe %NOGEM% -x %~f0 %RB_ARGS%
endlocal
exit /b
#!ruby
__DIR__ = File.expand_path(File.dirname(__FILE__))
$LOAD_PATH.unshift(File.join(__DIR__, 'lib'))
$LOAD_PATH.unshift(File.join(__DIR__))
require 'inquisitor'
Inquisitor.run
``` |
6ca5ec0e-fcd6-4472-b913-9582187ecece | {
"language": "Batchfile"
} | ```batchfile
@echo off
if not defined HOST_PYTHON set HOST_PYTHON=python
%HOST_PYTHON% build_ssl.py %1 %2
```
Add debug output to analyse buildbot failure. | ```batchfile
@echo off
cd
if not defined HOST_PYTHON set HOST_PYTHON=python
%HOST_PYTHON% build_ssl.py %1 %2
``` |
fa3a4f4b-fca6-4052-8840-1e6f62e3d011 | {
"language": "Batchfile"
} | ```batchfile
@echo on
cd git\SwiftShader
git submodule update --init
"C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\MSBuild" SwiftShader.sln
```
Add Python path to Kokoro batch script | ```batchfile
@echo on
SET PATH=%PATH%;C:\python27
cd git\SwiftShader
git submodule update --init
"C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\MSBuild" SwiftShader.sln
``` |
93047e62-0b6d-4df3-8ba1-7213bc3004ef | {
"language": "Batchfile"
} | ```batchfile
RMDIR "%~dp0..\Drops" /S /Q
MKDIR "%~dp0..\Drops"
MKDIR "%~dp0..\Drops\Temp"
MKDIR "%~dp0..\Drops\Temp\agent"
MKDIR "%~dp0..\Drops\Temp\agent\bin"
XCOPY /E /Y "%~dp0..\Solutions\*.*" "%~dp0..\Drops\Temp"
XCOPY /E /Y "%~dp0..\..\src\OctopusPuppet.Cmd\bin\Release\*.*" "%~dp0..\Drops\Temp\agent\bin"
DEL "%~dp0..\Drops\Temp\agent\bin\*.xml"
DEL "%~dp0..\Drops\Temp\agent\bin\*.pdb"
@PowerShell -File %~dp0Create-Zip.ps1 %~dp0..\Drops\Temp\agent\ %~dp0..\Drops\Temp\agent\octopuspuppet-metarunner.zip
PAUSE
DEL "%~dp0..\Drops\Temp\agent\*.xml"
RMDIR "%~dp0..\Drops\Temp\agent\bin" /S /Q
PAUSE
@PowerShell -File "%~dp0Create-Zip.ps1" -target %~dp0..\Drops\Temp\ %~dp0..\Drops\octopuspuppet-metarunner.zip
RMDIR "%~dp0..\Drops\Temp\" /S /Q
PAUSE```
Remove pause as we want to build it from CI agent | ```batchfile
RMDIR "%~dp0..\Drops" /S /Q
MKDIR "%~dp0..\Drops"
MKDIR "%~dp0..\Drops\Temp"
MKDIR "%~dp0..\Drops\Temp\agent"
MKDIR "%~dp0..\Drops\Temp\agent\bin"
XCOPY /E /Y "%~dp0..\Solutions\*.*" "%~dp0..\Drops\Temp"
XCOPY /E /Y "%~dp0..\..\src\OctopusPuppet.Cmd\bin\Release\*.*" "%~dp0..\Drops\Temp\agent\bin"
DEL "%~dp0..\Drops\Temp\agent\bin\*.xml"
DEL "%~dp0..\Drops\Temp\agent\bin\*.pdb"
@PowerShell -File %~dp0Create-Zip.ps1 %~dp0..\Drops\Temp\agent\ %~dp0..\Drops\Temp\agent\octopuspuppet-metarunner.zip
PAUSE
DEL "%~dp0..\Drops\Temp\agent\*.xml"
RMDIR "%~dp0..\Drops\Temp\agent\bin" /S /Q
PAUSE
@PowerShell -File "%~dp0Create-Zip.ps1" -target %~dp0..\Drops\Temp\ %~dp0..\Drops\octopuspuppet-metarunner.zip
RMDIR "%~dp0..\Drops\Temp\" /S /Q``` |
7a28ee30-64b7-4ed3-9615-274966dfef50 | {
"language": "Batchfile"
} | ```batchfile
```
Add package into registry via script | ```batchfile
@echo off
ECHO Adding to the registry the WakaTime package...
REM SQL SERVER MANAGEMENT STUDIO 2012
REG QUERY "HKEY_CURRENT_USER\Software\Microsoft\SQL Server Management Studio\11.0\Packages" > nul 2> nul
if %errorlevel% equ 1 (
REG ADD "HKEY_CURRENT_USER\Software\Microsoft\SQL Server Management Studio\11.0\Packages\{52d9c3ff-c893-408e-95e4-d7484ec7fa47}" /v SkipLoading /t REG_DWORD /d 1
)
REM SQL SERVER MANAGEMENT STUDIO 2014
REG QUERY "HKEY_CURRENT_USER\Software\Microsoft\SQL Server Management Studio\12.0\Packages" > nul 2> nul
if %errorlevel% equ 1 (
REG ADD "HKEY_CURRENT_USER\Software\Microsoft\SQL Server Management Studio\12.0\Packages\{52d9c3ff-c893-408e-95e4-d7484ec7fa47}" /v SkipLoading /t REG_DWORD /d 1
)
REM SQL SERVER MANAGEMENT STUDIO 2016
REG QUERY "HKEY_CURRENT_USER\Software\Microsoft\SQL Server Management Studio\13.0\Packages" > nul 2> nul
if %errorlevel% equ 1 (
REG ADD "HKEY_CURRENT_USER\Software\Microsoft\SQL Server Management Studio\13.0\Packages\{52d9c3ff-c893-408e-95e4-d7484ec7fa47}" /v SkipLoading /t REG_DWORD /d 1
)
REM SQL SERVER MANAGEMENT STUDIO 2017
REG QUERY "HKEY_CURRENT_USER\Software\Microsoft\SQL Server Management Studio\14.0\Packages" > nul 2> nul
if %errorlevel% equ 1 (
REG ADD "HKEY_CURRENT_USER\Software\Microsoft\SQL Server Management Studio\14.0\Packages\{52d9c3ff-c893-408e-95e4-d7484ec7fa47}" /v SkipLoading /t REG_DWORD /d 1
)
REM SQL SERVER MANAGEMENT STUDIO 2018
REG QUERY "HKEY_CURRENT_USER\Software\Microsoft\SQL Server Management Studio\15.0\Packages" > nul 2> nul
if %errorlevel% equ 1 (
REG ADD "HKEY_CURRENT_USER\Software\Microsoft\SQL Server Management Studio\15.0\Packages\{52d9c3ff-c893-408e-95e4-d7484ec7fa47}" /v SkipLoading /t REG_DWORD /d 1
)
ECHO All packages were successfully added``` |
5be8d196-40d1-405e-859b-7cae55484ea2 | {
"language": "Batchfile"
} | ```batchfile
@echo off
cd %~dp0..
rake -f build\build.rb "build:no_test_build[., SevenDigital.Messaging.sln, build, full, local, Release]"
```
Update build.cmd to not cd up | ```batchfile
@echo off
cd %~dp0
rake -f build\build.rb "build:no_test_build[., SevenDigital.Messaging.sln, build, full, local, Release]"
pause
``` |
e7803276-9eb9-47dc-8ecf-619916853906 | {
"language": "Batchfile"
} | ```batchfile
@echo off
for %%? in ("%~dp0..") do set ROO_HOME=%%~f?
rem echo Resolved ROO_HOME: %ROO_HOME%
java -Djava.ext.dirs=%ROO_HOME%/lib;%ROO_HOME%/dist org.springframework.roo.bootstrap.Bootstrap "classpath:/roo-bootstrap.xml"```
Stop beep noise on Windows machines via Roo shell | ```batchfile
@echo off
for %%? in ("%~dp0..") do set ROO_HOME=%%~f?
rem echo Resolved ROO_HOME: %ROO_HOME%
java -Djline.nobell=true -Djava.ext.dirs=%ROO_HOME%/lib;%ROO_HOME%/dist org.springframework.roo.bootstrap.Bootstrap "classpath:/roo-bootstrap.xml"``` |
f20cdb7d-ef5b-43db-b1b5-c3f48ce80be2 | {
"language": "Batchfile"
} | ```batchfile
@echo off
REM I didn't use the if (...) else (...) form because when the environment variable
REM is expanded, the ")" in the directory name seems to be interpreted by the IF command.
if not "%ProgramFiles(x86)%"=="" set ProgramFiles32Bit=%ProgramFiles(x86)%
if "%ProgramFiles(x86)%"=="" set ProgramFiles32Bit=%ProgramFiles%
set BuildExe=%ProgramFiles32Bit%\MSBuild\14.0\Bin\MSBuild.exe
if not exist "%BuildExe%" (
echo ERROR: MSBuild not found at "%BuildExe%"!
pause
exit /b
)
"%BuildExe%" /p:Configuration=Release "TTMouseclickSimulator.sln"
pause```
Update the build script to use delayed environment variable expansion and instruct MSBuild to use a less verbose output. | ```batchfile
@echo off
SetLocal ENABLEDELAYEDEXPANSION
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
)
"!BuildExe!" /v:minimal /p:Configuration=Release "TTMouseclickSimulator\TTMouseclickSimulator.csproj"
if not errorlevel 1 (
echo.
echo.Build successful^^!
)
pause``` |
04c74296-22c2-4216-ad81-f3853976c762 | {
"language": "Batchfile"
} | ```batchfile
@ECHO OFF
SETLOCAL
SET CACHED_NUGET=%LocalAppData%\NuGet\NuGet.exe
SET SOLUTION_PATH=%~dp0src\CodeFormatter.sln
IF EXIST %CACHED_NUGET% goto restore
echo Downloading latest version of NuGet.exe...
IF NOT EXIST %LocalAppData%\NuGet md %LocalAppData%\NuGet
@powershell -NoProfile -ExecutionPolicy unrestricted -Command "$ProgressPreference = 'SilentlyContinue'; Invoke-WebRequest 'https://www.nuget.org/nuget.exe' -OutFile '%CACHED_NUGET%'"
:restore
IF EXIST "%~dp0src\packages" goto build
%CACHED_NUGET% restore %SOLUTION_PATH%
:build
"%ProgramFiles(x86)%\MSBuild\14.0\bin\MSBuild.exe" %SOLUTION_PATH% /p:OutDir="%~dp0bin " /nologo /m /v:m /flp:verbosity=normal %*
```
Add a helpful message when tools are missing | ```batchfile
@ECHO OFF
SETLOCAL
SET CACHED_NUGET=%LocalAppData%\NuGet\NuGet.exe
SET SOLUTION_PATH=%~dp0src\CodeFormatter.sln
SET VS2015_BUILD_TOOLS_PATH="%ProgramFiles(x86)%\MSBuild\14.0\bin\MSBuild.exe"
IF NOT EXIST %VS2015_BUILD_TOOLS_PATH% (
echo In order to build or run this tool you need either Visual Studio 2015 Preview or
echo Microsoft Build Tools 2015 Preview tools installed.
echo.
echo Visit http://www.visualstudio.com/en-us/downloads/visual-studio-2015-downloads-vs
echo to download either.
goto :eof
)
IF EXIST %CACHED_NUGET% goto restore
echo Downloading latest version of NuGet.exe...
IF NOT EXIST %LocalAppData%\NuGet md %LocalAppData%\NuGet
@powershell -NoProfile -ExecutionPolicy unrestricted -Command "$ProgressPreference = 'SilentlyContinue'; Invoke-WebRequest 'https://www.nuget.org/nuget.exe' -OutFile '%CACHED_NUGET%'"
:restore
IF EXIST "%~dp0src\packages" goto build
%CACHED_NUGET% restore %SOLUTION_PATH%
:build
"%ProgramFiles(x86)%\MSBuild\14.0\bin\MSBuild.exe" %SOLUTION_PATH% /p:OutDir="%~dp0bin " /nologo /m /v:m /flp:verbosity=normal %*
``` |
cf8639eb-37d6-4704-876c-56c0fd176346 | {
"language": "Batchfile"
} | ```batchfile
if exist classes rmdir classes /s /q
if exist build rmdir build /s /q
mkdir classes
mkdir build
xcopy /E /y src classes\
"%JAVA_HOME%\bin\java" -cp ../../3rdpartypublic/classext/clojure.jar;../MMCoreJ_wrap/MMCoreJ.jar;../../3rdpartypublic/classext/ij.jar;../mmstudio/MMJ_.jar;../../3rdpartypublic/classext/bsh-2.0b4.jar;./src -Dclojure.compile.path=classes clojure.lang.Compile org.micromanager.acq-engine
xcopy /E /y src build\
xcopy classes\org\micromanager\AcquisitionEngine2010.class build\org\micromanager
"%JAVA_HOME%\bin\jar" cf MMAcqEngine.jar -C build\ .
copy /Y MMAcqEngine.jar ..\bin_Win32\
copy /Y MMAcqEngine.jar ..\bin_x64\
copy /Y MMAcqEngine.jar ..\Install_Win32\micro-manager\plugins\Micro-Manager"
copy /Y MMAcqEngine.jar ..\Install_x64\micro-manager\plugins\Micro-Manager"
```
Bring back AOT compiling for acquisition engine | ```batchfile
if exist classes rmdir classes /s /q
if exist build rmdir build /s /q
mkdir classes
mkdir build
xcopy /E /y src classes\
"%JAVA_HOME%\bin\java" -cp ../../3rdpartypublic/classext/clojure.jar;../MMCoreJ_wrap/MMCoreJ.jar;../../3rdpartypublic/classext/ij.jar;../mmstudio/MMJ_.jar;../../3rdpartypublic/classext/bsh-2.0b4.jar;./src -Dclojure.compile.path=classes clojure.lang.Compile org.micromanager.acq-engine
"%JAVA_HOME%\bin\jar" cf MMAcqEngine.jar -C classes\ .
copy /Y MMAcqEngine.jar ..\bin_Win32\
copy /Y MMAcqEngine.jar ..\bin_x64\
copy /Y MMAcqEngine.jar ..\Install_Win32\micro-manager\plugins\Micro-Manager"
copy /Y MMAcqEngine.jar ..\Install_x64\micro-manager\plugins\Micro-Manager"
``` |
30b0828f-2bbe-49bc-8ed1-c58f7873518f | {
"language": "Batchfile"
} | ```batchfile
.nuget\nuget.exe pack -Build -Symbols -Properties Configuration=Release -OutputDirectory ..\..\packages Library\Library.csproj
.nuget\nuget.exe pack -Build -Symbols -Properties Configuration=Release -OutputDirectory ..\..\packages Library\Mvc.csproj
```
Fix paths in build script | ```batchfile
.nuget\nuget.exe pack -Build -Symbols -Properties Configuration=Release -OutputDirectory ..\..\packages Library\Library.csproj
.nuget\nuget.exe pack -Build -Symbols -Properties Configuration=Release -OutputDirectory ..\..\packages MVC\Mvc.csproj
``` |
27b56af1-309a-429f-917e-9d8a15339bd7 | {
"language": "Batchfile"
} | ```batchfile
:: Sets up the environment for use with MSVS tools and CMake.
@echo off
setlocal
:: cmd for loops are really hard, so I hardcoded the list of MSVS paths.
set vcvars="%PROGRAMFILES%\Microsoft Visual Studio 11.0\VC\bin\vcvars32.bat"
if exist %vcvars% goto found_vcvars
set vcvars="%PROGRAMFILES%\Microsoft Visual Studio 10.0\VC\bin\vcvars32.bat"
if exist %vcvars% goto found_vcvars
:: VS 2008 vcvars isn't standalone, it needs this env var.
set VS90COMNTOOLS=%PROGRAMFILES%\Microsoft Visual Studio 9.0\Common7\Tools\
set vcvars="%PROGRAMFILES%\Microsoft Visual Studio 9.0\VC\bin\vcvars32.bat"
if exist %vcvars% goto found_vcvars
:found_vcvars
call %vcvars%
:: Add the normal CMake install path.
set PATH=%PROGRAMFILES%\CMake 2.8\bin;%PATH%
echo Final PATH:
echo %PATH%
%*
```
Add 7z.exe to PATH for drmemory build environment | ```batchfile
:: Sets up the environment for use with MSVS tools and CMake.
@echo off
setlocal
:: cmd for loops are really hard, so I hardcoded the list of MSVS paths.
set vcvars="%PROGRAMFILES%\Microsoft Visual Studio 11.0\VC\bin\vcvars32.bat"
if exist %vcvars% goto found_vcvars
set vcvars="%PROGRAMFILES%\Microsoft Visual Studio 10.0\VC\bin\vcvars32.bat"
if exist %vcvars% goto found_vcvars
:: VS 2008 vcvars isn't standalone, it needs this env var.
set VS90COMNTOOLS=%PROGRAMFILES%\Microsoft Visual Studio 9.0\Common7\Tools\
set vcvars="%PROGRAMFILES%\Microsoft Visual Studio 9.0\VC\bin\vcvars32.bat"
if exist %vcvars% goto found_vcvars
:found_vcvars
call %vcvars%
:: Add the normal CMake install path.
set PATH=%PROGRAMFILES%\CMake 2.8\bin;%PATH%
:: Add 7z.exe to PATH.
set PATH=%PROGRAMFILES%\7-Zip;%PATH%
echo Final PATH:
echo %PATH%
%*
``` |
58d0396f-b20a-486d-904f-0140c0f7e9a2 | {
"language": "Batchfile"
} | ```batchfile
set projectPath=%~dp0
if %projectPath:~-1%==\ set projectPath=%projectPath:~0,-1%
set releasePath=%projectPath%\.release
mkdir "%releasePath%"
for /f "tokens=*" %%a in ('type version.txt') do set version=%%a
del "%releasePath%\shareical_%version%.zip"
"build_tools\7za.exe" a -tzip -r "%releasePath%\shareical_%version%.zip" "%projectPath%\*.*" -xr!.* -xr!build_tools -xr!build.bat -xr!composer.json -xr!composer.lock -xr!composer.phar -xr!shareical.phpproj -xr!shareical.phpproj.user -xr!shareical.sln
"build_tools\7za.exe" d -tzip -r "%releasePath%\shareical_%version%.zip" components
```
Fix missing files in release ZIP didn't work, will do this later... | ```batchfile
set projectPath=%~dp0
if %projectPath:~-1%==\ set projectPath=%projectPath:~0,-1%
set releasePath=%projectPath%\.release
mkdir "%releasePath%"
for /f "tokens=*" %%a in ('type version.txt') do set version=%%a
del "%releasePath%\shareical_%version%.zip"
"build_tools\7za.exe" a -tzip -r "%releasePath%\shareical_%version%.zip" "%projectPath%\*.*" -xr!.* -xr!build_tools -xr!build.bat -xr!composer.json -xr!composer.lock -xr!composer.phar -xr!shareical.phpproj -xr!shareical.phpproj.user -xr!shareical.sln
rem "build_tools\7za.exe" d -tzip -r "%releasePath%\shareical_%version%.zip" components
``` |
51ca1989-5848-44bb-9330-58e61ed7926a | {
"language": "Batchfile"
} | ```batchfile
@echo off
set config=%1
if "%config%" == "" (
set config=Release
)
set version=0.1.2.1
if not "%PackageVersion%" == "" (
set version=%PackageVersion%
)
set nuget=
if "%nuget%" == "" (
set nuget=src\.nuget\nuget.exe
)
%WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild src\Nancy.ReSharper.Plugin.sln /t:Rebuild /p:Configuration="%config%" /m /v:M /fl /flp:LogFile=msbuild.log;Verbosity=Normal /nr:false
%nuget% pack "src\.nuget\Nancy.ReSharper.nuspec" -NoPackageAnalysis -verbosity detailed -o . -Version %version% -p Configuration="%config%"```
Mark package as pre-release until 8.1 is released | ```batchfile
@echo off
set config=%1
if "%config%" == "" (
set config=Release
)
set version=0.1.2.2-EAP-20131112
if not "%PackageVersion%" == "" (
set version=%PackageVersion%
)
set nuget=
if "%nuget%" == "" (
set nuget=src\.nuget\nuget.exe
)
%WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild src\Nancy.ReSharper.Plugin.sln /t:Rebuild /p:Configuration="%config%" /m /v:M /fl /flp:LogFile=msbuild.log;Verbosity=Normal /nr:false
%nuget% pack "src\.nuget\Nancy.ReSharper.nuspec" -NoPackageAnalysis -verbosity detailed -o . -Version %version% -p Configuration="%config%"
``` |
57c0aec7-5b1f-4049-95c5-5f6846d24281 | {
"language": "Batchfile"
} | ```batchfile
@REM Copyright (c) Microsoft. All rights reserved.
@REM Licensed under the MIT license. See LICENSE file in the project root for full license information.
setlocal
set build-root=%~dp0..
rem // resolve to fully qualified path
for %%i in ("%build-root%") do set build-root=%%~fi
REM -- C --
cd %build-root%\c\build_all\windows
call build.cmd --run-e2e-tests --build-traceabilitytool %*
if errorlevel 1 goto :eof
cd %build-root%
```
Modify to build WebSockets 32-bit | ```batchfile
@REM Copyright (c) Microsoft. All rights reserved.
@REM Licensed under the MIT license. See LICENSE file in the project root for full license information.
setlocal
set build-root=%~dp0..
rem // resolve to fully qualified path
for %%i in ("%build-root%") do set build-root=%%~fi
REM -- C --
cd %build-root%\c\build_all\windows
call build.cmd --use-websockets --run-e2e-tests --build-traceabilitytool %*
if errorlevel 1 goto :eof
cd %build-root%
``` |
1ea7288c-abcc-41df-b48a-a86e17f3eb7f | {
"language": "Batchfile"
} | ```batchfile
@mkdir _shake 2> nul
@ghc --make Main.hs -rtsopts -with-rtsopts=-I0 -outputdir=_shake -o _shake/build && _shake\build --lint --directory ".." %*
```
Fix paths to source files. | ```batchfile
@mkdir _shake 2> nul
@ghc --make src/Main.hs -isrc -rtsopts -with-rtsopts=-I0 -outputdir=_shake -o _shake/build && _shake\build --lint --directory ".." %*
``` |
8b4c6a76-136e-4700-8e50-c66c835df611 | {
"language": "Batchfile"
} | ```batchfile
Rem This batch file will run the Ring Notepad Application.
Rem Ring Notepad is just a sample about what we can do using Ring in little hours.
Rem Using Ring Notepad we can write and execute Ring programs quickly.
Rem Author : Mahmoud Fayed <[email protected]>
echo off
cls
cd applications
cd rnote
"../../bin/ring.exe" rnote.ring
```
Update start.bar - Using ringw.exe instead of ring.exe to run the Ring Notepad - To hide the console window. | ```batchfile
Rem This batch file will run the Ring Notepad Application.
Rem Ring Notepad is just a sample about what we can do using Ring in little hours.
Rem Using Ring Notepad we can write and execute Ring programs quickly.
Rem Author : Mahmoud Fayed <[email protected]>
echo off
cls
cd applications
cd rnote
start ../../bin/ringw.exe rnote.ring
``` |
50a9b457-efad-45b1-96fa-3d9adced296a | {
"language": "Batchfile"
} | ```batchfile
mkdir bin
ilasm /dll src\PtrUtils.il /out:bin\System.Slice.netmodule
csc /t:library /debug:pdbonly /unsafe /o+ /addmodule:bin\System.Slice.netmodule /out:bin\System.Slice.dll src\*.cs
csc /debug:pdbonly /unsafe /r:bin\System.Slice.dll /out:bin\System.Slice.Test.exe tests\*.cs
```
Use link to create a single dll. | ```batchfile
mkdir bin
ilasm /dll src\PtrUtils.il /out:bin\System.Slice.Core.netmodule
csc /t:module /debug:pdbonly /unsafe /o+ /addmodule:bin\System.Slice.Core.netmodule /out:bin\System.Slice.netmodule src\*.cs
link /dll /out:bin\System.Slice.dll bin\System.Slice.Core.netmodule bin\System.Slice.netmodule
csc /debug:pdbonly /unsafe /r:bin\System.Slice.dll /out:bin\System.Slice.Test.exe tests\*.cs
``` |
a6007440-8ebe-4d09-a797-1d5ae547acf8 | {
"language": "Batchfile"
} | ```batchfile
@echo off
setlocal
pushd "%~dp0"
call :main %*
popd
goto :EOF
:main
set MSBUILDEXE=%SystemRoot%\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe
if not exist "%MSBUILDEXE%" (
echo The .NET Framework 4.0 does not appear to be installed on this
echo machine, which is required to build the solution.
exit /b 1
)
set EnableNuGetPackageRestore=true
for %%s in (src\*.sln) do for %%c in (debug release) do "%MSBUILDEXE%" %%s /p:Configuration=%%c /v:m %*
```
Build script error propagation fix | ```batchfile
@echo off
setlocal
pushd "%~dp0"
call :main %*
popd
goto :EOF
:main
set MSBUILDEXE=%SystemRoot%\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe
if not exist "%MSBUILDEXE%" (
echo The .NET Framework 4.0 does not appear to be installed on this
echo machine, which is required to build the solution.
exit /b 1
)
set EnableNuGetPackageRestore=true
call :build Debug && call :build Release
goto :EOF
:build
"%MSBUILDEXE%" src\NCrontab.sln /p:Configuration=%1 /v:m %2 %3 %4 %5 %6 %7 %8 %9
goto :EOF
``` |
f8157e3c-0c74-4d85-8fe4-b7a3e5ac2657 | {
"language": "Batchfile"
} | ```batchfile
@echo off
if not exist mercury-x64 mkdir mercury-x64
pushd mercury-x64
set CommonCompilerFlags=-Od -I.. -I..\glfw-3.1.1\include -MTd -fp:fast -fp:except- -Gm- -GR- -EHa- -Oi -W4
set CommonLinkerFlags= -incremental:no -opt:ref user32.lib gdi32.lib winmm.lib glfw3dll.lib opengl32.lib -libpath:..\glfw-x64\src\Release
cl %CommonCompilerFlags% ..\mercury.cpp /link %CommonLinkerFlags%
popd
```
Add trivial warnings to ignore list | ```batchfile
@echo off
if not exist mercury-x64 mkdir mercury-x64
pushd mercury-x64
set CommonCompilerFlags=-nologo -Od -I.. -I..\glfw-3.1.1\include -MTd -fp:fast -fp:except- -Gm- -GR- -EHa- -Oi -W4 -WX -wd4201 -wd4100 -wd4189 -wd4505 -wd4127
set CommonLinkerFlags= -incremental:no -opt:ref user32.lib gdi32.lib winmm.lib glfw3dll.lib opengl32.lib -libpath:..\glfw-x64\src\Release
cl %CommonCompilerFlags% ..\mercury.cpp /link %CommonLinkerFlags%
popd
``` |
bc60f7bd-5881-4225-b27c-e1a89ef51685 | {
"language": "Batchfile"
} | ```batchfile
@ECHO OFF
REM NOTE: This file was auto-generated with `IB.exe prepare` from `IntelliFactory.Build`.
setlocal
set PATH=%PATH%;%ProgramFiles(x86)%\Microsoft SDKs\F#\3.1\Framework\v4.0
set PATH=%PATH%;%ProgramFiles(x86)%\Microsoft SDKs\F#\3.0\Framework\v4.0
set PATH=%PATH%;%ProgramFiles%\Microsoft SDKs\F#\3.1\Framework\v4.0
set PATH=%PATH%;%ProgramFiles%\Microsoft SDKs\F#\3.0\Framework\v4.0
set PATH=%PATH%;tools\NuGet
nuget install IntelliFactory.Build -nocache -pre -ExcludeVersion -o tools\packages
fsi.exe --exec build.fsx %*```
Rename Zafir packages to WebSharper | ```batchfile
@ECHO OFF
REM NOTE: This file was auto-generated with `IB.exe prepare` from `IntelliFactory.Build`.
setlocal
set PATH=%PATH%;%ProgramFiles(x86)%\Microsoft SDKs\F#\3.1\Framework\v4.0
set PATH=%PATH%;%ProgramFiles(x86)%\Microsoft SDKs\F#\3.0\Framework\v4.0
set PATH=%PATH%;%ProgramFiles%\Microsoft SDKs\F#\3.1\Framework\v4.0
set PATH=%PATH%;%ProgramFiles%\Microsoft SDKs\F#\3.0\Framework\v4.0
set PATH=%PATH%;tools\NuGet
nuget install IntelliFactory.Build -nocache -pre -ExcludeVersion -o tools\packages
fsi.exe --exec build.fsx %*
``` |
1d3d6cfd-f2f6-471b-97b9-f09b22b295d9 | {
"language": "Batchfile"
} | ```batchfile
dir
7za x lts\ldc2-1.9.0-windows-x64.7z -o%SRC_DIR%\lts
mkdir build
cd build
cmake -G Ninja ^
-DCMAKE_BUILD_TYPE=Release ^
-DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^
-DCMAKE_PREFIX_PATH=%LIBRARY_PREFIX% ^
-DBUILD_SHARED_LIBS=ON ^
-DD_COMPILER=%SRC_DIR%\lts\ldc2-1.9.0-windows-x64\bin\ldmd2.exe ^
..
ninja install
ldc2 -version
```
Remove build shared libs as it is not supported | ```batchfile
dir
7za x lts\ldc2-1.9.0-windows-x64.7z -o%SRC_DIR%\lts
mkdir build
cd build
cmake -G Ninja ^
-DCMAKE_BUILD_TYPE=Release ^
-DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^
-DCMAKE_PREFIX_PATH=%LIBRARY_PREFIX% ^
-DD_COMPILER=%SRC_DIR%\lts\ldc2-1.9.0-windows-x64\bin\ldmd2.exe ^
..
ninja install
ldc2 -version
``` |
bd406778-75c6-4724-91fc-edc258f07a29 | {
"language": "Batchfile"
} | ```batchfile
@ECHO OFF
REM TeamCity chokes on the COMPONENTSVERSION processing here, it thinks
REM COMPONENTSVERSION is required going into the build step when we would
REM define it in the build step.
SETLOCAL
REM ---------------------------------------------------------------------------
REM Check usage
REM ---------------------------------------------------------------------------
IF "%1" == "" GOTO Usage
SET BUILD_NUMBER=%1
REM ---------------------------------------------------------------------------
REM Build packages
REM ---------------------------------------------------------------------------
SET /P COMPONENTSVERSION=<ver.txt
ECHO COMPONENTSVERSION=%COMPONENTSVERSION%
call build-packages.cmd %COMPONENTSVERSION%.%BUILD_NUMBER%
GOTO :EOF
:Usage
ECHO USAGE: build_packages_teamcity.cmd (build-number)
EXIT 1
GOTO :EOF
ENDLOCAL
```
Debug output for the build | ```batchfile
@ECHO OFF
REM TeamCity chokes on the COMPONENTS_VERSION processing here, it thinks
REM COMPONENTS_VERSION is required going into the build step when we would
REM define it in the build step.
SETLOCAL
REM ---------------------------------------------------------------------------
REM Check usage
REM ---------------------------------------------------------------------------
IF "%1" == "" GOTO Usage
SET BUILD_NUMBER=%1
ECHO BUILD_NUMBER=%BUILD_NUMBER%
REM ---------------------------------------------------------------------------
REM Build packages
REM ---------------------------------------------------------------------------
SET /P COMPONENTS_VERSION=<ver.txt
ECHO COMPONENTS_VERSION=%COMPONENTS_VERSION%
SET BUILD_VERSION=%COMPONENTS_VERSION%.%BUILD_NUMBER%
ECHO BUILD_VERSION=%BUILD_VERSION%
call build-packages.cmd %BUILD_VERSION%
GOTO :EOF
:Usage
ECHO USAGE: build_packages_teamcity.cmd (build-number)
EXIT 1
GOTO :EOF
ENDLOCAL
``` |
b508e31b-02af-4a88-9007-be4c0f3d62f4 | {
"language": "Batchfile"
} | ```batchfile
@echo off
setlocal
set mypath=%~dp0
set PATH=%mypath%\python2.7;%PATH%
set PYTHONPATH=%mypath%\lib
set OQ_SITE_CFG_PATH=%mypath%\openquake.cfg
set OQ_HOST=127.0.0.1
set OQ_PORT=8800
echo Please wait ...
REM Start the DbServer in background but within the same context
start "OpenQuake DB server" /B python.exe -m openquake.server.dbserver
REM Make sure that the dbserver is up and running
call:sleep 5
REM Start the WebUI using django
start "OpenQuake WebUI server" /B python.exe -m openquake.server.manage runserver %OQ_HOST%:%OQ_PORT%
REM Make sure that the dbserver is up and running
call:sleep 2
REM Start the browser
start http://localhost:%OQ_PORT%
endlocal
exit /b 0
:sleep
setlocal
if exist C:\Windows\System32\timeout.exe (
timeout /t %~1 /nobreak > NUL
) else (
REM Windows XP hack
ping 192.0.2.2 -n %~1 -w 1000 > NUL
)
endlocal
```
Use new webui start command on Win and check status before opening the browser | ```batchfile
@echo off
setlocal
set mypath=%~dp0
set PATH=%mypath%\python2.7;%PATH%
set PYTHONPATH=%mypath%\lib
set OQ_SITE_CFG_PATH=%mypath%\openquake.cfg
set OQ_HOST=127.0.0.1
set OQ_PORT=8800
echo Please wait ...
REM Start the WebUI using django
start "OpenQuake WebUI server" /B python.exe -m openquake.commands webui start %OQ_HOST%:%OQ_PORT%
REM Make sure that the dbserver is up and running
call:check_django
REM Start the browser
start http://localhost:%OQ_PORT%
endlocal
exit /b 0
:check_django
setlocal
ping -n 1 %OQ_HOST
if ERRORLEVEL 1
goto check_django
endlocal
:sleep
setlocal
if exist C:\Windows\System32\timeout.exe (
timeout /t %~1 /nobreak > NUL
) else (
REM Windows XP hack
ping 192.0.2.2 -n %~1 -w 1000 > NUL
)
endlocal
``` |
76251d0f-c30e-45ac-b974-8b8aa9cbfcf5 | {
"language": "Batchfile"
} | ```batchfile
@echo off
setlocal enabledelayedexpansion
set directory=%~f1
if [%directory%] == [] set directory=%CD%
if exist %directory%\NUL (
set directory=%directory%
) else (
set directory=%~dp1
)
pushd %directory%
for /f "delims=" %%i in ('git rev-parse --show-toplevel') do set directory=%%i
git rev-parse --show-toplevel 1> nul 2> nul
if %errorlevel% EQU 0 (
start "" "C:\Program Files (x86)\Atlassian\SourceTree\SourceTree.exe" -f %directory%
)
popd
endlocal
```
Replace forward slashes with back slashes | ```batchfile
@echo off
setlocal enabledelayedexpansion
set directory=%~f1
if [%directory%] == [] set directory=%CD%
if exist %directory%\NUL (
set directory=%directory%
) else (
set directory=%~dp1
)
pushd %directory%
for /f "delims=" %%i in ('git rev-parse --show-toplevel') do set directory=%%i
git rev-parse --show-toplevel 1> nul 2> nul
if %errorlevel% EQU 0 (
start "" "C:\Program Files (x86)\Atlassian\SourceTree\SourceTree.exe" -f %directory:/=\%
)
popd
endlocal
``` |
bff2f3af-cb1c-4c40-9e6b-7902650dad3e | {
"language": "Batchfile"
} | ```batchfile
cd ..\src
call msvcbuild.bat static
cd ..\ext\re
call msvcbuild.bat
cd ..\..\ext\tsx
call msvcbuild.bat
cd ..\..\sample
@setlocal
@set SCHEME_H_DIR=..\src
@set MSCOMPILE=cl /nologo /O2 /W3 /c /D_CRT_SECURE_NO_WARNINGS /I%SCHEME_H_DIR%
@set MSLINK=link /nologo
@set EXT_LIBS=..\ext\re\lib\re.lib ..\ext\tsx\lib\tsx.lib
@if not exist bin\ (
mkdir bin
)
%MSCOMPILE% /MT repl.c
%MSLINK% /out:bin\repl.exe repl.obj ..\src\lib\miniscm.lib %EXT_LIBS%
del repl.obj
```
Fix typo in example's bat | ```batchfile
cd ..\src
call msvcbuild.bat static
cd ..\ext\re
call msvcbuild.bat
cd ..\..\ext\tsx
call msvcbuild.bat
cd ..\..\example
@setlocal
@set SCHEME_H_DIR=..\src
@set MSCOMPILE=cl /nologo /O2 /W3 /c /D_CRT_SECURE_NO_WARNINGS /I%SCHEME_H_DIR%
@set MSLINK=link /nologo
@set EXT_LIBS=..\ext\re\lib\re.lib ..\ext\tsx\lib\tsx.lib
@if not exist bin\ (
mkdir bin
)
%MSCOMPILE% /MT repl.c
%MSLINK% /out:bin\repl.exe repl.obj ..\src\lib\miniscm.lib %EXT_LIBS%
del repl.obj
``` |
a085f3db-6202-497c-922b-069b2f667494 | {
"language": "Batchfile"
} | ```batchfile
```
Add script for deploying documentation | ```batchfile
@ECHO OFF
cd ..\picklesdoc.github.com
rmdir Output /s /q
echo D | xcopy ..\pickles\Output Output /e
powershell -Command "(gc index_template.md) -replace 'VERSION_PLACEHOLDER', '%1' | Out-File -encoding ASCII index.md"
cd ..\pickles
``` |
f1c4c6d8-d88e-4280-94c9-3cff9a19e826 | {
"language": "Batchfile"
} | ```batchfile
cd build
md output
copy *.exe output
copy "c:\vcpkg\installed\x64-windows\bin\sqlite3.dll" output
cd output
windeployqt codequery.exe
dir/b/a/s
candle.exe -ext WixUIExtension -ext WixUtilExtension "..\..\windows-install\win64\codequery64.wxs"
light.exe -ext WixUIExtension -ext WixUtilExtension codequery64.wixobj
```
Add Wix to env GHA | ```batchfile
set PATH=%PATH%;"%WIX%\bin"
cd build
md output
copy *.exe output
copy "c:\vcpkg\installed\x64-windows\bin\sqlite3.dll" output
cd output
windeployqt codequery.exe
dir/b/a/s
candle.exe -ext WixUIExtension -ext WixUtilExtension "..\..\windows-install\win64\codequery64.wxs"
light.exe -ext WixUIExtension -ext WixUtilExtension codequery64.wixobj
``` |
91a23d7c-7fd0-413c-920e-1bc47d128cf2 | {
"language": "Batchfile"
} | ```batchfile
@ECHO OFF
ECHO.
ECHO Downloading Libbitcoin Explorer dependencies from NuGet
CALL nuget.exe install ..\vs2013\bitcoin-explorer\packages.config
CALL nuget.exe install ..\vs2013\libbitcoin-explorer\packages.config
CALL nuget.exe install ..\vs2013\libbitcoin-explorer-test\packages.config
ECHO.
CALL buildbase.bat ..\vs2013\libbitcoin-explorer.sln 12
ECHO.
PAUSE```
Update bx path for nuget refresh. | ```batchfile
@ECHO OFF
ECHO.
ECHO Downloading Libbitcoin Explorer dependencies from NuGet
CALL nuget.exe install ..\vs2013\bx\packages.config
CALL nuget.exe install ..\vs2013\libbitcoin-explorer\packages.config
CALL nuget.exe install ..\vs2013\libbitcoin-explorer-test\packages.config
ECHO.
CALL buildbase.bat ..\vs2013\libbitcoin-explorer.sln 12
ECHO.
PAUSE``` |
1318b50c-af02-4212-afb1-287d1a953f71 | {
"language": "Batchfile"
} | ```batchfile
@echo off
"%~dp0\python2.7\Scripts\reprounzip-qt.exe" %*
```
Fix GUI not finding reprounzip on Windows | ```batchfile
@echo off
set PATH=%~dp0;%PATH%
"%~dp0\python2.7\Scripts\reprounzip-qt.exe" %*
``` |
bafee822-83c5-4d26-9546-99ea272f48ce | {
"language": "Batchfile"
} | ```batchfile
echo Current build setup MSVS="%MSVS%" PLATFORM="%PLATFORM%" TARGET="%TARGET%"
if %MSVS% == 2013 call "%ProgramFiles(x86)%\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" %PLATFORM%
if %MSVS% == 2015 call "%ProgramFiles(x86)%\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" %PLATFORM%
if %MSVS% == 2017 call "%ProgramFiles(x86)%\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" %PLATFORM%
if %MSVS% == 2019 call "%ProgramFiles(x86)%\Microsoft Visual Studio\2019\Preview\VC\Auxiliary\Build\vcvarsall.bat" %PLATFORM%
rem check compiler version
cl
set PATH=C:\Qt\Tools\QtCreator\bin;%PATH%
```
Remove VC2013 support from AppVeyor script | ```batchfile
echo Current build setup MSVS="%MSVS%" PLATFORM="%PLATFORM%" TARGET="%TARGET%"
if %MSVS% == 2015 call "%ProgramFiles(x86)%\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" %PLATFORM%
if %MSVS% == 2017 call "%ProgramFiles(x86)%\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" %PLATFORM%
if %MSVS% == 2019 call "%ProgramFiles(x86)%\Microsoft Visual Studio\2019\Preview\VC\Auxiliary\Build\vcvarsall.bat" %PLATFORM%
rem check compiler version
cl
set PATH=C:\Qt\Tools\QtCreator\bin;%PATH%
``` |
dc028878-afde-4d2d-843e-1cf2fe034e2b | {
"language": "Batchfile"
} | ```batchfile
```
Add a script to harvest the java files and create the wxs file | ```batchfile
"%WIX%\bin\heat.exe" dir "..\..\..\..\..\Java" -ag -sfrag -dr "APPLICATIONFOLDER" -cg JavaFilesGroup -var var.JavaPath -out ..\..\..\javaFiles.wxs
powershell -Command "(gc ..\..\..\javaFiles.wxs) -replace '<Component ', '<Component Win64=\"yes\" ' | Out-File ..\..\..\javaFiles.wxs" -encoding UTF8``` |
9f67418c-2e33-4f42-9227-5ee6d718637a | {
"language": "Batchfile"
} | ```batchfile
```
Add script to generate installer | ```batchfile
call mvn package
jpackage --input .\target\ --main-jar mtg-workstation-%1.jar --name mtg-workstation --win-dir-chooser --win-menu --win-shortcut --icon src\main\resources\icon\icon.ico --app-version %1
``` |
b8be28b2-35b0-40fd-8f35-10adb7fccdca | {
"language": "Batchfile"
} | ```batchfile
```
Create batch file for Windows | ```batchfile
@echo off
setlocal
call :Main "%~f0" "%~dp0" "%~dp0.."
goto :eof
:Main
set script_path=%~f1
set script_dir=%~f2
set repo_dir=%~f3
set build_dir=%repo_dir%\_build
if exist "%build_dir%" (
rd /s /q "%build_dir%"
)
mkdir "%build_dir%"
cd /d "%build_dir%"
cmake -G "Visual Studio 14 2015 Win64" ..``` |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.