doc_id
stringlengths
36
36
metadata
dict
input
stringlengths
28
4.3k
output
stringlengths
11
5.45k
9eb41154-1d90-4d02-91fd-65aac2f332f4
{ "language": "Batchfile" }
```batchfile CALL .\.venv\Scripts\activate pip install -r .\requirements.txt pyinstaller .\rocketleagueminimapgenerator\main.py --onefile MOVE /Y .\dist\main.exe .\dist\rocketleagueminimapgenerator.exe COPY /Y .\README.md .\dist\README.txt DEL /S /Q .\dist\assets COPY /Y .\assets .\dist\assets powershell Compress-Archive -Path .\dist\rocketleagueminimapgenerator.exe, .\dist\README.txt, .\dist\assets -DestinationPath .\dist\rocketleagueminimapgenerator.zip pause ``` Fix minor issue with build script.
```batchfile CALL .\.venv\Scripts\activate pip install -r .\requirements.txt pyinstaller .\rocketleagueminimapgenerator\main.py --onefile MOVE /Y .\dist\main.exe .\dist\rocketleagueminimapgenerator.exe COPY /Y .\README.md .\dist\README.txt DEL /S /Q .\dist\assets COPY /Y .\assets .\dist\assets powershell Compress-Archive -Force -Path .\dist\rocketleagueminimapgenerator.exe, .\dist\README.txt, .\dist\assets -DestinationPath .\dist\rocketleagueminimapgenerator.zip pause ```
ea075bae-6f10-401d-9081-c8565e1aaf26
{ "language": "Batchfile" }
```batchfile @echo off REM docs\build_autodoc_files.py sphinx-build -b html doc_src pywinauto\docs REM c:\.temp\pudge\pudge\cli --documents doc_source\index.rst,doc_source\controls_overview.rst,doc_source\howto.rst,doc_source\getting_started.rst,history.txt,license.txt,todo.txt --title pywinauto -v -d website -m pywinauto.application,pywinauto.taskbar,pywinauto.clipboard,pywinauto.timings,pywinauto.findbestmatch,pywinauto.findwindows,pywinauto.handleprops,pywinauto.XMLHelpers,pywinauto.controls,pywinauto.tests -t doc_source\template REM These are the python modules REM application.py REM clipboard.py REM findbestmatch.py REM findwindows.py REM handleprops.py REM taskbar.py REM win32defines.py REM win32functions.py REM win32structures.py REM XMLHelpers.py REM controls REM tests REM c:\.temp\pudge\pudge\cli --title pywinauto -v -m pywinauto --documents docs\index.rst,history.txt,license.txt,todo.txt,docs\howto.rst -d pudge_output_green_paste -t \.temp\pudge\pudge\template\green_paste ``` Fix the path to build_autodoc_files.py and call it by default everytime (it is safe as it does not re-generate files which already exist)
```batchfile @echo off doc_src\build_autodoc_files.py sphinx-build -b html doc_src pywinauto\docs REM c:\.temp\pudge\pudge\cli --documents doc_source\index.rst,doc_source\controls_overview.rst,doc_source\howto.rst,doc_source\getting_started.rst,history.txt,license.txt,todo.txt --title pywinauto -v -d website -m pywinauto.application,pywinauto.taskbar,pywinauto.clipboard,pywinauto.timings,pywinauto.findbestmatch,pywinauto.findwindows,pywinauto.handleprops,pywinauto.XMLHelpers,pywinauto.controls,pywinauto.tests -t doc_source\template REM These are the python modules REM application.py REM clipboard.py REM findbestmatch.py REM findwindows.py REM handleprops.py REM taskbar.py REM win32defines.py REM win32functions.py REM win32structures.py REM XMLHelpers.py REM controls REM tests REM c:\.temp\pudge\pudge\cli --title pywinauto -v -m pywinauto --documents docs\index.rst,history.txt,license.txt,todo.txt,docs\howto.rst -d pudge_output_green_paste -t \.temp\pudge\pudge\template\green_paste ```
44a37c53-9f5d-4642-89dc-1f48c0f8e4c0
{ "language": "Batchfile" }
```batchfile git checkout azure-deployment-chillintest Chalmers.ILL/Web.ChalmersILL.config git reset HEAD Chalmers.ILL/Web.ChalmersILL.config git checkout azure-deployment-chillintest Chalmers.ILL/Web.ChillinTest.Debug.config git reset HEAD Chalmers.ILL/Web.ChillinTest.Debug.config git checkout azure-deployment-chillintest Chalmers.ILL/Web.ChillinTest.Release.config git reset HEAD Chalmers.ILL/Web.ChillinTest.Release.config git checkout azure-deployment-chillintest Chalmers.ILL/Config/umbracoSettings.config git reset HEAD Chalmers.ILL/Config/umbracoSettings.config``` Check out private config from correct branch.
```batchfile git checkout azure-deployment Chalmers.ILL/Web.ChalmersILL.config git reset HEAD Chalmers.ILL/Web.ChalmersILL.config git checkout azure-deployment Chalmers.ILL/Web.ChillinTest.Debug.config git reset HEAD Chalmers.ILL/Web.ChillinTest.Debug.config git checkout azure-deployment Chalmers.ILL/Web.ChillinTest.Release.config git reset HEAD Chalmers.ILL/Web.ChillinTest.Release.config git checkout azure-deployment Chalmers.ILL/Config/umbracoSettings.config git reset HEAD Chalmers.ILL/Config/umbracoSettings.config```
6d6f7053-bafb-4362-94ef-813253eaac66
{ "language": "Batchfile" }
```batchfile ``` Add release verification script for Windows
```batchfile @rem Licensed to the Apache Software Foundation (ASF) under one @rem or more contributor license agreements. See the NOTICE file @rem distributed with this work for additional information @rem regarding copyright ownership. The ASF licenses this file @rem to you under the Apache License, Version 2.0 (the @rem "License"); you may not use this file except in compliance @rem with the License. You may obtain a copy of the License at @rem @rem http://www.apache.org/licenses/LICENSE-2.0 @rem @rem Unless required by applicable law or agreed to in writing, @rem software distributed under the License is distributed on an @rem "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY @rem KIND, either express or implied. See the License for the @rem specific language governing permissions and limitations @rem under the License. @rem Then run from the directory containing the RC tarball @rem @rem verify-release-candidate.bat apache-parquet-cpp-%VERSION% @echo on if not exist "C:\tmp\" mkdir C:\tmp if exist "C:\tmp\parquet-verify-release" rd C:\tmp\parquet-verify-release /s /q if not exist "C:\tmp\parquet-verify-release" mkdir C:\tmp\parquet-verify-release tar xvf %1.tar.gz -C "C:/tmp/" set GENERATOR=Visual Studio 14 2015 Win64 set CONFIGURATION=release set PARQUET_SOURCE=C:\tmp\%1 set INSTALL_DIR=C:\tmp\%1\install pushd %PARQUET_SOURCE% set PARQUET_TEST_DATA=%PARQUET_SOURCE%\data set PARQUET_HOME=%INSTALL_DIR% set PATH=%INSTALL_DIR%\bin;%PATH% mkdir build pushd build cmake -G "%GENERATOR%" ^ -DCMAKE_INSTALL_PREFIX=%PARQUET_HOME% ^ -DPARQUET_BOOST_USE_SHARED=OFF ^ -DCMAKE_BUILD_TYPE=%CONFIGURATION% ^ -DPARQUET_CXXFLAGS="/WX /MP" ^ .. || exit /B cmake --build . --target INSTALL --config %CONFIGURATION% || exit /B ctest -VV || exit /B popd ```
82e8aa11-be18-4ca9-917e-6295266ac11f
{ "language": "Batchfile" }
```batchfile mkdir "%SRC_DIR%"\build pushd "%SRC_DIR%"\build cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="%LIBRARY_PREFIX%" -DBUILD_PYTHON_INTERFACE=ON -G "%CMAKE_GENERATOR%" .. cmake --build . --config Release --target install popd ``` Use ninja explicitly instead of default cmake generator
```batchfile mkdir "%SRC_DIR%"\build pushd "%SRC_DIR%"\build cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="%LIBRARY_PREFIX%" -DBUILD_PYTHON_INTERFACE=ON -G "Ninja" .. ninja ninja install popd ```
b9910b98-6979-4dd6-96b9-1c603e4204f9
{ "language": "Batchfile" }
```batchfile FOR /F "delims=" %%i in ('cygpath.exe -u "%SRC_DIR%\rust-nightly-install"') DO set "pfx=%%i" bash %SRC_DIR%\rust-nightly\install.sh --verbose --prefix=%pfx% --disable-ldconfig --components=rustc,cargo,rust-std-x86_64-pc-windows-msvc set "PATH=%SRC_DIR%\rust-nightly-install\bin;%PATH%" maturin build --no-sdist --release --strip --manylinux off --interpreter=%PYTHON% --rustc-extra-args="-C codegen-units=16 -C lto=thin -C target-cpu=native" FOR /F "delims=" %%i IN ('dir /s /b target\wheels\*.whl') DO set polars_wheel=%%i set "CMAKE_GENERATOR=NMake Makefiles" %PYTHON% -m pip install --ignore-installed --no-deps %polars_wheel% -vv ``` Move set generator before maturin build
```batchfile FOR /F "delims=" %%i in ('cygpath.exe -u "%SRC_DIR%\rust-nightly-install"') DO set "pfx=%%i" bash %SRC_DIR%\rust-nightly\install.sh --verbose --prefix=%pfx% --disable-ldconfig --components=rustc,cargo,rust-std-x86_64-pc-windows-msvc set "PATH=%SRC_DIR%\rust-nightly-install\bin;%PATH%" set "CMAKE_GENERATOR=NMake Makefiles" maturin build --no-sdist --release --strip --manylinux off --interpreter=%PYTHON% --rustc-extra-args="-C codegen-units=16 -C lto=thin -C target-cpu=native" FOR /F "delims=" %%i IN ('dir /s /b target\wheels\*.whl') DO set polars_wheel=%%i %PYTHON% -m pip install --ignore-installed --no-deps %polars_wheel% -vv ```
0ee93da2-a59a-4414-ac65-19a78d9e2ced
{ "language": "Batchfile" }
```batchfile @echo off for %%i in (FileCheck.exe) do set FILE_CHECK=%%~$PATH:i if not defined FILE_CHECK (echo Error: FileCheck.exe not found in PATH. && exit /b 1) set HIPIFY=%1 set IN_FILE=%2 set TMP_FILE=%3 set all_args=%* call set clang_args=%%all_args:*%4=%% set clang_args=%4%clang_args% %HIPIFY% -o=%TMP_FILE% %IN_FILE% -- %clang_args% if errorlevel 1 (echo Error: hipify-clang.exe failed with exit code: %errorlevel% && exit /b %errorlevel%) %FILE_CHECK% %IN_FILE% -input-file=%TMP_FILE% if errorlevel 1 (echo Error: FileCheck.exe failed with exit code: %errorlevel% && exit /b %errorlevel%) ``` Add setlocal to batch script
```batchfile @echo off setlocal for %%i in (FileCheck.exe) do set FILE_CHECK=%%~$PATH:i if not defined FILE_CHECK (echo Error: FileCheck.exe not found in PATH. && exit /b 1) set HIPIFY=%1 set IN_FILE=%2 set TMP_FILE=%3 set all_args=%* call set clang_args=%%all_args:*%4=%% set clang_args=%4%clang_args% %HIPIFY% -o=%TMP_FILE% %IN_FILE% -- %clang_args% if errorlevel 1 (echo Error: hipify-clang.exe failed with exit code: %errorlevel% && exit /b %errorlevel%) %FILE_CHECK% %IN_FILE% -input-file=%TMP_FILE% if errorlevel 1 (echo Error: FileCheck.exe failed with exit code: %errorlevel% && exit /b %errorlevel%) ```
f725f61f-c81f-4650-9ef3-c61f6b211c2f
{ "language": "Batchfile" }
```batchfile @echo off REM Emacs COPY /Y emacs\.emacs "%APPDATA%\.emacs" REM nano COPY /Y nano\.nanorc "%USERPROFILE%\.nanorc" REM Vim MKDIR "%USERPROFILE%\.vim\colors" COPY /Y vim\.vim\colors\* "%USERPROFILE%\.vim\colors\" COPY /Y vim\.vimrc "%USERPROFILE%\.vimrc" REM bash COPY /Y bash\.bashrc "%USERPROFILE%\.bashrc" COPY /Y bash\.bash_aliases "%USERPROFILE%\.bash_aliases" REM Sublime Text 3 MKDIR "%APPDATA%\Sublime Text 3\Packages\Custom Color Schemes\" MKDIR "%APPDATA%\Sublime Text 3\Packages\User\" COPY /Y sublime\Preferences.sublime-settings "%APPDATA%\Sublime Text 3\Packages\User\" COPY /Y "sublime\Package Control.sublime-settings" "%APPDATA%\Sublime Text 3\Packages\User\" COPY /Y sublime\Default.sublime-keymap "%APPDATA%\Sublime Text 3\Packages\User\" COPY /Y sublime\jcd.tmTheme "%APPDATA%\Sublime Text 3\Packages\Custom Color Schemes\" ``` Fix vim color scheme copy on Windows
```batchfile @echo off REM Emacs COPY /Y emacs\.emacs "%APPDATA%\.emacs" REM nano COPY /Y nano\.nanorc "%USERPROFILE%\.nanorc" REM Vim MKDIR "%USERPROFILE%\vimfiles\colors" COPY /Y vim\.vim\colors\* "%USERPROFILE%\vimfiles\colors\" COPY /Y vim\.vimrc "%USERPROFILE%\.vimrc" REM bash COPY /Y bash\.bashrc "%USERPROFILE%\.bashrc" COPY /Y bash\.bash_aliases "%USERPROFILE%\.bash_aliases" REM Sublime Text 3 MKDIR "%APPDATA%\Sublime Text 3\Packages\Custom Color Schemes\" MKDIR "%APPDATA%\Sublime Text 3\Packages\User\" COPY /Y sublime\Preferences.sublime-settings "%APPDATA%\Sublime Text 3\Packages\User\" COPY /Y "sublime\Package Control.sublime-settings" "%APPDATA%\Sublime Text 3\Packages\User\" COPY /Y sublime\Default.sublime-keymap "%APPDATA%\Sublime Text 3\Packages\User\" COPY /Y sublime\jcd.tmTheme "%APPDATA%\Sublime Text 3\Packages\Custom Color Schemes\" ```
4fc155cb-484f-4dd0-a6f2-9444dd584674
{ "language": "Batchfile" }
```batchfile @echo off rem Do not set codepage since it makes Eclipse act weird on DEV14 rem 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$* doskey pwd=echo %CD% doskey which=where $* 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 exist ""%PROGRAMFILES%\Sublime Text 3"" ( doskey edit="%PROGRAMFILES%\Sublime Text 3\sublime_text.exe" $* ) where atom >nul 2>&1 if %ERRORLEVEL% EQU 0 ( doskey edit=atom $* ) where code >nul 2>&1 if %ERRORLEVEL% EQU 0 ( doskey edit=code $* ) rem Open functionality doskey open=start $* @echo on ``` Add ifconfig alias to batch environment
```batchfile @echo off rem Do not set codepage since it makes Eclipse act weird on DEV14 rem 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$* doskey pwd=echo %CD% doskey which=where $* doskey ifconfig=ipconfig 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 exist ""%PROGRAMFILES%\Sublime Text 3"" ( doskey edit="%PROGRAMFILES%\Sublime Text 3\sublime_text.exe" $* ) where atom >nul 2>&1 if %ERRORLEVEL% EQU 0 ( doskey edit=atom $* ) where code >nul 2>&1 if %ERRORLEVEL% EQU 0 ( doskey edit=code $* ) rem Open functionality doskey open=start $* @echo on ```
0527f554-7416-4cd1-bb1a-e72e4e247d8e
{ "language": "Batchfile" }
```batchfile @echo off set config=%1 if "%config%" == "" ( set config=Release ) set DOTNET_CLI_TELEMETRY_OPTOUT=1 echo ##teamcity[blockOpened name='Prepare' description='Preparing build environment...'] dotnet clean if not "%errorlevel%"=="0" goto failure echo ##teamcity[blockClosed name='Prepare'] echo ##teamcity[blockOpened name='Restore' description='Restoring packages...'] dotnet restore if not "%errorlevel%"=="0" goto failure echo ##teamcity[blockClosed name='Restore'] echo ##teamcity[blockOpened name='Build' description='Building solution...'] dotnet build --configuration %config% if not "%errorlevel%"=="0" goto failure echo ##teamcity[blockClosed name='Build'] echo ##teamcity[blockOpened name='Test' description='Running tests...'] dotnet test tests\YouTrackSharp.Tests\YouTrackSharp.Tests.csproj --no-build --configuration %config% if not "%errorlevel%"=="0" goto failure echo ##teamcity[blockClosed name='Test'] echo ##teamcity[blockOpened name='Pack' description='Creating NuGet packages...'] mkdir artifacts dotnet pack src\YouTrackSharp\YouTrackSharp.csproj --output %cd%\artifacts --include-symbols --include-source --configuration %config% /p:PackageVersion=%PackageVersion% if not "%errorlevel%"=="0" goto failure echo ##teamcity[blockClosed name='Pack'] :success exit 0 :failure exit -1 ``` Set package version from BUILD_NUMBER environment variable
```batchfile @echo off set config=%1 if "%config%" == "" ( set config=Release ) set DOTNET_CLI_TELEMETRY_OPTOUT=1 set PackageVersion=%BUILD_NUMBER% echo ##teamcity[blockOpened name='Prepare' description='Preparing build environment...'] dotnet clean if not "%errorlevel%"=="0" goto failure echo ##teamcity[blockClosed name='Prepare'] echo ##teamcity[blockOpened name='Restore' description='Restoring packages...'] dotnet restore if not "%errorlevel%"=="0" goto failure echo ##teamcity[blockClosed name='Restore'] echo ##teamcity[blockOpened name='Build' description='Building solution...'] dotnet build --configuration %config% if not "%errorlevel%"=="0" goto failure echo ##teamcity[blockClosed name='Build'] echo ##teamcity[blockOpened name='Test' description='Running tests...'] dotnet test tests\YouTrackSharp.Tests\YouTrackSharp.Tests.csproj --no-build --configuration %config% if not "%errorlevel%"=="0" goto failure echo ##teamcity[blockClosed name='Test'] echo ##teamcity[blockOpened name='Pack' description='Creating NuGet packages...'] mkdir artifacts dotnet pack src\YouTrackSharp\YouTrackSharp.csproj --output %cd%\artifacts --include-symbols --include-source --configuration %config% /p:PackageVersion=%PackageVersion% if not "%errorlevel%"=="0" goto failure echo ##teamcity[blockClosed name='Pack'] :success exit 0 :failure exit -1 ```
ac31cc88-05d7-49bf-97ed-9e1463e929af
{ "language": "Batchfile" }
```batchfile ``` Add Windows cmd/batch file to simplify usage.
```batchfile @echo off REM ========================================================================== REM BEHAVE REM ========================================================================== setlocal set HERE=%~dp0 if not defined PYTHON set PYTHON=python %PYTHON% %HERE%behave %* ```
a8821e32-62ad-4888-8905-e3fa334dd3aa
{ "language": "Batchfile" }
```batchfile @for /F "delims=" %%a in ('findstr /rc:"^ version" build.gradle') do @set versionline=%%a @echo Closing all java and javaw processes with window title format: HubTurbo V%versionline:~15,5%*. @taskkill /fi "Windowtitle eq HubTurbo V%versionline:~15,5%*" /im "javaw.exe" @taskkill /fi "Windowtitle eq HubTurbo V%versionline:~15,5%*" /im "java.exe" @echo( @echo Starting Gradle build. This will take a while... @echo( @call gradlew clean shadowJar --no-daemon @for /F "delims=" %%a in ('findstr /rc:"^ version" build.gradle') do @set versionline=%%a @echo( @echo Starting HubTurbo V%versionline:~15,5%. You can close this cmd window once HubTurbo begins launching. @start "" javaw -jar build/libs/HubTurbo-%versionline:~15,5%-all.jar @exit``` Backup the user's directory before cleaning
```batchfile @for /r build\libs %%i in (*.jar) do @set versionline=%%~ni @echo Closing all java and javaw processes with window title format: HubTurbo V%versionline:~9,5%*. @taskkill /fi "Windowtitle eq HubTurbo V%versionline:~15,5%*" /im "javaw.exe" @taskkill /fi "Windowtitle eq HubTurbo V%versionline:~15,5%*" /im "java.exe" @echo( @echo Backing up your files. Any jar or exe files will not be backed up. @echo .jar>>rbar-ex.txt @echo .exe>>rbar-ex.txt @xcopy build\libs rbar /i /s /exclude:rbar-ex.txt @del rbar-ex.txt @echo( @echo Starting Gradle build. This will take a while... @echo( @call gradlew clean shadowJar --no-daemon @xcopy rbar build\libs /i /s @rmdir /S /Q rbar @for /F "delims=" %%a in ('findstr /rc:"^ version" build.gradle') do @set versionline=%%a @cd build\libs @echo( @echo Starting HubTurbo V%versionline:~15,5%. You can close this cmd window once HubTurbo begins launching. @start "" javaw -jar HubTurbo-%versionline:~15,5%-all.jar @exit```
64c08cf2-51e8-42d7-96dd-bb5b98b1f78a
{ "language": "Batchfile" }
```batchfile # This is for windows users only. # If you're on a mac or linux, just run `ant build` from this folder in Terminal set MYDIR=%~dp0 set ANT_OPTS=-D"file.encoding=UTF-8" ant build``` Use REM for comments to avoid error messages on the DOS prompt for Windows users
```batchfile REM # This is for windows users only. REM # If you're on a mac or linux, just run `ant build` from this folder in Terminal set MYDIR=%~dp0 set ANT_OPTS=-D"file.encoding=UTF-8" ant build```
465a3512-f1a6-4c3b-8a50-ed9923eb0109
{ "language": "Batchfile" }
```batchfile xcopy /y .\sourceforge\svn\trunk\src\pyparsing.py . python c:\python27\scripts\epydoc -v --name pyparsing -o htmldoc --inheritance listed --no-private pyparsing.py ``` Update to reflect Py3 is now default Python in dev environment
```batchfile xcopy /y .\sourceforge\svn\trunk\src\pyparsing.py . c:\python27\python c:\python27\scripts\epydoc -v --name pyparsing -o htmldoc --inheritance listed --no-private pyparsing.py ```
0f9fd514-7a66-4c5d-aa9a-33f36bd975d6
{ "language": "Batchfile" }
```batchfile ``` Add run multiply scripts bat file
```batchfile REM Author: Manu Mohanan REM Original link: http://www.sqlservercentral.com/articles/SQLCMD/131634/ @@echo off del errors /f /s /q rd Errors md Errors FOR %%A IN (*.SQL) DO ( sqlcmd -S SERVERNAME -d DATABASE1 -U username -P password -i "%%A" -o "Errors\%%AError_DB1.txt" -I ) FOR %%A IN (*.SQL) DO ( sqlcmd -S SERVERNAME -d DATABASE2 -U username -P password -i "%%A" -o "Errors\%%AError_DB2.txt" -I ) ```
c1199863-3684-494e-93ed-684bf057ef4c
{ "language": "Batchfile" }
```batchfile REM REM Environment setup file for RailsInstaller. REM @ECHO OFF REM REM First we Determine where is RUBY_DIR REM (which is where this script is) REM PUSHD %~dp0. SET RUBY_DIR=%CD% POPD REM REM Now we Determine the RailsInstaller Root directory REM (parent directory of Ruby) REM PUSHD %RUBY_DIR%\.. SET ROOT_DIR=%CD% POPD REM REM Add RUBY_DIR\bin to the PATH, DevKit\bin and then Git\cmd REM RUBY_DIR\bin takes higher priority to avoid other tools conflict REM SET PATH=%RUBY_DIR%\bin;%RUBY_DIR%lib\ruby\gems\1.8\bin;%ROOT_DIR%\DevKit\bin;%ROOT_DIR%\Git\cmd;%PATH% SET RUBY_DIR= SET ROOT_DIR= REM REM Create the HOME\Sites directory. REM IF NOT EXIST %HOMEDRIVE%\Sites. (md %HOMEDRIVE%\Sites.) REM REM Set the HOME environment variables for Ruby & Gems to use REM with ENV["HOME"] REM SET HOME=%HOMEDRIVE%%HOMEPATH% REM Display Git, Ruby and Rails versions git --version ruby -v rails -v REM NOTE we start out in the Sites directory as that is the working dir set. REM cd %HOMEDRIVE%\Sites ``` Move echo off up to top.
```batchfile @ECHO OFF REM REM Environment setup file for RailsInstaller. REM REM REM First we Determine where is RUBY_DIR REM (which is where this script is) REM PUSHD %~dp0. SET RUBY_DIR=%CD% POPD REM REM Now we Determine the RailsInstaller Root directory REM (parent directory of Ruby) REM PUSHD %RUBY_DIR%\.. SET ROOT_DIR=%CD% POPD REM REM Add RUBY_DIR\bin to the PATH, DevKit\bin and then Git\cmd REM RUBY_DIR\bin takes higher priority to avoid other tools conflict REM SET PATH=%RUBY_DIR%\bin;%RUBY_DIR%lib\ruby\gems\1.8\bin;%ROOT_DIR%\DevKit\bin;%ROOT_DIR%\Git\cmd;%PATH% SET RUBY_DIR= SET ROOT_DIR= REM REM Create the HOME\Sites directory. REM IF NOT EXIST %HOMEDRIVE%\Sites. (md %HOMEDRIVE%\Sites.) REM REM Set the HOME environment variables for Ruby & Gems to use REM with ENV["HOME"] REM SET HOME=%HOMEDRIVE%%HOMEPATH% REM Display Git Verison git --version REM Display Ruby Version %RUBY_DIR%\bin\ruby.exe -v REM Display Rails version %RUBY_DIR%\bin\rails.bat -v REM NOTE we start out in the Sites directory as that is the working dir set. REM cd %HOMEDRIVE%\Sites ```
df6be4dc-bb70-4070-b5cf-2757676a5a49
{ "language": "Batchfile" }
```batchfile @echo off title PostgreSQL Portable cls :: set default code page chcp 1252 > nul :: ensure variables set if not defined PGSQL set PGSQL=%~dp0 if not defined PGDATA set PGDATA=%PGSQL%..\..\Data\data if not defined PGLOG set PGLOG=%PGSQL%..\..\Data\log.txt if not defined PGLOCALDIR set PGLOCALDIR=%PGSQL%share if not defined PGDATABASE set PGDATABASE=postgres if not defined PGPORT set PGPORT=5432 if not defined PGUSER set PGUSER=postgres :: initialise a new database on first use if not exist "%PGDATA%" ( echo. echo Initialising database for first use, please wait... "%PGSQL%\bin\initdb" -U %PGUSER% -A trust -E utf8 --locale=C >nul ) :: startup postgres server echo. "%PGSQL%\bin\pg_ctl" -D "%PGDATA%" -l "%PGLOG%" -w start cls echo. echo Type \q to quit and shutdown server echo. "%PGSQL%\bin\psql.exe" --port=%PGPORT% --dbname="%PGDATABASE%" --username="%PGUSER%" echo. "%PGSQL%\bin\pg_ctl" -D "%PGDATA%" stop ``` Remove setting of env vars in scripts
```batchfile @echo off title PostgreSQL Portable cls :: set default code page chcp 1252 > nul :: initialise a new database on first use if not exist "%PGDATA%" ( echo. echo Initialising database for first use, please wait... "%PGSQL%\bin\initdb" -U %PGUSER% -A trust -E utf8 --locale=C >nul ) :: startup postgres server echo. "%PGSQL%\bin\pg_ctl" -D "%PGDATA%" -l "%PGLOG%" -w start cls echo. echo Type \q to quit and shutdown server echo. "%PGSQL%\bin\psql.exe" --port=%PGPORT% --dbname="%PGDATABASE%" --username="%PGUSER%" echo. "%PGSQL%\bin\pg_ctl" -D "%PGDATA%" stop ```
9e2e26f7-19b3-4385-87cc-06fda3c7cf1c
{ "language": "Batchfile" }
```batchfile @..\..\..\third_party\python_24\python.exe run_webkit_tests.py %* ``` Make run_webkit_test.bat workable even if we execute it on a directory other than webkit\tools\layout_tests\.
```batchfile @%~dp0\..\..\..\third_party\python_24\python.exe %~dp0\run_webkit_tests.py %* ```
43d11028-9080-47bc-9a8f-edb0d4f75a6b
{ "language": "Batchfile" }
```batchfile @echo Off set config=%1 if "%config%" == "" ( set config=Release ) REM Build call "%msbuild%" src\cr-aggregaterepository.sln /p:Configuration="%config%" /m /v:M /fl /flp:LogFile=msbuild.log;Verbosity=Normal /nr:false if not "%errorlevel%"=="0" goto failure REM Unit tests "%GallioEcho%" src\tests\bin\%config%\CR.AggregateRepository.Tests.dll if not "%errorlevel%"=="0" goto failure REM Package mkdir Build cmd /c %nuget% pack "src\core\core.csproj" -symbols -o Build -p Configuration=%config% if not "%errorlevel%"=="0" goto failure cmd /c %nuget% pack "src\persistance.memory\persistance.memory.csproj" -symbols -o Build -p Configuration=%config% if not "%errorlevel%"=="0" goto failure cmd /c %nuget% pack "src\persistance.eventstore\persistance.eventstore.csproj" -symbols -o Build -p Configuration=%config% if not "%errorlevel%"=="0" goto failure :success exit 0 :failure exit -1``` Use nunit rather than gallileo
```batchfile @echo Off set config=%1 if "%config%" == "" ( set config=Release ) REM Build call "%msbuild%" src\cr-aggregaterepository.sln /p:Configuration="%config%" /m /v:M /fl /flp:LogFile=msbuild.log;Verbosity=Normal /nr:false if not "%errorlevel%"=="0" goto failure REM Unit tests "%nunit%" src\tests\bin\%config%\CR.AggregateRepository.Tests.dll if not "%errorlevel%"=="0" goto failure REM Package mkdir Build cmd /c %nuget% pack "src\core\core.csproj" -symbols -o Build -p Configuration=%config% if not "%errorlevel%"=="0" goto failure cmd /c %nuget% pack "src\persistance.memory\persistance.memory.csproj" -symbols -o Build -p Configuration=%config% if not "%errorlevel%"=="0" goto failure cmd /c %nuget% pack "src\persistance.eventstore\persistance.eventstore.csproj" -symbols -o Build -p Configuration=%config% if not "%errorlevel%"=="0" goto failure :success exit 0 :failure exit -1```
c9c397f0-a419-4e13-9e49-492fc7ba2716
{ "language": "Batchfile" }
```batchfile PATH=C:\python26;C:\progra~2\7-zip;%PATH% del /q /s dist\*.* python setup.py py2exe cd dist 7z d library.zip jinja2\* dns\* 'graphy\* 7z a namebench_for_Windows.zip -r * namebench -x -O 8.8.8.8 -t5 -o test.html start test.html cd .. ``` Remove w9xopen.exe and add README.txt to Windows build
```batchfile PATH=C:\python26;C:\progra~2\7-zip;%PATH% del /q /s dist\*.* python setup.py py2exe cd dist 7z d library.zip jinja2\* dns\* 'graphy\* del /s w9xpopen.exe copy ..\README.txt . 7z a namebench_for_Windows.zip -r * namebench -x -O 8.8.8.8 -t5 -o test.html start test.html cd .. ```
698f231a-74ca-48a9-9728-12bab9c40079
{ "language": "Batchfile" }
```batchfile ``` Add release tool for windows
```batchfile PATH=C:\python26;C:\progra~2\7-zip;%PATH% del /q /s dist\*.* python setup.py py2exe cd dist 7z d library.zip jinja2\* dns\* 'graphy\* 7z a namebench_for_Windows.zip -r * namebench -x -O 8.8.8.8 -t5 -o test.html start test.html cd .. ```
9c78ea27-897c-42fa-a988-fa37464d9edd
{ "language": "Batchfile" }
```batchfile @echo off msbuild /p:Configuration=Packaging;Platform=x64 Couchbase.Lite.Tests.UWP.csproj vstest.console.exe /InIsolation /Platform:x64 AppPackages\Couchbase.Lite.Tests.UWP_1.0.0.0_x64_Packaging_Test\Couchbase.Lite.Tests.UWP_1.0.0.0_x64_Packaging.appx /Logger:trx``` Correct script because the test runner no longer has a Packaging target
```batchfile @echo off msbuild /p:Configuration=Release /p:Platform=x64 Couchbase.Lite.Tests.UWP.csproj vstest.console.exe /InIsolation /Platform:x64 AppPackages\Couchbase.Lite.Tests.UWP_1.0.0.0_x64_Test\Couchbase.Lite.Tests.UWP_1.0.0.0_x64.appx /Logger:trx```
a9c93bf0-d875-4edd-a743-2cfe849d0f4d
{ "language": "Batchfile" }
```batchfile @echo off set VISUALIZERS=%USERPROFILE%\Documents\Visual Studio 14\Visualizers set BIN=%~dp0..\..\..\Binaries\Debug copy /y "%BIN%\Roslyn.DebuggerVisualizers.dll" "%VISUALIZERS%" copy /y "%BIN%\Roslyn.Test.PdbUtilities.dll" "%VISUALIZERS%" copy /y "%BIN%\System.Reflection.Metadata.dll" "%VISUALIZERS%" copy /y "%BIN%\MDbgCore.dll" "%VISUALIZERS%" copy /y "%BIN%\CorApi.dll" "%VISUALIZERS%" copy /y "%BIN%\CorApiRaw.dll" "%VISUALIZERS%" echo Close all VS instances to finish.``` Update VS DebuggerVisualizers install script
```batchfile @echo off set VISUALIZERS=%USERPROFILE%\Documents\Visual Studio 14\Visualizers set BIN=%~dp0..\..\..\..\Binaries\Debug copy /y "%BIN%\Roslyn.DebuggerVisualizers.dll" "%VISUALIZERS%" copy /y "%BIN%\Roslyn.Test.PdbUtilities.dll" "%VISUALIZERS%" copy /y "%BIN%\System.Reflection.Metadata.dll" "%VISUALIZERS%" copy /y "%BIN%\System.Collections.Immutable.dll" "%VISUALIZERS%" copy /y "%BIN%\Microsoft.DiaSymReader.dll" "%VISUALIZERS%" echo Close all VS instances to finish.```
d06c3b72-d543-4055-8d9a-a31588e71e08
{ "language": "Batchfile" }
```batchfile @ECHO OFF python3 setup.py py2exe -d "%~dp0\" PAUSE``` Update script to generate standalone exe
```batchfile @ECHO OFF CD /D "%~dp0" SET "OutDir=Output" IF NOT EXIST "%OutDir%" ( MKDIR "%OutDir" ) python3 setup.py py2exe -d "%~dp0\%OutDir%" PAUSE```
d6625bd5-4158-43fa-a35b-e6d2c3ef763e
{ "language": "Batchfile" }
```batchfile rem ### Configuration which should be placed on server where app is deployed rem Environment where our app is deployed, configuration will be taken from corresponding dir @set APP_ENV="prod" rem Git repository with configuration. Absolute path should be used. @set CONFIG_FOLDER="properties" rem For secretProd env, ENCRYPT_KEY is required. rem Use encrypt.key if you pass it as -D option when running java @set ENCRYPT_KEY="secretEncryptKey" rem ### pushd .. rem For production mode (no stubs) use prod rem For developer mode (stubs and embedded Zookeeper) use env gradlew %* bootRun -Dspring.profiles.active=dev popd ``` Delete doublequotes from set properties values
```batchfile rem ### Configuration which should be placed on server where app is deployed rem Environment where our app is deployed, configuration will be taken from corresponding dir @set APP_ENV=prod rem Git repository with configuration. Absolute path should be used. @set CONFIG_FOLDER=properties rem For secretProd env, ENCRYPT_KEY is required. rem Use encrypt.key if you pass it as -D option when running java @set ENCRYPT_KEY=secretEncryptKey rem ### pushd .. rem For production mode (no stubs) use prod rem For developer mode (stubs and embedded Zookeeper) use env gradlew %* bootRun -Dspring.profiles.active=dev popd ```
15e53c15-5704-45a2-a3b7-3d022c288f27
{ "language": "Batchfile" }
```batchfile REM Set variables for Microsoft Visual Studio for Python 2.7 REM @call "C:\Users\michaelh3\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\vcvarsall.bat" amd64 REM Set environ as workaround for bugs (See http://stackoverflow.com/questions/2817869/error-unable-to-find-vcvarsall-bat and http://bugs.python.org/issue23246) REM SET DISTUTILS_USE_SDK=1 REM SET MSSdk=1 REM Test build python setup.py sdist bdist_wheel REM Upload to PyPi REM python setup.py sdist bdist_wheel upload ``` Use MSVC 14.0 (2015) for compiling Python 3.6
```batchfile REM Set variables for Microsoft Visual Studio for Python 2.7 REM @call "C:\Users\michaelh3\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\vcvarsall.bat" amd64 REM Set environ as workaround for bugs (See http://stackoverflow.com/questions/2817869/error-unable-to-find-vcvarsall-bat and http://bugs.python.org/issue23246) REM SET DISTUTILS_USE_SDK=1 REM SET MSSdk=1 @call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x86_amd64 REM Test build python setup.py sdist bdist_wheel REM Upload to PyPi REM python setup.py sdist bdist_wheel upload ```
aa1a818d-a530-41c1-9e44-5ab96fbbc14a
{ "language": "Batchfile" }
```batchfile @echo off start "" "C:\Program Files (x86)\Atlassian\SourceTree\SourceTree.exe" -f %~dpn1 ``` Remove trailing slash from directory
```batchfile @echo off set directory=%~f1 if %directory:~-1%==\ set directory=%directory:~0,-1% start "" "C:\Program Files (x86)\Atlassian\SourceTree\SourceTree.exe" -f %directory% ```
c895bc14-6a0f-43b9-8d48-8684cf1a1548
{ "language": "Batchfile" }
```batchfile ``` Create a script to allow building 32-bit and 64-bit Windows.
```batchfile echo off REM REM This batch file builds both 32-bit and 64-bit versions of the loader. REM It is assumed that the developer has run the update_external_sources.bat REM file prior to running this. REM REM Determine the appropriate CMake strings for the current version of Visual Studio echo Determining VS version python .\determine_vs_version.py > vsversion.tmp set /p VS_VERSION=< vsversion.tmp echo Detected Visual Studio Version as %VS_VERSION% REM Cleanup the file we used to collect the VS version output since it's no longer needed. del /Q /F vsversion.tmp rmdir /Q /S build rmdir /Q /S build32 REM ******************************************* REM 64-bit LoaderAndTools build REM ******************************************* mkdir build pushd build echo Generating 64-bit spirv-tools CMake files for Visual Studio %VS_VERSION% cmake -G "Visual Studio %VS_VERSION% Win64" .. echo Building 64-bit Debug LoaderAndTools msbuild ALL_BUILD.vcxproj /p:Platform=x64 /p:Configuration=Debug REM Check for existence of one DLL, even though we should check for all results if not exist .\loader\Debug\vulkan-1.dll ( echo. echo LoaderAndTools 64-bit Debug build failed! set errorCode=1 ) echo Building 64-bit Release LoaderAndTools msbuild ALL_BUILD.vcxproj /p:Platform=x64 /p:Configuration=Release REM Check for existence of one DLL, even though we should check for all results if not exist .\loader\Release\vulkan-1.dll ( echo. echo LoaderAndTools 64-bit Release build failed! set errorCode=1 ) popd REM ******************************************* REM 32-bit LoaderAndTools build REM ******************************************* mkdir build32 pushd build32 echo Generating 32-bit LoaderAndTools CMake files for Visual Studio %VS_VERSION% cmake -G "Visual Studio %VS_VERSION%" .. echo Building 32-bit Debug LoaderAndTools msbuild ALL_BUILD.vcxproj /p:Platform=x86 /p:Configuration=Debug REM Check for existence of one DLL, even though we should check for all results if not exist .\loader\Debug\vulkan-1.dll ( echo. echo LoaderAndTools 32-bit Debug build failed! set errorCode=1 ) echo Building 32-bit Release LoaderAndTools msbuild ALL_BUILD.vcxproj /p:Platform=x86 /p:Configuration=Release REM Check for existence of one DLL, even though we should check for all results if not exist .\loader\Release\vulkan-1.dll ( echo. echo LoaderAndTools 32-bit Release build failed! set errorCode=1 ) popd ```
1561a27d-3bfb-4709-be44-1879ede397bc
{ "language": "Batchfile" }
```batchfile ``` Add batch file for Windows
```batchfile @echo off rem Copyright (C) 2016 The Syncthing Authors. rem rem This Source Code Form is subject to the terms of the Mozilla Public rem License, v. 2.0. If a copy of the MPL was not distributed with this file, rem You can obtain one at http://mozilla.org/MPL/2.0/. rem This batch file should be run from the GOPATH. rem It expects to run on amd64, for windows-amd64 Go to be installed in C:\go rem and for windows-386 Go to be installed in C:\go-386. rem cURL should be installed in C:\Program Files\cURL. set ORIGPATH="C:\Program Files\cURL\bin";%PATH% set PATH=c:\go\bin;%ORIGPATH% set GOROOT=c:\go cd >gopath set /p GOPATH= <gopath cd src\github.com\syncthing\syncthing echo Initializing ^& cleaning go version git clean -fxd || goto error echo. echo Fetching extras mkdir extra curl -s -L -o extra/Getting-Started.pdf https://docs.syncthing.net/pdf/Getting-Started.pdf || goto :error curl -s -L -o extra/FAQ.pdf https://docs.syncthing.net/pdf/FAQ.pdf || goto :error echo. echo Testing go run build.go test || goto :error echo. echo Building (amd64) go run build.go zip || goto :error echo. set PATH=c:\go-386\bin;%ORIGPATH% set GOROOT=c:\go-386 echo building (386) go run build.go zip || goto :error echo. goto :EOF :error echo code #%errorlevel%. exit /b %errorlevel%```
02a00a9b-6836-4232-a960-8ce21e526f0c
{ "language": "Batchfile" }
```batchfile cd .. del/q scintilla.zip zip scintilla.zip scintilla\*.* scintilla\*\*.* -x *.o -x *.obj -x *.dll -x *.lib -x *.res -x *.exp cd scintilla ``` Store OS X files in zips.
```batchfile cd .. del/q scintilla.zip zip scintilla.zip scintilla\*.* scintilla\*\*.* scintilla\*\*\*.* scintilla\*\*\*\*.* scintilla\*\*\*\*\*.* -x *.o -x *.obj -x *.dll -x *.lib -x *.res -x *.exp cd scintilla ```
0e5a64f7-73c0-410e-a07a-e67cdac21473
{ "language": "Batchfile" }
```batchfile FOR /F "delims=" %%i in ('cygpath.exe -u "%SRC_DIR%\rust-nightly-install"') DO set "pfx=%%i" bash %SRC_DIR%\rust-nightly\install.sh --verbose --prefix=%pfx% --disable-ldconfig --components=rustc,cargo,rust-std-x86_64-pc-windows-msvc set "PATH=%SRC_DIR%\rust-nightly-install\bin;%PATH%" maturin build --no-sdist --release --strip --manylinux off --interpreter=%PYTHON% --rustc-extra-args="-C codegen-units=16 -C lto=thin -C target-cpu=native" FOR /F "delims=" %%i IN ('dir /s /b target\wheels\*.whl') DO set polars_wheel=%%i %PYTHON% -m pip install --ignore-installed --no-deps %polars_wheel% -vv ``` Set CMAKE generator for windows
```batchfile FOR /F "delims=" %%i in ('cygpath.exe -u "%SRC_DIR%\rust-nightly-install"') DO set "pfx=%%i" bash %SRC_DIR%\rust-nightly\install.sh --verbose --prefix=%pfx% --disable-ldconfig --components=rustc,cargo,rust-std-x86_64-pc-windows-msvc set "PATH=%SRC_DIR%\rust-nightly-install\bin;%PATH%" maturin build --no-sdist --release --strip --manylinux off --interpreter=%PYTHON% --rustc-extra-args="-C codegen-units=16 -C lto=thin -C target-cpu=native" FOR /F "delims=" %%i IN ('dir /s /b target\wheels\*.whl') DO set polars_wheel=%%i set "CMAKE_GENERATOR=NMake Makefiles" %PYTHON% -m pip install --ignore-installed --no-deps %polars_wheel% -vv ```
5a22e495-5e22-49e3-b630-b7e7d6294d43
{ "language": "Batchfile" }
```batchfile :: Build tcplotter command-line utilities using cmake :: Change working directory to archive directory cd "%PKG_NAME%" :: Create build directory cd "src" mkdir build if errorlevel 1 exit 1 cd build if errorlevel 1 exit 1 :: Build with cmake cmake -G "MinGW Makefiles" .. if errorlevel 1 exit 1 cmake --build . if errorlevel 1 exit 1 :: Install executables to bin directory cmake --build . --target install --prefix=%PREFIX% if errorlevel 1 exit 1 :: Install tcplotter cd "%SRC_DIR%" $PYTHON -m pip install . -vv``` Test setting C++ standard for Windows build
```batchfile :: Build tcplotter command-line utilities using cmake :: Change working directory to archive directory cd "%PKG_NAME%" :: Create build directory cd "src" mkdir build if errorlevel 1 exit 1 cd build if errorlevel 1 exit 1 :: Build with cmake cmake -G "MinGW Makefiles" .. if errorlevel 1 exit 1 cmake --build -DCMAKE_CXX_STANDARD=11 . if errorlevel 1 exit 1 :: Install executables to bin directory cmake --build . --target install --prefix=%PREFIX% if errorlevel 1 exit 1 :: Install tcplotter cd "%SRC_DIR%" $PYTHON -m pip install . -vv```
80d5ea9b-de43-4f19-809f-df069693fef7
{ "language": "Batchfile" }
```batchfile @echo off rem This will download the Kolibri windows installer artifact at the windows-2016 buildkite agent. rem After the installer successfully sign it will upload the signed installer at the Sign Windows installer pipeline artifact. set current_path=%cd% buildkite-agent.exe artifact download "installer/*.exe" . --step "Build kolibri windows installer" --build %BUILDKITE_BUILD_ID% --agent-access-token %BUILDKITE_AGENT_ACCESS_TOKEN% %WINDOWS_SIGN_SCRIPT_PATH% "%current_path%\installer" && buildkite-agent.exe artifact upload "installer/*.exe" ``` Fix uploaded installer path filename.
```batchfile @echo off rem This will download the Kolibri windows installer artifact at the windows-2016 buildkite agent. rem After the installer successfully sign it will upload the signed installer at the Sign Windows installer pipeline artifact. set current_path=%cd% buildkite-agent.exe artifact download "installer/*.exe" . --step "Build kolibri windows installer" --build %BUILDKITE_BUILD_ID% --agent-access-token %BUILDKITE_AGENT_ACCESS_TOKEN% %WINDOWS_SIGN_SCRIPT_PATH% "%current_path%\installer" && buildkite-agent.exe artifact upload "%current_path%\*.exe" ```
8676481b-8e36-41c2-89f2-47364eb04c1c
{ "language": "Batchfile" }
```batchfile ``` Test script for automating changes
```batchfile ECHO ON TITLE Automated Test Build for hobgoblin IF NOT EXIST test (mkdir test) SET /P _deltest= Clear contents of test dir? (y/n) IF "%_deltest%"=="y" GOTO :deltest IF "%_deltest%"=="n" GOTO :cdtest :deltest del test\js\*.js rmdir test\js :cdtest ECHO Entering test dir... cd test node ..\hobgoblin.js init -e index.html cd .. ```
b7108ee2-2201-4d8a-8568-0d7606318016
{ "language": "Batchfile" }
```batchfile @echo off cd C:\projects\spectre\src\Spectre.Angular2Client IF EXIST "C:\projects\spectre\src\Spectre.AngularClient\karma-tests.xml" ( powershell C:\projects\spectre\scripts\Upload-TestResult.ps1 -fileName C:\projects\spectre\src\Spectre.Angular2Client\karma-tests.xml ) IF EXIST "C:\projects\spectre\src\Spectre.AngularClient\protractor-tests.xml" ( powershell C:\projects\spectre\scripts\Upload-TestResult.ps1 -fileName C:\projects\spectre\src\Spectre.Angular2Client\protractor-tests.xml ) ``` Fix frontend test results uploader
```batchfile @echo off cd C:\projects\spectre\src\Spectre.Angular2Client IF EXIST "C:\projects\spectre\src\Spectre.AngularClient\karma-tests.xml" ( powershell C:\projects\spectre\scripts\Upload-TestResult.ps1 -fileName C:\projects\spectre\src\Spectre.AngularClient\karma-tests.xml ) IF EXIST "C:\projects\spectre\src\Spectre.AngularClient\protractor-tests.xml" ( powershell C:\projects\spectre\scripts\Upload-TestResult.ps1 -fileName C:\projects\spectre\src\Spectre.AngularClient\protractor-tests.xml ) ```
afa9db40-5d1e-40e0-8cb0-312f706d2954
{ "language": "Batchfile" }
```batchfile @echo off echo. echo == Create Translations files echo. set TARGET_DIR="..\extracted" echo. echo Unknwon-Horizons cd "%TARGET_DIR%\extracted\unknown-horizons\unknown-horizons-master\development\" python compile_translation_win.py dir "%TARGET_DIR%" ``` Update create-translation script to use gettext
```batchfile @echo off echo. echo == Create Translations files echo. set TARGET_DIR="..\extracted" set msgfmt "..\build-tools\gettext\bin\msgfmt.exe" echo. echo Unknwon-Horizons cd "%TARGET_DIR%\extracted\unknown-horizons\unknown-horizons-master\development" compile_translation_win.py dir "%TARGET_DIR%" ```
deb18cef-8140-4112-9ebc-8f7aae12718e
{ "language": "Batchfile" }
```batchfile ``` Add a rununittests script for Windows CE
```batchfile set DEPOT="%CD%" IF NOT EXIST mobility.pro GOTO NOSOURCE set CETESTCOMMAND=cetest -cache %QTDIR%\.qmake.cache -libpath \Windows IF NOT EXIST %DEPOT%\..\..\qa-dungeon\mainline\tests\wince\deploy\ GOTO SKIPDEPLOY cd %DEPOT%\..\..\qa-dungeon\mainline\tests\wince\deploy\ call %CETESTCOMMAND% :SKIPDEPLOY cd %DEPOT%\tests\auto\qcontact call %CETESTCOMMAND% cd %DEPOT%\tests\auto\qcontactactions\unittest call %CETESTCOMMAND% cd %DEPOT%\tests\auto\qcontactasync\unittest call %CETESTCOMMAND% cd %DEPOT%\tests\auto\qcontactdetail call %CETESTCOMMAND% cd %DEPOT%\tests\auto\qcontactdetaildefinition call %CETESTCOMMAND% cd %DEPOT%\tests\auto\qcontactdetails call %CETESTCOMMAND% cd %DEPOT%\tests\auto\qcontactfilter call %CETESTCOMMAND% cd %DEPOT%\testsauto\qcontactgroup call %CETESTCOMMAND% cd %DEPOT%\tests\auto\qcontactmanager call %CETESTCOMMAND% cd %DEPOT%\tests\auto\qcontactmanagerfiltering call %CETESTCOMMAND% cd %DEPOT%\tests\auto\qcontactmanagerplugins\unittest call %CETESTCOMMAND% GOTO EOF :NOSOURCE echo "Unable to find mobility.pro check current directory is QtContacts source" GOTO EOF :EOF cd %DEPOT% ```
5e6ea4b0-45ad-45ef-a956-e169f715b433
{ "language": "Batchfile" }
```batchfile md build cd build cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CONFIGURATION_TYPES=Release -G "Visual Studio 14 2015" .. devenv openrhythm.sln /build cd .. pause ``` Update windows build script to specify x64 builds.
```batchfile md build cd build cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CONFIGURATION_TYPES=Release -G "Visual Studio 14 2015 Win64" .. devenv openrhythm.sln /build cd .. pause ```
8eaeded9-7b04-4506-bee7-b48746d00903
{ "language": "Batchfile" }
```batchfile @echo off SETLOCAL EnableExtensions EnableDelayedExpansion if [%1] EQU [MSIONLY] goto BUILD_MSI if [%2] EQU [NOSIGN] (SET DEBUG_CFG=Debug_NoSign) ELSE (SET DEBUG_CFG=Debug) del *.log for %%x in (Win7, Win8, Win8.1, Win10, XP) do ( for %%y in (%DEBUG_CFG%, Release) do ( for %%z in (win32, x64) do ( call tools\vs_run.bat UsbDk.sln /Rebuild "%%x %%y|%%z" /Out build%%y_%%x_%%z.log if !ERRORLEVEL! NEQ 0 exit /B 1 ) ) ) if [%1] EQU [NOMSI] goto NOMSI :BUILD_MSI pushd Tools\Installer SET UsbDkVersion="%USBDK_MAJOR_VERSION%.%USBDK_MINOR_VERSION%.%USBDK_BUILD_NUMBER%" buildmsi.bat %2 popd :NOMSI ENDLOCAL ``` Build TMF files after building all binaries
```batchfile @echo off SETLOCAL EnableExtensions EnableDelayedExpansion if [%1] EQU [MSIONLY] goto BUILD_MSI if [%2] EQU [NOSIGN] (SET DEBUG_CFG=Debug_NoSign) ELSE (SET DEBUG_CFG=Debug) del *.log for %%x in (Win7, Win8, Win8.1, Win10, XP) do ( for %%y in (%DEBUG_CFG%, Release) do ( for %%z in (win32, x64) do ( call tools\vs_run.bat UsbDk.sln /Rebuild "%%x %%y|%%z" /Out build%%y_%%x_%%z.log if !ERRORLEVEL! NEQ 0 exit /B 1 ) ) ) pushd Install "C:\Program Files (x86)\Windows Kits\10\bin\x86\tracepdb.exe" -s -o .\UsbDk.tmf if !ERRORLEVEL! NEQ 0 exit /B 1 popd pushd Install_Debug "C:\Program Files (x86)\Windows Kits\10\bin\x86\tracepdb.exe" -s -o .\UsbDk.tmf if !ERRORLEVEL! NEQ 0 exit /B 1 popd if [%1] EQU [NOMSI] goto NOMSI :BUILD_MSI pushd Tools\Installer SET UsbDkVersion="%USBDK_MAJOR_VERSION%.%USBDK_MINOR_VERSION%.%USBDK_BUILD_NUMBER%" buildmsi.bat %2 popd :NOMSI ENDLOCAL ```
cf1336ad-b73a-4718-8f32-8b396742617d
{ "language": "Batchfile" }
```batchfile @rem Tune environment: @set COMPILER_CFG_SCRIPT=C:\Program Files\Microsoft Visual Studio .NET 2003\Common7\Tools\vsvars32.bat @set JAVA_HOME=C:\ws\bin\jdk1.5.0_06 @set ANT_HOME=C:\ws\bin\apache-ant-1.6.5 @set SVN_HOME=C:\ws\bin\svn-win32-1.4.2 @set ANT_OPTS=-XX:MaxPermSize=512m -Xmx1000M -Dhttp.proxyHost=my.proxy.com -Dhttp.proxyPort=1111 @set PATH=%SVN_HOME%/bin;%PATH%;%ANT_HOME%/bin @set CLASSPATH=./build/classes @call "%COMPILER_CFG_SCRIPT%" call ant %* 2>&1 ``` Correct path separators for; use working directory expansion to setup classpath
```batchfile @rem Tune environment: @set COMPILER_CFG_SCRIPT=C:\Program Files\Microsoft Visual Studio .NET 2003\Common7\Tools\vsvars32.bat @set JAVA_HOME=C:\ws\bin\jdk1.5.0_06 @set ANT_HOME=C:\ws\bin\apache-ant-1.6.5 @set SVN_HOME=C:\ws\bin\svn-win32-1.4.2 @set ANT_OPTS=-XX:MaxPermSize=512m -Xmx1000M -Dhttp.proxyHost=my.proxy.com -Dhttp.proxyPort=1111 @set PATH=%SVN_HOME%\bin;%PATH%;%ANT_HOME%\bin @set CLASSPATH=%~dp0\build\classes @call "%COMPILER_CFG_SCRIPT%" call ant %* 2>&1 ```
6c2a2bcd-2516-46ca-b1dd-78ccdb90d63d
{ "language": "Batchfile" }
```batchfile ``` Add a one-shot, first-time Windows setup script
```batchfile :: A one-shot, first-time Windows configuration script that disables some :: Windows misfeatures and sets paths to my usual preferences. I wish this :: script could do more, especially to disable Windows' built-in adware and :: spyware, but following Microsoft's usual mediocrity, Windows remains a :: toy operating system with most configuration inaccessible to scripts. :: Annoyances set key="HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced" reg add "%key%" /f /v TaskbarGlomLevel /t REG_DWORD /d 2 reg add "%key%" /f /v HideFileExt /t REG_DWORD /d 0 reg add "%key%" /f /v ShowCortanaButton /t REG_DWORD /d 0 reg add "%key%" /f /v ShowTaskViewButton /t REG_DWORD /d 0 reg add "%key%" /f /v StoreAppsOnTaskbar /t REG_DWORD /d 0 reg add "%key%" /f /v MultiTaskingAltTabFilter /t REG_DWORD /d 3 reg add "%key%" /f /v JointResize /t REG_DWORD /d 0 reg add "%key%" /f /v SnapFill /t REG_DWORD /d 0 reg add "%key%" /f /v SnapAssist /t REG_DWORD /d 0 set key="HKCU\Software\Microsoft\Windows\CurrentVersion\Feeds" reg add "%key%" /f /v ShellFeedsTaskbarViewMode /t REG_DWORD /d 2 :: Paths setx GOBIN "%USERPROFILE%\bin" setx GOPATH "%TEMP%\go" setx PATH "%PATH%;%USERPROFILE%\bin;%USERPROFILE%\go\bin" :: Reload taskkill /f /im explorer.exe start explorer.exe ```
da18332c-cb69-4683-8766-684da95c015b
{ "language": "Batchfile" }
```batchfile echo on cd /d "%~dp0" xcopy "%1" ..\..\OSVR-Unity\Assets\Plugins\%3\ /Y xcopy "%2osvr*.dll" ..\..\OSVR-Unity\Assets\Plugins\%3\ /Y ``` Copy the redist files with the Managed-OSVR wrapper.
```batchfile echo on cd /d "%~dp0" xcopy "%1" ..\..\OSVR-Unity\Assets\Plugins\%3\ /Y xcopy "%2osvr*.dll" ..\..\OSVR-Unity\Assets\Plugins\%3\ /Y xcopy "%2msvc*.dll" ..\..\OSVR-Unity\Assets\Plugins\%3\ /Y ```
a5b68ed9-f820-4708-bfda-0ed455a9aa21
{ "language": "Batchfile" }
```batchfile @echo off :: Copyright 2020 The Pigweed Authors :: :: 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 :: :: https://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. :: Pigweed Windows environment setup. :: Calls a Powershell script that determines the correct PW_ROOT directory and :: exports it as an environment variable. for /F "usebackq tokens=1" %%i in (`powershell %%~dp0..\..\pw_env_setup\env_setup.ps1`) do set PW_ROOT=%%i set shell_file="%PW_ROOT%\pw_env_setup\.env_setup.bat" if not exist %shell_file% ( call python %PW_ROOT%\pw_env_setup\py\pw_env_setup\env_setup.py --pw-root %PW_ROOT% --shell-file %shell_file% ) call %shell_file% ``` Add markers for recipe env testing
```batchfile @echo off :: Copyright 2020 The Pigweed Authors :: :: 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 :: :: https://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. :: Pigweed Windows environment setup. :: Calls a Powershell script that determines the correct PW_ROOT directory and :: exports it as an environment variable. :: LUCI DELETE BEGIN :: The ~dp0 magic doesn't work when this batch script is launched from another :: batch script. So when testing on Windows we write a copy of this batch :: script that assumes PW_ROOT is already set. Then the batch script we run :: directly sets PW_ROOT, calls the copy of this batch script and runs :: 'pw presubmit'. for /F "usebackq tokens=1" %%i in (`powershell %%~dp0..\..\pw_env_setup\env_setup.ps1`) do set PW_ROOT=%%i :: LUCI DELETE END set shell_file="%PW_ROOT%\pw_env_setup\.env_setup.bat" if not exist %shell_file% ( call python %PW_ROOT%\pw_env_setup\py\pw_env_setup\env_setup.py --pw-root %PW_ROOT% --shell-file %shell_file% ) call %shell_file% ```
2c6af65d-6fcb-464d-b729-92894e14a458
{ "language": "Batchfile" }
```batchfile @echo off set NaturalDocsParams= rem Shift and loop so we can get more than nine parameters. rem This is especially important if we have spaces in file names. :MORE if "%1"=="" goto NOMORE set NaturalDocsParams=%NaturalDocsParams% %1 shift goto MORE :NOMORE perl NaturalDocs %NaturalDocsParams% set NaturalDocsParams=``` Make the Wndows batch callable from any directory
```batchfile @perl %~dp0NaturalDocs %*```
2f986d1f-b036-48cf-80ce-66578813d6be
{ "language": "Batchfile" }
```batchfile curl -sSf https://static.rust-lang.org/dist/rust-1.10.0-i686-pc-windows-msvc.exe -o rust.exe rust.exe /VERYSILENT /NORESTART /DIR="C:\Rust" set PATH=%PATH%;C:\Rust\bin curl -sSf http://releases.llvm.org/%LLVM_VERSION%/LLVM-%LLVM_VERSION%-win32.exe -o LLVM.exe 7z x LLVM.exe -oC:\LLVM set PATH=%PATH%;C:\LLVM\bin set LIBCLANG_PATH=C:\LLVM\bin ``` Update Rust version used by Appveyor
```batchfile curl -sSf https://static.rust-lang.org/dist/rust-1.22.1-i686-pc-windows-msvc.exe -o rust.exe rust.exe /VERYSILENT /NORESTART /DIR="C:\Rust" set PATH=%PATH%;C:\Rust\bin curl -sSf http://releases.llvm.org/%LLVM_VERSION%/LLVM-%LLVM_VERSION%-win32.exe -o LLVM.exe 7z x LLVM.exe -oC:\LLVM set PATH=%PATH%;C:\LLVM\bin set LIBCLANG_PATH=C:\LLVM\bin ```
e7564a39-c036-4ec9-832b-ca4510797f20
{ "language": "Batchfile" }
```batchfile ``` Add batch file to run Python unit tests on Windows
```batchfile @echo off set PATH=%PATH%;..\..\..\sandbox\bin\v140\Debug set PYTHONPATH=%PYTHONPATH%;..\..\..\sandbox\bin\v140\Debug python runtests.py pause ```
3d0e25d8-9f91-4839-a2d4-bb40a5916d76
{ "language": "Batchfile" }
```batchfile @echo off set VISUALIZERS=%USERPROFILE%\Documents\Visual Studio 14\Visualizers set BIN=%~dp0..\..\..\..\Binaries\Debug copy /y "%BIN%\Roslyn.DebuggerVisualizers.dll" "%VISUALIZERS%" copy /y "%BIN%\Roslyn.Test.PdbUtilities.dll" "%VISUALIZERS%" copy /y "%BIN%\System.Reflection.Metadata.dll" "%VISUALIZERS%" copy /y "%BIN%\System.Collections.Immutable.dll" "%VISUALIZERS%" copy /y "%BIN%\Microsoft.DiaSymReader.dll" "%VISUALIZERS%" echo Close all VS instances to finish.``` Update path to VS visualizers
```batchfile @echo off set VISUALIZERS=%USERPROFILE%\Documents\Visual Studio 2015\Visualizers set BIN=%~dp0..\..\..\Binaries\Debug copy /y "%BIN%\Roslyn.DebuggerVisualizers.dll" "%VISUALIZERS%" copy /y "%BIN%\Roslyn.Test.PdbUtilities.dll" "%VISUALIZERS%" copy /y "%BIN%\System.Reflection.Metadata.dll" "%VISUALIZERS%" copy /y "%BIN%\System.Collections.Immutable.dll" "%VISUALIZERS%" copy /y "%BIN%\Microsoft.DiaSymReader.dll" "%VISUALIZERS%" echo Close all VS instances to finish.```
573ba6a1-f8bf-44a3-9e39-85ca5c991c8e
{ "language": "Batchfile" }
```batchfile /** * Copyright (c) 2015-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. */ ``` Fix comments on .bat file
```batchfile :: Copyright (c) 2015-present, Facebook, Inc. :: All rights reserved. :: :: This source code is licensed under the BSD-style license found in the :: LICENSE file in the root directory of this source tree. An additional grant :: of patent rights can be found in the PATENTS file in the same directory. ```
3ff6b3f8-989f-4051-ae0a-27270892592d
{ "language": "Batchfile" }
```batchfile @ECHO OFF SET ROOTDIR=%WRAPPER_HOME% if "%ROOTDIR%"=="" ( set ROOTDIR=%~dp0 ) SET data=%1 shift SET model=%1 shift : create var with remaining arguments set r=%1 :loop shift if [%1]==[] goto done set r=%r% %1 goto loop :done if [%PYTHON_BIN%]==[] goto nopython %PYTHON_BIN% %ROOTDIR%\FileJsonPyTorch\gate-lf-pytorch-json\train.py %data% %model% %r% goto exit :nopython python %ROOTDIR%\FileJsonPyTorch\gate-lf-pytorch-json\train.py %data% %model% %r% :exit ``` Tag the windows script, so we can see if we get the right one
```batchfile @ECHO OFF REM 001 SET ROOTDIR=%WRAPPER_HOME% if "%ROOTDIR%"=="" ( set ROOTDIR=%~dp0 ) SET data=%1 shift SET model=%1 shift : create var with remaining arguments set r=%1 :loop shift if [%1]==[] goto done set r=%r% %1 goto loop :done if [%PYTHON_BIN%]==[] goto nopython %PYTHON_BIN% %ROOTDIR%\FileJsonPyTorch\gate-lf-pytorch-json\train.py %data% %model% %r% goto exit :nopython python %ROOTDIR%\FileJsonPyTorch\gate-lf-pytorch-json\train.py %data% %model% %r% :exit ```
f172dcc8-8def-4bd6-99b0-1e7e85e26f32
{ "language": "Batchfile" }
```batchfile @echo off set DIST_DIR=dist set CERTIFICATE_PATH=%USERPROFILE%\certificates\nuxeo.com.pfx set MSI_PROGRAM_NAME="Nuxeo Drive" set TIMESTAMP_URL=http://timestamp.verisign.com/scripts/timstamp.dll set SIGN_CMD=signtool sign /v /f %CERTIFICATE_PATH% /d %MSI_PROGRAM_NAME% /t %TIMESTAMP_URL% set VERIFY_CMD=signtool verify /v /pa FOR %%F IN (%DIST_DIR%\*.msi) DO ( echo --------------------------------------------- echo Signing %%F echo --------------------------------------------- echo %SIGN_CMD% %%F %SIGN_CMD% %%F echo --------------------------------------------- echo Verifying %%F echo --------------------------------------------- echo %VERIFY_CMD% %%F %VERIFY_CMD% %%F ) ``` Use quotes around PFX certificate path in msi signing batch script
```batchfile @echo off set DIST_DIR=dist set CERTIFICATE_PATH="%USERPROFILE%\certificates\nuxeo.com.pfx" set MSI_PROGRAM_NAME="Nuxeo Drive" set TIMESTAMP_URL=http://timestamp.verisign.com/scripts/timstamp.dll set SIGN_CMD=signtool sign /v /f %CERTIFICATE_PATH% /d %MSI_PROGRAM_NAME% /t %TIMESTAMP_URL% set VERIFY_CMD=signtool verify /v /pa FOR %%F IN (%DIST_DIR%\*.msi) DO ( echo --------------------------------------------- echo Signing %%F echo --------------------------------------------- echo %SIGN_CMD% %%F %SIGN_CMD% %%F echo --------------------------------------------- echo Verifying %%F echo --------------------------------------------- echo %VERIFY_CMD% %%F %VERIFY_CMD% %%F ) ```
c17c0d2e-21f6-4929-9a41-79791f7869db
{ "language": "Batchfile" }
```batchfile @pushd %~dp0 ECHO Remember to build the solution first! REM pause Cd "%~dp0\TestHarness\packages\NUnit.Runners.*\tools" "nunit-console.exe" "%~dp0\TestHarness\nunit\bin\Debug\nunitHarness.dll" /result="%~dp0\results-example-nunit.xml" /nologo /nodots pause @popd``` Add ability to create specrun report
```batchfile @pushd %~dp0 ECHO Remember to build the solution first! REM pause Cd "%~dp0\TestHarness\packages\NUnit.Runners.*\tools" "nunit-console.exe" "%~dp0\TestHarness\nunit\bin\Debug\nunitHarness.dll" /result="%~dp0\results-example-nunit.xml" /nologo /nodots Cd "%~dp0\TestHarness\packages\SpecRun.Runner.*\tools" "specrun.exe" run default.srprofile "/baseFolder:%~dp0\TestHarness\SpecRun\bin\Debug" /log:specrun.log /report:"%~dp0\results-example-specrun.html" pause @popd```
2a2bf5e5-ab0a-4556-96a1-f1711741df6d
{ "language": "Batchfile" }
```batchfile SETLOCAL SET MSBUILD="%ProgramFiles(x86)%\MSBuild\14.0\Bin\MSBuild.exe" SET NUGET="%ProgramFiles(x86)%\MSBuild\14.0\Bin\Nuget.exe" SET MSTEST="%ProgramFiles(x86)%\Microsoft Visual Studio 14.0\Common7\IDE\MSTest.exe" REM Dump the environment variables. SET FAILED=0 SET CD bigquery\api\BigQueryUtil %NUGET% restore %MSBUILD% && %MSTEST% /testcontainer:test\bin\debug\test.dll || SET FAILED=1 CD ..\GettingStarted %NUGET% restore %MSBUILD% && %MSTEST% /testcontainer:test\bin\debug\test.dll || SET FAILED=1 CD ..\..\..\storage\api %NUGET% restore %MSBUILD% && %MSTEST% /testcontainer:test\bin\debug\test.dll || SET FAILED=1 CD ..\..\auth %NUGET% restore %MSBUILD% && %MSTEST% /testcontainer:test\bin\debug\test.dll || SET FAILED=1 @ECHO OFF IF %FAILED% NEQ 0 GOTO failed_case ENDLOCAL ECHO SUCCEEDED EXIT /b :failed_case ENDLOCAL ECHO FAILED EXIT /b 1 ``` Stop dumping the environment variables.
```batchfile SETLOCAL SET MSBUILD="%ProgramFiles(x86)%\MSBuild\14.0\Bin\MSBuild.exe" SET NUGET="%ProgramFiles(x86)%\MSBuild\14.0\Bin\Nuget.exe" SET MSTEST="%ProgramFiles(x86)%\Microsoft Visual Studio 14.0\Common7\IDE\MSTest.exe" SET FAILED=0 CD bigquery\api\BigQueryUtil %NUGET% restore %MSBUILD% && %MSTEST% /testcontainer:test\bin\debug\test.dll || SET FAILED=1 CD ..\GettingStarted %NUGET% restore %MSBUILD% && %MSTEST% /testcontainer:test\bin\debug\test.dll || SET FAILED=1 CD ..\..\..\storage\api %NUGET% restore %MSBUILD% && %MSTEST% /testcontainer:test\bin\debug\test.dll || SET FAILED=1 CD ..\..\auth %NUGET% restore %MSBUILD% && %MSTEST% /testcontainer:test\bin\debug\test.dll || SET FAILED=1 @ECHO OFF IF %FAILED% NEQ 0 GOTO failed_case ENDLOCAL ECHO SUCCEEDED EXIT /b :failed_case ENDLOCAL ECHO FAILED EXIT /b 1 ```
807968c6-c604-44bb-a09c-f9feefc8cf2e
{ "language": "Batchfile" }
```batchfile @echo off set AVALON_LABEL=Mindbender %~dp0bin\windows\python36\python.exe -u %~dp0avalon.py``` Add backwards compatibility for fellow freelancers
```batchfile @echo off :: Backwards compatibility if not defined AVALON_PROJECTS set AVALON_PROJECTS=%MINDBENDER_PROJECTS% if not defined AVALON_MONGO set AVALON_MONGO=%MINDBENDER_MONGO% if not defined AVALON_LOCATION set AVALON_LOCATION=%MINDBENDER_LOCATION% set AVALON_LABEL=Mindbender %~dp0bin\windows\python36\python.exe -u %~dp0avalon.py```
4776cd08-ee12-4c38-943d-0198165363d3
{ "language": "Batchfile" }
```batchfile mkdir build cd build if errorlevel 1 exit /b 1 :: Other codecs cannot be enabled because they are not on conda-forge cmake .. -GNinja ^ -DCMAKE_INSTALL_PREFIX="%PREFIX%" ^ -DCMAKE_INSTALL_LIBDIR=lib ^ -DCMAKE_BUILD_TYPE=Release ^ -DBUILD_SHARED_LIBS=ON ^ -DAVIF_BUILD_TESTS=ON ^ -DAVIF_CODEC_AOM=ON ^ -DAVIF_CODEC_SVT=OFF ^ -DAVIF_CODEC_DAV1D=OFF ^ -DAVIF_CODEC_LIBGAV1=OFF if errorlevel 1 exit /b 1 ninja if errorlevel 1 exit /b 1 .\aviftest ..\tests\data\ if errorlevel 1 exit /b 1 ninja install if errorlevel 1 exit /b 1 ``` Use correct install path for Windows
```batchfile mkdir build cd build if errorlevel 1 exit /b 1 :: Other codecs cannot be enabled because they are not on conda-forge cmake .. -GNinja ^ -DCMAKE_INSTALL_PREFIX:PATH="%LIBRARY_PREFIX%" ^ -DCMAKE_PREFIX_PATH:PATH="%LIBRARY_PREFIX%" ^ -DCMAKE_INSTALL_LIBDIR=lib ^ -DCMAKE_BUILD_TYPE=Release ^ -DBUILD_SHARED_LIBS=ON ^ -DAVIF_BUILD_TESTS=ON ^ -DAVIF_CODEC_AOM=ON ^ -DAVIF_CODEC_SVT=OFF ^ -DAVIF_CODEC_DAV1D=OFF ^ -DAVIF_CODEC_LIBGAV1=OFF if errorlevel 1 exit /b 1 ninja if errorlevel 1 exit /b 1 .\aviftest ..\tests\data\ if errorlevel 1 exit /b 1 ninja install if errorlevel 1 exit /b 1 ```
c7bd38c5-cab7-4b1a-bb21-8849c7f64f30
{ "language": "Batchfile" }
```batchfile cd .. del/q scite.zip zip scite.zip scintilla\*.* scintilla\*\*.* scite\*.* scite\*\*.* scite\*\*\*.* scite\*\*\*\*.* -x *.o -x *.obj -x *.lib -x *.dll -x *.exe -x *.pdb -x *.res -x *.exp -x *.ncb -x *.sbr -x *.ilk -x *.idb cd scite ``` Exclude profiler fiels from zip.
```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 -x *.dpsession cd scite ```
e6be2c5f-3c4c-422c-9812-7e868dc36cfa
{ "language": "Batchfile" }
```batchfile @echo off set PROTOC=%~dp0\depends\\protoc.exe set PROTOBUF=%~dp0\depends\protobuf-2.5.0 set GTEST=%~dp0\depends\gtest-1.7.0 set ZLIB=%~dp0\depends\zlib-1.2.8 set WTL80=%~dp0\depends\wtl80\ set GYP=%~dp0\depends\gyp call %gyp%\gyp.bat --depth %~dp0 -I build\common.gypi -G msvs_version=2012 python build_x86_x64_together.py ``` Support MSVS 2013 by setting environment variable MSVS_VERSION.
```batchfile @echo off set PROTOC=%~dp0\depends\protoc.exe set PROTOBUF=%~dp0\depends\protobuf-2.5.0 set GTEST=%~dp0\depends\gtest-1.7.0 set ZLIB=%~dp0\depends\zlib-1.2.8 set WTL80=%~dp0\depends\wtl80\ set GYP=%~dp0\depends\gyp if not defined MSVS_VERSION set MSVS_VERSION=2012 call %gyp%\gyp.bat --depth %~dp0 -I build\common.gypi -G msvs_version=%MSVS_VERSION% python build_x86_x64_together.py ```
1966a2a1-2fbd-41cc-92f1-06c0dd5356f4
{ "language": "Batchfile" }
```batchfile @echo off call monetdb-clients-config --internal rem must be aligned with the installation directory chosen in rem clients/src/python/test/Makefile.ag set testpath=%TSTSRCBASE%\..\python\test set PYTHONPATH=%testpath%;%PYTHONPATH% prompt # $t $g echo on python %testpath%/runtests.py ``` Use quotes around file names.
```batchfile @echo off call monetdb-clients-config --internal rem must be aligned with the installation directory chosen in rem clients/src/python/test/Makefile.ag set testpath=%TSTSRCBASE%\..\python\test set PYTHONPATH=%testpath%;%PYTHONPATH% prompt # $t $g echo on python "%testpath%/runtests.py" ```
77864be3-70a7-4d3b-afa4-20279e24c4ab
{ "language": "Batchfile" }
```batchfile @ECHO OFF set LIBDIR=lib set LOCALCLASSPATH=build/fop.jar set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\xml-apis.jar set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\xercesImpl-2.2.1.jar set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\xalan-2.4.1.jar set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\batik.jar set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\avalon-framework-cvs-20020806.jar set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\jimi-1.0.jar set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\jai_core.jar set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\jai_codec.jar java -cp %LOCALCLASSPATH% org.apache.fop.apps.Fop %1 %2 %3 %4 %5 %6 %7 %8``` Update for new Avalon Framework version
```batchfile @ECHO OFF set LIBDIR=lib set LOCALCLASSPATH=build/fop.jar set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\xml-apis.jar set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\xercesImpl-2.2.1.jar set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\xalan-2.4.1.jar set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\batik.jar set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\avalon-framework-4.1.4.jar set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\jimi-1.0.jar set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\jai_core.jar set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\jai_codec.jar java -cp %LOCALCLASSPATH% org.apache.fop.apps.Fop %1 %2 %3 %4 %5 %6 %7 %8```
190a6e80-9a5b-4fb7-8756-371dd3633fb8
{ "language": "Batchfile" }
```batchfile ``` Add script to find latest oneAPI compiler environment script.
```batchfile for /f "tokens=* usebackq" %%f in (`dir /b "C:\Program Files (x86)\Intel\oneAPI\compiler\" ^| findstr /V latest ^| sort`) do @set "LATEST_VERSION=%%f" echo "C:\Program Files (x86)\Intel\oneAPI\compiler\%LATEST_VERSION%\env\vars.bat" echo "::set-output name=env_bat::C:\Program Files (x86)\Intel\oneAPI\compiler\%LATEST_VERSION%\env\vars.bat" ```
0845e9d6-de9a-4bbc-a73a-86d231e38fc7
{ "language": "Batchfile" }
```batchfile if not exist .git exit 1 git describe --tags --dirty if errorlevel 1 exit 1 for /f "delims=" %%i in ('git describe') do set gitdesc=%%i if errorlevel 1 exit 1 echo "%gitdesc%" if not "%gitdesc%"=="1.8.1" exit 1 git status if errorlevel 1 exit 1 set PYTHONPATH=. python -c "import conda_build; assert conda_build.__version__ == '1.8.1', conda_build.__version__" if errorlevel 1 exit 1 ``` Print the git diff for debug purposes in a test
```batchfile if not exist .git exit 1 git describe --tags --dirty if errorlevel 1 exit 1 for /f "delims=" %%i in ('git describe') do set gitdesc=%%i if errorlevel 1 exit 1 echo "%gitdesc%" if not "%gitdesc%"=="1.8.1" exit 1 git status if errorlevel 1 exit 1 git diff if errorlevel 1 exit 1 set PYTHONPATH=. python -c "import conda_build; assert conda_build.__version__ == '1.8.1', conda_build.__version__" if errorlevel 1 exit 1 ```
a6fc15b2-8951-41f0-bec3-783d12c8a155
{ "language": "Batchfile" }
```batchfile @ECHO OFF call "%WIN_SDK_ROOT%\%WINDOWS_SDK_VERSION%\Setup\WindowsSdkVer.exe" -q -version:%WINDOWS_SDK_VERSION% call "%WIN_SDK_ROOT%\%WINDOWS_SDK_VERSION%\Bin\SetEnv.cmd" ECHO Downloading DLL files IF %PYTHON_ARCH% == 64 ( call appveyor DownloadFile "ftp://ftp.fftw.org/pub/fftw/fftw-3.3.4-dll64.zip" SET FFTW_DLL_FILENAME=fftw-3.3.4-dll64.zip ) ELSE ( call appveyor DownloadFile "ftp://ftp.fftw.org/pub/fftw/fftw-3.3.4-dll32.zip" SET FFTW_DLL_FILENAME=fftw-3.3.4-dll32.zip ) call ls pyfftw ECHO Extracting DLLs from %FFTW_DLL_FILENAME% call 7z.exe e %FFTW_DLL_FILENAME% -opyfftw *.dll call 7z.exe e %FFTW_DLL_FILENAME% -opyfftw *.def ECHO Generating def files call lib /def:pyfftw\libfftw3-3.def call lib /def:pyfftw\libfftw3f-3.def call lib /def:pyfftw\libfftw3l-3.def ``` Set the lib machine explicitly.
```batchfile @ECHO OFF call "%WIN_SDK_ROOT%\%WINDOWS_SDK_VERSION%\Setup\WindowsSdkVer.exe" -q -version:%WINDOWS_SDK_VERSION% call "%WIN_SDK_ROOT%\%WINDOWS_SDK_VERSION%\Bin\SetEnv.cmd" ECHO Downloading DLL files IF %PYTHON_ARCH% == 64 ( call appveyor DownloadFile "ftp://ftp.fftw.org/pub/fftw/fftw-3.3.4-dll64.zip" SET MACHINE=X64 SET FFTW_DLL_FILENAME=fftw-3.3.4-dll64.zip ) ELSE ( call appveyor DownloadFile "ftp://ftp.fftw.org/pub/fftw/fftw-3.3.4-dll32.zip" SET MACHINE=X86 SET FFTW_DLL_FILENAME=fftw-3.3.4-dll32.zip ) call ls pyfftw ECHO Extracting DLLs from %FFTW_DLL_FILENAME% call 7z.exe e %FFTW_DLL_FILENAME% -opyfftw *.dll call 7z.exe e %FFTW_DLL_FILENAME% -opyfftw *.def ECHO Generating def files call lib /machine:%MACHINE% /def:pyfftw\libfftw3-3.def call lib /machine:%MACHINE% /def:pyfftw\libfftw3f-3.def call lib /machine:%MACHINE% /def:pyfftw\libfftw3l-3.def ```
4d9acabb-e93f-41da-8134-ec6c79614307
{ "language": "Batchfile" }
```batchfile @echo off set SELF_PATH=%~dp0 call %SELF_PATH%\env.bat mkdir qtcreator-latest mklink /D %QT_DIR% qtcreator-latest\Qt if "%VERSION%"=="" set VERSION=debug echo %VERSION%>qtcreator-latest\version if exist qtcreator-latest/src goto build mkdir download if not exist download/src.zip curl -fsSLk -o download\src.zip http://download.qt.io/official_releases/qtcreator/4.3/4.3.1/qt-creator-opensource-src-4.3.1.zip unzip -qq download\src.zip -d qtcreator-latest move qtcreator-latest\qt-creator* qtcreator-latest\src :build if exist qtcreator-latest\compiled\bin\qtcreator.exe goto end mkdir qtcreator-latest\compiled cd qtcreator-latest\compiled qmake QMAKE_CXXFLAGS+=/MP ..\src nmake /S cd ..\.. :end ``` Remove unnecessary data from cache.
```batchfile @echo off set SELF_PATH=%~dp0 call %SELF_PATH%\env.bat mkdir qtcreator-latest mklink /D %QT_DIR% qtcreator-latest\Qt if "%VERSION%"=="" set VERSION=debug echo %VERSION%>qtcreator-latest\version if exist qtcreator-latest/src goto build mkdir download if not exist download/src.zip curl -fsSLk -o download\src.zip http://download.qt.io/official_releases/qtcreator/4.3/4.3.1/qt-creator-opensource-src-4.3.1.zip unzip -qq download\src.zip -d qtcreator-latest move qtcreator-latest\qt-creator* qtcreator-latest\src :build if exist qtcreator-latest\compiled\bin\qtcreator.exe goto end mkdir qtcreator-latest\compiled cd qtcreator-latest\compiled qmake QMAKE_CXXFLAGS+=/MP ..\src nmake /S rd /Q /S src cd ..\.. :end ```
84f05d0c-2273-4153-8a12-9b988486a616
{ "language": "Batchfile" }
```batchfile @echo off rem ======================================================= rem Settings rem ======================================================= set Platform=Win64 set BuildMode=Test set SessioName=Release set SessionOwner=AutoBuild rem ======================================================= rem Release variables rem ======================================================= set VersionName=%1 set InputProject=%2 set OutputDir=%3 set UAT=%4 rem ======================================================= rem Run UAT rem ======================================================= %UAT% -ScriptsForProject=%InputProject% BuildCookRun -project=%InputProject% -noP4 -clientconfig=%BuildMode% -serverconfig=%BuildMode% -ue4exe=UE4Editor-Cmd.exe -utf8output -platform=%Platform% -targetplatform=%Platform% -build -cook -allmaps -unversionedcookedcontent -pak -prereqs -createreleaseversion=%VersionName% -distribution -nodebuginfo -compressed -stage -package -stagingdirectory=%OutputDir% -cmdline=" -Messaging" -addcmdline="-SessionOwner='%SessionOwner%' -SessionName='%SessioName%'" ``` Stop doing "Test" builds for now
```batchfile @echo off rem ======================================================= rem Settings rem ======================================================= set Platform=Win64 set BuildMode=Development set SessioName=Release set SessionOwner=AutoBuild rem ======================================================= rem Release variables rem ======================================================= set VersionName=%1 set InputProject=%2 set OutputDir=%3 set UAT=%4 rem ======================================================= rem Run UAT rem ======================================================= %UAT% -ScriptsForProject=%InputProject% BuildCookRun -project=%InputProject% -noP4 -clientconfig=%BuildMode% -serverconfig=%BuildMode% -ue4exe=UE4Editor-Cmd.exe -utf8output -platform=%Platform% -targetplatform=%Platform% -build -cook -allmaps -unversionedcookedcontent -pak -prereqs -createreleaseversion=%VersionName% -distribution -nodebuginfo -compressed -stage -package -stagingdirectory=%OutputDir% -cmdline=" -Messaging" -addcmdline="-SessionOwner='%SessionOwner%' -SessionName='%SessioName%'" ```
6a20d126-2864-4b4a-bcf5-af49daf873cc
{ "language": "Batchfile" }
```batchfile @ECHO OFF :: Output dotnet info dotnet --info SET number=00000%APPVEYOR_BUILD_NUMBER% SET STEELTOE_VERSION=1.1.0 SET STEELTOE_VERSION_SUFFIX=%APPVEYOR_REPO_BRANCH%-%number:~-5% IF NOT "%APPVEYOR_REPO_TAG_NAME%"=="" SET STEELTOE_VERSION_SUFFIX=%APPVEYOR_REPO_TAG_NAME:~6,5% echo %STEELTOE_VERSION_SUFFIX% SET BUILD_TYPE=Release IF "%APPVEYOR_REPO_BRANCH%"=="master" COPY config\nuget-master.config .\nuget.config IF "%APPVEYOR_REPO_BRANCH%"=="dev" COPY config\nuget-dev.config .\nuget.config IF NOT "%APPVEYOR_REPO_TAG_NAME%"=="" COPY config\nuget.config .\nuget.config IF "%APPVEYOR_REPO_BRANCH%"=="dev" SET BUILD_TYPE=Debug ``` Trim whitespace in version suffix
```batchfile @ECHO OFF :: Output dotnet info dotnet --info SET number=00000%APPVEYOR_BUILD_NUMBER% SET STEELTOE_VERSION=1.1.0 SET STEELTOE_VERSION_SUFFIX=%APPVEYOR_REPO_BRANCH%-%number:~-5% IF NOT "%APPVEYOR_REPO_TAG_NAME%"=="" SET STEELTOE_VERSION_SUFFIX=%APPVEYOR_REPO_TAG_NAME:~6,5% SET STEELTOE_VERSION_SUFFIX=%STEELTOE_VERSION_SUFFIX: =% echo %STEELTOE_VERSION_SUFFIX% SET BUILD_TYPE=Release IF "%APPVEYOR_REPO_BRANCH%"=="master" COPY config\nuget-master.config .\nuget.config IF "%APPVEYOR_REPO_BRANCH%"=="dev" COPY config\nuget-dev.config .\nuget.config IF NOT "%APPVEYOR_REPO_TAG_NAME%"=="" COPY config\nuget.config .\nuget.config IF "%APPVEYOR_REPO_BRANCH%"=="dev" SET BUILD_TYPE=Debug ```
f230a684-c3fc-4be3-9b28-37812f55f9d9
{ "language": "Batchfile" }
```batchfile ``` Add a script to run the entire nofib suite
```batchfile @ECHO OFF if not "%1" == "" goto continue for %%i in (imaginary) do for %%j in (yca\%%i\*.yca) do call %0 %%j goto end :continue echo Processing %1 firstify %1 -himl > %1.txt 2>&1 :end ```
bf5dca70-5c92-47cb-8863-06b54e7d9b8b
{ "language": "Batchfile" }
```batchfile if not exist "C:\Windows\Temp\msys2.exe" ( powershell -Command "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::TLS12; (New-Object System.Net.WebClient).DownloadFile('https://github.com/msys2/msys2-installer/releases/download/2020-07-20/msys2-x86_64-20200720.exe', 'C:\Windows\Temp\msys2.exe')" <NUL ) start /wait C:\Windows\Temp\msys2.exe --string A:\msys2-install.qs ``` Fix option used for msys2 installation
```batchfile if not exist "C:\Windows\Temp\msys2.exe" ( powershell -Command "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::TLS12; (New-Object System.Net.WebClient).DownloadFile('https://github.com/msys2/msys2-installer/releases/download/2020-07-20/msys2-x86_64-20200720.exe', 'C:\Windows\Temp\msys2.exe')" <NUL ) start /wait C:\Windows\Temp\msys2.exe --script A:\msys2-install.qs ```
ca4237e4-43cf-4013-8a9a-f8c5e85f1c91
{ "language": "Batchfile" }
```batchfile @echo off msbuild /p:Configuration=Release /p:Platform=x64 Couchbase.Lite.Tests.UWP.csproj vstest.console.exe /InIsolation /Platform:x64 /Framework:FrameworkUap10 bin\Release\Couchbase.Lite.Tests.UWP.build.appxrecipe /Logger:trx``` Fix scripting mistake for launching UWP tests
```batchfile @echo off msbuild /p:Configuration=Release /p:Platform=x64 Couchbase.Lite.Tests.UWP.csproj vstest.console.exe /InIsolation /Platform:x64 /Framework:FrameworkUap10 bin\x64\Release\Couchbase.Lite.Tests.UWP.build.appxrecipe /Logger:trx```
8931338c-1e66-47f0-8854-04108be6d962
{ "language": "Batchfile" }
```batchfile ``` Add rollback script for windows
```batchfile echo off echo Set install parameter from ini file for /f "delims=" %%x in (wikijournals.ini) do (set "%%x") echo Delete Directory %HTMLDIR%\%WIKIDIR% rmdir %HTMLDIR%\%WIKIDIR% /S /Q mysql -u %DBUSER% -p%DBPASS% %DBNAME% -e "show tables" > tables.txt for /f %%i in (tables.txt) do ( echo delete %%i mysql -u %DBUSER% -p%DBPASS% %DBNAME% -e "drop table %%i" ) del tables.txt ```
4fe08d56-36c1-4bb4-9a24-2b7ae0d5e2b0
{ "language": "Batchfile" }
```batchfile @ECHO OFF REM Taverna startup script REM distribution directory set TAVERNA_HOME=%~dp0 REM 300 MB memory, 140 MB for classes set ARGS=-Xmx300m -XX:MaxPermSize=140m REM Taverna system properties set ARGS=%ARGS% "-Dlog4j.configuration=file:///%TAVERNA_HOME%conf/log4j.properties" set ARGS=%ARGS% "-Djava.util.logging.config.file=%TAVERNA_HOME%conf/logging.properties" set ARGS=%ARGS% "-Dtaverna.app.startup=%TAVERNA_HOME%." java %ARGS% -jar "%TAVERNA_HOME%lib\taverna-command-line-0.1.1.jar" %* ``` Correct jar path for windows BAT
```batchfile @ECHO OFF REM Taverna startup script REM distribution directory set TAVERNA_HOME=%~dp0 REM 300 MB memory, 140 MB for classes set ARGS=-Xmx300m -XX:MaxPermSize=140m REM Taverna system properties set ARGS=%ARGS% "-Dlog4j.configuration=file:///%TAVERNA_HOME%conf/log4j.properties" set ARGS=%ARGS% "-Djava.util.logging.config.file=%TAVERNA_HOME%conf/logging.properties" set ARGS=%ARGS% "-Dtaverna.app.startup=%TAVERNA_HOME%." java %ARGS% -jar "%TAVERNA_HOME%lib\taverna-workbench-0.1.0-SNAPSHOT.jar" %* ```
4580a512-1ed9-4971-8acf-a137d18090b8
{ "language": "Batchfile" }
```batchfile @echo off :: Copyright (c) 2016 The Chromium Authors. All rights reserved. :: Use of this source code is governed by a BSD-style license that can be :: found in the LICENSE file. powershell -NoProfile -ExecutionPolicy RemoteSigned -File "%~dp0\cipd.ps1" %* ``` Clear Zone.Identifier to allow depot_tools.zip bootstrap
```batchfile @echo off :: Copyright (c) 2016 The Chromium Authors. All rights reserved. :: Use of this source code is governed by a BSD-style license that can be :: found in the LICENSE file. :: To allow this powershell script to run if it was a byproduct of downloading :: and unzipping the depot_tools.zip distribution, we clear the Zone.Identifier :: alternate data stream. This is equivalent to clicking the "Unblock" button :: in the file's properties dialog. echo.>"%~dp0\cipd.ps1:Zone.Identifier" powershell -NoProfile -ExecutionPolicy RemoteSigned -File "%~dp0\cipd.ps1" %* ```
f4346037-3e10-4f53-92c0-0416fbe83f49
{ "language": "Batchfile" }
```batchfile @echo off setlocal set _projectName=CommandLine set _testProject=test\%_projectName%.tests.csproj set _analyzerTestProject=analyzer\%_projectName%.Analyzer.Test\%_projectName%.Analyzer.Test.csproj set _config=%1 if not defined _config ( set _config=Debug ) echo -------------------------- echo !!! Restoring packages !!! echo -------------------------- dotnet restore call build.cmd echo --------------------- echo !!! Running tests !!! echo --------------------- dotnet test --no-build -c %_config% %_testProject% dotnet test --no-build -c %_config% %_analyzerTestProject% endlocal @echo on``` Make sure we pass the configuration to the nested script.
```batchfile @echo off setlocal set _projectName=CommandLine set _testProject=test\%_projectName%.tests.csproj set _analyzerTestProject=analyzer\%_projectName%.Analyzer.Test\%_projectName%.Analyzer.Test.csproj set _config=%1 if not defined _config ( set _config=Debug ) echo -------------------------- echo !!! Restoring packages !!! echo -------------------------- dotnet restore call build.cmd %_config% echo --------------------- echo !!! Running tests !!! echo --------------------- dotnet test --no-build -c %_config% %_testProject% dotnet test --no-build -c %_config% %_analyzerTestProject% endlocal @echo on```
7cb3be77-f8d7-4bd4-a81e-7ec1e6d9699c
{ "language": "Batchfile" }
```batchfile start E:\projects\tradebuild-platform\Bin\DataCollector27.exe /config:"Collect to DB" /log:logDB.log /showmonitor /posn:0,1 /startAt:Sun22:00 /endAt:Fri22:00 /exitAt:Fri22:05 /loglevel:N /noDataRestartSecs:300 /quantum:50 start E:\projects\tradebuild-platform\Bin\DataCollector27.exe /config:"Collect to files" /log:logFiles.log /showmonitor /posn:0,0 /startAt:Sun22:00 /endAt:Fri22:00 /exitAt:Fri22:05 /loglevel:N /noDataRestartSecs:300 /quantum:50 ``` Adjust DataCollector.bat to allow testing on Saturdays
```batchfile start E:\projects\tradebuild-platform\Bin\DataCollector27.exe /config:"Collect to DB" /log:logDB.log /showmonitor /posn:0,1 /startAt:Sun22:00 /endAt:Sat22:00 /exitAt:Sat22:05 /loglevel:H /noDataRestartSecs:300 /quantum:50 start E:\projects\tradebuild-platform\Bin\DataCollector27.exe /config:"Collect to files" /log:logFiles.log /showmonitor /posn:0,0 /startAt:Sun22:00 /endAt:Sat22:00 /exitAt:Sat22:05 /loglevel:N /noDataRestartSecs:300 /quantum:50 ```
58876dc9-29d8-4581-9eb7-7ff1a12228f5
{ "language": "Batchfile" }
```batchfile :: Setup a build directory. mkdir build if errorlevel 1 exit 1 cd build if errorlevel 1 exit 1 :: Configure, build, test, and install using `nmake`. cmake -G "NMake Makefiles" ^ -DCMAKE_BUILD_TYPE=Release ^ -DCMAKE_PREFIX_PATH=%LIBRARY_PREFIX% ^ -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ -DQUIET_MAKE=ON ^ -DDYNAMIC_ARCH=ON ^ -DBUILD_WITHOUT_LAPACK=OFF ^ -DSMP=ON ^ .. if errorlevel 1 exit 1 nmake if errorlevel 1 exit 1 nmake check if errorlevel 1 exit 1 nmake install if errorlevel 1 exit 1 ``` Drop some options from the Windows build.
```batchfile :: Setup a build directory. mkdir build if errorlevel 1 exit 1 cd build if errorlevel 1 exit 1 :: Configure, build, test, and install using `nmake`. cmake -G "NMake Makefiles" ^ -DCMAKE_BUILD_TYPE=Release ^ -DCMAKE_PREFIX_PATH=%LIBRARY_PREFIX% ^ -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ -DDYNAMIC_ARCH=ON ^ -DBUILD_WITHOUT_LAPACK=OFF ^ .. if errorlevel 1 exit 1 nmake if errorlevel 1 exit 1 nmake check if errorlevel 1 exit 1 nmake install if errorlevel 1 exit 1 ```
abdbfd2b-94a3-4815-b696-a1107037190a
{ "language": "Batchfile" }
```batchfile cd test if errorlevel 1 exit 1 mkdir build if errorlevel 1 exit 1 cd build if errorlevel 1 exit 1 cmake .. ^ -GNinja ^ -DCMAKE_PREFIX_PATH=%LIBRARY_PREFIX% ^ -DCMAKE_LIBRARY_PATH:PATH=%LIBRARY_PREFIX%\lib ^ -DCMAKE_VERBOSE_MAKEFILE=ON echo "CMake finished" if errorlevel 1 exit 1 echo "CMake okay" ninja echo "Ninja finished" if errorlevel 1 exit 1 echo "Ninja okay" test.exe echo "Ninja finished" if errorlevel 1 exit 1 echo "Ninja okay" ``` Change `Ninja finished` to `Test finished`
```batchfile cd test if errorlevel 1 exit 1 mkdir build if errorlevel 1 exit 1 cd build if errorlevel 1 exit 1 cmake .. ^ -GNinja ^ -DCMAKE_PREFIX_PATH=%LIBRARY_PREFIX% ^ -DCMAKE_LIBRARY_PATH:PATH=%LIBRARY_PREFIX%\lib ^ -DCMAKE_VERBOSE_MAKEFILE=ON echo "CMake finished" if errorlevel 1 exit 1 echo "CMake okay" ninja echo "Ninja finished" if errorlevel 1 exit 1 echo "Ninja okay" test.exe echo "Test finished" if errorlevel 1 exit 1 echo "Test okay" ```
1a6251e9-7bc8-468e-8656-fd4a6f682f59
{ "language": "Batchfile" }
```batchfile @echo off cls :start echo Starting server... "Nomad Server\NomadServer.exe" -name "My Oxide Server" -port 5127 -slots 10 -clientVersion "0.609" -password "" -tcpLobby "149.202.51.185" 25565 echo. echo Restarting server... echo. goto start ``` Patch for version 0.62 update
```batchfile @echo off cls :start echo Starting server... "Nomad Server\NomadServer.exe" -name "My Oxide Server" -port 5127 -slots 10 -clientVersion "0.62" -password "" -tcpLobby "149.202.51.185" 25565 echo. echo Restarting server... echo. goto start ```
69ed0a52-f34b-40dc-b0f7-cb919027302a
{ "language": "Batchfile" }
```batchfile @ECHO OFF SET TOP_DIR=%~dp0 CALL %TOP_DIR%\bin\dsn.run.cmd %1 %2 %3 %4 %5 %6 %7 %8 %9 ``` Fix the issue that rDSN source directory contains blanks.
```batchfile @ECHO OFF SET TOP_DIR=%~dp0 CALL "%TOP_DIR%\bin\dsn.run.cmd" %1 %2 %3 %4 %5 %6 %7 %8 %9 ```
b1af7638-8e65-4926-81ad-0cef6fb2dd73
{ "language": "Batchfile" }
```batchfile REM @ECHO OFF REM Run the generator from the current configuration setlocal pushd "%~dp0\Bin\%1" ECHO "%~dp0msdndoc.zip" xcopy /D /Y "%~dp0MSDNDoc.zip" . REM Find a VS 2017 installation with the C++ toolset installed. set InstallDir= for /f "usebackq tokens=*" %%i in (`..\..\..\..\..\External\vswhere\vswhere -latest -products * -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 Microsoft.VisualStudio.Component.Windows10SDK.14393 -property installationPath`) do ( set InstallDir=%%i ) set ToolsVersion= for /F %%A in ('type "%InstallDir%\VC\Auxiliary\Build\Microsoft.VCToolsVersion.default.txt"') do ( set "ToolsVersion=%%A" ) set VCToolsInstallDir= if exist "%InstallDir%\VC\Tools\MSVC\%ToolsVersion%\" ( set "VCToolsInstallDir=%InstallDir%\VC\Tools\MSVC\%ToolsVersion%\" ) SharpGen.exe --doc --castxml ..\..\..\..\..\External\castxml\bin\castxml.exe ..\..\..\..\Mapping.xml --apptype %2 --vctools "%VCToolsInstallDir% set LOCALERROR = %ERRORLEVEL% xcopy /D /Y MSDNDoc.zip %~dp0 exit /B %LOCALERROR%``` Remove Windows 10 SDK requirement from the SharpGen batch script (this requirement is enforced with the Mapping files)
```batchfile REM @ECHO OFF REM Run the generator from the current configuration setlocal pushd "%~dp0\Bin\%1" ECHO "%~dp0msdndoc.zip" xcopy /D /Y "%~dp0MSDNDoc.zip" . REM Find a VS 2017 installation with the C++ toolset installed. set InstallDir= for /f "usebackq tokens=*" %%i in (`..\..\..\..\..\External\vswhere\vswhere -latest -products * -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -property installationPath`) do ( set InstallDir=%%i ) set ToolsVersion= for /F %%A in ('type "%InstallDir%\VC\Auxiliary\Build\Microsoft.VCToolsVersion.default.txt"') do ( set "ToolsVersion=%%A" ) set VCToolsInstallDir= if exist "%InstallDir%\VC\Tools\MSVC\%ToolsVersion%\" ( set "VCToolsInstallDir=%InstallDir%\VC\Tools\MSVC\%ToolsVersion%\" ) SharpGen.exe --doc --castxml ..\..\..\..\..\External\castxml\bin\castxml.exe ..\..\..\..\Mapping.xml --apptype %2 --vctools "%VCToolsInstallDir% set LOCALERROR = %ERRORLEVEL% xcopy /D /Y MSDNDoc.zip %~dp0 exit /B %LOCALERROR%```
96d82a6c-75f4-4331-8048-454e90975918
{ "language": "Batchfile" }
```batchfile @echo off set VISUALIZERS=%USERPROFILE%\Documents\Visual Studio 14\Visualizers set BIN=%~dp0..\..\..\..\Binaries\Debug copy /y "%BIN%\Roslyn.DebuggerVisualizers.dll" "%VISUALIZERS%" copy /y "%BIN%\Roslyn.Test.PdbUtilities.dll" "%VISUALIZERS%" copy /y "%BIN%\System.Reflection.Metadata.dll" "%VISUALIZERS%" copy /y "%BIN%\System.Collections.Immutable.dll" "%VISUALIZERS%" copy /y "%BIN%\Microsoft.DiaSymReader.dll" "%VISUALIZERS%" echo Close all VS instances to finish.``` Update path to VS visualizers
```batchfile @echo off set VISUALIZERS=%USERPROFILE%\Documents\Visual Studio 2015\Visualizers set BIN=%~dp0..\..\..\Binaries\Debug copy /y "%BIN%\Roslyn.DebuggerVisualizers.dll" "%VISUALIZERS%" copy /y "%BIN%\Roslyn.Test.PdbUtilities.dll" "%VISUALIZERS%" copy /y "%BIN%\System.Reflection.Metadata.dll" "%VISUALIZERS%" copy /y "%BIN%\System.Collections.Immutable.dll" "%VISUALIZERS%" copy /y "%BIN%\Microsoft.DiaSymReader.dll" "%VISUALIZERS%" echo Close all VS instances to finish.```
e220ec29-652a-47ae-b6cc-663952fe6606
{ "language": "Batchfile" }
```batchfile @echo off cls :start echo Starting server... "Nomad Server\NomadServer.exe" -name "My Oxide Server" -port 5127 -slots 10 -clientVersion "0.75" -password "" -tcpLobby "149.202.51.185" 25565 echo. echo Restarting server... echo. goto start ``` Patch for version 0.76 update
```batchfile @echo off cls :start echo Starting server... "Nomad Server\NomadServer.exe" -name "My Oxide Server" -port 5127 -slots 10 -clientVersion "0.76" -password "" -tcpLobby "149.202.51.185" 25565 echo. echo Restarting server... echo. goto start ```
4bc387dc-8425-4c8a-ba2b-a584e9c0b369
{ "language": "Batchfile" }
```batchfile @echo off rem ******************************************************************************************************************************* mkdir "%INSTALL_DIR%\src\obj" cd "%INSTALL_DIR%\src\obj" "%CK_MAKE%" -j %CK_HOST_CPU_NUMBER_OF_PROCESSORS% -f "%ORIGINAL_PACKAGE_DIR%\Makefile" %* set code=%errorlevel% if %code% equ 0 ( cd .. xcopy arm_compute ..\install\include /e /c /i /y xcopy tests ..\install\include\arm_compute /e /c /i /y ) cd "%INSTALL_DIR%" exit /b %code% ``` Fix lib-acl-17.06 includes copying for Windows
```batchfile @echo off rem ******************************************************************************************************************************* mkdir "%INSTALL_DIR%\src\obj" cd "%INSTALL_DIR%\src\obj" "%CK_MAKE%" -j %CK_HOST_CPU_NUMBER_OF_PROCESSORS% -f "%ORIGINAL_PACKAGE_DIR%\Makefile" %* set code=%errorlevel% if %code% equ 0 ( cd .. xcopy arm_compute ..\install\include\arm_compute /e /c /i /y xcopy tests ..\install\include\arm_compute\tests /e /c /i /y ) cd "%INSTALL_DIR%" exit /b %code% ```
d2db9521-08b5-4b55-a8f6-00b3e03b5a3b
{ "language": "Batchfile" }
```batchfile @ECHO OFF REM TeamCity chokes on the COMPONENTS_VERSION processing here, it thinks REM COMPONENTS_VERSION is required going into the build step when we would REM define it in the build step. SETLOCAL REM --------------------------------------------------------------------------- REM Check usage REM --------------------------------------------------------------------------- IF "%1" == "" GOTO Usage SET BUILD_NUMBER=%1 ECHO BUILD_NUMBER=%BUILD_NUMBER% REM --------------------------------------------------------------------------- REM Build packages REM --------------------------------------------------------------------------- SET /P COMPONENTS_VERSION=<ver.txt ECHO COMPONENTS_VERSION=%COMPONENTS_VERSION% SET BUILD_VERSION=%COMPONENTS_VERSION%.%BUILD_NUMBER% ECHO BUILD_VERSION=%BUILD_VERSION% REM sanity checks: something is haywire in the TeamCity build. ECHO BUILD_NUMBER=%BUILD_NUMBER% ECHO COMPONENTS_VERSION=%COMPONENTS_VERSION% ECHO BUILD_VERSION=%BUILD_VERSION% ECHO These should end in .%BUILD_NUMBER%: ECHO COMBINE1=%COMPONENTS_VERSION%.%BUILD_NUMBER% ECHO COMBINE2=%COMPONENTS_VERSION% . %BUILD_NUMBER% call build-packages.cmd %BUILD_VERSION% GOTO :EOF :Usage ECHO USAGE: build_packages_teamcity.cmd (build-number) EXIT 1 GOTO :EOF ENDLOCAL ``` Clean up build debug blather
```batchfile @ECHO OFF REM TeamCity chokes on the COMPONENTS_VERSION processing here, it thinks REM COMPONENTS_VERSION is required going into the build step when we would REM define it in the build step. SETLOCAL REM --------------------------------------------------------------------------- REM Check usage REM --------------------------------------------------------------------------- IF "%1" == "" GOTO Usage SET BUILD_NUMBER=%1 REM --------------------------------------------------------------------------- REM Build packages REM --------------------------------------------------------------------------- SET /P COMPONENTS_VERSION=<ver.txt SET BUILD_VERSION=%COMPONENTS_VERSION%.%BUILD_NUMBER% call build-packages.cmd %BUILD_VERSION% GOTO :EOF :Usage ECHO USAGE: build_packages_teamcity.cmd (build-number) EXIT 1 GOTO :EOF ENDLOCAL ```
66c14e1d-4eb5-4bf8-a074-9d5c28df6b53
{ "language": "Batchfile" }
```batchfile ``` Add release tool for windows
```batchfile PATH=C:\python26;C:\progra~2\7-zip;%PATH% del /q /s dist\*.* python setup.py py2exe cd dist 7z d library.zip jinja2\* dns\* 'graphy\* 7z a namebench_for_Windows.zip -r * namebench -x -O 8.8.8.8 -t5 -o test.html start test.html cd .. ```
f8939e99-c266-4b2c-a4af-1c7c5c257126
{ "language": "Batchfile" }
```batchfile @echo off pushd %~dp0.. SET nuget_source=https://api.nuget.org/v3/index.json SET myget_source=https://www.myget.org/F/aeron/api/v2/package del nupkgs\*.nupkg call dotnet pack src\Adaptive.Aeron\Adaptive.Aeron.csproj -c Release --output ..\..\nupkgs call dotnet pack src\Adaptive.Agrona\Adaptive.Agrona.csproj -c Release --output ..\..\nupkgs call dotnet pack src\Adaptive.Cluster\Adaptive.Cluster.csproj -c Release --output ..\..\nupkgs call dotnet pack src\Adaptive.Archiver\Adaptive.Archiver.csproj -c Release --output ..\..\nupkgs call .\scripts\nuget pack .\driver\Aeron.Driver.nuspec -OutputDirectory nupkgs call dotnet nuget push nupkgs\Agrona.*.nupkg -s %nuget_source% call dotnet nuget push nupkgs\Aeron.Client.*.nupkg -s %nuget_source% call dotnet nuget push nupkgs\Aeron.Archiver.*.nupkg -s %nuget_source% call dotnet nuget push nupkgs\Aeron.Driver.*.nupkg -s %nuget_source% call dotnet nuget push nupkgs\Aeron.Cluster.*.nupkg -s %myget_source% popd``` Change Aeron.Cluster to release to NuGet
```batchfile @echo off pushd %~dp0.. SET nuget_source=https://api.nuget.org/v3/index.json del nupkgs\*.nupkg call dotnet pack src\Adaptive.Aeron\Adaptive.Aeron.csproj -c Release --output ..\..\nupkgs call dotnet pack src\Adaptive.Agrona\Adaptive.Agrona.csproj -c Release --output ..\..\nupkgs call dotnet pack src\Adaptive.Cluster\Adaptive.Cluster.csproj -c Release --output ..\..\nupkgs call dotnet pack src\Adaptive.Archiver\Adaptive.Archiver.csproj -c Release --output ..\..\nupkgs call .\scripts\nuget pack .\driver\Aeron.Driver.nuspec -OutputDirectory nupkgs call dotnet nuget push nupkgs\Agrona.*.nupkg -s %nuget_source% call dotnet nuget push nupkgs\Aeron.Client.*.nupkg -s %nuget_source% call dotnet nuget push nupkgs\Aeron.Archiver.*.nupkg -s %nuget_source% call dotnet nuget push nupkgs\Aeron.Driver.*.nupkg -s %nuget_source% call dotnet nuget push nupkgs\Aeron.Cluster.*.nupkg -s %nuget_source% popd```
04fa5ab6-f8e9-4c26-a0a2-22d6f61f6a33
{ "language": "Batchfile" }
```batchfile @echo off ..\..\Tools\PhpNetTester.exe /compiler:..\..\Deployment\Debug\phpc.exe /php:..\..\Tools\PHP\php.exe del /s *.pdb *.exe EmittedNodes.csv LibraryCalls.csv UnknownCalls.csv __input.txt Debug.log > nul pause ``` Test runner batch now deletes empty log files.
```batchfile @echo off ..\..\Tools\PhpNetTester.exe /compiler:..\..\Deployment\Debug\phpc.exe /php:..\..\Tools\PHP\php.exe del /s *.pdb *.exe EmittedNodes.csv LibraryCalls.csv UnknownCalls.csv __input.txt Debug.log > nul @echo Deleting empty log files... for /f "delims=" %%i in ('dir /s/b/a-d *.log') do if %~zi==0 del %%i pause ```
affda711-4d2c-415d-ac8f-f419b4192368
{ "language": "Batchfile" }
```batchfile :: %~dp0 gives the dirname of the script cmd /c %~dp0common.bat ``` Remove a level of indirection
```batchfile :: %~dp0 gives the dirname of the script cmd /c %~dp0install-cygwin-sshd.bat```
2ee17c57-64a2-4c1b-8bbe-73da4881b28d
{ "language": "Batchfile" }
```batchfile @if "%1" == "" goto :needpackage @if "%2" == "" goto :needfeed ..\packages\NuGet.CommandLine.3.3.0\tools\nuget push %1 -Source https://fuselabs.pkgs.visualstudio.com/DefaultCollection/_packaging/packages/nuget/v3/index.json -ApiKey %2 @goto end :needpackage @echo "You need to pass a package as first parameter" @goto end :needfeed @echo "You need to pass a feed name, either: fuse or fusesymbols" :end``` Change to use latest nuget.
```batchfile @if "%1" == "" goto :needpackage @if "%2" == "" goto :needfeed ..\packages\NuGet.CommandLine.3.4.3\tools\nuget push %1 -Source https://fuselabs.pkgs.visualstudio.com/DefaultCollection/_packaging/packages/nuget/v3/index.json -ApiKey %2 @goto end :needpackage @echo "You need to pass a package as first parameter" @goto end :needfeed @echo "You need to pass a feed name, either: fuse or fusesymbols" :end```
4398325f-f555-441f-93d9-d1fd31f10326
{ "language": "Batchfile" }
```batchfile @echo off goto menu :menu echo Build Project Generator: echo. echo [0] Clean echo [1] Visual C++ 2010 echo [2] Visual C++ 2008 echo [3] CodeLite echo [4] GNU Make echo. :choice set /P C="Choice: " if "%C%"=="4" goto gmake if "%C%"=="3" goto codelite if "%C%"=="2" goto vs2008 if "%C%"=="1" goto vs2010 if "%C%"=="0" goto clean :clean "premake4" --file=premake4.lua clean goto quit :vs2010 "premake4" --file=premake4.lua vs2010 goto quit :vs2008 "premake4" --file=premake4.lua vs2008 goto quit :codelite "premake4" --file=premake4.lua codelite goto quit :gmake "premake4" --file=premake4.lua gmake goto quit :quit pause :end``` Update the build bat to support VS 2012.
```batchfile @echo off goto menu :menu echo Build Project Generator: echo. echo [0] Clean echo [1] Visual C++ 2010 echo [2] Visual C++ 2012 echo [3] CodeLite echo [4] GNU Make echo. :choice set /P C="Choice: " if "%C%"=="4" goto gmake if "%C%"=="3" goto codelite if "%C%"=="2" goto vs2012 if "%C%"=="1" goto vs2010 if "%C%"=="0" goto clean :clean "premake4" --file=premake4.lua clean goto quit :vs2010 "premake4" --file=premake4.lua vs2010 goto quit :vs2012 "premake4" --file=premake4.lua vs2012 goto quit :codelite "premake4" --file=premake4.lua codelite goto quit :gmake "premake4" --file=premake4.lua gmake goto quit :quit pause :end```
4017b834-c805-4997-b047-b3fa602b610e
{ "language": "Batchfile" }
```batchfile git checkout gh-pages git merge master npm start mol mol/app/hello mol/app/supplies mol/app/habhub mol/app/todomvc mol/perf/render mol/perf/uibench mol/app/bench mol/app/taxon mol/app/users git commit -a -m "Update" && git push || git checkout master ``` Build taxon demo and bench list on $mol.
```batchfile git checkout gh-pages git merge master npm start mol mol/app/hello mol/app/supplies mol/app/habhub mol/app/todomvc mol/perf/render mol/perf/uibench mol/app/bench mol/app/bench/list/mol mol/app/taxon mol/app/taxon/demo mol/app/users git commit -a -m "Update" && git push || git checkout master ```
b0634f66-6c8b-4d8c-bb5a-105e5ce70929
{ "language": "Batchfile" }
```batchfile @echo off rem only if we are running from a checkout IF EXIST "%~dp0\.git" ( rem if dev_bundle is not present, get it IF NOT EXIST "%~dp0\dev_bundle" ( REM need `< con` so that we can run this file from Node REM (See http://stackoverflow.com/questions/9155289/calling-powershell-from-nodejs) PowerShell.exe -executionpolicy ByPass -file "%~dp0\scripts\windows\download-dev-bundle.ps1" < con ) rem if dev_bundle is the wrong version, remove it and get a new one PowerShell.exe -executionpolicy ByPass -file "%~dp0\scripts\windows\check-dev-bundle.ps1" < con IF errorlevel 1 ( rmdir /s /q "%~dp0\dev_bundle" PowerShell.exe -executionpolicy ByPass -file "%~dp0\scripts\windows\download-dev-bundle.ps1" < con ) ) SET NODE_PATH=%~dp0\dev_bundle\lib\node_modules "%~dp0\dev_bundle\bin\node.exe" "%~dp0\tools\main.js" %* ``` Add a check for 7zip
```batchfile @echo off rem only if we are running from a checkout IF EXIST "%~dp0\.git" ( rem verify that we have 7zip in the path 7z.exe --help > con IF errorlevel 1 ( echo "Please install 7z.exe (7-Zip) and put it into your PATH" exit 1 ) rem if dev_bundle is not present, get it IF NOT EXIST "%~dp0\dev_bundle" ( REM need `< con` so that we can run this file from Node REM (See http://stackoverflow.com/questions/9155289/calling-powershell-from-nodejs) PowerShell.exe -executionpolicy ByPass -file "%~dp0\scripts\windows\download-dev-bundle.ps1" < con ) rem if dev_bundle is the wrong version, remove it and get a new one PowerShell.exe -executionpolicy ByPass -file "%~dp0\scripts\windows\check-dev-bundle.ps1" < con IF errorlevel 1 ( rmdir /s /q "%~dp0\dev_bundle" PowerShell.exe -executionpolicy ByPass -file "%~dp0\scripts\windows\download-dev-bundle.ps1" < con ) ) SET NODE_PATH=%~dp0\dev_bundle\lib\node_modules "%~dp0\dev_bundle\bin\node.exe" "%~dp0\tools\main.js" %* ```
793d5c3c-ade4-466d-a712-f31b7edf5dd0
{ "language": "Batchfile" }
```batchfile rd /s /q Client rd /s /q NodeJS rd /s /q Azure.NodeJS ..\..\packages\autorest.0.16.0\tools\AutoRest -namespace Microsoft.Bot.Connector -input swagger\ConnectorApi.json -outputDirectory ConnectorAPI -AddCredentials -ClientName ConnectorClient ..\..\packages\autorest.0.16.0\tools\AutoRest -namespace Microsoft.Bot.Connector -input swagger\StateAPI.json -outputDirectory StateApi -AddCredentials -ClientName StateClient cd ConnectorAPI ..\..\..\rep -r -find:"Microsoft.Bot.Connector.Models" -replace:"Microsoft.Bot.Connector" *.cs ..\..\..\rep -r -find:"using Models;" -replace:"" *.cs ..\..\..\rep -r -find:FromProperty -replace:From *.cs ..\..\..\rep -r -find:fromProperty -replace:from *.cs cd .. cd StateAPI ..\..\..\rep -r -find:"Microsoft.Bot.Connector.Models" -replace:"Microsoft.Bot.Connector" *.cs ..\..\..\rep -r -find:"using Models;" -replace:"" *.cs cd .. @echo !!!!! Please review ConversationsExtensions.cs and BotStateExtensions.cs for custom throw code pause``` Use node.js replace instead of rep
```batchfile rd /s /q Client call npm install [email protected] ..\..\packages\autorest.0.16.0\tools\AutoRest -namespace Microsoft.Bot.Connector -input swagger\ConnectorApi.json -outputDirectory ConnectorAPI -AddCredentials -ClientName ConnectorClient ..\..\packages\autorest.0.16.0\tools\AutoRest -namespace Microsoft.Bot.Connector -input swagger\StateAPI.json -outputDirectory StateApi -AddCredentials -ClientName StateClient cd ConnectorAPI call ..\node_modules\.bin\replace "Microsoft.Bot.Connector.Models" "Microsoft.Bot.Connector" . -r --include="*.cs" call ..\node_modules\.bin\replace "using Models;" "" . -r --include="*.cs" call ..\node_modules\.bin\replace "FromProperty" "From" . -r --include="*.cs" call ..\node_modules\.bin\replace "fromProperty" "from" . -r --include="*.cs" cd .. cd StateAPI call ..\node_modules\.bin\replace "Microsoft.Bot.Connector.Models" "Microsoft.Bot.Connector" . -r --include="*.cs" call ..\node_modules\.bin\replace "using Models;" "" . -r --include="*.cs" cd .. @echo !!!!! Please review ConversationsExtensions.cs and BotStateExtensions.cs for custom throw code pause```
b520105d-3ba8-4bc9-acd4-24bb51fb4a81
{ "language": "Batchfile" }
```batchfile @echo off SETLOCAL enabledelayedexpansion IF DEFINED JAVA_HOME ( set JAVA=%JAVA_HOME%\bin\java.exe ) ELSE ( FOR %%I IN (java.exe) DO set JAVA=%%~$PATH:I ) IF NOT EXIST "%JAVA%" ( ECHO Could not find any executable java binary. Please install java in your PATH or set JAVA_HOME 1>&2 EXIT /B 1 ) set SCRIPT_DIR=%~dp0 for %%I in ("%SCRIPT_DIR%..") do set ES_HOME=%%~dpfI TITLE Elasticsearch Plugin Manager ${project.version} SET path_props=-Des.path.home="%ES_HOME%" IF DEFINED CONF_DIR ( SET path_props=!path_props! -Des.path.conf="%CONF_DIR%" ) SET args=%* SET HOSTNAME=%COMPUTERNAME% "%JAVA%" %ES_JAVA_OPTS% !path_props! -cp "%ES_HOME%/lib/*;" "org.elasticsearch.plugins.PluginCli" !args! ENDLOCAL ``` Fix handling of spaces in plugin script on Windows
```batchfile @echo off SETLOCAL enabledelayedexpansion IF DEFINED JAVA_HOME ( set JAVA="%JAVA_HOME%\bin\java.exe" ) ELSE ( FOR %%I IN (java.exe) DO set JAVA=%%~$PATH:I ) IF NOT EXIST %JAVA% ( ECHO Could not find any executable java binary. Please install java in your PATH or set JAVA_HOME 1>&2 EXIT /B 1 ) set SCRIPT_DIR=%~dp0 for %%I in ("%SCRIPT_DIR%..") do set ES_HOME=%%~dpfI TITLE Elasticsearch Plugin Manager ${project.version} SET path_props=-Des.path.home="%ES_HOME%" IF DEFINED CONF_DIR ( SET path_props=!path_props! -Des.path.conf="%CONF_DIR%" ) SET args=%* SET HOSTNAME=%COMPUTERNAME% %JAVA% %ES_JAVA_OPTS% !path_props! -cp "%ES_HOME%/lib/*;" "org.elasticsearch.plugins.PluginCli" !args! ENDLOCAL ```
fcff1ac2-4192-44eb-9972-4904a18cb57a
{ "language": "Batchfile" }
```batchfile set GO_ROOT=%~dp0\..\..\..\..\ set JRUBY_BASE=%GO_ROOT\tools\jruby-1.7.11 set SERVER_ROOT=%GO_ROOT%\server set RAILS_ROOT=%SERVER_ROOT%\webapp\WEB-INF\rails.new set GEM_HOME=%RAILS_ROOT%\vendor\bundle\jruby\1.9 set GEM_PATH=%JRUBY_BASE%\lib\ruby\gems\shared:%GEM_HOME% set PATH=%JRUBY_BASE\bin:%PATH% %JRUBY_BASE%\bin\jruby.bat %* ``` Fix bad windows batch file
```batchfile set GO_ROOT=%~dp0\..\..\.. set JRUBY_BASE=%GO_ROOT%\tools\jruby-1.7.11 set SERVER_ROOT=%GO_ROOT%\server set RAILS_ROOT=%SERVER_ROOT%\webapp\WEB-INF\rails.new set GEM_HOME=%RAILS_ROOT%\vendor\bundle\jruby\1.9 set GEM_PATH=%JRUBY_BASE%\lib\ruby\gems\shared;%GEM_HOME% set PATH=%JRUBY_BASE%\bin;%PATH% %JRUBY_BASE%\bin\jruby.bat %* ```
64a5a67d-e637-41f4-bb3d-099b7c1b646d
{ "language": "Batchfile" }
```batchfile python setup.py build python setup.py install --prefix=$PREFIX --single-version-externally-managed --record=record.txt``` Use the available python bin
```batchfile %PYTHON% setup.py build %PYTHON% setup.py install --prefix=$PREFIX --single-version-externally-managed --record=record.txt```
06a1bb15-b67f-4459-a7e5-9ed47d22d886
{ "language": "Batchfile" }
```batchfile :: Nasty hack to force the newer MSBuild from .NET is still used for the older :: Visual Studio build. Without this an older MSBuild will be picked up by accident on :: AppVeyor after running `vcvars32.bat`, which fails to process our solution files. :: :: ref: https://github.com/conda-forge/staged-recipes/pull/194#issuecomment-203577297 :: ref: https://github.com/conda-forge/libsodium-feedstock/commit/b411740e0f439d5a5d257f74f74945f86585684a#diff-d04c86b6bb20341f5f7c53165501a393R12 :: ref: https://stackoverflow.com/q/2709279 :: :: Also there is some bug using MSBuild from .NET to build with VS 2008 64-bit, which :: we workaround as well. :: :: ref: https://social.msdn.microsoft.com/Forums/vstudio/en-US/19bb86ab-258a-40a9-b9fc-3bf36cac46bc/team-build-error-msb4018-the-quotresolvevcprojectoutputquot-task-failed-unexpectedly?forum=tfsbuild if %VS_MAJOR% == 9 ( set "PATH=C:\Windows\Microsoft.NET\Framework\v4.0.30319;%PATH%" set VC_PROJECT_ENGINE_NOT_USING_REGISTRY_FOR_INIT=1 ) %PYTHON% -m pip install . -vv ``` Remove hack to see if compiler definition on windows changes something on appveyor
```batchfile %PYTHON% -m pip install . -vv ```
6a5c14e3-e8d8-44cc-9f54-8ee4c31ad1d2
{ "language": "Batchfile" }
```batchfile @echo off if [%1]==[] goto USAGE goto MKVIRTUALENV :USAGE echo. echo Pass a name to create a new virtualenv echo. goto END :MKVIRTUALENV if not defined WORKON_HOME ( set WORKON_HOME=%USERPROFILE%\Envs ) SETLOCAL EnableDelayedExpansion pushd "%WORKON_HOME%" 2>NUL && popd @if errorlevel 1 ( mkdir "%WORKON_HOME%" ) pushd "%WORKON_HOME%\%1" 2>NUL && popd @if not errorlevel 1 ( echo. echo virtualenv "%1" already exists echo. goto end ) virtualenv.exe "%WORKON_HOME%\%1" REM Add unsetting of VIRTUAL_ENV to deactivate.bat echo set VIRTUAL_ENV=>>"%WORKON_HOME%\%1\Scripts\deactivate.bat" ENDLOCAL & "%WORKON_HOME%\%1\Scripts\activate.bat" echo. :END ``` Allow additional parameters to be sent to virtualenv.exe
```batchfile @echo off if [%1]==[] goto USAGE goto MKVIRTUALENV :USAGE echo. echo Pass a name to create a new virtualenv echo. goto END :MKVIRTUALENV if not defined WORKON_HOME ( set WORKON_HOME=%USERPROFILE%\Envs ) set "ENVNAME=%~1" shift SETLOCAL EnableDelayedExpansion pushd "%WORKON_HOME%" 2>NUL && popd @if errorlevel 1 ( mkdir "%WORKON_HOME%" ) pushd "%WORKON_HOME%\%ENVNAME%" 2>NUL && popd @if not errorlevel 1 ( echo. echo virtualenv "%ENVNAME" already exists echo. goto end ) pushd "%WORKON_HOME%" virtualenv.exe %* popd REM Add unsetting of VIRTUAL_ENV to deactivate.bat echo set VIRTUAL_ENV=>>"%WORKON_HOME%\%ENVNAME%\Scripts\deactivate.bat" ENDLOCAL & "%WORKON_HOME%\%ENVNAME%\Scripts\activate.bat" echo. goto END :END```
8b1ab50a-ac98-48fe-8906-45bc086b51c3
{ "language": "Batchfile" }
```batchfile ``` Add Salt Batch File From @sherbang
```batchfile if not exist "C:\Windows\Temp\salt64.exe" ( powershell -Command "(New-Object System.Net.WebClient).DownloadFile('https://docs.saltstack.com/downloads/Salt-Minion-2014.1.3-1-AMD64-Setup.exe', 'C:\Windows\Temp\salt64.exe')" <NUL ) :: http://docs.saltstack.com/en/latest/topics/installation/windows.html c:\windows\temp\salt64.exe /S :: /master=<yoursaltmaster> /minion-name=<thisminionname> <nul set /p ".=;C:\salt" >> C:\Windows\Temp\PATH set /p PATH=<C:\Windows\Temp\PATH setx PATH "%PATH%" /m ```
169331dc-7e3c-40dc-bc53-2f73b85b0272
{ "language": "Batchfile" }
```batchfile cmake -G "NMake Makefiles" -D BUILD_TESTS=OFF -D CMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% %SRC_DIR% if errorlevel 1 exit 1 nmake if errorlevel 1 exit 1 nmake install if errorlevel 1 exit 1 ``` Add build folder and CMAKE_PREFIX_PATH
```batchfile mkdir build cd build cmake -G "NMake Makefiles" ^ -D BUILD_TESTS=OFF ^ -D CMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ -D CMAKE_PREFIX_PATH=%LIBRARY_PREFIX% ^ %SRC_DIR% if errorlevel 1 exit 1 nmake if errorlevel 1 exit 1 nmake install if errorlevel 1 exit 1 ```
b8f482c6-5828-419c-bd36-3992019c0eda
{ "language": "Batchfile" }
```batchfile @mkdir .shake 2> nul @ghc --make -Wall src/Main.hs -isrc -rtsopts -with-rtsopts=-I0 -outputdir=.shake -o .shake/build && .shake\build --lint --directory ".." %* ``` Split the batch file into multiple lines, add missing flags (-j -O).
```batchfile @mkdir .shake 2> nul @set ghcArgs=--make ^ -Wall ^ src/Main.hs ^ -isrc ^ -rtsopts ^ -with-rtsopts=-I0 ^ -outputdir=.shake ^ -j ^ -O ^ -o .shake/build @set shakeArgs=--lint ^ --directory ^ ".." ^ %* @ghc %ghcArgs% && .shake\build %shakeArgs% ```
ef87997d-36bc-46eb-82f1-0d596cb7308a
{ "language": "Batchfile" }
```batchfile set CMAKE_CONFIG=Release mkdir build_%CMAKE_CONFIG% pushd build_%CMAKE_CONFIG% cmake -G "NMake Makefiles" ^ -DCMAKE_BUILD_TYPE:STRING=%CMAKE_CONFIG% ^ -DBLA_VENDOR:STRING=OpenBLAS ^ -DENABLE_PYTHON:BOOL=ON ^ -DCMAKE_INSTALL_PREFIX:PATH="%LIBRARY_PREFIX%" ^ -DBUILD_DOCUMENTATION:BOOL=OFF ^ -DVCOMP_WORKAROUND=OFF ^ "%SRC_DIR%" if errorlevel 1 exit rem 1 cmake --build . --target install --config %CMAKE_CONFIG% if errorlevel 1 exit 1 popd ``` Disable packaging to Avoid copying msvc runtime
```batchfile set CMAKE_CONFIG=Release mkdir build_%CMAKE_CONFIG% pushd build_%CMAKE_CONFIG% cmake -G "NMake Makefiles" ^ -DCMAKE_BUILD_TYPE:STRING=%CMAKE_CONFIG% ^ -DBLA_VENDOR:STRING=OpenBLAS ^ -DENABLE_PYTHON:BOOL=ON ^ -DCMAKE_INSTALL_PREFIX:PATH="%LIBRARY_PREFIX%" ^ -DBUILD_DOCUMENTATION:BOOL=OFF ^ -DVCOMP_WORKAROUND=OFF ^ -DENABLE_PACKAGING:BOOL=OFF ^ "%SRC_DIR%" if errorlevel 1 exit rem 1 cmake --build . --target install --config %CMAKE_CONFIG% if errorlevel 1 exit 1 popd ```
c223c69e-1087-4a05-a3b2-5c7c1fd9e213
{ "language": "Batchfile" }
```batchfile @echo off SET NODE_PATH="%~dp0\dev_bundle\lib\node_modules" "%~dp0\dev_bundle\bin\node.exe" "%~dp0\tools\main.js" %* ``` Remove quotes on NODE_PATH env var set
```batchfile @echo off SET NODE_PATH=%~dp0\dev_bundle\lib\node_modules "%~dp0\dev_bundle\bin\node.exe" "%~dp0\tools\main.js" %* ```