doc_id
stringlengths
36
36
metadata
dict
input
stringlengths
28
4.3k
output
stringlengths
11
5.45k
951bf712-bfa3-4110-a95d-7b3aaded2b62
{ "language": "Batchfile" }
```batchfile robocopy . ..\..\..\..\..\installer\windows\x64\packages\com.kryvosproject.kryvos\data\ /E robocopy . Kryvos\ /E ``` Append exit 0 for AppVeyor copy script
```batchfile robocopy . ..\..\..\..\..\installer\windows\x64\packages\com.kryvosproject.kryvos\data\ /E robocopy . Kryvos\ /E exit 0 ```
807b0544-9739-478e-9d2e-d244e11dd75c
{ "language": "Batchfile" }
```batchfile set PYTHON=C:\Python27\python.exe set BASE_DIR=[Your email-backup checkout] set OUTPUT_DIR=[Directory to output archive] set EMAIL=[Email address] set PASSWORD=[Password (application specific password for gmail accounts)] set IMAP=[IMAP server address] %python% %BASE_DIR%\ebackup.py -e %EMAIL% -p %PASSWORD% -i %IMAP% -o %OUTPUT_DIR% %python% %BASE_DIR%\ebexporter.py -i %OUTPUT_DIR%\%EMAIL% -o %OUTPUT_DIR%\Archive.mbox``` Archive was being stored in wrong directory.
```batchfile set PYTHON=C:\Python27\python.exe set BASE_DIR=[Your email-backup checkout] set OUTPUT_DIR=[Directory to output archive] set EMAIL=[Email address] set PASSWORD=[Password (application specific password for gmail accounts)] set IMAP=[IMAP server address] %python% %BASE_DIR%\ebackup.py -e %EMAIL% -p %PASSWORD% -i %IMAP% -o %OUTPUT_DIR% %python% %BASE_DIR%\ebexporter.py -i %OUTPUT_DIR%\%EMAIL% -o %OUTPUT_DIR%\%EMAIL%\Archive.mbox```
58b81f36-9352-4db0-9d8c-edbf4bd8e69c
{ "language": "Batchfile" }
```batchfile ``` Remove files that should have been git ignored
```batchfile jar -cvf bundle.jar Z80Processor-2.0.2.pom Z80Processor-2.0.2.pom.asc Z80Processor-2.0.2.jar Z80Processor-2.0.2.jar.asc Z80Processor-2.0.2-javadoc.jar Z80Processor-2.0.2-javadoc.jar.asc Z80Processor-2.0.2-sources.jar Z80Processor-2.0.2-sources.jar.asc```
11fb9d99-9e35-4a17-8456-b4c6f2e79523
{ "language": "Batchfile" }
```batchfile @echo off SET ROOT=%~dp0.. SET NuGetExe=%ROOT%\Tools\NuGet.exe SET SolutionFile=%ROOT%\UnitsNet.sln %NuGetExe% restore %SolutionFile%``` Update references to rename solution file
```batchfile @echo off SET ROOT=%~dp0.. SET NuGetExe=%ROOT%\Tools\NuGet.exe SET SolutionFile=%ROOT%\UnitsNet.2015.sln %NuGetExe% restore %SolutionFile%```
5219d29f-6690-4db3-a28a-93a6f45a5f68
{ "language": "Batchfile" }
```batchfile @echo off <% print environment.collect { entry -> """set ${entry.key}=\"${entry.value}\"""" }.join("\n") %> rem add jruby and rubygem binstubs to PATH set PATH="${additionalJRubyPaths.join(File.pathSeparator)};%PATH%" "${javaExecutable}" ^ <% print jvmArgs.collect { entry -> $/ "${entry}"/$ }.join(" ^\n") %> ^ <% print systemProperties.collect { entry -> $/ "-D${entry}"/$ }.join(" ^\n") %> ^ -cp ^ "${jrubyJar};${classpath.join(';')}" ^ ${mainClassName} ^ %* ``` Fix env var quoting on Windows
```batchfile @echo off <% print environment.collect { entry -> """set \"${entry.key}=${entry.value}\"""" }.join("\n") %> rem add jruby and rubygem binstubs to PATH set "PATH=${additionalJRubyPaths.join(File.pathSeparator)};%PATH%" "${javaExecutable}" ^ <% print jvmArgs.collect { entry -> $/ "${entry}"/$ }.join(" ^\n") %> ^ <% print systemProperties.collect { entry -> $/ "-D${entry}"/$ }.join(" ^\n") %> ^ -cp ^ "${jrubyJar};${classpath.join(';')}" ^ ${mainClassName} ^ %* ```
aced4565-f698-48cc-9db6-6e99f93331b1
{ "language": "Batchfile" }
```batchfile ::http://support.microsoft.com/kb/2570538 ::http://robrelyea.wordpress.com/2007/07/13/may-be-helpful-ngen-exe-executequeueditems/ if "%PROCESSOR_ARCHITECTURE%"=="AMD64" goto 64BIT %windir%\microsoft.net\framework\v4.0.30319\ngen.exe update /force /queue %windir%\microsoft.net\framework\v4.0.30319\ngen.exe executequeueditems exit /b :64BIT %windir%\microsoft.net\framework\v4.0.30319\ngen.exe update /force /queue %windir%\microsoft.net\framework64\v4.0.30319\ngen.exe update /force /queue %windir%\microsoft.net\framework\v4.0.30319\ngen.exe executequeueditems %windir%\microsoft.net\framework64\v4.0.30319\ngen.exe executequeueditems``` Check whether ngen.exe exists and execute only if it exists. Some versions of Windows 7 (e.g. without updates) do not include .NET Framework 4.0 by default.
```batchfile ::http://support.microsoft.com/kb/2570538 ::http://robrelyea.wordpress.com/2007/07/13/may-be-helpful-ngen-exe-executequeueditems/ if "%PROCESSOR_ARCHITECTURE%"=="AMD64" goto 64BIT if exist "%windir%\microsoft.net\framework\v4.0.30319\ngen.exe" ( %windir%\microsoft.net\framework\v4.0.30319\ngen.exe update /force /queue %windir%\microsoft.net\framework\v4.0.30319\ngen.exe executequeueditems ) exit /b :64BIT if exist "%windir%\microsoft.net\framework\v4.0.30319\ngen.exe" ( %windir%\microsoft.net\framework\v4.0.30319\ngen.exe update /force /queue %windir%\microsoft.net\framework64\v4.0.30319\ngen.exe update /force /queue %windir%\microsoft.net\framework\v4.0.30319\ngen.exe executequeueditems %windir%\microsoft.net\framework64\v4.0.30319\ngen.exe executequeueditems ) ```
718428b4-8131-41c9-acc9-344992d4519b
{ "language": "Batchfile" }
```batchfile @ECHO OFF SET CurrentPath=%~dp0 SET ReferenceFolder=%1 SET DifferenceFolder=%2 SET SupportLongFilenames=%3 IF [%3]==[] SET SupportLongFilenames=$False ECHO. PowerShell.exe -NoProfile -ExecutionPolicy ByPass -Command "%CurrentPath%FolderDiff.ps1 %ReferenceFolder% %DifferenceFolder% %SupportLongFilenames% | ForEach { $_.FullName }"``` Make file more readable by shortening lines.
```batchfile @ECHO OFF SET CurrentPath=%~dp0 SET ReferenceFolder=%1 SET DifferenceFolder=%2 SET SupportLongFilenames=%3 IF [%3]==[] SET SupportLongFilenames=$False ECHO. PowerShell.exe ^ -NoProfile ^ -ExecutionPolicy ByPass ^ -Command ^ "%CurrentPath%FolderDiff.ps1 %ReferenceFolder% %DifferenceFolder% %SupportLongFilenames% | ForEach { $_.FullName }" ```
791ef586-41ae-4847-ba79-d225463a0184
{ "language": "Batchfile" }
```batchfile REM mkdir build REM cd build REM Remove dot from PY_VER for use in library name set MY_PY_VER=%PY_VER:.=% REM Configure step cmake -G "%CMAKE_GENERATOR%" ^ -DPYTHON_EXECUTABLE:FILEPATH="%PYTHON%" ^ -DPYTHON_INCLUDE_DIR:PATH="%PREFIX%"/include ^ -DPYTHON_LIBRARY:FILEPATH="%PREFIX%"/libs/python%MY_PY_VER%.lib ^ --config "%CONFIGURATION%" ^ -H"C:\projects\chrono" ^ -DENABLE_MODULE_IRRLICHT=ON ^ -DENABLE_MODULE_FEA=OFF ^ -DENABLE_MODULE_POSTPROCESS=OFF ^ -DENABLE_MODULE_PYTHON=ON ^ -DBUILD_DEMOS=OFF ^ -DBUILD_TESTING=OFF ^ -DCH_IRRLICHTDIR="C:\irrlicht-1.8.2" ^ -DCH_IRRLICHTLIB="C:\irrlicht-1.8.2\lib\Win64-visualStudio\Irrlicht.lib" ^ .. if errorlevel 1 exit 1 REM Build step cmake --build "C:\projects\build" --config "%CONFIGURATION%" if errorlevel 1 exit 1 REM Install step REM ninja install REM if errorlevel 1 exit 1 ``` Change CI build dir in appeyor
```batchfile REM To avoid building in work/ alongside the source. Rather build in work/build/ mkdir build cd build REM Remove dot from PY_VER for use in library name set MY_PY_VER=%PY_VER:.=% REM Configure step cmake -G "%CMAKE_GENERATOR%" ^ -DPYTHON_EXECUTABLE:FILEPATH="%PYTHON%" ^ -DPYTHON_INCLUDE_DIR:PATH="%PREFIX%"/include ^ -DPYTHON_LIBRARY:FILEPATH="%PREFIX%"/libs/python%MY_PY_VER%.lib ^ --config "%CONFIGURATION%" ^ -DENABLE_MODULE_IRRLICHT=ON ^ -DENABLE_MODULE_FEA=OFF ^ -DENABLE_MODULE_POSTPROCESS=OFF ^ -DENABLE_MODULE_PYTHON=ON ^ -DBUILD_DEMOS=OFF ^ -DBUILD_TESTING=OFF ^ -DCH_IRRLICHTDIR="C:\irrlicht-1.8.2" ^ -DCH_IRRLICHTLIB="C:\irrlicht-1.8.2\lib\Win64-visualStudio\Irrlicht.lib" ^ .. if errorlevel 1 exit 1 REM Build step cmake --build . --config "%CONFIGURATION%" if errorlevel 1 exit 1 REM Install step REM ninja install REM if errorlevel 1 exit 1 ```
532ecbd8-a290-4a0f-bbe9-5c48f849de3e
{ "language": "Batchfile" }
```batchfile SET GOPATH=%CD%\cf-release-repo SET GATSPATH=%GOPATH%\src\github.com\cloudfoundry\cf-acceptance-tests SET PATH=C:\Go\bin;%PATH% SET PATH=C:\Program Files\Git\cmd\;%PATH% SET PATH=%CD%\cf-release-repo\bin;%PATH% SET PATH=C:\Program Files\7-Zip;%PATH% SET PATH=C:\Program Files\cURL\bin;%PATH% SET PATH=%CD%;%PATH% SET /p DOMAIN=<%CD%\bosh-lite-lock\name call %CD%\cli\ci\tasks\create-cats-config.bat SET CONFIG=%CD%\config.json go get -v github.com/onsi/ginkgo/ginkgo pushd %CD%\cf-cli-binaries 7z x cf-cli-binaries.tgz 7z x cf-cli-binaries.tar MOVE %CD%\cf-cli_winx64.exe ..\cf.exe dir .. popd go get -v github.com/onsi/ginkgo/ginkgo cd %GATSPATH% ginkgo.exe -r -slowSpecThreshold=120 -skipPackage="logging,services,v3,routing_api,routing,backend_compatibility,ssh" -skip="NO_DEA_SUPPORT|go makes the app reachable via its bound route|SSO|takes effect after a restart, not requiring a push|doesn't die when printing 32MB|exercises basic loggregator|firehose data|Downloads the droplet for the app" -nodes=2 ``` Revert "swap GnuWin32 with 7zip, cuz sourceforge is broke"
```batchfile SET GOPATH=%CD%\cf-release-repo SET GATSPATH=%GOPATH%\src\github.com\cloudfoundry\cf-acceptance-tests SET PATH=C:\Go\bin;%PATH% SET PATH=C:\Program Files\Git\cmd\;%PATH% SET PATH=%CD%\cf-release-repo\bin;%PATH% SET PATH=C:\Program Files\GnuWin32\bin;%PATH% SET PATH=C:\Program Files\cURL\bin;%PATH% SET PATH=%CD%;%PATH% SET /p DOMAIN=<%CD%\bosh-lite-lock\name call %CD%\cli\ci\tasks\create-cats-config.bat SET CONFIG=%CD%\config.json go get -v github.com/onsi/ginkgo/ginkgo pushd %CD%\cf-cli-binaries gzip -d cf-cli-binaries.tgz tar -xvf cf-cli-binaries.tar MOVE %CD%\cf-cli_winx64.exe ..\cf.exe dir .. popd go get -v github.com/onsi/ginkgo/ginkgo cd %GATSPATH% ginkgo.exe -r -slowSpecThreshold=120 -skipPackage="logging,services,v3,routing_api,routing,backend_compatibility,ssh" -skip="NO_DEA_SUPPORT|go makes the app reachable via its bound route|SSO|takes effect after a restart, not requiring a push|doesn't die when printing 32MB|exercises basic loggregator|firehose data|Downloads the droplet for the app" -nodes=2 ```
e6ff5b2c-2208-4afb-acb2-aae02c83e9e1
{ "language": "Batchfile" }
```batchfile ``` Add windows command for populating mongo
```batchfile @echo off where mongoimport /q IF "%ERRORLEVEL%" == "0" ( call mongoimport --host localhost --port 27017 --collection homes --db bibliothek --jsonArray --file ./homes_data.json --verbose ) ELSE ( echo Cannot find `mongoimport` ) ```
c5e0892a-06b8-4017-90ca-044c843d82ee
{ "language": "Batchfile" }
```batchfile :: msbuild must be in path SET PATH=%PATH%;%WINDIR%\Microsoft.NET\Framework64\v4.0.30319 where msbuild if errorLevel 1 ( echo "msbuild was not found on PATH" && exit /b 1 ) git submodule update --init --recursive cd IronFrame call build.bat || exit /b 1 cd .. rmdir /S /Q packages bin\nuget restore || exit /b 1 MSBuild Containerizer\Containerizer.csproj /t:Rebuild /p:Configuration=Release || exit /b 1 MSBuild Containerizer.Tests\Containerizer.Tests.csproj /t:Rebuild /p:Configuration=Release || exit /b 1 packages\nspec.0.9.68\tools\NSpecRunner.exe Containerizer.Tests\bin\Release\Containerizer.Tests.dll || exit /b 1 ``` Build Ironframe in DiegoWindowsMSI on appveyor instead of testing it (currently freezes)
```batchfile :: msbuild must be in path SET PATH=%PATH%;%WINDIR%\Microsoft.NET\Framework64\v4.0.30319 where msbuild if errorLevel 1 ( echo "msbuild was not found on PATH" && exit /b 1 ) git submodule update --init --recursive cd IronFrame call build.bat build || exit /b 1 cd .. rmdir /S /Q packages bin\nuget restore || exit /b 1 MSBuild Containerizer\Containerizer.csproj /t:Rebuild /p:Configuration=Release || exit /b 1 MSBuild Containerizer.Tests\Containerizer.Tests.csproj /t:Rebuild /p:Configuration=Release || exit /b 1 packages\nspec.0.9.68\tools\NSpecRunner.exe Containerizer.Tests\bin\Release\Containerizer.Tests.dll || exit /b 1 ```
3408c5e7-ac65-4091-8469-b5be776a8ae8
{ "language": "Batchfile" }
```batchfile @echo off :: Copyright 2009 Google Inc. All Rights Reserved. :: :: Licensed under the Apache License, Version 2.0 (the "License"); :: you may not use this file except in compliance with the License. :: You may obtain a copy of the License at :: :: http://www.apache.org/licenses/LICENSE-2.0 :: :: Unless required by applicable law or agreed to in writing, software :: distributed under the License is distributed on an "AS IS" BASIS, :: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. :: See the License for the specific language governing permissions and :: limitations under the License. set PYTHON="%~dp0..\third_party\python_26\python.exe" set SCRIPT="%~dp0tests\run_all_tests.py" set INTERNAL_TESTS="%~dp0internal\run_all_tests.bat" %PYTHON% %SCRIPT% %* IF EXIST %INTERNAL_TESTS% ( %INTERNAL_TESTS% %* ) ``` Fix run_all_test script to avoid git-cl variable clashes.
```batchfile @echo off :: Copyright 2009 Google Inc. All Rights Reserved. :: :: Licensed under the Apache License, Version 2.0 (the "License"); :: you may not use this file except in compliance with the License. :: You may obtain a copy of the License at :: :: http://www.apache.org/licenses/LICENSE-2.0 :: :: Unless required by applicable law or agreed to in writing, software :: distributed under the License is distributed on an "AS IS" BASIS, :: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. :: See the License for the specific language governing permissions and :: limitations under the License. set SYZYGY_PYTHON="%~dp0..\third_party\python_26\python.exe" set SYZYGY_SCRIPT="%~dp0tests\run_all_tests.py" set SYZYGY_INTERNAL_TESTS="%~dp0internal\run_all_tests.bat" %SYZYGY_PYTHON% %SYZYGY_SCRIPT% %* IF EXIST %SYZYGY_INTERNAL_TESTS% ( %SYZYGY_INTERNAL_TESTS% %* ) set SYZYGY_PYTHON= set SYZYGY_SCRIPT= set SYZYGY_INTERNAL_TESTS= ```
f4595568-b490-4e08-84bf-98de99e596cc
{ "language": "Batchfile" }
```batchfile @echo off cls echo. echo BEGIN OF DEMO 3: Bach.java pause > nul if exist demo rmdir /q/s demo mkdir demo cd demo mkdir src\demo echo ______ echo Step 1: Declare demo module: src\demo\module-info.java pause > nul ( echo module demo {} )>"src\demo\module-info.java" echo. type src\demo\module-info.java pause > nul echo ______ echo Step 2: NOOP -- no local build file is needed pause > nul echo ______ echo Step 3: Show tree of source files pause > nul echo. tree /f . | findstr /v Volume | findstr /v : pause > nul echo ______ echo Step 4: Build pause > nul @echo on jshell --show-version --execution local https://bit.ly/bach-build @echo off pause > nul echo ______ echo Step 5: Show tree of source and binary files pause > nul echo. tree /f . | findstr /v Volume | findstr /v : pause > nul echo ______ echo Step 6: Describe demo module pause > nul echo. jar --describe-module --file .bach\out\main\modules\demo-0.jar pause > nul cd .. echo. echo END OF DEMO echo. ``` Update arguments used in screenplay demo 3
```batchfile @echo off cls echo. echo BEGIN OF DEMO 3: Bach.java pause > nul if exist demo rmdir /q/s demo mkdir demo cd demo mkdir src\demo echo ______ echo Step 1: Declare demo module: src\demo\module-info.java pause > nul ( echo module demo {} )>"src\demo\module-info.java" echo. type src\demo\module-info.java pause > nul echo ______ echo Step 2: NOOP -- no local build file is needed pause > nul echo ______ echo Step 3: Show tree of source files pause > nul echo. tree /f . | findstr /v Volume | findstr /v : pause > nul echo ______ echo Step 4: Build pause > nul @echo on jshell --show-version https://bit.ly/bach-build @echo off pause > nul echo ______ echo Step 5: Show tree of source and binary files pause > nul echo. tree /f . | findstr /v Volume | findstr /v : pause > nul echo ______ echo Step 6: Describe demo module pause > nul echo. jar --describe-module --file .bach\modules\demo.jar pause > nul cd .. echo. echo END OF DEMO echo. ```
37eb1d98-b7f1-412b-98f6-5331d992b0c4
{ "language": "Batchfile" }
```batchfile @echo off if not exist "C:\Program Files (x86)\gs" powershell -ExecutionPolicy Unrestricted ..\Scripts\AppVeyor\InstallGhostscript.ps1 if %errorlevel% neq 0 exit /b %errorlevel% set LIBDIR=C:\Magick.NET.libs if exist %LIBDIR% goto done echo Downloading .lib files appveyor DownloadFile https://www.dropbox.com/sh/5m3zllq81n4eyhm/AACQFGl4PKi9xnd15EbU5S1Ia?dl=1 echo Extracting .lib files 7z x -o%LIBDIR% AACQFGl4PKi9xnd15EbU5S1Ia if %errorlevel% neq 0 exit /b %errorlevel% dotnet restore ..\..\Tests\Magick.NET.Tests\Magick.NET.Tests.csproj :done``` Revert dotnet restore because it did not fix the AnyCPU build.
```batchfile @echo off if not exist "C:\Program Files (x86)\gs" powershell -ExecutionPolicy Unrestricted ..\Scripts\AppVeyor\InstallGhostscript.ps1 if %errorlevel% neq 0 exit /b %errorlevel% set LIBDIR=C:\Magick.NET.libs if exist %LIBDIR% goto done echo Downloading .lib files appveyor DownloadFile https://www.dropbox.com/sh/5m3zllq81n4eyhm/AACQFGl4PKi9xnd15EbU5S1Ia?dl=1 echo Extracting .lib files 7z x -o%LIBDIR% AACQFGl4PKi9xnd15EbU5S1Ia if %errorlevel% neq 0 exit /b %errorlevel% :done```
2ff07991-85d2-4be4-ad3a-0c0b61019ef9
{ "language": "Batchfile" }
```batchfile rem Tool to assemble Windows builds rem Requirements are 7-zip, py2exe, and FreeExtractor PATH=C:\python27;C:\python26;C:\progra~1\7-zip;C:\progra~2\7-zip;%PATH% rem ****** Clean out the old junk rmdir /q /s dist\*.* del /s /q dist\*.* rem ****** Compile our executable and core zipfile python setup.py py2exe rem ****** Remove extras from core zipfile cd dist 7z d namebench.zip tcl\*.* rmdir /s /q tcl\tcl8.5\tzdata tcl\tk8.5\demos del tcl\tk8.5\images\*.eps rem ****** Final assembly of zipfile copy ..\README.txt . 7z a namebench_for_Windows.zip -r * >nul rem ****** Test assembled zipfile namebench -x -O 8.8.8.8 -q5 -o test.html start test.html cd .. ``` Remove wildcard from del statement
```batchfile rem Tool to assemble Windows builds rem Requirements are 7-zip, py2exe, and FreeExtractor PATH=C:\python27;C:\python26;C:\progra~1\7-zip;C:\progra~2\7-zip;%PATH% rem ****** Clean out the old junk del /s /f /q dist rem ****** Compile our executable and core zipfile python setup.py py2exe rem ****** Remove extras from core zipfile cd dist 7z d namebench.zip tcl\*.* rmdir /s /q tcl\tcl8.5\tzdata tcl\tk8.5\demos del tcl\tk8.5\images\*.eps rem ****** Final assembly of zipfile copy ..\README.txt . 7z a namebench_for_Windows.zip -r * >nul rem ****** Test assembled zipfile namebench -x -O 8.8.8.8 -q5 -o test.html start test.html cd .. ```
760ecc67-5939-4e43-9d61-dbc1c239c113
{ "language": "Batchfile" }
```batchfile cd winbuild if %ARCH% == 32 ( set ARCH_STRING=x86 ) else ( set ARCH_STRING=x64 ) REM This is implicitly using WinSSL. See Makefile.vc for more info. nmake /f Makefile.vc mode=dll VC=%VS_MAJOR:"=% WITH_DEVEL=%LIBRARY_PREFIX% ^ WITH_ZLIB=dll DEBUG=no ENABLE_IDN=no MACHINE=%ARCH_STRING% robocopy ..\builds\libcurl-vc%VS_MAJOR:"=%-%ARCH_STRING%-release-dll-zlib-dll-ipv6-sspi-winssl\ %LIBRARY_PREFIX% *.* /E if %ERRORLEVEL% GEQ 8 exit 1 exit /B ``` Address exit codes on Windows.
```batchfile cd winbuild if %ARCH% == 32 ( set ARCH_STRING=x86 ) else ( set ARCH_STRING=x64 ) REM This is implicitly using WinSSL. See Makefile.vc for more info. nmake /f Makefile.vc mode=dll VC=%VS_MAJOR:"=% WITH_DEVEL=%LIBRARY_PREFIX% ^ WITH_ZLIB=dll DEBUG=no ENABLE_IDN=no MACHINE=%ARCH_STRING% if %ERRORLEVEL% 1 exit 1 robocopy ..\builds\libcurl-vc%VS_MAJOR:"=%-%ARCH_STRING%-release-dll-zlib-dll-ipv6-sspi-winssl\ %LIBRARY_PREFIX% *.* /E if %ERRORLEVEL% GEQ 8 exit 1 exit 0 ```
6939a1d6-0597-4625-8784-4f52324a5ab3
{ "language": "Batchfile" }
```batchfile rem CMake/MinGW workaround - remove sh.exe from PATH where sh set MINGW=C:\Qt\Tools\mingw530_32 set QTDIR=C:\Qt\5.11.0\mingw53_32 set PATH=%PATH:C:\Program Files\Git\usr\bin;=% set CMAKE_PREFIX_PATH=%QTDIR% set PATH=%MINGW%\bin;%PATH%;%QTDIR%\bin :: Qt needs to find the windows platform plugin to run tests set QT_QPA_PLATFORM_PLUGIN_PATH=%QTDIR%\plugins mkdir build cd build cmake -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=../INSTALL .. || goto :error cmake --build . --target install || goto :error ctest -VV || goto :error goto :EOF :error echo Failed with error #%errorlevel%. exit /b %errorlevel% ``` Disable tests in Mingw builds
```batchfile rem CMake/MinGW workaround - remove sh.exe from PATH where sh set MINGW=C:\Qt\Tools\mingw530_32 set QTDIR=C:\Qt\5.11.0\mingw53_32 set PATH=%PATH:C:\Program Files\Git\usr\bin;=% set CMAKE_PREFIX_PATH=%QTDIR% set PATH=%MINGW%\bin;%PATH%;%QTDIR%\bin :: Qt needs to find the windows platform plugin to run tests set QT_QPA_PLATFORM_PLUGIN_PATH=%QTDIR%\plugins mkdir build cd build cmake -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=../INSTALL .. || goto :error cmake --build . --target install || goto :error rem TODO: reenable this rem ctest -VV || goto :error goto :EOF :error echo Failed with error #%errorlevel%. exit /b %errorlevel% ```
24a63c9e-e776-4b1d-8690-f57a2765a5c8
{ "language": "Batchfile" }
```batchfile set SRC_DIR=%cd%\src set DIST_DIR=%SRC_DIR%\dist set BUILD_DIR=%SRC_DIR%\build set OUT_DIR=%SRC_DIR%\bin set MSI_TARGET_DIR=C:\jenkins\build\whid-x64 call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars64.bat" cd cd %SRC_DIR% dir echo on rmdir /S /Q "%DIST_DIR%" mkdir "%DIST_DIR%" mkdir "%BUILD_DIR%" mkdir "%OUT_DIR%" pushd "%BUILD_DIR%" %QTDIR%\bin\qmake.exe ^ -spec win32-msvc ^ "CONFIG += release" ^ "%SRC_DIR%\src.pro" nmake popd ::echo "Copying: %BUILD_DIR%\release\Spectrecoin.exe" "%OUT_DIR%" ::copy "%BUILD_DIR%\release\Spectrecoin.exe" "%OUT_DIR%" ::copy "%SRC_DIR%\qt\res\assets\icons\spectrecoin.ico" "%OUT_DIR%" %QTDIR%\bin\windeployqt "%OUT_DIR%\Spectrecoin.exe" MOVE "%OUT_DIR%" Spectrecoin echo "The prepared package is in: "%SRC_DIR%\Spectrecoin" echo "Everything is OK" ``` Use REN instead of MOVE as the latter has issues with long path
```batchfile set SRC_DIR=%cd%\src set DIST_DIR=%SRC_DIR%\dist set BUILD_DIR=%SRC_DIR%\build set OUT_DIR=%SRC_DIR%\bin set MSI_TARGET_DIR=C:\jenkins\build\whid-x64 call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars64.bat" cd cd %SRC_DIR% dir echo on rmdir /S /Q "%DIST_DIR%" mkdir "%DIST_DIR%" mkdir "%BUILD_DIR%" mkdir "%OUT_DIR%" pushd "%BUILD_DIR%" %QTDIR%\bin\qmake.exe ^ -spec win32-msvc ^ "CONFIG += release" ^ "%SRC_DIR%\src.pro" nmake popd %QTDIR%\bin\windeployqt "%OUT_DIR%\Spectrecoin.exe" ren "%OUT_DIR%" Spectrecoin echo "The prepared package is in: "%SRC_DIR%\Spectrecoin" echo "Everything is OK" ```
3ff3ea27-8d94-4d5e-83b9-3d5c514f6e78
{ "language": "Batchfile" }
```batchfile echo off set platformsFolder=platforms set platformName=Visual set folder=%platformsFolder%\%platformName% if not exist %folder% (mkdir %folder%)``` Create project for visual studio 14
```batchfile rem echo off SET mypath=%~dp0 set platformsFolder=platforms set platformName="Visual Studio 14" set folder=%mypath%\%platformsFolder%\%platformName% if not exist %folder% (mkdir %folder%) cd %platformsFolder% rem call cmake cmake.exe .. -G%platformName% cd %mypath% pause```
5d36d3a0-4522-49e3-b25e-5c1cd9f5f460
{ "language": "Batchfile" }
```batchfile @rem figure out the folder name @set MONETDB=%~dp0 @rem remove the final backslash from the path @set MONETDB=%MONETDB:~0,-1% @rem extend the search path with our EXE and DLL folders @rem we depend on pthreadVCE.dll having been copied to the lib folder @set PATH=%MONETDB%\bin;%MONETDB%\lib;%PATH% @rem start the real server @"%MONETDB%\bin\Mserver.exe" --set "prefix=%MONETDB%" --set "exec_prefix=%MONETDB%" %* ``` Put database and log files in Application Data folder instead of Program Files folder.
```batchfile @echo off rem figure out the folder name set MONETDB=%~dp0 rem remove the final backslash from the path set MONETDB=%MONETDB:~0,-1% rem extend the search path with our EXE and DLL folders rem we depend on pthreadVCE.dll having been copied to the lib folder set PATH=%MONETDB%\bin;%MONETDB%\lib;%PATH% set MONETDBFARM= set SQLLOGDIR= if "%ALLUSERSPROFILE%" == "" goto skip set MONETDBFARM="--dbfarm=%ALLUSERSPROFILE%\Application Data\MonetDB" set SQLLOGDIR=--set "sql_logdir=%ALLUSERSPROFILE%\Application Data\MonetDB\var\MonetDB\log" :skip rem start the real server "%MONETDB%\bin\Mserver.exe" --set "prefix=%MONETDB%" --set "exec_prefix=%MONETDB%" %MONETDBFARM% %SQLLOGDIR% %* ```
2a797638-d2be-4109-a5d5-206217dd9994
{ "language": "Batchfile" }
```batchfile @echo off TITLE Adding task to start KA Lite at system start setlocal for /f "tokens=4-6 delims=[.XP " %%i in ('ver') do set WIN_VERSION="%%i.%%j" rem 5.1 and 5.2 are XP and Server 2003/64-bit XP if %WIN_VERSION% LEQ "5.2" ( echo This feature is unavailable on this version of Windows. pause ) else ( schtasks /create /tn "KALite" /tr "\"%KALITE_SCRIPT_DIR%\kalite.bat\" start" /sc onstart /ru SYSTEM /f )``` Create scheduled task as current user
```batchfile @echo off TITLE Adding task to start KA Lite at system start setlocal for /f "tokens=4-6 delims=[.XP " %%i in ('ver') do set WIN_VERSION="%%i.%%j" rem 5.1 and 5.2 are XP and Server 2003/64-bit XP if %WIN_VERSION% LEQ "5.2" ( echo This feature is unavailable on this version of Windows. pause ) else ( schtasks /create /tn "KALite" /tr "\"%KALITE_SCRIPT_DIR%\kalite.bat\" start" /sc onstart /ru %USERNAME% /f )```
8e646f13-5ab1-4b42-aae2-efdbca9b372d
{ "language": "Batchfile" }
```batchfile set FrameworkVersion=v4.0.30319 set FrameworkDir=%SystemRoot%\Microsoft.NET\Framework "%FrameworkDir%\%FrameworkVersion%\msbuild.exe" CI-build.msbuild exit /B %ERRORLEVEL%``` Make build Windows command line launcher independent from the current working directory
```batchfile SET BASEDIR=%~dp0 set FrameworkVersion=v4.0.30319 set FrameworkDir=%SystemRoot%\Microsoft.NET\Framework "%FrameworkDir%\%FrameworkVersion%\msbuild.exe" "%BASEDIR%CI-build.msbuild" exit /B %ERRORLEVEL%```
9c1b01f3-39f9-49ed-a031-4d42140f10ae
{ "language": "Batchfile" }
```batchfile ``` Add standalone conda module build on Windows.
```batchfile cd "%RECIPE_DIR%\..\..\" || exit 1 "%PYTHON%" setup.py module || exit 1 "%PYTHON%" setup.py module_install || exit 1 if not exist "%RECIPE_DIR%\test" mkdir "%RECIPE_DIR%\test" || exit 1 copy /y python\*.py "%RECIPE_DIR%\test" ```
406da615-1084-42d5-ba98-0d19e88e5f52
{ "language": "Batchfile" }
```batchfile ``` Add bat file to test
```batchfile .\bin\Debug\music_box.exe --init albums.txt .\bin\Debug\music_box.exe --load my-favorite-aor.txt .\bin\Debug\music_box.exe --play ```
5803ca57-cd4b-489d-babc-78c0fc6a1f76
{ "language": "Batchfile" }
```batchfile @echo off setlocal title VSCode Dev pushd %~dp0\.. :: Node modules if not exist node_modules call yarn 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 node build\lib\electron.js if %errorlevel% neq 0 node .\node_modules\gulp\bin\gulp.js electron :: Build if not exist out node .\node_modules\gulp\bin\gulp.js compile :: Configuration set NODE_ENV=development set VSCODE_DEV=1 set VSCODE_CLI=1 set ELECTRON_DEFAULT_ERROR_MODE=1 set ELECTRON_ENABLE_LOGGING=1 set ELECTRON_ENABLE_STACK_DUMPING=1 :: Launch Code :: Use the following to get v8 tracing: :: %CODE% --js-flags="--trace-hydrogen --trace-phase=Z --trace-deopt --code-comments --hydrogen-track-positions --redirect-code-traces" . %* %CODE% . %* popd endlocal ``` Install builtInExtensions on windows too
```batchfile @echo off setlocal title VSCode Dev pushd %~dp0\.. :: Node modules if not exist node_modules call yarn 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 node build\lib\electron.js if %errorlevel% neq 0 node .\node_modules\gulp\bin\gulp.js electron :: Get built-in extensions node build\lib\builtInExtensions.js || .\node_modules\.bin\gulp builtInExtensions :: Build if not exist out node .\node_modules\gulp\bin\gulp.js compile :: Configuration set NODE_ENV=development set VSCODE_DEV=1 set VSCODE_CLI=1 set ELECTRON_DEFAULT_ERROR_MODE=1 set ELECTRON_ENABLE_LOGGING=1 set ELECTRON_ENABLE_STACK_DUMPING=1 :: Launch Code :: Use the following to get v8 tracing: :: %CODE% --js-flags="--trace-hydrogen --trace-phase=Z --trace-deopt --code-comments --hydrogen-track-positions --redirect-code-traces" . %* %CODE% . %* popd endlocal ```
3f8a66d6-b642-404a-81f1-6a76bd9b44b0
{ "language": "Batchfile" }
```batchfile @echo off setlocal EnableDelayedExpansion set registryRoot=HKCU\Software\Classes set key=grepWin... reg add "%registryRoot%\*\shell\%key%" /v LegacyDisable /t REG_SZ /f reg add "%registryRoot%\Directory\background\shell\%key%" /v LegacyDisable /t REG_SZ /f reg add "%registryRoot%\Directory\shell\%key%" /v LegacyDisable /t REG_SZ /f reg add "%registryRoot%\Drive\shell\%key%" /v LegacyDisable /t REG_SZ /f reg add "%registryRoot%\Folder\shell\%key%" /v LegacyDisable /t REG_SZ /f ``` Add another key for grepWin to deactivate
```batchfile @echo off setlocal EnableDelayedExpansion set registryRoot=HKCU\Software\Classes set key=grepWin... reg add "%registryRoot%\*\shell\%key%" /v LegacyDisable /t REG_SZ /f reg add "%registryRoot%\Directory\background\shell\%key%" /v LegacyDisable /t REG_SZ /f reg add "%registryRoot%\Directory\shell\%key%" /v LegacyDisable /t REG_SZ /f reg add "%registryRoot%\Drive\shell\%key%" /v LegacyDisable /t REG_SZ /f reg add "%registryRoot%\Folder\shell\%key%" /v LegacyDisable /t REG_SZ /f set key=grepWin reg add "%registryRoot%\*\shell\%key%" /v LegacyDisable /t REG_SZ /f reg add "%registryRoot%\Directory\background\shell\%key%" /v LegacyDisable /t REG_SZ /f reg add "%registryRoot%\Directory\shell\%key%" /v LegacyDisable /t REG_SZ /f reg add "%registryRoot%\Drive\shell\%key%" /v LegacyDisable /t REG_SZ /f reg add "%registryRoot%\Folder\shell\%key%" /v LegacyDisable /t REG_SZ /f ```
4373ebdc-18f4-48e2-9106-aa43d5943d1a
{ "language": "Batchfile" }
```batchfile @echo off setlocal EnableDelayedExpansion SET username=%1 SET apikey=%2 SET modules="MediaPlayer" "MediaPlayer-DASH" "MediaPlayer-GLES" "MediaPlayer-GLES-FlowAbs" "MediaPlayer-GLES-QrMarker" FOR %%m in (%modules%) DO ( gradlew %%~m:clean %%~m:build %%~m:bintrayUpload -PbintrayUser=%username% -PbintrayKey=%apikey% -PdryRun=false ) ``` Add explanation to upload script
```batchfile @echo off setlocal EnableDelayedExpansion REM Uploading all modules at once (with one gradle command) does not work any more, so a separate command for each module must be issued SET username=%1 SET apikey=%2 SET modules="MediaPlayer" "MediaPlayer-DASH" "MediaPlayer-GLES" "MediaPlayer-GLES-FlowAbs" "MediaPlayer-GLES-QrMarker" FOR %%m in (%modules%) DO ( gradlew %%~m:clean %%~m:build %%~m:bintrayUpload -PbintrayUser=%username% -PbintrayKey=%apikey% -PdryRun=false ) ```
002df968-d600-4de5-92ef-c596053d32aa
{ "language": "Batchfile" }
```batchfile for /d %%d in (*) do ( xcopy /y /s %%d\deploy\* ..\checksystem\src\deploy\site\download\ ) xcopy /y /s ..\checksystem\download\* ..\checksystem\src\deploy\site\download\``` Add zipping to tasks deploy process
```batchfile echo "Zipping backup.zip..." pushd ..\checksystem\download\1b1baa8dbc68603a %~dp0tools\zip backup.zip *.txt popd echo "Copying to site..." for /d %%d in (*) do ( xcopy /y /s %%d\deploy\* ..\checksystem\src\deploy\site\download\ ) xcopy /y /s ..\checksystem\download\* ..\checksystem\src\deploy\site\download\ ```
920ca459-f41a-4836-9ba6-685381517d62
{ "language": "Batchfile" }
```batchfile SETLOCAL SET Version=2.0.1 SET Prerelease=auto CALL Tools\Build\FindVisualStudio.bat || GOTO Error0 REM Updating the build version. PowerShell -ExecutionPolicy ByPass .\ChangeVersion.ps1 %Version% %Prerelease% || GOTO Error0 WHERE /Q NuGet.exe || ECHO ERROR: Please download the NuGet.exe command line tool. && GOTO Error0 NuGet restore -NonInteractive || GOTO Error0 MSBuild /target:rebuild /p:Configuration=Debug /verbosity:minimal /fileLogger || GOTO Error0 IF NOT EXIST Install md Install NuGet pack -OutputDirectory Install || GOTO Error0 REM Updating the build version back to "dev" (internal development build), to avoid spamming git history with timestamped prerelease versions. PowerShell -ExecutionPolicy ByPass .\ChangeVersion.ps1 %Version% dev || GOTO Error0 @REM ================================================ @ECHO. @ECHO %~nx0 SUCCESSFULLY COMPLETED. @EXIT /B 0 :Error0 @ECHO. @ECHO %~nx0 FAILED. @IF /I [%1] NEQ [/NOPAUSE] @PAUSE @EXIT /B 1 ``` Revert ChangeVersion on error in build script
```batchfile SETLOCAL SET Version=2.0.1 SET Prerelease=auto CALL Tools\Build\FindVisualStudio.bat || GOTO Error0 REM Updating the build version. PowerShell -ExecutionPolicy ByPass .\ChangeVersion.ps1 %Version% %Prerelease% || GOTO Error0 WHERE /Q NuGet.exe || ECHO ERROR: Please download the NuGet.exe command line tool. && GOTO Error0 NuGet restore -NonInteractive || GOTO Error0 MSBuild /target:rebuild /p:Configuration=Debug /verbosity:minimal /fileLogger || GOTO Error0 IF NOT EXIST Install md Install NuGet pack -OutputDirectory Install || GOTO Error0 REM Updating the build version back to "dev" (internal development build), to avoid spamming git history with timestamped prerelease versions. PowerShell -ExecutionPolicy ByPass .\ChangeVersion.ps1 %Version% dev || GOTO Error0 @REM ================================================ @ECHO. @ECHO %~nx0 SUCCESSFULLY COMPLETED. @EXIT /B 0 :Error0 @PowerShell -ExecutionPolicy ByPass .\ChangeVersion.ps1 %Version% dev >nul @ECHO. @ECHO %~nx0 FAILED. @IF /I [%1] NEQ [/NOPAUSE] @PAUSE @EXIT /B 1 ```
7fc0a838-709b-4649-bef6-fd72bac3d7be
{ "language": "Batchfile" }
```batchfile ECHO OFF SET PATH=%PATH%;%PROJECT_HOME%\misc\env\user\win32\scripts REM SET PATH=%PATH%;C:\Dev\vagrant\bin ECHO User Environment Setup. ``` Add cygwin to env path for windows dev
```batchfile ECHO OFF SET PATH=%PATH%;%PROJECT_HOME%\misc\env\user\win32\scripts REM SET PATH=%PATH%;C:\Dev\vagrant\bin SET PATH=%PATH%;C:\cygwin64\bin ECHO User Environment Setup. ```
f21c9357-4a0e-45b2-9c85-6195fd53a188
{ "language": "Batchfile" }
```batchfile @echo off set fdir="%ProgramFiles%\MSBuild\14.0\Bin" if not exist %fdir% ( set fdir="%ProgramFiles(x86)%\MSBuild\14.0\Bin" ) set msbuild=%fdir%\msbuild.exe FOR /F "tokens=*" %%G IN ('DIR /B /AD /S obj') DO RMDIR /S /Q "%%G" %msbuild% WebSocket4Net.UWP.sln /p:Configuration=Debug /t:Clean;Rebuild /p:OutputPath=..\bin\UWP\Debug FOR /F "tokens=*" %%G IN ('DIR /B /AD /S obj') DO RMDIR /S /Q "%%G" %msbuild% WebSocket4Net.UWP.sln /p:Configuration=Release /t:Clean;Rebuild /p:OutputPath=..\bin\UWP\Release pause``` Build script fixes for UWP.
```batchfile @echo off set fdir="%ProgramFiles%\MSBuild\14.0\Bin" if not exist %fdir% ( set fdir="%ProgramFiles(x86)%\MSBuild\14.0\Bin" ) set msbuild=%fdir%\msbuild.exe set outDir=bin\UWP\Debug FOR /F "tokens=*" %%G IN ('DIR /B /AD /S obj') DO RMDIR /S /Q "%%G" %msbuild% WebSocket4Net.UWP.sln /p:Configuration=Debug /t:Clean;Rebuild /p:OutDir=..\%outDir% set outDir=%outDir%\WebSocket4Net.UWP del %outDir%\*.pdb del %outDir%\*.pri set outDir=bin\UWP\Release FOR /F "tokens=*" %%G IN ('DIR /B /AD /S obj') DO RMDIR /S /Q "%%G" %msbuild% WebSocket4Net.UWP.sln /p:Configuration=Release /t:Clean;Rebuild /p:OutDir=..\%outDir% set outDir=%outDir%\WebSocket4Net.UWP del %outDir%\*.pdb del %outDir%\*.pri pause```
d042ddcc-1ad0-411d-a041-8085b09de76e
{ "language": "Batchfile" }
```batchfile @echo off set TOOLSDIR=C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\Tools if exist "%TOOLSDIR%" goto found set TOOLSDIR=C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\Tools if exist "%TOOLSDIR%" goto found set TOOLSDIR=C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\Tools if exist "%TOOLSDIR%" goto found goto notfound :found call "%TOOLSDIR%\VsDevCmd.bat" goto end :notfound echo "Unable to find Visual Studio folder." pause :end``` Add support for the Preview version of Visual Studio.
```batchfile @echo off set TOOLSDIR=C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\Tools if exist "%TOOLSDIR%" goto found set TOOLSDIR=C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\Tools if exist "%TOOLSDIR%" goto found set TOOLSDIR=C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\Tools if exist "%TOOLSDIR%" goto found set TOOLSDIR=C:\Program Files (x86)\Microsoft Visual Studio\Preview\Community\Common7\Tools if exist "%TOOLSDIR%" goto found set TOOLSDIR=C:\Program Files (x86)\Microsoft Visual Studio\Preview\Professional\Common7\Tools if exist "%TOOLSDIR%" goto found set TOOLSDIR=C:\Program Files (x86)\Microsoft Visual Studio\Preview\Enterprise\Common7\Tools if exist "%TOOLSDIR%" goto found goto notfound :found call "%TOOLSDIR%\VsDevCmd.bat" goto end :notfound echo "Unable to find Visual Studio folder." pause :end```
8bc6407c-761b-4f26-a0e9-101f6633b05d
{ "language": "Batchfile" }
```batchfile @python -m shcol %* ``` Add copyright note and description to Windows-specific starter.
```batchfile :: Copyright (c) 2013-2015, Sebastian Linke :: Released under the Simplified BSD license :: (see LICENSE file for details). :: A starter to invoke `shcol` from the Windows command-line. @python -m shcol %* ```
e6a0657f-d416-45e7-ada3-8e8ca55f0f88
{ "language": "Batchfile" }
```batchfile @echo off :: change directory to etherpad-lite root cd /D "%~dp0\.." echo Checking node version... set check_version="if(['6','8'].indexOf(process.version.split('.')[1].toString()) === -1) { console.log('You are running a wrong version of Node. Etherpad Lite requires v0.6.x or v0.8.x'); process.exit(1) }" cmd /C node -e %check_version% || exit /B 1 echo _ echo Installing etherpad-lite and dependencies... cmd /C npm install src/ || exit /B 1 echo _ echo Copying custom templates... set custom_dir=node_modules\ep_etherpad-lite\static\custom FOR %%f IN (index pad timeslider) DO ( if NOT EXIST "%custom_dir%\%%f.js" copy "%custom_dir%\js.template" "%custom_dir%\%%f.js" if NOT EXIST "%custom_dir%\%%f.css" copy "%custom_dir%\css.template" "%custom_dir%\%%f.css" ) echo _ echo Clearing cache... del /S var\minified* echo _ echo Setting up settings.json... IF NOT EXIST settings.json ( echo Can't find settings.json. echo Copying settings.json.template... cmd /C copy settings.json.template settings.json || exit /B 1 ) echo _ echo Installed Etherpad-lite!``` Exit on install if node is not installed.
```batchfile @echo off :: change directory to etherpad-lite root cd /D "%~dp0\.." :: Is node installed? cmd /C node -e "" || ( echo "Please install node.js ( http://nodejs.org )" && exit /B 1 ) echo _ echo Checking node version... set check_version="if(['6','8'].indexOf(process.version.split('.')[1].toString()) === -1) { console.log('You are running a wrong version of Node. Etherpad Lite requires v0.6.x or v0.8.x'); process.exit(1) }" cmd /C node -e %check_version% || exit /B 1 echo _ echo Installing etherpad-lite and dependencies... cmd /C npm install src/ || exit /B 1 echo _ echo Copying custom templates... set custom_dir=node_modules\ep_etherpad-lite\static\custom FOR %%f IN (index pad timeslider) DO ( if NOT EXIST "%custom_dir%\%%f.js" copy "%custom_dir%\js.template" "%custom_dir%\%%f.js" if NOT EXIST "%custom_dir%\%%f.css" copy "%custom_dir%\css.template" "%custom_dir%\%%f.css" ) echo _ echo Clearing cache... del /S var\minified* echo _ echo Setting up settings.json... IF NOT EXIST settings.json ( echo Can't find settings.json. echo Copying settings.json.template... cmd /C copy settings.json.template settings.json || exit /B 1 ) echo _ echo Installed Etherpad-lite!```
deb167d1-c1dd-4c1e-ad1c-622b46c1c036
{ "language": "Batchfile" }
```batchfile @echo off cls :start echo Starting server... "Nomad Server\NomadServer.exe" -name "My Oxide Server" -port 5127 -slots 30 -clientVersion "0.57" -password "" -tcpLobby "149.202.51.185" 25565 @echo. @echo Restarting server... @echo. goto start ``` Update example .bat with latest client version
```batchfile @echo off cls :start echo Starting server... "Nomad Server\NomadServer.exe" -name "My Oxide Server" -port 5127 -slots 30 -clientVersion "0.581" -password "" -tcpLobby "149.202.51.185" 25565 @echo. @echo Restarting server... @echo. goto start ```
4edbdee4-248e-4482-aa27-4dc0fdf5292c
{ "language": "Batchfile" }
```batchfile @echo off chcp 65001>nul prompt [%USERNAME%@%COMPUTERNAME% $p]$_$$$s rem Fake a UNIX environment doskey clear=cls doskey ls=dir /d $* doskey cp=copy $* doskey mv=move $* doskey rm=del $* doskey cat=type $* doskey touch=type nul>>$* rem Easier navigation doskey cd=cd /D $* doskey cd..=cd .. doskey ..=cd .. doskey ...=cd ../.. doskey ....=cd ../../.. rem List files properly doskey l=dir /b $* doskey ll=dir /b $* rem Edit functionality IF NOT EXIST "C:\Program Files\Sublime Text 3" GOTO NOSUBLIME doskey edit="C:\Program Files\Sublime Text 3\sublime_text" $* :NOSUBLIME rem Open functionality doskey open=start $* @echo on ``` Use $G instead of > for doskey
```batchfile @echo off chcp 65001>nul prompt [%USERNAME%@%COMPUTERNAME% $p]$_$$$s rem Fake a UNIX environment doskey clear=cls doskey ls=dir /d $* doskey cp=copy $* doskey mv=move $* doskey rm=del $* doskey cat=type $* doskey touch=type nul$G$G$* rem Easier navigation doskey cd=cd /D $* doskey cd..=cd .. doskey ..=cd .. doskey ...=cd ../.. doskey ....=cd ../../.. rem List files properly doskey l=dir /b $* doskey ll=dir /b $* rem Edit functionality IF NOT EXIST "C:\Program Files\Sublime Text 3" GOTO NOSUBLIME doskey edit="C:\Program Files\Sublime Text 3\sublime_text" $* :NOSUBLIME rem Open functionality doskey open=start $* @echo on ```
78b0f497-de1b-4ef3-a49f-f1f14c7f4d4d
{ "language": "Batchfile" }
```batchfile mkdir build cd build REM Configure step cmake .. ^ -GNinja ^ -DCMAKE_BUILD_TYPE=Release ^ -DCMAKE_PREFIX_PATH=%LIBRARY_PREFIX% ^ -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ -DCMAKE_EXE_LINKER_FLAGS="/FORCE:MULTIPLE" REM Note: /FORCE:MULTIPLE is needed because of a bug in MSVC 14.1 REM in dealing with inline definitions of static REM data members (Plot::m_counter and Figure::m_counter) if errorlevel 1 exit 1 REM Build step ninja install if errorlevel 1 exit 1 REM Test step tests\Release\sciplot-cpptests.exe if errorlevel 1 exit 1 ``` Add note about test in windows
```batchfile mkdir build cd build REM Configure step cmake .. ^ -GNinja ^ -DCMAKE_BUILD_TYPE=Release ^ -DCMAKE_PREFIX_PATH=%LIBRARY_PREFIX% ^ -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ -DCMAKE_EXE_LINKER_FLAGS="/FORCE:MULTIPLE" REM Note: /FORCE:MULTIPLE is needed because of a bug in MSVC 14.1 REM in dealing with inline definitions of static REM data members (Plot::m_counter and Figure::m_counter) if errorlevel 1 exit 1 REM Build step ninja install if errorlevel 1 exit 1 REM Due to /FORCE:MULTIPLE, the executable for the test does not work. REM Solution is to use a newer version of MSVC (e.g., 14.2 instead of 14.1) REM Test step REM tests\Release\sciplot-cpptests.exe if errorlevel 1 exit 1 ```
5d37d936-b31f-4203-bfea-ae5466c71d82
{ "language": "Batchfile" }
```batchfile @rem Makes a build directory of the viewer, so that you can run the NSIS install script @rem You should have a directory ..\viewerbuilddlls which has release versions of @rem all dependency dlls, including Qt core/ui/network/webkit/phonon dll's, and also VS2008 @rem redistributable (vcredist_x86.exe) @echo off rmdir build /S /Q md build copy readme.txt build xcopy bin\*.* build /S /C del build\data\configuration\*.xml rmdir build\testing /S /Q del build\*.dll del build\viewerd.exe del build\modules\core\*d.dll xcopy ..\viewerbuilddlls\*.* build /S /C del build\pymodules\*.pyc del build\pymodules\apitest\*.pyc del build\pymodules\circuits\*.pyc del build\pymodules\communication\*.pyc del build\pymodules\core\*.pyc del build\pymodules\usr\*.pyc ``` Delete .pyc files when making build. Make sure that data/configuration directory exists in the build.
```batchfile @rem Makes a build directory of the viewer, so that you can run the NSIS install script @rem You should have a directory ..\viewerbuilddlls which has release versions of @rem all dependency dlls, and also VS2008 redistributable (vcredist_x86.exe) @echo off rmdir build /S /Q md build copy readme.txt build xcopy bin\*.* build /S /C /Y del build\*.dll del build\viewerd.exe del build\modules\core\*d.dll xcopy ..\viewerbuilddlls\*.* build /S /C /Y del build\pymodules\*.pyc del build\pymodules\apitest\*.pyc del build\pymodules\circuits\*.pyc del build\pymodules\circuits\core\*.pyc del build\pymodules\circuits\net\*.pyc del build\pymodules\circuits\tools\*.pyc del build\pymodules\circuits\web\*.pyc del build\pymodules\core\*.pyc del build\pymodules\editgui\*.pyc del build\pymodules\lib\*.pyc del build\pymodules\lib\webdav\*.pyc del build\pymodules\lib\webdav\acp\*.pyc del build\pymodules\usr\*.pyc del build\pymodules\webdavinventory\*.pyc del build\pymodules\webserver\*.pyc cd build\data rmdir configuration /S /Q mkdir configuration cd ..\.. ```
bd5232de-7b44-470a-86bf-30dcf084f5e3
{ "language": "Batchfile" }
```batchfile cd bin :: ### Clone MNE-CPP test data ### call git clone https://github.com/mne-tools/mne-cpp-test-data.git mne-cpp-test-data cd .. ``` Check if Appveyor fails when test fails
```batchfile cd bin :: ### Clone MNE-CPP test data ### :: call git clone https://github.com/mne-tools/mne-cpp-test-data.git mne-cpp-test-data cd .. ```
cf125823-94b7-43a6-8d7d-cc785ecca3ac
{ "language": "Batchfile" }
```batchfile copy mpi.f.single mpi.f copy mpif.h.single mpif.h gfortran -g -w -O -Wall -o genesis2 main.f check.f diagno.f esource.f field.f incoherent.f math.f partsim.f pushp.f loadbeam.f loadrad.f magfield.f tdepend.f track.f string.f rpos.f scan.f source.f stepz.f timerec.f initrun.f input.f output.f mpi.f copy genesis2 %LIBRARY_PREFIX% ``` Add dir after gfortran command to check which files we have there.
```batchfile copy mpi.f.single mpi.f copy mpif.h.single mpif.h gfortran -g -w -O -Wall -o genesis2 main.f check.f diagno.f esource.f field.f incoherent.f math.f partsim.f pushp.f loadbeam.f loadrad.f magfield.f tdepend.f track.f string.f rpos.f scan.f source.f stepz.f timerec.f initrun.f input.f output.f mpi.f echo "DEBUG Info..." dir copy genesis2 %LIBRARY_BIN% ```
8e9ad834-a90b-4124-9120-5202c5ab6eae
{ "language": "Batchfile" }
```batchfile set PWD=%~dp0 start /MIN %PWD%dbserver\bin\openmole-dbserver.bat mkdir "%UserProfile%\.openmole\.tmp" set ran="%UserProfile%\.openmole\.tmp\%random%" java -d64 -version >nul 2>&1 if errorlevel 1 goto is32bit set FLAG="-XX:+UseCompressedOops" :is32bit java -Dosgi.locking=none -Dopenmole.location="%PWD%\" -Dosgi.classloader.singleThreadLoads=true -Dosgi.configuration.area=%ran% -splash:splashscreen.png -XX:MaxPermSize=128M -XX:+UseG1GC -Xmx1G -XX:MaxPermSize=128M %FLAG% -jar %PWD%/plugins/org.eclipse.equinox.launcher.jar -consoleLog -cp %PWD%/openmole-plugins -gp %PWD%/openmole-plugins-gui %* rmdir /s /q %ran% ``` Fix work in path with spaces on windows.
```batchfile set PWD=%~dp0 start /MIN "%PWD%dbserver\bin\openmole-dbserver.bat" mkdir "%UserProfile%\.openmole\.tmp" set ran="%UserProfile%\.openmole\.tmp\%random%" java -d64 -version >nul 2>&1 if errorlevel 1 goto is32bit set FLAG="-XX:+UseCompressedOops" :is32bit java -Dosgi.locking=none -Dopenmole.location="%PWD%\" -Dosgi.classloader.singleThreadLoads=true -Dosgi.configuration.area=%ran% -splash:splashscreen.png -XX:MaxPermSize=128M -XX:+UseG1GC -Xmx1G -XX:MaxPermSize=128M %FLAG% -jar "%PWD%/plugins/org.eclipse.equinox.launcher.jar" -consoleLog -cp "%PWD%/openmole-plugins" -gp "%PWD%/openmole-plugins-gui" %* rmdir /s /q %ran% ```
270096ac-328b-4248-ab8a-b90c67f3ae70
{ "language": "Batchfile" }
```batchfile ``` Add mlcp batch file for ingesting baby name data
```batchfile mlcp.bat IMPORT -host localhost -port 8200 -username admin -password admin -input_file_path .\src\test\resources\Most_Popular_Baby_Names_NYC.csv --input_file_type delimited_text -document_type xml -delimited_root_name baby-name -output_collections baby```
e1ab0a19-0973-43e8-8f41-e9e9f653d018
{ "language": "Batchfile" }
```batchfile ``` Add a post-build batch file to delete unwanted files from the release folders
```batchfile del "bin\x86\Release Dick\*.xml" del "bin\x86\Release Dick\devtools_resources.pak" del "bin\x86\Release Duck\*.xml" del "bin\x86\Release Duck\devtools_resources.pak"```
def37c96-6c60-4730-a299-1a01b4d1e80d
{ "language": "Batchfile" }
```batchfile :: Go to bin directory cd bin :: Clone MNE-CPP test data call git clone https://github.com/mne-tools/mne-cpp-test-data.git mne-cpp-test-data curl https://www.dropbox.com/s/464j97jbaef7q3n/sample-5120-5120-5120-bem-sol.fif?dl=1 -L curl https://www.dropbox.com/s/tkrl3p1kifbzjo1/sample-5120-5120-5120-bem.fif?dl=1 -L :: Go back to mne-cpp root cd .. ``` Add output file name to bem download in win ci
```batchfile :: Go to bin directory cd bin :: Clone MNE-CPP test data call git clone https://github.com/mne-tools/mne-cpp-test-data.git mne-cpp-test-data curl https://www.dropbox.com/s/464j97jbaef7q3n/sample-5120-5120-5120-bem-sol.fif?dl=1 -L -o sample-5120-5120-5120-bem-sol.fif curl https://www.dropbox.com/s/tkrl3p1kifbzjo1/sample-5120-5120-5120-bem.fif?dl=1 -L -o sample-5120-5120-5120-bem.fif :: Go back to mne-cpp root cd .. ```
5c4352a3-cde4-42d0-91e4-d53ceb22092e
{ "language": "Batchfile" }
```batchfile ``` Add the command file to build the VNEXT project
```batchfile CD SimpleIdentityServer\VNEXT\ call powershell -NoProfile -ExecutionPolicy unrestricted -Command "&{iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/aspnet/Home/dev/dnvminstall.ps1'))}" call dnvm upgrade call dnu restore dnu build src\SimpleIdentityServer.Host dnu build src\SimpleIdentityServer.Core dnu build src\SimpleIdentityServer.Core.Jwt dnu build src\SimpleIdentityServer.DataAccess.Fake dnu build src\SimpleIdentityServer.DataAccess.SqlServer dnu build src\SimpleIdentityServer.RateLimitation dnu build src\SimpleIdentityServer.Core.Common dnu build src\SimpleIdentityServer.Common dnu pack src\SimpleIdentityServer.Common -out nuget\ dnu pack src\SimpleIdentityServer.Core.Common -out nuget\ dnu pack src\SimpleIdentityServer.RateLimitation -out nuget\ dnu pack src\SimpleIdentityServer.DataAccess.SqlServer -out nuget\ dnu pack src\SimpleIdentityServer.DataAccess.Fake -out nuget\ dnu pack src\SimpleIdentityServer.Core.Jwt -out nuget\ dnu pack src\SimpleIdentityServer.Core -out nuget\ dnu pack src\SimpleIdentityServer.Host -out nuget\```
f1823334-fe71-4a1f-b7ca-c413b56e0013
{ "language": "Batchfile" }
```batchfile @echo off call :set_sdk_path call :setshortpath PSDK_INC_PATH %__sdk_path__%\Include call :setshortpath PSDK_LIB_PATH %__sdk_path__%\Lib call :clean_sdk_path goto :eof :setshortpath set %1=%~s2 goto :eof :set_sdk_path set __sdk_path__="C:\Program Files\Microsoft SDKs\Windows\v6.0A" if NOT "%SDK_PATH%"=="" set __sdk_path__="%SDK_PATH%" goto :eof :clean_sdk_path set __sdk_path__= goto :eof ``` Add SDK7.0A as one of the possible defaults during the build of coinstaller\CLI for NetKVM driver
```batchfile @echo off call :set_sdk_path call :setshortpath PSDK_INC_PATH %__sdk_path__%\Include call :setshortpath PSDK_LIB_PATH %__sdk_path__%\Lib call :clean_sdk_path goto :eof :setshortpath set %1=%~s2 goto :eof :set_sdk_path set __sdk_path__="C:\Program Files\Microsoft SDKs\Windows\v6.0A" if not exist %__sdk_path__% set __sdk_path__="C:\Program Files\Microsoft SDKs\Windows\v7.0A" if NOT "%SDK_PATH%"=="" set __sdk_path__="%SDK_PATH%" goto :eof :clean_sdk_path set __sdk_path__= goto :eof ```
1a147e77-f531-404c-a486-0b913fe604b9
{ "language": "Batchfile" }
```batchfile set Version=1.0.45 call tools\nuget.exe install JetBrains.runAs -Version %Version% -o win32 copy win32\JetBrains.runAs.%Version%\tools\x64\JetBrains.runAs.exe win32\x64 /Y copy win32\JetBrains.runAs.%Version%\tools\x86\JetBrains.runAs.exe win32\x86 /Y call mvn package call createPlugin.cmd``` Change win 32 tool version to 50
```batchfile set Version=1.0.50 call tools\nuget.exe install JetBrains.runAs -Version %Version% -o win32 copy win32\JetBrains.runAs.%Version%\tools\x64\JetBrains.runAs.exe win32\x64 /Y copy win32\JetBrains.runAs.%Version%\tools\x86\JetBrains.runAs.exe win32\x86 /Y call mvn package call createPlugin.cmd```
00f2f820-7169-4640-9791-9151a76b99f2
{ "language": "Batchfile" }
```batchfile @echo off cls "tools\nuget\nuget.exe" "install" "FAKE" "-OutputDirectory" "tools" "-ExcludeVersion" "tools\nuget\nuget.exe" "install" "FSharp.Formatting.CommandTool" "-OutputDirectory" "tools" "-ExcludeVersion" "-Prerelease" "tools\nuget\nuget.exe" "install" "SourceLink.Fake" "-OutputDirectory" "tools" "-ExcludeVersion" SET TARGET="Default" IF NOT [%1]==[] (set TARGET="%1") "tools\FAKE\tools\Fake.exe" "build.fsx" "target=%TARGET%"``` USe FAKE prerelease for testing
```batchfile @echo off cls "tools\nuget\nuget.exe" "install" "FAKE" "-OutputDirectory" "tools" "-ExcludeVersion" "-Prerelease" "tools\nuget\nuget.exe" "install" "FSharp.Formatting.CommandTool" "-OutputDirectory" "tools" "-ExcludeVersion" "-Prerelease" "tools\nuget\nuget.exe" "install" "SourceLink.Fake" "-OutputDirectory" "tools" "-ExcludeVersion" SET TARGET="Default" IF NOT [%1]==[] (set TARGET="%1") "tools\FAKE\tools\Fake.exe" "build.fsx" "target=%TARGET%"```
18255795-cf5e-41e9-88c4-b77c13c24197
{ "language": "Batchfile" }
```batchfile @echo off setlocal cd "%~dp0" 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 ) if "%1"=="docs" call :docs %2 %3 %4 %5 %6 %7 %8 %9 & goto :EOF :base for %%i in (debug release) do "%MSBUILDEXE%" "MoreLinq.sln" /v:m /p:Configuration=%%i %* goto :EOF :docs call :base && "%MSBUILDEXE%" MoreLinq.shfbproj %* goto :EOF ``` Use MSBuild 14 from MS Build Tools 2015
```batchfile @echo off setlocal cd "%~dp0" if "%PROCESSOR_ARCHITECTURE%"=="x86" set MSBUILD=%ProgramFiles% if defined ProgramFiles(x86) set MSBUILD=%ProgramFiles(x86)% set MSBUILD=%MSBUILD%\MSBuild\14.0\bin\msbuild if not exist "%MSBUILD%" ( echo Microsoft Build Tools 2015 does not appear to be installed on this echo machine, which is required to build the solution. You can install echo it from the URL below and then try building again: echo https://www.microsoft.com/en-us/download/detailscd .aspx?id=48159 exit /b 1 ) if "%1"=="docs" call :docs %2 %3 %4 %5 %6 %7 %8 %9 & goto :EOF :base for %%i in (debug release) do "%MSBUILD%" "MoreLinq.sln" /v:m /p:Configuration=%%i %* goto :EOF :docs call :base && "%MSBUILD%" MoreLinq.shfbproj %* goto :EOF ```
a824b69e-396c-4c6d-9d87-66a33b8a15ae
{ "language": "Batchfile" }
```batchfile rem Set up script for Windows. copy /-Y .vimrc %HOME%\_vimrc copy /-Y .gvimrc %HOME%\_gvimrc ``` Use mklink instead of copy.
```batchfile rem Set up script for Windows. mklink %HOME%\_vimrc %HOME%\vim-dotfiles\.vimrc mklink %HOME%\_gvimrc %HOME%\vim-dotfiles\.gvimrc ```
6fbb347c-5a0b-4a2c-8445-1d91c1db5ed9
{ "language": "Batchfile" }
```batchfile ``` Revert "adding windows setup link to readme"
```batchfile set "MR_APPLICATION_SECRET=lame-ducks-forever" set "MR_DATABASE_URL=jdbc:postgresql://localhost:5432/mp_dev?user=postgres&password=osm" set "MR_OSM_SERVER=http://api06.dev.openstreetmap.org" set "MR_OAUTH_CONSUMER_KEY=8kOhMqcXVAmD3ZoBdjNgcmd93ErztPnIPpc0xjzM" set "MR_OAUTH_CONSUMER_SECRET=bAesEwMMwZO6wMgFMqAudZ12N5caQvAAsx3FbkFc" set "MR_SUPER_KEY=test" set "MR_SUPER_ACCOUNTS=437" activator run```
46ff77b7-4496-4175-9331-7c85e84d18e4
{ "language": "Batchfile" }
```batchfile ECHO ON SETLOCAL SET VERSION=%1 rmdir obj /s /q rmdir Release /s /q msbuild tools\versionupdater\versionupdater.csproj /p:Configuration=Release /p:OutputPath=.. || exit /B 1 tools\versionupdater -v %VERSION% ``` Build versionupdater in bin folder
```batchfile ECHO ON SETLOCAL SET VERSION=%1 rmdir obj /s /q rmdir Release /s /q msbuild tools\versionupdater\versionupdater.csproj /p:Configuration=Release /p:OutputPath=..\bin || exit /B 1 tools\bin\versionupdater -v %VERSION% || exit /B 1```
32720443-33f3-40eb-80bc-9ca45b8001fb
{ "language": "Batchfile" }
```batchfile @set JAVA_OPTS=-Djava.awt.headless=true @set ROOT_DIR=%~dp0 @cd "%ROOT_DIR%" @set CLASS_PATH="%ROOT_DIR%\*;." @java %JAVA_OPTS% -cp %CLASS_PATH% scalive.AgentLoader %ROOT_DIR% %* ``` Use "@echo off" for brevity
```batchfile @echo off set JAVA_OPTS=-Djava.awt.headless=true set ROOT_DIR=%~dp0 cd "%ROOT_DIR%" set CLASS_PATH="%ROOT_DIR%\*;." java %JAVA_OPTS% -cp %CLASS_PATH% scalive.AgentLoader %ROOT_DIR% %* ```
f203f04f-c9a9-4690-97a1-ba968b5491a9
{ "language": "Batchfile" }
```batchfile universe = standard executable = job_ckpt_memory-file_std.cndr.exe.$$(OPSYS).$$(ARCH) output = job_ckpt_memory-file_std.out error = job_ckpt_memory-file_std.err log = job_ckpt_memory-file_std.log priority = 6 arguments = -f x_job_ckpt_memory-file_std.t1 -s 10000 -o 25000 -_condor_aggravate_bugs notification = never queue ``` Increase loop count in std uni test to improve reliabilty
```batchfile universe = standard executable = job_ckpt_memory-file_std.cndr.exe.$$(OPSYS).$$(ARCH) output = job_ckpt_memory-file_std.out error = job_ckpt_memory-file_std.err log = job_ckpt_memory-file_std.log priority = 6 arguments = -f x_job_ckpt_memory-file_std.t1 -s 10000 -o 75000 -_condor_aggravate_bugs notification = never queue ```
96cd48bd-129e-4dff-b77a-e332cde3ae32
{ "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/93edfcb6e9c75d395e805825f5051e707bd50bb8 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 latest KuduScript
```batchfile @echo off setlocal enabledelayedexpansion pushd %1 set attempts=5 set counter=0 :retry set /a counter+=1 echo Attempt %counter% out of %attempts% cmd /c npm install https://github.com/projectkudu/KuduScript/tarball/af63dea4db22bae730dba99d2090c27bedcde159 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 ```
38ec7e76-96dc-4673-8332-39b9c176a14e
{ "language": "Batchfile" }
```batchfile @echo off net session >nul 2>&1 if NOT %errorLevel% == 0 ( echo Failure: Current permissions inadequate. Please run as administrator. pause exit /b 1 ) set /p newpw=Please enter the new password for user 'admin': "%~dp0\urbackup_srv.exe" --cmdline --no-server --plugin urbackupserver.dll --set_admin_pw "%newpw%" exit /b 0``` Fix password reset on Windows
```batchfile @echo off net session >nul 2>&1 if NOT %errorLevel% == 0 ( echo Failure: Current permissions inadequate. Please run as administrator. pause exit /b 1 ) set /p newpw=Please enter the new password for user 'admin': "%~dp0\urbackup_srv.exe" --cmdline --no-server --plugin cryptoplugin.dll --plugin urbackupserver.dll --set_admin_pw "%newpw%" exit /b 0```
c56ea6d4-bca0-4de0-85e1-45c1f91b73c4
{ "language": "Batchfile" }
```batchfile setlocal EnableDelayedExpansion mkdir build cd build cmake -GNinja ^ -DCMAKE_BUILD_TYPE:STRING=Release ^ -DCMAKE_INSTALL_PREFIX:PATH="%LIBRARY_PREFIX%" ^ -DCMAKE_PREFIX_PATH:PATH="%LIBRARY_PREFIX%" ^ -DCONVERT3D_USE_ITK_REMOTE_MODULES:BOOL=OFF ^ .. if errorlevel 1 exit 1 cmake --build . if errorlevel 1 exit 1 ctest --extra-verbose --output-on-failure . if errorlevel 1 exit 1 cmake --install . if errorlevel 1 exit 1 ``` Add missing CFLAGS override for Windows
```batchfile setlocal EnableDelayedExpansion mkdir build cd build set CFLAGS="%CFLAGS% -I %LIBRARY_PREFIX%\include\eigen3" set CXXFLAGS="%CXXFLAGS% -I %LIBRARY_PREFIX%\include\eigen3" cmake -GNinja ^ -DCMAKE_BUILD_TYPE:STRING=Release ^ -DCMAKE_INSTALL_PREFIX:PATH="%LIBRARY_PREFIX%" ^ -DCMAKE_PREFIX_PATH:PATH="%LIBRARY_PREFIX%" ^ -DCONVERT3D_USE_ITK_REMOTE_MODULES:BOOL=OFF ^ .. if errorlevel 1 exit 1 cmake --build . if errorlevel 1 exit 1 ctest --extra-verbose --output-on-failure . if errorlevel 1 exit 1 cmake --install . if errorlevel 1 exit 1 ```
5a47705f-23de-4c08-91b9-051f5fb412d8
{ "language": "Batchfile" }
```batchfile ``` Revert "Moved the script directly to AppVeyor"
```batchfile @echo off echo Downloading CUDA toolkit 8 appveyor DownloadFile https://developer.nvidia.com/compute/cuda/8.0/Prod2/network_installers/cuda_8.0.61_win10_network-exe -FileName setup.exe rem appveyor DownloadFile https://www.dropbox.com/s/ll2ay531hw3i1p7/cuda.zip?dl=1 rem 7z x cuda.zip -ocuda rem cd cuda echo Installing CUDA toolkit 8 setup.exe -s compiler_8.0 ^ cublas_8.0 ^ cublas_dev_8.0 ^ cudart_8.0 ^ curand_8.0 ^ curand_dev_8.0 if NOT EXIST "%ProgramFiles%\NVIDIA GPU Computing Toolkit\CUDA\v8.0\bin\cudart64_80.dll" ( echo "Failed to install CUDA" exit /B 1 ) echo Installing VS integration copy _vs\*.* "c:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\BuildCustomizations" cd .. echo Downloading cuDNN appveyor DownloadFile https://www.dropbox.com/s/9t56hoewk7p0hfj/cudnn-8.0-windows7-x64-v5.1.zip?dl=1 7z x cudnn-8.0-windows7-x64-v5.1.zip -ocudnn copy cudnn\cuda\bin\*.* "%ProgramFiles%\NVIDIA GPU Computing Toolkit\CUDA\v8.0\bin" copy cudnn\cuda\lib\x64\*.* "%ProgramFiles%\NVIDIA GPU Computing Toolkit\CUDA\v8.0\lib\x64" copy cudnn\cuda\include\*.* "%ProgramFiles%\NVIDIA GPU Computing Toolkit\CUDA\v8.0\include" set PATH=%ProgramFiles%\NVIDIA GPU Computing Toolkit\CUDA\v8.0\bin;%ProgramFiles%\NVIDIA GPU Computing Toolkit\CUDA\v8.0\libnvvp;%PATH% set CUDA_PATH=%ProgramFiles%\NVIDIA GPU Computing Toolkit\CUDA\v8.0 set CUDA_PATH_V8_0=%ProgramFiles%\NVIDIA GPU Computing Toolkit\CUDA\v8.0 nvcc -V rem cd .. rem git clone https://github.com/Microsoft/vcpkg.git vcpkg rem cd vcpkg rem mkdir downloads rem copy nul downloads\AlwaysAllowDownloads rem powershell -exec bypass scripts\bootstrap.ps1 rem vcpkg integrate install rem vcpkg install gtest:x64-windows cd "%APPVEYOR_BUILD_FOLDER%"```
1a942a93-0035-4c17-83a1-0709c11f3be8
{ "language": "Batchfile" }
```batchfile set "PATH=%PATH%;C:\Program Files\CMake\bin" if %1 == -E ( cmake.exe %* ) else ( cmake.exe -G "NMake Makefiles" -DCMAKE_LINK_FLAGS:implib=libluajit.lib -DLUALIB=libluajit %* ) ``` Add setlocal to make sure settings only apply to this session.
```batchfile setlocal set "PATH=%PATH%;C:\Program Files\CMake\bin" if %1 == -E ( cmake.exe %* ) else ( cmake.exe -G "NMake Makefiles" -DCMAKE_LINK_FLAGS:implib=libluajit.lib -DLUALIB=libluajit %* ) ```
3308197f-84ab-4a2b-b039-c09268c2082f
{ "language": "Batchfile" }
```batchfile @echo off SETLOCAL if NOT DEFINED JAVA_HOME goto err set SCRIPT_DIR=%~dp0 for %%I in ("%SCRIPT_DIR%..") do set REDPEN_HOME=%%~dpfI set REDPEN_CLASSPATH=%REDPEN_HOME%/conf;%REDPEN_HOME%/lib/* set JAVA_OPTS=%JAVA_OPTS% "%JAVA_HOME%\bin\java" %JAVA_OPTS% -classpath "%REDPEN_CLASSPATH%" cc.redpen.Main %* goto finally :err echo Error: JAVA_HOME is not defined. Can not start RedPen pause :finally ENDLOCAL ``` Fix character corruption in Windows
```batchfile @echo off SETLOCAL if NOT DEFINED JAVA_HOME goto err set SCRIPT_DIR=%~dp0 for %%I in ("%SCRIPT_DIR%..") do set REDPEN_HOME=%%~dpfI set REDPEN_CLASSPATH=%REDPEN_HOME%/conf;%REDPEN_HOME%/lib/* set JAVA_OPTS=%JAVA_OPTS% -Dfile.encoding=UTF-8 "%JAVA_HOME%\bin\java" %JAVA_OPTS% -classpath "%REDPEN_CLASSPATH%" cc.redpen.Main %* goto finally :err echo Error: JAVA_HOME is not defined. Can not start RedPen pause :finally ENDLOCAL ```
153a6a31-4034-4291-84cf-29f30d778cab
{ "language": "Batchfile" }
```batchfile cd .. del/q scite.zip zip scite.zip scintilla\*.* scintilla\*\*.* scite\*.* scite\*\*.* scite\*\*\*.* scite\*\*\*\*.* -x *.o -x *.obj -x *.lib -x *.dll -x *.exe -x *.pdb -x *.res -x *.exp cd scite ``` Remove more temporary build files from the set zipped.
```batchfile cd .. del/q scite.zip zip scite.zip scintilla\*.* scintilla\*\*.* scite\*.* scite\*\*.* scite\*\*\*.* scite\*\*\*\*.* -x *.o -x *.obj -x *.lib -x *.dll -x *.exe -x *.pdb -x *.res -x *.exp -x *.ncb -x *.sbr -x *.ilk -x *.idb cd scite ```
c6054b8c-f733-4c93-8f72-e00d287589fc
{ "language": "Batchfile" }
```batchfile ``` Add a script for CI building.
```batchfile cd /d "%~dp0" cd .. rmdir /s /q build mkdir build cd build cmake .. -G "Visual Studio 12" cmake --build . --config Debug cmake --build . --config RelWithDebInfo cmake --build . --config Debug --target doc bin\Debug\LoadTest.exe --gtest_output=xml:test_details.Debug.xml bin\RelWithDebInfo\LoadTest.exe --gtest_output=xml:test_details.RelWithDebInfo.xml pause```
76247a68-7b2a-4cbd-a7db-2851d8fc0eda
{ "language": "Batchfile" }
```batchfile .paket\paket.bootstrapper.exe if errorlevel 1 ( exit "There was an error with paket.bootstrapper" ) IF EXIST paket.lock ( .paket\paket.exe restore if errorlevel 1 ( exit "There was an error restoring packages from paket.lock" ) ) IF EXIST init.fsx ( .paket\paket.exe install packages\FAKE\tools\FAKE.exe init.fsx ) packages\FAKE\tools\FAKE.exe build.fsx ``` Check first if paket.exe is already downloaded in ..paket folder
```batchfile IF NOT EXIST .paket\paket.exe ( .paket\paket.bootstrapper.exe if errorlevel 1 ( exit "There was an error with paket.bootstrapper" ) ) IF EXIST paket.lock ( .paket\paket.exe restore if errorlevel 1 ( exit "There was an error restoring packages from paket.lock" ) ) IF EXIST init.fsx ( .paket\paket.exe install packages\FAKE\tools\FAKE.exe init.fsx ) packages\FAKE\tools\FAKE.exe build.fsx ```
8630da4a-fea4-4c58-89e3-4abe15ba4f0b
{ "language": "Batchfile" }
```batchfile ``` Add Windows batch file for creating a boostrap.dat for Krugercoin
```batchfile @echo off setlocal enableDelayedExpansion set KRUGERDIR=%APPDATA%\Krugercoin\blocks for /F %%x in ('dir /B/D/ON %KRUGERDIR%\blk*.*') do ( IF NOT [!B!] == [] set B=!B!+ set FILENAME=%KRUGERDIR%\%%x set B=!B!"!FILENAME!" ) copy /b %B% bootstrap.dat```
f088ad08-aeb0-4f2d-80c6-6591f97af9d8
{ "language": "Batchfile" }
```batchfile SET AIR_SDK=%USERPROFILE%\Documents\AdobeAIRSDK set STEAM_SDK=%USERPROFILE%\Documents\Steam\sdk SET ANE_PATH=..\..\FRESteamWorksLib\bin copy "%STEAM_SDK%\redistributable_bin\steam_api.dll" . copy "%STEAM_SDK%\redistributable_bin\osx32\libsteam_api.dylib" . call "%AIR_SDK%\bin\adt.bat" -package -XnoAneValidate -tsa none ^ -storetype pkcs12 -keystore CertificateTest.p12 ^ -storepass test -target bundle FRESteamWorksTest ^ FRESteamWorksTest-app.xml FRESteamWorksTest.swf ^ steam_api.dll libsteam_api.dylib steam_appid.txt^ -extdir "%ANE_PATH%" del steam_api.dll libsteam_api.dylib ``` Fix the (hopefully) last path
```batchfile SET AIR_SDK=%USERPROFILE%\Documents\AdobeAIRSDK set STEAM_SDK=%USERPROFILE%\Documents\Steam\sdk SET ANE_PATH=..\..\lib\bin copy "%STEAM_SDK%\redistributable_bin\steam_api.dll" . copy "%STEAM_SDK%\redistributable_bin\osx32\libsteam_api.dylib" . call "%AIR_SDK%\bin\adt.bat" -package -XnoAneValidate -tsa none ^ -storetype pkcs12 -keystore CertificateTest.p12 ^ -storepass test -target bundle FRESteamWorksTest ^ FRESteamWorksTest-app.xml FRESteamWorksTest.swf ^ steam_api.dll libsteam_api.dylib steam_appid.txt^ -extdir "%ANE_PATH%" del steam_api.dll libsteam_api.dylib ```
5208409f-1d55-47d0-904f-b48071ee3d5f
{ "language": "Batchfile" }
```batchfile pushd %~dp0 rmdir /s /q .\lib mkdir .\lib\net45 mkdir .\lib\netstandard2.0 pushd ..\.. del /q /f *.nupkg copy .\lib\bin\Release\Microsoft.WindowsAzure.Storage.DataMovement.dll .\tools\nupkg\lib\net45 copy .\lib\bin\Release\Microsoft.WindowsAzure.Storage.DataMovement.pdb .\tools\nupkg\lib\net45 copy .\lib\bin\Release\Microsoft.WindowsAzure.Storage.DataMovement.XML .\tools\nupkg\lib\net45 copy .\netcore\Microsoft.WindowsAzure.Storage.DataMovement\bin\Release\netstandard2.0\Microsoft.WindowsAzure.Storage.DataMovement.dll .\tools\nupkg\lib\netstandard2.0 copy .\netcore\Microsoft.WindowsAzure.Storage.DataMovement\bin\Release\netstandard2.0\Microsoft.WindowsAzure.Storage.DataMovement.pdb .\tools\nupkg\lib\netstandard2.0 copy .\netcore\Microsoft.WindowsAzure.Storage.DataMovement\bin\Release\netstandard2.0\Microsoft.WindowsAzure.Storage.DataMovement.xml .\tools\nupkg\lib\netstandard2.0 .\.nuget\nuget.exe pack .\tools\nupkg\Microsoft.Azure.Storage.DataMovement.nuspec popd rmdir /s /q .\lib popd ``` Exclude nupkg script from DMLib's nuget package.
```batchfile pushd %~dp0 rmdir /s /q .\package mkdir .\package\lib\net45 mkdir .\package\lib\netstandard2.0 pushd ..\.. del /q /f *.nupkg copy .\lib\bin\Release\Microsoft.WindowsAzure.Storage.DataMovement.dll .\tools\nupkg\package\lib\net45 copy .\lib\bin\Release\Microsoft.WindowsAzure.Storage.DataMovement.pdb .\tools\nupkg\package\lib\net45 copy .\lib\bin\Release\Microsoft.WindowsAzure.Storage.DataMovement.XML .\tools\nupkg\package\lib\net45 copy .\netcore\Microsoft.WindowsAzure.Storage.DataMovement\bin\Release\netstandard2.0\Microsoft.WindowsAzure.Storage.DataMovement.dll .\tools\nupkg\package\lib\netstandard2.0 copy .\netcore\Microsoft.WindowsAzure.Storage.DataMovement\bin\Release\netstandard2.0\Microsoft.WindowsAzure.Storage.DataMovement.pdb .\tools\nupkg\package\lib\netstandard2.0 copy .\netcore\Microsoft.WindowsAzure.Storage.DataMovement\bin\Release\netstandard2.0\Microsoft.WindowsAzure.Storage.DataMovement.xml .\tools\nupkg\package\lib\netstandard2.0 copy .\tools\nupkg\Microsoft.Azure.Storage.DataMovement.nuspec .\tools\nupkg\package .\.nuget\nuget.exe pack .\tools\nupkg\package\Microsoft.Azure.Storage.DataMovement.nuspec popd rmdir /s /q .\package popd ```
73c208b9-d705-428d-afd3-857d4f4c4851
{ "language": "Batchfile" }
```batchfile call setRepoEnvVar sed -i "s/SIPXTAPI_BUILDNUMBER.*\".*\"/SIPXTAPI_BUILDNUMBER \"%REPRO_VERSION%\"/g" ..\..\include\tapi\sipXtapi.h sed -i "s/SIPXTAPI_BUILD_WORD.*/SIPXTAPI_BUILD_WORD 2,9,1,%REPRO_VERSION%/g" ..\..\include\tapi\sipXtapi.h sed -i "s/SIPXTAPI_FULL_VERSION.*\".*\"/SIPXTAPI_FULL_VERSION \"2.9.1.%REPRO_VERSION%\"/g" ..\..\include\tapi\sipXtapi.h sed -i "s/SIPXTAPI_BUILDDATE.*\".*\"/SIPXTAPI_BUILDDATE \"%date:~10,4%-%date:~4,2%-%date:~7,2%\"/g" ..\..\include\tapi\sipXtapi.h ``` Tweak to the script used to modified the version in sipXtapi.h -- it removed the start of comment resulting in compiler errors.
```batchfile call setRepoEnvVar sed -i "s/SIPXTAPI_BUILDNUMBER.*\".*\"/SIPXTAPI_BUILDNUMBER \"%REPRO_VERSION%\"/g" ..\..\include\tapi\sipXtapi.h sed -i "s/SIPXTAPI_BUILD_WORD [0-9,,]*/SIPXTAPI_BUILD_WORD 2,9,1,%REPRO_VERSION%/g" ..\..\include\tapi\sipXtapi.h sed -i "s/SIPXTAPI_FULL_VERSION.*\".*\"/SIPXTAPI_FULL_VERSION \"2.9.1.%REPRO_VERSION%\"/g" ..\..\include\tapi\sipXtapi.h sed -i "s/SIPXTAPI_BUILDDATE.*\".*\"/SIPXTAPI_BUILDDATE \"%date:~10,4%-%date:~4,2%-%date:~7,2%\"/g" ..\..\include\tapi\sipXtapi.h ```
8d964f54-a2b7-40da-bcd8-85de51fa85fd
{ "language": "Batchfile" }
```batchfile "%PYTHON%" -m pip install . --no-deps --ignore-installed --no-cache-dir -vvv if errorlevel 1 exit 1 ``` Use zlib and openssl from conda-forge for windows
```batchfile set "GRPC_PYTHON_BUILD_SYSTEM_ZLIB=True" set "GRPC_PYTHON_BUILD_SYSTEM_OPENSSL=True" set "GRPC_PYTHON_CFLAGS=/DPB_FIELD_16BIT" "%PYTHON%" -m pip install . --no-deps --ignore-installed --no-cache-dir -vvv if errorlevel 1 exit 1 ```
502c7142-7f71-4ac1-9721-570220f015e1
{ "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 ) ) ``` Fix path to MSYS2 binaries
```batchfile mkdir c:\projects\plib-build if "%APPVEYOR_REPO_BRANCH%"=="appveyor_test" ( set "BOOST_ARGS=-DPLIB_TESTS_STATIC=ON -DBOOST_ROOT=C:\Libraries\boost_1_59_0" ) if "%USE_MINGW%"=="1" ( cd c:\projects\plib-build set "PATH=C:\MinGW\bin;C:\Program Files (x86)\CMake\bin" set BUILD_TYPE=-DCMAKE_BUILD_TYPE=%configuration% cmake %BUILD_TYPE% -G"%CMAKE_GENERATOR%" %BOOST_ARGS% c:\projects\plib mingw32-make ctest ) else ( if "%USE_MSYS%"=="1" ( set "PATH=C:\msys64\usr\bin;C:\Program Files (x86)\CMake\bin" bash c:\projects\plib\contrib\appveyor\build_msys.sh ) ) ```
24588d60-0506-4791-a1e6-7741ce76343e
{ "language": "Batchfile" }
```batchfile @echo off set cwd=%cd% cd /D %~dp0 set DevCmd="C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\Tools\VsDevCmd.bat" set MSBuildOptions=/v:m /p:Configuration=Release set BuildDir64="build-exe-64" set BuildDir32="build-exe-32" call %DevCmd% echo Building 64-bit tev... mkdir %BuildDir64% cd %BuildDir64% cmake -DTEV_DEPLOY=1 -G "Visual Studio 15 2017 Win64" ..\.. msbuild %MSBuildOptions% tev.sln move "Release\tev.exe" "..\..\tev.exe" cd .. rmdir /S /Q %BuildDir64% echo Building 32-bit tev... mkdir %BuildDir32% cd %BuildDir32% cmake -DTEV_DEPLOY=1 -G "Visual Studio 15 2017" ..\.. msbuild %MSBuildOptions% tev.sln move "Release\tev.exe" "..\..\tev-32bit.exe" cd .. rmdir /S /Q %BuildDir32% echo Returning to original directory. cd /D %cwd% pause ``` Update Windows Release build script
```batchfile @echo off set cwd=%cd% cd /D %~dp0 set DevCmd="C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\Tools\VsDevCmd.bat" set MSBuildOptions=/v:m /p:Configuration=Release set BuildDir64="build-exe-64" set BuildDir32="build-exe-32" call %DevCmd% echo Building 64-bit tev... mkdir %BuildDir64% cd %BuildDir64% cmake -DTEV_DEPLOY=1 -G "Visual Studio 15 2017 Win64" ..\.. msbuild %MSBuildOptions% tev.sln move "Release\tev.exe" "..\..\tev.exe" cd .. rmdir /S /Q %BuildDir64% echo Building 32-bit tev... mkdir %BuildDir32% cd %BuildDir32% cmake -DTEV_DEPLOY=1 -G "Visual Studio 15 2017" ..\.. msbuild %MSBuildOptions% tev.sln move "Release\tev.exe" "..\..\tev-32bit.exe" cd .. rmdir /S /Q %BuildDir32% echo Returning to original directory. cd /D %cwd% pause ```
44dbe540-3d5b-4618-8857-10b065ab58e5
{ "language": "Batchfile" }
```batchfile ``` Add bat for build release VC++2015
```batchfile call "%VS140COMNTOOLS%....\VC\bin\vcvars32.bat" "%VS140COMNTOOLS%..\ide\devenv" MediaInfoLib.sln /Build "Release|Win32"```
f647f2f9-6c7a-4c07-9aa8-4b9fd9579b8e
{ "language": "Batchfile" }
```batchfile @echo off echo Building your theme... mkdir temp echo Building fonts... bin\makebundle.exe temp\8x8.fnt Template\font8x8 bin\makebundle.exe temp\7x6.fnt Template\font7x6 bin\makebundle.exe temp\4x6.fnt Template\font4x6 echo Copying colors... copy /y Template\colors.txt temp\colors.txt echo Copying graphics... copy /y Template\bevel.* temp copy /y Template\vu.* temp copy /y Template\analyzor.* temp copy /y Template\logo.* temp echo Bundling everything together... bin\makebundle.exe MyNewTheme temp echo --- echo Your new theme is now packed in the file called "MyNewTheme"! echo Copy the file in klystrack\res and restart klystrack. pause ``` Support for cursor.png mouse cursor file
```batchfile @echo off echo Building your theme... mkdir temp echo Building fonts... bin\makebundle.exe temp\8x8.fnt Template\font8x8 bin\makebundle.exe temp\7x6.fnt Template\font7x6 bin\makebundle.exe temp\4x6.fnt Template\font4x6 echo Copying colors... copy /y Template\colors.txt temp\colors.txt echo Copying graphics... copy /y Template\bevel.* temp copy /y Template\vu.* temp copy /y Template\analyzor.* temp copy /y Template\logo.* temp copy /y Template\cursor.* temp echo Bundling everything together... bin\makebundle.exe MyNewTheme temp echo --- echo Your new theme is now packed in the file called "MyNewTheme"! echo Copy the file in klystrack\res and restart klystrack. pause ```
cfd4ec47-8c69-4056-b28d-bae092b47b20
{ "language": "Batchfile" }
```batchfile @echo off setlocal EnableDelayedExpansion SET OLDCD=%CD% cd %~dp0.. SET JAVA_OPTS= -Xmx1g SET CLASS=com.github.rnewson.couchdb.lucene.Main SET CLASSPATH="conf" for %%i in ("lib\*.jar") do @SET CLASSPATH=!CLASSPATH!;"%%~dpfi" java %JAVA_OPTS% -cp %CLASSPATH% %CLASS% > nul cd %OLDCD%``` Use short filenames on Windows becauses spaces are evil
```batchfile @echo off setlocal EnableDelayedExpansion SET OLDCD=%CD% cd %~dp0.. SET JAVA_OPTS= -Xmx1g SET CLASS=com.github.rnewson.couchdb.lucene.Main SET CLASSPATH="conf" for %%i in ("lib\*.jar") do @SET CLASSPATH=!CLASSPATH!;"%%~sdpfi" java %JAVA_OPTS% -cp %CLASSPATH% %CLASS% > nul cd %OLDCD%```
2a83e45a-a8aa-4bcc-8cfb-a04bf1fcfa15
{ "language": "Batchfile" }
```batchfile :: Store existing env vars and set to this conda env :: so other installs don't pollute the environment. @if defined CARTOPY_OFFLINE_SHARED ( set "_CONDA_SET_CARTOPY_OFFLINE_SHARED=%CARTOPY_OFFLINE_SHARED%" ) @set "CARTOPY_OFFLINE_SHARED=%CONDA_PREFIX%\Library\share\cartopy" ``` Update fix Windows activation script
```batchfile :: Store existing env vars and set to this conda env :: so other installs don't pollute the environment. @if defined CARTOPY_OFFLINE_SHARED ( set "_CONDA_SET_CARTOPY_OFFLINE_SHARED=%CARTOPY_OFFLINE_SHARED%" ) @set "CARTOPY_OFFLINE_SHARED=%CONDA_PREFIX%\share\cartopy" ```
65ef960c-d012-4955-94b7-543ff3e0bc94
{ "language": "Batchfile" }
```batchfile @echo off cls :start echo Starting server... "Nomad Server\NomadServer.exe" -name "My Oxide Server" -port 5127 -slots 10 -clientVersion "0.71" -password "" -tcpLobby "149.202.51.185" 25565 echo. echo Restarting server... echo. goto start ``` Patch for version 0.72 update
```batchfile @echo off cls :start echo Starting server... "Nomad Server\NomadServer.exe" -name "My Oxide Server" -port 5127 -slots 10 -clientVersion "0.72" -password "" -tcpLobby "149.202.51.185" 25565 echo. echo Restarting server... echo. goto start ```
3054c932-2060-4d3f-b8c5-6f44fe30a002
{ "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 http://github.com/projectkudu/KuduScript/tarball/master 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 ``` Use a specific version (commit) for kudu-script
```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 http://github.com/projectkudu/KuduScript/tarball/99816ade95addbfa6cfae7d74b7b616e2eebf772 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 ```
5c93ca55-76f8-475c-9fe8-c21852aca93c
{ "language": "Batchfile" }
```batchfile @echo off :: set batch file directory as current pushd "%~dp0" set SHARPMAKE_EXECUTABLE=bin\debug\Sharpmake.Application.exe call CompileSharpmake.bat Sharpmake.Application/Sharpmake.Application.csproj Debug AnyCPU if %errorlevel% NEQ 0 goto error set SM_CMD=%SHARPMAKE_EXECUTABLE% /sources("Sharpmake.Main.sharpmake.cs") /verbose echo %SM_CMD% %SM_CMD% if %errorlevel% NEQ 0 goto error goto success @REM ----------------------------------------------------------------------- :success COLOR 2F echo Bootstrap succeeded^! timeout /t 5 exit /b 0 @REM ----------------------------------------------------------------------- :error COLOR 4F echo Bootstrap failed^! pause set ERROR_CODE=1 goto end @REM ----------------------------------------------------------------------- :end :: restore caller current directory popd exit /b %ERROR_CODE% ``` Fix boostrap not going to end when successful, which lead to working directory not being correctly reset.
```batchfile @echo off :: set batch file directory as current pushd "%~dp0" set SHARPMAKE_EXECUTABLE=bin\debug\Sharpmake.Application.exe call CompileSharpmake.bat Sharpmake.Application/Sharpmake.Application.csproj Debug AnyCPU if %errorlevel% NEQ 0 goto error set SM_CMD=%SHARPMAKE_EXECUTABLE% /sources("Sharpmake.Main.sharpmake.cs") /verbose echo %SM_CMD% %SM_CMD% if %errorlevel% NEQ 0 goto error goto success @REM ----------------------------------------------------------------------- :success COLOR 2F echo Bootstrap succeeded^! timeout /t 5 goto end @REM ----------------------------------------------------------------------- :error COLOR 4F echo Bootstrap failed^! pause set ERROR_CODE=1 goto end @REM ----------------------------------------------------------------------- :end :: restore caller current directory popd exit /b %ERROR_CODE% ```
1d285bc1-0221-4412-9960-3d22f21752c4
{ "language": "Batchfile" }
```batchfile @rem Run Tests. Run the regression test suite. @rem Plain "rt" runs Release build, arguments passed on to regrtest. @rem "rt -d" runs Debug build similarly, after shifting off -d. @set _exe=python @if "%1" =="-d" set _exe=python_d @if "%1" =="-d" shift %_exe% ../lib/test/regrtest.py %1 %2 %3 %4 %5 %6 %7 %8 %9 @set _exe= ``` Delete the bytecode from the library and tests before running the tests for the first time -- like the Unix Makefile does. This avoids not catching problems in the bytecode generator and/or bytecode marshalling.
```batchfile @rem Run Tests. Run the regression test suite. @rem Plain "rt" runs Release build, arguments passed on to regrtest. @rem "rt -d" runs Debug build similarly, after shifting off -d. @set _exe=python @if "%1" =="-d" set _exe=python_d @if "%1" =="-d" shift @del ..\Lib\*.pyc @del ..\Lib\*.pyo @del ..\Lib\test\*.pyc @del ..\Lib\test\*.pyo %_exe% ../lib/test/regrtest.py %1 %2 %3 %4 %5 %6 %7 %8 %9 @set _exe= ```
ec37878b-3323-4c9a-ac89-58b5d1f9b309
{ "language": "Batchfile" }
```batchfile set "BINARY_HOME=%PREFIX%\bin" set "PACKAGE_HOME=%PREFIX%\share\%PKG_NAME%-%PKG_VERSION%-%PKG_BUILDNUM%" set "STACK_ROOT=%PACKAGE_HOME%\stackroot" mkdir "%BINARY_HOME%" || goto :error mkdir "%PACKAGE_HOME%" || goto :error mkdir "%STACK_ROOT%" || goto :error stack --local-bin-path "%PREFIX%\bin" ^ --extra-include-dirs "%PREFIX%\include" ^ --extra-lib-dirs "%PREFIX%\lib" ^ --stack-root "%STACK_ROOT%" ^ setup ^ || goto :error stack --local-bin-path "%PREFIX%\bin" ^ --extra-include-dirs "%PREFIX%\include" ^ --extra-lib-dirs "%PREFIX%\lib" ^ --stack-root "%STACK_ROOT%" ^ install --ghc-options ^ "-optl-pthread -optl-L%PREFIX%\lib -optl-Wl,-rpath,%PREFIX%\lib" ^ || goto :error strip "%PREFIX%\bin\shellcheck.exe" || goto :error rmdir /S /Q "%PACKAGE_HOME%" || goto :error goto :EOF :error echo Failed with error #%errorlevel%. exit 1 ``` Remove rpath in windows stack build
```batchfile set "BINARY_HOME=%PREFIX%\bin" set "PACKAGE_HOME=%PREFIX%\share\%PKG_NAME%-%PKG_VERSION%-%PKG_BUILDNUM%" set "STACK_ROOT=%PACKAGE_HOME%\stackroot" mkdir "%BINARY_HOME%" || goto :error mkdir "%PACKAGE_HOME%" || goto :error mkdir "%STACK_ROOT%" || goto :error stack --local-bin-path "%PREFIX%\bin" ^ --extra-include-dirs "%PREFIX%\include" ^ --extra-lib-dirs "%PREFIX%\lib" ^ --stack-root "%STACK_ROOT%" ^ setup ^ || goto :error stack --local-bin-path "%PREFIX%\bin" ^ --extra-include-dirs "%PREFIX%\include" ^ --extra-lib-dirs "%PREFIX%\lib" ^ --stack-root "%STACK_ROOT%" ^ install --ghc-options ^ "-optl-pthread -optl-L%PREFIX%\lib" ^ || goto :error strip "%PREFIX%\bin\shellcheck.exe" || goto :error rmdir /S /Q "%PACKAGE_HOME%" || goto :error goto :EOF :error echo Failed with error #%errorlevel%. exit 1 ```
728dd17f-454d-499c-8849-ddcc998236e8
{ "language": "Batchfile" }
```batchfile @ECHO OFF SET release=6.1.6 SET comment= SET version=%release% IF [%comment%] EQU [] (SET version=%release%) ELSE (SET version=%release%-%comment%) ReplaceIISExpressPortNumber.exe ..\src\Umbraco.Web.UI\Umbraco.Web.UI.csproj %release% %windir%\Microsoft.NET\Framework\v4.0.30319\msbuild.exe "Build-debug.proj" /p:BUILD_RELEASE=%release% /p:BUILD_COMMENT=%comment% echo off SET SRC=N:\web\webcentrum-dev.muni.cz\umbraco-source\Umbraco\build\_BuildOutput\WebApp SET DEST=N:\web\webcentrum-dev.muni.cz\%1\web echo. && echo bin: robocopy %SRC%\bin %DEST%\bin /S /XO /NJH /NFL /NDL echo. && echo umbraco: robocopy %SRC%\umbraco %DEST%\umbraco /S /XO /NJH /NFL /NDL echo. && echo umbraco_client: robocopy %SRC%\umbraco_client %DEST%\umbraco_client /S /XO /NJH /NFL /NDL REM pause``` Build debug overwrite files always
```batchfile @ECHO OFF SET release=6.1.6 SET comment= SET version=%release% IF [%comment%] EQU [] (SET version=%release%) ELSE (SET version=%release%-%comment%) ReplaceIISExpressPortNumber.exe ..\src\Umbraco.Web.UI\Umbraco.Web.UI.csproj %release% %windir%\Microsoft.NET\Framework\v4.0.30319\msbuild.exe "Build-debug.proj" /p:BUILD_RELEASE=%release% /p:BUILD_COMMENT=%comment% echo off SET SRC=N:\web\webcentrum-dev.muni.cz\umbraco-source\Umbraco\build\_BuildOutput\WebApp SET DEST=N:\web\webcentrum-dev.muni.cz\%1\web echo. && echo bin: robocopy %SRC%\bin %DEST%\bin /S /XO /IS /NJH /NFL /NDL echo. && echo umbraco: robocopy %SRC%\umbraco %DEST%\umbraco /S /XO /IS /NJH /NFL /NDL echo. && echo umbraco_client: robocopy %SRC%\umbraco_client %DEST%\umbraco_client /S /XO /IS /NJH /NFL /NDL REM pause```
9c2158f8-8a90-4412-8229-645d299479be
{ "language": "Batchfile" }
```batchfile @echo off cd ../.. if not exist "temp" mkdir temp cd temp cmake -DCMAKE_INSTALL_PREFIX=../temp/install -G "Visual Studio 16 2019" -A x64 .. if %errorlevel% neq 0 exit /b %errorlevel% cd ../build/VisualStudio ``` Rollback to Visual Studio 2017
```batchfile @echo off cd ../.. if not exist "temp" mkdir temp cd temp cmake -DCMAKE_INSTALL_PREFIX=../temp/install -G "Visual Studio 15 2017 Win64" .. if %errorlevel% neq 0 exit /b %errorlevel% cd ../build/VisualStudio ```
c83fe13d-eba4-4b4f-b216-ff5dd78e115d
{ "language": "Batchfile" }
```batchfile @rem Makes a build of the viewer @rem You should have a directory ..\viewerbuilddlls which has release versions of @rem all dependency dlls, including gtkmm & the Visual Studio 9 runtime @echo off rmdir build /S /Q md build xcopy bin\*.* build /S /C del build\data\configuration\*.xml rmdir build\testing /S /Q del build\*.dll del build\viewerd.exe del build\modules\core\*d.dll del build\modules\test\*d.dll del build\modules\test\TestModule*.* del build\modules\test\non_existing_system.xml xcopy ..\viewerbuilddlls\*.* build /S /C ``` Delete OpenAL module from build from now on, because it's not yet used.
```batchfile @rem Makes a build of the viewer @rem You should have a directory ..\viewerbuilddlls which has release versions of @rem all dependency dlls, including gtkmm & the Visual Studio 9 runtime @echo off rmdir build /S /Q md build xcopy bin\*.* build /S /C del build\data\configuration\*.xml rmdir build\testing /S /Q del build\*.dll del build\viewerd.exe del build\modules\core\*d.dll del build\modules\test\*d.dll del build\modules\test\TestModule*.* del build\modules\test\non_existing_system.xml del build\modules\core\OpenAL*.* xcopy ..\viewerbuilddlls\*.* build /S /C ```
60d7bae3-51d2-4f21-9798-96e0488f282e
{ "language": "Batchfile" }
```batchfile rm -rf ..\..\install\hdfs mkdir ..\..\install\hdfs mkdir ..\..\install\hdfs\conf cp -r %PACKAGE_NAME%\webapps ..\..\install\hdfs cp -r %PACKAGE_NAME%\lib ..\..\install\hdfs cp %PACKAGE_NAME%\hadoop-0.20.0-p1-core.jar ..\..\install\hdfs\lib cp %PACKAGE_NAME%\src\hdfs\hdfs-default.xml ..\..\install\hdfs\conf``` Fix windows build script for hadoop external.
```batchfile rm -rf ..\..\install\hdfs mkdir ..\..\install\hdfs mkdir ..\..\install\hdfs\conf cp -r %PACKAGE_SRC_NAME%\webapps ..\..\install\hdfs cp -r %PACKAGE_SRC_NAME%\lib ..\..\install\hdfs cp %PACKAGE_SRC_NAME%\hadoop-0.20.0-p1-core.jar ..\..\install\hdfs\lib cp %PACKAGE_SRC_NAME%\src\hdfs\hdfs-default.xml ..\..\install\hdfs\conf ```
dd6edf05-194b-4426-95b4-7cb9ad2a3831
{ "language": "Batchfile" }
```batchfile @echo off mkdir build cd build rem Need to handle Python 3.x case at some point (Visual Studio 2010) if %ARCH%==32 ( if %PY_VER% LSS 3 ( set CMAKE_GENERATOR="Visual Studio 9 2008" ) ) if %ARCH%==64 ( if %PY_VER% LSS 3 ( set CMAKE_GENERATOR="Visual Studio 9 2008 Win64" ) ) cmake .. -G %CMAKE_GENERATOR% ^ -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ -DCMAKE_PREFIX_PATH=%LIBRARY_PREFIX% cmake --build . --config Release mkdir %LIBRARY_LIB% copy /y Release\*.lib %LIBRARY_LIB% > nul if errorlevel 1 exit 1 ``` Add missing headers and source files
```batchfile @echo off mkdir build cd build rem Need to handle Python 3.x case at some point (Visual Studio 2010) if %ARCH%==32 ( if %PY_VER% LSS 3 ( set CMAKE_GENERATOR="Visual Studio 9 2008" ) ) if %ARCH%==64 ( if %PY_VER% LSS 3 ( set CMAKE_GENERATOR="Visual Studio 9 2008 Win64" ) ) cmake .. -G %CMAKE_GENERATOR% ^ -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ -DCMAKE_PREFIX_PATH=%LIBRARY_PREFIX% cmake --build . --config Release rem mkdir %LIBRARY_PREFIX%\src mkdir %LIBRARY_PREFIX%\src\gtest copy /y Release\*.lib %LIBRARY_LIB% > nul if errorlevel 1 exit 1 cd .. xcopy include %LIBRARY_INC% /E /I > nul if errorlevel 1 exit 1 xcopy src %LIBRARY_PREFIX%\src\gtest\src /E /I > nul if errorlevel 1 exit 1 xcopy cmake %LIBRARY_PREFIX%\src\gtest\cmake /E /I > nul if errorlevel 1 exit 1 copy /y CmakeLists.txt %LIBRARY_PREFIX%\src\gtest > nul if errorlevel 1 exit 1 ```
7fd509f4-fc1e-460d-a10a-c12b15f00b1d
{ "language": "Batchfile" }
```batchfile @echo off set CUDA_VER=%1 set PY_VER=%2 set "CUDA_PATH=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v%CUDA_VER%" set PY_PATH=C:\Development\Python\Python%PY_VER% set PATH=%CUDA_PATH%\bin;%CUDA_PATH%\libnvvp;%PY_PATH%;%PY_PATH%\Scripts\%PATH% pip install --pre cupy-cuda101 pip install -e .[test] pip install "onnx<1.7.0" onnxruntime pytest-cov pip list -v pytest -x -s -vvvs tests\onnx_chainer_tests --cov onnx_chainer ``` Fix onnxruntime version for CI failure
```batchfile @echo off set CUDA_VER=%1 set PY_VER=%2 set "CUDA_PATH=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v%CUDA_VER%" set PY_PATH=C:\Development\Python\Python%PY_VER% set PATH=%CUDA_PATH%\bin;%CUDA_PATH%\libnvvp;%PY_PATH%;%PY_PATH%\Scripts\%PATH% pip install --pre cupy-cuda101 pip install -e .[test] pip install "onnx<1.7.0" onnxruntime==1.2.0 pytest-cov pip list -v pytest -x -s -vvvs tests\onnx_chainer_tests --cov onnx_chainer ```
04d6f994-f8ca-4d8f-8ad3-2938287382bf
{ "language": "Batchfile" }
```batchfile :: Start Emotion in Motion in Windows Machine :: Imports latest dataBase dump (mongod needs to be running) mongorestore --port 28017 -d emotion-in-motion-dev --drop ./mongodb-dump/emotion-in-motion-dev mongorestore --port 28017 -d emotion-in-motion-test --drop ./mongodb-dump/emotion-in-motion-test mongorestore --port 28017 -d emotion-in-motion-production --drop ./mongodb-dump/emotion-in-motion-production :: Start Node (not necessary in EiM terminals) :: node server.js pause ``` Use default MongoDB port in database update script
```batchfile :: Start Emotion in Motion in Windows Machine :: Imports latest dataBase dump (mongod needs to be running) mongorestore --port 27017 -d emotion-in-motion-dev --drop ./mongodb-dump/emotion-in-motion-dev mongorestore --port 27017 -d emotion-in-motion-test --drop ./mongodb-dump/emotion-in-motion-test mongorestore --port 27017 -d emotion-in-motion-production --drop ./mongodb-dump/emotion-in-motion-production :: Start Node (not necessary in EiM terminals) :: node server.js pause ```
23694cf8-dfa4-46ec-bf4f-42ab5030cfef
{ "language": "Batchfile" }
```batchfile @echo off :: http://stackoverflow.com/questions/2952401/remove-trailing-slash-from-batch-file-input set current_dir=%~dp0 IF %current_dir:~-1%==\ SET current_dir=%current_dir:~0,-1% :: Tell Bundler where the Gemfile and gems are. set BUNDLE_GEMFILE=%current_dir%\vendor\Gemfile set BUNDLE_IGNORE_CONFIG= :: Run the actual app using the bundled Ruby interpreter, with Bundler activated. @"%current_dir%\ruby\bin\ruby.bat" -rbundler/setup "%current_dir%\app\lib\bootstrap.rb" %* set current_dir=``` Hide warnings in packaged tools for Windows
```batchfile @echo off :: http://stackoverflow.com/questions/2952401/remove-trailing-slash-from-batch-file-input set current_dir=%~dp0 IF %current_dir:~-1%==\ SET current_dir=%current_dir:~0,-1% :: Tell Bundler where the Gemfile and gems are. set BUNDLE_GEMFILE=%current_dir%\vendor\Gemfile set BUNDLE_IGNORE_CONFIG= :: Run the actual app using the bundled Ruby interpreter, with Bundler activated. @"%current_dir%\ruby\bin\ruby.bat" -W0 -rbundler/setup "%current_dir%\app\lib\bootstrap.rb" %* set current_dir= ```
b3ea13c5-3328-4df3-863e-9ca7be52cf17
{ "language": "Batchfile" }
```batchfile ``` Add script to run unit tests on Windows CE.
```batchfile set QT=%1 set CETEST=%QT%\bin\cetest.exe set CETEST_ARGS=-cache %QT%\.qmake.cache -libpath \Windows -f %CETEST% %CETEST_ARGS% tests\auto\qmallocpool\qmallocpool.pro %CETEST% %CETEST_ARGS% tests\auto\qpacket\qpacket.pro %CETEST% %CETEST_ARGS% tests\auto\qpacketprotocol\qpacketprotocol.pro %CETEST% %CETEST_ARGS% tests\auto\qvaluespace\qvaluespace.pro %CETEST% %CETEST_ARGS% tests\auto\qvaluespaceprovider\qvaluespaceprovider.pro %CETEST% %CETEST_ARGS% tests\auto\qvaluespacesubscriber\tst_qvaluespacesubscriber\tst_qvaluespacesubscriber.pro %CETEST% %CETEST_ARGS% tests\auto\qvaluespacesubscriber\tst_qvaluespacesubscriber_oop\tst_qvaluespacesubscriber_oop.pro %CETEST% %CETEST_ARGS% tests\auto\qsystemreadwritelock\qsystemreadwritelock\test\test.pro %CETEST% %CETEST_ARGS% tests\auto\qsystemreadwritelock_oop\qsystemreadwritelock_oop\test\test.pro ```
860257d0-5250-4bac-936d-f838906ce025
{ "language": "Batchfile" }
```batchfile @rem Makes a build directory of the viewer, so that you can run the NSIS install script @rem You should have a directory ..\viewerbuilddlls which has release versions of @rem all dependency dlls, including Qt core/ui/network/webkit/phonon dll's, and also VS2008 @rem redistributable (vcredist_x86.exe) @echo off rmdir build /S /Q md build copy readme.txt build xcopy bin\*.* build /S /C del build\data\configuration\*.xml rmdir build\testing /S /Q del build\*.dll del build\viewerd.exe del build\modules\core\*d.dll xcopy ..\viewerbuilddlls\*.* build /S /C del build\pymodules\*.pyc del build\pymodules\apitest\*.pyc del build\pymodules\circuits\*.pyc del build\pymodules\communication\*.pyc del build\pymodules\core\*.pyc del build\pymodules\usr\*.pyc ``` Delete .pyc files when making build. Make sure that data/configuration directory exists in the build.
```batchfile @rem Makes a build directory of the viewer, so that you can run the NSIS install script @rem You should have a directory ..\viewerbuilddlls which has release versions of @rem all dependency dlls, and also VS2008 redistributable (vcredist_x86.exe) @echo off rmdir build /S /Q md build copy readme.txt build xcopy bin\*.* build /S /C /Y del build\*.dll del build\viewerd.exe del build\modules\core\*d.dll xcopy ..\viewerbuilddlls\*.* build /S /C /Y del build\pymodules\*.pyc del build\pymodules\apitest\*.pyc del build\pymodules\circuits\*.pyc del build\pymodules\circuits\core\*.pyc del build\pymodules\circuits\net\*.pyc del build\pymodules\circuits\tools\*.pyc del build\pymodules\circuits\web\*.pyc del build\pymodules\core\*.pyc del build\pymodules\editgui\*.pyc del build\pymodules\lib\*.pyc del build\pymodules\lib\webdav\*.pyc del build\pymodules\lib\webdav\acp\*.pyc del build\pymodules\usr\*.pyc del build\pymodules\webdavinventory\*.pyc del build\pymodules\webserver\*.pyc cd build\data rmdir configuration /S /Q mkdir configuration cd ..\.. ```
dc6b15e1-2bcf-4666-9a30-a0580f01b19f
{ "language": "Batchfile" }
```batchfile @rem = '--*-Perl-*-- @echo off if "%OS%" == "Windows_NT" goto WinNT perl6 "%~dp0\%0" %1 %2 %3 %4 %5 %6 %7 %8 %9 goto endofperl :WinNT perl6 "%~dp0\%0" %* if NOT "%COMSPEC%" == "%SystemRoot%\system32\cmd.exe" goto endofperl if %errorlevel% == 9009 echo You do not have Perl in your PATH. if errorlevel 1 goto script_failed_so_exit_with_non_zero_val 2>nul goto endofperl @rem '; __END__ :endofperl ``` Make .bat file work with powershell as well as cmd courtesy of panda.bat. retupmoca++
```batchfile @rem = '--*-Perl-*-- @echo off if "%OS%" == "Windows_NT" goto WinNT perl6 "%~dp0\%0" %1 %2 %3 %4 %5 %6 %7 %8 %9 goto endofperl :WinNT perl6 "%~dp0\%~n0" %* if NOT "%COMSPEC%" == "%SystemRoot%\system32\cmd.exe" goto endofperl if %errorlevel% == 9009 echo You do not have Perl in your PATH. if errorlevel 1 goto script_failed_so_exit_with_non_zero_val 2>nul goto endofperl @rem '; __END__ :endofperl ```
1c537a52-bd29-4bae-9a1f-5f273fc76c7b
{ "language": "Batchfile" }
```batchfile @echo off call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\Tools\VsDevCmd.bat" set solution=..\OmniKassa.sln nuget restore %solution% msbuild %solution% /m:4 /t:Rebuild /p:Configuration=Release if %errorlevel% neq 0 goto done vstest.console /inIsolation ..\tests\OmniKassa.Tests\bin\Release\net45\OmniKassa.Tests.dll if %errorlevel% neq 0 goto done cd ..\tests\OmniKassa.Tests\ dotnet test -f netcoreapp1.1 if %errorlevel% neq 0 goto done cd ..\..\Publish set projectdir=..\src\OmniKassa msbuild %projectdir%\OmniKassa.csproj /m:4 /t:Pack /p:Configuration=Release if %errorlevel% neq 0 goto done copy %projectdir%\bin\Release\*.nupkg . :done pause``` Use dotnet test for both tests.
```batchfile @echo off call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\Tools\VsDevCmd.bat" set solution=..\OmniKassa.sln nuget restore %solution% msbuild %solution% /m:4 /t:Rebuild /p:Configuration=Release if %errorlevel% neq 0 goto done cd ..\tests\OmniKassa.Tests\ dotnet test --no-build -c Release if %errorlevel% neq 0 goto done cd ..\..\Publish set projectdir=..\src\OmniKassa msbuild %projectdir%\OmniKassa.csproj /m:4 /t:Pack /p:Configuration=Release if %errorlevel% neq 0 goto done copy %projectdir%\bin\Release\*.nupkg . :done pause```
b6317681-69eb-40c1-b399-514d17ca1db5
{ "language": "Batchfile" }
```batchfile echo off Rem: set path SET PATH= SET PATH=%PATH%;D:/Binutils/Ruby192/bin SET PATH=%PATH%;C:/Binutils/Ruby192/bin SET PATH=%PATH%;D:/Binutils/Ruby-186-27/bin SET PATH=%PATH%;C:/Binutils/Ruby-186-27/bin SET PATH=%PATH%;D:/Binutils/rubygems-1.3.5/bin SET PATH=%PATH%;C:/Binutils/rubygems-1.3.5/bin SET PATH=C:/Binutils/apache-ant-1.7.0/bin/;%PATH% SET PATH=D:/Binutils/apache-ant-1.7.0/bin/;%PATH% Rem: set java home SET JAVA_HOME=C:/Progra~1/Java/jre6 echo on Rem: set enviroment and execute ant script ant ``` Set env path to git
```batchfile echo off Rem: set path SET PATH= SET PATH=%PATH%;D:/Binutils/Ruby192/bin SET PATH=%PATH%;C:/Binutils/Ruby192/bin SET PATH=%PATH%;D:/Binutils/Ruby-186-27/bin SET PATH=%PATH%;C:/Binutils/Ruby-186-27/bin SET PATH=%PATH%;D:/Binutils/rubygems-1.3.5/bin SET PATH=%PATH%;C:/Binutils/rubygems-1.3.5/bin SET PATH=C:/Binutils/apache-ant-1.7.0/bin/;%PATH% SET PATH=D:/Binutils/apache-ant-1.7.0/bin/;%PATH% SET PATH=C:/Progra~1/Git/bin;%PATH% Rem: set java home SET JAVA_HOME=C:/Progra~1/Java/jre6 echo on Rem: set enviroment and execute ant script ant ```
bdf3dc9b-da90-4ba1-a280-47ac161bbb0a
{ "language": "Batchfile" }
```batchfile pushd %~dp0 "%PROGRAMFILES(X86)%\MSBuild\12.0\Bin\MSBuild.exe" /t:Build /p:Configuration=Debug MonoDevelop.AddinMaker.sln if not %ERRORLEVEL% == 0 goto Error "%PROGRAMFILES(X86)%\MSBuild\12.0\Bin\MSBuild.exe" /t:InstallAddin /p:Configuration=Debug MonoDevelop.AddinMaker.csproj if not %ERRORLEVEL% == 0 goto Error goto Exit :Error echo ERROR pause goto Exit :Exit popd ``` Use MSBuild 14 from build script
```batchfile pushd %~dp0 "%PROGRAMFILES(X86)%\MSBuild\14.0\Bin\MSBuild.exe" /t:Build /p:Configuration=Debug MonoDevelop.AddinMaker.sln if not %ERRORLEVEL% == 0 goto Error "%PROGRAMFILES(X86)%\MSBuild\14.0\Bin\MSBuild.exe" /t:InstallAddin /p:Configuration=Debug MonoDevelop.AddinMaker.csproj if not %ERRORLEVEL% == 0 goto Error goto Exit :Error echo ERROR pause goto Exit :Exit popd ```
57661fed-6f11-4704-8cab-ab17e1d67582
{ "language": "Batchfile" }
```batchfile rem needs strawberry perl installed and WiX Toolset in the %path% rmdir /q/s \rakudo perl Configure.pl --prefix=C:\rakudo --gen-moar gmake install rem following two lines are temporary hack rem main rakudo star Configure.pl needs fixing for windows copy c:\strawberry\perl\bin\libgcc_s_sjlj-1.dll c:\rakudo\bin copy c:\strawberry\perl\bin\libwinpthread-1.dll c:\rakudo\bin gmake msi ``` Add new dll dependency for Windows
```batchfile rem needs strawberry perl installed and WiX Toolset in the %path% rmdir /q/s \rakudo perl Configure.pl --prefix=C:\rakudo --gen-moar gmake install rem following two lines are temporary hack rem main rakudo star Configure.pl needs fixing for windows copy c:\strawberry\perl\bin\libgcc_s_sjlj-1.dll c:\rakudo\bin copy c:\strawberry\perl\bin\libwinpthread-1.dll c:\rakudo\bin copy c:\strawberry\perl\bin\libgcc_s_seh-1.dll c:\rakudo\bin gmake msi ```
36ccc446-f08f-43c6-b137-cb3b642f0ec7
{ "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)... FOR /F %%i IN (__tmp_gtest.txt) DO ( echo %%i %%i ) del __tmp_gtest.txt ``` Add CI build failure on failed GTests
```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 set /A failures=%failures%+1 ) del __tmp_gtest.txt EXIT /B 1 ```
935fce46-b2e7-4f4d-97dc-cff05d59d1df
{ "language": "Batchfile" }
```batchfile ``` Add batch file that creates the directory structure required by the XMC4500 GCC port.
```batchfile REM This file should be executed from the command line prior to the first REM build. It will be necessary to refresh the Eclipse project once the REM .bat file has been executed (normally just press F5 to refresh). REM Copies all the required files from their location within the standard REM FreeRTOS directory structure to under the Eclipse project directory. REM This permits the Eclipse project to be used in 'managed' mode and without REM having to setup any linked resources. REM Standard paths SET FREERTOS_SOURCE=..\..\Source SET COMMON_SOURCE=..\Common\minimal SET COMMON_INCLUDE=..\Common\include REM Have the files already been copied? IF EXIST src\FreeRTOS_Source Goto END REM Create the required directory structure. MD src\FreeRTOS_Source MD src\FreeRTOS_Source\include MD src\FreeRTOS_Source\portable\GCC MD src\FreeRTOS_Source\portable\GCC\ARM_CM4F MD src\FreeRTOS_Source\portable\MemMang MD src\Common_Demo_Source MD src\Common_Demo_Source\include REM Copy the core kernel files into the SDK projects directory copy %FREERTOS_SOURCE%\tasks.c src\FreeRTOS_Source copy %FREERTOS_SOURCE%\queue.c src\FreeRTOS_Source copy %FREERTOS_SOURCE%\list.c src\FreeRTOS_Source copy %FREERTOS_SOURCE%\timers.c src\FreeRTOS_Source REM Copy the common header files into the SDK projects directory copy %FREERTOS_SOURCE%\include\*.* src\FreeRTOS_Source\include REM Copy the portable layer files into the projects directory copy %FREERTOS_SOURCE%\portable\GCC\ARM_CM4F\*.* src\FreeRTOS_Source\portable\GCC\ARM_CM4F REM Copy the basic memory allocation files into the SDK projects directory copy %FREERTOS_SOURCE%\portable\MemMang\heap_2.c src\FreeRTOS_Source\portable\MemMang REM Copy the files that define the common demo tasks. copy %COMMON_SOURCE%\dynamic.c src\Common_Demo_Source copy %COMMON_SOURCE%\BlockQ.c src\Common_Demo_Source copy %COMMON_SOURCE%\death.c src\Common_Demo_Source copy %COMMON_SOURCE%\blocktim.c src\Common_Demo_Source copy %COMMON_SOURCE%\semtest.c src\Common_Demo_Source copy %COMMON_SOURCE%\PollQ.c src\Common_Demo_Source copy %COMMON_SOURCE%\GenQTest.c src\Common_Demo_Source copy %COMMON_SOURCE%\recmutex.c src\Common_Demo_Source copy %COMMON_SOURCE%\sp_flop.c src\Common_Demo_Source copy %COMMON_SOURCE%\countsem.c src\Common_Demo_Source copy %COMMON_SOURCE%\integer.c src\Common_Demo_Source REM Copy the common demo file headers. copy %COMMON_INCLUDE%\*.h src\Common_Demo_Source\include : END ```
e5764077-7fbf-47ca-9b0b-1d82c55fa10c
{ "language": "Batchfile" }
```batchfile @echo off %PYTHON_EXECUTABLE% %LLVM_SRC_ROOT%\test\Scripts\coff-dump.py %1 %2 %3 %4 %5 %6 %7 %8 %9 ``` Fix binary stdin issues with coff-dump on Windows.
```batchfile @echo off @rem We need to set -u to treat stdin as binary. Python 3 has support for doing @rem this in code, but I haven't found a way to do this in 2.6 yet. %PYTHON_EXECUTABLE% -u %LLVM_SRC_ROOT%\test\Scripts\coff-dump.py %1 %2 %3 %4 %5 %6 %7 %8 %9 ```
cf4a41fb-0eb2-45d8-8f63-bb13d0d77f82
{ "language": "Batchfile" }
```batchfile ``` Move proto generation into cmake and remove from prepare_build
```batchfile REM Copyright 2022 The Chromium Authors. REM Use of this source code is governed by a BSD-style license that can be REM found in the LICENSE file. @echo off setlocal REM This script is meant to be run once to setup the example demo agent. REM Run it with one command line argument: the path to a directory where the REM demo agent will be built. This should be a directory outside the SDK REM directory tree. This directory must not already exist. REM REM Once the build is prepared, the demo binary is build using the command REM `cmake --build <build-dir>`, where <build-dir> is the same argument given REM to this script. set BUILD_DIR=%~f1 set DEMO_DIR=%~dp0 call :ABSPATH "%DEMO_DIR%.." ROOT_DIR call :ABSPATH "%ROOT_DIR%\proto" PROTO_DIR echo . echo Root dir: %ROOT_DIR% echo Build dir: %BUILD_DIR% echo Demo dir: %DEMO_DIR% echo Proto dir: %PROTO_DIR% echo . IF exist "%BUILD_DIR%" ( echo. echo ### Directory %1 must not exist. echo. EXIT /b ) mkdir "%BUILD_DIR%" cd /d "%BUILD_DIR%" REM Install vcpkg and use it to install Google Protocol Buffers. cmd/c git clone https://github.com/microsoft/vcpkg cmd/c .\vcpkg\bootstrap-vcpkg.bat -disableMetrics cmd/c .\vcpkg\vcpkg install protobuf:x64-windows REM Generate the build files. set CMAKE_TOOLCHAIN_FILE=./vcpkg/scripts/buildsystems/vcpkg.cmake cmake %DEMO_DIR% echo. echo. echo To build, type: cmake --build "%BUILD_DIR%" echo. exit /b REM Resolve relative path in %1 and set it into variable %2. :ABSPATH set %2=%~f1 exit /b ```
8f17b380-2862-4b01-b872-69a2f235e236
{ "language": "Batchfile" }
```batchfile :: Copyright 2015 Rouslan Solomakhin :: :: Licensed under the Apache License, Version 2.0 (the "License") :: you may not use this file except in compliance with the License. :: You may obtain a copy of the License at :: :: http://www.apache.org/licenses/LICENSE-2.0 :: :: Unless required by applicable law or agreed to in writing, software :: distributed under the License is distributed on an "AS IS" BASIS, :: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. :: See the License for the specific language governing permissions and :: limitations under the License. set EDITOR=runemacs set GYP_DEFINES="component=shared_library fastbuild=2" set GYP_GENERATORS=ninja set HOME=%USERPROFILE% set PATH=%PATH%;%SYSTEMDRIVE%\emacs\bin;%SYSTEMDRIVE%\console2;%SYSTEMDRIVE%\src\depot_tools;%USERPROFILE%\.third_party\cask\bin;%SYSTEMDRIVE%\java\jdk\bin;%SYSTEMDRIVE%\maven\bin call "%ProgramFiles(x86)%\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" ``` Add JAVA_HOME var on windows.
```batchfile :: Copyright 2015 Rouslan Solomakhin :: :: Licensed under the Apache License, Version 2.0 (the "License") :: you may not use this file except in compliance with the License. :: You may obtain a copy of the License at :: :: http://www.apache.org/licenses/LICENSE-2.0 :: :: Unless required by applicable law or agreed to in writing, software :: distributed under the License is distributed on an "AS IS" BASIS, :: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. :: See the License for the specific language governing permissions and :: limitations under the License. set EDITOR=runemacs set GYP_DEFINES="component=shared_library fastbuild=2" set GYP_GENERATORS=ninja set HOME=%USERPROFILE% set JAVA_HOME=%SYSTEMDRIVE%\java\jdk set PATH=%PATH%;%SYSTEMDRIVE%\emacs\bin;%SYSTEMDRIVE%\console2;%SYSTEMDRIVE%\src\depot_tools;%HOME%\.third_party\cask\bin;%SYSTEMDRIVE%\maven\bin;%JAVA_HOME%\bin call "%ProgramFiles(x86)%\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" ```
8ac914c9-1048-44d6-b1d4-1a70f54b2811
{ "language": "Batchfile" }
```batchfile @echo off setlocal set DOTNETPATH= for %%i in (dotnet.exe) do set DOTNETPATH=%%~$PATH:i if not defined DOTNETPATH call :no-dotnet set LINQPADLESS=__LINQPADLESS__ pushd "%~dp0" dotnet run -v quiet -p "%~dpn0" -- %* popd goto :EOF :no-dotnet >&2 echo dotnet CLI does not appear to be installed, which is needed to build >&2 echo and run the script. Visit https://dot.net/ for instruction on how to >&2 echo download and install. exit /b 1 ``` Use release configuration on run
```batchfile @echo off setlocal set DOTNETPATH= for %%i in (dotnet.exe) do set DOTNETPATH=%%~$PATH:i if not defined DOTNETPATH call :no-dotnet set LINQPADLESS=__LINQPADLESS__ pushd "%~dp0" dotnet run -v quiet -p "%~dpn0" -c Release -- %* popd goto :EOF :no-dotnet >&2 echo dotnet CLI does not appear to be installed, which is needed to build >&2 echo and run the script. Visit https://dot.net/ for instruction on how to >&2 echo download and install. exit /b 1 ```