Instruction stringlengths 14 778 | input_code stringlengths 0 4.24k | output_code stringlengths 1 5.44k |
|---|---|---|
Fix path update to not include trailing backslash | if not exist "C:\Windows\Temp\build-tools.exe" (
powershell -Command "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::TLS12; (New-Object System.Net.WebClient).DownloadFile('https://download.microsoft.com/download/5/f/7/5f7acaeb-8363-451f-9425-68a90f98b238/visualcppbuildtools_full.exe', 'C:\Windows\Temp\build-tools.exe')" <NUL
)
start /wait C:\Windows\Temp\build-tools.exe /Passive /AdminFile A:\buildtools-adminfile.xml
setx PATH "%PATH%;C:\Program Files (x86)\Windows Kits\8.1\bin\x86\" /m
| if not exist "C:\Windows\Temp\build-tools.exe" (
powershell -Command "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::TLS12; (New-Object System.Net.WebClient).DownloadFile('https://download.microsoft.com/download/5/f/7/5f7acaeb-8363-451f-9425-68a90f98b238/visualcppbuildtools_full.exe', 'C:\Windows\Temp\build-tools.exe')" <NUL
)
start /wait C:\Windows\Temp\build-tools.exe /Passive /AdminFile A:\buildtools-adminfile.xml
setx PATH "%PATH%;C:\Program Files (x86)\Windows Kits\8.1\bin\x86" /m
|
Add unit testing script for Windows. | :: Run all unit tests
@echo off
setlocal EnableDelayedExpansion
dir /b unit-tests > tempFile1
findstr /e /c:".py" tempFile1 > tempFile2
findstr /B /R /C:"[^__]" tempFile2 > tempFile3
del tempFile1
del tempFile2
set /A testIndex=1
for /F "tokens=*" %%A in (tempFile3) do (
echo|set /p=Test !testIndex!:
echo %%~nA
echo ----------------------------------------------------------------------
call python -m unit-tests.%%~nA -v
set /A "testIndex+=1"
echo.
)
del tempFile3
| |
Upgrade build script to include en-EN, fr-FR cultures | @echo off
rem =======================================================
rem Settings
rem =======================================================
set Platform=Win64
set BuildMode=Development
rem =======================================================
rem Release variables
rem =======================================================
set VersionName=%1
set InputProject=%2
set OutputDir=%3
set UAT=%4
rem =======================================================
rem Run UAT
rem =======================================================
%UAT% -ScriptsForProject=%InputProject% BuildCookRun -nocompile -nocompileeditor -installed -nop4 -project=%InputProject% -cook -stage -archive -archivedirectory=%OutputDir% -package -clientconfig=%BuildMode% -ue4exe=UE4Editor-Cmd.exe -clean -pak -compressed -prereqs -distribution -nodebuginfo -createreleaseversion=%VersionName% -targetplatform=%Platform% -build -utf8output
| @echo off
rem =======================================================
rem Settings
rem =======================================================
set Platform=Win64
set BuildMode=Development
rem =======================================================
rem Release variables
rem =======================================================
set VersionName=%1
set InputProject=%2
set OutputDir=%3
set UAT=%4
rem =======================================================
rem Run UAT
rem =======================================================
%UAT% -ScriptsForProject=%InputProject% BuildCookRun -nocompile -nocompileeditor -installed -nop4 -project=%InputProject% -cook -stage -archive -archivedirectory=%OutputDir% -package -clientconfig=%BuildMode% -ue4exe=UE4Editor-Cmd.exe -clean -pak -compressed -prereqs -distribution -nodebuginfo -createreleaseversion=%VersionName% -targetplatform=%Platform% -build -utf8output -CookCultures=en-US+fr-FR
|
Build help file before copying it! | @echo "mkDistribution v1.3"
if exist current (
rmdir /s /q current
)
mkdir current
mkdir current\netcf-10
nant -t:netcf-1.0 -D:build.output.dir=current\netcf-10 -buildfile:sharpZLib.build build
mkdir current\netcf-20
nant -t:netcf-2.0 -D:build.output.dir=current\netcf-20 -buildfile:sharpZLib.build build
mkdir current\net-11
nant -t:net-1.1 -D:build.output.dir=current\net-11 -buildfile:sharpZLib.build build
mkdir current\net-20
nant -t:net-2.0 -D:build.output.dir=current\net-20 -buildfile:sharpZLib.build build
mkdir current\doc
copy doc\readme.rtf current\doc
copy doc\Changes.txt current\doc
copy doc\Copying.txt current\doc
copy SharpZipLib.chm current\doc
copy installGAC.bat current
copy uninstallGAC.bat current
"c:\Program Files\EWSoftware\Sandcastle Help File Builder\SandcastleBuilderConsole.exe" .\SharpZipLib.shfb
samples\cs\bin\sz -rc current\SharpZipLib.zip current\*.dll
@echo TODO Compress source to SharpZipLib_SourceSamples.zip
@echo TODO Build Bin Zip files
| @echo "mkDistribution v1.4"
if exist current (
rmdir /s /q current
)
mkdir current
mkdir current\netcf-10
nant -t:netcf-1.0 -D:build.output.dir=current\netcf-10 -buildfile:sharpZLib.build build
mkdir current\netcf-20
nant -t:netcf-2.0 -D:build.output.dir=current\netcf-20 -buildfile:sharpZLib.build build
mkdir current\net-11
nant -t:net-1.1 -D:build.output.dir=current\net-11 -buildfile:sharpZLib.build build
mkdir current\net-20
nant -t:net-2.0 -D:build.output.dir=current\net-20 -buildfile:sharpZLib.build build
"c:\Program Files\EWSoftware\Sandcastle Help File Builder\SandcastleBuilderConsole.exe" .\SharpZipLib.shfb
mkdir current\doc
copy doc\readme.rtf current\doc
copy doc\Changes.txt current\doc
copy doc\Copying.txt current\doc
copy SharpZipLib.chm current\doc
copy installGAC.bat current
copy uninstallGAC.bat current
samples\cs\bin\sz -rc current\SharpZipLib.zip current\*.dll
@echo TODO Compress source to SharpZipLib_SourceSamples.zip
@echo TODO Build Bin Zip files
|
Add missing perl dependency for packer | @echo off
cd /D %~dp0
call settings.cmd
call ..\unxutils.cmd
cd dist\%ARCH%
call pp -B -o psass.exe ^
-I ../../../blib/lib ^
-M Encode::Byte ^
-M List::MoreUtils::XS ^
-M List::MoreUtils::PP ^
-M Win32::ChangeNotify ^
-M Filesys::Notify::Simple ^
CSS-Sass-%RELVERSION%/bin/psass
cd ..\..
REM tested and working, but much bigger size
REM -l "%PERLPATH%/c/bin/_libsass-0.dll" ^
copy %CD%\dist\%ARCH%\psass.exe %CD%\..\create\%XARCH%
| @echo off
cd /D %~dp0
call settings.cmd
call ..\unxutils.cmd
cd dist\%ARCH%
call pp -B -o psass.exe ^
-I ../../../blib/lib ^
-M Encode::Byte ^
-M PerlIO::encoding ^
-M List::MoreUtils::XS ^
-M List::MoreUtils::PP ^
-M Win32::ChangeNotify ^
-M Filesys::Notify::Simple ^
CSS-Sass-%RELVERSION%/bin/psass
cd ..\..
REM tested and working, but much bigger size
REM -l "%PERLPATH%/c/bin/_libsass-0.dll" ^
copy %CD%\dist\%ARCH%\psass.exe %CD%\..\create\%XARCH%
|
Disable updates on Windows 2008 R2 and Windows 7 | <!-- :
@echo off
echo ==^> Enabling updates for other products from Microsoft Update
net stop wuauserv
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update" /v EnableFeaturedSoftware /t REG_DWORD /d 1 /f
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update" /v IncludeRecommendedUpdates /t REG_DWORD /d 1 /f
cscript //nologo "%~f0?.wsf"
net start wuauserv
exit /b
----- Begin wsf script --->
<job><script language="VBScript">
Set ServiceManager = CreateObject("Microsoft.Update.ServiceManager")
Set NewUpdateService = ServiceManager.AddService2("7971f918-a847-4430-9279-4a52d1efe18d",7,"")
</script></job>
| <!-- :
@echo off
echo ==^> Enabling updates for other products from Microsoft Update
net stop wuauserv
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update" /v EnableFeaturedSoftware /t REG_DWORD /d 1 /f
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update" /v IncludeRecommendedUpdates /t REG_DWORD /d 1 /f
cscript //nologo "%~f0?.wsf"
net start wuauserv
exit /b
----- Begin wsf script --->
<job><script language="VBScript">
Set ServiceManager = CreateObject("Microsoft.Update.ServiceManager")
Set NewUpdateService = ServiceManager.AddService2("7971f918-a847-4430-9279-4a52d1efe18d",7,"")
Const NOT_CONFIGURED = 0
Const DISABLED = 1
Const PROMPT_TO_APPROVE_BEFORE_DOWNLOAD = 2
Const DOWNLOAD_AUTOMATICALLY = 3
Const SCHEDULED_INSTALLATION = 4
Set AutoUpdate = CreateObject("Microsoft.Update.AutoUpdate")
Set AutoUpdateSettings = AutoUpdate.Settings
AutoUpdateSettings.NotificationLevel = DISABLED
AutoUpdateSettings.Save
AutoUpdateSettings.Refresh
</script></job>
|
Test the code without a C extension. | call \ned\bin\switchpy 23
python setup.py develop
nosetests
call \ned\bin\switchpy 24
python setup.py develop
nosetests
call \ned\bin\switchpy 25
python setup.py develop
nosetests
call \ned\bin\switchpy 26
python setup.py develop
nosetests
| call \ned\bin\switchpy 23
python setup.py develop
nosetests
del coverage\tracer.pyd
nosetests
call \ned\bin\switchpy 24
python setup.py develop
nosetests
del coverage\tracer.pyd
nosetests
call \ned\bin\switchpy 25
python setup.py develop
nosetests
del coverage\tracer.pyd
nosetests
call \ned\bin\switchpy 26
python setup.py develop
nosetests
del coverage\tracer.pyd
nosetests
|
Add bat to help sign unsigned dependencies | @echo off
set ildasmFolder=%~1
set ilasmFolder=%~2
set inputFolder=%~3
set inputFilename=%~4
set debug=%~5
mkdir tempSigning
"%ildasmFolder%\sn.exe" -k tempSigning\keyPair.snk
echo Key Written
"%ildasmFolder%\ildasm.exe" "%inputFolder%\%inputFilename%" /out:"tempSigning\%inputFilename%.il"
echo Disassembled
"%ilasmFolder%\ilasm.exe" "tempSigning\%inputFilename%.il" /dll /key=tempSigning\keyPair.snk /output="tempSigning\%inputFilename%"
echo Assembled
move /Y "tempSigning\%inputFilename%" "%inputFolder%\%inputFilename%"
echo Overwritten
IF "%debug%"=="" rmdir /s /q tempSigning | |
Put back the @echo off.. | rem @echo off
set VIBE_BIN=%~dps0
set LIBDIR=%VIBE_BIN%..\lib\win-i386
set BINDIR=%VIBE_BIN%..\lib\bin
set LIBS="%LIBDIR%\event2.lib" "%LIBDIR%\eay.lib" "%LIBDIR%\ssl.lib" ws2_32.lib
set EXEDIR=%TEMP%\.rdmd\source
set START_SCRIPT=%EXEDIR%\vibe.cmd
if NOT EXIST %EXEDIR% (
mkdir %EXEDIR%
)
copy "%VIBE_BIN%*.dll" %EXEDIR% > nul 2>&1
copy "%VIBE_BIN%*.dll" . > nul 2>&1
copy "%VIBE_BIN%vpm.d" %EXEDIR% > nul 2>&1
rem Run, execute, do everything.. but when you do it, do it with the vibe!
rdmd -debug -g -w -property -of%EXEDIR%\vpm.exe -I%VIBE_BIN%..\source %LIBS% %EXEDIR%\vpm.d %VIBE_BIN% %START_SCRIPT% %1 %2 %3 %4 %5 %6 %7 %8 %9
rem Finally, start the app, if vpm succeded.
if ERRORLEVEL 0 %START_SCRIPT%
| @echo off
set VIBE_BIN=%~dps0
set LIBDIR=%VIBE_BIN%..\lib\win-i386
set BINDIR=%VIBE_BIN%..\lib\bin
set LIBS="%LIBDIR%\event2.lib" "%LIBDIR%\eay.lib" "%LIBDIR%\ssl.lib" ws2_32.lib
set EXEDIR=%TEMP%\.rdmd\source
set START_SCRIPT=%EXEDIR%\vibe.cmd
if NOT EXIST %EXEDIR% (
mkdir %EXEDIR%
)
copy "%VIBE_BIN%*.dll" %EXEDIR% > nul 2>&1
copy "%VIBE_BIN%*.dll" . > nul 2>&1
copy "%VIBE_BIN%vpm.d" %EXEDIR% > nul 2>&1
rem Run, execute, do everything.. but when you do it, do it with the vibe!
rdmd -debug -g -w -property -of%EXEDIR%\vpm.exe -I%VIBE_BIN%..\source %LIBS% %EXEDIR%\vpm.d %VIBE_BIN% %START_SCRIPT% %1 %2 %3 %4 %5 %6 %7 %8 %9
rem Finally, start the app, if vpm succeded.
if ERRORLEVEL 0 %START_SCRIPT%
|
Add utility to force dynamic compilation | @echo off
REM Delete all compiled module binaries to force dynamic compilation (.csproj) to kick in
set SRC=src\Orchard.Web\Modules
for /f %%i in ('dir %SRC% /b /ad') do del /q %SRC%\%%i\bin\%%i.dll
| |
Update new windows build script |
set PYTHON=C:\Python27\python
set EASY_INSTALL=c:\python27\scripts\easy_install.exe
set NEXUSDIR="C:\Program Files (x86)\NeXus Data Format\"
set PATH=C:\Python27;C:\Python27\Scripts;C:\mingw\bin;%PATH%
cd %WORKSPACE%
%PYTHON% check_packages.py
cd %WORKSPACE%
python setup.py build -cmingw32
cd %WORKSPACE%
python setup.py docs
cd %WORKSPACE%
python setup.py bdist_egg --skip-build
cd %WORKSPACE%\test
%PYTHON% utest_sasview.py
cd %WORKSPACE%
mkdir sasview-install
set PYTHONPATH=%WORKSPACE%\sasview-install;%PYTHONPATH%
cd %WORKSPACE%
cd dist
%EASY_INSTALL% -d ..\sasview-install sasview-3.1.2-py2.7-win32.egg
cd %WORKSPACE%\sasview
python setup_exe.py py2exe
python installer_generator.py
"C:\Program Files (x86)\Inno Setup 5\ISCC.exe" installer.iss
cd Output
xcopy setupSasView.exe %WORKSPACE%\dist
cd %WORKSPACE%
|
set PYTHON=C:\Python27\python
set EASY_INSTALL=c:\python27\scripts\easy_install.exe
set NEXUSDIR="C:\Program Files (x86)\NeXus Data Format\"
set PATH=C:\Python27;C:\Python27\Scripts;C:\mingw\bin;%PATH%
set PYLINT=c:\python27\scripts\pylint
cd %WORKSPACE%
%PYTHON% check_packages.py
cd %WORKSPACE%
python setup.py build -cmingw32
cd %WORKSPACE%
python setup.py docs
cd %WORKSPACE%
python setup.py bdist_egg --skip-build
cd %WORKSPACE%\test
%PYTHON% utest_sasview.py
cd %WORKSPACE%
mkdir sasview-install
set PYTHONPATH=%WORKSPACE%\sasview-install;%PYTHONPATH%
cd %WORKSPACE%
cd dist
%EASY_INSTALL% -d ..\sasview-install sasview-3.1.2-py2.7-win32.egg
cd %WORKSPACE%\sasview
python setup_exe.py py2exe
python installer_generator.py
"C:\Program Files (x86)\Inno Setup 5\ISCC.exe" installer.iss
cd Output
xcopy setupSasView.exe %WORKSPACE%\dist
cd %WORKSPACE%
%PYLINT% --rcfile "%WORKSPACE%cd /build_tools/pylint.rc" -f parseable sasview-install/sasview*.egg/sas sasview > test/sasview.txt
cd %WORKSPACE%
|
Add maven path on windows. | :: Copyright 2015 Rouslan Solomakhin
::
:: Licensed under the Apache License, Version 2.0 (the "License")
:: you may not use this file except in compliance with the License.
:: You may obtain a copy of the License at
::
:: http://www.apache.org/licenses/LICENSE-2.0
::
:: Unless required by applicable law or agreed to in writing, software
:: distributed under the License is distributed on an "AS IS" BASIS,
:: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
:: See the License for the specific language governing permissions and
:: limitations under the License.
set EDITOR=runemacs
set GYP_DEFINES="component=shared_library fastbuild=2"
set GYP_GENERATORS=ninja
set HOME=%USERPROFILE%
set PATH=%PATH%;%SYSTEMDRIVE%\emacs\bin;%SYSTEMDRIVE%\console2;%SYSTEMDRIVE%\src\depot_tools;%USERPROFILE%\.third_party\cask\bin;%SYSTEMDRIVE%\java\jdk\bin
call "%ProgramFiles(x86)%\Microsoft Visual Studio 12.0\VC\vcvarsall.bat"
| :: Copyright 2015 Rouslan Solomakhin
::
:: Licensed under the Apache License, Version 2.0 (the "License")
:: you may not use this file except in compliance with the License.
:: You may obtain a copy of the License at
::
:: http://www.apache.org/licenses/LICENSE-2.0
::
:: Unless required by applicable law or agreed to in writing, software
:: distributed under the License is distributed on an "AS IS" BASIS,
:: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
:: See the License for the specific language governing permissions and
:: limitations under the License.
set EDITOR=runemacs
set GYP_DEFINES="component=shared_library fastbuild=2"
set GYP_GENERATORS=ninja
set HOME=%USERPROFILE%
set PATH=%PATH%;%SYSTEMDRIVE%\emacs\bin;%SYSTEMDRIVE%\console2;%SYSTEMDRIVE%\src\depot_tools;%USERPROFILE%\.third_party\cask\bin;%SYSTEMDRIVE%\java\jdk\bin;%SYSTEMDRIVE%\maven\bin
call "%ProgramFiles(x86)%\Microsoft Visual Studio 12.0\VC\vcvarsall.bat"
|
Add batch script to test 64bit and 32bit MSVC from the terminal | @SET SUBDIR=%~dp0
@cd %SUBDIR%
@ctest -V -S test.cmake
@SET PATH=C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin;%PATH%
@ctest -V -S test.cmake
| |
Remove errorlevel 1 after compile to be able to print the errors. | copy mpi.f.single mpi.f
copy mpif.h.single mpif.h
if errorlevel 1 exit 1
flang -g -w -O -Wall -o genesis2 main.f check.f diagno.f esource.f field.f incoherent.f math.f partsim.f pushp.f loadbeam.f loadrad.f magfield.f tdepend.f track.f string.f rpos.f scan.f source.f stepz.f timerec.f initrun.f input.f output.f mpi.f > output.txt 2>&1
if errorlevel 1 exit 1
echo "DEBUG Info..."
dir
echo "The build output was: "
type output.txt
echo "-----------------------------------------------"
echo "Copying the file to Library Bin at %LIBRARY_BIN%"
copy genesis2.exe %LIBRARY_BIN%
if errorlevel 1 exit 1
exit 0
| copy mpi.f.single mpi.f
copy mpif.h.single mpif.h
if errorlevel 1 exit 1
flang -g -w -O -Wall -o genesis2 main.f check.f diagno.f esource.f field.f incoherent.f math.f partsim.f pushp.f loadbeam.f loadrad.f magfield.f tdepend.f track.f string.f rpos.f scan.f source.f stepz.f timerec.f initrun.f input.f output.f mpi.f > output.txt 2>&1
echo "DEBUG Info..."
dir
echo "The build output was: "
type output.txt
echo "-----------------------------------------------"
echo "Copying the file to Library Bin at %LIBRARY_BIN%"
copy genesis2.exe %LIBRARY_BIN%
if errorlevel 1 exit 1
exit 0
|
Use quotation marks for path parameters. | @echo off
REM This build script allows you to build the TTR Mouse Click Simulator.
REM For information about prerequisites, see the Wiki page at
REM https://github.com/TTExtensions/MouseClickSimulator/wiki/Running-the-Simulator
SetLocal ENABLEDELAYEDEXPANSION
REM Change the working directory to the script's directory.
REM E.g. if the user right-clicks on the script and selects "Run as Administrator",
REM the working directory would be the windows\system32 dir.
cd %~dp0
echo.Building the TTR Mouse Click Simulator...
echo.
REM MSBuild is always installed in the 32-Bit program files folder
if "!ProgramFiles(x86)!"=="" (
set "ProgramFiles32Bit=!ProgramFiles!"
) else (
set "ProgramFiles32Bit=!ProgramFiles(x86)!"
)
set "BuildExe=!ProgramFiles32Bit!\MSBuild\14.0\Bin\MSBuild.exe"
if not exist "!BuildExe!" (
echo.ERROR: MSBuild not found at "!BuildExe!"^^!
pause
exit /b 1
)
"!BuildExe!" /v:minimal /nologo /p:Configuration=Release "TTMouseclickSimulator\TTMouseclickSimulator.csproj"
if not errorlevel 1 (
echo.
echo.Build successful^^!
)
pause
exit /b !ERRORLEVEL! | @echo off
REM This build script allows you to build the TTR Mouse Click Simulator.
REM For information about prerequisites, see the Wiki page at
REM https://github.com/TTExtensions/MouseClickSimulator/wiki/Running-the-Simulator
SetLocal ENABLEDELAYEDEXPANSION
REM Change the working directory to the script's directory.
REM E.g. if the user right-clicks on the script and selects "Run as Administrator",
REM the working directory would be the windows\system32 dir.
cd "%~dp0"
echo.Building the TTR Mouse Click Simulator...
echo.
REM MSBuild is always installed in the 32-Bit program files folder
if "!ProgramFiles(x86)!"=="" (
set "ProgramFiles32Bit=!ProgramFiles!"
) else (
set "ProgramFiles32Bit=!ProgramFiles(x86)!"
)
set "BuildExe=!ProgramFiles32Bit!\MSBuild\14.0\Bin\MSBuild.exe"
if not exist "!BuildExe!" (
echo.ERROR: MSBuild not found at "!BuildExe!"^^!
pause
exit /b 1
)
"!BuildExe!" /v:minimal /nologo /p:Configuration=Release "TTMouseclickSimulator\TTMouseclickSimulator.csproj"
if not errorlevel 1 (
echo.
echo.Build successful^^!
)
pause
exit /b !ERRORLEVEL! |
Replace a tab with 4 spaces | @echo off
mkdir public\compiled
set ts_apps=common chess ceval game tree
for %%t in (%ts_apps%) do @(
call echo Building TypeScript: %%t
call cd ui\%%t
call yarn install --non-interactive
call yarn run compile --non-interactive
call cd ..\..
)
set apps=site chat challenge notify learn insight editor puzzle round analyse lobby tournament tournamentSchedule simul perfStat dasher
for %%a in (%apps%) do @(
call echo Building: %%a
call cd ui\%%a
call yarn install --non-interactive
call gulp dev
call cd ..\..
)
| @echo off
mkdir public\compiled
set ts_apps=common chess ceval game tree
for %%t in (%ts_apps%) do @(
call echo Building TypeScript: %%t
call cd ui\%%t
call yarn install --non-interactive
call yarn run compile --non-interactive
call cd ..\..
)
set apps=site chat challenge notify learn insight editor puzzle round analyse lobby tournament tournamentSchedule simul perfStat dasher
for %%a in (%apps%) do @(
call echo Building: %%a
call cd ui\%%a
call yarn install --non-interactive
call gulp dev
call cd ..\..
)
|
Set install prefix in windows | set CMAKE_CONFIG=Release
mkdir build_%CMAKE_CONFIG%
pushd build_%CMAKE_CONFIG%
cmake -G "NMake Makefiles" ^
-DCMAKE_BUILD_TYPE:STRING=%CMAKE_CONFIG% ^
-DBLA_VENDOR:STRING=OpenBLAS ^
-DENABLE_PYTHON:BOOL=ON ^
-DBUILD_DOCUMENTATION:BOOL=OFF ^
"%SRC_DIR%"
if errorlevel 1 exit rem 1
cmake --build . --target install --config %CMAKE_CONFIG%
if errorlevel 1 exit 1
popd
| set CMAKE_CONFIG=Release
mkdir build_%CMAKE_CONFIG%
pushd build_%CMAKE_CONFIG%
cmake -G "NMake Makefiles" ^
-DCMAKE_BUILD_TYPE:STRING=%CMAKE_CONFIG% ^
-DBLA_VENDOR:STRING=OpenBLAS ^
-DENABLE_PYTHON:BOOL=ON ^
-DCMAKE_INSTALL_PREFIX:PATH="%LIBRARY_PREFIX%" ^
-DBUILD_DOCUMENTATION:BOOL=OFF ^
-DVCOMP_WORKAROUND=OFF ^
"%SRC_DIR%"
if errorlevel 1 exit rem 1
cmake --build . --target install --config %CMAKE_CONFIG%
if errorlevel 1 exit 1
popd
|
Set Powershell ExecutionPolicy for build. | SETLOCAL
SET Version=2.5.0
SET Prerelease=auto
@SET Config=%1%
@IF [%1] == [] SET Config=Debug
IF NOT DEFINED VisualStudioVersion CALL "%VS140COMNTOOLS%VsDevCmd.bat" || ECHO ERROR: Cannot find Visual Studio 2015, missing VS140COMNTOOLS variable. && GOTO Error0
@ECHO ON
REM Updating the version of all projects
PowerShell .\ChangeVersion.ps1 %Version% %Prerelease% || GOTO Error0
REM NuGet Automatic Package Restore requires "NuGet.exe restore" to be executed before the command-line build.
WHERE /Q NuGet.exe || ECHO ERROR: Please download the NuGet.exe command line tool. && GOTO Error0
NuGet.exe restore Rhetos.sln -NonInteractive || GOTO Error0
MSBuild.exe "Rhetos.sln" /target:rebuild /p:Configuration=%Config% /verbosity:minimal /fileLogger || GOTO Error0
CALL CreateInstallationPackage.bat %Config% /NOPAUSE || GOTO Error0
REM Updating the version of all projects back to "dev" (internal development build), to avoid spamming git history.
PowerShell .\ChangeVersion.ps1 %Version% dev || GOTO Error0
@REM ================================================
@ECHO.
@ECHO %~nx0 SUCCESSFULLY COMPLETED.
@EXIT /B 0
:Error0
@ECHO.
@ECHO %~nx0 FAILED.
@IF /I [%2] NEQ [/NOPAUSE] @PAUSE
@EXIT /B 1
| SETLOCAL
SET Version=2.5.0
SET Prerelease=auto
@SET Config=%1%
@IF [%1] == [] SET Config=Debug
IF NOT DEFINED VisualStudioVersion CALL "%VS140COMNTOOLS%VsDevCmd.bat" || ECHO ERROR: Cannot find Visual Studio 2015, missing VS140COMNTOOLS variable. && GOTO Error0
@ECHO ON
REM Updating the version of all projects
PowerShell -ExecutionPolicy ByPass .\ChangeVersion.ps1 %Version% %Prerelease% || GOTO Error0
REM NuGet Automatic Package Restore requires "NuGet.exe restore" to be executed before the command-line build.
WHERE /Q NuGet.exe || ECHO ERROR: Please download the NuGet.exe command line tool. && GOTO Error0
NuGet.exe restore Rhetos.sln -NonInteractive || GOTO Error0
MSBuild.exe "Rhetos.sln" /target:rebuild /p:Configuration=%Config% /verbosity:minimal /fileLogger || GOTO Error0
CALL CreateInstallationPackage.bat %Config% /NOPAUSE || GOTO Error0
REM Updating the version of all projects back to "dev" (internal development build), to avoid spamming git history.
PowerShell -ExecutionPolicy ByPass .\ChangeVersion.ps1 %Version% dev || GOTO Error0
@REM ================================================
@ECHO.
@ECHO %~nx0 SUCCESSFULLY COMPLETED.
@EXIT /B 0
:Error0
@ECHO.
@ECHO %~nx0 FAILED.
@IF /I [%2] NEQ [/NOPAUSE] @PAUSE
@EXIT /B 1
|
Deploy script changed from copy to xcopy | mkdir mage
composer install
rem Actions after deploy (database creation, files copy, etc)
copy ..\src\app\etc\nmmlm mage\app\etc | mkdir mage
composer install
rem Actions after deploy (database creation, files copy, etc)
xcopy ..\src\app\etc\nmmlm mage\app\etc\nmmlm /E /Y /I |
Build commant updated to target MSBuild\14.0 | @echo Off
set config=%1
if "%config%" == "" (
set config=Release
)
set version=1.0.0
if not "%PackageVersion%" == "" (
set version=%PackageVersion%
)
set nuget=
if "%nuget%" == "" (
set nuget=nuget
)
%WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild Bot.Messenger.sln /p:Configuration="%config%" /m /v:M /fl /flp:LogFile=msbuild.log;Verbosity=diag /nr:false
mkdir Build
mkdir Build\lib
mkdir Build\lib\net45
%nuget% pack "Bot.Messenger.nuspec" -NoPackageAnalysis -verbosity detailed -o Build -Version %version% -p Configuration="%config%"
| @echo Off
set config=%1
if "%config%" == "" (
set config=Release
)
set version=1.0.0
if not "%PackageVersion%" == "" (
set version=%PackageVersion%
)
set nuget=
if "%nuget%" == "" (
set nuget=nuget
)
%programfiles(x86)%\MSBuild\14.0\Bin\MSBuild.exe Bot.Messenger.sln /p:Configuration="%config%" /m /v:M /fl /flp:LogFile=msbuild.log;Verbosity=diag /nr:false
mkdir Build
mkdir Build\lib
mkdir Build\lib\net461
%nuget% pack "Bot.Messenger.nuspec" -NoPackageAnalysis -verbosity detailed -o Build -Version %version% -p Configuration="%config%"
|
Replace individual parameters with wildcard | @ECHO OFF
:: Note: We've disabled node reuse because it causes file locking issues.
:: The issue is that we extend the build with our own targets which
:: means that that rebuilding cannot successully delete the task
:: assembly.
"%SystemRoot%\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe" /nologo /m /v:m /nr:false /flp:verbosity=normal %1 %2 %3 %4 %5 %6 %7 %8 %9
| @ECHO OFF
:: Note: We've disabled node reuse because it causes file locking issues.
:: The issue is that we extend the build with our own targets which
:: means that that rebuilding cannot successfully delete the task
:: assembly.
"%SystemRoot%\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe" /nologo /m /v:m /nr:false /flp:verbosity=normal %*
|
Add bat script that is added into choosenim zip release. | @echo off
.\choosenim\choosenim.exe stable --firstInstall
for /f "delims=" %%a in ('.\choosenim\choosenim.exe --getNimbleBin') do @set NIMBLEBIN=%%a
copy .\choosenim\choosenim.exe "%NIMBLEBIN%\choosenim.exe"
echo Work finished.
echo Now you must ensure that the Nimble bin dir is in your PATH:
echo %NIMBLEBIN%
pause | |
Build Parameters (less logging in console) | @ECHO OFF
ECHO.
ECHO ===============================================================
ECHO.
ECHO Building: %1
ECHO.
ECHO ===============================================================
ECHO.
Call "C:\Program Files (x86)\MSBuild\12.0\Bin\MsBuild.exe" %1 /p:Configuration=Release /p:PostBuildEvent=
| @ECHO OFF
ECHO.
ECHO ===============================================================
ECHO.
ECHO Building: %1
ECHO.
ECHO ===============================================================
ECHO.
Call "C:\Program Files (x86)\MSBuild\12.0\Bin\MsBuild.exe" %1 /p:Configuration=Release /consoleloggerparameters:Summary;ErrorsOnly /nologo /p:PostBuildEvent=
|
Use RETAIL mode for Python Library Issues | call "%ProgramFiles(x86)%\Microsoft Visual Studio 9.0\VC\bin\vcvars32.bat"
nmake
dir WIN2000_DEBUG\*.exe
copy WIN2000_DEBUG\*.exe ..\Bin\
pause
| call "%ProgramFiles(x86)%\Microsoft Visual Studio 9.0\VC\bin\vcvars32.bat"
nmake nodebug=1
dir WIN2000_DEBUG\*.exe
copy WIN2000_DEBUG\*.exe ..\Bin\
pause
|
Fix a build issue with Vista. Stop cp.exe from trying to emulate POSIX security on top of NTFS. | @echo off
setlocal
set OUTDIR=%1
set JSENG=%2
set CYGWIN_ROOT=%~dp0..\..\..\third_party\cygwin\
set GNU_ROOT=%~dp0..\..\..\third_party\gnu\files
set PATH=%CYGWIN_ROOT%bin;%GNU_ROOT%;%SystemRoot%;%SystemRoot%\system32
:: Ensure that the cygwin mount points are defined
CALL %CYGWIN_ROOT%setup_mount.bat > NUL
bash -x create-config.sh %OUTDIR% %JSENG%
| @echo off
setlocal
set OUTDIR=%1
set JSENG=%2
set CYGWIN_ROOT=%~dp0..\..\..\third_party\cygwin\
set GNU_ROOT=%~dp0..\..\..\third_party\gnu\files
:: Fix cp.exe on vista: without this flag, the files that it creates are not accessible.
set CYGWIN=nontsec
set PATH=%CYGWIN_ROOT%bin;%GNU_ROOT%;%SystemRoot%;%SystemRoot%\system32
:: Ensure that the cygwin mount points are defined
CALL %CYGWIN_ROOT%setup_mount.bat > NUL
bash -x create-config.sh %OUTDIR% %JSENG%
|
Add script to start all services at once. | start nodemon SimulationManager/server.js
start nodemon FloodSim/server.js
start nodemon CriticalObjectSim/server.js
start nodemon ElectricalNetworkSim/server.js
start nodemon HazardousObjectSim/server.js
start nodemon RoadSim/server.js
start nodemon CommunicationSim/server.js | |
Append to JRUBY_OPTS instead of overriding it | @ECHO OFF
set GO_ROOT=%~dp0\..\..\..
set JRUBY_BASE=%GO_ROOT%\tools\jruby-1.7.11
set SERVER_ROOT=%GO_ROOT%\server
set RAILS_ROOT=%SERVER_ROOT%\webapp\WEB-INF\rails.new
set GEM_HOME=%RAILS_ROOT%\vendor\bundle\jruby\1.9
set GEM_PATH=%JRUBY_BASE%\lib\ruby\gems\shared;%GEM_HOME%
set PATH=%JRUBY_BASE%\bin;%PATH%
set JRUBY_OPTS='-J-XX:+TieredCompilation -J-XX:TieredStopAtLevel=1 -J-Djruby.compile.invokedynamic=false -J-Djruby.compile.mode=OFF'
%JRUBY_BASE%\bin\jruby.bat %*
| @ECHO OFF
set GO_ROOT=%~dp0\..\..\..
set JRUBY_BASE=%GO_ROOT%\tools\jruby-1.7.11
set SERVER_ROOT=%GO_ROOT%\server
set RAILS_ROOT=%SERVER_ROOT%\webapp\WEB-INF\rails.new
set GEM_HOME=%RAILS_ROOT%\vendor\bundle\jruby\1.9
set GEM_PATH=%JRUBY_BASE%\lib\ruby\gems\shared;%GEM_HOME%
set PATH=%JRUBY_BASE%\bin;%PATH%
set JRUBY_OPTS='-J-XX:+TieredCompilation -J-XX:TieredStopAtLevel=1 -J-Djruby.compile.invokedynamic=false -J-Djruby.compile.mode=OFF %JRUBY_OPTS%'
%JRUBY_BASE%\bin\jruby.bat %*
|
Put back echo and python |
setlocal
set MYDIRBLOCK=%~dp0
call %MYDIRBLOCK%..\..\..\config_env_base.bat
%HIDEWINDOW% h
set EPICS_CAS_INTF_ADDR_LIST=127.0.0.1
set EPICS_CAS_BEACON_ADDR_LIST=127.255.255.255
set PYTHONUNBUFFERED=TRUE
%PYTHON% %MYDIRBLOCK%ArchiverAccess\archiver_access.py
| @echo off
setlocal
set MYDIRBLOCK=%~dp0
call %MYDIRBLOCK%..\..\..\config_env_base.bat
%HIDEWINDOW% h
set EPICS_CAS_INTF_ADDR_LIST=127.0.0.1
set EPICS_CAS_BEACON_ADDR_LIST=127.255.255.255
set PYTHONUNBUFFERED=TRUE
%PYTHONW% %MYDIRBLOCK%ArchiverAccess\archiver_access.py
|
Fix echo commands in a virtualenv Windows batch file | @ECHO OFF
:: Performs necessary setup steps to allow the use of
:: virtualenv commands such as "mkvirtualenv [ENV_NAME]"
:: for creating and using Python virtual environments.
python -m pip install --upgrade virtualenv
python -m pip install --upgrade virtualenvwrapper-win
echo ""
echo ""
echo "*** You may now use virtualenv commands in your command shell. ***"
echo ""
echo "virtualenv commands:"
echo " * 'mkvirtualenv [ENV_NAME]' - Create a Python virtual environment"
echo " * 'deactivate' - Exit the current virtual environment"
echo " * 'workon [ENV_NAME]' - Enter an existing virtual environment"
echo " * 'lsvirtualenv' OR 'workon' - List all virtual environments"
echo " * 'rmvirtualenv [ENV_NAME]' - Delete a virtual environment"
echo ""
echo "Example:"
echo " mkvirtualenv seleniumbase "
echo ""
| @ECHO OFF
:: Performs necessary setup steps to allow the use of
:: virtualenv commands such as "mkvirtualenv [ENV_NAME]"
:: for creating and using Python virtual environments.
python -m pip install --upgrade virtualenv
python -m pip install --upgrade virtualenvwrapper-win
echo:
echo:
echo: *** You may now use virtualenv commands in your command shell. ***
echo:
echo: virtualenv commands:
echo: * "mkvirtualenv [ENV_NAME]" - Create a Python virtual environment
echo: * "deactivate" - Exit the current virtual environment
echo: * "workon [ENV_NAME]" - Enter an existing virtual environment
echo: * "lsvirtualenv" OR "workon" - List all virtual environments
echo: * "rmvirtualenv [ENV_NAME]" - Delete a virtual environment
echo:
echo: Example:
echo: mkvirtualenv seleniumbase
echo:
|
Add missing license to wrapper batch. | @echo off
python "%~dp0\ktransw.py" %*
| @echo off
REM
REM Copyright (c) 2016, G.A. vd. Hoorn
REM
REM Licensed under the Apache License, Version 2.0 (the "License");
REM you may not use this file except in compliance with the License.
REM You may obtain a copy of the License at
REM
REM http://www.apache.org/licenses/LICENSE-2.0
REM
REM Unless required by applicable law or agreed to in writing, software
REM distributed under the License is distributed on an "AS IS" BASIS,
REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
REM See the License for the specific language governing permissions and
REM limitations under the License.
REM
python "%~dp0\ktransw.py" %*
|
Remove composer optimization as this doesnt work at the moment. | @echo off
cd "%~dp0"
IF EXIST ..\composer.json IF NOT EXIST ..\vendor\.composer (
ECHO Composer installing vendors... >> ..\startup-tasks-log.txt
'D:\Program Files (x86)\PHP\v5.3\php.exe' ..\bin\composer.phar install
ECHO Vendors installed >> ..\startup-tasks-log.txt
)
ECHO Starting Symfony Setup... >> ..\startup-tasks-log.txt
'D:\Program Files (x86)\PHP\v5.3\php.exe' ..\app\console --env=prod cache:clear
ECHO Symfony Cache warmed up >> ..\startup-tasks-log.txt
| @echo off
cd "%~dp0"
ECHO Starting Symfony Setup... >> ..\startup-tasks-log.txt
'D:\Program Files (x86)\PHP\v5.3\php.exe' ..\app\console --env=prod cache:clear
ECHO Symfony Cache warmed up >> ..\startup-tasks-log.txt
|
Delete old zip files before zip process | @echo off
if "%1" == "build" goto build
if "%1" == "tar" goto zip
if "%1" == "zip" goto zip
goto eof
:build
electron-packager . %npm_package_name% --platform=all --arch=x64 --version=%npm_package_electronVersion% --out=build --ignore="(build|node_modules)" --app-version="%npm_package_version%" --version-string.FileDescription="%npm_package_productName%" --version-string.ProductName="%npm_package_productName%" --overwrite
goto eof
:zip
set ZIP_NAME=%~2
set BUILD_NAME=%npm_package_name%-%ZIP_NAME%-x64
set "BUILD_PATH=build/%BUILD_NAME%"
echo ===============
echo Zip name: %ZIP_NAME%
echo Zip type: %1
echo Build name: %BUILD_NAME%
echo Build path: %BUILD_PATH%
echo ===============
cd %BUILD_PATH%
if "%1" == "tar" (
7za a -ttar -so -snl "..\%BUILD_NAME%.tar" . | 7za a -si "..\%BUILD_NAME%.tgz" | find /I "ing"
) else (
7za a -tzip "..\%BUILD_NAME%.zip" . | find /I "ing"
)
goto eof
:eof
| @echo off
if "%1" == "build" goto build
if "%1" == "tar" goto zip
if "%1" == "zip" goto zip
goto eof
:build
electron-packager . %npm_package_name% --platform=all --arch=x64 --version=%npm_package_electronVersion% --out=build --ignore="(build|node_modules)" --app-version="%npm_package_version%" --version-string.FileDescription="%npm_package_productName%" --version-string.ProductName="%npm_package_productName%" --overwrite
goto eof
:zip
set ZIP_NAME=%~2
set BUILD_NAME=%npm_package_name%-%ZIP_NAME%-x64
set "BUILD_PATH=build/%BUILD_NAME%"
echo ===============
echo Zip name: %ZIP_NAME%
echo Zip type: %1
echo Build name: %BUILD_NAME%
echo Build path: %BUILD_PATH%
echo ===============
cd %BUILD_PATH%
echo Zip process started
if "%1" == "tar" (
del "..\%BUILD_NAME%.tgz" >nul 2>&1
7za a -ttar -so -snl "..\%BUILD_NAME%.tar" . | 7za a -si "..\%BUILD_NAME%.tgz" | find /I "ing"
) else (
del "..\%BUILD_NAME%.zip" >nul 2>&1
7za a -tzip "..\%BUILD_NAME%.zip" . | find /I "ing"
)
echo Zip process finished
echo ===============
goto eof
:eof
|
Revert "overcome the global.json constraint with a hack" | @rem enter repo root
cd /d %~dp0\..\..\..\..
cd csharp
@rem see what dotnet version is available
dotnet --version
@rem TODO(jtattermusch): Kokoro workers currently only have dotnet SDK 2.1.3
@rem so we just overwrite the SDK requirement in global.json as the results
@rem should be fully compatible.
echo { "sdk": { "version": "2.1.3" } } >global.json
call build_packages.bat
| @rem enter repo root
cd /d %~dp0\..\..\..\..
cd csharp
call build_packages.bat
|
Configure winrm service to autostart | @setlocal EnableDelayedExpansion EnableExtensions
@for %%i in (%~dp0\_packer_config*.cmd) do @call "%%~i"
@if defined PACKER_DEBUG (@echo on) else (@echo off)
if not defined PACKER_SERVICES set PACKER_SERVICES=opensshd sshd BvSshServer winrm
title Starting services: %PACKER_SERVICES%. Please wait...
:: Intentionally named with zz so it runs last by 00-run-all-scripts.cmd so
:: that the Packer winrm/ssh connections is not inadvertently dropped during the
:: Sysprep run
for %%i in (%PACKER_SERVICES%) do (
echo ==^> Checking if the %%i service is installed
sc query %%i >nul 2>nul && (
echo ==^> Starting the %%i service
sc start %%i
)
)
:exit0
ver>nul
goto :exit
:exit1
verify other 2>nul
:exit
| @setlocal EnableDelayedExpansion EnableExtensions
@for %%i in (%~dp0\_packer_config*.cmd) do @call "%%~i"
@if defined PACKER_DEBUG (@echo on) else (@echo off)
if not defined PACKER_SERVICES set PACKER_SERVICES=opensshd sshd BvSshServer winrm
title Starting services: %PACKER_SERVICES%. Please wait...
:: Intentionally named with zz so it runs last by 00-run-all-scripts.cmd so
:: that the Packer winrm/ssh connections is not inadvertently dropped during the
:: Sysprep run
for %%i in (%PACKER_SERVICES%) do (
echo ==^> Checking if the %%i service is installed
sc query %%i >nul 2>nul && (
echo ==^> Configuring %%i service to autostart
sc config %%i start= auto
echo ==^> Starting the %%i service
sc start %%i
)
)
:exit0
ver>nul
goto :exit
:exit1
verify other 2>nul
:exit
|
Undo unintentional change to storage project | ::
:: Microsoft Azure SDK for Net - Generate library code
:: Copyright (C) Microsoft Corporation. All Rights Reserved.
::
:: https://github.com/Azure/azure-rest-api-specs/commits/master
@echo off
set autoRestVersion=0.16.0-Nightly20160406
if "%1" == "" (
set specFile="https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/arm-storage/2015-06-15/swagger/storage.json"
) else (
set specFile="%1"
)
set repoRoot=%~dp0..\..\..\..
set generateFolder=%~dp0Generated
if exist %generateFolder% rd /S /Q %generateFolder%
call "%repoRoot%\tools\autorest.gen.cmd" %specFile% Microsoft.Azure.Management.Storage %autoRestVersion% %generateFolder% "-FT 2"
| ::
:: Microsoft Azure SDK for Net - Generate library code
:: Copyright (C) Microsoft Corporation. All Rights Reserved.
::
@echo off
set autoRestVersion=0.16.0-Nightly20160406
if "%1" == "" (
set specFile="https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/arm-storage/2015-06-15/swagger/storage.json"
) else (
set specFile="%1"
)
set repoRoot=%~dp0..\..\..\..
set generateFolder=%~dp0Generated
if exist %generateFolder% rd /S /Q %generateFolder%
call "%repoRoot%\tools\autorest.gen.cmd" %specFile% Microsoft.Azure.Management.Storage %autoRestVersion% %generateFolder% "-FT 2"
|
Fix for sDownload tool. Added correct v2 classpath entries. Submitted by: Jacob Danner | @rem Schema downloader
@rem
@rem Tool to download schemas.
@echo off
setlocal
if "%XMLBEANS_HOME%" EQU "" (set XMLBEANS_HOME=%~dp0..)
set cp=
set cp=%cp%;%XMLBEANS_HOME%\build\ar\xbean.jar
java -classpath %cp% org.apache.xmlbeans.impl.tool.SchemaResourceManager %*
:done
| @rem Schema downloader
@rem
@rem Tool to download schemas.
@echo off
setlocal
if "%XMLBEANS_HOME%" EQU "" (set XMLBEANS_HOME=%~dp0..)
set cp=
set cp=%cp%;%XMLBEANS_HOME%\build\ar\xbean.jar
set cp=%cp%;%XMLBEANS_HOME%\build\lib\jsr173_api.jar
set cp=%cp%;%XMLBEANS_HOME%\build\lib\resolver.jar
java -classpath %cp% org.apache.xmlbeans.impl.tool.SchemaResourceManager %*
:done
|
Add batch file for Windows support | @echo off
rem %~dp0 returns the absolute path where the current script is. We just append 'iban-check' to it, and forward all the arguments with %*
ruby "%~dp0iban-check" %*
| |
Fix a build issue with Vista. Stop cp.exe from trying to emulate POSIX security on top of NTFS. | @echo off
setlocal
set OUTDIR=%1
set JSENG=%2
set CYGWIN_ROOT=%~dp0..\..\..\third_party\cygwin\
set GNU_ROOT=%~dp0..\..\..\third_party\gnu\files
set PATH=%CYGWIN_ROOT%bin;%GNU_ROOT%;%SystemRoot%;%SystemRoot%\system32
:: Ensure that the cygwin mount points are defined
CALL %CYGWIN_ROOT%setup_mount.bat > NUL
bash -x create-config.sh %OUTDIR% %JSENG%
| @echo off
setlocal
set OUTDIR=%1
set JSENG=%2
set CYGWIN_ROOT=%~dp0..\..\..\third_party\cygwin\
set GNU_ROOT=%~dp0..\..\..\third_party\gnu\files
:: Fix cp.exe on vista: without this flag, the files that it creates are not accessible.
set CYGWIN=nontsec
set PATH=%CYGWIN_ROOT%bin;%GNU_ROOT%;%SystemRoot%;%SystemRoot%\system32
:: Ensure that the cygwin mount points are defined
CALL %CYGWIN_ROOT%setup_mount.bat > NUL
bash -x create-config.sh %OUTDIR% %JSENG%
|
Update name of PIP package | :: This script assumes the standard setup on tensorflow Jenkins windows machines.
:: It is NOT guaranteed to work on any other machine. Use at your own risk!
::
:: REQUIREMENTS:
:: * All installed in standard locations:
:: - JDK8, and JAVA_HOME set.
:: - Microsoft Visual Studio 2015 Community Edition
:: - Msys2
:: - Anaconda3
:: - CMake
:: Record the directory we are in. Script should be invoked from the root of the repository.
SET REPO_ROOT=%cd%
:: Make sure we have a clean directory to build things in.
SET BUILD_DIR=cmake_build
RMDIR %BUILD_DIR% /S /Q
MKDIR %BUILD_DIR%
CD %BUILD_DIR%
:: Set which tests to build
SET BUILD_CC_TESTS=OFF
SET BUILD_PYTHON_TESTS=ON
:: Run the CMAKE build to build the pip package.
CALL %REPO_ROOT%\tensorflow\tools\ci_build\windows\cpu\cmake\run_build.bat
SET PIP_EXE="C:\Program Files\Anaconda3\Scripts\pip.exe"
:: Uninstall tensorflow pip package, which might be a leftover from old runs.
%PIP_EXE% uninstall -y tensorflow
:: Install the pip package.
%PIP_EXE% install --upgrade %REPO_ROOT%\%BUILD_DIR%\tf_python\dist\tensorflow-0.11.0rc2_cmake_experimental-py3-none-any.whl
:: Run all python tests
ctest -C Release --output-on-failure
| :: This script assumes the standard setup on tensorflow Jenkins windows machines.
:: It is NOT guaranteed to work on any other machine. Use at your own risk!
::
:: REQUIREMENTS:
:: * All installed in standard locations:
:: - JDK8, and JAVA_HOME set.
:: - Microsoft Visual Studio 2015 Community Edition
:: - Msys2
:: - Anaconda3
:: - CMake
:: Record the directory we are in. Script should be invoked from the root of the repository.
SET REPO_ROOT=%cd%
:: Make sure we have a clean directory to build things in.
SET BUILD_DIR=cmake_build
RMDIR %BUILD_DIR% /S /Q
MKDIR %BUILD_DIR%
CD %BUILD_DIR%
:: Set which tests to build
SET BUILD_CC_TESTS=OFF
SET BUILD_PYTHON_TESTS=ON
:: Run the CMAKE build to build the pip package.
CALL %REPO_ROOT%\tensorflow\tools\ci_build\windows\cpu\cmake\run_build.bat
SET PIP_EXE="C:\Program Files\Anaconda3\Scripts\pip.exe"
:: Uninstall tensorflow pip package, which might be a leftover from old runs.
%PIP_EXE% uninstall -y tensorflow
:: Install the pip package.
%PIP_EXE% install --upgrade %REPO_ROOT%\%BUILD_DIR%\tf_python\dist\tensorflow-0.11.0rc2-cp35-cp35m-win_amd64.whl
:: Run all python tests
ctest -C Release --output-on-failure
|
Build header and footer for the pdf file | Set DecorateName=DecorateName
Set Book=mencius
Set FontType=Traditional
Set BookFont=%Book%_%FontType%
Set CSSExt=.css
Set CSS_=--css=..\css\
Set NameStyle=%CSS_%%DecorateName%%CSSExt%
Set Output=%BookFont%
If "%1" == "name" (
Set Output=%Output%_%DecorateName%
Set Style=%NameStyle%
)
If Not "%2" == "" (
Set Output=%Output%_%2
Set Style=%Style% %CSS_%%2%CSSExt%
)
If Not "%3" == "" (
Set Output=%Output%_%3
Set Style=%Style% %CSS_%%3%CSSExt%
)
Set HTMLExt=.html
Set HTMLOutput=%Output%%HTMLExt%
Call pandoc ..\source\%Book%.md -o %HTMLOutput% --standalone --toc %Style% --verbose
Call wkhtmltopdf.exe %HTMLOutput% %Output%.pdf | Set DecorateName=DecorateName
Set Book=mencius
Set FontType=Traditional
Set BookFont=%Book%_%FontType%
Set CSSExt=.css
Set CSS_=--css=..\css\
Set NameStyle=%CSS_%%DecorateName%%CSSExt%
Set Output=%BookFont%
If "%1" == "name" (
Set Output=%Output%_%DecorateName%
Set Style=%NameStyle%
)
If Not "%2" == "" (
Set Output=%Output%_%2
Set Style=%Style% %CSS_%%2%CSSExt%
)
If Not "%3" == "" (
Set Output=%Output%_%3
Set Style=%Style% %CSS_%%3%CSSExt%
)
Set HTMLExt=.html
Set HTMLOutput=%Output%%HTMLExt%
Call pandoc ..\source\%Book%.md -o %HTMLOutput% --standalone --toc %Style% --verbose
Call wkhtmltopdf.exe --margin-top 15 --margin-bottom 15 --header-center [section] --header-left [subsection] --header-right [page] --header-line --header-spacing 5 --footer-center "Version 0.1" --footer-line --footer-spacing 5 %HTMLOutput% %Output%.pdf |
Deploy - Remove XPI checkout to gh-pages | ::I use PortableGit\bin in PATH
git init
::Ensure we have these for the next step
git checkout master && git commit -a -m "Deployment" && git push
::Switch to gh-pages, pull from master, commit, then switch back to master.
git checkout gh-pages && git checkout master psdle*.js && git checkout master psdle.xpi && git commit -a -m "Sync with master." && git push && git checkout master
git checkout master | ::I use PortableGit\bin in PATH
git init
::Ensure we have these for the next step
git checkout master && git commit -a -m "Deployment" && git push
::Switch to gh-pages, pull from master, commit, then switch back to master.
git checkout gh-pages && git checkout master psdle*.js && git commit -a -m "Sync with master." && git push && git checkout master
git checkout master |
Add publish.bat to push packages to vnext nuget server | @echo off
dotnet pack src/AspectCore.Lite.Abstractions --configuration Release --output packages
dotnet pack src/AspectCore.Lite.Abstractions.Generator --configuration Release --output ../packages
dotnet pack src/AspectCore.Lite.Abstractions.Resolution --configuration Release --output packages
dotnet pack src/AspectCore.Lite.DynamicProxy --configuration Release --output ../packages
set /p key=input key:
for /R "../packages" %%s in (*symbols.nupkg) do (
call nuget push %%s -s http://servicepackages.chinacloudsites.cn/nuget %key%
)
pause
| |
Make sure codecov can understand ExcludeFromCodeCoverage. | @echo off
cd build
nuget restore packages.config -PackagesDirectory .
cd ..
build\OpenCover.4.6.519\tools\OpenCover.Console.exe -target:"dotnet.exe" -targetargs:"test tests\LineBot.Tests\LineBot.Tests.csproj --no-build -c release /p:codecov=true" -register:user -threshold:10 -oldStyle -safemode:off -output:.\LineBot.Coverage.xml -hideskipped:All -returntargetcode"
if %errorlevel% neq 0 exit /b %errorlevel%
SET PATH=C:\\Python34;C:\\Python34\\Scripts;%PATH%
pip install codecov
codecov -f "LineBot.Coverage.xml" | @echo off
cd build
nuget restore packages.config -PackagesDirectory .
cd ..
build\OpenCover.4.6.519\tools\OpenCover.Console.exe -target:"dotnet.exe" -targetargs:"test tests\LineBot.Tests\LineBot.Tests.csproj --no-build -c release /p:codecov=true" -register:user -threshold:10 -oldStyle -safemode:off -output:.\LineBot.Coverage.xml -hideskipped:All -excludebyattribute:*.ExcludeFromCodeCoverage* -returntargetcode"
if %errorlevel% neq 0 exit /b %errorlevel%
SET PATH=C:\\Python34;C:\\Python34\\Scripts;%PATH%
pip install codecov
codecov -f "LineBot.Coverage.xml" |
Fix syntax of for loops in batch files | echo off
call "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\Common7\Tools\VsDevCmd.bat" -host_arch=amd64 -arch=amd64
call "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\Common7\Tools\VsDevCmd.bat" -test
cd dist/msvc-compatible
cl *.c /I ../kremlin/include /I . /I ../kremlin/kremlib/dist/minimal /c || goto :error
for /F %i in ('dir /b *-x86_64-msvc.asm') do (ml64 /c %i || goto :error)
lib *.obj || goto :error
echo "SUCCESS"
:error
echo "Failed"
exit /b %errorlevel%
| echo off
call "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\Common7\Tools\VsDevCmd.bat" -host_arch=amd64 -arch=amd64
call "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\Common7\Tools\VsDevCmd.bat" -test
cd dist/msvc-compatible
cl *.c /I ../kremlin/include /I . /I ../kremlin/kremlib/dist/minimal /c || goto :error
for /F %%i in ('dir /b *-x86_64-msvc.asm') do (
ml64 /c %%i || goto :error
)
lib *.obj || goto :error
echo "SUCCESS"
exit /b 0
:error
echo "Failed"
exit /b %errorlevel%
|
Correct @SODIUM_LIBRARY_VERSION_MINOR@ substitution for Visual Studio | cscript msvc-scripts/rep.vbs //Nologo s/@VERSION@/1.0.12/ < src\libsodium\include\sodium\version.h.in > tmp
cscript msvc-scripts/rep.vbs //Nologo s/@SODIUM_LIBRARY_VERSION_MAJOR@/9/ < tmp > tmp2
cscript msvc-scripts/rep.vbs //Nologo s/@SODIUM_LIBRARY_VERSION_MAJOR@/9/ < tmp2 > tmp3
cscript msvc-scripts/rep.vbs //Nologo s/@SODIUM_LIBRARY_MINIMAL_DEF@// < tmp3 > src\libsodium\include\sodium\version.h
del tmp tmp2 tmp3
| cscript msvc-scripts/rep.vbs //Nologo s/@VERSION@/1.0.12/ < src\libsodium\include\sodium\version.h.in > tmp
cscript msvc-scripts/rep.vbs //Nologo s/@SODIUM_LIBRARY_VERSION_MAJOR@/9/ < tmp > tmp2
cscript msvc-scripts/rep.vbs //Nologo s/@SODIUM_LIBRARY_VERSION_MINOR@/4/ < tmp2 > tmp3
cscript msvc-scripts/rep.vbs //Nologo s/@SODIUM_LIBRARY_MINIMAL_DEF@// < tmp3 > src\libsodium\include\sodium\version.h
del tmp tmp2 tmp3
|
Exclude PermissionSTS from NuGet package generation | @Echo Off
REM set your api key once: nuget setApiKey Your-API-Key
SET "nuget_basedir="
"%ProgramFiles(x86)%/Microsoft Visual Studio 14.0/Common7/IDE/devenv" /build release ../proj/SecurityServer/proj/SecurityServer.sln
IF %ERRORLEVEL% NEQ 0 (
echo. && echo. && echo Build failed.
exit /B 1
)
%nuget_basedir%nuget.exe pack Dragon.SecurityServer.AccountSTS.Client.nuspec
%nuget_basedir%nuget.exe pack Dragon.SecurityServer.ProfileSTS.Client.nuspec
%nuget_basedir%nuget.exe pack Dragon.SecurityServer.PermissionSTS.Client.nuspec
REM %nuget_basedir%nuget push Dragon.SecurityServer.AccountSTS.Client*.nupkg
REM %nuget_basedir%nuget push Dragon.SecurityServer.ProfileSTS.Client*.nupkg
REM %nuget_basedir%nuget push Dragon.SecurityServer.PermissionSTS.Client*.nupkg
| @Echo Off
REM set your api key once: nuget setApiKey Your-API-Key
SET "nuget_basedir="
"%ProgramFiles(x86)%/Microsoft Visual Studio 14.0/Common7/IDE/devenv" /build release ../proj/SecurityServer/proj/SecurityServer.sln
IF %ERRORLEVEL% NEQ 0 (
echo. && echo. && echo Build failed.
exit /B 1
)
%nuget_basedir%nuget.exe pack Dragon.SecurityServer.AccountSTS.Client.nuspec
%nuget_basedir%nuget.exe pack Dragon.SecurityServer.ProfileSTS.Client.nuspec
REM %nuget_basedir%nuget.exe pack Dragon.SecurityServer.PermissionSTS.Client.nuspec
echo.
echo.
echo To publish, run:
echo %nuget_basedir%nuget push Dragon.SecurityServer.AccountSTS.Client*.nupkg
echo %nuget_basedir%nuget push Dragon.SecurityServer.ProfileSTS.Client*.nupkg
REM %nuget_basedir%nuget push Dragon.SecurityServer.PermissionSTS.Client*.nupkg
|
Define that NVM_PATH is for nvm | @echo off
set /P NVM_PATH="Enter the absolute path where the zip file is extracted/copied to: "
set NVM_HOME=%NVM_PATH%
set NVM_SYMLINK=C:\Program Files\nodejs
setx /M NVM_HOME "%NVM_HOME%"
setx /M NVM_SYMLINK "%NVM_SYMLINK%"
for /f "skip=2 tokens=2,*" %%A in ('reg query "HKLM\System\CurrentControlSet\Control\Session Manager\Environment" /v Path 2^>nul') do (
setx /M PATH "%%B;%%NVM_HOME%%;%%NVM_SYMLINK%%"
)
if exist "%SYSTEMDRIVE%\Program Files (x86)\" (
set SYS_ARCH=64
) else (
set SYS_ARCH=32
)
(echo root: %NVM_HOME% && echo path: %NVM_SYMLINK% && echo arch: %SYS_ARCH% && echo proxy: none) > %NVM_HOME%\settings.txt
notepad %NVM_HOME%\settings.txt
@echo on
| @echo off
set /P NVM_PATH="Enter the absolute path where the nvm-windows zip file is extracted/copied to: "
set NVM_HOME=%NVM_PATH%
set NVM_SYMLINK=C:\Program Files\nodejs
setx /M NVM_HOME "%NVM_HOME%"
setx /M NVM_SYMLINK "%NVM_SYMLINK%"
for /f "skip=2 tokens=2,*" %%A in ('reg query "HKLM\System\CurrentControlSet\Control\Session Manager\Environment" /v Path 2^>nul') do (
setx /M PATH "%%B;%%NVM_HOME%%;%%NVM_SYMLINK%%"
)
if exist "%SYSTEMDRIVE%\Program Files (x86)\" (
set SYS_ARCH=64
) else (
set SYS_ARCH=32
)
(echo root: %NVM_HOME% && echo path: %NVM_SYMLINK% && echo arch: %SYS_ARCH% && echo proxy: none) > %NVM_HOME%\settings.txt
notepad %NVM_HOME%\settings.txt
@echo on
|
Update build.cmd to use platform agnostic rakefile | @echo off
cd %~dp0..
rake -f Build\build-win.rb "build:no_test_build[., SevenDigital.Messaging.sln, build, full, local, Release]"
| @echo off
cd %~dp0..
rake -f build\build.rb "build:no_test_build[., SevenDigital.Messaging.sln, build, full, local, Release]"
|
Exit the build script if Hadrian cannot be built | @rem Change the current directory to the one containing this script
@cd %~dp0
@rem Build Hadrian and dependencies
@stack build
@rem Run Hadrian in GHC top directory forwarding additional user arguments
@stack exec hadrian -- --lint --directory ".." %*
| @rem Change the current directory to the one containing this script
@cd %~dp0
@rem Build Hadrian and dependencies and exit the script if the build failed
@stack build
@if %errorlevel% neq 0 exit /B %errorlevel%
@rem Run Hadrian in GHC top directory forwarding additional user arguments
@stack exec hadrian -- --lint --directory ".." %*
|
Add Windows bat file for flashing arduino firmware | @echo off
if "%1"=="" goto :usage
if "%2"=="" (
echo Error! No hex file provided.
goto :usage
)
if not exist "%2" (
echo %2 does not exist
goto :eof
)
if not exist avrdude.exe (
echo Error! This script must be executed within the "avr" directory
goto :eof
)
avrdude.exe -c stk500v2 -b 115200 -p atmega2560 -P %1 -U %2 -C avrdude.conf
goto :eof
:usage
echo Usage: flash_firmware.bat COM_PORT HEX_FILE
:eof
| |
Fix current directory for batch file | echo Running Windows build and test
call "C:\Program Files\MATLAB\R2015b\bin\matlab.exe" -wait -nodisplay -nosplash -nodesktop -r "try, run('$(pwd)/matlab/CIBuildAndTest.m'), catch ex, disp(['Exception during CIBuildAndTest.m: ' ex.message]), exit(1), end, exit(0);"
if not "%ERRORLEVEL%" == "0" (
echo Exit Code = %ERRORLEVEL%
exit /b 1
) | echo Running Windows build and test
call "C:\Program Files\MATLAB\R2015b\bin\matlab.exe" -wait -nodisplay -nosplash -nodesktop -r "try, run('%cd%/matlab/CIBuildAndTest.m'), catch ex, disp(['Exception during CIBuildAndTest.m: ' ex.message]), exit(1), end, exit(0);"
if not "%ERRORLEVEL%" == "0" (
echo Exit Code = %ERRORLEVEL%
exit /b 1
) |
Remove examples from Codeplex Release package. Include NET40/NET45/SL5/NetCore45 libraries, remove OpenXml and Pdf packages (use NuGet if you need these). | call clean ..\Output\NET40\Examples
call clean ..\Output\NET45\Examples
REM "C:\Program Files\7-Zip\7z.exe" a ..\Output\OxyPlot-NET40-%1.zip ..\Output\NET40\*.* > ZipRelease.log
REM "C:\Program Files\7-Zip\7z.exe" a ..\Output\OxyPlot-NET45-%1.zip ..\Output\NET45\*.* >> ZipRelease.log
REM "C:\Program Files\7-Zip\7z.exe" a ..\Output\OxyPlot-SL4-%1.zip ..\Output\SL4\*.* >> ZipRelease.log
REM "C:\Program Files\7-Zip\7z.exe" a ..\Output\OxyPlot-SL5-%1.zip ..\Output\SL5\*.* >> ZipRelease.log
REM "C:\Program Files\7-Zip\7z.exe" a -r ..\Output\OxyPlot-NET40-Examples-%1.zip ..\Output\NET40\Examples\*.* >> ZipRelease.log
REM "C:\Program Files\7-Zip\7z.exe" a -r ..\Output\OxyPlot-NET45-Examples-%1.zip ..\Output\NET45\Examples\*.* >> ZipRelease.log
"C:\Program Files\7-Zip\7z.exe" a -r ..\Output\OxyPlot-%1.zip ..\Output\*.* > ZipRelease.log | mkdir ..\Output\Release
mkdir ..\Output\Release\NET40
mkdir ..\Output\Release\NET45
mkdir ..\Output\Release\NetCore45
mkdir ..\Output\Release\NetCore45\Themes
mkdir ..\Output\Release\SL5
copy ..\Output\NET45\OxyPlot.??? ..\Output\Release
copy ..\Output\NET40\OxyPlot.WindowsForms.??? ..\Output\Release\NET40
copy ..\Output\NET45\OxyPlot.WindowsForms.??? ..\Output\Release\NET45
copy ..\Output\NET40\OxyPlot.WPF.??? ..\Output\Release\NET40
copy ..\Output\NET45\OxyPlot.WPF.??? ..\Output\Release\NET45
copy ..\Output\SL5\OxyPlot.Silverlight.??? ..\Output\Release\SL5
copy ..\Output\NetCore45\OxyPlot.Metro.??? ..\Output\Release\NetCore45
copy ..\Output\NetCore45\Themes\*.* ..\Output\Release\NetCore45\Themes
"C:\Program Files\7-Zip\7z.exe" a -r ..\Output\OxyPlot-%1.zip ..\Output\Release\*.* > ZipRelease.log |
Add batch file for windows | @echo off
@rem Check for mvn in path, use it if found, otherwise use maven wrapper
@set MAVEN_CMD=mvn
@WHERE /Q mvn
@IF %ERRORLEVEL% NEQ 0 set MAVEN_CMD=.\mvnw.bat
@if "%1" == "" call:help
@if "%1" == "copy" call:copy
@if "%1" == "clean" call:clean %2 %3 %4
@if "%1" == "package" call:package %2 %3 %4
@if "%1" == "bootrun" call:bootrun %2 %3 %4
@if "%1" == "debug" call:debug %2 %3 %4
@if "%1" == "run" call:run %2 %3 %4
@if "%1" == "help" call:help
@rem function section starts here
@goto:eof
:copy
set CONFIG_DIR=\etc\cas\config
@echo "Creating configuration directory under %CONFIG_DIR%"
if not exist %CONFIG_DIR% mkdir %CONFIG_DIR%
@echo "Copying configuration files from etc/cas to /etc/cas"
xcopy /S /Y etc\cas\* \etc\cas
@goto:eof
:help
@echo "Usage: build.bat [copy|clean|package|run|debug|bootrun] [optional extra args for maven]"
@goto:eof
:clean
call %MAVEN_CMD% clean %1 %2 %3
exit /B %ERRORLEVEL%
@goto:eof
:package
call %MAVEN_CMD% clean package -T 5 %1 %2 %3
exit /B %ERRORLEVEL%
@goto:eof
:bootrun
call %MAVEN_CMD% clean package spring-boot:run -T 5 %1 %2 %3
exit /B %ERRORLEVEL%
@goto:eof
:debug
call:package %1 %2 %3 & java -Xdebug -Xrunjdwp:transport=dt_socket,address=5000,server=y,suspend=n -jar target/cas.war
@goto:eof
:run
call:package %1 %2 %3 & java -jar target/cas.war
@goto:eof
| |
Fix failing VersionResourceTests caused by removal of EXE/DLLs from image repo. | ECHO Clone Dolphin image environment
git clone -q --branch=master https://github.com/dolphinsmalltalk/Dolphin.git Dolphin
ECHO Copy executables
copy ..\..\Dolphin7.exe Dolphin
copy ..\..\DolphinVM7.dll Dolphin
copy ..\..\DolphinCR7.dll Dolphin
copy ..\..\DolphinDR7.dll Dolphin
copy ..\..\DolphinSureCrypto.dll Dolphin
ECHO Boot and test image
cd Dolphin
CALL BootDPRO
CALL TestDPRO | ECHO Clone Dolphin image environment
git clone -q --branch=master https://github.com/dolphinsmalltalk/Dolphin.git Dolphin
ECHO Copy executables
copy ..\..\*.exe Dolphin
copy ..\..\*.dll Dolphin
ECHO Boot and test image
cd Dolphin
CALL BootDPRO
CALL TestDPRO |
Remove *.pyc files from distribution files | REM Clean Up
rmdir /Q /S Src
rmdir /Q /S Bin
del /Q DarunGrim3.zip
mkdir Src\bin
copy ..\DarunGrim2\* Src\bin\
copy ..\..\Publish\Docs\*.pdf Src\bin
call CopySrc.bat
REM Generate binaries
pushd Src
c:\python26\python SetupDist.py py2exe
popd
REM Prepare binary directory
REM Copy necessary files
copy ..\..\Src\UI\Web\DarunGrim3Sample01.cfg Src\bin\DarunGrim3.cfg
REM Clean up some unncessary files
del /Q Src\Bin\w9xpopen.exe
del /Q Src\Bin\Test.exe
del /Q Src\Bin\tcl*.dll
del /Q Src\Bin\tk*.dll
rmdir /Q /S Src\Bin\tcl
REM Put data directory to binary directory
xcopy /y /s /I ..\..\Src\UI\Web\data Src\bin\data
REM move bin directory location
mv Src\bin Bin
REM zip a package
zip -r DarunGrim3.zip Bin\*
pause
| REM Clean Up
rmdir /Q /S Src
rmdir /Q /S Bin
del /Q DarunGrim3.zip
mkdir Src\bin
copy ..\DarunGrim2\* Src\bin\
copy ..\..\Publish\Docs\*.pdf Src\bin
call CopySrc.bat
del Src\*.pyc
REM Generate binaries
pushd Src
c:\python26\python SetupDist.py py2exe
popd
REM Prepare binary directory
REM Copy necessary files
copy ..\..\Src\UI\Web\DarunGrim3Sample01.cfg Src\bin\DarunGrim3.cfg
REM Clean up some unncessary files
del /Q Src\Bin\w9xpopen.exe
del /Q Src\Bin\Test.exe
del /Q Src\Bin\tcl*.dll
del /Q Src\Bin\tk*.dll
rmdir /Q /S Src\Bin\tcl
REM Put data directory to binary directory
xcopy /y /s /I ..\..\Src\UI\Web\data Src\bin\data
REM move bin directory location
mv Src\bin Bin
REM zip a package
zip -r DarunGrim3.zip Bin\*
pause
|
Fix build by restoring a missing space. | 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
| 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
|
Include perl benchmark module for psass utility | @echo off
SETLOCAL
cd /D %~dp0
call settings.cmd
call ..\unxutils.cmd
cd dist\%ARCH%
call pp -B -o psass.exe ^
-I ../../../blib/lib ^
-M Encode::Byte ^
-M PerlIO::encoding ^
-M List::MoreUtils::XS ^
-M List::MoreUtils::PP ^
-M Win32::ChangeNotify ^
-M Filesys::Notify::Simple ^
-l "%PERLDIR%/perl/site/lib/libsass.dll" ^
-a "%PERLDIR%/perl/site/lib/auto/CSS/Sass/plugins;lib/auto/CSS/Sass/plugins" ^
CSS-Sass-%RELVERSION%/bin/psass
cd ..\..
REM tested and working, but much bigger size
REM -l "%PERLPATH%/c/bin/_libsass-0.dll" ^
copy %CD%\dist\%ARCH%\psass.exe %CD%\..\create\%XARCH%
| @echo off
SETLOCAL
cd /D %~dp0
call settings.cmd
call ..\unxutils.cmd
cd dist\%ARCH%
call pp -B -o psass.exe ^
-I ../../../blib/lib ^
-M Benchmark ^
-M Encode::Byte ^
-M PerlIO::encoding ^
-M List::MoreUtils::XS ^
-M List::MoreUtils::PP ^
-M Win32::ChangeNotify ^
-M Filesys::Notify::Simple ^
-l "%PERLDIR%/perl/site/lib/libsass.dll" ^
-a "%PERLDIR%/perl/site/lib/auto/CSS/Sass/plugins;lib/auto/CSS/Sass/plugins" ^
CSS-Sass-%RELVERSION%/bin/psass
cd ..\..
REM tested and working, but much bigger size
REM -l "%PERLPATH%/c/bin/_libsass-0.dll" ^
copy %CD%\dist\%ARCH%\psass.exe %CD%\..\create\%XARCH%
|
Update automated release build scripts on Windows | @echo off
set cwd=%cd%
cd /D %~dp0
set DevCmd="C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\Tools\VsDevCmd.bat"
set MSBuildOptions=/v:m /p:Configuration=Release
set BuildDir64="build-exe-64"
set BuildDir32="build-exe-32"
call %DevCmd%
echo Building 64-bit tev...
mkdir %BuildDir64%
cd %BuildDir64%
cmake -DTEV_DEPLOY=1 -G "Visual Studio 15 2017 Win64" ..\..
msbuild %MSBuildOptions% tev.sln
move "Release\tev.exe" "..\..\tev.exe"
cd ..
rmdir /S /Q %BuildDir64%
echo Building 32-bit tev...
mkdir %BuildDir32%
cd %BuildDir32%
cmake -DTEV_DEPLOY=1 -G "Visual Studio 15 2017" ..\..
msbuild %MSBuildOptions% tev.sln
move "Release\tev.exe" "..\..\tev-32bit.exe"
cd ..
rmdir /S /Q %BuildDir32%
echo Returning to original directory.
cd /D %cwd%
pause
| @echo off
set cwd=%cd%
cd /D %~dp0
set DevCmd="C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars64.bat"
set MSBuildOptions=/v:m /p:Configuration=Release
set BuildDir64="build-exe-64"
call %DevCmd%
echo Building 64-bit tev...
mkdir %BuildDir64%
cd %BuildDir64%
cmake -DTEV_DEPLOY=1 -G "Visual Studio 16 2019" ..\..
msbuild %MSBuildOptions% tev.sln
move "Release\tev.exe" "..\..\tev.exe"
cd ..
rmdir /S /Q %BuildDir64%
echo Returning to original directory.
cd /D %cwd%
pause
|
Add script to disable offiescan context menu | @echo off
setlocal EnableDelayedExpansion
set registryRoot=HKCU\Software\Classes
set key=OfficeScan NT
reg add "%registryRoot%\*\shellex\ContextMenuHandlers\%key%" /d "---" /f
| |
Add script to generate gold CSVs | :: Copyright 2020 Intel Corporation
::
:: Permission is hereby granted, free of charge, to any person obtaining a copy
:: of this software and associated documentation files (the "Software"), to
:: deal in the Software without restriction, including without limitation the
:: rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
:: sell copies of the Software, and to permit persons to whom the Software is
:: furnished to do so, subject to the following conditions:
::
:: The above copyright notice and this permission notice shall be included in
:: all copies or substantial portions of the Software.
::
:: THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
:: IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
:: FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
:: AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
:: LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
:: FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
:: IN THE SOFTWARE.
@echo off
setlocal enabledelayedexpansion
set presentmon=%1
set rootdir=%~2
set force=0
if not exist %presentmon% goto usage
if not exist "%rootdir%\." goto usage
if "%~3"=="force" (
set force=1
) else (
if not "%~3"=="" goto usage
)
goto args_ok
:usage
echo usage: create_fold_csvs PresentMonPath GoldEtlCsvRootDir [force]
exit /b 1
:args_ok
set pmargs=-no_top -stop_existing_session -qpc_time -verbose -captureall
for /f "tokens=*" %%a in ('dir /s /b /a-d "%rootdir%\*.etl"') do call :create_csv %%a
exit /b 0
:create_csv
if exist "%~dpn1.csv" if %force% neq 1 exit /b 0
echo %presentmon% %pmargs% -etl_file %1 -output_file "%~dpn1.csv"
%presentmon% %pmargs% -etl_file %1 -output_file "%~dpn1.csv"
echo.
exit /b 0
| |
Add windows start batch script | @echo off
@title AvaIre Windows Launcher
setlocal enabledelayedexpansion
set Looping=False
cls
:START
echo.
echo Welcome to AvaIre's window launcher
echo Please select an option to begin:
echo.
echo 1. Start the bot normally
echo 2. Start the bot with automatic restarts
echo 3. Update the bot using the nightly build
echo 9. Exit program
echo.
set /p in="Enter your option: "
if !in! == 1 (
goto START_BOT
)
if !in! == 2 (
goto RESTART_LOOP
)
if !in! == 3 (
goto UPDATE
)
if !in! == 9 (
goto EOF
) else (
echo.
echo Invalid option given
goto START
)
:RESTART_LOOP
set Looping=True
goto START_BOT
:START_BOT
java -Dfile.encoding=UTF-8 -jar AvaIre.jar --no-colors
if !Looping! == False (
goto START
)
echo.
echo Restarting the bot in 5 second, press CTRL + C to cancel the process.
echo.
choice /d y /t 5 > nul
goto START_BOT
:UPDATE
echo.
echo Updating to the latest version using the nightly build
echo Note: The script will download and unzip some files, this
echo might cause your antivirus to see the script as a threat,
echo just make an exception for the script so it can download
echo the updates.
echo.
echo Tasks:
echo|set /p=" - Downloading the nightly-build.jar file... "
powershell -Command "(New-Object Net.WebClient).DownloadFile('https://avairebot.com/nightly-build.jar', 'nightly-build.jar')"
echo Done
echo|set /p=" - Deleting existing AvaIre.jar file... "
rm AvaIre.jar > nul 2> nul
echo Done
echo|set /p=" - Renaming nightly-build.jar to AvaIre.jar... "
ren nightly-build.jar AvaIre.jar > nul 2> nul
echo Done
echo.
echo Ava has been successfully updated, going back to the menu.
GOTO START
:EOF
exit
| |
Use symlink for windows too | @echo off
npm i&& for /D %%i in (zeronet-*) do (cd "%%i"&& npm i&& cd ..)
goto :eof
| @echo off
npm i&& for /D %%i in (zeronet-*) do (cd "%%i"&& mklink /D node_modules ..\node_modules&& cd ..)
goto :eof
|
Tweak the CI script for CMake on Windows. | CD git/re2 || EXIT /B 1
cmake . || EXIT /B 1
cmake --build . --clean-first || EXIT /B 1
ctest -E dfa^|exhaustive^|random || EXIT /B 1
cmake -DCMAKE_BUILD_TYPE=Release . || EXIT /B 1
cmake --build . --clean-first || EXIT /B 1
ctest -E dfa^|exhaustive^|random || EXIT /B 1
EXIT /B 0
| CD git/re2 || EXIT /B 1
cmake -D CMAKE_BUILD_TYPE=Debug -A x64 . || EXIT /B 1
cmake --build . --config Debug --clean-first || EXIT /B 1
ctest --build-config Debug -E dfa^|exhaustive^|random || EXIT /B 1
cmake -D CMAKE_BUILD_TYPE=Release -A x64 . || EXIT /B 1
cmake --build . --config Release --clean-first || EXIT /B 1
ctest --build-config Release -E dfa^|exhaustive^|random || EXIT /B 1
EXIT /B 0
|
Fix Windows runner to load jline JAR. | @java -Xbootclasspath/a:.;nqp-runtime.jar;3rdparty/asm/asm-4.1.jar nqp %*
| @java -Xbootclasspath/a:.;nqp-runtime.jar;3rdparty/asm/asm-4.1.jar;3rdparty/jline/jline-1.0.jar nqp %*
|
Build with VS 15 dev tools | @echo off
setlocal enabledelayedexpansion
where /q msbuild
if "%ERRORLEVEL%" == "0" (
goto :SkipDeveloperSetup
)
set DeveloperCommandPrompt=%VS140COMNTOOLS%\VsDevCmd.bat
if not exist "%DeveloperCommandPrompt%" (
echo In order to build this repository, you either need 'msbuild' on the path or Visual Studio 2015 installed.
echo.
echo Visit this page to download:
echo.
echo https://go.microsoft.com/fwlink/?LinkId=691978^&clcid=0x409
exit /b 1
)
call "%DeveloperCommandPrompt%" || goto :BuildFailed
:SkipDeveloperSetup
powershell -NoProfile -NoLogo -ExecutionPolicy Bypass -Command "& \"%~dp0build.ps1\" %*; exit $LastExitCode;"
exit /b %ERRORLEVEL%
:BuildFailed
echo Build failed with ERRORLEVEL %ERRORLEVEL%
exit /b 1
| @echo off
setlocal enabledelayedexpansion
where /q msbuild
if "%ERRORLEVEL%" == "0" (
goto :SkipDeveloperSetup
)
set DeveloperCommandPrompt=%VS150COMNTOOLS%\VsDevCmd.bat
if not exist "%DeveloperCommandPrompt%" (
echo In order to build this repository, you either need 'msbuild' on the path or Visual Studio 2015 installed.
echo.
echo Visit this page to download:
echo.
echo https://go.microsoft.com/fwlink/?LinkId=691978^&clcid=0x409
exit /b 1
)
call "%DeveloperCommandPrompt%" || goto :BuildFailed
:SkipDeveloperSetup
powershell -NoProfile -NoLogo -ExecutionPolicy Bypass -Command "& \"%~dp0build.ps1\" %*; exit $LastExitCode;"
exit /b %ERRORLEVEL%
:BuildFailed
echo Build failed with ERRORLEVEL %ERRORLEVEL%
exit /b 1
|
Fix build script comments to match new name | @ECHO OFF
REM Sample usages:
REM
REM Building and running tests
REM - build.libgit2sharp.cmd
REM
REM Building and identifying potential leaks while running tests
REM - build.libgit2sharp.cmd "LEAKS_IDENTIFYING"
SETLOCAL
SET EXTRADEFINE=%~1
where dotnet 1>nul 2>nul
IF ERRORLEVEL 1 (
ECHO Cannot find dotnet.exe. Run from a VS2017 Developer Prompt.
EXIT /B 1
)
ECHO ON
SET Configuration=Release
:: Restore packages
dotnet restore "%~dp0\"
@IF ERRORLEVEL 1 EXIT /B %ERRORLEVEL%
:: Build
dotnet build "%~dp0\" /v:minimal /nologo /property:ExtraDefine="%EXTRADEFINE%"
@IF ERRORLEVEL 1 EXIT /B %ERRORLEVEL%
:: Run tests on Desktop and CoreCLR
"%userprofile%\.nuget\packages\xunit.runner.console\2.2.0\tools\xunit.console.exe" "%~dp0bin\LibGit2Sharp.Tests\%Configuration%\net46\LibGit2Sharp.Tests.dll" -noshadow
@IF ERRORLEVEL 1 EXIT /B %ERRORLEVEL%
dotnet test "%~dp0LibGit2Sharp.Tests/LibGit2Sharp.Tests.csproj" --no-build -f netcoreapp1.0
@IF ERRORLEVEL 1 EXIT /B %ERRORLEVEL%
EXIT /B %ERRORLEVEL%
| @ECHO OFF
REM Sample usages:
REM
REM Building and running tests
REM - buildandtest.cmd
REM
REM Building and identifying potential leaks while running tests
REM - buildandtest.cmd "LEAKS_IDENTIFYING"
SETLOCAL
SET EXTRADEFINE=%~1
where dotnet 1>nul 2>nul
IF ERRORLEVEL 1 (
ECHO Cannot find dotnet.exe. Run from a VS2017 Developer Prompt.
EXIT /B 1
)
ECHO ON
SET Configuration=Release
:: Restore packages
dotnet restore "%~dp0\"
@IF ERRORLEVEL 1 EXIT /B %ERRORLEVEL%
:: Build
dotnet build "%~dp0\" /v:minimal /nologo /property:ExtraDefine="%EXTRADEFINE%"
@IF ERRORLEVEL 1 EXIT /B %ERRORLEVEL%
:: Run tests on Desktop and CoreCLR
"%userprofile%\.nuget\packages\xunit.runner.console\2.2.0\tools\xunit.console.exe" "%~dp0bin\LibGit2Sharp.Tests\%Configuration%\net46\LibGit2Sharp.Tests.dll" -noshadow
@IF ERRORLEVEL 1 EXIT /B %ERRORLEVEL%
dotnet test "%~dp0LibGit2Sharp.Tests/LibGit2Sharp.Tests.csproj" --no-build -f netcoreapp1.0
@IF ERRORLEVEL 1 EXIT /B %ERRORLEVEL%
EXIT /B %ERRORLEVEL%
|
Use pytest and flake8 commands. | @echo off
set PYTHON=%~1
set PATH=%PYTHON%;%PYTHON%\Scripts;%PATH%
python -m pytest
python -m flake8
| set PYTHON=%~1
set PATH=%PYTHON%;%PYTHON%\Scripts;%PATH%
pytest
flake8
|
Use studio64.exe instead of studio.exe | set projectPath=%~dp0
set androidStudioBin=A:\AndroidStudio\bin
rem Android Studio needs the project path without a trailing backslash
if %projectPath:~-1%==\ set projectPath=%projectPath:~0,-1%
start "" /D "%androidStudioBin%" "studio.exe" "%projectPath%" | set projectPath=%~dp0
set androidStudioBin=A:\AndroidStudio\bin
rem Android Studio needs the project path without a trailing backslash
if %projectPath:~-1%==\ set projectPath=%projectPath:~0,-1%
start "" /D "%androidStudioBin%" "studio64.exe" "%projectPath%" |
Add gimp, paint.net and inconsolata | @echo off
:: install chocolatey
@powershell -NoProfile -ExecutionPolicy unrestricted -Command "(iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))) >$null 2>&1" && SET PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin
choco feature enable -n allowGlobalConfirmation
:: general apps
choco upgrade chocolatey 7zip 7zip.commandline putty filezilla adobereader slack javaruntime
choco upgrade autoruns sdelete procexp procmon
choco upgrade curl wget wput zip unzip optipng
:: dev apps
choco upgrade postgresql-9.3 pgadmin3
choco upgrade tortoisesvn git gitkraken
choco upgrade atom visualstudiocode
choco upgrade visualstudio2012professional -packageParameters "/Features:'OfficeTools'"
choco upgrade ankhsvn wixtoolset ilspy depends
choco upgrade dotnet4.6 dotnet4.5.2 dotnet4.5.1 dotnet4.5 dotnet3.5
| @echo off
:: install chocolatey
@powershell -NoProfile -ExecutionPolicy unrestricted -Command "(iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))) >$null 2>&1" && SET PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin
choco feature enable -n allowGlobalConfirmation
:: general apps
choco upgrade chocolatey
choco upgrade 7zip 7zip.commandline putty filezilla adobereader slack javaruntime gimp paint.net
choco upgrade autoruns sdelete procexp procmon
choco upgrade curl wget wput zip unzip optipng
choco upgrade inconsolata
:: dev apps
choco upgrade postgresql-9.3 pgadmin3
choco upgrade tortoisesvn git gitkraken
choco upgrade atom visualstudiocode
choco upgrade visualstudio2012professional -packageParameters "/Features:'OfficeTools'"
choco upgrade ankhsvn wixtoolset ilspy depends
choco upgrade dotnet4.6 dotnet4.5.2 dotnet4.5.1 dotnet4.5 dotnet3.5
|
Remove quotes around file from Windows batch | @echo off
Rem Run UnRAVL's main entry point.
Rem Command line arguments are UnRAVL script files to execute:
Rem unravl.bat script1.json script2.json script3.json
set UNRAVL_DIR=%~dp0..\..\..
set UNRAVL_JAR_DIR=%UNRAVL_DIR%\build\libs
set UNRAVL_LIB_DIR=%UNRAVL_DIR%\build\output\lib
java -Dapp.name=UnRAVL ^
-classpath %UNRAVL_JAR_DIR%\*;%UNRAVL_LIB_DIR%\* ^
%UNRAVL_OPT% ^
com.sas.unravl.Main ^
"%*"
| @echo off
Rem Run UnRAVL's main entry point.
Rem Command line arguments are UnRAVL script files to execute:
Rem unravl.bat script1.json script2.json script3.json
set UNRAVL_DIR=%~dp0..\..\..
set UNRAVL_JAR_DIR=%UNRAVL_DIR%\build\libs
set UNRAVL_LIB_DIR=%UNRAVL_DIR%\build\output\lib
java -Dapp.name=UnRAVL ^
-classpath %UNRAVL_JAR_DIR%\*;%UNRAVL_LIB_DIR%\* ^
%UNRAVL_OPT% ^
com.sas.unravl.Main ^
%*
|
Add sample commands for using Glacier | C:\Python27\Scripts\aws glacier initiate-job --account-id - ^
--vault-name demschooltools-backups ^
--job-parameters "{\"Type\": \"inventory-retrieval\"}"
rem request an archive
rem C:\Python27\Scripts\aws glacier initiate-job --account-id - ^
rem --vault-name demschooltools-backups ^
rem --job-parameters file://args.json
rem put this in a file to request an archive
rem {
rem "Type": "archive-retrieval",
rem "ArchiveId": "...",
rem "Description": "6/14"
rem }
rem get finished archive retrieval or inventory
rem C:\Python27\Scripts\aws glacier get-job-output --account-id - ^
rem --vault-name demschooltools-backups ^
rem --job-id Ip0zLTco2QAzzxlVZSVxJaCEHDmw8ozVwR_iFKE3xkaN79CXDSZ8gCihliK_N25IhsEN2U2QLzj1Bo_ttzxze1rv_voR ^
rem june_14.zip
rem show jobs that are in progress
rem C:\Python27\Scripts\aws glacier list-jobs ^
rem --account-id - --vault-name demschooltools-backups
| |
Use unique test out for each sample | @ECHO OFF
SET BASEDIR=%~dp0..
SET USERINI=%BASEDIR%\user.ini
FOR /F "tokens=1,2 delims=:" %%a in ("%STEELTOE_PCF_CREDENTIALS%") do (
set CF_USER=%%a
set CF_PASS=%%b
)
SET PYTHON_HOME=C:\Python36
SET DOTNET_HOME=C:\Program Files\dotnet
SET JAVA_HOME=C:\opt\oracle-jdk-8
SET GIT_HOME=C:\Program Files\Git
SET MAVEN_HOME=C:\opt\apache-maven-3.3.9
ECHO [behave.userdata] > %USERINI%
ECHO cf_apiurl = api.run.pcfbeta.io >> %USERINI%
ECHO cf_org = STEELTOE >> %USERINI%
ECHO cf_username = %CF_USER% >> %USERINI%
ECHO cf_password = %CF_PASS% >> %USERINI%
ECHO output = C:\steeltoe-test >> %USERINI%
SET PATH=%PYTHON_HOME%\Scripts;%DOTNET_HOME%;%JAVA_HOME%\bin;%GIT_HOME%\bin;%MAVEN_HOME%\bin;%PATH%
CALL %BASEDIR%\test-setup
CALL %BASEDIR%\test-run %*
| @ECHO OFF
SET BASEDIR=%~dp0..
SET USERINI=%BASEDIR%\user.ini
FOR /F "tokens=1,2 delims=:" %%a in ("%STEELTOE_PCF_CREDENTIALS%") do (
set CF_USER=%%a
set CF_PASS=%%b
)
SET PYTHON_HOME=C:\Python36
SET DOTNET_HOME=C:\Program Files\dotnet
SET JAVA_HOME=C:\opt\oracle-jdk-8
SET GIT_HOME=C:\Program Files\Git
SET MAVEN_HOME=C:\opt\apache-maven-3.3.9
SET TEST_OUT=C:\st\%~nx1
ECHO [behave.userdata] > %USERINI%
ECHO cf_apiurl = api.run.pcfbeta.io >> %USERINI%
ECHO cf_org = STEELTOE >> %USERINI%
ECHO cf_username = %CF_USER% >> %USERINI%
ECHO cf_password = %CF_PASS% >> %USERINI%
ECHO output = %TEST_OUT% >> %USERINI%
SET PATH=%PYTHON_HOME%\Scripts;%DOTNET_HOME%;%JAVA_HOME%\bin;%GIT_HOME%\bin;%MAVEN_HOME%\bin;%PATH%
CALL %BASEDIR%\test-setup
CALL %BASEDIR%\test-run %*
|
Add script to bump all prerelease corefx package build numbers | @echo off
if "%1" == "" goto :usage
if "%2" == "" goto :usage
goto :main
:usage
echo Usage: %~n0 [directory] [build]
echo.
echo Recursively replaces all occurrences of 4.0.XX-beta-YYYYY in
echo [directory]\*.config;*.csproj;*.nuspec with 4.0.XX-beta-[build]
goto :eof
:main
pushd %1 && git clean -f packages && call :replace %2 && call :cleanup && popd
goto :eof
:replace
for /r %%f in (*.config *.csproj *.nuspec) do (
perl -i.tmp_spb -p -e "s/(4\.0\.[0-9]+-beta)-([0-9]+)/$1-%1/" %%f || goto :eof
)
goto :eof
:cleanup
del /s *.tmp_spb
goto :eof | |
Delete syso file before building with race detector | @ECHO OFF
Setlocal EnableDelayedExpansion
CALL __Global.cmd
ECHO *** Go Build ***
ECHO Build compiles packages and dependencies with race condition detector
ECHO.
FOR /F "tokens=*" %%A IN (Packages.txt) DO (
SET PACKAGE=%%A
ECHO Building: !PACKAGE!
cd "%GOPATH%\src\!PACKAGE!"
go build -v -race %LDFLAGS% !PACKAGE!
ECHO.
IF !ERRORLEVEL! NEQ 0 PAUSE
)
| @ECHO OFF
Setlocal EnableDelayedExpansion
CALL __Global.cmd
ECHO *** Go Build ***
ECHO Build compiles packages and dependencies with race condition detector
ECHO.
FOR /F "tokens=*" %%A IN (Packages.txt) DO (
SET PACKAGE=%%A
ECHO Building: !PACKAGE!
cd "%GOPATH%\src\!PACKAGE!"
DEL /Q /F *.syso
go build -v -race %LDFLAGS% !PACKAGE!
ECHO.
IF !ERRORLEVEL! NEQ 0 PAUSE
)
|
Add script to build a Windows package on Windows | @echo off
:: This script will create a packaged version of the app in firmware_flasher in your home folder.
:: After executing this script, use NSIS to create an installer from the firmware_flasher.win32.nsi file located there.
:: You may need to run npm install electron-packager --global once before this will work correctly.
set PLATFORM=win32
set ARCH=ia32
set OUTPUT_DIR=%userprofile%\firmware_flasher
set PACKAGE_DIR="%OUTPUT_DIR%\QMK Firmware Flasher-%PLATFORM%-%ARCH%"
call electron-packager . --platform=%PLATFORM% --arch=%ARCH% --out %OUTPUT_DIR% --overwrite
copy firmware_flasher.win32.nsi %PACKAGE_DIR% | |
Add local.py to windows install | @echo off
cd src
pip install -r requirements.txt
pause
| @echo off
cd src
pip install -r requirements.txt
copy src\settings\local.py.example src\settings\local.py
pause
|
Fix conda build on 32-bit Windows | call "%VS140COMNTOOLS%\..\..\VC\vcvarsall.bat" x64
set DISTUTILS_USE_SDK=1
set MSSdk=1
"%PYTHON%" setup.py install
if errorlevel 1 exit 1
| if "%ARCH%" == "32" (set PLATFORM=x86) else (set PLATFORM=x64)
call "%VS140COMNTOOLS%\..\..\VC\vcvarsall.bat" %PLATFORM%
set DISTUTILS_USE_SDK=1
set MSSdk=1
"%PYTHON%" setup.py install
if errorlevel 1 exit 1
|
Remove the building of Berkeley DB step; _bsddb44.vcproj takes care of this for us now. | @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
| @rem Used by the buildbot "buildmsi" step.
cmd /c Tools\buildbot\external.bat
@rem build release versions of things
call "%VS90COMNTOOLS%vsvars32.bat"
@rem build Python
cmd /q/c Tools\buildbot\kill_python.bat
vcbuild /useenv PCbuild\pcbuild.sln "Release|Win32"
@rem build the documentation
bash.exe -c 'cd Doc;make PYTHON=python2.5 update htmlhelp'
"%ProgramFiles%\HTML Help Workshop\hhc.exe" Doc\build\htmlhelp\pydoc.hhp
@rem buold the MSI file
cd PC
nmake /f icons.mak
cd ..\Tools\msi
del *.msi
nmake /f msisupport.mak
%HOST_PYTHON% msi.py
|
Use VsDevCmd.Bat rather than VsMSBuildCmd.bat | @echo off
echo Building Module.
echo Dependencies: GIT, PREMAKE5, VISUAL STUDIO 2015/2013.
echo.
:: Hacky way to ensure we've got a git repository & submodules at our disposal
git init
git submodule update --init --recursive
echo.
:: Fire up a Visual Studio command-line environment and generate our solution
IF DEFINED VS140COMNTOOLS (
echo Preparing for build with Visual Studio 2015.
premake5 vs2015
CALL "%VS140COMNTOOLS%VsMSBuildCmd.bat"
) ELSE IF DEFINED VS120COMNTOOLS (
echo Preparing for build with Visual Studio 2013.
premake5 vs2013
CALL "%VS120COMNTOOLS%VsMSBuildCmd.bat"
) ELSE (
echo Failed to detect Visual Studio installation.
timeout 5
exit /B 1
)
echo.
for /R project %%X in (*.sln) do (
msbuild %%X
)
:: We're done!
timeout 5
exit /B %ERRORLEVEL%
| @echo off
echo Building Module.
echo Dependencies: GIT, PREMAKE5, VISUAL STUDIO 2015/2013.
echo.
:: Hacky way to ensure we've got a git repository & submodules at our disposal
git init
git submodule update --init --recursive
echo.
:: Fire up a Visual Studio command-line environment and generate our solution
IF DEFINED VS140COMNTOOLS (
echo Preparing for build with Visual Studio 2015.
premake5 vs2015
CALL "%VS140COMNTOOLS%VSDevCmd.bat"
) ELSE IF DEFINED VS120COMNTOOLS (
echo Preparing for build with Visual Studio 2013.
premake5 vs2013
CALL "%VS120COMNTOOLS%VSDevCmd.bat"
) ELSE (
echo Failed to detect Visual Studio installation.
timeout 5
exit /B 1
)
echo.
for /R project %%X in (*.sln) do (
msbuild %%X
)
:: We're done!
timeout 5
exit /B %ERRORLEVEL%
|
Exit on first error (Windows) | @if "%DEBUG%" == "" @echo off
setlocal
set SOURCE_DIR=%CD%
set BUILD_DIR=%CD%\cppbuild\Release
if EXIST %BUILD_DIR% rd /S /Q %BUILD_DIR%
md %BUILD_DIR%
pushd %BUILD_DIR%
cmake -G "Visual Studio 16 2019" -DBUILD_AERON_DRIVER=ON %SOURCE_DIR%
cmake --build . --clean-first --config Release
ctest -C Release
| @if "%DEBUG%" == "" @echo off
setlocal
set SOURCE_DIR=%CD%
set BUILD_DIR=%CD%\cppbuild\Release
if EXIST %BUILD_DIR% rd /S /Q %BUILD_DIR%
md %BUILD_DIR%
pushd %BUILD_DIR%
cmake -G "Visual Studio 16 2019" -DBUILD_AERON_DRIVER=ON %SOURCE_DIR%
if %ERRORLEVEL% neq 0 exit /b %ERRORLEVEL%
cmake --build . --clean-first --config Release
if %ERRORLEVEL% neq 0 exit /b %ERRORLEVEL%
ctest -C Release
if %ERRORLEVEL% neq 0 exit /b %ERRORLEVEL%
|
Use gsl vs. gslgen for batch model builds. | @ECHO OFF
REM Run all code generation scripts
REM Requires iMatix GSL4, from http:\\www.nuget.org\packages\gslgen
REM Use this when:
REM - you add a socket option (sockopts.xml)
REM - add a new project class (project.xml)
REM - modify one of the referenced gsl templates (*.gsl)
mkdir ..\builds\mingw32
mkdir ..\builds\android
mkdir ..\builds\msvc\vs2008\czmq
mkdir ..\builds\msvc\vs2008\czmq_selftest
mkdir ..\builds\msvc\vs2010\czmq
mkdir ..\builds\msvc\vs2010\czmq_selftest
mkdir ..\builds\msvc\vs2012\czmq
mkdir ..\builds\msvc\vs2012\czmq_selftest
mkdir ..\builds\msvc\vs2013\czmq
mkdir ..\builds\msvc\vs2013\czmq_selftest
gslgen -q -script:sockopts.gsl sockopts.xml
gslgen -q -script:project.gsl project.xml
| @ECHO OFF
REM Run all code generation scripts
REM Requires iMatix GSL4, from http:\\www.nuget.org\packages\gsl
REM Use this when:
REM - you add a socket option (sockopts.xml)
REM - add a new project class (project.xml)
REM - modify one of the referenced gsl templates (*.gsl)
mkdir ..\builds\mingw32
mkdir ..\builds\android
mkdir ..\builds\msvc\vs2008\czmq
mkdir ..\builds\msvc\vs2008\czmq_selftest
mkdir ..\builds\msvc\vs2010\czmq
mkdir ..\builds\msvc\vs2010\czmq_selftest
mkdir ..\builds\msvc\vs2012\czmq
mkdir ..\builds\msvc\vs2012\czmq_selftest
mkdir ..\builds\msvc\vs2013\czmq
mkdir ..\builds\msvc\vs2013\czmq_selftest
gsl -q -script:sockopts.gsl sockopts.xml
gsl -q -script:project.gsl project.xml
|
Update CI for math library. | @echo off
rem math/big tests
set PATH_TO_ODIN==..\..\..\..\odin
set TEST_ARGS=-fast-tests
set TEST_ARGS=-no-random
set TEST_ARGS=
set OUT_NAME=math_big_test_library
set COMMON=-build-mode:shared -show-timings -no-bounds-check -define:MATH_BIG_EXE=false -vet -strict-style
echo ---
echo Running core:math/big tests
echo ---
%PATH_TO_ODIN% build . %COMMON% -o:speed -out:%OUT_NAME%
python3 test.py %TEST_ARGS% | @echo off
rem math/big tests
set PATH_TO_ODIN==..\..\..\..\odin
set TEST_ARGS=-fast-tests
set TEST_ARGS=-no-random
set TEST_ARGS=
set OUT_NAME=math_big_test_library.dll
set COMMON=-build-mode:shared -show-timings -no-bounds-check -define:MATH_BIG_EXE=false -vet -strict-style
echo ---
echo Running core:math/big tests
echo ---
%PATH_TO_ODIN% build . %COMMON% -o:speed -out:%OUT_NAME%
python3 test.py %TEST_ARGS% |
Add arguments parsing to batch script | @echo off
pushd %~dp0
dotnet ArchiSteamFarm.dll %ASF_ARGS%
| @echo off
pushd %~dp0
:loop
IF NOT "%1" == "" (
SET ASF_ARGS=%ASF_ARGS% %1
SHIFT
GOTO :loop
)
dotnet ArchiSteamFarm.dll %ASF_ARGS%
|
Add script to reduce distributable size from 358 MB to 162 MB | :: Script to trim size of unpacked build output.
:: Removes extraneous contents not required to run Zephyr.
:: Expected to be run from `.scripts` directory.
@ECHO off
set WORKING_DIRECTORY=..\dist\win-unpacked\resources\app.asar.unpacked\node_modules\node-openvr
:: Check that working directory exists
IF NOT EXIST %WORKING_DIRECTORY% (
echo Unable to find directory: %WORKING_DIRECTORY%
exit /b 1
)
:: Naive check that script hasn't already run
IF NOT EXIST %WORKING_DIRECTORY%\overlay (
echo Already trimmed!
exit
)
echo Cleaning up...
:: Cleanup OpenVR directory
rmdir /s /q %WORKING_DIRECTORY%\lib\openvr\bin
rmdir /s /q %WORKING_DIRECTORY%\lib\openvr\controller_callouts
rmdir /s /q %WORKING_DIRECTORY%\lib\openvr\lib
rmdir /s /q %WORKING_DIRECTORY%\lib\openvr\samples
rmdir /s /q %WORKING_DIRECTORY%\lib\openvr\src
del %WORKING_DIRECTORY%\lib\openvr\CMakeLists.txt
del %WORKING_DIRECTORY%\lib\openvr\README.md
del %WORKING_DIRECTORY%\lib\openvr\Toolchain-clang.cmake
:: Remove other directories/files
rmdir /s /q %WORKING_DIRECTORY%\overlay
rmdir /s /q %WORKING_DIRECTORY%\samples
rmdir /s /q %WORKING_DIRECTORY%\src
rmdir /s /q %WORKING_DIRECTORY%\tools
del %WORKING_DIRECTORY%\.gitmodules
echo Done! | |
Complete implementation of module io running as a task. | @echo off
cls
java -Dj3d.rend=d3d -Djava.util.logging.config.file=conf/logging.properties -Xms512m -Xmx1384m -cp MZmine.jar net.sf.mzmine.main.MZmineClient
| @echo off
cls
java -Dj3d.rend=d3d -Djava.library.path=lib -Djava.util.logging.config.file=conf/logging.properties -Xms512m -Xmx1384m -cp MZmine.jar net.sf.mzmine.main.MZmineClient
|
Split Tcl make targets into separate ones. | @rem Fetches (and builds if necessary) external dependencies
@rem Assume we start inside the Python source directory
call "Tools\buildbot\external-common.bat"
call "%VS90COMNTOOLS%\vsvars32.bat"
if not exist tcltk\bin\tcl85g.dll (
cd tcl-8.5.2.1\win
nmake -f makefile.vc COMPILERFLAGS=-DWINVER=0x0500 DEBUG=1 INSTALLDIR=..\..\tcltk clean all install
cd ..\..
)
if not exist tcltk\bin\tk85g.dll (
cd tk-8.5.2.0\win
nmake -f makefile.vc COMPILERFLAGS=-DWINVER=0x0500 DEBUG=1 INSTALLDIR=..\..\tcltk TCLDIR=..\..\tcl-8.5.2.1 clean all install
cd ..\..
)
| @rem Fetches (and builds if necessary) external dependencies
@rem Assume we start inside the Python source directory
call "Tools\buildbot\external-common.bat"
call "%VS90COMNTOOLS%\vsvars32.bat"
if not exist tcltk\bin\tcl85.dll (
@rem all and install need to be separate invocations, otherwise nmakehlp is not found on install
cd tcl-8.5.2.1\win
nmake -f makefile.vc COMPILERFLAGS=-DWINVER=0x0500 DEBUG=1 INSTALLDIR=..\..\tcltk clean all
nmake -f makefile.vc DEBUG=1 INSTALLDIR=..\..\tcltk install
cd ..\..
)
if not exist tcltk\bin\tk85.dll (
cd tk-8.5.2.0\win
nmake -f makefile.vc COMPILERFLAGS=-DWINVER=0x0500 DEBUG=1 INSTALLDIR=..\..\tcltk TCLDIR=..\..\tcl-8.5.2.1 clean
nmake -f makefile.vc COMPILERFLAGS=-DWINVER=0x0500 DEBUG=1 INSTALLDIR=..\..\tcltk TCLDIR=..\..\tcl-8.5.2.1 all
nmake -f makefile.vc COMPILERFLAGS=-DWINVER=0x0500 DEBUG=1 INSTALLDIR=..\..\tcltk TCLDIR=..\..\tcl-8.5.2.1 install
cd ..\..
)
|
Add package action remind notice. | nuget pack Pelasoft.AspNet.Mvc.Slack.csproj -Verbosity detailed -Build -IncludeReferencedProjects -Properties Configuration=Release | @echo off
echo.
echo ###### Nuget Creation Checklist ######
echo ## ##
echo ## * Update assembly version number ##
echo ## * Update nuspec revision notes ##
echo ## * Create tag after final commit ##
echo ## ##
echo ########################################
echo.
nuget pack Pelasoft.AspNet.Mvc.Slack.csproj -Verbosity detailed -Build -IncludeReferencedProjects -Properties Configuration=Release |
Fix comment lines refering to other lib | @REM Configure the build of phreeqc4rkt
cmake -S . -B build ^
-DCMAKE_BUILD_TYPE=Release ^
-DCMAKE_PREFIX_PATH=%LIBRARY_PREFIX% ^
-DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^
-DBUILD_SHARED_LIBS=ON ^
-DYAML_BUILD_SHARED_LIBS=ON ^
-DYAML_CPP_BUILD_TESTS=OFF
@REM Build and install phreeqc4rkt in %LIBRARY_PREFIX%
@REM Note: No need for --parallel below, since cmake takes care of the /MP flag for MSVC
cmake --build build --config Release --target install
| @REM Configure the build of yaml-cpp4rkt
cmake -S . -B build ^
-DCMAKE_BUILD_TYPE=Release ^
-DCMAKE_PREFIX_PATH=%LIBRARY_PREFIX% ^
-DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^
-DBUILD_SHARED_LIBS=ON ^
-DYAML_BUILD_SHARED_LIBS=ON ^
-DYAML_CPP_BUILD_TESTS=OFF
@REM Build and install yaml-cpp4rkt in %LIBRARY_PREFIX%
@REM Note: No need for --parallel below, since cmake takes care of the /MP flag for MSVC
cmake --build build --config Release --target install
|
Use min/max instead of mean/sigma. | mkdir "Equipment/Simple Frontend/Settings"
create DOUBLE "Equipment/Simple Frontend/Settings/mean"
set "Equipment/Simple Frontend/Settings/mean" 0.0
create DOUBLE "Equipment/Simple Frontend/Settings/sigma"
set "Equipment/Simple Frontend/Settings/sigma" 1.0 | mkdir "Equipment/Simple Frontend/Settings"
create DOUBLE "Equipment/Simple Frontend/Settings/min"
set "Equipment/Simple Frontend/Settings/min" 0.0
create DOUBLE "Equipment/Simple Frontend/Settings/max"
set "Equipment/Simple Frontend/Settings/max" 1.0 |
Update AppVeyor script now that output files are changed | @echo on
@SET /A exitcode=0
@SET /A TESTFAILURE_ERROR=1
@SET /A PUSHARTIFACT_ERROR=2
@SET /A READREPORT_ERROR=4
nunit3-console.exe Tests\CSF.Screenplay.WebApis.Tests\bin\Debug\CSF.Screenplay.WebApis.Tests.dll
@IF %ERRORLEVEL% NEQ 0 SET /A exitcode^|=%TESTFAILURE_ERROR%
appveyor PushArtifact SpecFlow.report.txt
@IF %ERRORLEVEL% NEQ 0 SET /A exitcode^|=%PUSHARTIFACT_ERROR%
appveyor PushArtifact JsonApis.report.txt
@IF %ERRORLEVEL% NEQ 0 SET /A exitcode^|=%PUSHARTIFACT_ERROR%
@echo ******************
@echo Screenplay reports
@echo ******************
@type SpecFlow.report.txt
@IF %ERRORLEVEL% NEQ 0 SET /A exitcode^|=%READREPORT_ERROR%
@type JsonApis.report.txt
@IF %ERRORLEVEL% NEQ 0 SET /A exitcode^|=%READREPORT_ERROR%
@echo off
@EXIT /B %exitcode%
| @echo on
@SET /A exitcode=0
@SET /A TESTFAILURE_ERROR=1
@SET /A PUSHARTIFACT_ERROR=2
@SET /A READREPORT_ERROR=4
nunit3-console.exe Tests\CSF.Screenplay.WebApis.Tests\bin\Debug\CSF.Screenplay.WebApis.Tests.dll
@IF %ERRORLEVEL% NEQ 0 SET /A exitcode^|=%TESTFAILURE_ERROR%
appveyor PushArtifact SpecFlow.report.txt
@IF %ERRORLEVEL% NEQ 0 SET /A exitcode^|=%PUSHARTIFACT_ERROR%
appveyor PushArtifact JsonApis.report.txt
@IF %ERRORLEVEL% NEQ 0 SET /A exitcode^|=%PUSHARTIFACT_ERROR%
@echo ******************
@echo Screenplay reports
@echo ******************
@type SpecFlow.report.json
@IF %ERRORLEVEL% NEQ 0 SET /A exitcode^|=%READREPORT_ERROR%
@type JsonApis.report.json
@IF %ERRORLEVEL% NEQ 0 SET /A exitcode^|=%READREPORT_ERROR%
@echo off
@EXIT /B %exitcode%
|
Add Program Files\7-Zip to path | PATH=C:\python26;C:\progra~2\7-zip;%PATH%
del /q /s dist\*.*
python setup.py py2exe
cd dist
7z d library.zip jinja2\* dns\* 'graphy\*
del /s w9xpopen.exe
copy ..\README.txt .
7z a namebench_for_Windows.zip -r *
namebench -x -O 8.8.8.8 -t5 -o test.html
start test.html
cd ..
| PATH=C:\python26;C:\progra~1\7-zip;C:\progra~2\7-zip;%PATH%
del /q /s dist\*.*
python setup.py py2exe
cd dist
7z d library.zip jinja2\* dns\* 'graphy\*
del /s w9xpopen.exe
copy ..\README.txt .
7z a namebench_for_Windows.zip -r *
namebench -x -O 8.8.8.8 -t5 -o test.html
start test.html
cd ..
|
Add batch script for normal windows startup | ::Windows Normal Gateway Startup Script
@echo off
echo "Installing Dependencies"
call bundle install
echo "Starting Delayed Job"
call "cmd /c start /min bundle exec ruby script/delayed_job run"
echo "Starting Normal Gateway"
bundle exec rails server -p 3001
| |
Fix designer files getting updated just for version number changes | @echo off
setlocal
REM Copyright (c) Microsoft. All rights reserved.
REM Licensed under the MIT license. See LICENSE file in the project root for full license information.
if "%~3"=="" goto help
if NOT "%~4"=="" goto help
goto Run
:Help
echo syntax: ValidateDesignerFile.cmd ^<path_to_designer_file^> ^<path_to_candidate_file^> ^<intermediate_directory^>
echo.
echo ValidateDesignerFile.cmd will determine if the designer file and the candidate
echo file are the same (excluding full line c-style comments and whitespace).
echo If they are different the designer file will be updated.
echo.
exit /b -1
:Run
if not exist "%2" echo ERROR: %2 does not exist & exit /b -1
if not exist "%1" goto :UpdateFile
findstr /v /r /c:"^ *//" %1 > "%~3\%~nx1-nocomments"
findstr /v /r /c:"^ *//" %2 > "%~3\%~nx2-nocomments"
fc /W "%~3\%~nx1-nocomments" "%~3\%~nx2-nocomments"
if not "%ERRORLEVEL%"=="0" goto UpdateFile
echo %1 is already up to date.
exit /b 0
:UpdateFile
echo Updating %1
copy /y %2 %1
if NOT %ERRORLEVEL%==0 echo ERROR: Unable to update %1. >&2 & exit /b -1
exit /b 0 | @echo off
setlocal
REM Copyright (c) Microsoft. All rights reserved.
REM Licensed under the MIT license. See LICENSE file in the project root for full license information.
if "%~3"=="" goto help
if NOT "%~4"=="" goto help
goto Run
:Help
echo syntax: ValidateDesignerFile.cmd ^<path_to_designer_file^> ^<path_to_candidate_file^> ^<intermediate_directory^>
echo.
echo ValidateDesignerFile.cmd will determine if the designer file and the candidate
echo file are the same (excluding full line c-style comments and whitespace).
echo If they are different the designer file will be updated.
echo.
exit /b -1
:Run
if not exist "%2" echo ERROR: %2 does not exist & exit /b -1
if not exist "%1" goto :UpdateFile
findstr /v /r /c:"^ *//" %1 | findstr /v /c:"[System.CodeDom.Compiler.GeneratedCodeAttribute(" > "%~3\%~nx1-nocomments"
findstr /v /r /c:"^ *//" %2 | findstr /v /c:"[System.CodeDom.Compiler.GeneratedCodeAttribute(" > "%~3\%~nx2-nocomments"
fc /W "%~3\%~nx1-nocomments" "%~3\%~nx2-nocomments"
if not "%ERRORLEVEL%"=="0" goto UpdateFile
echo %1 is already up to date.
exit /b 0
:UpdateFile
echo Updating %1
copy /y %2 %1
if NOT %ERRORLEVEL%==0 echo ERROR: Unable to update %1. >&2 & exit /b -1
exit /b 0 |
Remove unnecessary pause, CD back to top | @ECHO OFF
CD winrun4j
COPY WinRun4J64.exe DNGearSim.exe
RCEDIT64.exe /N DNGearSim.exe DNGearSim.ini
RCEDIT64.exe /S DNGearSim.exe splash.bmp
RCEDIT64.exe /I DNGearSim.exe icon.ico
COPY "DNGearSim.exe" "../../runtime/DNGearSim.exe"
CD ../..
CD Bootstrap/target
COPY "bootstrap.jar" "../../runtime/bootstrap.jar"
PAUSE | @ECHO OFF
CD winrun4j
COPY WinRun4J64.exe DNGearSim.exe
RCEDIT64.exe /N DNGearSim.exe DNGearSim.ini
RCEDIT64.exe /S DNGearSim.exe splash.bmp
RCEDIT64.exe /I DNGearSim.exe icon.ico
COPY "DNGearSim.exe" "../../runtime/DNGearSim.exe"
CD ../..
CD Bootstrap/target
COPY "bootstrap.jar" "../../runtime/bootstrap.jar"
CD ../..
|
Fix the name of the scheduled task. | schtasks /CREATE /TN "cloudbaseinit-installer" /SC ONCE /SD 01/01/2020 /ST 00:00:00 /RL HIGHEST /RU CiAdmin /RP Passw0rd /TR "powershell C:\\installcbinit.ps1 -serviceType %1 -installer %2" /F
schtasks /RUN /TN "cloudbaseinit-installer"
timeout /t 5
:loop
for /f "tokens=2 delims=: " %%f in ('schtasks /query /tn EnablePS-Remoting /fo list ^| find "Status:"' ) do (
if "%%f"=="Running" (
timeout /T 1 /NOBREAK > nul
goto loop
)
) | schtasks /CREATE /TN "cloudbaseinit-installer" /SC ONCE /SD 01/01/2020 /ST 00:00:00 /RL HIGHEST /RU CiAdmin /RP Passw0rd /TR "powershell C:\\installcbinit.ps1 -serviceType %1 -installer %2" /F
schtasks /RUN /TN "cloudbaseinit-installer"
timeout /t 5
:loop
for /f "tokens=2 delims=: " %%f in ('schtasks /query /tn cloudbaseinit-installer /fo list ^| find "Status:"' ) do (
if "%%f"=="Running" (
timeout /T 1 /NOBREAK > nul
goto loop
)
) |
Print the contents of CMakeError.log after running CMake for CI tests on Windows. This helps investigate why a CHECK_CXX_SOURCE_COMPILES check failed. |
echo on
set PATH=C:\Windows\system32;C:\Windows;%PYTHON3_PATH%;%PYTHON3_PATH%\Scripts;%CMAKE_PATH%;
if not "%VCVARSALL_DIR%" == "" CALL "%VCVARSALL_DIR%\vcvarsall.bat" amd64
if not "%MINGW_PATH%" == "" SET PATH=%PATH%%MINGW_PATH%;
setx PATH "%PATH%"
mkdir C:\Fruit\build-%CONFIGURATION%
cd C:\Fruit\build-%CONFIGURATION%
cmake.exe -G "%CMAKE_GENERATOR%" .. -DCMAKE_BUILD_TYPE=%CONFIGURATION% -DBUILD_TESTS_IN_RELEASE_MODE=True %ADDITIONAL_CMAKE_ARGS% || exit /b 1
IF "%CMAKE_GENERATOR%"=="MinGW Makefiles" (
mingw32-make -j12 || exit /b 1
) ELSE (
msbuild ALL_BUILD.vcxproj || exit /b 1
)
pip3 install pytest
pip3 install pytest-xdist
ctest.exe -j 1 --output-on-failure -C %CONFIGURATION% || exit /b 1
|
echo on
set PATH=C:\Windows\system32;C:\Windows;%PYTHON3_PATH%;%PYTHON3_PATH%\Scripts;%CMAKE_PATH%;
if not "%VCVARSALL_DIR%" == "" CALL "%VCVARSALL_DIR%\vcvarsall.bat" amd64
if not "%MINGW_PATH%" == "" SET PATH=%PATH%%MINGW_PATH%;
setx PATH "%PATH%"
mkdir C:\Fruit\build-%CONFIGURATION%
cd C:\Fruit\build-%CONFIGURATION%
cmake.exe -G "%CMAKE_GENERATOR%" .. -DCMAKE_BUILD_TYPE=%CONFIGURATION% -DBUILD_TESTS_IN_RELEASE_MODE=True %ADDITIONAL_CMAKE_ARGS% || exit /b 1
echo "Content of CMakeFiles\CMakeError.log:"
if exist "CMakeFiles\CMakeError.log"
type "CMakeFiles\CMakeError.log"
fi
IF "%CMAKE_GENERATOR%"=="MinGW Makefiles" (
mingw32-make -j12 || exit /b 1
) ELSE (
msbuild ALL_BUILD.vcxproj || exit /b 1
)
pip3 install pytest
pip3 install pytest-xdist
ctest.exe -j 1 --output-on-failure -C %CONFIGURATION% || exit /b 1
|
Add bower install and copy installed to | @echo off
set REPO_URL=https://raw.githubusercontent.com/PixxxeL/regular-gulpfile/master/
echo ===========================================================================
echo 1. Create bower.json, package.json
echo 2. Download gulpfile.js and skeleton
echo 3. Make directories
echo.
pause && npm init && bower init && ^
npm install gulp gulp-sass gulp-jade gulp-shell gulp-coffee && ^
curl -O %REPO_URL%gulpfile.js && ^
mkdir jade html coffee js sass css img && ^
cd coffee && ^
curl -O %REPO_URL%coffee/main.coffee && ^
cd ..\jade && ^
curl -O %REPO_URL%jade/base.jade && ^
curl -O %REPO_URL%jade/index.jade && ^
cd ..\sass && ^
curl -O %REPO_URL%sass/_definitions.sass && ^
curl -O %REPO_URL%sass/main.sass && ^
cd .. && ^
echo. && echo Job finish!
exit 0
| @echo off
set REPO_URL=https://raw.githubusercontent.com/PixxxeL/regular-gulpfile/master/
echo ===========================================================================
echo 1. Create bower.json, package.json
echo 2. Download gulpfile.js and skeleton
echo 3. Make directories
echo.
pause && npm init && bower init && ^
npm install gulp gulp-sass gulp-jade gulp-shell gulp-coffee && ^
curl -O %REPO_URL%gulpfile.js && ^
mkdir jade html coffee js sass css img && ^
bower install jquery html5-boilerplate && ^
cp bower_components/jquery/dist/jquery.min.js js/jquery.min.js && ^
cp bower_components/html5-boilerplate/dist/css/normalize.css css/normalize.css && ^
cd coffee && ^
curl -O %REPO_URL%coffee/main.coffee && ^
cd ..\jade && ^
curl -O %REPO_URL%jade/base.jade && ^
curl -O %REPO_URL%jade/index.jade && ^
cd ..\sass && ^
curl -O %REPO_URL%sass/_definitions.sass && ^
curl -O %REPO_URL%sass/main.sass && ^
cd .. && ^
echo. && echo Job finish!
exit 0
|
Use flutter test for faster testing | @echo off
echo Generating C-style Win32 APIs and tests
call dart %~dp0win32\win32api.dart
call dart %~dp0win32\generate_ffi_jsonproto.dart
call dart %~dp0metadata\win32.dart %~dp0..\lib\src\generated
call dart %~dp0win32\generate_tests.dart
echo.
echo Generating COM classes from Windows metadata
call dart %~dp0metadata\com.dart %~dp0..\lib\src\generated
echo.
echo Generating Windows Runtime classes from Windows metadata
call dart %~dp0metadata\winrt.dart %~dp0..\lib\src\generated
echo.
echo Formatting generated source code
call dart format %~dp0..\lib\src
call dart format %~dp0..\test\api_test.dart
call dart format %~dp0..\test\struct_test.dart
call dart format %~dp0..\test\com
echo.
if "%1"=="--notest" goto end
echo Running tests
call dart test
:end | @echo off
echo Generating C-style Win32 APIs and tests
call dart %~dp0win32\win32api.dart
call dart %~dp0win32\generate_ffi_jsonproto.dart
call dart %~dp0metadata\win32.dart %~dp0..\lib\src\generated
call dart %~dp0win32\generate_tests.dart
echo.
echo Generating COM classes from Windows metadata
call dart %~dp0metadata\com.dart %~dp0..\lib\src\generated
echo.
echo Generating Windows Runtime classes from Windows metadata
call dart %~dp0metadata\winrt.dart %~dp0..\lib\src\generated
echo.
echo Formatting generated source code
call dart format %~dp0..\lib\src
call dart format %~dp0..\test\api_test.dart
call dart format %~dp0..\test\struct_test.dart
call dart format %~dp0..\test\com
echo.
echo Running tests
if "%1"=="--use-dart-test" goto dart_test
call flutter test
goto end
:dart_test
call dart test
:end |
Use proper batch script syntax | @echo off
rem Generate the header file from the Store info about in which git branch,
rem what SHA1 and at what date/time we executed make.
for /f "delims=" %%a in ('powershell.exe -command "& {Get-Content .\etc\gitinfo.txt | select -First 1}"') do set GIT_BRANCH=%%a
for /f "delims=" %%a in ('powershell.exe -command "& {Get-Content .\etc\gitinfo.txt | select -First 2 | select -Last 1}"') do set GIT_COMMIT=%%a
echo '#ifndef ROOT_RGITCOMMIT_H' > $1
echo '#define ROOT_RGITCOMMIT_H' >> $1
echo '#define ROOT_GIT_BRANCH "%GIT_BRANCH%"' >> $1
echo '#define ROOT_GIT_COMMIT "%GIT_COMMIT%"' >> $1
echo '#endif' >> $1
| @echo off
rem Generate the header file from the Store info about in which git branch,
rem what SHA1 and at what date/time we executed make.
for /f "delims=" %%a in ('powershell.exe -command "& {Get-Content .\etc\gitinfo.txt | select -First 1}"') do set GIT_BRANCH=%%a
for /f "delims=" %%a in ('powershell.exe -command "& {Get-Content .\etc\gitinfo.txt | select -First 2 | select -Last 1}"') do set GIT_COMMIT=%%a
echo #ifndef ROOT_RGITCOMMIT_H > %1
echo #define ROOT_RGITCOMMIT_H >> %1
echo #define ROOT_GIT_BRANCH "%GIT_BRANCH%" >> %1
echo #define ROOT_GIT_COMMIT "%GIT_COMMIT%" >> %1
echo #endif >> %1
|
Add file header with right data | ### application.bat - 201x - votre nom ###
echo "Build : 10:00"
echo "version 1" | ### application.bat - 2015 - Thibault ROGER ###
echo "Build : 10:00"
echo "version 1" |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.