doc_id
stringlengths 36
36
| metadata
dict | input
stringlengths 28
4.3k
| output
stringlengths 11
5.45k
|
---|---|---|---|
39309729-16e2-43db-ad30-a7e015e8fe11 | {
"language": "Batchfile"
} | ```batchfile
@echo off
rem This script installs OpenSC
rem Parameters:
rem user - Install for this user only.
setlocal
set MODE=%1
set KEY=HKEY_LOCAL_MACHINE
if "%MODE%" == "user" set KEY=HKEY_CURRENT_USER
cd %0\..\..
if not exist bin\opensc-tool.exe goto error
for /f %%f in (".") do set OPENSC_HOME=%%~ff
set OPENSC_HOME_ESCAPED=%OPENSC_HOME:\=\\%
set REG_FILE=%TEMP%\opensc-install.reg
echo Windows Registry Editor Version 5.00 > %REG_FILE%
echo [%KEY%\SOFTWARE\OpenSC] >> %REG_FILE%
echo "ConfigFile"="%OPENSC_HOME_ESCAPED%\\etc\\opensc.conf" >> %REG_FILE%
echo [%KEY%\SOFTWARE\PKCS11-Spy] >> %REG_FILE%
echo "Module"="%OPENSC_HOME_ESCAPED%\\bin\\opensc-pkcs11.dll" >> %REG_FILE%
regedit /s %REG_FILE%
del /q %REG_FILE%
"%OPENSC_HOME%\bin\opensc-tool" -S "app:default:profile_dir:%OPENSC_HOME%\share\opensc"
goto end
:error
echo Invalid installation
goto end
:end
endlocal
```
Add PATH comment for Windows users | ```batchfile
@echo off
rem This script installs OpenSC
rem Parameters:
rem user - Install for this user only.
setlocal
set MODE=%1
set KEY=HKEY_LOCAL_MACHINE
if "%MODE%" == "user" set KEY=HKEY_CURRENT_USER
cd %0\..\..
if not exist bin\opensc-tool.exe goto error
for /f %%f in (".") do set OPENSC_HOME=%%~ff
set OPENSC_HOME_ESCAPED=%OPENSC_HOME:\=\\%
set REG_FILE=%TEMP%\opensc-install.reg
echo Windows Registry Editor Version 5.00 > %REG_FILE%
echo [%KEY%\SOFTWARE\OpenSC] >> %REG_FILE%
echo "ConfigFile"="%OPENSC_HOME_ESCAPED%\\etc\\opensc.conf" >> %REG_FILE%
echo [%KEY%\SOFTWARE\PKCS11-Spy] >> %REG_FILE%
echo "Module"="%OPENSC_HOME_ESCAPED%\\bin\\opensc-pkcs11.dll" >> %REG_FILE%
regedit /s %REG_FILE%
del /q %REG_FILE%
"%OPENSC_HOME%\bin\opensc-tool" -S "app:default:profile_dir:%OPENSC_HOME%\share\opensc"
echo You may also want to add "%OPENSC_HOME%\bin" to your PATH, for use by other applications.
goto end
:error
echo Invalid installation
goto end
:end
endlocal
``` |
34b5740a-52cf-4f29-bba8-e0a9b43ed716 | {
"language": "Batchfile"
} | ```batchfile
```
Add missing windows configuration script | ```batchfile
:: To build extensions for 64 bit Python 3, we need to configure environment
:: variables to use the MSVC 2010 C++ compilers from GRMSDKX_EN_DVD.iso of:
:: MS Windows SDK for Windows 7 and .NET Framework 4 (SDK v7.1)
::
:: To build extensions for 64 bit Python 2, we need to configure environment
:: variables to use the MSVC 2008 C++ compilers from GRMSDKX_EN_DVD.iso of:
:: MS Windows SDK for Windows 7 and .NET Framework 3.5 (SDK v7.0)
::
:: 32 bit builds do not require specific environment configurations.
::
:: Note: this script needs to be run with the /E:ON and /V:ON flags for the
:: cmd interpreter, at least for (SDK v7.0)
::
:: More details at:
:: https://github.com/cython/cython/wiki/64BitCythonExtensionsOnWindows
:: http://stackoverflow.com/a/13751649/163740
::
:: Author: Olivier Grisel
:: License: CC0 1.0 Universal: http://creativecommons.org/publicdomain/zero/1.0/
@ECHO OFF
SET COMMAND_TO_RUN=%*
SET WIN_SDK_ROOT=C:\Program Files\Microsoft SDKs\Windows
SET MAJOR_PYTHON_VERSION="%PYTHON_VERSION:~0,1%"
IF %MAJOR_PYTHON_VERSION% == "2" (
SET WINDOWS_SDK_VERSION="v7.0"
) ELSE IF %MAJOR_PYTHON_VERSION% == "3" (
SET WINDOWS_SDK_VERSION="v7.1"
) ELSE (
ECHO Unsupported Python version: "%MAJOR_PYTHON_VERSION%"
EXIT 1
)
IF "%PYTHON_ARCH%"=="64" (
ECHO Configuring Windows SDK %WINDOWS_SDK_VERSION% for Python %MAJOR_PYTHON_VERSION% on a 64 bit architecture
SET DISTUTILS_USE_SDK=1
SET MSSdk=1
"%WIN_SDK_ROOT%\%WINDOWS_SDK_VERSION%\Setup\WindowsSdkVer.exe" -q -version:%WINDOWS_SDK_VERSION%
"%WIN_SDK_ROOT%\%WINDOWS_SDK_VERSION%\Bin\SetEnv.cmd" /x64 /release
ECHO Executing: %COMMAND_TO_RUN%
call %COMMAND_TO_RUN% || EXIT 1
) ELSE (
ECHO Using default MSVC build environment for 32 bit architecture
ECHO Executing: %COMMAND_TO_RUN%
call %COMMAND_TO_RUN% || EXIT 1
)
``` |
75bf2971-ffc0-4ebd-b05e-e97932f7ec86 | {
"language": "Batchfile"
} | ```batchfile
@echo off
setlocal EnableDelayedExpansion
set registryRoot=HKCU\Software\Classes
set key=OfficeScan NT
reg add "%registryRoot%\*\shellex\ContextMenuHandlers\%key%" /d "---" /f
reg add "%registryRoot%\Drive\shellex\ContextMenuHandlers\%key%" /d "---" /f
```
Disable officescan context menu on directories | ```batchfile
@echo off
setlocal EnableDelayedExpansion
set registryRoot=HKCU\Software\Classes
set key=OfficeScan NT
reg add "%registryRoot%\*\shellex\ContextMenuHandlers\%key%" /d "---" /f
reg add "%registryRoot%\Drive\shellex\ContextMenuHandlers\%key%" /d "---" /f
reg add "%registryRoot%\Directory\shellex\ContextMenuHandlers\%key%" /d "---" /f
``` |
9819fe2b-b832-4d3c-99a7-99cda04bed3f | {
"language": "Batchfile"
} | ```batchfile
if %VS_MAJOR% == 9 (
set "PATH=C:\Windows\Microsoft.NET\Framework\v4.0.30319;%PATH%"
)
%PYTHON% -m pip install . -vv
```
Add more hacks for Appveyor | ```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
``` |
35723aa4-86be-4d93-870d-16c99ea51827 | {
"language": "Batchfile"
} | ```batchfile
"%PREFIX%\Scripts\npm.cmd" install -g npm@latest --no-spin && "%PREFIX%\Scripts\npm.cmd" install . --no-spin --no-progress && "%PREFIX%\Scripts\npm.cmd" run test --no-progress --no-spin && if errorlevel 1 exit 1
```
Use most canonical location for npm | ```batchfile
"%PREFIX%\node_modules\npm\npm.cmd" install . --no-spin --no-progress && "%PREFIX%\node_modules\npm\npm.cmd" run test --no-progress --no-spin && if errorlevel 1 exit 1
``` |
e363e54e-23b6-4891-89e3-ff0ba1391963 | {
"language": "Batchfile"
} | ```batchfile
@echo off
@setlocal
set NuGetExe="%~dp0NuGet.exe"
set NuGetAdditionalCommandLineArgs=-verbosity quiet -configfile "%~dp0nuget.config" -Project2ProjectTimeOut 1200
REM If someone passed in a different Roslyn solution, use that.
REM We make use of this when Roslyn is an sub-module for some
REM internal repositories.
set RoslynSolution=%1
if "%RoslynSolution%" == "" set RoslynSolution=%~dp0Roslyn.sln
echo Restoring packages: Toolsets
call %NugetExe% restore "%~dp0build\ToolsetPackages\project.json" %NuGetAdditionalCommandLineArgs% || goto :RestoreFailed
echo Restoring packages: Samples
call %NugetExe% restore "%~dp0src\Samples\Samples.sln" %NuGetAdditionalCommandLineArgs% || goto :RestoreFailed
echo Restoring packages: Roslyn (this may take some time)
call %NugetExe% restore "%RoslynSolution%" %NuGetAdditionalCommandLineArgs% || goto :RestoreFailed
exit /b 0
:RestoreFailed
echo Restore failed with ERRORLEVEL %ERRORLEVEL%
exit /b 1```
Delete project.lock.json files before restoring packages | ```batchfile
@echo off
@setlocal
set NuGetExe="%~dp0NuGet.exe"
set NuGetAdditionalCommandLineArgs=-verbosity quiet -configfile "%~dp0nuget.config" -Project2ProjectTimeOut 1200
REM If someone passed in a different Roslyn solution, use that.
REM We make use of this when Roslyn is an sub-module for some
REM internal repositories.
set RoslynSolution=%1
if "%RoslynSolution%" == "" set RoslynSolution=%~dp0Roslyn.sln
echo Deleting project.lock.json files
pushd "%~dp0src"
del /s /q project.lock.json
popd
echo Restoring packages: Toolsets
call %NugetExe% restore "%~dp0build\ToolsetPackages\project.json" %NuGetAdditionalCommandLineArgs% || goto :RestoreFailed
echo Restoring packages: Samples
call %NugetExe% restore "%~dp0src\Samples\Samples.sln" %NuGetAdditionalCommandLineArgs% || goto :RestoreFailed
echo Restoring packages: Roslyn (this may take some time)
call %NugetExe% restore "%RoslynSolution%" %NuGetAdditionalCommandLineArgs% || goto :RestoreFailed
exit /b 0
:RestoreFailed
echo Restore failed with ERRORLEVEL %ERRORLEVEL%
exit /b 1``` |
09c56d25-ce74-46de-8650-0daf33827059 | {
"language": "Batchfile"
} | ```batchfile
call %LIBRARY_BIN%\run_autotools_clang_conda_build.bat
if errorlevel 1 exit 1
del %LIBRARY_LIB%\libzimg.a
```
Use exact command from autotools_clang_conda | ```batchfile
call %BUILD_PREFIX%\Library\bin\run_autotools_clang_conda_build.bat
if errorlevel 1 exit 1
del %LIBRARY_LIB%\libzimg.a
if errorlevel 1 exit 1
``` |
ad308af4-283f-4581-b3c7-d95a7e238f73 | {
"language": "Batchfile"
} | ```batchfile
ECHO off
ECHO MOVE C:\mongo* C:\mongodb
setx MYPATH "%PATH%;C:\mongodb\bin"
```
Revert "Removed for loop and used MOVE command with wildcards" | ```batchfile
ECHO on
FOR /f %%i IN ('dir /ad /b "C:\" ^|findstr /I "mongo"') DO set dest=%%i
ECHO MOVE C:\%dest% C:\mongodb\
setx MYPATH "%PATH%;C:\mongodb\bin"
``` |
81ab689d-2028-46eb-93a1-014b3d2a5391 | {
"language": "Batchfile"
} | ```batchfile
rem Building & compressing serve-d for release inside a virtual machine with Windows 8 or above
cd %~dp0
@if not exist version.txt (
echo.
echo !-- Error: version.txt is missing :/
echo.
pause
goto :eof
)
rem This will sync this repo with the folder %windir%\..\buildsd
robocopy . %windir%\..\buildsd /MIR /XA:SH /XD .* /XF .* /XF *.zip
pushd %windir%\..\buildsd
set /p Version=<version.txt
dub build --compiler=ldc2 --arch=x86
if exist windows del /S /Q windows
mkdir windows
copy serve-d.exe windows\serve-d.exe
copy libcurl.dll windows\libcurl.dll
copy libeay32.dll windows\libeay32.dll
copy ssleay32.dll windows\ssleay32.dll
if exist windows.zip del windows.zip
powershell -nologo -noprofile -command "& { Add-Type -A 'System.IO.Compression.FileSystem'; [IO.Compression.ZipFile]::CreateFromDirectory('windows', 'windows.zip'); }"
popd
move %windir%\..\buildsd\windows.zip "serve-d-%Version%-windows.zip"
pause
```
Use `%SystemDrive%\` instead of `%windir%\..\` | ```batchfile
rem Building & compressing serve-d for release inside a virtual machine with Windows 8 or above
cd %~dp0
@if not exist version.txt (
echo.
echo !-- Error: version.txt is missing :/
echo.
pause
goto :eof
)
rem This will sync this repo with the folder %SystemDrive%\buildsd
robocopy . %SystemDrive%\buildsd /MIR /XA:SH /XD .* /XF .* /XF *.zip
pushd %SystemDrive%\buildsd
set /p Version=<version.txt
dub build --compiler=ldc2 --arch=x86
if exist windows del /S /Q windows
mkdir windows
copy serve-d.exe windows\serve-d.exe
copy libcurl.dll windows\libcurl.dll
copy libeay32.dll windows\libeay32.dll
copy ssleay32.dll windows\ssleay32.dll
if exist windows.zip del windows.zip
powershell -nologo -noprofile -command "& { Add-Type -A 'System.IO.Compression.FileSystem'; [IO.Compression.ZipFile]::CreateFromDirectory('windows', 'windows.zip'); }"
popd
move %SystemDrive%\buildsd\windows.zip "serve-d-%Version%-windows.zip"
pause
``` |
2626cfbe-5fb1-418d-8541-7304a908e5bc | {
"language": "Batchfile"
} | ```batchfile
cd ..\..\..\
rm -R build
rm -R dist
"%APPDATA%\Python\Python35\Scripts\pyinstaller.exe" ^
--onefile ^
--windowed ^
--icon etc\bin\win\icon.ico ^
--paths C:\%HOMEPATH%\AppData\Roaming\Python\Python35\site-packages\PyQt5 ^
etc\bin\unix\alignak-app.py
pause
```
Update path of PyQt5 on Windows | ```batchfile
cd ..\..\..\
rm -R build
rm -R dist
"%APPDATA%\Python\Python35\Scripts\pyinstaller.exe" ^
--onefile ^
--windowed ^
--icon etc\bin\win\icon.ico ^
--paths C:\%HOMEPATH%\AppData\Roaming\Python\Python35\site-packages\PyQt5\Qt\bin ^
etc\bin\unix\alignak-app.py
pause
``` |
c36f6d10-ee1b-4f72-bd6b-b51452d86132 | {
"language": "Batchfile"
} | ```batchfile
#!/bin/bash
load test_helper
@test "ip returns an ip" {
ip=$(lstack ip)
[ -n "$ip" ]
}
```
Use a regexp to test the IP | ```batchfile
#!/bin/bash
load test_helper
@test "ip returns an ip" {
ip=$(lstack ip)
[[ "$ip" =~ ^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$ ]]
}
``` |
71df40d0-d34d-4b4f-903e-434fb42672b9 | {
"language": "Batchfile"
} | ```batchfile
set PIP_FIND_LINKS="https://whls.blob.core.windows.net/unstable/index.html"
pip install lytest simphony sax jax sklearn klayout
pip install "jax[cpu]===0.3.7" -f https://whls.blob.core.windows.net/unstable/index.html --use-deprecated legacy-resolver
pip install gdsfactory==5.38.0
gf tool install
if exist "%USERPROFILE%\Desktop\gdsfactory" (goto SKIP_INSTALL)
cd %USERPROFILE%\Desktop
git clone https://github.com/gdsfactory/gdsfactory.git
:SKIP_INSTALL
echo gdsfactory installed
```
Set to gpu version by default and remove version number | ```batchfile
set PIP_FIND_LINKS="https://whls.blob.core.windows.net/unstable/index.html"
pip install lytest simphony sax jax sklearn klayout
pip install "jaxlib[cuda111]" -f https://whls.blob.core.windows.net/unstable/index.html --use-deprecated legacy-resolver
pip install gdsfactory==5.38.0
gf tool install
if exist "%USERPROFILE%\Desktop\gdsfactory" (goto SKIP_INSTALL)
cd %USERPROFILE%\Desktop
git clone https://github.com/gdsfactory/gdsfactory.git
:SKIP_INSTALL
echo gdsfactory installed
``` |
3d919805-ec4a-462f-8318-fd844f9a5470 | {
"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
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```
Add ability to create xunit test results | ```batchfile
@pushd %~dp0
goto begin
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"
:begin
Cd "%~dp0\TestHarness\packagesNonNuget\xunit.runner"
"xunit.console.clr4.exe" "%~dp0\TestHarness\xunit\bin\Debug\xunitHarness.dll" /xml "%~dp0\results-example-xunit.xml"
pause
@popd``` |
a021f39c-78ec-4dff-8d23-70a73d12cf85 | {
"language": "Batchfile"
} | ```batchfile
cd /d %~dp0
mkdir OSVR-Unity-Dist
mkdir OSVR-Unity-Dist\OSVR-Unity
xcopy Managed-OSVR OSVR-Unity-Dist\ /Y /S
```
Adjust build to include more source | ```batchfile
cd /d %~dp0
mkdir OSVR-Unity-Dist
mkdir OSVR-Unity-Dist\src
mkdir OSVR-Unity-Dist\src\OSVR-Unity
mkdir OSVR-Unity-Dist\src\Managed-OSVR
xcopy Managed-OSVR OSVR-Unity-Dist\src\Managed-OSVR /Y /S
xcopy OSVR-Unity OSVR-Unity-Dist\src\OSVR-Unity /Y /S
``` |
36a9292b-c9a9-42b4-bfe6-49ad2437497a | {
"language": "Batchfile"
} | ```batchfile
@if "%_echo%" neq "on" echo off
setlocal
if defined VisualStudioVersion goto :Run
set _VSWHERE="%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe"
if exist %_VSWHERE% (
for /f "usebackq tokens=*" %%i in (`%_VSWHERE% -latest -property installationPath`) do set _VSCOMNTOOLS=%%i\Common7\Tools
)
if not exist "%_VSCOMNTOOLS%" set _VSCOMNTOOLS=%VS140COMNTOOLS%
if not exist "%_VSCOMNTOOLS%" (
echo Error: Visual Studio 2015 or 2017 required.
echo Please see https://github.com/dotnet/corefx/blob/master/Documentation/project-docs/developer-guide.md for build instructions.
exit /b 1
)
set VSCMD_START_DIR="%~dp0"
call "%_VSCOMNTOOLS%\VsDevCmd.bat"
:Run
powershell -NoProfile -ExecutionPolicy unrestricted -Command "%~dp0run.ps1 -- %*"
exit /b %ERRORLEVEL%```
Add prerelease check to vswhere to support dogfood VS builds. | ```batchfile
@if "%_echo%" neq "on" echo off
setlocal
if defined VisualStudioVersion goto :Run
set _VSWHERE="%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe"
if exist %_VSWHERE% (
for /f "usebackq tokens=*" %%i in (`%_VSWHERE% -latest -prerelease -property installationPath`) do set _VSCOMNTOOLS=%%i\Common7\Tools
)
if not exist "%_VSCOMNTOOLS%" set _VSCOMNTOOLS=%VS140COMNTOOLS%
if not exist "%_VSCOMNTOOLS%" (
echo Error: Visual Studio 2015 or 2017 required.
echo Please see https://github.com/dotnet/corefx/blob/master/Documentation/project-docs/developer-guide.md for build instructions.
exit /b 1
)
set VSCMD_START_DIR="%~dp0"
call "%_VSCOMNTOOLS%\VsDevCmd.bat"
:Run
powershell -NoProfile -ExecutionPolicy unrestricted -Command "%~dp0run.ps1 -- %*"
exit /b %ERRORLEVEL%``` |
98fffafc-efd1-4672-aede-90d0d30b5938 | {
"language": "Batchfile"
} | ```batchfile
@echo off
Nuget.exe restore "Source\MSBuild.Community.Tasks.sln"
NuGet.exe install MSBuildTasks -OutputDirectory .\Tools\ -ExcludeVersion -NonInteractive
Nuget.exe install ILRepack.MSBuild.Task -Version 1.1.0 -Source https://www.myget.org/F/sympa-public/api/v3/index.json -OutputDirectory .\Tools\ -ExcludeVersion -NonInteractive
```
Use ILRepack.MSBuild.Task 1.1.1 from sympa public myget feed | ```batchfile
@echo off
Nuget.exe restore "Source\MSBuild.Community.Tasks.sln"
NuGet.exe install MSBuildTasks -OutputDirectory .\Tools\ -ExcludeVersion -NonInteractive
Nuget.exe install ILRepack.MSBuild.Task -Version 1.1.1 -Source https://www.myget.org/F/sympa-public/api/v3/index.json -OutputDirectory .\Tools\ -ExcludeVersion -NonInteractive
``` |
1e1faf89-8519-43c6-83fe-3b5c23f5c427 | {
"language": "Batchfile"
} | ```batchfile
```
Add build script for Windows environments. | ```batchfile
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::
:: aartifact
:: http://www.aartifact.org/src/
:: Copyright (C) 2008-2010
:: A. Lapets
::
:: This software is made available under the GNU GPLv3.
::
:: Make.bat
:: Batch script for compiling with GHC under Windows
:: environments.
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::
@IF EXIST o GOTO make
@MD o
@IF EXIST hi GOTO make
@MD hi
:make
ghc -O2 --make -odir o -hidir hi Main -o aa.exe
::eof
``` |
86f26cc0-5ac6-4141-a032-1146f8753756 | {
"language": "Batchfile"
} | ```batchfile
```
Add bat file for generating installer for windows | ```batchfile
REM create windows installer package(runtime included) for LLPAD
REM In order to execute this batch file, java 8 or later needs to be installed
REM In case creating exe installer, Download Inno Setup 5 or later from http://www.jrsoftware.org and add it to the PATH.
REM In case creating msi installer, Download WiX 3.0 or later from http://wix.sf.net and add it to the PATH.
echo off
set APP_VERSION=0.5.0
IF "%JAVA_HOME%" == "" (
echo Please set the JAVA_HOME variable in your environment to match the location of your Java installation.
exit /B
)
REM change dir to project dir where this bat is placed.
cd %~dp0
set JAR_NAME=llpad-%APP_VERSION%-jar-with-dependencies.jar
set JAR_FULLPATH=%CD%\target\%JAR_NAME%
set PACKAGE_PATH=%CD%\package
set PACKAGE_RESOURCE_PATH=%CD%\package_resource
set INFILE_PATH=%PACKAGE_PATH%\infiles
set OUTFILE_PATH=%PACKAGE_PATH%\outfiles
set PACKAGE_FOR_WINDOWS_PATH=%PACKAGE_PATH%\windows
IF NOT EXIST "%JAR_FULLPATH%" (
echo The jar file "%JAR_FULLPATH%" not found.Please run "mvn install" first. Or APP_VERSION %APP_VERSION% may be incorrect.
echo The version code must be same as project/version in the POM.xml
exit /B
)
rmdir /s /q %PACKAGE_PATH%
mkdir %PACKAGE_PATH%
rmdir %INFILE_PATH%
mkdir %INFILE_PATH%
rmdir %OUTFILE_PATH%
mkdir %OUTFILE_PATH%
rmdir %PACKAGE_FOR_WINDOWS_PATH%
mkdir %PACKAGE_FOR_WINDOWS_PATH%
copy %JAR_FULLPATH% %INFILE_PATH%
copy %PACKAGE_RESOURCE_PATH%\license.txt %INFILE_PATH%
REM Create a directory "[PJ_ROOT]/package/windows" and put app icon named "[APPNAME].ico" it's a rule of javapackager.
copy %PACKAGE_RESOURCE_PATH%\LLPAD.ico %PACKAGE_FOR_WINDOWS_PATH%
"%JAVA_HOME%\bin\javapackager" ^
-deploy ^
-native exe ^
-BappVersion=%APP_VERSION% ^
-BshortcutHint=true ^
-Bvendor="Riversun" ^
-Bwin.menuGroup="LLPAD" ^
-BsystemWide=true ^
-srcdir package/infiles ^
-outdir package/outfiles ^
-outfile LLPAD_OUT ^
-appclass org.riversun.llpad.AppMain ^
-BlicenseFile=license.txt ^
-name "LLPAD" ^
-title "LLPAD" ^
-Bruntime="%JAVA_HOME%\jre" ^
-srcfiles %JAR_NAME%;license.txt ^
-v
echo package creation finished.
pause
``` |
2a47cd0d-bff4-40df-95c1-cfab1ddd14bf | {
"language": "Batchfile"
} | ```batchfile
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::
:: Cake is a Windows batch script for invoking CakePHP shell commands
::
:: CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
:: Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
::
:: Licensed under The MIT License
:: Redistributions of files must retain the above copyright notice.
::
:: @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
:: @link http://cakephp.org CakePHP(tm) Project
:: @since 2.0.0
:: @license http://www.opensource.org/licenses/mit-license.php MIT License
::
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: In order for this script to work as intended, the cake\console\ folder must be in your PATH
@echo off
SET app=%0
SET lib=%~dp0
php "%lib%cake.php" %*
echo.
exit /B %ERRORLEVEL%
```
Remove outdated and wrong comment. | ```batchfile
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::
:: Cake is a Windows batch script for invoking CakePHP shell commands
::
:: CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
:: Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
::
:: Licensed under The MIT License
:: Redistributions of files must retain the above copyright notice.
::
:: @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
:: @link http://cakephp.org CakePHP(tm) Project
:: @since 2.0.0
:: @license http://www.opensource.org/licenses/mit-license.php MIT License
::
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
@echo off
SET app=%0
SET lib=%~dp0
php "%lib%cake.php" %*
echo.
exit /B %ERRORLEVEL%
``` |
53546625-8a0f-4a33-8b0b-13ed4e6b8fd7 | {
"language": "Batchfile"
} | ```batchfile
DEL c:\Users\Administrator\go\src\github.com\pivotal-cf-experimental\GATS\gcf.exe
bitsadmin.exe /transfer "DownloadStableCLI" https://s3.amazonaws.com/go-cli/builds/cf-windows-amd64.exe c:\Users\Administrator\go\src\github.com\pivotal-cf-experimental\GATS\cf.exe
go get -u github.com/pivotal-cf-experimental/GATS/...
SET GATSPATH=%GOPATH%\src\github.com\pivotal-cf-experimental\GATS
SET PATH=%PATH%;%GATSPATH%;C:\Program Files\cURL\bin
SET CONFIG=%CD%\config.json
SET LOCAL_GOPATH=%GATSPATH%\Godeps\_workspace
MKDIR %LOCAL_GOPATH%\bin
SET GOPATH=%LOCAL_GOPATH%;%GOPATH%
SET PATH=%LOCAL_GOPATH%\bin;%PATH%
go install -v github.com/onsi/ginkgo/ginkgo
ginkgo.exe -r -slowSpecThreshold=120 ./gats
```
Delete old cf executable properly when running GATS on Windows | ```batchfile
DEL c:\Users\Administrator\go\src\github.com\pivotal-cf-experimental\GATS\cf.exe
bitsadmin.exe /transfer "DownloadStableCLI" https://s3.amazonaws.com/go-cli/builds/cf-windows-amd64.exe c:\Users\Administrator\go\src\github.com\pivotal-cf-experimental\GATS\cf.exe
go get -u github.com/pivotal-cf-experimental/GATS/...
SET GATSPATH=%GOPATH%\src\github.com\pivotal-cf-experimental\GATS
SET PATH=%PATH%;%GATSPATH%;C:\Program Files\cURL\bin
SET CONFIG=%CD%\config.json
SET LOCAL_GOPATH=%GATSPATH%\Godeps\_workspace
MKDIR %LOCAL_GOPATH%\bin
SET GOPATH=%LOCAL_GOPATH%;%GOPATH%
SET PATH=%LOCAL_GOPATH%\bin;%PATH%
go install -v github.com/onsi/ginkgo/ginkgo
ginkgo.exe -r -slowSpecThreshold=120 ./gats
``` |
ac471613-a054-4faa-966d-6ec9e7163bc2 | {
"language": "Batchfile"
} | ```batchfile
@echo off
@setlocal
rem ------------------------------------------------------
rem Check environment variables
if not "%JAVA_HOME%" == "" goto java_home_ok
echo Environment variable JAVA_HOME must be set.
set ERROR=true
:java_home_ok
if not "%DEBUG_ENABLED%" == "" goto debug_enabled_ok
set DEBUG_ENABLED=false
:debug_enabled_ok
if not "%WEBLOGIC_HOME%" == "" goto weblogic_home_ok
set WEBLOGIC_HOME=C:\bea\weblogic700\server
:weblogic_home_ok
if "%ERROR%" == "true" goto end
rem ------------------------------------------------------
rem Run Ant
set target=%1
set default_target=orbeon-dist-packages
if not defined target (
set target=%default_target%
echo Defaulting to target %default_target%
)
for %%I in (.) do set BUILD_ROOT=%%~fI
set CLASSPATH=.\lib\junit.jar
set PATH=%JAVA_HOME%\bin;%PATH%
set ANT_HOME=tools\ant
"%ANT_HOME%\bin\ant.bat" "-Djava.home=%JAVA_HOME%" "-Dant.home=%ANT_HOME%" "-Ddebug.enabled=%DEBUG_ENABLED%" "-Dweblogic.home=%WEBLOGIC_HOME%" %target% %2 %3 %4 %5 %6 %7 %8 %9
:end
```
Bring this bat into the current millenium. | ```batchfile
@echo off
setlocal
@rem There is some funkiness wrt set command in a for statement in an if
@rem block when setlocal is true. Consequently set set bld_root up here
@rem rather than in an if block.
set this_fqn=%~f0
for %%i in ( %this_fqn% ) do set bld_root=%%~dp%i
if defined JAVA_HOME (
if not defined DEBUG_ENABLED set DEBUG_ENABLED=false
if not defined WEBLOGIC_HOME set WEBLOGIC_HOME=C:\bea\weblogic700\server
set default_target=orbeon-dist-packages
set target=%1
if not defined target (
set target=!default_target!
echo Defaulting to target !default_target!
echo .
)
@rem set CLASSPATH=%bld_root%lib\junit.jar
set PATH=%JAVA_HOME%\bin;%PATH%
set ANT_HOME=%bld_root%tools\ant
echo "!ANT_HOME!\bin\ant.bat" "-Djava.home=!JAVA_HOME!" "-Dant.home=!ANT_HOME!" "-Ddebug.enabled=!DEBUG_ENABLED!" "-Dweblogic.home=!WEBLOGIC_HOME!" !target! %2 %3 %4 %5 %6 %7 %8 %9
"!ANT_HOME!\bin\ant.bat" "-Djava.home=!JAVA_HOME!" "-Dant.home=!ANT_HOME!" "-Ddebug.enabled=!DEBUG_ENABLED!" "-Dweblogic.home=!WEBLOGIC_HOME!" !target! %2 %3 %4 %5 %6 %7 %8 %9
) else (
echo env var JAVA_HOME must be set to the location of a jdk.
echo The jdk version must be 1.4 or higher.
)
``` |
9baa9536-49c7-4d9f-b37e-2c1ff472353b | {
"language": "Batchfile"
} | ```batchfile
@echo off
SETLOCAL EnableDelayedExpansion
set failed=0
cd bin
for /r "." %%a in (tst_*.exe) do (
"%%~fa"
if not ERRORLEVEL 0 (
echo Test FAILED: "%%~fa"
set failed=1
)
)
cd ..
if %failed% EQU 1 (
echo ERROR: At least one unit test failed!
if "%HOPSAN_BUILD_SCRIPT_NOPAUSE%" == "" (
pause
)
exit /B 1
)
echo All tests passed
if "%HOPSAN_BUILD_SCRIPT_NOPAUSE%" == "" (
pause
)
```
Fix windows test runner not detecting failure | ```batchfile
@echo off
SETLOCAL EnableDelayedExpansion
set failed=0
cd bin
for /r "." %%a in (tst_*.exe) do (
"%%~fa"
if !errorlevel! neq 0 (
echo Test FAILED: "%%~fa"
set failed=1
)
)
cd ..
if !failed! equ 1 (
echo ERROR: At least one unit test failed!
if "%HOPSAN_BUILD_SCRIPT_NOPAUSE%" == "" (
pause
)
exit /B 1
)
echo All tests passed
if "%HOPSAN_BUILD_SCRIPT_NOPAUSE%" == "" (
pause
)
``` |
eee89194-8937-41c8-abb0-5c65a67fc1de | {
"language": "Batchfile"
} | ```batchfile
rem Copy runtime DLLs
FOR /F %%I IN ('stack exec -- where libstdc++-6.dll') DO copy /Y "%%I" .\
FOR /F %%I IN ('stack exec -- where libgcc_s_seh-1.dll') DO copy /Y "%%I" .\
FOR /F %%I IN ('stack exec -- where libwinpthread-1.dll') DO copy /Y "%%I" .\
```
Revert "For loop without external file" | ```batchfile
rem Copy runtime DLLs
echo "" | stack exec -- where libstdc++-6.dll > lib.txt
echo "" | stack exec -- where libgcc_s_seh-1.dll >> lib.txt
echo "" | stack exec -- where libwinpthread-1.dll >> lib.txt
FOR /F %%I IN (lib.txt) DO copy /Y "%%I" .\
del /q lib.txt``` |
90204999-5e53-4e26-b327-c469ad432445 | {
"language": "Batchfile"
} | ```batchfile
cmd /c certutil -addstore "Root" C:\Windows\Temp\GeoTrust_Global_CA.pem
cmd /c del C:\Windows\Temp\GeoTrust_Global_CA.pem
cmd /c "C:\Program Files\Puppet Labs\Puppet\bin\puppet.bat" module install puppetlabs-stdlib
cmd /c "C:\Program Files\Puppet Labs\Puppet\bin\puppet.bat" module install puppetlabs-registry
cmd /c "C:\Program Files\Puppet Labs\Puppet\bin\puppet.bat" module install puppetlabs-dism
cmd /c "C:\Program Files\Puppet Labs\Puppet\bin\puppet.bat" module install puppetlabs-acl
cmd /c "C:\Program Files\Puppet Labs\Puppet\bin\puppet.bat" module install puppetlabs-reboot
cmd /c "C:\Program Files\Puppet Labs\Puppet\bin\puppet.bat" module install puppetlabs-inifile
cmd /c "C:\Program Files\Puppet Labs\Puppet\bin\puppet.bat" module install puppetlabs-powershell
cmd /c "C:\Program Files\Puppet Labs\Puppet\bin\puppet.bat" module install chocolatey-chocolatey
cmd /c "C:\Program Files\Puppet Labs\Puppet\bin\puppet.bat" module install gildas-firewall
```
Use the new puppetlabs-windows module | ```batchfile
cmd /c certutil -addstore "Root" C:\Windows\Temp\GeoTrust_Global_CA.pem
cmd /c del C:\Windows\Temp\GeoTrust_Global_CA.pem
cmd /c "C:\Program Files\Puppet Labs\Puppet\bin\puppet.bat" module install puppetlabs-windows
cmd /c "C:\Program Files\Puppet Labs\Puppet\bin\puppet.bat" module install puppetlabs-dism
cmd /c "C:\Program Files\Puppet Labs\Puppet\bin\puppet.bat" module install puppetlabs-inifile
cmd /c "C:\Program Files\Puppet Labs\Puppet\bin\puppet.bat" module install gildas-firewall
``` |
1fbdedf9-930a-4966-b020-515fe0ff851f | {
"language": "Batchfile"
} | ```batchfile
::
:: Microsoft Azure SDK for Net - Generate library code
:: Copyright (C) Microsoft Corporation. All Rights Reserved.
::
set autoRestVersion=0.16.0-Nightly20160329
set specUrl="https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/arm-scheduler/2016-03-01/swagger/scheduler.json"
set source=-Source https://www.myget.org/F/autorest/api/v2
set repoRoot=%~dp0..\..\..\..
set autoRestExe=%repoRoot%\packages\autorest.%autoRestVersion%\tools\AutoRest.exe
set generateFolder=%~dp0Generated
%repoRoot%\tools\nuget.exe install autorest %source% -Version %autoRestVersion% -o %repoRoot%\packages
if exist %generateFolder% rd /S /Q %generateFolder%
%autoRestExe% -Modeler Swagger -CodeGenerator Azure.CSharp -Namespace Microsoft.Azure.Management.Scheduler -Input %specUrl% -outputDirectory %generateFolder% -Header NONE```
Change specUrl as recommended by the SDK team. | ```batchfile
::
:: Microsoft Azure SDK for Net - Generate library code
:: Copyright (C) Microsoft Corporation. All Rights Reserved.
::
set autoRestVersion=0.16.0-Nightly20160329
set specUrl="https://raw.githubusercontent.com/Azure/azure-rest-api-specs/c582747a6ea5d55ea976a9a3cb7c7959e7f9ce2f/arm-scheduler/2016-03-01/swagger/scheduler.json"
set source=-Source https://www.myget.org/F/autorest/api/v2
set repoRoot=%~dp0..\..\..\..
set autoRestExe=%repoRoot%\packages\autorest.%autoRestVersion%\tools\AutoRest.exe
set generateFolder=%~dp0Generated
%repoRoot%\tools\nuget.exe install autorest %source% -Version %autoRestVersion% -o %repoRoot%\packages
if exist %generateFolder% rd /S /Q %generateFolder%
%autoRestExe% -Modeler Swagger -CodeGenerator Azure.CSharp -Namespace Microsoft.Azure.Management.Scheduler -Input %specUrl% -outputDirectory %generateFolder% -Header NONE``` |
fd057027-5900-4899-8414-f46c7280e0b3 | {
"language": "Batchfile"
} | ```batchfile
:: %~dp0 gives the dirname of the script
cmd /c %~dp0common.bat
cmd /c %~dp0vagrant-ssh.bat
```
Remove a level of indirection | ```batchfile
:: %~dp0 gives the dirname of the script
cmd /c %~dp0firewall-disable.bat
cmd /c %~dp0vagrant-ssh.bat
``` |
611ce224-5d13-43b3-9208-660450a17915 | {
"language": "Batchfile"
} | ```batchfile
@setlocal ENABLEDELAYEDEXPANSION
@echo Building llvm-config tool...
@ninja -j %throttle% install-llvm-config
@echo.
@rem Build LLVM libraries
@set llvmlibstotal=0
@FOR /F "skip=2 tokens=4 USEBACKQ" %%a IN (`%devroot%\llvm\%abi%\bin\llvm-config.exe --link-static --libnames engine coroutines 2^>^&1`) DO @set /a llvmlibstotal+=1
@set llvmlibscount=0
@FOR /F "skip=2 tokens=4 USEBACKQ" %%a IN (`%devroot%\llvm\%abi%\bin\llvm-config.exe --link-static --libnames engine coroutines 2^>^&1`) DO @set /a llvmlibscount+=1&echo Building library %%~na - !llvmlibscount! of %llvmlibstotal%...&ninja -j %throttle% install-%%~na&echo.
@echo Installing headers...
@ninja -j %throttle% install-llvm-headers
@endlocal```
Fix LLVM build truncation by 2 libraries. Regression from 527a5d5 | ```batchfile
@setlocal ENABLEDELAYEDEXPANSION
@echo Building llvm-config tool...
@ninja -j %throttle% install-llvm-config
@echo.
@rem Build LLVM libraries
@set llvmlibstotal=0
@FOR /F "tokens=4 USEBACKQ" %%a IN (`%devroot%\llvm\%abi%\bin\llvm-config.exe --link-static --libnames engine coroutines 2^>^&1`) DO @set /a llvmlibstotal+=1
@set llvmlibscount=0
@FOR /F "tokens=4 USEBACKQ" %%a IN (`%devroot%\llvm\%abi%\bin\llvm-config.exe --link-static --libnames engine coroutines 2^>^&1`) DO @set /a llvmlibscount+=1&echo Building library %%~na - !llvmlibscount! of %llvmlibstotal%...&ninja -j %throttle% install-%%~na&echo.
@echo Installing headers...
@ninja -j %throttle% install-llvm-headers
@endlocal``` |
20e543e2-9d16-4d80-88a6-d7cb74ee5007 | {
"language": "Batchfile"
} | ```batchfile
```
Add a script to release binaries packages | ```batchfile
:: This script create zip packages (need 7zip installed and path added to system environment variable)
@echo off
set PATH_TO_PHYSX=C:\library\PhysX-3.2.3_PC_SDK_Core\Bin
:: dx9_x86
7z a -tzip -mx=9 Wz4CE_dx9_x86.zip werkkzeug4_dx9_x32.exe
7z a -tzip -mx=9 Wz4CE_dx9_x86.zip %PATH_TO_PHYSX%\win32\PhysX3CHECKED_x86.dll
7z a -tzip -mx=9 Wz4CE_dx9_x86.zip %PATH_TO_PHYSX%\win32\PhysX3CommonCHECKED_x86.dll
7z a -tzip -mx=9 Wz4CE_dx9_x86.zip %PATH_TO_PHYSX%\win32\PhysX3CookingCHECKED_x86.dll
7z a -tzip -mx=9 Wz4CE_dx9_x86.zip %PATH_TO_PHYSX%\win32\PhysX3CookingCHECKED_x86.dll
7z a -tzip -mx=9 Wz4CE_dx9_x86.zip changes.txt
:: dx9_x64
7z a -tzip -mx=9 Wz4CE_dx9_x64.zip werkkzeug4_dx9_x64.exe
7z a -tzip -mx=9 Wz4CE_dx9_x64.zip %PATH_TO_PHYSX%\win64\PhysX3CHECKED_x64.dll
7z a -tzip -mx=9 Wz4CE_dx9_x64.zip %PATH_TO_PHYSX%\win64\PhysX3CommonCHECKED_x64.dll
7z a -tzip -mx=9 Wz4CE_dx9_x64.zip %PATH_TO_PHYSX%\win64\PhysX3CookingCHECKED_x64.dll
7z a -tzip -mx=9 Wz4CE_dx9_x64.zip changes.txt
pause``` |
701341df-e449-4b37-9eaa-1517c8d7ded6 | {
"language": "Batchfile"
} | ```batchfile
mkdir %LIBRARY_INC%\cspice
cd %SRC_DIR%\src\cspice
call makeDynamicSpice.bat
copy "cspice.dll" %LIBRARY_LIB%
if errorlevel 1 exit 1
cd %SRC_DIR%
copy "include\\*.h" %LIBRARY_INC%\cspice
if errorlevel 1 exit 1
```
Copy commands file to source directory | ```batchfile
mkdir %LIBRARY_INC%\cspice
copy "makeDynamicSpice.bat" %SRC_DIR%\src\cspice
cd %SRC_DIR%\src\cspice
call makeDynamicSpice.bat
copy "cspice.dll" %LIBRARY_LIB%
if errorlevel 1 exit 1
cd %SRC_DIR%
copy "include\\*.h" %LIBRARY_INC%\cspice
if errorlevel 1 exit 1
``` |
f737c6bf-3570-40bd-a3f8-5b2c92ae612b | {
"language": "Batchfile"
} | ```batchfile
@echo off
SET GENERATOR="Visual Studio 15 2017"
SET GENERATOR64="Visual Studio 15 2017 Win64"
cd ../foreign/
cd SPIRV-Tools
mkdir build
cd build
cmake -G%GENERATOR% -DSPIRV-Headers_SOURCE_DIR=%cd%/../../SPIRV-Headers ..
cmake --build .
cmake --build . --config Release
cd ..
mkdir build64
cd build64
cmake -G%GENERATOR64% -DSPIRV-Headers_SOURCE_DIR=%cd%/../../SPIRV-Headers ..
cmake --build .
cmake --build . --config Release
cd ..
cd ..
cd SPIRV-Cross
mkdir build
cd build
cmake -G%GENERATOR% ..
cmake --build .
cmake --build . --config Release
cd ..
mkdir build64
cd build64
cmake -G%GENERATOR64% ..
cmake --build .
cmake --build . --config Release
cd ..
cd ..
cd ../windows
```
Update windows build bat for new CMake / Visual Studio | ```batchfile
@echo off
SET GENERATOR="Visual Studio 16 2019"
cd ../foreign/
cd SPIRV-Tools
mkdir build
cd build
cmake -G%GENERATOR% -A Win32 -DSPIRV-Headers_SOURCE_DIR=%cd%/../../SPIRV-Headers ..
cmake --build .
cmake --build . --config Release
cd ..
mkdir build64
cd build64
cmake -G%GENERATOR% -A x64 -DSPIRV-Headers_SOURCE_DIR=%cd%/../../SPIRV-Headers ..
cmake --build .
cmake --build . --config Release
cd ..
cd ..
cd SPIRV-Cross
mkdir build
cd build
cmake -G%GENERATOR% -A Win32 ..
cmake --build .
cmake --build . --config Release
cd ..
mkdir build64
cd build64
cmake -G%GENERATOR% -A x64 ..
cmake --build .
cmake --build . --config Release
cd ..
cd ..
cd ../windows
``` |
7be43c99-0dae-4ca9-9465-4e10cb89003a | {
"language": "Batchfile"
} | ```batchfile
electron-packager .\ Squiffy --platform=win32 --arch=ia32 --version=0.27.3 --app-bundle-id=uk.co.textadventures.squiffy --icon=squiffy.ico --app-version=3.9.0 --ignore=Output```
Set Windows resource version info | ```batchfile
electron-packager .\ Squiffy --platform=win32 --arch=ia32 --version=0.27.3 --app-bundle-id=uk.co.textadventures.squiffy --icon=squiffy.ico --app-version=3.9.0 --ignore=Output --version-string.ProductName=Squiffy --version-string.FileDescription=Squiffy --version-string.LegalCopyright="Copyright (c) 2015 Alex Warren" --version-string.OriginalFilename=Squiffy.exe --version-string.FileVersion=3.9.0 --version-string.ProductVersion=3.9.0 --version-string.InternalName=Squiffy --version-string.CompanyName="Alex Warren"``` |
20802ace-f118-4046-a382-ac49b497ebba | {
"language": "Batchfile"
} | ```batchfile
@echo off
@REM This script was based on the original conda activate.bat
@setlocal
@set "CONDA_PREFIX=__CONDA_PREFIX__"
@set "CONDA_DEFAULT_ENV=__CONDA_DEFAULT_ENV__"
@set "CONDA_ENV_PATH=%CONDA_PREFIX%"
@set "PATH=%CONDA_PREFIX%;%CONDA_PREFIX%\Library\mingw-w64\bin;%CONDA_PREFIX%\Library\usr\bin;%CONDA_PREFIX%\Library\bin;%CONDA_PREFIX%\Scripts;%PATH%"
@REM Run any activate scripts
@if exist "%CONDA_PREFIX%\etc\conda\activate.d" (
@pushd "%CONDA_PREFIX%\etc\conda\activate.d"
@for %%g in (*.bat) do @call "%%g"
@popd
)
@REM Execute the given command
__COMMAND__%*
@endlocal
```
Add %CONDA_PREFIX%/bin to PATH on Windows | ```batchfile
@echo off
@REM This script was based on the original conda activate.bat
@setlocal
@set "CONDA_PREFIX=__CONDA_PREFIX__"
@set "CONDA_DEFAULT_ENV=__CONDA_DEFAULT_ENV__"
@set "CONDA_ENV_PATH=%CONDA_PREFIX%"
@set "PATH=%CONDA_PREFIX%;%CONDA_PREFIX%\Library\mingw-w64\bin;%CONDA_PREFIX%\Library\usr\bin;%CONDA_PREFIX%\Library\bin;%CONDA_PREFIX%\Scripts;%CONDA_PREFIX%\bin;%PATH%"
@REM Run any activate scripts
@if exist "%CONDA_PREFIX%\etc\conda\activate.d" (
@pushd "%CONDA_PREFIX%\etc\conda\activate.d"
@for %%g in (*.bat) do @call "%%g"
@popd
)
@REM Execute the given command
__COMMAND__%*
@endlocal
``` |
6323bc0b-1f8d-4d29-b113-a5d47d6d641f | {
"language": "Batchfile"
} | ```batchfile
@echo off
echo Press any key to publish
pause
"..\.nuget\NuGet.exe" push PoolSharp.3.0.0.nupkg
pause```
Update publish nuget cmd to specify source | ```batchfile
@echo off
echo Press any key to publish
pause
"..\.nuget\NuGet.exe" push PoolSharp.3.0.0.nupkg -Source https://www.nuget.org/api/v2/package
pause``` |
16497829-c4fa-4db0-8373-13b3b6532e91 | {
"language": "Batchfile"
} | ```batchfile
@ECHO OFF
IF %1.==. GOTO No1
set CONFIG=%1
REM set debug parameters
REM set DEBUG_OPTS="-Xdebug -Xrunjdwp:transport=dt_socket,address=1044,server=y,suspend=y"
"%JAVA_HOME%\bin\java" -cp ..\lib\* %DEBUG_OPTS% "-Daerobase.config.dir=%CONFIG%" org.jboss.aerogear.unifiedpush.DBMaintenance > initdb-java.log 2>&1
GOTO End1
:No1
ECHO Missing Config file
GOTO End1
:End1
@ECHO ON
```
Use windows login for database init | ```batchfile
@ECHO OFF
IF %1.==. GOTO No1
set CONFIG=%1
REM set debug parameters
REM set DEBUG_OPTS="-Xdebug -Xrunjdwp:transport=dt_socket,address=1044,server=y,suspend=y"
"%JAVA_HOME%\bin\java" -cp ..\lib\* %DEBUG_OPTS% "-Daerobase.config.dir=%CONFIG%" "-Djava.library.path=..\\lib" org.jboss.aerogear.unifiedpush.DBMaintenance > initdb-java.log 2>&1
GOTO End1
:No1
ECHO Missing Config file
GOTO End1
:End1
@ECHO ON
``` |
57c63efc-3b43-43b8-944f-425d5bae0fb8 | {
"language": "Batchfile"
} | ```batchfile
rem Tool to assemble Windows builds
rem Requirements are 7-zip, py2exe, and FreeExtractor
PATH=C:\python27;C:\python26;C:\progra~1\7-zip;C:\progra~2\7-zip;%PATH%
rem ****** Clean out the old junk
rmdir /q /s dist\*.*
del /s /q dist\*.*
rem ****** Compile our executable and core zipfile
python setup.py py2exe
rem ****** Remove extras from core zipfile
cd dist
7z d namebench.zip tcl\*.*
rmdir /s /q tcl\tcl8.5\tzdata tcl\tk8.5\demos
del tcl\tk8.5\images\*.eps
rem ****** Final assembly of zipfile
copy ..\README.txt .
7z a namebench_for_Windows.zip -r * >nul
rem ****** Test assembled zipfile
namebench -x -O 8.8.8.8 -q5 -o test.html
start test.html
cd ..
```
Remove wildcard from del statement | ```batchfile
rem Tool to assemble Windows builds
rem Requirements are 7-zip, py2exe, and FreeExtractor
PATH=C:\python27;C:\python26;C:\progra~1\7-zip;C:\progra~2\7-zip;%PATH%
rem ****** Clean out the old junk
del /s /f /q dist
rem ****** Compile our executable and core zipfile
python setup.py py2exe
rem ****** Remove extras from core zipfile
cd dist
7z d namebench.zip tcl\*.*
rmdir /s /q tcl\tcl8.5\tzdata tcl\tk8.5\demos
del tcl\tk8.5\images\*.eps
rem ****** Final assembly of zipfile
copy ..\README.txt .
7z a namebench_for_Windows.zip -r * >nul
rem ****** Test assembled zipfile
namebench -x -O 8.8.8.8 -q5 -o test.html
start test.html
cd ..
``` |
fa604d34-b4c8-411a-b6d4-85858a03443b | {
"language": "Batchfile"
} | ```batchfile
@echo off
cls
chcp 65001>nul
rem old prompt: [%USERNAME%@%COMPUTERNAME% $p]
prompt $$$s
rem Fake a UNIX environment
doskey clear=cls
doskey ls=dir /b $*
doskey cp=copy $*
doskey mv=move $*
doskey rm=del $*
doskey cat=type $*
doskey pwd=echo %CD%
rem Easier navigation
doskey cd=cd /D $*
doskey cd..=cd ..
doskey ..=cd ..
doskey ...=cd ../..
doskey ....=cd ../../..
rem List files properly
doskey l=ls
doskey ll=ls
rem Edit functionality
IF NOT EXIST "C:\Program Files\Sublime Text 2" GOTO NOSUBLIME
doskey edit="C:\Program Files\Sublime Text 2\sublime_text" $*
:NOSUBLIME
rem Open functionality
doskey open=start $*
@echo on
```
Remove pwd doskey since parameter is expanded at parse time | ```batchfile
@echo off
cls
chcp 65001>nul
rem old prompt: [%USERNAME%@%COMPUTERNAME% $p]
prompt $$$s
rem Fake a UNIX environment
doskey clear=cls
doskey ls=dir /b $*
doskey cp=copy $*
doskey mv=move $*
doskey rm=del $*
doskey cat=type $*
rem Easier navigation
doskey cd=cd /D $*
doskey cd..=cd ..
doskey ..=cd ..
doskey ...=cd ../..
doskey ....=cd ../../..
rem List files properly
doskey l=ls
doskey ll=ls
rem Edit functionality
IF NOT EXIST "C:\Program Files\Sublime Text 2" GOTO NOSUBLIME
doskey edit="C:\Program Files\Sublime Text 2\sublime_text" $*
:NOSUBLIME
rem Open functionality
doskey open=start $*
@echo on
``` |
ef0abf81-2322-46d5-9380-4e0cc5914474 | {
"language": "Batchfile"
} | ```batchfile
@ECHO OFF
IF %1.==. GOTO No1
set CONFIG=%1
REM set debug parameters
REM set DEBUG_OPTS="-Xdebug -Xrunjdwp:transport=dt_socket,address=1044,server=y,suspend=y"
"%JAVA_HOME%\bin\java" -cp ..\lib\* %DEBUG_OPTS% "-Daerobase.config.dir=%CONFIG%" "-Djava.library.path=..\\lib" org.jboss.aerogear.unifiedpush.DBMaintenance > initdb-java.log 2>&1
GOTO End1
:No1
ECHO Missing Config file
GOTO End1
:End1
@ECHO ON
```
Add mssql jdbc driver to path | ```batchfile
@ECHO OFF
IF %1.==. GOTO No1
set CONFIG=%1
REM set debug parameters
REM set DEBUG_OPTS="-Xdebug -Xrunjdwp:transport=dt_socket,address=1044,server=y,suspend=y"
"%JAVA_HOME%\bin\java" -cp ..\lib\* %DEBUG_OPTS% "-Daerobase.config.dir=%CONFIG%" "-Djava.library.path=..\\..\\..\\mssql" org.jboss.aerogear.unifiedpush.DBMaintenance > initdb-java.log 2>&1
GOTO End1
:No1
ECHO Missing Config file
GOTO End1
:End1
@ECHO ON
``` |
58fbb204-2863-41d5-ab37-1b62faedc5aa | {
"language": "Batchfile"
} | ```batchfile
UpdateVersionNumbers.exe /VersionFromNuGet=OxyPlot.Core /Dependency=OxyPlot.Core /ReleaseNotesFile=..\RELEASE-NOTES.md /Directory=..
"C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe" ..\Source\OxyPlot.XamarinForms.sln /p:Configuration=Release```
Update Xamarin Forms build script | ```batchfile
UpdateVersionNumbers.exe /VersionFromNuGet=OxyPlot.Core /Dependency=OxyPlot.Core /ReleaseNotesFile=..\CHANGELOG.md /Directory=..
"C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe" ..\Source\OxyPlot.XamarinForms.sln /p:Configuration=Release
``` |
bde9238f-497e-4395-a1ea-72ee92af8fcc | {
"language": "Batchfile"
} | ```batchfile
mkdir build
cd build
cmake -G "NMake Makefiles" ^
-DCMAKE_INSTALL_PREFIX:PATH="%LIBRARY_PREFIX%" ^
-DCMAKE_BUILD_TYPE:STRING=Release ^
-DWITH_TESTS:BOOL=OFF ^
%SRC_DIR%
if errorlevel 1 exit 1
nmake
if errorlevel 1 exit 1
nmake install
if errorlevel 1 exit 1
```
Add tests to Windows build too | ```batchfile
mkdir build
cd build
cmake -G "NMake Makefiles" ^
-DCMAKE_INSTALL_PREFIX:PATH="%LIBRARY_PREFIX%" ^
-DCMAKE_BUILD_TYPE:STRING=Release ^
-DWITH_TESTS:BOOL=OFF ^
%SRC_DIR%
if errorlevel 1 exit 1
nmake
if errorlevel 1 exit 1
nmake install
if errorlevel 1 exit 1
nmake test
if errorlevel 1 exit 1
``` |
b355bb23-33ab-44bf-8615-64abd2921c13 | {
"language": "Batchfile"
} | ```batchfile
@ECHO OFF
for %%i in ("%~dp0..") do set "folder=%%~fi"
ECHO This script will launch OS.js in node using: `node src\server\node\server.js dist`
ECHO To stop node server, press CTRL+C
pause
node "%folder%\src\server\node\server.js"
```
Update windows batch script for handle supervisor for the live reload | ```batchfile
@ECHO OFF
for %%i in ("%~dp0..") do set "folder=%%~fi"
ECHO This script will launch OS.js in node using: `node src\server\node\server.js dist-dev`
ECHO To stop node server, press CTRL+C
where /q supervisor
IF ERRORLEVEL 1 (
ECHO supervisor not installed, the server will not be live reloaded
node "%folder%\src\server\node\server.js" dist-dev
) ELSE (
ECHO supervisor is installed, live reload is active
supervisor --watch "%folder%\src\server\node","%folder%\src\server\settings.json" -- "%folder%\src\server\node\server.js" dist-dev
)``` |
851f6f5a-79b8-450d-be27-aa764ec50522 | {
"language": "Batchfile"
} | ```batchfile
REM @call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars64.bat"
@call "C:\mingw-w64\x86_64-7.2.0-posix-seh-rt_v5-rev1\mingw-w64.bat"
SET PATH=%PROJECT_PATH%\3rdparty\bin;%MYSQL_CONNECTOR_PATH%\lib;%MYSQL_PATH%\bin;%PYTHON_PATH%\Scripts;C:\OpenSSL-v111-Win64\bin;%PATH%
cp "%MYSQL_CONNECTOR_PATH%\lib\libmysql.dll" "%PROJECT_PATH%\build\bin\"
cp "C:\mingw-w64\x86_64-7.2.0-posix-seh-rt_v5-rev1\mingw64\opt\bin\*.dll" "%PROJECT_PATH%\build\bin\"
REM cmake -GNinja -D%CONFIGURATION%=TRUE -DCMAKE_BUILD_TYPE=%CONFIGURATION% -DCMAKE_VS_PLATFORM_TOOLSET_VERSION=15.6 ..
cmake -G"MinGW Makefiles" ..
cmake --build . --config %CONFIGURATION%
```
Fix appveyor stuck on terminal | ```batchfile
REM @call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars64.bat"
SET PATH=%PROJECT_PATH%\3rdparty\bin;%MYSQL_CONNECTOR_PATH%\lib;%MYSQL_PATH%\bin;%PYTHON_PATH%\Scripts;C:\OpenSSL-v111-Win64\bin;C:\mingw-w64\x86_64-7.2.0-posix-seh-rt_v5-rev1\mingw64\bin;%PATH%
cp "%MYSQL_CONNECTOR_PATH%\lib\libmysql.dll" "%PROJECT_PATH%\build\bin\"
cp "C:\mingw-w64\x86_64-7.2.0-posix-seh-rt_v5-rev1\mingw64\opt\bin\*.dll" "%PROJECT_PATH%\build\bin\"
REM cmake -GNinja -D%CONFIGURATION%=TRUE -DCMAKE_BUILD_TYPE=%CONFIGURATION% -DCMAKE_VS_PLATFORM_TOOLSET_VERSION=15.6 ..
cmake -G"MinGW Makefiles" ..
cmake --build . --config %CONFIGURATION%
``` |
23c752e9-fe79-4527-a211-c30ab98d40c1 | {
"language": "Batchfile"
} | ```batchfile
@echo off
if not exist "C:\Program Files (x86)\gs" choco install ghostscript.app -y -x86 -version 9.18
set LIBDIR=C:\Magick.NET.libs
if exist %LIBDIR% goto done
echo Downloading .lib files
appveyor DownloadFile https://www.dropbox.com/sh/5m3zllq81n4eyhm/AACQFGl4PKi9xnd15EbU5S1Ia?dl=1
echo Extracting .lib files
7z x -o%LIBDIR% AACQFGl4PKi9xnd15EbU5S1Ia
:done
```
Test if resetting the build cache will fix the build. | ```batchfile
@echo off
if not exist "C:\Program Files (x86)\gs" choco install ghostscript.app -y -x86 -version 9.18
set LIBDIR=C:\Magick.NET.libs
if exist %LIBDIR% goto done
echo Downloading .lib files
appveyor DownloadFile https://www.dropbox.com/sh/5m3zllq81n4eyhm/AACQFGl4PKi9xnd15EbU5S1Ia?dl=1
echo Extracting .lib files
7z x -o%LIBDIR% AACQFGl4PKi9xnd15EbU5S1Ia
:done``` |
fe80dc8e-1f55-41e6-a03a-4094d6d4996b | {
"language": "Batchfile"
} | ```batchfile
@echo off
set drive=%~dp0
set drivep=%drive%
set PERLVER=5.24.0.1
set PERLDIR=%drivep%\%ARCH%\perl
REM latest version can be queried via 99-shell:
REM perl tools\query-version.pl CSS::Sass
set RELVERSION=3.4.10
if #%drive:~-1%# == #\# set drivep=%drive:~0,-1%
set PATH=%PERLDIR%\perl\site\bin\;%PERLDIR%\perl\bin\;%PERLDIR%\c\bin\;%PATH%
```
Adjust for latest perl-libsass 3.4.11 | ```batchfile
@echo off
set drive=%~dp0
set drivep=%drive%
set PERLVER=5.24.0.1
set PERLDIR=%drivep%\%ARCH%\perl
REM latest version can be queried via 99-shell:
REM perl tools\query-version.pl CSS::Sass
set RELVERSION=3.4.11
if #%drive:~-1%# == #\# set drivep=%drive:~0,-1%
set PATH=%PERLDIR%\perl\site\bin\;%PERLDIR%\perl\bin\;%PERLDIR%\c\bin\;%PATH%
``` |
93b2c6b2-4df2-4733-b4dc-03bdc0b930d2 | {
"language": "Batchfile"
} | ```batchfile
@echo off
:: hook `nodist use <version>`
if "%1"=="use" (
call %0 + %2
if ERRORLEVEL 0 (
:: get path to version and add it to PATH
FOR /F "tokens=1 delims=" %%A in ('"%0" path %2') do @set "Path=%%A;%Path%"
)
goto end
)
:: hook `nodist update`
if "%1"=="update" (
:: rescue our hacked npm.cmd from `npm update`'s fangs
copy /Y "%~dp0\npm.cmd" "%~dp0\npm.copy.cmd"
cmd /C npm update npm -g
del /F "%~dp0\npm.cmd"
move /Y "%~dp0\npm.copy.cmd" "%~dp0\npm.cmd"
pushd .
cd /D "%~dp0"
cd ..
npm update
popd
)
:main
"%~dp0..\node.exe" "%~dp0..\cli" %*
goto end
:end```
Put `npm update` into it's own shell | ```batchfile
@echo off
:: hook `nodist use <version>`
if "%1"=="use" (
call %0 + %2
if ERRORLEVEL 0 (
:: get path to version and add it to PATH
FOR /F "tokens=1 delims=" %%A in ('"%0" path %2') do @set "Path=%%A;%Path%"
)
goto end
)
:: hook `nodist update`
if "%1"=="update" (
:: rescue our hacked npm.cmd from `npm update`'s fangs
copy /Y "%~dp0\npm.cmd" "%~dp0\npm.copy.cmd"
cmd /C npm update npm -g
del /F "%~dp0\npm.cmd"
move /Y "%~dp0\npm.copy.cmd" "%~dp0\npm.cmd"
pushd .
cd /D "%~dp0"
cd ..
cmd /C npm update
popd
)
:main
"%~dp0..\node.exe" "%~dp0..\cli" %*
goto end
:end``` |
93e14175-fdab-4dc4-a700-9613ef5352d6 | {
"language": "Batchfile"
} | ```batchfile
:: Asset API
::
:: This file is called whenever a user enters an asset, such as Cat or Shot01.
::
:: Arguments:
:: %1: Name of asset, e.g. Bruce
:: %2: Absolute path to asset parent directory, e.g. m:\f01_projects\p999_Demo\assets
::
:: Example:
:: $ call _mkasset Bruce %~dp0
@echo off
set ASSET=%1
set ASSETDIR=%2%ASSET%
If not exist %ASSETDIR% (
mkdir %ASSETDIR%
)
title %PROJECTDIR% / %ASSET%
:: Clear screen
cls
echo+
echo %ASSET% -----------
echo+
echo Type application and task.
echo+
echo For example:
echo+
echo $ maya animation
echo $ houdini sim
echo $ nuke comp
echo+
echo The following assets are allready created:
setlocal EnableDelayedExpansion
set FOLDERQUERRY=%ASSETDIR%
for /f %%i in ('dir %FOLDERQUERRY%\work /b ') do (
set x=%%i
echo !x!
)
endlocal
echo+
echo --------------------------------------
pushd %ASSETDIR%
```
Modify listing of tasks to resemble listing of assets. | ```batchfile
:: Asset API
::
:: This file is called whenever a user enters an asset, such as Cat or Shot01.
::
:: Arguments:
:: %1: Name of asset, e.g. Bruce
:: %2: Absolute path to asset parent directory, e.g. m:\f01_projects\p999_Demo\assets
::
:: Example:
:: $ call _mkasset Bruce %~dp0
@echo off
set ASSET=%1
set ASSETDIR=%2%ASSET%
If not exist %ASSETDIR% (
mkdir %ASSETDIR%
)
title %PROJECTDIR% / %ASSET%
:: Clear screen
cls
echo+
echo %ASSET% -----------
echo+
:: List available tasks
setlocal enabledelayedexpansion
set FOLDERQUERRY=%ASSETDIR%
for /f %%i in ('dir %FOLDERQUERRY%\work /b ') do (
set x=%%i
echo !x!
)
endlocal
echo+
echo 1. Type application and task.
echo 2. Press [Enter] to launch application.
echo+
echo For example:
echo+
echo $ maya animation
echo $ houdini sim
echo $ nuke comp
echo+
echo --------------------------------------
pushd %ASSETDIR%
``` |
62e54cbc-eb6f-4131-b141-9f4a9c42270c | {
"language": "Batchfile"
} | ```batchfile
:: Copyright (c) 2011, Jon Maken
:: License: 3-clause BSD (see project LICENSE file)
:: Revision: 01/29/2011 10:20:16 AM
@echo off
setlocal
:: echo initial:
:: echo %%0 = %0
:: echo %%* = %*
:: fix ruby.exe invocation when explicitly disabling RubyGems
if "x%1" == "x--disable-gems" (
set NOGEM=%1
for /F "tokens=1*" %%i in ("%*") do set RB_ARGS=%%j
) else (
set NOGEM=
set RB_ARGS=%*
)
:: echo pre call ruby:
:: echo NOGEM = %NOGEM%
:: echo RB_ARGS = %RB_ARGS%
ruby.exe %NOGEM% -x %~f0 %RB_ARGS%
endlocal
exit /b
#!ruby
RCI_ROOT = File.expand_path(File.dirname(__FILE__))
$LOAD_PATH.unshift(File.join(RCI_ROOT, 'lib'))
$LOAD_PATH.unshift(File.join(RCI_ROOT))
require 'rci'
require 'inquisitor'
Inquisitor.run
```
Update 'for' batch code to use block style. | ```batchfile
:: Copyright (c) 2011, Jon Maken
:: License: 3-clause BSD (see project LICENSE file)
:: Revision: 01/29/2011 10:20:16 AM
@echo off
setlocal
:: echo initial:
:: echo %%0 = %0
:: echo %%* = %*
:: fix ruby.exe invocation when explicitly disabling RubyGems
if "x%1" == "x--disable-gems" (
set NOGEM=%1
for /F "tokens=1*" %%i in ("%*") do (
set RB_ARGS=%%j
)
) else (
set NOGEM=
set RB_ARGS=%*
)
:: echo pre call ruby:
:: echo NOGEM = %NOGEM%
:: echo RB_ARGS = %RB_ARGS%
ruby.exe %NOGEM% -x %~f0 %RB_ARGS%
endlocal
exit /b
#!ruby
RCI_ROOT = File.expand_path(File.dirname(__FILE__))
$LOAD_PATH.unshift(File.join(RCI_ROOT, 'lib'))
$LOAD_PATH.unshift(File.join(RCI_ROOT))
require 'rci'
require 'inquisitor'
Inquisitor.run
``` |
721f1db8-b704-4474-9127-26a99ee80cb0 | {
"language": "Batchfile"
} | ```batchfile
CD git/re2 || EXIT /B 1
cmake -D CMAKE_BUILD_TYPE=Debug -G "Visual Studio 12 2013" -A x64 . || EXIT /B 1
cmake --build . --config Debug --clean-first || EXIT /B 1
ctest -C Debug --output-on-failure -E dfa^|exhaustive^|random || EXIT /B 1
cmake -D CMAKE_BUILD_TYPE=Release -G "Visual Studio 12 2013" -A x64 . || EXIT /B 1
cmake --build . --config Release --clean-first || EXIT /B 1
ctest -C Release --output-on-failure -E dfa^|exhaustive^|random || EXIT /B 1
EXIT /B 0
```
Make CTest extra verbose temporarily. | ```batchfile
CD git/re2 || EXIT /B 1
cmake -D CMAKE_BUILD_TYPE=Debug -G "Visual Studio 12 2013" -A x64 . || EXIT /B 1
cmake --build . --config Debug --clean-first || EXIT /B 1
ctest -C Debug --output-on-failure --extra-verbose -E dfa^|exhaustive^|random || EXIT /B 1
cmake -D CMAKE_BUILD_TYPE=Release -G "Visual Studio 12 2013" -A x64 . || EXIT /B 1
cmake --build . --config Release --clean-first || EXIT /B 1
ctest -C Release --output-on-failure --extra-verbose -E dfa^|exhaustive^|random || EXIT /B 1
EXIT /B 0
``` |
845396df-cfb3-4c84-95c9-ae22784f6a53 | {
"language": "Batchfile"
} | ```batchfile
@if "%VS140COMNTOOLS%"=="" goto error_vc14
@call "%VS140COMNTOOLS%\..\..\VC\vcvarsall.bat"
@if "%HIPACC_PATH%"=="" goto error_hipacc
@if "%1" == "cpu" goto cpu
@if "%1" == "cuda" goto cuda
@if "%1" == "clean" goto clean
@if "%1" == "distclean" goto distclean
:cpu
nmake.exe /f sample.mak cpu
@goto end
:cuda
@if "%CUDA_PATH%"=="" goto error_cuda
nmake.exe /f sample.mak cuda
@goto end
:clean
nmake.exe /f sample.mak clean
@goto end
:distclean
nmake.exe /f sample.mak distclean
@goto end
:error_cuda
@echo ERROR: Cannot find CUDA installation.
@goto end
:error_hipacc
@echo ERROR: Cannot find Hipacc installation.
@goto end
:error_vc14
@echo ERROR: Cannot find Visual C++ Build Tools 2015.
@goto end
:end```
Load x64 toolchain for NMAKE | ```batchfile
@if "%VS140COMNTOOLS%"=="" goto error_vc14
@call "%VS140COMNTOOLS%\..\..\VC\vcvarsall.bat" x64
@if "%HIPACC_PATH%"=="" goto error_hipacc
@if "%1" == "cpu" goto cpu
@if "%1" == "cuda" goto cuda
@if "%1" == "clean" goto clean
@if "%1" == "distclean" goto distclean
:cpu
nmake.exe /f sample.mak cpu
@goto end
:cuda
@if "%CUDA_PATH%"=="" goto error_cuda
nmake.exe /f sample.mak cuda
@goto end
:clean
nmake.exe /f sample.mak clean
@goto end
:distclean
nmake.exe /f sample.mak distclean
@goto end
:error_cuda
@echo ERROR: Cannot find CUDA installation.
@goto end
:error_hipacc
@echo ERROR: Cannot find Hipacc installation.
@goto end
:error_vc14
@echo ERROR: Cannot find Visual C++ Build Tools 2015.
@goto end
:end
``` |
b9fc13f0-da9a-4add-b5ac-44d02d1ab4fd | {
"language": "Batchfile"
} | ```batchfile
SET GOPATH=%CD%\cf-release-repo
SET GATSPATH=%GOPATH%\src\github.com\cloudfoundry\cf-acceptance-tests
SET PATH=C:\Go\bin;%PATH%
SET PATH=C:\Program Files\Git\cmd\;%PATH%
SET PATH=%CD%\cf-release-repo\bin;%PATH%
SET PATH=C:\Program Files\7-Zip;%PATH%
SET PATH=C:\Program Files\cURL\bin;%PATH%
SET PATH=%CD%;%PATH%
SET /p DOMAIN=<%CD%\bosh-lite-lock\name
call %CD%\cli\ci\tasks\create-cats-config.bat
SET CONFIG=%CD%\config.json
go get -v github.com/onsi/ginkgo/ginkgo
pushd %CD%\cf-cli-binaries
7z x cf-cli-binaries.tgz
7z x cf-cli-binaries.tar
MOVE %CD%\cf-cli_winx64.exe ..\cf.exe
dir ..
popd
go get -v github.com/onsi/ginkgo/ginkgo
cd %GATSPATH%
ginkgo.exe -r -slowSpecThreshold=120 -skipPackage="logging,services,v3,routing_api,routing,backend_compatibility,ssh" -skip="NO_DEA_SUPPORT|go makes the app reachable via its bound route|SSO|takes effect after a restart, not requiring a push|doesn't die when printing 32MB|exercises basic loggregator|firehose data|Downloads the droplet for the app" -nodes=2
```
Revert "swap GnuWin32 with 7zip, cuz sourceforge is broke" | ```batchfile
SET GOPATH=%CD%\cf-release-repo
SET GATSPATH=%GOPATH%\src\github.com\cloudfoundry\cf-acceptance-tests
SET PATH=C:\Go\bin;%PATH%
SET PATH=C:\Program Files\Git\cmd\;%PATH%
SET PATH=%CD%\cf-release-repo\bin;%PATH%
SET PATH=C:\Program Files\GnuWin32\bin;%PATH%
SET PATH=C:\Program Files\cURL\bin;%PATH%
SET PATH=%CD%;%PATH%
SET /p DOMAIN=<%CD%\bosh-lite-lock\name
call %CD%\cli\ci\tasks\create-cats-config.bat
SET CONFIG=%CD%\config.json
go get -v github.com/onsi/ginkgo/ginkgo
pushd %CD%\cf-cli-binaries
gzip -d cf-cli-binaries.tgz
tar -xvf cf-cli-binaries.tar
MOVE %CD%\cf-cli_winx64.exe ..\cf.exe
dir ..
popd
go get -v github.com/onsi/ginkgo/ginkgo
cd %GATSPATH%
ginkgo.exe -r -slowSpecThreshold=120 -skipPackage="logging,services,v3,routing_api,routing,backend_compatibility,ssh" -skip="NO_DEA_SUPPORT|go makes the app reachable via its bound route|SSO|takes effect after a restart, not requiring a push|doesn't die when printing 32MB|exercises basic loggregator|firehose data|Downloads the droplet for the app" -nodes=2
``` |
4ddb91e1-348a-4f5c-b799-43a04d4cf43b | {
"language": "Batchfile"
} | ```batchfile
@echo off
setlocal
if "%1" == "" (
echo usage: %0 EXAMPLE [options]
echo.
echo Where EXAMPLE is one of:
call :printExampleList
exit /B 1
)
if not exist examples\%1 (
echo Cannot find an example by the name '%1'. Use one of:
call :printExampleList
exit /B 1
)
rem Enable ansi color processing
set ENABLE_VIRTUAL_TERMINAL_PROCESSING=1
set example=%1
set args=
shift
:readarg
if not "%1" == "" (
set args=%args% %1
shift
goto readarg
)
mvn -f examples\%example%\pom.xml yamcs:run -Dyamcs.args="%YAMCS_OPTS% %args%"
exit /B 0
:printExampleList
for /f %%i in ( 'dir /a:d /b examples ^| find /V "snippets" ^| find /V ".*"' ) do (
echo. %%i
)
```
Hide dot-folders when printing example folders | ```batchfile
@echo off
setlocal
if "%1" == "" (
echo usage: %0 EXAMPLE [options]
echo.
echo Where EXAMPLE is one of:
call :printExampleList
exit /B 1
)
if not exist examples\%1 (
echo Cannot find an example by the name '%1'. Use one of:
call :printExampleList
exit /B 1
)
rem Enable ansi color processing
set ENABLE_VIRTUAL_TERMINAL_PROCESSING=1
set example=%1
set args=
shift
:readarg
if not "%1" == "" (
set args=%args% %1
shift
goto readarg
)
mvn -f examples\%example%\pom.xml yamcs:run -Dyamcs.args="%YAMCS_OPTS% %args%"
exit /B 0
:printExampleList
for /f %%i in ( 'dir /a:d /b examples ^| find /V "snippets" ^| findstr /V "\..*"' ) do (
echo. %%i
)
``` |
b8ec5e24-ba22-432b-b3c8-c2d5a0cda444 | {
"language": "Batchfile"
} | ```batchfile
@echo off
cls
echo.
echo BEGIN OF DEMO 3: Bach.java
pause > nul
if exist demo rmdir /q/s demo
mkdir demo
cd demo
mkdir src\demo
echo ______
echo Step 1: Declare demo module: src\demo\module-info.java
pause > nul
(
echo module demo {}
)>"src\demo\module-info.java"
echo.
type src\demo\module-info.java
pause > nul
echo ______
echo Step 2: NOOP -- no local build file is needed
pause > nul
echo ______
echo Step 3: Show tree of source files
pause > nul
echo.
tree /f . | findstr /v Volume | findstr /v :
pause > nul
echo ______
echo Step 4: Build
pause > nul
@echo on
jshell --show-version --execution local https://bit.ly/bach-build
@echo off
pause > nul
echo ______
echo Step 5: Show tree of source and binary files
pause > nul
echo.
tree /f . | findstr /v Volume | findstr /v :
pause > nul
echo ______
echo Step 6: Describe demo module
pause > nul
echo.
jar --describe-module --file .bach\out\realm\modules\demo-0.jar
pause > nul
cd ..
echo.
echo END OF DEMO
echo.
```
Fix path to "main" modules | ```batchfile
@echo off
cls
echo.
echo BEGIN OF DEMO 3: Bach.java
pause > nul
if exist demo rmdir /q/s demo
mkdir demo
cd demo
mkdir src\demo
echo ______
echo Step 1: Declare demo module: src\demo\module-info.java
pause > nul
(
echo module demo {}
)>"src\demo\module-info.java"
echo.
type src\demo\module-info.java
pause > nul
echo ______
echo Step 2: NOOP -- no local build file is needed
pause > nul
echo ______
echo Step 3: Show tree of source files
pause > nul
echo.
tree /f . | findstr /v Volume | findstr /v :
pause > nul
echo ______
echo Step 4: Build
pause > nul
@echo on
jshell --show-version --execution local https://bit.ly/bach-build
@echo off
pause > nul
echo ______
echo Step 5: Show tree of source and binary files
pause > nul
echo.
tree /f . | findstr /v Volume | findstr /v :
pause > nul
echo ______
echo Step 6: Describe demo module
pause > nul
echo.
jar --describe-module --file .bach\out\main\modules\demo-0.jar
pause > nul
cd ..
echo.
echo END OF DEMO
echo.
``` |
0b62fe12-deb0-483a-9e57-999cee24eee8 | {
"language": "Batchfile"
} | ```batchfile
xcopy %RECIPE_DIR%\\..\\.. %SRC_DIR% /e /h /Y /Q
"%PYTHON%" setup.py install
if errorlevel 1 exit 1
```
Fix setuptools with conda build on windows. | ```batchfile
xcopy %RECIPE_DIR%\\..\\.. %SRC_DIR% /e /h /Y /Q
"%PYTHON%" setup.py install --single-version-externally-managed --record=record.txt
if errorlevel 1 exit 1
``` |
4c0a970e-5c08-4227-a3a6-8ab0ebaf78fe | {
"language": "Batchfile"
} | ```batchfile
@if not exist "%HOME%" @set HOME=%HOMEDRIVE%%HOMEPATH%
@if not exist "%HOME%" @set HOME=%USERPROFILE%
@set BASE_DIR=%HOME%\.spf13-vim-3
call git clone --recursive -b 3.0 git://github.com/spf13/spf13-vim.git %BASE_DIR%
call mkdir %BASE_DIR%\.vim\bundle
call mklink /J %HOME%\.vim %BASE_DIR%\.vim
call mklink %HOME%\.vimrc %BASE_DIR%\.vimrc
call mklink %HOME%\_vimrc %BASE_DIR%\.vimrc
call git clone http://github.com/gmarik/vundle.git %HOME%/.vim/bundle/vundle
```
Add missing mklink to .vimrc.bundles in windows installer script. | ```batchfile
@if not exist "%HOME%" @set HOME=%HOMEDRIVE%%HOMEPATH%
@if not exist "%HOME%" @set HOME=%USERPROFILE%
@set BASE_DIR=%HOME%\.spf13-vim-3
call git clone --recursive -b 3.0 git://github.com/spf13/spf13-vim.git %BASE_DIR%
call mkdir %BASE_DIR%\.vim\bundle
call mklink /J %HOME%\.vim %BASE_DIR%\.vim
call mklink %HOME%\.vimrc %BASE_DIR%\.vimrc
call mklink %HOME%\_vimrc %BASE_DIR%\.vimrc
call mklink %HOME%\.vimrc.bundles %BASE_DIR%\.vimrc.bundles
call git clone http://github.com/gmarik/vundle.git %HOME%/.vim/bundle/vundle
``` |
b94f7286-491b-4e2e-8b6d-5fc67062439c | {
"language": "Batchfile"
} | ```batchfile
```
Add a redirect for FAKE | ```batchfile
@echo off
:Build
cls
SET TARGET="Default"
IF NOT [%1]==[] (set TARGET="%1")
"tools\FAKE\tools\Fake.exe" "build.fsx" "target=%TARGET%"
exit /b %errorlevel%``` |
5c129217-e46c-4ee4-a362-29da5b151b4a | {
"language": "Batchfile"
} | ```batchfile
java -Dappdir=.. -cp ../lib/windows/jmf.jar;../lib/startup.jar;../lib/windows/jdic.jar;../resources;../lib/windows; org.jivesoftware.launcher.Startup```
Allow for remote debugging in spark. | ```batchfile
:run
if "%1" == "-debug" goto debug
java -Dappdir=.. -cp ../lib/windows/jmf.jar;../lib/startup.jar;../lib/windows/jdic.jar;../resources;../lib/windows; org.jivesoftware.launcher.Startup
goto end
:debug
start "Spark" "%JAVA_HOME%\bin\java" -Xdebug -Xint -server -Xnoagent -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8000 -Dappdir=.. -cp ../lib/windows/jmf.jar;../lib/startup.jar;../lib/windows/jdic.jar;../resources;../lib/windows; org.jivesoftware.launcher.Startup
goto end
:end``` |
64c98a26-842f-4923-aef0-ff1aee34db50 | {
"language": "Batchfile"
} | ```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
```
Patch for version 0.77 update | ```batchfile
@echo off
cls
:start
echo Starting server...
"Nomad Server\NomadServer.exe" -name "My Oxide Server" -port 5127 -slots 10 -clientVersion "0.77" -password "" -tcpLobby "149.202.51.185" 25565
echo.
echo Restarting server...
echo.
goto start
``` |
7f5635d0-da5c-4f3b-b356-916e08983578 | {
"language": "Batchfile"
} | ```batchfile
dotnet pack src/GladNet.Common/ -c Release
dotnet pack src/GladNet.Encryption/ -c Release
dotnet pack src/GladNet.Engine.Common/ -c Release
dotnet pack src/GladNet.Engine.Server/ -c Release
dotnet pack src/GladNet.Message/ -c Release
dotnet pack src/GladNet.Message.Handlers/ -c Release
dotnet pack src/GladNet.Payload/ -c Release
dotnet pack src/GladNet.Serializer/ -c Release
cd ./src/GladNet.Payload.Authentication
dotnet restore
cd ..
cd ..
dotnet pack src/GladNet.Payload.Authentication/ -c Release```
Revert "Try dotnet pack instead" | ```batchfile
msbuild ./src/GladNet.Common/GladNet.Common.csproj /p:Configuration=Release
msbuild ./src/GladNet.Encryption/GladNet.Encryption.csproj /p:Configuration=Release
msbuild ./src/GladNet.Engine.Common/GladNet.Engine.Common.csproj /p:Configuration=Release
msbuild ./src/GladNet.Engine.Server/GladNet.Engine.Server.csproj /p:Configuration=Release
msbuild ./src/GladNet.Message/GladNet.Message.csproj /p:Configuration=Release
msbuild ./src/GladNet.Message.Handlers/GladNet.Message.Handlers.csproj /p:Configuration=Release
msbuild ./src/GladNet.Payload/GladNet.Payload.csproj /p:Configuration=Release
msbuild ./src/GladNet.Serializer/GladNet.Serializer.csproj /p:Configuration=Release
cd ./src/GladNet.Payload.Authentication
dotnet restore
cd ..
cd ..
dotnet pack src/GladNet.Payload.Authentication/ -c Release``` |
7884d12a-1af3-4ed6-a365-3d3b33836e5b | {
"language": "Batchfile"
} | ```batchfile
"%sdkverpath%" -q -version:"%sdkver%"
call setenv /x64
rem install python packages
pip install numpy
rem builds currently fail
rem pip install numexpr
rem pip install tables >= 3.1.1
pip install enum34>=1.0.4
pip install stevedore>=1.2.0
pip install click>=3.3
pip install pyyaml>=3.11
pip install sphinx>1.3
pip install sphinxcontrib-napoleon>=0.2.10
pip install tabulate>=0.7.4
pip install mock==1.0.1
pip install coverage
pip install flake8
rem install simphony-common
python setup.py develop
if %errorlevel% neq 0 exit /b %errorlevel%
cd examples/plugin
python setup.py develop
if %errorlevel% neq 0 exit /b %errorlevel%
cd ..
```
Fix mistake in setting sphinx's required version number | ```batchfile
"%sdkverpath%" -q -version:"%sdkver%"
call setenv /x64
rem install python packages
pip install numpy
rem builds currently fail
rem pip install numexpr
rem pip install tables >= 3.1.1
pip install enum34>=1.0.4
pip install stevedore>=1.2.0
pip install click>=3.3
pip install pyyaml>=3.11
pip install sphinx>=1.3
pip install sphinxcontrib-napoleon>=0.2.10
pip install tabulate>=0.7.4
pip install mock==1.0.1
pip install coverage
pip install flake8
rem install simphony-common
python setup.py develop
if %errorlevel% neq 0 exit /b %errorlevel%
cd examples/plugin
python setup.py develop
if %errorlevel% neq 0 exit /b %errorlevel%
cd ..
``` |
c4e71c12-2200-4c69-bf3d-eaf7cc20e29d | {
"language": "Batchfile"
} | ```batchfile
set plugin_file=%CD%/UnrealCV.uplugin
set package_folder=%CD%/Plugins/UnrealCV
set UE4=C:\Program Files\Epic Games\UE_4.14
REM TODO: Check the existence of UE4 folder and give a useful hint for user
REM Modify the UE4 variable to point to your UE4 installation path
"%UE4%/Engine/Build/BatchFiles/RunUAT.bat" BuildPlugin -plugin=%plugin_file% -package=%package_folder% -rocket -targetplatforms=Win64
```
Copy compiled binaries to C:\qiuwch\workspace\unrealcv\unrealcv. | ```batchfile
set plugin_file=%CD%/UnrealCV.uplugin
set package_folder=%CD%/Plugins/UnrealCV
set UE4=C:\Program Files\Epic Games\UE_4.14
REM TODO: Check the existence of UE4 folder and give a useful hint for user
REM Modify the UE4 variable to point to your UE4 installation path
"%UE4%/Engine/Build/BatchFiles/RunUAT.bat" BuildPlugin -plugin=%plugin_file% -package=%package_folder% -rocket -targetplatforms=Win64
xcopy /E /Y Plugins\UnrealCV\Binaries %CD%
``` |
58d07693-7459-42fc-8be2-46df51d4ea35 | {
"language": "Batchfile"
} | ```batchfile
@ECHO OFF
:: script for Windows to supply fork() to rakudo
:: based on IO-Socket-INET.sh
SET TEST=%1
SET PORT=%2
:: clear the status message flag but don't whinge about the file not being there
DEL t\spec\S32-io\server-ready-flag 2> NUL
:: Use START to fork the server and set the window title so we can kill it later
START "P6IOSOCKETtest" perl6 t\spec\S32-io\IO-Socket-INET.pl %TEST% %PORT% server
perl6 t\spec\S32-io\IO-Socket-INET.pl %TEST% %PORT% client
:: Clean up any stray processes
TASKKILL /FI "WINDOWTITLE eq P6IOSOCKETtest" > NUL```
Make socket tests run less annoyingly on Win32. | ```batchfile
@ECHO OFF
:: script for Windows to supply fork() to rakudo
:: based on IO-Socket-INET.sh
SET TEST=%1
SET PORT=%2
:: clear the status message flag but don't whinge about the file not being there
DEL t\spec\S32-io\server-ready-flag 2> NUL
:: Use START to fork the server and set the window title so we can kill it later
START "P6IOSOCKETtest" /MIN perl6 t\spec\S32-io\IO-Socket-INET.pl %TEST% %PORT% server
perl6 t\spec\S32-io\IO-Socket-INET.pl %TEST% %PORT% client
:: Clean up any stray processes
TASKKILL /FI "WINDOWTITLE eq P6IOSOCKETtest" > NUL``` |
fbb7d377-bc08-433b-80bd-8fdd8b11ee22 | {
"language": "Batchfile"
} | ```batchfile
@ECHO OFF
REM Usage: [buildbase.bat ..\vs2013\mysolution.sln 12]
SET solution=%1
SET version=%2
SET log=build_%version%.log
SET tools=Microsoft Visual Studio %version%.0\VC\vcvarsall.bat
SET environment="%programfiles(x86)%\%tools%"
IF NOT EXIST %environment% SET environment="%programfiles%\%tools%"
IF NOT EXIST %environment% GOTO no_tools
ECHO Building: %solution%
CALL %environment% x86 > nul
ECHO Platform=x86
ECHO Configuration=StaticDebug
msbuild /m /v:n /p:Configuration=StaticDebug /p:Platform=Win32 %solution% > %log%
IF errorlevel 1 GOTO error
ECHO Configuration=StaticRelease
msbuild /m /v:n /p:Configuration=StaticRelease /p:Platform=Win32 %solution% >> %log%
IF errorlevel 1 GOTO error
CALL %environment% x86_amd64 > nul
ECHO Platform=x64
ECHO Configuration=StaticDebug
msbuild /m /v:n /p:Configuration=StaticDebug /p:Platform=x64 %solution% >> %log%
IF errorlevel 1 GOTO error
ECHO Configuration=StaticRelease
msbuild /m /v:n /p:Configuration=StaticRelease /p:Platform=x64 %solution% >> %log%
IF errorlevel 1 GOTO error
ECHO Complete: %solution%
GOTO end
:error
ECHO *** ERROR, build terminated early, see: %log%
GOTO end
:no_tools
ECHO *** ERROR, build tools not found: %tools%
:end
```
Change VS build script to x64 only. | ```batchfile
@ECHO OFF
REM Usage: [buildbase.bat ..\vs2013\mysolution.sln 12]
SET solution=%1
SET version=%2
SET log=build_%version%.log
SET tools=Microsoft Visual Studio %version%.0\VC\vcvarsall.bat
SET environment="%programfiles(x86)%\%tools%"
IF NOT EXIST %environment% SET environment="%programfiles%\%tools%"
IF NOT EXIST %environment% GOTO no_tools
ECHO Building: %solution%
CALL %environment% x86_amd64 > nul
ECHO Platform=x64
ECHO Configuration=StaticDebug
msbuild /m /v:n /p:Configuration=StaticDebug /p:Platform=x64 %solution% >> %log%
IF errorlevel 1 GOTO error
ECHO Configuration=StaticRelease
msbuild /m /v:n /p:Configuration=StaticRelease /p:Platform=x64 %solution% >> %log%
IF errorlevel 1 GOTO error
ECHO Complete: %solution%
GOTO end
:error
ECHO *** ERROR, build terminated early, see: %log%
GOTO end
:no_tools
ECHO *** ERROR, build tools not found: %tools%
:end
``` |
e17ca955-c38f-4a80-b8f8-c8f01f28e1a0 | {
"language": "Batchfile"
} | ```batchfile
:: Configure.
cmake -G "NMake Makefiles" -D CMAKE_INSTALL_PREFIX=%PREFIX% .
if errorlevel 1 exit 1
:: Build.
nmake
if errorlevel 1 exit 1
:: Install.
nmake install
if errorlevel 1 exit 1
```
Remove option to produce NMake make files - lets see what the default does | ```batchfile
:: Configure.
cmake -D CMAKE_INSTALL_PREFIX=%PREFIX% .
if errorlevel 1 exit 1
:: Build.
nmake
if errorlevel 1 exit 1
:: Install.
nmake install
if errorlevel 1 exit 1
``` |
903d0a89-a749-4206-8756-2b655178ae25 | {
"language": "Batchfile"
} | ```batchfile
@echo off
REM This file is part of the Zephir.
REM
REM (c) Zephir Team <[email protected]>
REM
REM For the full copyright and license information, please view the LICENSE
REM file that was distributed with this source code.
cls
if "%PHP_PEAR_PHP_BIN%" neq "" (
set PHPBIN=%PHP_PEAR_PHP_BIN%
) else set PHPBIN=php
SET mypath=%~dp0
echo %mypath:~0,-1%
"%PHPBIN%" "%mypath%\zephir" %*
```
Correct code style for batch file | ```batchfile
@echo off
rem This file is part of the Zephir.
rem
rem (c) Zephir Team <[email protected]>
rem
rem For the full copyright and license information, please view the LICENSE
rem file that was distributed with this source code.
cls
if "%PHP_PEAR_PHP_BIN%" neq "" (
set PHPBIN=%PHP_PEAR_PHP_BIN%
) else set PHPBIN=php
SET mypath=%~dp0
echo %mypath:~0,-1%
"%PHPBIN%" "%mypath%\zephir" %*
``` |
b6a0f8c5-009d-46b2-8ca1-1210151c456d | {
"language": "Batchfile"
} | ```batchfile
vcvarsall.bat x86
CL /I C:\OpenSSL-Win32\include /INCREMENTAL bmpow.c /MT /link /DLL /OUT:bmpow32.dll /LIBPATH:"C:\OpenSSL-Win32\lib" libeay32.lib ws2_32.lib
```
Use full path to vcvarsall | ```batchfile
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat x86
CL /I C:\OpenSSL-Win32\include /INCREMENTAL bmpow.c /MT /link /DLL /OUT:bmpow32.dll /LIBPATH:"C:\OpenSSL-Win32\lib" libeay32.lib ws2_32.lib
``` |
3ed7722d-f8a3-4986-b020-b8b379f415a5 | {
"language": "Batchfile"
} | ```batchfile
@echo off
del /F TestApp.exe
call gradlew clean -POS=windows
call gradlew build -POS=windows
echo F | xcopy /Q /Y /F build\exe\testApp\TestApp.exe TestApp.exe
call TestApp.exe > output.log
rem call TestApp.exe --useJSONFormat > outputJSON.log
rem call TestApp.exe --nosha256 > outputnoSha.log```
Add No OpenCL Run Configuration | ```batchfile
@echo off
del /F TestApp.exe
call gradlew clean -POS=windows
call gradlew build -POS=windows
echo F | xcopy /Q /Y /F build\exe\testApp\TestApp.exe TestApp.exe
rem call TestApp.exe > output.log
call TestApp.exe --noOpenCL > outputnoCL.log
rem call TestApp.exe --useJSONFormat > outputJSON.log
rem call TestApp.exe --nosha256 > outputnoSha.log``` |
04b3fd98-9df5-448c-9fdf-05aa7182b7de | {
"language": "Batchfile"
} | ```batchfile
@echo off
setlocal enableextensions
mkdir ReformatUtils 2> NUL
copy /y ..\src\resharper-reformatutils\bin\Release\* ReformatUtils
```
Fix helper script (update path) | ```batchfile
@echo off
setlocal enableextensions
mkdir ReformatUtils 2> NUL
copy /y ..\src\ReformatUtils\bin\Release\* ReformatUtils
``` |
2f7f4ada-a920-47eb-ad7c-54a531a1fd4f | {
"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 -Force -Path .\dist\rocketleagueminimapgenerator.exe, .\dist\README.txt, .\dist\assets -DestinationPath .\dist\rocketleagueminimapgenerator.zip
pause
```
Optimize build output on windows. | ```batchfile
CALL .\.venv\Scripts\activate
pip install -r .\requirements.txt
set PYTHONOPTIMIZE=1 && 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
``` |
dcffb6c4-5aea-4ef5-991e-6ae9943eaef6 | {
"language": "Batchfile"
} | ```batchfile
```
Make a Microsoft import library for the x64 csound64.dll. | ```batchfile
@echo CREATING MICROSOFT IMPORT LIBRARY FOR CSOUND64.DLL FOR X64
dumpbin /exports csound-mingw64/csound64.dll > exports.txt
@echo LIBRARY CSOUND64 >> csound64.def
@echo EXPORTS >> csound64.def
FOR /F "skip=19 tokens=4" %%l in (exports.txt) do @echo %%l >> csound64.def
lib /def:csound64.def /out:csound64.lib /machine:x64
``` |
21ed51e9-4af9-4a57-adcb-749196909187 | {
"language": "Batchfile"
} | ```batchfile
:: Fix for https://github.com/jkriege2/JKQtPlotter/issues/35
set "CXXFLAGS= -MD"
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% -DCMAKE_PREFIX_PATH=%LIBRARY_PREFIX% ..
if errorlevel 1 exit 1
cmake --build . --config Release --target install
if errorlevel 1 exit 1
```
Disable examples and static libs | ```batchfile
:: Fix for https://github.com/jkriege2/JKQtPlotter/issues/35
set "CXXFLAGS= -MD"
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% -DCMAKE_PREFIX_PATH=%LIBRARY_PREFIX% -DJKQtPlotter_BUILD_EXAMPLES=OFF -DJKQtPlotter_BUILD_STATIC_LIBS=OFF ..
if errorlevel 1 exit 1
cmake --build . --config Release --target install
if errorlevel 1 exit 1
``` |
9a71f9cf-4fe9-435b-b244-ef81dea47ea2 | {
"language": "Batchfile"
} | ```batchfile
start fgautopilot-0.0.3/fgautopilot.exe
curl -fsS -o nircmd.zip http://www.nirsoft.net/utils/nircmd.zip
7z x nircmd.zip
dir
nircmd.exe cmdwait 20000 savescreenshot "shot.png"
dir
taskkill /f /im "fgautopilot.exe"
```
Increase waiting time before screenshot taking. | ```batchfile
start fgautopilot-0.0.3/fgautopilot.exe
curl -fsS -o nircmd.zip http://www.nirsoft.net/utils/nircmd.zip
7z x nircmd.zip
dir
nircmd.exe cmdwait 60000 savescreenshot "shot.png"
dir
taskkill /f /im "fgautopilot.exe"
``` |
d9b37a3a-f1dc-467b-a6a5-84e590520d9e | {
"language": "Batchfile"
} | ```batchfile
@ECHO OFF
REM Test default configuration against full suite on windows.
REM WORKSPACE is always set inside our testing environment. If this is run
REM outside that environment, the caller is responsible for setting it.
IF "%WORKSPACE%"=="" GOTO ErrExit
REM NOTE: This is pretty messy, but it is the only way I could figure out how to
REM get the correct environment setup and then invoke
REM nightly. (thomasvandoren, 2014-07-14)
c:\cygwin\bin\bash -exc "export PATH='FIXME' ; export CHPL_HOME=$PWD ; export CHPL_MAILER=email ; source $CHPL_HOME/util/cron/common.bash && export CHPL_NIGHTLY_TEST_CONFIG_NAME="cygwin32" && $CHPL_HOME/util/cron/nightly -cron -no-futures"
GOTO End
:ErrExit
ECHO "ERROR: WORKSPACE must be set in the environment"
EXIT 1
GOTO End
:End
```
Add correct PATH for cygwin32 batch script. | ```batchfile
@ECHO OFF
REM Test default configuration against full suite on windows.
REM WORKSPACE is always set inside our testing environment. If this is run
REM outside that environment, the caller is responsible for setting it.
IF "%WORKSPACE%"=="" GOTO ErrExit
REM NOTE: This is pretty messy, but it is the only way I could figure out how to
REM get the correct environment setup and then invoke
REM nightly. (thomasvandoren, 2014-07-14)
c:\cygwin\bin\bash -exc "export PATH='/usr/local/bin:/usr/bin:/cygdrive/c/ProgramData/Oracle/Java/javapath:/cygdrive/c/Windows/system32:/cygdrive/c/Windows:/cygdrive/c/Windows/System32/Wbem:/cygdrive/c/Windows/System32/WindowsPowerShell/v1.0:/cygdrive/c/Program Files/SysinternalsSuite:/cygdrive/c/Program Files/emacs-24.4/bin' ; export CHPL_HOME=$PWD ; export CHPL_MAILER=email ; source $CHPL_HOME/util/cron/common.bash && export CHPL_NIGHTLY_TEST_CONFIG_NAME="cygwin32" && $CHPL_HOME/util/cron/nightly -cron -no-futures"
GOTO End
:ErrExit
ECHO "ERROR: WORKSPACE must be set in the environment"
EXIT 1
GOTO End
:End
``` |
bae852e3-7121-4313-b44b-ccb497f8691b | {
"language": "Batchfile"
} | ```batchfile
@echo off
if "%PATH_BASE%" == "" set PATH_BASE=%PATH%
set PATH=%CD%;%PATH_BASE%;
java -jar -Duser.language=en "%~dp0\apktool.jar" %*
```
Update Windows scripts for unicode support | ```batchfile
@echo off
if "%PATH_BASE%" == "" set PATH_BASE=%PATH%
set PATH=%CD%;%PATH_BASE%;
chcp 65001 2>nul >nul
java -jar -Duser.language=en -Dfile.encoding=UTF8 "%~dp0\apktool.jar" %*
``` |
2ad474b1-6aac-4c50-97e9-bda474407094 | {
"language": "Batchfile"
} | ```batchfile
SET GOPATH=%CD%\gopath
SET PATH=C:\Go\bin;C:\Program Files\Git\cmd\;%GOPATH%\bin;%PATH%
cd %GOPATH%\src\code.cloudfoundry.org\cli
powershell -command set-executionpolicy remotesigned
go get github.com/onsi/ginkgo/ginkgo
ginkgo -r -randomizeAllSpecs -randomizeSuites .
```
Revert "the integration package is not in the cli resource" | ```batchfile
SET GOPATH=%CD%\gopath
SET PATH=C:\Go\bin;C:\Program Files\Git\cmd\;%GOPATH%\bin;%PATH%
cd %GOPATH%\src\code.cloudfoundry.org\cli
powershell -command set-executionpolicy remotesigned
go get github.com/onsi/ginkgo/ginkgo
ginkgo -r -randomizeAllSpecs -randomizeSuites -skipPackage integration .
``` |
e16c870b-7d95-434d-b455-e3fa65f4ac95 | {
"language": "Batchfile"
} | ```batchfile
@rem Used by the buildbot "buildmsi" step.
cmd /c Tools\buildbot\external.bat
@rem build release versions of things
call "%VS90COMNTOOLS%vsvars32.bat"
if not exist ..\db-4.4.20\build_win32\release\libdb44s.lib (
devenv ..\db-4.4.20\build_win32\Berkeley_DB.sln /build Release /project db_static
)
@rem build Python
cmd /q/c Tools\buildbot\kill_python.bat
devenv.com /useenv /build Release PCbuild\pcbuild.sln
@rem build the documentation
bash.exe -c 'cd Doc;make PYTHON=python2.5 update htmlhelp'
"%ProgramFiles%\HTML Help Workshop\hhc.exe" Doc\build\htmlhelp\pydoc.hhp
@rem buold the MSI file
cd PC
nmake /f icons.mak
cd ..\Tools\msi
del *.msi
nmake /f msisupport.mak
%HOST_PYTHON% msi.py
```
Use vcbuild for VS 2009. | ```batchfile
@rem Used by the buildbot "buildmsi" step.
cmd /c Tools\buildbot\external.bat
@rem build release versions of things
call "%VS90COMNTOOLS%vsvars32.bat"
if not exist ..\db-4.4.20\build_win32\release\libdb44s.lib (
vcbuild db-4.4.20\build_win32\Berkeley_DB.sln /build Release /project db_static
)
@rem build Python
cmd /q/c Tools\buildbot\kill_python.bat
vcbuild /useenv PCbuild\pcbuild.sln "Release|Win32"
@rem build the documentation
bash.exe -c 'cd Doc;make PYTHON=python2.5 update htmlhelp'
"%ProgramFiles%\HTML Help Workshop\hhc.exe" Doc\build\htmlhelp\pydoc.hhp
@rem buold the MSI file
cd PC
nmake /f icons.mak
cd ..\Tools\msi
del *.msi
nmake /f msisupport.mak
%HOST_PYTHON% msi.py
``` |
93832d89-946f-4d16-8cd9-8cb6a674ecec | {
"language": "Batchfile"
} | ```batchfile
cd %RECIPE_DIR%
cd ..
:: Remove the build directory since incremental builds aren't currently supported.
rd /s /q build
python setup.py install || exit 1
rd /s /q %SP_DIR%\__pycache__
rd /s /q %SP_DIR%\numpy
rd /s /q %SP_DIR%\Cython
```
Remove code that deletes build directory every time in conda recipe. Incremental builds are supported now. | ```batchfile
cd %RECIPE_DIR%
cd ..
python setup.py install || exit 1
rd /s /q %SP_DIR%\__pycache__
rd /s /q %SP_DIR%\numpy
rd /s /q %SP_DIR%\Cython
``` |
0d09f2a6-e3cb-4c64-8a09-fbb241c05946 | {
"language": "Batchfile"
} | ```batchfile
::set PSDK_INC_PATH=C:\PROGRA~1\MI2578~1\Windows\v6.0A\Include
::set PSDK_LIB_PATH=C:\PROGRA~1\MI2578~1\Windows\v6.0A\Lib
@echo off
set __sdk_path__="C:\Program Files\Microsoft SDKs\Windows\v6.0A"
call :setshortpath PSDK_INC_PATH %__sdk_path__%\Include
call :setshortpath PSDK_LIB_PATH %__sdk_path__%\Lib
goto :eof
:setshortpath
set %1=%~s2
goto :eof
```
Enable to set external SDK path | ```batchfile
@echo off
call :set_sdk_path
call :setshortpath PSDK_INC_PATH %__sdk_path__%\Include
call :setshortpath PSDK_LIB_PATH %__sdk_path__%\Lib
call :clean_sdk_path
goto :eof
:setshortpath
set %1=%~s2
goto :eof
:set_sdk_path
set __sdk_path__="C:\Program Files\Microsoft SDKs\Windows\v6.0A"
if NOT "%SDK_PATH%"=="" set __sdk_path__="%SDK_PATH%"
goto :eof
:clean_sdk_path
set __sdk_path__=
goto :eof
``` |
38981cc5-4262-4544-bbe8-a5dc32bd2ad7 | {
"language": "Batchfile"
} | ```batchfile
"%PYTHON%" setup.py install
"%PYTHON%" setup.py test
if errorlevel 1 exit 1
```
Replace "setup.py test" to "-m pip install -vv ." | ```batchfile
"%PYTHON%" setup.py install
"%PYTHON%" -m pip install -vv .
if errorlevel 1 exit 1
``` |
62710426-a864-4498-b13d-469eff91d0bd | {
"language": "Batchfile"
} | ```batchfile
SET GOPATH=%CD%\gopath
SET GATSPATH=%GOPATH%\src\github.com\cloudfoundry\cli-acceptance-tests
SET PATH=C:\Go\bin;%PATH%
SET PATH=C:\Program Files\Git\cmd\;%PATH%
SET PATH=%GOPATH%\bin;%PATH%
SET PATH=C:\Program Files\7-Zip;%PATH%
SET PATH=C:\Program Files\cURL\bin;%PATH%
SET PATH=%CD%;%PATH%
SET /p DOMAIN=<%CD%\bosh-lite-lock\name
call %CD%\cli-ci\ci\tasks\create-cats-config.bat
SET CONFIG=%CD%\config.json
pushd %CD%\cf-cli-binaries
7z x cf-cli-binaries.tgz
7z x cf-cli-binaries.tar
MOVE %CD%\cf-cli_winx64.exe ..\cf.exe
popd
go get -v github.com/onsi/ginkgo/ginkgo
cd %GATSPATH%
ginkgo.exe -r -nodes=4 -slowSpecThreshold=120 -randomizeSuites -skipPackage application ./gats
ginkgo.exe -r -nodes=4 -slowSpecThreshold=120 -randomizeSuites ./gats/application
```
Revert "switching to 7z as well, sourceforge still broke" | ```batchfile
SET GOPATH=%CD%\gopath
SET GATSPATH=%GOPATH%\src\github.com\cloudfoundry\cli-acceptance-tests
SET PATH=C:\Go\bin;%PATH%
SET PATH=C:\Program Files\Git\cmd\;%PATH%
SET PATH=%GOPATH%\bin;%PATH%
SET PATH=C:\Program Files\GnuWin32\bin;%PATH%
SET PATH=C:\Program Files\cURL\bin;%PATH%
SET PATH=%CD%;%PATH%
SET /p DOMAIN=<%CD%\bosh-lite-lock\name
call %CD%\cli-ci\ci\tasks\create-cats-config.bat
SET CONFIG=%CD%\config.json
pushd %CD%\cf-cli-binaries
gzip -d cf-cli-binaries.tgz
tar -xvf cf-cli-binaries.tar
MOVE %CD%\cf-cli_winx64.exe ..\cf.exe
popd
go get -v github.com/onsi/ginkgo/ginkgo
cd %GATSPATH%
ginkgo.exe -r -nodes=4 -slowSpecThreshold=120 -randomizeSuites -skipPackage application ./gats
ginkgo.exe -r -nodes=4 -slowSpecThreshold=120 -randomizeSuites ./gats/application
``` |
a98dde86-5188-48a0-b028-0880daaf894a | {
"language": "Batchfile"
} | ```batchfile
@echo off
if not exist build-x64 mkdir build-x64
cd build-x64
REM Update your dependency directories below as necessary
cmake -G"Visual Studio 12" -A x64 -DOpenCV_DIR="C:\libs\opencv-2.4.10\build-x64" -DSFML_ROOT="C:\libs\SFML-2.3.2-64" -DPROTOBUF_SRC_ROOT_FOLDER="C:\libs\protobuf-2.6.1" .. && goto :copy_files
REM only if cmake failed...
GOTO end
:copy_files
xcopy ..\samples-aux\vs2013\copy_to_bin64_dir\*.* .\bin\Debug\ /E /Y
xcopy ..\samples-aux\vs2013\copy_to_bin64_dir\*.* .\bin\Release\ /E /Y
xcopy ..\samples-aux\vs2013\copy_to_bin64_dir\*.* .\bin\RelWithDebInfo\ /E /Y
echo Done!
:end
cd ..```
Remove extra space in project gen script | ```batchfile
@echo off
if not exist build-x64 mkdir build-x64
cd build-x64
REM Update your dependency directories below as necessary
cmake -G"Visual Studio 12" -Ax64 -DOpenCV_DIR="C:\libs\opencv-2.4.10\build-x64" -DSFML_ROOT="C:\libs\SFML-2.3.2-64" -DPROTOBUF_SRC_ROOT_FOLDER="C:\libs\protobuf-2.6.1" .. && goto :copy_files
REM only if cmake failed...
GOTO end
:copy_files
xcopy ..\samples-aux\vs2013\copy_to_bin64_dir\*.* .\bin\Debug\ /E /Y
xcopy ..\samples-aux\vs2013\copy_to_bin64_dir\*.* .\bin\Release\ /E /Y
xcopy ..\samples-aux\vs2013\copy_to_bin64_dir\*.* .\bin\RelWithDebInfo\ /E /Y
echo Done!
:end
cd ..``` |
a83c112b-7318-4aa6-9891-940d6830cf21 | {
"language": "Batchfile"
} | ```batchfile
git init
touch README.md
git add README.md
git add .gitignore
git commit -m"initial commit"
cd external
git submodule add --depth 1 -- https://github.com/fmtlib/fmt.git
git submodule add --depth 1 -- https://github.com/gabime/spdlog.git
git submodule add --depth 1 -- https://github.com/onqtam/doctest.git
cd ..
```
Remove empty external dirs if present | ```batchfile
git init
touch README.md
git add README.md
git add .gitignore
git commit -m"initial commit"
cd external
rmdir fmt
git submodule add --depth 1 -- https://github.com/fmtlib/fmt.git
rmdir spdlog
git submodule add --depth 1 -- https://github.com/gabime/spdlog.git
rmdir doctest
git submodule add --depth 1 -- https://github.com/onqtam/doctest.git
cd ..
``` |
e03deefb-1c1a-4e18-ae76-8c93b8822007 | {
"language": "Batchfile"
} | ```batchfile
@echo off
set BIN_NAME=sqlitebiter
pip install --upgrade pip
pip install --upgrade .[build]
echo "----- start build -----"
pyinstaller cli.py --onefile --name %BIN_NAME% --clean --noconfirm --specpath build
echo "----- complete build -----"
echo "----- start compress -----"
set DIST_DIR_NAME=dist
set BIN_PATH=%DIST_DIR_NAME%/%BIN_NAME%.exe
set ARCHIVE_PATH=%DIST_DIR_NAME%/%BIN_NAME%_win_x64.zip
echo %ARCHIVE_PATH%
powershell compress-archive -Force %BIN_PATH% %ARCHIVE_PATH%
echo "----- complete compress -----"
```
Fix a build package for Windows fails on AppVeyor CI | ```batchfile
@echo off
set BIN_NAME=sqlitebiter
echo "----- start build -----"
pyinstaller cli.py --onefile --name %BIN_NAME% --clean --noconfirm --specpath build
echo "----- complete build -----"
echo "----- start compress -----"
set DIST_DIR_NAME=dist
set BIN_PATH=%DIST_DIR_NAME%/%BIN_NAME%.exe
set ARCHIVE_PATH=%DIST_DIR_NAME%/%BIN_NAME%_win_x64.zip
echo %ARCHIVE_PATH%
powershell compress-archive -Force %BIN_PATH% %ARCHIVE_PATH%
echo "----- complete compress -----"
``` |
391db2af-d9ee-47c8-a33e-3a4fb513a4f0 | {
"language": "Batchfile"
} | ```batchfile
@echo off
setlocal
for %%i in (NuGet.exe) do set nuget_path=%%~dpnx$PATH:i
if "%nuget_path%"=="" goto :nonuget
set packages_path=%~dp0packages
if exist "%packages_path%\repositories.config" (
for /f "usebackq delims=" %%p in (`PowerShell -C "Get-Content '%packages_path%\repositories.config' | Select-Xml //repository/@path | %%{$_.Node.Value}"`) do if errorlevel==0 call :restore "%packages_path%\%%p"
) else (
for /r %%d in (.) do if errorlevel==0 if exist %%d\packages.config call :restore "%%d"
)
goto :EOF
:restore
setlocal
echo Restoring packages for "%~1"
cd "%~1"
"%nuget_path%" install -OutputDirectory "%packages_path%" ^
-Source https://nuget.org/api/v2/ ^
-Source P:\Development\NuGet
goto :EOF
:nonuget
echo NuGet executable not found in PATH
echo For more on NuGet, see http://nuget.codeplex.com
exit /b 2
```
Package restore script fixes (possibly some due to PowerShell 4 compatibility issues) | ```batchfile
@echo off
setlocal
for %%i in (NuGet.exe) do set nuget_path=%%~dpnx$PATH:i
if "%nuget_path%"=="" goto :nonuget
set packages_path=%~dp0packages
if exist "%packages_path%\repositories.config" (
for /f "usebackq delims=" %%p in (`PowerShell -C "[xml](Get-Content '%packages_path%\repositories.config') | Select-Xml //repository/@path | %%{$_.Node.Value}"`) do if errorlevel==0 call :restore "%packages_path%\%%p"
) else (
for /r %%d in (.) do if errorlevel==0 if exist %%d\packages.config call :restore "%%d"
)
goto :EOF
:restore
setlocal
echo Restoring packages for "%~1"
cd "%~dp1"
"%nuget_path%" install -OutputDirectory "%packages_path%"
goto :EOF
:nonuget
echo NuGet executable not found in PATH
echo For more on NuGet, see http://nuget.codeplex.com
exit /b 2
``` |
06668552-e1f1-4cd3-b365-2ce49bc49f35 | {
"language": "Batchfile"
} | ```batchfile
@echo off
pushd %cd%
%~d0
cd %~dp0
echo Temporarily changing directory to %~dp0
if exist %USERPROFILE%\_vimrc goto GVIMRC
echo Installing _vimrc
echo set rtp+=%CD%\vim> %USERPROFILE%\_vimrc
echo source %CD%\vim\vimrc >> %USERPROFILE%\_vimrc
:GVIMRC
if exist %USERPROFILE%\_gvimrc goto END
echo Installing _gvimrc
echo source %CD%\vim\gvimrc > %USERPROFILE%\_gvimrc
:END
popd
```
Add log message for when the script is done. | ```batchfile
@echo off
pushd %cd%
%~d0
cd %~dp0
echo Temporarily changing directory to %~dp0
if exist %USERPROFILE%\_vimrc goto GVIMRC
echo Installing _vimrc
echo set rtp+=%CD%\vim> %USERPROFILE%\_vimrc
echo source %CD%\vim\vimrc >> %USERPROFILE%\_vimrc
:GVIMRC
if exist %USERPROFILE%\_gvimrc goto END
echo Installing _gvimrc
echo source %CD%\vim\gvimrc > %USERPROFILE%\_gvimrc
:END
echo Done!
popd
``` |
151c89b7-5dd8-41f7-b441-3483121483f6 | {
"language": "Batchfile"
} | ```batchfile
rem CMake/MinGW workaround - remove sh.exe from PATH
where sh
set MINGW=C:\Qt\Tools\mingw530_32
set QTDIR=C:\Qt\5.7\mingw53_32
set PATH=%PATH:C:\Program Files\Git\usr\bin;=%
set CMAKE_PREFIX_PATH=%QTDIR%
set PATH=%MINGW%\bin;%PATH%;%QTDIR%\bin
:: Qt needs to find the windows platform plugin to run tests
set QT_QPA_PLATFORM_PLUGIN_PATH=%QTDIR%\plugins
mkdir build
cd build
cmake -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=../INSTALL ..
cmake --build . --target install
ctest -VV
```
Add error check to build script | ```batchfile
rem CMake/MinGW workaround - remove sh.exe from PATH
where sh
set MINGW=C:\Qt\Tools\mingw530_32
set QTDIR=C:\Qt\5.7\mingw53_32
set PATH=%PATH:C:\Program Files\Git\usr\bin;=%
set CMAKE_PREFIX_PATH=%QTDIR%
set PATH=%MINGW%\bin;%PATH%;%QTDIR%\bin
:: Qt needs to find the windows platform plugin to run tests
set QT_QPA_PLATFORM_PLUGIN_PATH=%QTDIR%\plugins
mkdir build
cd build
cmake -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=../INSTALL .. || goto :error
cmake --build . --target install || goto :error
ctest -VV || goto :error
goto :EOF
:error
echo Failed with error #%errorlevel%.
exit /b %errorlevel%
``` |
5aaf5677-37a0-48e6-b515-117719606322 | {
"language": "Batchfile"
} | ```batchfile
@ECHO OFF
IF NOT EXIST virtualenv GOTO DIRNOTEXISTS
:DIREXISTS
call virtualenv\scripts\activate
pip install --use-mirrors argparse coverage doxypy lockfile pyserial unittest-xml-reporting
GOTO DONE
:DIRNOTEXISTS
python virtualenv.py virtualenv
GOTO DIREXISTS
:DONE
```
Add "mock" to the installed packages | ```batchfile
@ECHO OFF
IF NOT EXIST virtualenv GOTO DIRNOTEXISTS
:DIREXISTS
call virtualenv\scripts\activate
pip install --use-mirrors argparse coverage doxypy lockfile mock pyserial unittest-xml-reporting
GOTO DONE
:DIRNOTEXISTS
python virtualenv.py virtualenv
GOTO DIREXISTS
:DONE
``` |
c44862a6-cf75-454e-9bf3-c1d20e92c9ac | {
"language": "Batchfile"
} | ```batchfile
```
Add a small script for debugging on windows | ```batchfile
@echo off
if "%OS%" == "Windows_NT" setlocal
if NOT DEFINED JAVA_HOME goto :err
REM Ensure that any user defined CLASSPATH variables are not used on startup
set CLASSPATH=
REM For each jar in the lib directory call append to build the CLASSPATH variable.
for %%i in ("..\output\jardist\*.jar") do call :append "%%i"
goto okClasspath
:append
set CLASSPATH=%CLASSPATH%;%1
goto :eof
:okClasspath
REM Include the \classes directory so it works in development
set PLAYORM_CLASSPATH="..\bin";%CLASSPATH%;
SET A_PORT=8000
SET A_DBG=-Xdebug -Xrunjdwp:transport=dt_socket,address=127.0.0.1:8000,suspend=y
goto runCli
:runCli
"%JAVA_HOME%\bin\java" %A_DBG% -cp %PLAYORM_CLASSPATH% com.alvazan.ssql.cmdline.PlayOrm %*
goto finally
:err
echo The JAVA_HOME environment variable must be set to run this program!
pause
:finally
ENDLOCAL
``` |
88a9c903-7480-4bc7-8a0d-8f8c4e475361 | {
"language": "Batchfile"
} | ```batchfile
xcopy ..\icons\favicon.ico ..\Web /Y
mkdir ..\Web\Examples
xcopy ..\documentation\images\series ..\Web\Examples /Y
..\Tools\Lynx\FtpUpload.exe %OXYPLOT_FTP_SERVER% %OXYPLOT_FTP_USER% %OXYPLOT_FTP_PASSWORD% ..\Web\*.* %OXYPLOT_FTP_FOLDER% /t=1```
Correct environment variable in build script | ```batchfile
xcopy ..\icons\favicon.ico ..\Web /Y
mkdir ..\Web\Examples
xcopy ..\documentation\images\series ..\Web\Examples /Y
..\Tools\Lynx\FtpUpload.exe ftp.oxyplot.org %OXYPLOT_FTP_USER% %OXYPLOT_FTP_PWD% ..\Web\*.* %OXYPLOT_FTP_FOLDER% /t=1``` |
9a1b1de2-88d1-4f7d-8a0c-db6a40927c52 | {
"language": "Batchfile"
} | ```batchfile
mkdir build
cd build
:: Configure.
cmake -G "NMake Makefiles" -D CMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% \
.
if errorlevel 1 exit 1
:: Build.
nmake
if errorlevel 1 exit 1
:: Install.
nmake install
if errorlevel 1 exit 1
```
Update Windows build to deal with newline issue | ```batchfile
mkdir build
cd build
:: Configure.
cmake -G "NMake Makefiles" -D CMAKE_INSTALL_PREFIX=%PREFIX% .
if errorlevel 1 exit 1
:: Build.
nmake
if errorlevel 1 exit 1
:: Install.
nmake install
if errorlevel 1 exit 1
``` |
bbb1bed2-3718-4b8a-b6d7-009fb501f76d | {
"language": "Batchfile"
} | ```batchfile
set QT=%1
set CETEST=%QT%\bin\cetest.exe
set CETEST_ARGS=-cache %QT%\.qmake.cache -libpath \Windows -f
%CETEST% %CETEST_ARGS% tests\auto\qvaluespace\qvaluespace.pro
%CETEST% %CETEST_ARGS% tests\auto\qvaluespaceprovider\qvaluespaceprovider.pro
%CETEST% %CETEST_ARGS% tests\auto\qvaluespacesubscriber\tst_qvaluespacesubscriber\tst_qvaluespacesubscriber.pro
%CETEST% %CETEST_ARGS% tests\auto\qvaluespacesubscriber\tst_qvaluespacesubscriber_oop\tst_qvaluespacesubscriber_oop.pro
%CETEST% %CETEST_ARGS% tests\auto\qsystemreadwritelock\qsystemreadwritelock\test\test.pro
%CETEST% %CETEST_ARGS% tests\auto\qsystemreadwritelock_oop\qsystemreadwritelock_oop\test\test.pro
%CETEST% %CETEST_ARGS% tests\auto\qcrmlparser\qcrmlparser.pro
```
Remove unbuilt tests on Windows CE. | ```batchfile
set QT=%1
set CETEST=%QT%\bin\cetest.exe
set CETEST_ARGS=-cache %QT%\.qmake.cache -libpath \Windows -f
%CETEST% %CETEST_ARGS% tests\auto\qvaluespace\qvaluespace.pro
%CETEST% %CETEST_ARGS% tests\auto\qvaluespaceprovider\qvaluespaceprovider.pro
%CETEST% %CETEST_ARGS% tests\auto\qvaluespacesubscriber\tst_qvaluespacesubscriber\tst_qvaluespacesubscriber.pro
%CETEST% %CETEST_ARGS% tests\auto\qvaluespacesubscriber\tst_qvaluespacesubscriber_oop\tst_qvaluespacesubscriber_oop.pro
``` |
a359605d-f5fe-460e-baf3-6e2bbf7f6c70 | {
"language": "Batchfile"
} | ```batchfile
call "%VS%\VC\vcvarsall.bat" x86
@echo on
cov-build --dir cov_dir msbuild.exe /m:1 /p:Configuration="%CONFIGURATION%" /p:Platform="%PLATFORM%" /t:"%TARGET%" %EXTRA% %FILE%
if errorlevel 1 goto error
cov-analyze --dir cov_dir -j auto --aggressiveness-level high --security --concurrency --preview --all --rule --enable-fnptr --strip-path c:\git\xenbus
cov-commit-defects --dir cov_dir --host dagu-4.uk.xensource.com --port 8080 --user windows --password coverity --stream %PLATFORM%
exit 0
:error
exit 1
```
Revert script pollution that was accidentally pushed | ```batchfile
call "%VS%\VC\vcvarsall.bat" x86
@echo on
msbuild.exe /m:1 /p:Configuration="%CONFIGURATION%" /p:Platform="%PLATFORM%" /t:"%TARGET%" %EXTRA% %FILE%
if errorlevel 1 goto error
exit 0
:error
exit 1
``` |
d0e46276-389f-427e-8395-7a065ac79e9e | {
"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%'"
``` |
e1ebf317-1a74-47ab-9584-9a2d2e368cdb | {
"language": "Batchfile"
} | ```batchfile
@echo off
set BIN_NAME=sqlitebiter
pip install --upgrade pip
pip install --upgrade .[build]
echo "----- start build -----"
pyinstaller cli.py --onefile --name %BIN_NAME% --clean --noconfirm --specpath build
echo "----- complete build -----"
echo "----- start compress -----"
set DIST_DIR_NAME=dist
set BIN_PATH=%DIST_DIR_NAME%/%BIN_NAME%
set ARCHIVE_PATH=%DIST_DIR_NAME%/%BIN_NAME%_win_x64
powershell compress-archive -Force %BIN_PATH%.exe %ARCHIVE_PATH%.zip
echo "----- complete compress -----"
pause
```
Update a build script for Windows | ```batchfile
@echo off
set BIN_NAME=sqlitebiter
pip install --upgrade pip
pip install --upgrade .[build]
echo "----- start build -----"
pyinstaller cli.py --onefile --name %BIN_NAME% --clean --noconfirm --specpath build
echo "----- complete build -----"
echo "----- start compress -----"
set DIST_DIR_NAME=dist
set BIN_PATH=%DIST_DIR_NAME%/%BIN_NAME%.exe
set ARCHIVE_PATH=%DIST_DIR_NAME%/%BIN_NAME%_win_x64.zip
echo %ARCHIVE_PATH%
powershell compress-archive -Force %BIN_PATH% %ARCHIVE_PATH%
echo "----- complete compress -----"
``` |
5ae2dedc-cb08-47a2-8653-bc0ef93e3791 | {
"language": "Batchfile"
} | ```batchfile
@echo off
set release_name=OpenEMap-1.2.0-rc.1
echo ..\release\%release_name%
cd ..\release
rd /s /q %release_name%
del %release_name%.zip
md %release_name%
cd %release_name%
md config
md resources
cd..
sencha.exe compile --classpath=..\src\main\javascript,\libs\ext-4.2.1\src,\libs\geoext-2.0.1\src exclude -all and include -namespace OpenEMap and include -file ..\src\main\javascript\OpenEMap.js and concat --closure ..\%release_name%-all.js
sencha.exe compile --classpath=..\src\main\javascript,\libs\ext-4.2.1\src,\libs\geoext-2.0.1\src exclude -all and include -namespace OpenEMap and include -file ..\src\main\javascript\OpenEMap.js and concat ..\%release_name%-all-debug.js
copy ..\*.html ..\release\%release_name%
copy ..\*-all.js ..\release\%release_name%
xcopy ..\config ..\release\%release_name%\config /E
xcopy ..\resources ..\release\%release_name%\resources /E
zip -r %release_name%.zip %release_name%/*
more
```
Build script (windows) bug fixed | ```batchfile
@echo off
set release_name=OpenEMap-1.2.0-rc.1
echo ..\release\%release_name%
cd ..\release
rd /s /q %release_name%
del %release_name%.zip
del ..\%release_name%-all.js
del ..\%release_name%-all-debug.js
md %release_name%
cd %release_name%
md config
md resources
cd..
sencha.exe compile --classpath=..\src\main\javascript,\libs\ext-4.2.1\src,\libs\geoext-2.0.1\src exclude -all and include -namespace OpenEMap and include -file ..\src\main\javascript\OpenEMap.js and concat --closure ..\%release_name%-all.js
sencha.exe compile --classpath=..\src\main\javascript,\libs\ext-4.2.1\src,\libs\geoext-2.0.1\src exclude -all and include -namespace OpenEMap and include -file ..\src\main\javascript\OpenEMap.js and concat ..\%release_name%-all-debug.js
copy ..\*.html ..\release\%release_name%
copy ..\*-all.js ..\release\%release_name%
xcopy ..\config ..\release\%release_name%\config /E
xcopy ..\resources ..\release\%release_name%\resources /E
zip -r %release_name%.zip %release_name%/*
more
``` |
c0f8f755-5236-4008-94db-8f7c9832b625 | {
"language": "Batchfile"
} | ```batchfile
```
Add a batch file to build for Unity (release 2.0, with alternate output directories) | ```batchfile
setlocal
pushd %~dp0
set msBuildDir=%WINDIR%\Microsoft.NET\Framework\v4.0.30319
call %msBuildDir%\msbuild.exe ClientKit\ClientKit.csproj /p:Configuration=Release20 /p:OutputPath=..\Managed-OSVR-Unity /p:NativeOutputSuffix32=x86 /p:NativeOutputSuffix64=x86_64%*
endlocal
``` |
9f3ee039-4837-44ee-bd8b-27e822e86cef | {
"language": "Batchfile"
} | ```batchfile
```
Add windows ssh wrapper batch file | ```batchfile
@echo off
set opts="-oStrictHostKeyChecking=no -oPasswordAuthentication=no -oKbdInteractiveAuthentication=no -oChallengeResponseAuthentication=no"
if "%GIT_IDENTITY%" == "" goto NOIDENT
set opts="%opts% -i %GIT_IDENTITY%"
:NOIDENT
%GIT_SSH% %opts% %*
``` |
0bc8cac0-3273-426e-a888-d87ee1e64677 | {
"language": "Batchfile"
} | ```batchfile
@echo off
for %%i in ("%~0") do set THIS_BAT_PATH=%%~dpi
set SAVE_CD=%CD%
cd %THIS_BAT_PATH%\deps\firebreath\
call prep2013.cmd "..\..\src" "..\..\build_win_vc2013" -Wno-dev
cd %SAVE_CD%
pause
```
Use dynamic CRT by default | ```batchfile
@echo off
for %%i in ("%~0") do set THIS_BAT_PATH=%%~dpi
set SAVE_CD=%CD%
cd %THIS_BAT_PATH%\deps\firebreath\
call prep2013.cmd "..\..\src" "..\..\build_win_vc2013" -Wno-dev "-DWITH_DYNAMIC_MSVC_RUNTIME=1"
cd %SAVE_CD%
pause
``` |
faadc95f-2102-458e-95b1-246ab758b2bf | {
"language": "Batchfile"
} | ```batchfile
pushd ..
if [%1] == [] (
rem === BUILDING GolangSDK ===
node generate.js golangSDK=..\sdks\GolangSDK -apiSpecPath
) else (
rem === BUILDING GolangSDK with params %* ===
node generate.js golangSDK=..\sdks\GolangSDK %*
)
popd
```
Add pause to golang bat for testing | ```batchfile
pushd ..
if [%1] == [] (
rem === BUILDING GolangSDK ===
node generate.js golangSDK=..\sdks\GolangSDK -apiSpecPath
) else (
rem === BUILDING GolangSDK with params %* ===
node generate.js golangSDK=..\sdks\GolangSDK %*
)
popd
pause``` |
11cbfada-83e1-4522-85d1-c2df36426658 | {
"language": "Batchfile"
} | ```batchfile
@echo off
pushd "%~dp0"
for /f "tokens=*" %%f in ('dir /s /b *.tt') do (
echo>&2 dotnet t4 "%%f"
dotnet t4 "%%f" || goto :end
)
:end
popd
exit /b %ERRORLEVEL%
```
Revert "Fix error propagation in T4 batch script" | ```batchfile
@echo off
pushd "%~dp0"
for /f "tokens=*" %%f in ('dir /s /b *.tt') do (
echo>&2 dotnet t4 "%%f"
dotnet t4 "%%f" || goto :end
)
:end
popd
``` |
abb34ace-c4b4-4efe-856e-3611f5ffe2d8 | {
"language": "Batchfile"
} | ```batchfile
Library\DFU-programmer\DFU\dfu-programmer at32uc3c1512 erase
Library\DFU-programmer\DFU\dfu-programmer at32uc3c1512 get
Library\DFU-programmer\DFU\dfu-programmer at32uc3c1512 flash Debug\MegaFly2.hex --suppress-bootloader-mem
Library\DFU-programmer\DFU\dfu-programmer at32uc3c1512 reset
pause```
Remove pause in dfu bat file | ```batchfile
Library\DFU-programmer\DFU\dfu-programmer at32uc3c1512 erase
Library\DFU-programmer\DFU\dfu-programmer at32uc3c1512 get
Library\DFU-programmer\DFU\dfu-programmer at32uc3c1512 flash Debug\MegaFly2.hex --suppress-bootloader-mem
Library\DFU-programmer\DFU\dfu-programmer at32uc3c1512 reset
REM pause``` |
045e2125-1ce7-44da-9360-ba7c788f6ed1 | {
"language": "Batchfile"
} | ```batchfile
setlocal
call clean.bat
call ..\Tools\SetVsEnv x86
mkdir Install\rhel
copy qemupciserial.* .\Install\
inf2cat /driver:Install /uselocaltime /os:XP_X86,Server2003_X86,XP_X64,Server2003_X64,Vista_X86,Server2008_X86,Vista_X64,Server2008_X64,7_X86,7_X64,Server2008R2_X64,8_X86,8_X64,Server8_X64,6_3_X86,6_3_X64,Server6_3_X64,10_X86,10_X64,Server10_X64
copy rhel\qemupciserial.* .\Install\rhel
inf2cat /driver:Install\rhel /uselocaltime /os:XP_X86,Server2003_X86,XP_X64,Server2003_X64,Vista_X86,Server2008_X86,Vista_X64,Server2008_X64,7_X86,7_X64,Server2008R2_X64,8_X86,8_X64,Server8_X64,6_3_X86,6_3_X64,Server6_3_X64,10_X86,10_X64,Server10_X64
endlocal
```
Remove code for legacy OSes | ```batchfile
setlocal
call clean.bat
call ..\Tools\SetVsEnv x86
mkdir Install\rhel
copy qemupciserial.* .\Install\
inf2cat /driver:Install /uselocaltime /os:8_X86,8_X64,Server8_X64,6_3_X86,6_3_X64,Server6_3_X64,10_X86,10_X64,Server10_X64
copy rhel\qemupciserial.* .\Install\rhel
inf2cat /driver:Install\rhel /uselocaltime /os:8_X86,8_X64,Server8_X64,6_3_X86,6_3_X64,Server6_3_X64,10_X86,10_X64,Server10_X64
endlocal
``` |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.