Instruction
stringlengths
14
778
input_code
stringlengths
0
4.24k
output_code
stringlengths
1
5.44k
Recompile UI file on build
@echo off cd src python.exe setup.py build cd .. "%PROGRAMFILES%\Inno Setup 5\ISCC.exe" pesel2pbn.iss
@echo off cd src cd pesel2pbn pyuic5 pesel2pbn.ui > pesel2pbn_auto.py cd .. python.exe setup.py build cd .. "%PROGRAMFILES%\Inno Setup 5\ISCC.exe" pesel2pbn.iss
Update maven deploy script to hopefully work around some reliability issues encountered during uploads to Sonatype Nexus (Maven Central) Repository.
set WINSCP="C:\Program Files (x86)\WinSCP\WinSCP.com" %WINSCP% /script=dosyncftp_maven.cmd REM Publish artifact to MavenCentral pushd ..\roborio\c++\navx_frc_cpp call gradlew publish popd REM Publish artifact to MavenCentral pushd ..\roborio\java\navx_frc call gradlew publish popd ECHO To Release the MavenCentral Artifacts: ECHO ECHO - Navigate to https://oss.sonatype.org/service/local/staging/deploy/maven2 and login ECHO - At bottom of list, select the checkbox next to the staged content ECHO - Click the Close button, which triggers analysis of the artifacts (takes about 1 minute) ECHO - Then, click the Release button to migrate the staged build to the Release Repository ECHO It takes about 10 minutes to be released, and about 2 hours to show up in Maven Central Search.
set WINSCP="C:\Program Files (x86)\WinSCP\WinSCP.com" %WINSCP% /script=dosyncftp_maven.cmd REM Publish artifact to MavenCentral pushd ..\roborio\java\navx_frc call gradlew publish popd REM Publish artifact to MavenCentral pushd ..\roborio\c++\navx_frc_cpp call gradlew publish popd ECHO To Release the MavenCentral Artifacts: ECHO ECHO - Navigate to https://oss.sonatype.org/service/local/staging/deploy/maven2 and login ECHO - At bottom of list, select the checkbox next to the staged content ECHO - Click the Close button, which triggers analysis of the artifacts (takes about 1 minute) ECHO - Then, click the Release button to migrate the staged build to the Release Repository ECHO It takes about 10 minutes to be released, and about 2 hours to show up in Maven Central Search.
Use prerelease paket for dogfooding
@echo off cls .paket\paket.bootstrapper.exe if errorlevel 1 ( exit /b %errorlevel% ) .paket\paket.exe restore if errorlevel 1 ( exit /b %errorlevel% ) packages\build\FAKE\tools\FAKE.exe build.fsx %*
@echo off cls .paket\paket.bootstrapper.exe prerelease if errorlevel 1 ( exit /b %errorlevel% ) .paket\paket.exe restore if errorlevel 1 ( exit /b %errorlevel% ) packages\build\FAKE\tools\FAKE.exe build.fsx %*
Add script for fetching dependencies
@echo off py -m pip install --upgrade pip py -m pip install -r %~dp0/requirements.txt echo. if %ERRORLEVEL% EQU 0 ( echo Installation completed successfully. echo You're good to go! Run 'run.pyw' to start the program. ) else ( echo Installation failed! echo Please make sure to read all the info in the README before running this script. echo Otherwise, email the error message above to the current maintainer. ) echo. echo Press any key to continue... pause > nul
Add link generating script for Windows.
@echo off setlocal REM --------------------------------------------------------------------------- set ROOT=%~dp0 if not exist "%USERPROFILE%" ( echo [Error] Environment variable %%USERPROFILE%% is not set. goto :CLEANUP ) REM --------------------------------------------------------------------------- pushd "%ROOT%" REM Check access priviledge if exist ".\makelinks.tmp" del ".\makelinks.tmp" (mklink ".\makelinks.tmp" "%~0" 2>&1) > NUL if not %ERRORLEVEL% == 0 ( echo Administrator priviledge needed. goto :CLEANUP ) set DOTVIM=.vim call :MAIN set DOTVIM=_vim call :MAIN :CLEANUP del ".\makelinks.tmp" > NUL popd goto :EOF REM --------------------------------------------------------------------------- :MAIN call :MAKE_SYMLINK "%USERPROFILE%\%DOTVIM%rc" "%ROOT%.vimrc" call :ENSURE_DIR "%USERPROFILE%\%DOTVIM%" call :ENSURE_DIR "%USERPROFILE%\%DOTVIM%\ftplugin" for %%I in (.vim\ftplugin\*.vim) do ( call :MAKE_SYMLINK "%USERPROFILE%\%DOTVIM%\ftplugin\%%~nxI" "%%~fI" ) exit /b 0 :MAKE_SYMLINK del /q "%~1" 2> NUL mklink "%~f1" "%~f2" > NUL echo mklink "%~f1" "%~f2" exit /b 0 :ENSURE_DIR if not exist "%~1" ( mkdir "%~1" echo mkdir "%~f1" ) exit /b 0
Install Visual C++ 2008 SP1 Redistributables
for %%F in ("." "bin") do ( cmake -G "%CMAKE_GENERATOR%" ^ -DCMAKE_INSTALL_PREFIX:PATH="%LIBRARY_PREFIX%" ^ -DCMAKE_INSTALL_DEBUG_LIBRARIES:BOOL="OFF" ^ -DCMAKE_INSTALL_DEBUG_LIBRARIES_ONLY:BOOL="OFF" ^ -DCMAKE_INSTALL_OPENMP_LIBRARIES:BOOL="ON" ^ -DCMAKE_INSTALL_SYSTEM_RUNTIME_DESTINATION:STRING=%%F ^ "%RECIPE_DIR%" if errorlevel 1 exit 1 cmake --build "%SRC_DIR%" ^ --target INSTALL ^ --config Release if errorlevel 1 exit 1 )
powershell -Command "(New-Object Net.WebClient).DownloadFile('https://download.microsoft.com/download/d/d/9/dd9a82d0-52ef-40db-8dab-795376989c03/vcredist_x86.exe', 'vcredist_x86.exe')" if errorlevel 1 exit 1 powershell -Command "(New-Object Net.WebClient).DownloadFile('https://download.microsoft.com/download/2/d/6/2d61c766-107b-409d-8fba-c39e61ca08e8/vcredist_x64.exe', 'vcredist_x64.exe')" if errorlevel 1 exit 1 vcredist_x86.exe /qb! if errorlevel 1 exit 1 vcredist_x64.exe /qb! if errorlevel 1 exit 1 for %%F in ("." "bin") do ( cmake -G "%CMAKE_GENERATOR%" ^ -DCMAKE_INSTALL_PREFIX:PATH="%LIBRARY_PREFIX%" ^ -DCMAKE_INSTALL_DEBUG_LIBRARIES:BOOL="OFF" ^ -DCMAKE_INSTALL_DEBUG_LIBRARIES_ONLY:BOOL="OFF" ^ -DCMAKE_INSTALL_OPENMP_LIBRARIES:BOOL="ON" ^ -DCMAKE_INSTALL_SYSTEM_RUNTIME_DESTINATION:STRING=%%F ^ "%RECIPE_DIR%" if errorlevel 1 exit 1 cmake --build "%SRC_DIR%" ^ --target INSTALL ^ --config Release if errorlevel 1 exit 1 )
Add normalize wav file windows script
REM @echo off REM "============== GET PARAMS" SET sox="C:\Program Files (x86)\sox-14-4-2\sox.exe" SET filePath=%1 SET fileNormPath=%filePath%.norm.wav SET gain=%2 echo "============== Normalizing audio: %fileNormPath%" %sox% %filePath% %fileNormPath% norm %gain% echo "============== Deleting original: %filePath%" del %filePath% echo "============== Renaming normalized file back to source: %filePath%" For %%A in ("%filePath%") do ( Set fileName=%%~nxA ) ren %fileNormPath% %fileName% echo "============== Finished normalize"
Add /machine:x64, flag which was lost when setting /FORCE:MULTIPLE
set CONDA_PREFIX=%PREFIX% if errorlevel 1 exit 1 cmake -B build -S "%SRC_DIR%" ^ -G Ninja ^ -DCMAKE_BUILD_TYPE=Release ^ -DPython3_FIND_STRATEGY=LOCATION ^ -DPython3_ROOT_DIR=%CONDA_PREFIX% ^ -DCMAKE_LINKER=lld-link.exe ^ -DCMAKE_MODULE_LINKER_FLAGS="/FORCE:MULTIPLE" if errorlevel 1 exit 1 cmake --build build -j %CPU_COUNT% -- -v -k 0 if errorlevel 1 exit 1 if not exist "%SP_DIR%" mkdir "%SP_DIR%" if errorlevel 1 exit 1 copy build/OCP.cp*-*.* "%SP_DIR%" if errorlevel 1 exit 1
set CONDA_PREFIX=%PREFIX% if errorlevel 1 exit 1 cmake -B build -S "%SRC_DIR%" ^ -G Ninja ^ -DCMAKE_BUILD_TYPE=Release ^ -DPython3_FIND_STRATEGY=LOCATION ^ -DPython3_ROOT_DIR=%CONDA_PREFIX% ^ -DCMAKE_LINKER=lld-link.exe ^ -DCMAKE_MODULE_LINKER_FLAGS="/machine:x64 /FORCE:MULTIPLE" if errorlevel 1 exit 1 cmake --build build -j %CPU_COUNT% -- -v -k 0 if errorlevel 1 exit 1 if not exist "%SP_DIR%" mkdir "%SP_DIR%" if errorlevel 1 exit 1 copy build/OCP.cp*-*.* "%SP_DIR%" if errorlevel 1 exit 1
Install smaller things first, like chrome so can be used immediately
@"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin" choco install vagrant chefdk virtualbox visualstudiocode 7zip googlechrome notepadplusplus.install firefox git.install tortoisegit -y refreshenv vagrant plugin install vagrant-winrm vagrant box add mwrock/Windows2016 --provider virtualbox vagrant box add mwrock/Windows2012R2 --provider virtualbox vagrant box add jacqinthebox/windowsserver2016core --provider virtualbox code --install-extension ms-vscode.powershell code --install-extension msazurermtools.azurerm-vscode-tools code --install-extension HookyQR.beautify code --install-extension Pendrica.chef code --install-extension ms-vscode.PeterJausovec.vscode-docker code --install-extension alefragnani.project-manager code --install-extension Borke.puppet code --install-extension mauve.terraform code --install-extension bbenoist.vagrant code --list-extensions mkdir c:\github cd c:\github git clone https://github.com/iaingblack/Automation.git chef gem install kitchen-all
@"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin" choco install googlechrome 7zip notepadplusplus.install firefox git.install tortoisegit vagrant chefdk virtualbox visualstudiocode -y refreshenv vagrant plugin install vagrant-winrm vagrant box add mwrock/Windows2016 --provider virtualbox vagrant box add mwrock/Windows2012R2 --provider virtualbox vagrant box add jacqinthebox/windowsserver2016core --provider virtualbox code --install-extension ms-vscode.powershell code --install-extension msazurermtools.azurerm-vscode-tools code --install-extension HookyQR.beautify code --install-extension Pendrica.chef code --install-extension ms-vscode.PeterJausovec.vscode-docker code --install-extension alefragnani.project-manager code --install-extension Borke.puppet code --install-extension mauve.terraform code --install-extension bbenoist.vagrant code --list-extensions mkdir c:\github cd c:\github git clone https://github.com/iaingblack/Automation.git chef gem install kitchen-all
Check for VS Build tools
@echo off setlocal call "%VS120COMNTOOLS%\VsDevCmd.bat" msbuild .\PSScriptAnalyzer.sln if NOT [%ERRORLEVEL%]==[0] pause endlocal
@echo off setlocal if "%VS120COMNTOOLS%"=="" GOTO NOTOOLS call "%VS120COMNTOOLS%\VsDevCmd.bat" msbuild .\PSScriptAnalyzer.sln if NOT [%ERRORLEVEL%]==[0] pause GOTO END :NOTOOLS echo The Visual Studio 2012 tools are not installed pause :END endlocal
Add nuget package restore step.
@echo Off set config=%1 if "%config%" == "" ( set config=Release ) set version= if not "%PackageVersion%" == "" ( set version=-Version %PackageVersion% ) REM Build %WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild AW.Model.RWX.sln /p:Configuration="%config%" /m /v:M /fl /flp:LogFile=msbuild.log;Verbosity=Normal /nr:false REM Package mkdir Build cmd /c %nuget% pack "Bloyteg.AW.Model.RWX\Bloyteg.AW.Model.RWX.fsproj" -symbols -o Build -p Configuration=%config% %version% -IncludeReferencedProjects
@echo Off set config=%1 if "%config%" == "" ( set config=Release ) set version= if not "%PackageVersion%" == "" ( set version=-Version %PackageVersion% ) cmd /c %nuget% restore REM Build %WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild AW.Model.RWX.sln /p:Configuration="%config%" /m /v:M /fl /flp:LogFile=msbuild.log;Verbosity=Normal /nr:false REM Package mkdir Build cmd /c %nuget% pack "Bloyteg.AW.Model.RWX\Bloyteg.AW.Model.RWX.fsproj" -symbols -o Build -p Configuration=%config% %version% -IncludeReferencedProjects
Set default target to orbeon-dist-packages
@echo off @setlocal rem ------------------------------------------------------ rem Check environment variables if not "%JAVA_HOME%" == "" goto java_home_ok echo Environment variable JAVA_HOME must be set. set ERROR=true :java_home_ok if not "%DEBUG_ENABLED%" == "" goto debug_enabled_ok set DEBUG_ENABLED=false :debug_enabled_ok if not "%WEBLOGIC_HOME%" == "" goto weblogic_home_ok set WEBLOGIC_HOME=C:\bea\weblogic700\server :weblogic_home_ok if "%ERROR%" == "true" goto end rem ------------------------------------------------------ rem Run Ant for %%I in (.) do set BUILD_ROOT=%%~fI set CLASSPATH=.\lib\junit.jar set PATH=%JAVA_HOME%\bin;%PATH% set ANT_HOME=tools\ant "%ANT_HOME%\bin\ant.bat" "-Djava.home=%JAVA_HOME%" "-Dant.home=%ANT_HOME%" "-Dbuild.root=%BUILD_ROOT%" "-Ddebug.enabled=%DEBUG_ENABLED%" "-Dweblogic.home=%WEBLOGIC_HOME%" %1 %2 %3 %4 %5 %6 %7 %8 %9 :end
@echo off @setlocal rem ------------------------------------------------------ rem Check environment variables if not "%JAVA_HOME%" == "" goto java_home_ok echo Environment variable JAVA_HOME must be set. set ERROR=true :java_home_ok if not "%DEBUG_ENABLED%" == "" goto debug_enabled_ok set DEBUG_ENABLED=false :debug_enabled_ok if not "%WEBLOGIC_HOME%" == "" goto weblogic_home_ok set WEBLOGIC_HOME=C:\bea\weblogic700\server :weblogic_home_ok if "%ERROR%" == "true" goto end rem ------------------------------------------------------ rem Run Ant set target=%1 set default_target=orbeon-dist-packages if not defined target ( set target=%default_target% echo Defaulting to target %default_target% ) for %%I in (.) do set BUILD_ROOT=%%~fI set CLASSPATH=.\lib\junit.jar set PATH=%JAVA_HOME%\bin;%PATH% set ANT_HOME=tools\ant "%ANT_HOME%\bin\ant.bat" "-Djava.home=%JAVA_HOME%" "-Dant.home=%ANT_HOME%" "-Dbuild.root=%BUILD_ROOT%" "-Ddebug.enabled=%DEBUG_ENABLED%" "-Dweblogic.home=%WEBLOGIC_HOME%" %target% %2 %3 %4 %5 %6 %7 %8 %9 :end
Remove package analysis in nuget pack call
nuget restore md artifacts\bin MSBuild.exe AzureSiteReplicator\AzureSiteReplicator.csproj /t:pipelinePreDeployCopyAllFilesToOneFolder /p:_PackageTempDir="..\artifacts";AutoParameterizationWebConfigConnectionStrings=false;Configuration=Release;SolutionDir="." copy "%ProgramW6432%\IIS\Microsoft Web Deploy V3\Microsoft.Web.Deployment.dll" artifacts\bin copy "%ProgramW6432%\IIS\Microsoft Web Deploy V3\Microsoft.Web.Deployment.Tracing.dll" artifacts\bin copy "%ProgramW6432%\IIS\Microsoft Web Deploy V3\Microsoft.Web.Delegation.dll" artifacts\bin nuget pack
nuget restore md artifacts\bin MSBuild.exe AzureSiteReplicator\AzureSiteReplicator.csproj /t:pipelinePreDeployCopyAllFilesToOneFolder /p:_PackageTempDir="..\artifacts";AutoParameterizationWebConfigConnectionStrings=false;Configuration=Release;SolutionDir="." copy "%ProgramW6432%\IIS\Microsoft Web Deploy V3\Microsoft.Web.Deployment.dll" artifacts\bin copy "%ProgramW6432%\IIS\Microsoft Web Deploy V3\Microsoft.Web.Deployment.Tracing.dll" artifacts\bin copy "%ProgramW6432%\IIS\Microsoft Web Deploy V3\Microsoft.Web.Delegation.dll" artifacts\bin nuget pack -NoPackageAnalysis
Add a script to automate HPC checking
mkdir .hpc ghc --make -isrc -i. src\Main.hs -w -fhpc -odir .hpc -hidir .hpc -threaded -o .hpc\hlint-test del hlint-test.tix .hpc\hlint-test --help .hpc\hlint-test --test .hpc\hlint-test src --report=.hpc\report.html +RTS -N2 hpc.exe markup hlint-test.tix --destdir=.hpc hpc.exe report hlint-test.tix del hlint-test.tix start .hpc\hpc_index_fun.html
Add very simple vagrant plugin install for the autonetwork
@ECHO OFF ECHO ----------------------------------------- ECHO Welcome to the microbit-vagrants control. ECHO ----------------------------------------- ECHO 1 - Espruino ECHO 2 - MicroPython ECHO 3 - RIOT-OS Environment ECHO 4 - PXT ECHO 5 - Exit SET /P C=Type the number you want from above then press enter: IF %C%==1 GOTO ESPRUINO IF %C%==2 GOTO MICROPYTHON IF %C%==3 GOTO RIOT IF %C%==4 GOTO PXT IF %C%==5 EXIT :ESPRUINO @ECHO ON cd Espruino vagrant up :MICROPYTHON @ECHO ON cd micropython vagrant up :RIOT @ECHO ON cd RIOT vagrant up :PXT @ECHO ON cd PXT vagrant up
@ECHO ON vagrant plugin install vagrant-auto_network @ECHO OFF ECHO ----------------------------------------- ECHO Welcome to the microbit-vagrants control. ECHO ----------------------------------------- ECHO 1 - Espruino ECHO 2 - MicroPython ECHO 3 - RIOT-OS Environment ECHO 4 - PXT ECHO 5 - Exit SET /P C=Type the number you want from above then press enter: IF %C%==1 GOTO ESPRUINO IF %C%==2 GOTO MICROPYTHON IF %C%==3 GOTO RIOT IF %C%==4 GOTO PXT IF %C%==5 EXIT :ESPRUINO @ECHO ON cd Espruino vagrant up :MICROPYTHON @ECHO ON cd micropython vagrant up :RIOT @ECHO ON cd RIOT vagrant up :PXT @ECHO ON cd PXT vagrant up
Fix error in Sundials bat script
@ECHO OFF REM $Id$ REM Bat script to build Sundials dependency automatically REM Author: Robert Braun robert.braun@liu.se setlocal set basedir=%~dp0 set name=sundials set codedir=%basedir%\%name%-code set builddir=%basedir%\%name%-build set installdir=%basedir%\%name% REM Setup paths call setHopsanBuildPaths.bat set PATH=%PATH_WITH_MSYS% REM Build mkdir %builddir% cd %builddir% sundials_cmake_args="-Wno-dev -DBUILD_STATIC_LIBS=OFF -DBUILD_ARKODE=OFF -DBUILD_IDAS=OFF -DBUILD_IDA=OFF -DBUILD_CVODE=OFF -DBUILD_CVODES=OFF -DBUILD_KINSOL=ON -DBUILD_EXAMPLES_C=OFF -DEXAMPLES_INSTALL=OFF -DCMAKE_INSTALL_LIBDIR=lib" REM Configure cmake ${sundials_cmake_args} -DCMAKE_INSTALL_PREFIX=${installdir} ${codedir} REM Build and install mingw32-make -j8 mingw32-make install REM Return to basedir cd %basedir%echo. echo setSundials.bat Done if "%HOPSAN_BUILD_SCRIPT_NOPAUSE%" == "" ( pause ) endlocal
@ECHO OFF REM $Id$ REM Bat script to build Sundials dependency automatically REM Author: Robert Braun robert.braun@liu.se setlocal set basedir=%~dp0 set name=sundials set codedir=%basedir%\%name%-code set builddir=%basedir%\%name%-build set installdir=%basedir%\%name% REM Setup paths call setHopsanBuildPaths.bat set PATH=%PATH_WITH_MSYS% REM build if exist %builddir% ( echo Removing existing build directory %builddir% rmdir /S /Q %builddir% ) mkdir %builddir% cd %builddir% set sundials_cmake_args="-Wno-dev -DBUILD_STATIC_LIBS=OFF -DBUILD_ARKODE=OFF -DBUILD_IDAS=OFF -DBUILD_IDA=OFF -DBUILD_CVODE=OFF -DBUILD_CVODES=OFF -DBUILD_KINSOL=ON -DBUILD_EXAMPLES_C=OFF -DEXAMPLES_INSTALL=OFF -DCMAKE_INSTALL_LIBDIR=lib" REM Configure cmake ${sundials_cmake_args} -DCMAKE_INSTALL_PREFIX=%installdir% %codedir% cmake --build . --parallel 8 cmake --build . --target install REM Return to basedir cd %basedir% echo. echo setSundials.bat Done if "%HOPSAN_BUILD_SCRIPT_NOPAUSE%" == "" ( pause ) endlocal
Debug build added for exp-env
rem Define VISUAL_STUDIO_PATH_DEVENV env. variable in your system, example: rem SET VISUAL_STUDIO_PATH_DEVENV=C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\devenv.exe "%VISUAL_STUDIO_PATH_DEVENV%" HeuristicSearchMax.sln /rebuild Debug rmdir /S /Q ExperimentEnv mkdir ExperimentEnv copy Grid\bin\Debug\*.exe ExperimentEnv copy Grid\bin\Debug\*.config ExperimentEnv copy Grid\bin\Debug\*.dll ExperimentEnv copy ExperimentRunner\bin\Debug\*.exe ExperimentEnv copy ExperimentRunner\bin\Debug\*.config ExperimentEnv copy ExperimentRunner\profile.txt ExperimentEnv copy LogUtils\ExperimentSummarizer\bin\Debug\*.exe ExperimentEnv copy LogUtils\DrawSolution\bin\Debug\*.exe ExperimentEnv copy FoldersExp.bat ExperimentEnv
Set svn:eol-style for new unix and windows shell scripts
@echo off rem Licensed to the Apache Software Foundation (ASF) under one or more rem contributor license agreements. See the NOTICE file distributed with rem this work for additional information regarding copyright ownership. rem The ASF licenses this file to You under the Apache License, Version 2.0 rem (the "License"); you may not use this file except in compliance with rem the License. You may obtain a copy of the License at rem rem http://www.apache.org/licenses/LICENSE-2.0 rem rem Unless required by applicable law or agreed to in writing, software rem distributed under the License is distributed on an "AS IS" BASIS, rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. rem See the License for the specific language governing permissions and rem limitations under the License. rem keytool -genkey -keyalg RSA -alias rmi -keystore rmi_keystore.jks -storepass changeit -validity 7 -keysize 2048 echo "Copy the generated rmi_keystore.jks to jmeter/bin folder or reference it in property 'server.rmi.ssl.keystore.file'"
@echo off rem Licensed to the Apache Software Foundation (ASF) under one or more rem contributor license agreements. See the NOTICE file distributed with rem this work for additional information regarding copyright ownership. rem The ASF licenses this file to You under the Apache License, Version 2.0 rem (the "License"); you may not use this file except in compliance with rem the License. You may obtain a copy of the License at rem rem http://www.apache.org/licenses/LICENSE-2.0 rem rem Unless required by applicable law or agreed to in writing, software rem distributed under the License is distributed on an "AS IS" BASIS, rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. rem See the License for the specific language governing permissions and rem limitations under the License. rem keytool -genkey -keyalg RSA -alias rmi -keystore rmi_keystore.jks -storepass changeit -validity 7 -keysize 2048 echo "Copy the generated rmi_keystore.jks to jmeter/bin folder or reference it in property 'server.rmi.ssl.keystore.file'"
Adjust local build script to use AnyCPU builds
@echo off REM initial cleanup rd .\build\Release /s /q rd .\build\Output /s /q mkdir .\build\Release mkdir .\build\Output build\nuget.exe restore REM build solution build\msbuild.bat . /p:Configuration=Release /p:Platform=x86 REM copy web overlays robocopy .\webOverlay .\build\Release\Files\Web /E pause
@echo off REM initial cleanup rd .\build\Release /s /q rd .\build\Output /s /q mkdir .\build\Release mkdir .\build\Output build\nuget.exe restore REM build solution build\msbuild.bat . /p:Configuration=Release /p:Platform="Any CPU" REM copy web overlays robocopy .\webOverlay .\build\Release\Files\Web /E pause
Move args to `make` and run tests.
:: Set $HOME to the current dir so msys runs here set HOME=%cd% :: Configure, build, test, and install using `nmake`. bash -lc "make" if errorlevel 1 exit 1 bash -lc "make DYNAMIC_ARCH=1 BINARY=$ARCH NO_LAPACK=0 NO_AFFINITY=1 USE_THREAD=1 PREFIX=$LIBRARY_PREFIX install" if errorlevel 1 exit 1
:: Set $HOME to the current dir so msys runs here set HOME=%cd% :: Configure, build, test, and install using `make`. bash -lc "make DYNAMIC_ARCH=1 BINARY=$ARCH NO_LAPACK=0 NO_AFFINITY=1 USE_THREAD=1 PREFIX=$LIBRARY_PREFIX" if errorlevel 1 exit 1 bash -lc "make test" if errorlevel 1 exit 1 bash -lc "make PREFIX=$LIBRARY_PREFIX install" if errorlevel 1 exit 1
Revert "Updated prebuild script to pass the Sonar project key"
@echo Running Sonar pre-build script... @set SonarRunnerProperties=%1 @set ProjectKey=%2 @set ConfigFolder=%3 @echo Sonar runner properties location: %SonarRunnerProperties% @echo Sonar project key: %ProjectKey% @echo Sonar config location: %ConfigFolder% @echo Creating the Sonar config folder... @rmdir %ConfigFolder% /S /Q @mkdir %ConfigFolder% @echo Dumping environment variables... (TODO - REMOVE) @~dp0\DumpEnvironmentVars.exe @echo Generating Sonar FxCop file... @%~dp0\Sonar.FxCopRuleset.exe "%SonarRunnerProperties%" "%ProjectKey%" "%ConfigFolder%\SonarAnalysis.ruleset" @echo ...done. @echo Sonar pre-build steps complete.
@echo Running Sonar pre-build script... @set SonarRunnerProperties=%1 @set ConfigFolder=%2 @echo Sonar runner properties location: %SonarRunnerProperties% @echo Sonar config location: %ConfigFolder% @echo Creating the Sonar config folder... @rmdir %ConfigFolder% /S /Q @mkdir %ConfigFolder% @echo Generating Sonar FxCop file... REM @%~dp0\Sonar.FxCopRuleset.exe %SonarRunnerProperties% "%ConfigFolder%\SonarAnalysis.ruleset" @echo ...done. @echo Copying a dummy ruleset for the time being... copy %~dp0\Example.ruleset %ConfigFolder%\SonarAnalysis.ruleset @echo Sonar pre-build steps complete.
Change Version number for release
@echo off setlocal if "%1" == "--help" ( echo Usage: rbenv --version echo. echo Displays the version number of this rbenv release, including the echo current revision from git, if available. echo. echo The format of the git revision is: echo ^<version^>-^<num_commits^>-^<git_sha^> echo where `num_commits` is the number of commits since `version` was echo tagged. echo. EXIT /B ) echo rbenv 0.0.2-03
@echo off setlocal if "%1" == "--help" ( echo Usage: rbenv --version echo. echo Displays the version number of this rbenv release, including the echo current revision from git, if available. echo. echo The format of the git revision is: echo ^<version^>-^<num_commits^>-^<git_sha^> echo where `num_commits` is the number of commits since `version` was echo tagged. echo. EXIT /B ) echo rbenv 0.0.3-04
Fix appveyor failing on a successful robocopy
Robocopy "./tools/googletest/googlemock" "./tools/protobuf/gmock" /E /MT:2 /R:0 /DCOPY:T Robocopy "./tools/googletest/googletest" "./tools/protobuf/gmock/gtest" /E /MT:2 /R:0 /DCOPY:T
Robocopy "./tools/googletest/googlemock" "./tools/protobuf/gmock" /E /MT:2 /R:0 /DCOPY:T Robocopy "./tools/googletest/googletest" "./tools/protobuf/gmock/gtest" /E /MT:2 /R:0 /DCOPY:T IF %ERRORLEVEL% LSS 8 goto end goto :eof :end exit 0
Update to new CI paths.
@echo off echo Executing tests with No Compression, No SSL && copy /y tests\SideBySide.New\config.json.example tests\SideBySide.New\config.json && dotnet test tests/SideBySide.New --configuration Release echo Executing tests with Compression, No SSL && copy /y .ci\config.compression.json tests\SideBySide.New\config.json && dotnet test tests/SideBySide.New --configuration Release echo Executing tests with No Compression, SSL && copy /y .ci\config.ssl.json tests\SideBySide.New\config.json && dotnet test tests/SideBySide.New --configuration Release echo Executing tests with Compression, SSL && copy /y ".ci\config.compression+ssl.json" tests\SideBySide.New\config.json && dotnet test tests/SideBySide.New --configuration Release
@echo off echo Executing tests with No Compression, No SSL && copy /y tests\SideBySide.New\config.json.example tests\SideBySide.New\config.json && dotnet test tests/SideBySide.New --configuration Release echo Executing tests with Compression, No SSL && copy /y .ci\config\config.compression.json tests\SideBySide.New\config.json && dotnet test tests/SideBySide.New --configuration Release echo Executing tests with No Compression, SSL && copy /y .ci\config\config.ssl.json tests\SideBySide.New\config.json && dotnet test tests/SideBySide.New --configuration Release echo Executing tests with Compression, SSL && copy /y ".ci\config\config.compression+ssl.json" tests\SideBySide.New\config.json && dotnet test tests/SideBySide.New --configuration Release
Correct syntax and control logic flow
@echo off set "VIRTUAL_ENV=__VIRTUAL_ENV__" if defined _OLD_VIRTUAL_PROMPT ( set "PROMPT=%_OLD_VIRTUAL_PROMPT%" ) else ( if not defined PROMPT ( set "PROMPT=$P$G" ) set "_OLD_VIRTUAL_PROMPT=%PROMPT%" ) set "PROMPT=__VIRTUAL_WINPROMPT__ %PROMPT%" REM Don't use () to avoid problems with them in %PATH% if not defined _OLD_VIRTUAL_PYTHONHOME set "_OLD_VIRTUAL_PYTHONHOME=%PYTHONHOME%" set PYTHONHOME= if defined _OLD_VIRTUAL_PATH set "PATH=%_OLD_VIRTUAL_PATH%" if not defined _OLD_VIRTUAL_PATH set "_OLD_VIRTUAL_PATH=%PATH%" set "PATH=%VIRTUAL_ENV%\__BIN_NAME__;%PATH%"
@echo off set "VIRTUAL_ENV=__VIRTUAL_ENV__" if defined _OLD_VIRTUAL_PROMPT ( set "PROMPT=%_OLD_VIRTUAL_PROMPT%" ) else ( if not defined PROMPT ( set "PROMPT=$P$G" ) set "_OLD_VIRTUAL_PROMPT=%PROMPT%" ) set "PROMPT=__VIRTUAL_WINPROMPT__ %PROMPT%" REM Don't use () to avoid problems with them in %PATH% if defined _OLD_VIRTUAL_PYTHONHOME goto ENDIFVHOME set "_OLD_VIRTUAL_PYTHONHOME=%PYTHONHOME%" :ENDIFVHOME set PYTHONHOME= REM if defined _OLD_VIRTUAL_PATH ( if not defined _OLD_VIRTUAL_PATH goto ENDIFVPATH1 set "PATH=%_OLD_VIRTUAL_PATH%" :ENDIFVPATH1 REM ) else ( if defined _OLD_VIRTUAL_PATH goto ENDIFVPATH2 set "_OLD_VIRTUAL_PATH=%PATH%" :ENDIFVPATH2 set "PATH=%VIRTUAL_ENV%\__BIN_NAME__;%PATH%"
Switch to 2.4 as the lowest supported version
REM REM Run tests for all available versions of Python between 2.3 & 3.3 REM @echo off for /l %%n in (23,1,33) do if exist c:\python%%n\python.exe (echo. & echo python%%n & c:\python%%n\python.exe -W ignore test_active_directory.py) pause
REM REM Run tests for all available versions of Python between 2.3 & 3.3 REM @echo off for /l %%n in (24,1,33) do if exist c:\python%%n\python.exe (echo. & echo python%%n & c:\python%%n\python.exe -W ignore test_active_directory.py) pause
Add touch tool that creates file if it does not exist
@echo off chcp 65001>nul prompt [%USERNAME%@%COMPUTERNAME% $p]$_$$$s rem Fake a UNIX environment doskey clear=cls doskey ls=dir /d $* doskey cp=copy $* doskey mv=move $* doskey rm=del $* doskey cat=type $* rem Easier navigation doskey cd=cd /D $* doskey cd..=cd .. doskey ..=cd .. doskey ...=cd ../.. doskey ....=cd ../../.. rem List files properly doskey l=dir /b $* doskey ll=dir /b $* rem Edit functionality IF NOT EXIST "C:\Program Files\Sublime Text 3" GOTO NOSUBLIME doskey edit="C:\Program Files\Sublime Text 3\sublime_text" $* :NOSUBLIME rem Open functionality doskey open=start $* @echo on
@echo off chcp 65001>nul prompt [%USERNAME%@%COMPUTERNAME% $p]$_$$$s rem Fake a UNIX environment doskey clear=cls doskey ls=dir /d $* doskey cp=copy $* doskey mv=move $* doskey rm=del $* doskey cat=type $* doskey touch=type nul>>$* rem Easier navigation doskey cd=cd /D $* doskey cd..=cd .. doskey ..=cd .. doskey ...=cd ../.. doskey ....=cd ../../.. rem List files properly doskey l=dir /b $* doskey ll=dir /b $* rem Edit functionality IF NOT EXIST "C:\Program Files\Sublime Text 3" GOTO NOSUBLIME doskey edit="C:\Program Files\Sublime Text 3\sublime_text" $* :NOSUBLIME rem Open functionality doskey open=start $* @echo on
Use xcopy to copy source files
REM Start copying files mkdir Src copy ..\..\Src\UI\Web\*.py Src\ copy ..\..\Src\UI\Web\*.bat Src\ xcopy /y /s /I ..\..\Src\UI\Web\data Src\data copy "..\..\Src\Bin Collector\*.py" Src\ copy "..\..\Src\Diff Inspector\*.py" Src\ copy "..\..\Src\Bin Collector\Bin\*.pyd" Src\ copy SetupDist.py Src\ copy ..\..\Src\UI\Web\DarunGrim3Sample01.cfg Src\DarunGrim3.cfg
REM Start copying files mkdir Src xcopy /D /S /I /Y ..\..\Src\UI\Web\*.py Src\ xcopy /D /S /I /Y ..\..\Src\UI\Web\*.bat Src\ xcopy /D /S /I /Y ..\..\Src\UI\Web\data Src\data xcopy /D /S /I /Y "..\..\Src\Bin Collector\*.py" Src\ xcopy /D /S /I /Y "..\..\Src\Diff Inspector\*.py" Src\ xcopy /D /S /I /Y "..\..\Src\Bin Collector\Bin\*.pyd" Src\ xcopy /D /S /I /Y SetupDist.py Src\ xcopy /D /S /I /Y ..\..\Src\UI\Web\DarunGrim3Sample01.cfg Src\DarunGrim3.cfg
Add UC11 happy path Windows script
@echo off rem Download Data. Select variables, region and time right away to save bandwith cate ds copy esacci.SST.day.L4.SSTdepth.multi-sensor.multi-platform.OSTIA.1-1.r1 --name "SST_polar_2007" --time 2007-01-01,2007-01-15 --vars "analysed_sst, sea_ice_fraction" --region "-180, 60, 180, 90" cate ds copy esacci.CLOUD.mon.L3C.CLD_PRODUCTS.AVHRR.multi-platform.AVHRR-AM.2-0.r1 --name "CLOUDS_polar_2007" --time 2007-01-01,2007-01-31 --vars "cfc, cee" --region "-180, 60, 180, 90" cate ds copy esacci.AEROSOL.mon.L3.AAI.multi-sensor.multi-platform.ms_uvai.1-5-7.r1 --name "AEROSOL_polar_2007" --time 2007-01-01,2007-03-31 --region "-180, 60, 180, 90" rmdir /S /Q uc11 mkdir uc11 cd uc11 rem Start interactive session by initialising an empty workspace rem This will write a hidden directory .\.cate-workspace cate ws init rem Open the datasets cate res open sst local.SST_polar_2007 cate res open clouds local.CLOUDS_polar_2007 cate res open aerosol local.AEROSOL_polar_2007 rem Create scalable map plots of the datasets cate res set plot1 plot_map ds=@sst var="sea_ice_fraction" region='-180,60,180,90' projection='NorthPolarStereo' contour_plot=True file='sst_polar.svg' cate res set plot2 plot_map ds=@clouds var='cfc' region='-180,60,180,90' projection='NorthPolarStereo' file='clouds_polar.svg' cate res set plot3 plot_map ds=@aerosol region='-180,60,180,90' var='absorbing_aerosol_index' projection='NorthPolarStereo' file='aerosol_polar.svg' rem Save the workspace cate ws save rem Close the workspace cate ws close rem Exit interactive session. Don't ask, answer is always "yes". cate ws exit --yes cd ..
Call generated single-file source-code program and custom runtime image
@echo off cls jshell --show-version ^ --enable-preview ^ -R-ea ^ -R-Djava.util.logging.config.file=src/logging.properties ^ -R-Debug ^ build.jsh
@echo off cls jshell --show-version ^ --enable-preview ^ -R-ea ^ -R-Djava.util.logging.config.file=src/logging.properties ^ -R-Debug ^ build.jsh java .bach/src/Bach.java help .bach/workspace/image/bin/bach version
Add a rununittests script for Windows CE
set DEPOT="%CD%" IF NOT EXIST mobility.pro GOTO NOSOURCE set CETESTCOMMAND=cetest -cache %QTDIR%\.qmake.cache -libpath \Windows IF NOT EXIST %DEPOT%\..\..\qa-dungeon\mainline\tests\wince\deploy\ GOTO SKIPDEPLOY cd %DEPOT%\..\..\qa-dungeon\mainline\tests\wince\deploy\ call %CETESTCOMMAND% :SKIPDEPLOY cd %DEPOT%\tests\auto\qcontact call %CETESTCOMMAND% cd %DEPOT%\tests\auto\qcontactactions\unittest call %CETESTCOMMAND% cd %DEPOT%\tests\auto\qcontactasync\unittest call %CETESTCOMMAND% cd %DEPOT%\tests\auto\qcontactdetail call %CETESTCOMMAND% cd %DEPOT%\tests\auto\qcontactdetaildefinition call %CETESTCOMMAND% cd %DEPOT%\tests\auto\qcontactdetails call %CETESTCOMMAND% cd %DEPOT%\tests\auto\qcontactfilter call %CETESTCOMMAND% cd %DEPOT%\testsauto\qcontactgroup call %CETESTCOMMAND% cd %DEPOT%\tests\auto\qcontactmanager call %CETESTCOMMAND% cd %DEPOT%\tests\auto\qcontactmanagerfiltering call %CETESTCOMMAND% cd %DEPOT%\tests\auto\qcontactmanagerplugins\unittest call %CETESTCOMMAND% GOTO EOF :NOSOURCE echo "Unable to find mobility.pro check current directory is QtContacts source" GOTO EOF :EOF cd %DEPOT%
Revert "Minor change in batch script for finding directory"
@ECHO on SETLOCAL FOR /f %%i IN ( 'dir /ad /b "C:\" |findstr /I "mongo"' ) DO CALL :movedir %%i :movedir SET "dest=%1" ECHO MOVE "C:\"%1 "C:\mongodb\" setx MYPATH "%PATH%;C:\mongodb\bin"
ECHO on FOR /f %%i IN ( 'dir /ad /b "C:\" ^|findstr /I "mongo"' ) DO CALL :movedir %%i :movedir SET "dest=%1" ECHO MOVE "C:\"%1 "C:\mongodb\" setx MYPATH "%PATH%;C:\mongodb\bin"
Align it with the sh script....
@echo off echo user=monetdb> .monetdb echo password=monetdb>> .monetdb set LANG=en_US.UTF-8 prompt # $t $g echo on call mjclient -h %HOST% -p %MAPIPORT% -d %TSTDB% -f "%RELSRCDIR%\local_temp_table_data.SF-1865953.sql" call mjclient -h %HOST% -p %MAPIPORT% -d %TSTDB% " @del .monetdb
@echo off echo user=monetdb> .monetdb echo password=monetdb>> .monetdb set LANG=en_US.UTF-8 prompt # $t $g echo on call mclient -lsql -h %HOST% -p %MAPIPORT% -d %TSTDB% "%RELSRCDIR%\local_temp_table_data.SF-1865953.sql" call mclient -lsql -h %HOST% -p %MAPIPORT% -d %TSTDB% " @del .monetdb
Update header for New Member
### application.bat - 2015 - Merel ### echo "Copyright Benoit MEREL - 2015" version = "2" build_hour = "11H00" echo "Build ${build_hour}" echo "version ${version}"
### application.bat - 2015 - Guillet ### echo "Copyright Thomas Guillet - 2015" version = "2" build_hour = "11H00" echo "Build ${build_hour}" echo "version ${version}"
Set value for a reference given a variable
@ECHO OFF :USAGE :START :INITIALIZE SETLOCAL ENABLEDELAYEDEXPANSION SET BASE_DIR=%~DP0 SET IN_VAR_NAME=%1 SET IN_VALUE=%2 :CODE SET GLOBALS_FILE=%BASE_DIR%\globals.txt SET REFERENCE=!%IN_VAR_NAME%! CALL SET-GLOBAL %GLOBALS_FILE% %REFERENCE% %IN_VALUE% :RETURN ENDLOCAL :EOF
Append to JRUBY_OPTS instead of overriding it
@ECHO OFF set TOOLS_BIN=%~dp0 set JRUBY_BASE=%~dp0\..\jruby-1.7.11 set GEM_HOME= set GEM_PATH= set PATH=%TOOLS_BIN%\;%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 TOOLS_BIN=%~dp0 set JRUBY_BASE=%~dp0\..\jruby-1.7.11 set GEM_HOME= set GEM_PATH= set PATH=%TOOLS_BIN%\;%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 %*
Copy required files to source directory
mkdir %LIBRARY_INC%\cspice copy "makeDynamicSpice.bat" %SRC_DIR%\src\cspice cd %SRC_DIR%\src\cspice call makeDynamicSpice.bat copy "cspice.dll" %LIBRARY_LIB% if errorlevel 1 exit 1 cd %SRC_DIR% copy "include\\*.h" %LIBRARY_INC%\cspice if errorlevel 1 exit 1
mkdir %LIBRARY_INC%\cspice copy "%RECIPE_DIR%\\makeDynamicSpice.bat" %SRC_DIR%\src\cspice copy "%RECIPE_DIR%\\cspice.def" %SRC_DIR%\src\cspice cd %SRC_DIR%\src\cspice call makeDynamicSpice.bat copy "cspice.dll" %LIBRARY_LIB% if errorlevel 1 exit 1 cd %SRC_DIR% copy "include\\*.h" %LIBRARY_INC%\cspice if errorlevel 1 exit 1
Modify build script to pass in the source of the CI nuget packages
@echo off echo This script is meant for the Couchbase build server. It cannot be used by developers. pushd %~dp0..\Couchbase.Lite if not exist ..\couchbase.snk ( echo Private key not found, aborting... popd exit /b 1 ) "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\MSBuild.exe" Couchbase.Lite.csproj /t:Transform /p:TransformFile="Properties\DynamicAssemblyInfo.tt" dotnet restore dotnet build -c Packaging pushd ..\Couchbase.Lite.Support.UWP if not exist ..\..\nuget.exe ( powershell -Command "Invoke-WebRequest https://dist.nuget.org/win-x86-commandline/latest/nuget.exe -OutFile ..\..\nuget.exe" ) ..\..\nuget.exe restore "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\MSBuild.exe" Couchbase.Lite.Support.UWP.csproj /p:Configuration=Packaging popd popd
@echo off echo This script is meant for the Couchbase build server. It cannot be used by developers. pushd %~dp0..\Couchbase.Lite if not exist ..\couchbase.snk ( echo Private key not found, aborting... popd exit /b 1 ) if not defined NUGET_REPO ( echo NUGET_REPO not defined, aborting... popd exit /b 1 ) "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\MSBuild.exe" Couchbase.Lite.csproj /t:Transform /p:TransformFile="Properties\DynamicAssemblyInfo.tt" dotnet restore -s %NUGET_REPO% dotnet build -c Packaging pushd ..\Couchbase.Lite.Support.UWP if not exist ..\..\nuget.exe ( powershell -Command "Invoke-WebRequest https://dist.nuget.org/win-x86-commandline/latest/nuget.exe -OutFile ..\..\nuget.exe" ) ..\..\nuget.exe restore -Source %NUGET_REPO% "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\MSBuild.exe" Couchbase.Lite.Support.UWP.csproj /p:Configuration=Packaging popd popd
Make sure to correctly quote/unquote Windows paths in the installer
@echo off rem $Id$ ::remove any quotes from JAVA_HOME and EXIST_HOME env var, will be re-added below for /f "delims=" %%G IN (%JAVA_HOME%) DO SET JAVA_HOME=%%G for /f "delims=" %%G IN (%EXIST_HOME%) DO SET EXIST_HOME=%%G rem will be set by the installer set EXIST_HOME=$INSTALL_PATH rem will be set by the installer set JAVA_HOME=$JAVA_HOME :gotJavaHome set JAVA_CMD="%JAVA_HOME%\bin\java" set JAVA_OPTS="-Xms64m -Xmx768m" rem make sure there's the jetty tmp directory mkdir "%EXIST_HOME%\tools\jetty\tmp" rem echo "JAVA_HOME: %JAVA_HOME%" rem echo "EXIST_HOME: %EXIST_HOME%" echo %JAVA_OPTS% %JAVA_CMD% "%JAVA_OPTS%" -Dexist.home="%EXIST_HOME%" -Duse.autodeploy.feature=false -jar "%EXIST_HOME%\start.jar" org.exist.installer.Setup %1 %2 %3 %4 %5 %6 %7 %8 %9 :eof
@echo off ::will be set by the installer set JAVA_HOME="$JAVA_HOME" set EXIST_HOME="$INSTALL_PATH" ::remove any quotes from JAVA_HOME and EXIST_HOME env var, will be re-added below for /f "delims=" %%G IN (%JAVA_HOME%) DO SET JAVA_HOME=%%G for /f "delims=" %%G IN (%EXIST_HOME%) DO SET EXIST_HOME=%%G :gotJavaHome set JAVA_CMD="%JAVA_HOME%\bin\java" set JAVA_OPTS="-Xms64m -Xmx768m" ::make sure there's the jetty tmp directory mkdir "%EXIST_HOME%\tools\jetty\tmp" echo "JAVA_HOME: [%JAVA_HOME%]" echo "EXIST_HOME: [%EXIST_HOME%]" echo "EXIST_OPTS: [%JAVA_OPTS%]" echo: echo: %JAVA_CMD% "%JAVA_OPTS%" -Dexist.home="%EXIST_HOME%" -Duse.autodeploy.feature=false -jar "%EXIST_HOME%\start.jar" org.exist.installer.Setup %1 %2 %3 %4 %5 %6 %7 %8 %9 :eof
Fix creation of help map file for Robohelp - different location for MFC and BCG .hm file - changes needed to handle spaces in file name - output to HexEditMap.h (not .hm)
echo Creating map files copy /y helpid.hm+resource.hm+hlp\HexEdit.hm+I:\Micros~1\vc98\mfc\include\afxhelp.hm+D:\bcg590\BCGControlBar\help\BCGControlBar.hm HexeditMap.tmp sed "s/^HID/#define HID/" <HexeditMap.tmp >HexeditMap2.tmp del HexeditMap.tmp sed "s/^AFX_HID/#define AFX_HID/" <HexeditMap2.tmp >HTMLHelp\HexeditMap.hm del HexeditMap2.tmp
echo Creating map files REM Get MFC help IDs rem copy /y I:\Micros~1\vc98\mfc\include\afxhelp.hm afxhelp.tmp copy /y "C:\Program Files\Microsoft Visual Studio .NET\Vc7\atlmfc\include\afxhelp.hm" afxhelp.tmp REM Get BCG help IDs rem copy /y D:\bcg590\BCGControlBar\help\BCGControlBar.hm bcghelp.tmp copy /y "I:\Devel\BCG6_2\BCGControlBar\Help\BCGControlBar.hm" .\bcghelp.tmp REM Copy all help IDs into one file copy /y helpid.hm+resource.hm+hlp\HexEdit.hm+afxhelp.tmp+bcghelp.tmp HexeditMap.tmp rem del afxhelp.tmp rem del bcghelp.tmp REM Make sure they all start with #define which is what RoboHelp expects sed "s/^HID/#define HID/" <HexeditMap.tmp >HexeditMap2.tmp rem del HexeditMap.tmp sed "s/^AFX_HID/#define AFX_HID/" <HexeditMap2.tmp >HTMLHelp\HexeditMap.h rem del HexeditMap2.tmp
Remove previous win executable before build
:: Helper script to build Spectrecoin on Windows using VS2017 and QT. IF "%QTDIR%" == "" GOTO NOQT :YESQT set CALL_DIR=%cd% set SRC_DIR=%cd%\src set DIST_DIR=%SRC_DIR%\dist set BUILD_DIR=%SRC_DIR%\build set OUT_DIR=%SRC_DIR%\bin call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars64.bat" cd cd %SRC_DIR% dir echo on rmdir /S /Q "%DIST_DIR%" mkdir "%DIST_DIR%" mkdir "%BUILD_DIR%" mkdir "%OUT_DIR%" pushd "%BUILD_DIR%" %QTDIR%\bin\qmake.exe ^ -spec win32-msvc ^ "CONFIG += release" ^ "%SRC_DIR%\src.pro" nmake popd %QTDIR%\bin\windeployqt "%OUT_DIR%\Spectrecoin.exe" ::ren "%OUT_DIR%" Spectrecoin ::echo "The prepared package is in: %SRC_DIR%\Spectrecoin" echo "Everything is OK" GOTO END :NOQT @ECHO The QTDIR environment variable was NOT detected! :END cd %CALL_DIR%
:: Helper script to build Spectrecoin on Windows using VS2017 and QT. IF "%QTDIR%" == "" GOTO NOQT :YESQT set CALL_DIR=%cd% set SRC_DIR=%cd%\src set DIST_DIR=%SRC_DIR%\dist set BUILD_DIR=%SRC_DIR%\build set OUT_DIR=%SRC_DIR%\bin call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars64.bat" cd cd %SRC_DIR% dir echo on del "%OUT_DIR%\Spectrecoin.exe" 2>nul rmdir /S /Q "%DIST_DIR%" mkdir "%DIST_DIR%" mkdir "%BUILD_DIR%" mkdir "%OUT_DIR%" pushd "%BUILD_DIR%" %QTDIR%\bin\qmake.exe ^ -spec win32-msvc ^ "CONFIG += release" ^ "%SRC_DIR%\src.pro" nmake popd %QTDIR%\bin\windeployqt "%OUT_DIR%\Spectrecoin.exe" ::ren "%OUT_DIR%" Spectrecoin ::echo "The prepared package is in: %SRC_DIR%\Spectrecoin" echo "Everything is OK" GOTO END :NOQT @ECHO The QTDIR environment variable was NOT detected! :END cd %CALL_DIR%
Load Applications list into a Folder for viewing
REM Load all Windows Apps / Programs in a folder to view icons %windir%\explorer.exe shell:::{4234d49b-0245-4df3-b780-3893943456e1}
Add zip file unpacking to FMILibrary windows setup script
@ECHO OFF REM $Id$ REM Bat script building FMILibrary dependency automatically REM Author: Peter Nordin peter.nordin@liu.se set basedir=%~dp0 set name=FMILibrary set codedir=%basedir%\%name%_code set builddir=%basedir%\%name%_build set installdir=%basedir%\%name% set OLDPATH=%PATH% call setHopsanBuildPaths.bat REM We don want msys in the path so we have to set it manually set PATH=%mingw_path%;%cmake_path%;%OLDPATH% REM build mkdir %builddir% cd %builddir% cmake -Wno-dev -G "MinGW Makefiles" -DFMILIB_FMI_PLATFORM="win64" -DFMILIB_INSTALL_PREFIX=%installdir% %codedir% mingw32-make.exe -j4 mingw32-make.exe install cd %basedir% echo. echo setupFMILibrary.bat done pause
@ECHO OFF REM $Id$ REM Bat script building FMILibrary dependency automatically REM Author: Peter Nordin peter.nordin@liu.se set basedir=%~dp0 set name=FMILibrary set zipdir=%name%-2.0.2 set zipfile=tools\%zipdir%-src.zip set codedir=%basedir%\%name%_code set builddir=%basedir%\%name%_build set installdir=%basedir%\%name% REM Unpack echo. echo Clearing old directory (if it exists) if exist %codedir% rd /s/q %codedir% echo Unpacking %zipfile% tools\7z\7za.exe x %zipfile% -y > nul move %zipdir% %codedir% set OLDPATH=%PATH% call setHopsanBuildPaths.bat REM We don want msys in the path so we have to set it manually set PATH=%mingw_path%;%cmake_path%;%OLDPATH% REM build mkdir %builddir% cd %builddir% cmake -Wno-dev -G "MinGW Makefiles" -DFMILIB_FMI_PLATFORM="win64" -DFMILIB_INSTALL_PREFIX=%installdir% %codedir% mingw32-make.exe -j4 mingw32-make.exe install cd %basedir% echo. echo setupFMILibrary.bat done pause
Add BAT file for recording of binary trace
echo off pushd "%~dp0" logman stop usbdkm -ets >nul 2>&1 logman delete usbdkm -ets >nul 2>&1 logman create trace usbdkm -o usbdk.etl -ow -ets logman update usbdkm -p {88e1661f-48b6-410f-b096-ba84e9f0656f} 0x7fffffff 6 -ets echo Recording started. echo Reproduce the problem, then press ENTER pause > nul logman stop usbdkm -ets dir usbdk.etl echo Please collect usbdk.etl file now pause popd
Write empty build.info on local run
@echo off pushd %~dp0 set DEPLOYMENT=deploy set NUGET=packages echo > build.info call deploy.cmd call run_tests.cmd %* popd
@echo off pushd %~dp0 set DEPLOYMENT=deploy set NUGET=packages echo. 2> build.info call deploy.cmd call run_tests.cmd %* popd
Use Fake.BuildLib 0.1.5 in Build.cmd
@echo off pushd %~dp0 SET PACKAGEPATH=.\packages\ SET NUGET=.\tools\nuget\NuGet.exe SET NUGETOPTIONS=-ConfigFile .\tools\nuget\NuGet.Config -OutputDirectory %PACKAGEPATH% -ExcludeVersion IF NOT EXIST %PACKAGEPATH%FAKE\Ver_4.23.0 ( %NUGET% install FAKE -Version 4.23.0 %NUGETOPTIONS% COPY NUL %PACKAGEPATH%FAKE\Ver_4.23.0 ) IF NOT EXIST %PACKAGEPATH%FAKE.BuildLib\Ver_0.1.4 ( %NUGET% install FAKE.BuildLib -Version 0.1.4 %NUGETOPTIONS% COPY NUL %PACKAGEPATH%FAKE.BuildLib\Ver_0.1.4 ) set encoding=utf-8 "%PACKAGEPATH%FAKE\tools\FAKE.exe" build.fsx %* popd
@echo off pushd %~dp0 SET PACKAGEPATH=.\packages\ SET NUGET=.\tools\nuget\NuGet.exe SET NUGETOPTIONS=-ConfigFile .\tools\nuget\NuGet.Config -OutputDirectory %PACKAGEPATH% -ExcludeVersion IF NOT EXIST %PACKAGEPATH%FAKE\Ver_4.23.0 ( %NUGET% install FAKE -Version 4.23.0 %NUGETOPTIONS% COPY NUL %PACKAGEPATH%FAKE\Ver_4.23.0 ) IF NOT EXIST %PACKAGEPATH%FAKE.BuildLib\Ver_0.1.5 ( %NUGET% install FAKE.BuildLib -Version 0.1.5 %NUGETOPTIONS% COPY NUL %PACKAGEPATH%FAKE.BuildLib\Ver_0.1.5 ) set encoding=utf-8 "%PACKAGEPATH%FAKE\tools\FAKE.exe" build.fsx %* popd
Fix packup script to work with git repo
"c:\Program Files\7-Zip\7z" a -tzip ..\folderAccountBeta.xpi * -x!PackUp.bat
"c:\Program Files\7-Zip\7z" a -tzip ..\folderAccountBeta.xpi * -x!PackUp.bat -x!.git
Update bat file for starting system
@echo off cd C:\Users\dzony\Documents\projects\system\env\system\Scripts start cmd /k "activate && cd C:\Users\dzony\Documents\projects\system\server__client\ && python start_server.py" sleep 0.1 start cmd /k "activate && cd C:\Users\dzony\Documents\projects\system\backend\ && python start.py"
@echo off cd C:\Users\dzony\Documents\projects\system\env\system\Scripts start cmd /k "activate && cd C:\Users\dzony\Documents\projects\system\server__client\ && python start.py" sleep 0.1 start cmd /k "activate && cd C:\Users\dzony\Documents\projects\system\backend\ && python start.py"
Add .bat script for Deathstar_Win7VM.
REM Start from a clean build directory rmdir /Q /S C:\Dashboards\TubeTK\TubeTK-Release REM Update the TubeTK Dashboard scripts cd C:\Dashboards\TubeTK\TubeTK-DashboardScripts REM "C:\Program Files (x86)\Git\bin\git" reset --hard HEAD "C:\Program Files (x86)\Git\bin\git" pull cd .. REM Run the nightly CTest "C:\Program Files (x86)\CMake 2.8\bin\ctest.exe" -S "C:\Dashboards\TubeTK\TubeTK-DashboardScripts\Deathstar_Win7VM_Kitware_TubeTK.cmake" -O "C:\Dashboards\TubeTK\TubeTK_CDashClient_Nightly_log.txt"
Add deprecation warnign and fix a command
@echo off setlocal set mypath=%~dp0 set PATH=%PATH%;%mypath%\python2.7 set PYTHONPATH=%mypath%\lib set OQ_SITE_CFG_PATH=%mypath% doskey oq=python.exe -m openquake.commands.__main__ $* doskey oq-engine=python.exe -m openquake.commonlib.commands engine $* echo OpenQuake environment loaded cmd /k endlocal
@echo off setlocal set mypath=%~dp0 set PATH=%PATH%;%mypath%\python2.7 set PYTHONPATH=%mypath%\lib set OQ_SITE_CFG_PATH=%mypath% doskey oq=python.exe -m openquake.commands.__main__ $* doskey oq-engine=python.exe -m openquake.commands.__main__ engine $* echo OpenQuake environment loaded echo The command 'oq-engine' is deprecated and will be removed. Please use 'oq engine' instead cmd /k endlocal
Fix initialization home directory in Windows batch file.
@echo off set PTOOLSPATH="%~dp0\" php %PTOOLSPATH%phalcon.php %*
@echo off set PTOOLSPATH=%~dp0 php %PTOOLSPATH%phalcon.php %*
Update Chrome 7z bat file.
"C:\Program Files\7-Zip\7z.exe" u -uq0 -mx9 psdle.zip ./psdle/* -r -x!*.db -x!*.ini
"C:\Program Files\7-Zip\7z.exe" u -uq0 -mx9 psdle.zip -mtc- ./psdle/* -r -x!*.db -x!*.ini
Fix for tests running script was added
dotnet test "test\Infrastructure\Skeleton.Common.Tests" -c %1 dotnet test "test\Infrastructure\Skeleton.CQRS.Implementations.Tests" -c %1 dotnet test "test\Infrastructure\Skeleton.Dapper.Tests" -c %1 cd "test\Web.Tests" dotnet test -c %1
dotnet test "test\Infrastructure\Skeleton.Common.Tests" -c %1 dotnet test "test\Infrastructure\Skeleton.CQRS.Implementations.Tests" -c %1 dotnet test "test\Infrastructure\Skeleton.Dapper.Tests" -c %1 cd "test\Web.Tests" dotnet test -c %1 cd "..\.."
Simplify virtualenv installation on Windows
@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: mkvirtualenv seleniumbase --python=[PATH_TO_PYTHON] 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 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: mkvirtualenv seleniumbase --python=[PATH_TO_PYTHON] echo:
Update uploaded artifact on appveyor to include the scripts dir
@call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\Tools\VsDevCmd.bat" SET PATH=%PROJECT_PATH%\3rdparty\bin;%MYSQL_CONNECTOR_PATH%\lib;%MYSQL_PATH%\bin;%PYTHON_PATH%\Scripts;%PATH% cp "%MYSQL_CONNECTOR_PATH%\lib\libmysql.dll" "%PROJECT_PATH%\build\bin\%CONFIGURATION% cp "%MYSQL_CONNECTOR_PATH%\lib\libmysql.dll" "%PROJECT_PATH%\build\bin\ cmake -GNinja -D%CONFIGURATION%=TRUE -DCMAKE_BUILD_TYPE=%CONFIGURATION% .. cmake --build . --config %CONFIGURATION%
@call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\Tools\VsDevCmd.bat" SET PATH=%PROJECT_PATH%\3rdparty\bin;%MYSQL_CONNECTOR_PATH%\lib;%MYSQL_PATH%\bin;%PYTHON_PATH%\Scripts;%PATH% REM cp "%MYSQL_CONNECTOR_PATH%\lib\libmysql.dll" "%PROJECT_PATH%\build\bin\%CONFIGURATION% cp "%MYSQL_CONNECTOR_PATH%\lib\libmysql.dll" "%PROJECT_PATH%\build\bin\" %PROJECT_PATH%\cmake\scripts\robocopy.bat "%PROJECT_PATH%\scripts" "%PROJECT_PATH%\build\bin\scripts" "*.lua" cmake -GNinja -D%CONFIGURATION%=TRUE -DCMAKE_BUILD_TYPE=%CONFIGURATION% .. cmake --build . --config %CONFIGURATION%
Use xcopy rather than copy
@echo off pushd "%~dp0" if exist cs (goto okcs) else (echo "No cs folder found." && goto exit) :okcs if exist vb (goto okvb) else (echo "No vb folder found." && goto exit) :okvb if [%1]==[] ( echo Please specify Visual Studio version, e.g., 2017 goto exit ) else ( echo Using version %1 set "D=%userprofile%\Documents\Visual Studio %1\Templates\ProjectTemplates" ) set "F=%TEMP%\Revit2020AddinWizardCs0.zip" echo Creating C# wizard archive %F%... cd cs ..\zip\zip.exe -r "%F%" * cd .. echo Copying C# wizard archive to %D%\Visual C#... copy "%F%" "%D%\Visual C#" set "F=%TEMP%\Revit2020AddinWizardVb0.zip" echo Creating VB wizard archive %F%... cd vb ..\zip\zip.exe -r "%F%" * cd .. echo Copying VB wizard archive to %D%\Visual Basic... copy "%F%" "%D%\Visual Basic" :exit
@echo off pushd "%~dp0" if exist cs (goto okcs) else (echo "No cs folder found." && goto exit) :okcs if exist vb (goto okvb) else (echo "No vb folder found." && goto exit) :okvb if [%1]==[] ( echo Please specify Visual Studio version, e.g., 2017 goto exit ) else ( echo Using version %1 set "D=%userprofile%\Documents\Visual Studio %1\Templates\ProjectTemplates" ) set "F=%TEMP%\Revit2020AddinWizardCs0.zip" echo Creating C# wizard archive %F%... cd cs ..\zip\zip.exe -r "%F%" * cd .. echo Copying C# wizard archive to %D%\Visual C#... xcopy "%F%" "%D%\Visual C#\" set "F=%TEMP%\Revit2020AddinWizardVb0.zip" echo Creating VB wizard archive %F%... cd vb ..\zip\zip.exe -r "%F%" * cd .. echo Copying VB wizard archive to %D%\Visual Basic... xcopy "%F%" "%D%\Visual Basic\" :exit
Add script for disabling grepWin context menu
@echo off setlocal EnableDelayedExpansion set registryRoot=HKCU\Software\Classes reg add "%registryRoot%\*\shell\grepWin..." /v LegacyDisable /t REG_SZ /f reg add "%registryRoot%\*\shell\grepWin..." /v LegacyDisable /t REG_SZ /f reg add "%registryRoot%\Directory\background\shell\grepWin..." /v LegacyDisable /t REG_SZ /f reg add "%registryRoot%\Directory\shell\grepWin..." /v LegacyDisable /t REG_SZ /f reg add "%registryRoot%\Drive\shell\grepWin..." /v LegacyDisable /t REG_SZ /f reg add "%registryRoot%\Folder\shell\grepWin..." /v LegacyDisable /t REG_SZ /f
Use correct path for vstest.console.exe
@echo off call "..\VsDevCmd.cmd" set platform="%1" if "%1" == "AnyCPU" ( set platform="x86" ) set vstest="%VSINSTALLDIR%Common7\IDE\CommonExtensions\Microsoft\TestWindow\vstest.console.exe" for /r ..\..\Tests\Magick.NET.Tests\bin %%a in (*.dll) do ( if "%%~nxa"=="Magick.NET.Tests.dll" ( echo "Running tests from: %%~dpnxa" %vstest% %%~dpnxa /inIsolation /platform:%platform% /TestAdapterPath:%%~dpa /logger:AppVeyor if %errorlevel% neq 0 exit /b %errorlevel% ) )
@echo off call "..\VsDevCmd.cmd" set platform="%1" if "%1" == "AnyCPU" ( set platform="x86" ) set vstest="%VSINSTALLDIR%\Common7\IDE\Extensions\TestPlatform\vstest.console.exe" for /r ..\..\Tests\Magick.NET.Tests\bin %%a in (*.dll) do ( if "%%~nxa"=="Magick.NET.Tests.dll" ( echo "Running tests from: %%~dpnxa" %vstest% %%~dpnxa /inIsolation /platform:%platform% /TestAdapterPath:%%~dpa /logger:AppVeyor if %errorlevel% neq 0 exit /b %errorlevel% ) )
Remove unecessary @ in bat file
@if defined ELIXIR_CLI_ECHO (@echo on) else (@echo off) setlocal if /I ""%1""==""--help"" goto documentation if /I ""%1""==""-h"" goto documentation if /I ""%1""==""/h"" goto documentation if ""%1""==""/?"" goto documentation goto run :documentation echo Usage: %~nx0 [options] [.exs file] [data] echo. echo The following options are exclusive to IEx: echo. echo --dot-iex "PATH" Overrides default .iex.exs file and uses path instead; echo path can be empty, then no file will be loaded echo --remsh NAME Connects to a node using a remote shell echo --werl Uses Erlang's Windows shell GUI (Windows only) echo. echo Set the IEX_WITH_WERL environment variable to always use werl. echo It accepts all other options listed by "elixir --help". goto end :run if defined IEX_WITH_WERL (@set __ELIXIR_IEX_FLAGS=--werl) else (set __ELIXIR_IEX_FLAGS=) call "%~dp0\elixir.bat" --no-halt --erl "-noshell -user Elixir.IEx.CLI" +iex %__ELIXIR_IEX_FLAGS% %* :end endlocal
@if defined ELIXIR_CLI_ECHO (@echo on) else (@echo off) setlocal if /I ""%1""==""--help"" goto documentation if /I ""%1""==""-h"" goto documentation if /I ""%1""==""/h"" goto documentation if ""%1""==""/?"" goto documentation goto run :documentation echo Usage: %~nx0 [options] [.exs file] [data] echo. echo The following options are exclusive to IEx: echo. echo --dot-iex "PATH" Overrides default .iex.exs file and uses path instead; echo path can be empty, then no file will be loaded echo --remsh NAME Connects to a node using a remote shell echo --werl Uses Erlang's Windows shell GUI (Windows only) echo. echo Set the IEX_WITH_WERL environment variable to always use werl. echo It accepts all other options listed by "elixir --help". goto end :run if defined IEX_WITH_WERL (set __ELIXIR_IEX_FLAGS=--werl) else (set __ELIXIR_IEX_FLAGS=) call "%~dp0\elixir.bat" --no-halt --erl "-noshell -user Elixir.IEx.CLI" +iex %__ELIXIR_IEX_FLAGS% %* :end endlocal
Use CALL for BETA3 as it may be a .cmd file, which would terminate this script
@ECHO OFF ECHO + Checking shellcode for NULL bytes: ECHO + w32-dl-loadlib-shellcode.bin BETA3 h --nullfree w32-dl-loadlib-shellcode.bin > nul IF ERRORLEVEL 1 GOTO :FAILED ECHO + w32-dl-loadlib-shellcode-esp.bin BETA3 h --nullfree w32-dl-loadlib-shellcode-esp.bin > nul IF ERRORLEVEL 1 GOTO :FAILED ECHO + Running shellcode: ECHO + w32-dl-loadlib-shellcode.bin w32-testival.exe [$]=ascii:w32-dl-loadlib-shellcode.bin eip=$ --EH | match_output.py "Hello, world![\r\n]*" --verbose > nul IF ERRORLEVEL 1 GOTO :FAILED ECHO + w32-dl-loadlib-shellcode-esp.bin w32-testival.exe [$+800]=ascii:w32-dl-loadlib-shellcode-esp.bin eip=$+800 esp=$+7FF --EH | match_output.py "Hello, world![\r\n]*" --verbose > nul IF ERRORLEVEL 1 GOTO :FAILED EXIT /B 0 :FAILED ECHO * Test failed! EXIT /B %ERRORLEVEL%
@ECHO OFF ECHO + Checking shellcode for NULL bytes: ECHO + w32-dl-loadlib-shellcode.bin CALL BETA3 h --nullfree w32-dl-loadlib-shellcode.bin > nul IF ERRORLEVEL 1 GOTO :FAILED ECHO + w32-dl-loadlib-shellcode-esp.bin CALL BETA3 h --nullfree w32-dl-loadlib-shellcode-esp.bin > nul IF ERRORLEVEL 1 GOTO :FAILED ECHO + Running shellcode: ECHO + w32-dl-loadlib-shellcode.bin w32-testival.exe [$]=ascii:w32-dl-loadlib-shellcode.bin eip=$ --EH | match_output.py "Hello, world![\r\n]*" --verbose > nul IF ERRORLEVEL 1 GOTO :FAILED ECHO + w32-dl-loadlib-shellcode-esp.bin w32-testival.exe [$+800]=ascii:w32-dl-loadlib-shellcode-esp.bin eip=$+800 esp=$+7FF --EH | match_output.py "Hello, world![\r\n]*" --verbose > nul IF ERRORLEVEL 1 GOTO :FAILED EXIT /B 0 :FAILED ECHO * Test failed! EXIT /B %ERRORLEVEL%
Add new specs to bat
del "spec/*.js" call tsc "spec/ActorSpec.ts" -out "spec/ActorSpec.js" call tsc "spec/ColorSpec.ts" -out "spec/ColorSpec.js" call tsc "spec/PromiseSpec.ts" -out "spec/PromiseSpec.js" call tsc "spec/CollectionSpec.ts" -out "spec/CollectionSpec.js" call tsc "spec/LogSpec.ts" -out "spec/LogSpec.js" call jasmine-node --verbose spec/
del "spec/*.js" call tsc "spec/ActorSpec.ts" -out "spec/ActorSpec.js" call tsc "spec/ColorSpec.ts" -out "spec/ColorSpec.js" call tsc "spec/PromiseSpec.ts" -out "spec/PromiseSpec.js" call tsc "spec/CollectionSpec.ts" -out "spec/CollectionSpec.js" call tsc "spec/LogSpec.ts" -out "spec/LogSpec.js" call tsc "spec/ClassSpec.ts" -out "spec/ClassSpec.js" call tsc "spec/TimerSpec.ts" -out "spec/TimerSpec.js" call jasmine-node --verbose spec/
Exclude perf tests from nano runs.
@echo off :: To run tests outside of MSBuild.exe :: %1 is the path to the tests\<OSConfig> folder pushd %1 FOR /D %%F IN (*.Tests) DO ( pushd %%F\dnxcore50 @echo "corerun.exe xunit.console.netcore.exe %%F.dll -xml testResults.xml -notrait category=failing -notrait category=nonwindowstests" corerun.exe xunit.console.netcore.exe %%F.dll -notrait category=failing -notrait category=nonwindowstests popd ) popd
@echo off :: To run tests outside of MSBuild.exe :: %1 is the path to the tests\<OSConfig> folder pushd %1 FOR /D %%F IN (*.Tests) DO ( pushd %%F\dnxcore50 @echo "corerun.exe xunit.console.netcore.exe %%F.dll -xml testResults.xml -notrait category=failing -notrait category=nonwindowstests -notrait Benchmark=true" corerun.exe xunit.console.netcore.exe %%F.dll -notrait category=failing -notrait category=nonwindowstests -notrait Benchmark=true popd ) popd
Build failures on Windows should be noticed.
@rem Copyright 2018 gRPC authors. @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. @echo "Starting Windows build" cd /d %~dp0 cd ..\.. git submodule update --init git submodule foreach --recursive git submodule update --init set ARTIFACTS_OUT=artifacts cd packages\grpc-native-core call tools\run_tests\artifacts\build_artifact_node.bat cd ..\.. move packages\grpc-native-core\artifacts .
@rem Copyright 2018 gRPC authors. @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. @echo "Starting Windows build" cd /d %~dp0 cd ..\.. git submodule update --init git submodule foreach --recursive git submodule update --init set ARTIFACTS_OUT=artifacts cd packages\grpc-native-core call tools\run_tests\artifacts\build_artifact_node.bat || goto :error cd ..\.. move packages\grpc-native-core\artifacts . goto :EOF :error exit /b 1
Use proper reference to error code.
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 Dolphin7 DBOOT.img7 DolphinProfessional DIR DBOOT*, DPRO* CALL TestDPRO set errorCode=%ERRORLEVEL% DIR DPRO* EXIT errorCode
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 Dolphin7 DBOOT.img7 DolphinProfessional DIR DBOOT*, DPRO* CALL TestDPRO set errorCode=%ERRORLEVEL% DIR DPRO* EXIT %errorCode%
Update the windows bat file to make it work.Pass the parameters to next java command as an argument
@echo off set DIR=%~dp0 set LIB="%DIR%\..\lib\*" set BIN="%DIR%\..\bin\*" REM ??? echo {^ "type" : "jdbc",^ "jdbc" : {^ "url" : "jdbc:mysql://localhost:3306/test",^ "user" : "",^ "password" : "",^ "sql" : "select *, page_id as _id from page",^ "treat_binary_as_string" : true,^ "elasticsearch" : {^ "cluster" : "elasticsearch",^ "host" : "localhost",^ "port" : 9300^ },^ "index" : "metawiki"^ }^ } "%JAVA_HOME%\bin\java" -cp "%LIB%" -Dlog4j.configurationFile="%BIN%\log4j2.xml" "org.xbib.tools.Runner" "org.xbib.tools.JDBCImporter"
@echo off set DIR=%~dp0 set LIB=%DIR%..\lib\* set BIN=%DIR%..\bin REM ??? echo {^ "type" : "jdbc",^ "jdbc" : {^ "url" : "jdbc:mysql://localhost:3306/test",^ "user" : "",^ "password" : "",^ "sql" : "select *, page_id as _id from page",^ "treat_binary_as_string" : true,^ "elasticsearch" : {^ "cluster" : "elasticsearch",^ "host" : "localhost",^ "port" : 9300^ },^ "index" : "metawiki"^ }^ }^ | "%JAVA_HOME%\bin\java" -cp "%LIB%" -Dlog4j.configurationFile="%BIN%\log4j2.xml" "org.xbib.tools.Runner" "org.xbib.tools.JDBCImporter"
Add database startup script for Windows
@echo off REM This script starts PostgreSQL on Windows. It assumes that you: REM - installed PostgreSQL to the default folder; REM - are using the postgres account; REM - have configured the 'trust' authentication mechanism (no password). set PGDATA=C:\Program Files\PostgreSQL\9.5\data set PGHOST=127.0.0.1 set PGPORT=5432 set PGUSER=postgres "C:\Program Files\PostgreSQL\9.5\bin\postgres.exe"
Add Windows version of demo.
@echo on ::
@echo on :: :: Demo _some_ of the stompngo examples. :: IF [%SNGD%]==[] SET SNGD=C:\gosrc\src\github.com\gmallard\stompngo_examples echo %SNGD% IF [%STOMP_HOST%]==[] SET STOMP_HOST=192.168.1.200 echo %STOMP_HOST% :: set STOMP_NMSGS=1 set STOMP_NQS=1 :: cd %SNGD% :: set STOMP_DEST=/queue/snge.ack go run publish\publish.go set STOMP_DEST=/queue/snge.ack.1 go run ack\ack.go :: set STOMP_USEEOF=y set STOMP_DEST=/queue/snge.rdr go run publish\publish.go set STOMP_USEEOF=y set STOMP_DEST=/queue/snge.rdr.1 go run adhoc\reader\reader.go :: go run conndisc\conndisc.go :: :: Port 61611: AMQ, TLS, No cert required set STOMP_PORT=61611 go run conndisc_tls\conndisc_tls.go :: set STOMP_PORT=61613 go run srmgor_1conn\srmgor_1conn.go go run srmgor_1smrconn\srmgor_1smrconn.go go run srmgor_2conn\srmgor_2conn.go go run srmgor_manyconn\srmgor_manyconn.go :: set STOMP_USEEOF=y set STOMP_DEST=/queue/snge.sub go run publish\publish.go set STOMP_USEEOF=y set STOMP_DEST=/queue/snge.sub.1 set STOMP_NMSGS=2 go run subscribe\subscribe.go ::
Make build script less verbose
@echo on call "%VS110COMNTOOLS%vsvars32.bat" REM Portable project msbuild.exe /ToolsVersion:4.0 "..\Espera\Espera.sln" /p:configuration=Release set ReleaseDir=..\Release\ REM Cleanup before we create and copy everything rmdir %ReleaseDir% /s /q set ReleaseDirPortable=%ReleaseDir%Portable\ mkdir %ReleaseDirPortable% set bin=..\Espera\Espera.View\bin\Release\ copy %bin%*.dll %ReleaseDirPortable% copy %bin%Espera.exe %ReleaseDirPortable% copy %bin%Espera.exe.config %ReleaseDirPortable% copy ..\Changelog.txt %ReleaseDirPortable% REM ClickOnce project msbuild.exe /target:publish /p:configuration=Release ..\Espera\Espera.sln" set ReleaseDirSetup=%ReleaseDir%Setup\ mkdir %ReleaseDirSetup% xcopy /S /Y %bin%\app.publish %ReleaseDirSetup% pause
@echo on call "%VS110COMNTOOLS%vsvars32.bat" REM Portable project msbuild.exe /ToolsVersion:4.0 /p:configuration=Release /v:minimal "..\Espera\Espera.sln" set ReleaseDir=..\Release\ REM Cleanup before we create and copy everything rmdir %ReleaseDir% /s /q set ReleaseDirPortable=%ReleaseDir%Portable\ mkdir %ReleaseDirPortable% set bin=..\Espera\Espera.View\bin\Release\ copy %bin%*.dll %ReleaseDirPortable% copy %bin%Espera.exe %ReleaseDirPortable% copy %bin%Espera.exe.config %ReleaseDirPortable% copy ..\Changelog.txt %ReleaseDirPortable% REM ClickOnce project msbuild.exe /target:publish /p:configuration=Release /v:minimal ..\Espera\Espera.sln" set ReleaseDirSetup=%ReleaseDir%Setup\ mkdir %ReleaseDirSetup% xcopy /S /Y %bin%\app.publish %ReleaseDirSetup% pause
Add support for compiling with cl on Windows
@rem Turn off echoing of commands. @echo off rem Make sure local variables don't spill into the global environment. setlocal EnableExtensions rem Make sure we're in the src directory. pushd "%~dp0src" rem Treat the first parameter to this batch script as a target. set target=%1 rem If a target is specified, call the subroutine if "%target%"=="" (call :build) else (call :%target%) goto :end :build rem Compiler flags: rem /nologo Don't print tedious MS logo stuff in the beginning rem /DEBUG Compile in debug mode. rem /Z7 Create debug symbols as .pdb files rem /TC Compile as C, not C++ set CFLAGS=/nologo /DEBUG /Z7 /TC rem Compile the sources. cl %CFLAGS% main.c cpu.c gfx.c interconnect.c util.c exit /B :clean rem Delete all intermediate files. del *.obj *.exe *.o *.a *.lib *.pdb *.ilk exit /B :end rem Restore previous directory. popd
Add a batch file to build on Windows with MSVC.
@setlocal @set TSCOMPILE=cl /nologo /O2 /W3 /c /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE /DWIN32 /DUSE_DL=1 @set TSLINK=link /nologo @set TSLIB=lib /nologo @if "%1" == "static" goto STATIC @if not exist bin\ ( mkdir bin ) %TSCOMPILE% /MT scheme.c dynload.c %TSLINK% /out:bin\tinyscheme.exe scheme.obj dynload.obj %TSCOMPILE% /MDd scheme.c dynload.c %TSLINK% /out:bin\tinyscheme_d.exe scheme.obj dynload.obj @goto END :STATIC @if not exist lib\ ( mkdir lib ) %TSCOMPILE% /DSTANDALONE=0 /MT scheme.c dynload.c %TSLIB% /out:lib\tinyscheme.lib scheme.obj dynload.obj %TSCOMPILE% /DSTANDALONE=0 /MDd scheme.c dynload.c %TSLIB% /out:lib\tinyscheme_d.lib scheme.obj dynload.obj :END del scheme.obj dynload.obj
Fix grammar in a comment
@echo off rem This needed for pkg-config to detect pcl and eigen3 pc files set PKG_CONFIG_PATH=%LIBRARY_LIB%\pkgconfig rem Override distutils VS detection set DISTUTILS_USE_SDK=1 set MSSdk=1 rem Renames necessary for python-pcl to detect the libraries it needs for %%x in (io registration segmentation features filters sample_consensus surface search kdtree octree common) do ( copy /y %LIBRARY_LIB%\pcl_%%x_release.lib %LIBRARY_LIB%\pcl_%%x.lib > nul if errorlevel 1 exit 1 ) copy /y %LIBRARY_LIB%\flann_cpp_s.lib %LIBRARY_LIB%\flann_cpp.lib > nul if errorlevel 1 exit 1 rem Compile extension python setup.py config --compiler=msvc build --compiler=msvc install if errorlevel 1 exit 1 rem Remove library renames for %%x in (io registration segmentation features filters sample_consensus surface search kdtree octree common) do ( del %LIBRARY_LIB%\pcl_%%x.lib if errorlevel 1 exit 1 ) del %LIBRARY_LIB%\flann_cpp.lib if errorlevel 1 exit 1
@echo off rem This is needed for pkg-config to detect pcl and eigen3 pc files set PKG_CONFIG_PATH=%LIBRARY_LIB%\pkgconfig rem Override distutils VS detection set DISTUTILS_USE_SDK=1 set MSSdk=1 rem Renames necessary for python-pcl to detect the libraries it needs for %%x in (io registration segmentation features filters sample_consensus surface search kdtree octree common) do ( copy /y %LIBRARY_LIB%\pcl_%%x_release.lib %LIBRARY_LIB%\pcl_%%x.lib > nul if errorlevel 1 exit 1 ) copy /y %LIBRARY_LIB%\flann_cpp_s.lib %LIBRARY_LIB%\flann_cpp.lib > nul if errorlevel 1 exit 1 rem Compile extension python setup.py config --compiler=msvc build --compiler=msvc install if errorlevel 1 exit 1 rem Remove library renames for %%x in (io registration segmentation features filters sample_consensus surface search kdtree octree common) do ( del %LIBRARY_LIB%\pcl_%%x.lib if errorlevel 1 exit 1 ) del %LIBRARY_LIB%\flann_cpp.lib if errorlevel 1 exit 1
Configure script ported to Windows
@echo off rem ----- Ignore system ANT_HOME variable set ORIGINAL_ANT_HOME=%ANT_HOME% set ANT_HOME=tools\apache-ant-1.6.5 call %ANT_HOME%\bin\ant -version rem call %ANT_HOME%\bin\ant -f src\build\build.xml call %ANT_HOME%\bin\ant -f src\build\build.xml config rem call %ANT_HOME%\bin\ant -f src\build\build.xml -Djava.endorsed.dirs=lib\endorsed -logger org.apache.tools.ant.NoBannerLogger -emacs config rem ----- Restore ANT_HOME set ANT_HOME=%ORIGINAL_ANT_HOME% set ORIGINAL_ANT_HOME=
Use vscode as editor in windows
@echo off chcp 65001>nul prompt [%USERNAME%@%COMPUTERNAME% $p]$_$$$s rem Fake a UNIX environment doskey clear=cls doskey ls=dir /d $* doskey cp=copy $* doskey mv=move $* doskey rm=del $* doskey cat=type $* doskey touch=type nul$G$G$* rem Easier navigation doskey cd=cd /D $* doskey cd..=cd .. doskey ..=cd .. doskey ...=cd ../.. doskey ....=cd ../../.. rem List files properly doskey l=dir /b $* doskey ll=dir /b $* rem Edit functionality IF NOT EXIST "C:\Program Files\Sublime Text 3" GOTO NOSUBLIME doskey edit="C:\Program Files\Sublime Text 3\sublime_text" $* :NOSUBLIME rem Open functionality doskey open=start $* @echo on
@echo off chcp 65001>nul prompt [%USERNAME%@%COMPUTERNAME% $p]$_$$$s rem Fake a UNIX environment doskey clear=cls doskey ls=dir /d $* doskey cp=copy $* doskey mv=move $* doskey rm=del $* doskey cat=type $* doskey touch=type nul$G$G$* rem Easier navigation doskey cd=cd /D $* doskey cd..=cd .. doskey ..=cd .. doskey ...=cd ../.. doskey ....=cd ../../.. rem List files properly doskey l=dir /b $* doskey ll=dir /b $* rem Edit functionality IF NOT EXIST "C:\Program Files (x86)\Microsoft VS Code" GOTO NOVSCODE doskey edit="C:\Program Files (x86)\Microsoft VS Code\bin\code.cmd" $* GOTO NOSUBLIME :NOVSCODE IF NOT EXIST "C:\Program Files\Sublime Text 3" GOTO NOSUBLIME doskey edit="C:\Program Files\Sublime Text 3\sublime_text" $* :NOSUBLIME rem Open functionality doskey open=start $* @echo on
Create more books for other font families
Set Book=%BookName%%1 Call Generate %Book% name SongTi FontSize48 Call Generate %Book% name QuanZiKuFont FontSize48 :: The following fonts generated unreadable characters. :: Call Generate %Book% name FangSong FontSize48 :: Call Generate %Book% name KaiTi FontSize48 :: The following fonts generated incomplete text. :: Call Generate %Book% name BeiShiDaFont FontSize48 :: Call Generate %Book% name JinWen FontSize48 :: Call Generate %Book% name LiShu FontSize48 :: Call Generate %Book% name JiaGuWen FontSize48 Set Destinaton=%OutputFolder%\%1 RmDir %Destinaton% /s /q MkDir %Destinaton% Move /Y %Book%*.pdf %Destinaton%
Set Book=%BookName%%1 Call Generate %Book% name SongTi FontSize48 Call Generate %Book% name QuanZiKuFont FontSize48 :: The following fonts generated unreadable characters. :: Call Generate %Book% name FangSong FontSize48 :: Call Generate %Book% name KaiTi FontSize48 :: The following fonts generated incomplete text. REM Call Generate %Book% name BeiShiDaFont FontSize48 REM Call Generate %Book% name JinWen FontSize48 REM Call Generate %Book% name LiShu FontSize48 REM Call Generate %Book% name JiaGuWen FontSize48 Set Destinaton=%OutputFolder%\%1 RmDir %Destinaton% /s /q MkDir %Destinaton% Move /Y %Book%*.pdf %Destinaton%
Add comment explaining why we're forcing babel 1.3
"%sdkverpath%" -q -version:"%sdkver%" call setenv /x64 rem install python packages pip install --cache-dir C:/egg_cache nose pip install --cache-dir C:/egg_cache coverage pip install --cache-dir C:/egg_cache numpy pip install --cache-dir C:/egg_cache cython pip install --cache-dir C:/egg_cache babel==1.3 pip install --cache-dir C:/egg_cache Sphinx rem install traits python setup.py develop
"%sdkverpath%" -q -version:"%sdkver%" call setenv /x64 rem install python packages pip install --cache-dir C:/egg_cache nose pip install --cache-dir C:/egg_cache coverage pip install --cache-dir C:/egg_cache numpy pip install --cache-dir C:/egg_cache cython rem Work around bug in babel 2.0: see mitsuhiko/babel#174 pip install --cache-dir C:/egg_cache babel==1.3 pip install --cache-dir C:/egg_cache Sphinx rem install traits python setup.py develop
Set hidden attribute of links
@echo off NET SESSION >nul 2>&1 IF %ERRORLEVEL% NEQ 0 ( ECHO Not an admin, exiting. EXIT /B 1 ) setlocal EnableDelayedExpansion :: ############################ :: # Create symlinks from the home directory to any desired dotfiles directory. :: ############################ :: dotfiles directory set dotfilesdir=%USERPROFILE%\.dotfiles :: backup directory set backupdir=%USERPROFILE%\dotfiles_backup :: list of files/folders to symlink in homedir set dotfiles=bashrc bash_profile bash dir_colors inputrc minttyrc gitconfig for %%A in (%dotfiles%) DO ( set target=%dotfilesdir%\%%A set link=%USERPROFILE%\.%%A set linkExists="0" if exist "!link!" ( set Z=&& for %%B in ("!link!") do set Z=%%~aB if "!Z:~8,1!" == "l" ( set linkExists="1" ) else ( if not exist "%backupdir%" ( mkdir "%backupdir%"" ) echo Moving existing !link! to %backupdir% move "!link!" "%backupdir%" ) ) if !linkExists! == "0" ( if exist "!target!\" ( mklink /d "!link!" "!target!" ) else ( mklink "!link!" "!target!" ) ) )
@echo off NET SESSION >nul 2>&1 IF %ERRORLEVEL% NEQ 0 ( ECHO Not an admin, exiting. EXIT /B 1 ) setlocal EnableDelayedExpansion :: ############################ :: # Create symlinks from the home directory to any desired dotfiles directory. :: ############################ :: dotfiles directory set dotfilesdir=%USERPROFILE%\.dotfiles :: backup directory set backupdir=%USERPROFILE%\dotfiles_backup :: list of files/folders to symlink in homedir set dotfiles=bashrc bash_profile bash dir_colors inputrc minttyrc gitconfig for %%A in (%dotfiles%) DO ( set target=%dotfilesdir%\%%A set link=%USERPROFILE%\.%%A set linkExists="0" if exist "!link!" ( set Z=&& for %%B in ("!link!") do set Z=%%~aB if "!Z:~8,1!" == "l" ( set linkExists="1" ) else ( if not exist "%backupdir%" ( mkdir "%backupdir%"" ) echo Moving existing !link! to %backupdir% move "!link!" "%backupdir%" ) ) if !linkExists! == "0" ( if exist "!target!\" ( mklink /d "!link!" "!target!" ) else ( mklink "!link!" "!target!" ) attrib /L "!link!" +h ) )
Replace absolute path of python
@echo off set PYTHONPATH=%CD% C:\Python27\python.exe reader_archive\reader_archive.py %*
@echo off set PYTHONPATH=%CD% python reader_archive\reader_archive.py %*
Embed manifests in all files
SETLOCAL call call_vcvars.cmd set "_=%CD%" cd .. for /F %%1 in ('dir *.exe /B /S /A:-D') do (mt.exe -manifest "%%1.manifest" -outputresource:"%%1";1) for /F %%1 in ('dir *.dll /B /S /A:-D') do (mt.exe -manifest "%%1.manifest" -outputresource:"%%1";2) cd %_% ENDLOCAL pause
@echo off SETLOCAL call call_vcvars.cmd set "_=%CD%" cd .. for /F "delims=" %%1 in ('dir *.exe /B /S /A:-D') do (echo "%%1" && mt.exe -nologo -manifest "%%1.manifest" -outputresource:"%%1";1) for /F "delims=" %%1 in ('dir *.dll /B /S /A:-D') do (echo "%%1" && mt.exe -nologo -manifest "%%1.manifest" -outputresource:"%%1";2) cd %_% ENDLOCAL
Replace setup.py by pip install.
set CFG=%USERPROFILE%\pydistutils.cfg echo [config] > "%CFG%" echo compiler=mingw32 >> "%CFG%" echo [build] >> "%CFG%" echo compiler=mingw32 >> "%CFG%" echo [build_ext] >> "%CFG%" echo compiler=mingw32 >> "%CFG%" "%PYTHON%" setup.py install --single-version-externally-managed if errorlevel 1 exit 1
set CFG=%USERPROFILE%\pydistutils.cfg echo [config] > "%CFG%" echo compiler=mingw32 >> "%CFG%" echo [build] >> "%CFG%" echo compiler=mingw32 >> "%CFG%" echo [build_ext] >> "%CFG%" echo compiler=mingw32 >> "%CFG%" "%PYTHON%" -m pip install . --no-deps -vv if errorlevel 1 exit 1
Add option to specify line feed type.
@echo off set CURDIR=%CD% cd /d %~dp0 rem Create Makefile by MakeItSo ======================================= ..\3rdparty\makeitso\output\MakeItSo.exe -file=makefile.sln -config=MakeItSo.config rem Copy Makefie ====================================================== xcopy /Y /D ..\vs2015\*.makefile .\ cd /d %CURDIR% exit /b 0 :error cd /d %CURDIR% echo "Error=====" pause exit /b 1
@echo off set CURDIR=%CD% cd /d %~dp0 rem Create Makefile by MakeItSo ======================================= ..\3rdparty\makeitso\output\MakeItSo.exe -file=makefile.sln -config=MakeItSo.config -nl=crlf rem Copy Makefie ====================================================== xcopy /Y /D ..\vs2015\*.makefile .\ cd /d %CURDIR% exit /b 0 :error cd /d %CURDIR% echo "Error=====" pause exit /b 1
Replace individual parameters with wildcard
@ECHO OFF :: Note: We're not using parallel build (/m) because it doesn't seem to :: work with Sandcastle Help File Builder. "%ProgramFiles(x86)%\MSBuild\12.0\Bin\MSBuild.exe" %~dp0\build.proj /nologo /v:m /flp:verbosity=detailed %1 %2 %3 %4 %5 %6 %7 %8 %9
@ECHO OFF :: Note: We're not using parallel build (/m) because it doesn't seem to :: work with Sandcastle Help File Builder. "%ProgramFiles(x86)%\MSBuild\12.0\Bin\MSBuild.exe" %~dp0\build.proj /nologo /v:m /flp:verbosity=detailed %*
Reset GHC_PACKAGE_PATH varialbe (4th try).
@mkdir .shake 2> nul @set ghcArgs=--make ^ -Wall ^ src/Main.hs ^ -isrc ^ -rtsopts ^ -with-rtsopts=-I0 ^ -outputdir=.shake ^ -j ^ -O ^ -o .shake/build @set shakeArgs=--lint ^ --directory ^ ".." ^ %* @rem Unset GHC_PACKAGE_PATH variable, as otherwise ghc-cabal complains @if defined GHC_PACKAGE_PATH ( set GHC_PACKAGE_PATH ) @ghc %ghcArgs% && .shake\build %shakeArgs%
@mkdir .shake 2> nul @set ghcArgs=--make ^ -Wall ^ src/Main.hs ^ -isrc ^ -rtsopts ^ -with-rtsopts=-I0 ^ -outputdir=.shake ^ -j ^ -O ^ -o .shake/build @set shakeArgs=--lint ^ --directory ^ ".." ^ %* @rem Unset GHC_PACKAGE_PATH variable, as otherwise ghc-cabal complains @set GHC_PACKAGE_PATH= @ghc %ghcArgs% && .shake\build %shakeArgs%
Add batch file that generates the local directory structure to allow the new AVR32 UC3 demo to be build using an Eclipse managed make project.
REM This file should be executed from the command line prior to the first REM build. It will be necessary to refresh the Eclipse project once the REM .bat file has been executed (normally just press F5 to refresh). REM Copies all the required files from their location within the standard REM FreeRTOS directory structure to under the Eclipse project directory. REM This permits the Eclipse project to be used in 'managed' mode and without REM having to setup any linked resources. REM Have the files already been copied? IF EXIST FreeRTOS Goto END REM Create the required directory structure. MD FreeRTOS MD FreeRTOS\include MD FreeRTOS\portable\GCC\AVR32_UC3 MD FreeRTOS\portable\MemMang MD Common_Demo_Tasks MD Common_Demo_Tasks\Minimal MD Common_Demo_Tasks\include REM Copy the core kernel files. copy ..\..\Source\*.* FreeRTOS REM Copy the common header files copy ..\..\Source\include\*.* FreeRTOS\include REM Copy the portable layer files copy ..\..\Source\portable\GCC\AVR32_UC3\*.* FreeRTOS\portable\GCC\AVR32_UC3 REM Copy the basic memory allocation files copy ..\..\Source\portable\MemMang\heap_3.c FreeRTOS\portable\MemMang REM Copy the files that define the common demo tasks. copy ..\common\Minimal\BlockQ.c Common_Demo_Tasks\Minimal copy ..\common\Minimal\comtest.c Common_Demo_Tasks\Minimal copy ..\common\Minimal\death.c Common_Demo_Tasks\Minimal copy ..\common\Minimal\dynamic.c Common_Demo_Tasks\Minimal copy ..\common\Minimal\flash.c Common_Demo_Tasks\Minimal copy ..\common\Minimal\flop.c Common_Demo_Tasks\Minimal copy ..\common\Minimal\integer.c Common_Demo_Tasks\Minimal copy ..\common\Minimal\PollQ.c Common_Demo_Tasks\Minimal copy ..\common\Minimal\semtest.c Common_Demo_Tasks\Minimal REM Copy the common demo file headers. copy ..\common\include\*.* Common_Demo_Tasks\include : END
Change script for gen pasrer
del log.txt ..\..\Bin\Release\v40\YC.YaccConstructor.exe -i .\..\..\..\YC.Abstract.SQL\src\TSQL\mssqlNonAbstract.yrd -c Linearize -g "RNGLR.Generator -table LALR -o RNGLR.sql.yrd.fs" ..\..\Bin\Release\v40\YC.YaccConstructor.exe -i .\..\..\..\YC.Abstract.SQL\src\TSQL\mssqlNonAbstract.yrd -c Linearize -g "RNGLR.EBNFGenerator -table LALR -o RNGLREBNF.sql.yrd.fs"
del log.txt ..\..\Bin\Release\v40\YC.YaccConstructor.exe -i .\..\..\..\YC.Abstract.SQL\src\Grammars\TSQL\mssqlNonAbstract.yrd -c Linearize -g "RNGLR.EBNFGenerator -table LALR -o RNGLREBNF.sql.yrd.fs"
Update in case people have 64bit git installed
@ECHO OFF SET oldPath=%PATH% git.exe 2> NUL if %ERRORLEVEL%==9009 GOTO :trydefaultpath GOTO :EOF :trydefaultpath path=C:\Program Files (x86)\Git\cmd;%PATH% git.exe 2> NUL if %ERRORLEVEL%==9009 GOTO :showerror GOTO :EOF :showerror path=%oldPath% ECHO Git is not in your path and could not be found in C:\Program Files (x86)\Git\bin set /p install=" Do you want to install Git through Chocolatey [y/n]? " %=% if %install%==y ( GOTO :installgit ) else ( GOTO :cantcontinue ) :cantcontinue ECHO Can't complete the build without Git being in the path. Please add it to be able to continue. GOTO :EOF :installgit ECHO Installing Chocolatey first @powershell -NoProfile -ExecutionPolicy unrestricted -Command "iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))" && SET PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin ECHO Installing Git through Chocolatey choco install git path=C:\Program Files (x86)\Git\cmd;%path%
@ECHO OFF SET oldPath=%PATH% git.exe 2> NUL if %ERRORLEVEL%==9009 GOTO :trydefaultpath GOTO :EOF :trydefaultpath path=C:\Program Files (x86)\Git\cmd;C:\Program Files\Git\cmd;%PATH% git.exe 2> NUL if %ERRORLEVEL%==9009 GOTO :showerror GOTO :EOF :showerror path=%oldPath% ECHO Git is not in your path and could not be found in C:\Program Files (x86)\Git\cmd set /p install=" Do you want to install Git through Chocolatey [y/n]? " %=% if %install%==y ( GOTO :installgit ) else ( GOTO :cantcontinue ) :cantcontinue ECHO Can't complete the build without Git being in the path. Please add it to be able to continue. GOTO :EOF :installgit ECHO Installing Chocolatey first @powershell -NoProfile -ExecutionPolicy unrestricted -Command "iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))" && SET PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin ECHO Installing Git through Chocolatey choco install git path=C:\Program Files (x86)\Git\cmd;%path%
Tweak nightly build test script.
@echo off rem This batch file is not actually used for the nightly build, but performs rem similar steps and is handy for testing the build with similar settings. rem It also demonstrates how to set up an automated build by calling Ant rem directly. rem Note, however, that this batch file will not clean the source tree before rem building. set batch_file_dir=%~dp0 set src_root=%batch_file_dir%\..\.. set log_filename=%src_root%\buildlog.xml set report_filename=%src_root%\buildreport.html if exist %log_filename% ( del %log_filename% ) call ant -f %src_root%\buildscripts\nightly\nightlybuild_Windows.xml ^ -listener org.apache.tools.ant.XmlLogger ^ -logger org.apache.tools.ant.listener.SimpleBigProjectLogger ^ -DXmlLogger.file=%log_filename% ^ -Dmm.versionstring=test_build if not exist %log_filename% ( echo Ant failed without producing XML log file exit /b 1 ) python -c "import sys" -c "if sys.version_info.major != 3 or sys.version_info.minor < 3: sys.exit(1)" if errorlevel 1 ( echo Python 3.3 or later required to generate build error report exit /b ) python %src_root%\buildscripts\nightly\genreport_Windows.py %src_root% %log_filename% %report_filename% start %report_filename%
@echo off setlocal enableextensions enabledelayedexpansion rem This batch file is not actually used for the nightly build, but performs rem similar steps and is handy for testing the build with similar settings. rem It also demonstrates how to set up an automated build by calling Ant rem directly. rem Note, however, that this batch file will not clean the source tree before rem building. set batch_file_dir=%~dp0 set src_root=%batch_file_dir%\..\.. set log_filename=%src_root%\buildlog.xml set report_filename=%src_root%\buildreport.html if exist %log_filename% ( del %log_filename% ) rem Prevent 'only one logger' error. set ANT_ARGS= call ant -f %src_root%\buildscripts\nightly\nightlybuild_Windows.xml ^ -listener org.apache.tools.ant.XmlLogger ^ -logger org.apache.tools.ant.listener.SimpleBigProjectLogger ^ -DXmlLogger.file=%log_filename% ^ -Dmm.versionstring=test_build if not exist %log_filename% ( echo Ant failed without producing XML log file exit /b 1 ) python -c "import sys" -c "if sys.version_info.major != 3 or sys.version_info.minor < 3: sys.exit(1)" if errorlevel 1 ( echo Python 3.3 or later required to generate build error report exit /b ) python %src_root%\buildscripts\nightly\genreport_Windows.py %src_root% %log_filename% %report_filename% start %report_filename%
Add worker batch script for windows
cd C:\srhome\stoneridge C:\Python27\python.exe C:\srhome\stoneridge\srrun.py C:\srhome\stoneridge\windows\srwebworker.py --config C:\srhome\stoneridge.ini --log C:\srhome\srworker.log
Remove override of output dir on Windows
@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 CF_HOME=C:\ProgramData\chocolatey\bin 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 cf_max_attempts = 250 >> %USERINI% ECHO output = %TEST_OUT% >> %USERINI% SET PATH=%PYTHON_HOME%;%PYTHON_HOME%\Scripts;%DOTNET_HOME%;%CF_HOME%;%JAVA_HOME%\bin;%GIT_HOME%\bin;%MAVEN_HOME%\bin;%PATH% PATH RMDIR /S /Q %TEST_OUT% REM CALL %BASEDIR%\test-setup REM CALL %BASEDIR%\test-run %* behave %*
@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 CF_HOME=C:\ProgramData\chocolatey\bin 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 cf_max_attempts = 250 >> %USERINI% REM ECHO output = %TEST_OUT% >> %USERINI% SET PATH=%PYTHON_HOME%;%PYTHON_HOME%\Scripts;%DOTNET_HOME%;%CF_HOME%;%JAVA_HOME%\bin;%GIT_HOME%\bin;%MAVEN_HOME%\bin;%PATH% PATH RMDIR /S /Q %TEST_OUT% REM CALL %BASEDIR%\test-setup REM CALL %BASEDIR%\test-run %* behave %*
Add script to remove global grepWin context menu
@echo off setlocal EnableDelayedExpansion set registryRoot=HKCU\Software\Classes reg delete %registryRoot%\*\shell\grepWin... reg delete %registryRoot%\*\shell\grepWin... reg delete %registryRoot%\Directory\background\shell\grepWin... reg delete %registryRoot%\Directory\shell\grepWin... reg delete %registryRoot%\Drive\shell\grepWin... reg delete %registryRoot%\Folder\shell\grepWin...
Upgrade Python 2.4.2 for Windows
@ECHO OFF ECHO This will install Topographica and its package dependencies. if "%1"=="" ECHO If default path is not acceptable, enter path as parameter to setup.bat if NOT "%1"=="" ECHO Target is %1\Topographica\ REM Developer's Note: Install Python then call the setup.py script REM inside the external/win32 directory. REM $Id: setup.bat,v 1.6 2004/06/30 15:43:59 judah Exp $ external\win32\util\Y_OR_N /Q /A "Do you wish to continue? [Y/n]" IF ERRORLEVEL 3 GOTO :INSTALL IF ERRORLEVEL 2 GOTO :EXIT IF ERRORLEVEL 1 GOTO :INSTALL :INSTALL ftype Python.File | findstr "Python.File=" IF ERRORLEVEL 1 GOTO :INSTALL_PYTHON IF ERRORLEVEL 0 GOTO :RUN_SETUP :INSTALL_PYTHON ECHO Python file associations not detected: Installing Python 2.4 start /wait external\win32\python-2.4.msi :RUN_SETUP cd external\win32 cd start /wait setup.py configure start /wait /B setup.py install %1 :EXIT ECHO Install Complete
@ECHO OFF ECHO This will install Topographica and its package dependencies. if "%1"=="" ECHO If default path is not acceptable, enter path as parameter to setup.bat if NOT "%1"=="" ECHO Target is %1\Topographica\ REM Developer's Note: Install Python then call the setup.py script REM inside the external/win32 directory. REM $Id: setup.bat,v 1.6 2004/06/30 15:43:59 judah Exp $ external\win32\util\Y_OR_N /Q /A "Do you wish to continue? [Y/n]" IF ERRORLEVEL 3 GOTO :INSTALL IF ERRORLEVEL 2 GOTO :EXIT IF ERRORLEVEL 1 GOTO :INSTALL :INSTALL ftype Python.File | findstr "Python.File=" IF ERRORLEVEL 1 GOTO :INSTALL_PYTHON IF ERRORLEVEL 0 GOTO :RUN_SETUP :INSTALL_PYTHON ECHO Python file associations not detected: Installing Python 2.4 start /wait external\win32\python-2.4.2.msi :RUN_SETUP cd external\win32 cd start /wait setup.py configure start /wait /B setup.py install %1 :EXIT ECHO Install Complete
Add a script for stress testing load/unload.
:Beg driver --load --path C:\Code\hadesmem\dist\debug\x64\chimera.sys --name Chimera driver --unload --path C:\Code\hadesmem\dist\debug\x64\chimera.sys --name Chimera goto Beg
Add path to 2015 VS Tools.
@setlocal @prompt $G$S @set CMDHOME=%~dp0. @if NOT "%VS120COMNTOOLS%"=="" ( @set VSTOOLSDIR="%VS120COMNTOOLS%" @set VSVER=Visual Studio 2013 ) else ( @set VSTOOLSDIR="%VS110COMNTOOLS%" @set VSVER=Visual Studio 2012 ) @set PKG=Orleans Tools for %VSVER% @echo --- Uninstalling %PKG% @Echo -- VS Tools directory = %VSTOOLSDIR% @Echo - Unsetting OrleansSDK environment variable SetX.exe OrleansSDK "" @ECHO - Uninstalling Visual Studio extension package %PKG% %VSTOOLSDIR%\..\IDE\vsixinstaller.exe /uninstall:462db41f-31a4-48f0-834c-1bdcc0578511 @echo --- Finished uninstalling %PKG% @pause
@setlocal @prompt $G$S @set CMDHOME=%~dp0. @if NOT "%VS140COMNTOOLS%"=="" ( @set VSTOOLSDIR="%VS140COMNTOOLS%" @set VSVER=Visual Studio 2015 ) else ( @if NOT "%VS120COMNTOOLS%"=="" ( @set VSTOOLSDIR="%VS120COMNTOOLS%" @set VSVER=Visual Studio 2013 ) else ( @set VSTOOLSDIR="%VS110COMNTOOLS%" @set VSVER=Visual Studio 2012 ) ) @set PKG=Orleans Tools for %VSVER% @echo --- Uninstalling %PKG% @Echo -- VS Tools directory = %VSTOOLSDIR% @Echo - Unsetting OrleansSDK environment variable SetX.exe OrleansSDK "" @ECHO - Uninstalling Visual Studio extension package %PKG% %VSTOOLSDIR%\..\IDE\vsixinstaller.exe /uninstall:462db41f-31a4-48f0-834c-1bdcc0578511 @echo --- Finished uninstalling %PKG% @pause
Update Rust version used by Appveyor
curl -sSf https://static.rust-lang.org/dist/rust-1.22.1-i686-pc-windows-msvc.exe -o rust.exe rust.exe /VERYSILENT /NORESTART /DIR="C:\Rust" set PATH=%PATH%;C:\Rust\bin curl -sSf http://releases.llvm.org/%LLVM_VERSION%/LLVM-%LLVM_VERSION%-win32.exe -o LLVM.exe 7z x LLVM.exe -oC:\LLVM set PATH=%PATH%;C:\LLVM\bin set LIBCLANG_PATH=C:\LLVM\bin
curl -sSf https://static.rust-lang.org/dist/rust-1.24.0-i686-pc-windows-msvc.exe -o rust.exe rust.exe /VERYSILENT /NORESTART /DIR="C:\Rust" set PATH=%PATH%;C:\Rust\bin curl -sSf http://releases.llvm.org/%LLVM_VERSION%/LLVM-%LLVM_VERSION%-win32.exe -o LLVM.exe 7z x LLVM.exe -oC:\LLVM set PATH=%PATH%;C:\LLVM\bin set LIBCLANG_PATH=C:\LLVM\bin
Update startup script with new path and to bypass Grunt
REM Start Max patch START "" "C:\Program Files\Cycling '74\Max Runtime 6.1\maxRT.exe" C:\eim\EiMpatch\EmotionInMotion.maxproj TIMEOUT 15 REM Set Node.js environment to production SET NODE_ENV=production REM Switch to EiM directory CD c:\eim REM Start Node.js server C:\Users\EmotionInMotionV2\AppData\Roaming\npm\grunt default
REM Start Max patch START "" "C:\Program Files\Cycling '74\Max Runtime 6.1\maxRT.exe" C:\eim\MaxMSP\EmotionInMotion\EmotionInMotion.maxproj TIMEOUT 15 REM Set Node.js environment to production SET NODE_ENV=production REM Switch to EiM directory CD c:\eim REM Start Node.js server #C:\Users\EmotionInMotionV2\AppData\Roaming\npm\grunt default node server.js
Add a script to install MSVC debugging visualizers from Eigen
copy "%~dp0..\vendor\eigen-3.2.6\debug\msvc\*.natvis" "%USERPROFILE%\My Documents\Visual Studio 2015\Visualizers" copy "%~dp0..\vendor\eigen-3.2.6\debug\msvc\*.natvis" "%USERPROFILE%\My Documents\Visual Studio 2013\Visualizers"
Fix path to floppy files
powershell -File A:\scripts\docker\add-docker-group.ps1 powershell -File A:\scripts\docker\install-docker.ps1 powershell -File A:\scripts\docker\open-docker-insecure-port.ps1 powershell -File A:\scripts\docker\remove-docker-key-json.ps1
powershell -File A:\add-docker-group.ps1 powershell -File A:\install-docker.ps1 powershell -File A:\open-docker-insecure-port.ps1 powershell -File A:\remove-docker-key-json.ps1
Add SharpDX.Core examples into example package
@echo off setlocal cd "%~dp0" if exist "dist-examples" rmdir /s /q "dist-examples" for /d %%a in ("Examples/WPF/*") do ( echo Examples/WPF/%%~a mkdir "dist-examples/WPF/%%~a" xcopy /s /d /q "Examples/WPF/%%~a/bin/Release" "dist-examples/WPF/%%~a\" ) for /d %%a in ("Examples/WPF.SharpDX/*") do ( echo Examples/WPF.SharpDX/%%~a mkdir "dist-examples/WPF.SharpDX/%%~a" xcopy /s /d /q "Examples/WPF.SharpDX/%%~a/bin/Release" "dist-examples/WPF.SharpDX/%%~a\" )
@echo off setlocal cd "%~dp0" if exist "dist-examples" rmdir /s /q "dist-examples" for /d %%a in ("Examples/WPF/*") do ( echo Examples/WPF/%%~a mkdir "dist-examples/WPF/%%~a" xcopy /s /d /q "Examples/WPF/%%~a/bin/Release" "dist-examples/WPF/%%~a\" ) for /d %%a in ("Examples/WPF.SharpDX/*") do ( echo Examples/WPF.SharpDX/%%~a mkdir "dist-examples/WPF.SharpDX/%%~a" xcopy /s /d /q "Examples/WPF.SharpDX/%%~a/bin/Release" "dist-examples/WPF.SharpDX/%%~a\" ) for /d %%a in ("Examples/WPF.SharpDX/*") do ( echo Examples/SharpDX.Core/%%~a mkdir "dist-examples/SharpDX.Core/%%~a" xcopy /s /d /q "Examples/SharpDX.Core/%%~a/bin/Release" "dist-examples/SharpDX.Core/%%~a\" )
Remove unneeded handling of static libraries on windows
set LIB=%LIBRARY_LIB%;%LIB% set LIBPATH=%LIBRARY_LIB%;%LIBPATH% set INCLUDE=%LIBRARY_INC%;%INCLUDE% ECHO [directories] > setup.cfg ECHO basedirlist = %LIBRARY_PREFIX% >> setup.cfg ECHO [packages] >> setup.cfg ECHO tests = False >> setup.cfg ECHO sample_data = False >> setup.cfg ECHO toolkits_tests = False >> setup.cfg rem matplotlib will link to png, zlib statically if it exists. Replace the static library with shared del %LIBRARY_LIB%\libpng16_static.lib copy %LIBRARY_LIB%\libpng16.lib %LIBRARY_LIB%\libpng16_static.lib del %LIBRARY_LIB%\zlibstatic.lib copy %LIBRARY_LIB%\z.lib %LIBRARY_LIB%\zlibstatic.lib %PYTHON% -m pip install . --no-deps -vv if errorlevel 1 exit 1
set LIB=%LIBRARY_LIB%;%LIB% set LIBPATH=%LIBRARY_LIB%;%LIBPATH% set INCLUDE=%LIBRARY_INC%;%INCLUDE% ECHO [directories] > setup.cfg ECHO basedirlist = %LIBRARY_PREFIX% >> setup.cfg ECHO [packages] >> setup.cfg ECHO tests = False >> setup.cfg ECHO sample_data = False >> setup.cfg ECHO toolkits_tests = False >> setup.cfg %PYTHON% -m pip install . --no-deps -vv if errorlevel 1 exit 1
Allow building Nuget packages out of Debug binaries
@ECHO OFF pushd "%~dp0.." SET parentDir=%cd% popd SET SUFFIX=%1 IF '%SUFFIX%' == '' GOTO NOSUFFIX for /f %%a in ('findstr /sm packOptions %parentDir%\src\project.json') do dotnet pack %%a --no-build -c Release -o "%parentDir%\nugets" --version-suffix %SUFFIX% "%~dp0\nuget.exe" pack "%parentDir%\nuspecs\Suite\Microsoft.Diagnostics.EventFlow.Suite.nuspec" -OutputDirectory "%parentDir%\nugets" -Suffix %SUFFIX% GOTO END :NOSUFFIX for /f %%a in ('findstr /sm packOptions %parentDir%\src\project.json') do dotnet pack %%a --no-build -c Release -o "%parentDir%\nugets" "%~dp0\nuget.exe" pack "%parentDir%\nuspecs\Suite\Microsoft.Diagnostics.EventFlow.Suite.nuspec" -OutputDirectory "%parentDir%\nugets" GOTO END :END
@ECHO OFF pushd "%~dp0.." SET parentDir=%cd% popd SET CONFIGURATION=%2 IF '%CONFIGURATION%' == '' SET CONFIGURATION=Release SET SUFFIX=%1 IF '%SUFFIX%' == '' GOTO NOSUFFIX for /f %%a in ('findstr /sm packOptions %parentDir%\src\project.json') do dotnet pack %%a --no-build -c %CONFIGURATION% -o "%parentDir%\nugets" --version-suffix %SUFFIX% "%~dp0\nuget.exe" pack "%parentDir%\nuspecs\Suite\Microsoft.Diagnostics.EventFlow.Suite.nuspec" -OutputDirectory "%parentDir%\nugets" -Suffix %SUFFIX% GOTO END :NOSUFFIX for /f %%a in ('findstr /sm packOptions %parentDir%\src\project.json') do dotnet pack %%a --no-build -c %CONFIGURATION% -o "%parentDir%\nugets" "%~dp0\nuget.exe" pack "%parentDir%\nuspecs\Suite\Microsoft.Diagnostics.EventFlow.Suite.nuspec" -OutputDirectory "%parentDir%\nugets" GOTO END :END
Switch statement in batch file
@echo off echo "Not yet"
@echo off IF "%~1"=="" ( goto usage ) ELSE IF "%~1"=="init" ( mkdir _pill\bin set CONDA_BIN_PATH="conda info --root" set CONDA_DEFAULT_ENV ) ELSE IF "%~1"=="in" ( echo "Ready to go in" ) ELSE IF "%~1" == "out" ( echo "Ready to go out" ) ELSE ( echo "error" goto usage exit /b 1 ) exit /b :usage echo usage: pill [COMMAND] echo. echo SYNOPSIS echo Create a local python and conda environment in the current directory. echo When activated all the libraries will be installed and imported from echo the '_pill' directory in the root of your project. echo. echo USAGE echo Create and run temporal/local environments. echo. echo $ pill init echo $ source pill in echo $ source pill out echo. echo COMMANDS echo init Creates the .pill directory and create links. echo in Modifies CONDA_DEFAULT_ENV and PATH to use echo the .pill directory and sets the PILL_NAME variable. echo out Restores the previous CONDA_DEFAULT_ENV and PATH. Also echo unsets PILL_NAME. echo. exit /b :create_symlinks exit /b :backup set PILL_OLD_PATH=%PATH% set PILL_OLD_CONDA_DEFAULT_ENV=%CONDA_DEFAULT_ENV% set PILL_PROMPT=%PROMPT% exit /b :remove_current_conda set CONDA_BIN_PATH="conda info --root" set CONDA_BIN_PATH="%CONDA_BIN_PATH%\bin" PATH=:$PATH: PATH=${PATH//:$CONDA_BIN_PATH:/:} exit /b