if "%CONDA_PY%" == "27" copy %RECIPE_DIR%\\pstdint.h %SRC_DIR%\\src\\stdint.h
mkdir build && cd build
cmake ^
	-G "%CMAKE_GENERATOR%"                   ^
	-DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX%  ^
	-DBIN_INSTALL_DIR=%LIBRARY_BIN%     ^
	-DLIB_INSTALL_DIR=%LIBRARY_LIB%     ^
	-DINCLUDE_INSTALL_DIR=%LIBRARY_INC% ^
	..

cmake --build . --config Release --target INSTALL

copy file only if CONDA_PY == "27"

copy file only if CONDA_PY == "27"


@echo off
echo "Setup symlinks"
call mklink /D llapi-client\Assets ..\assets-folder
call mklink /D llapi-server\Assets ..\assets-folder
call mklink /D llapi-client\ProjectSettings ..\project-settings
call mklink /D llapi-server\ProjectSettings ..\project-settings

echo "Done"

@echo off
echo "Clone dependencies"
echo "UniRx"
call git clone https://github.com/neuecc/UniRx.git unirx
echo "Zenject"
call git clone https://github.com/modesttree/Zenject.git zenject
echo "Setup symlinks"
call mklink /D assets-folder\Zenject ..\zenject\UnityProject\Assets\Zenject
call mklink /D assets-folder\Plugins\UniRx ..\unirx\Assets\Plugins\UniRx
call mklink /D llapi-client\Assets ..\assets-folder
call mklink /D llapi-server\Assets ..\assets-folder
call mklink /D llapi-client\ProjectSettings ..\project-settings
call mklink /D llapi-server\ProjectSettings ..\project-settings
echo "Done"

Include dependencies to setup batch file


call settings.bat

git clone https://github.com/osmcode/libosmium.git libosmium

cd libosmium/build-cmake
set TESTS=ON
set ALLHPPS=OFF
cmake .. -G "Visual Studio 12 Win64" -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=%PREFIX% -DBOOST_ROOT=%BOOST_ROOT% -DBoost_USE_STATIC_LIBS=ON -DBUILD_TESTING=%TESTS% -DBUILD_TRY_HPPS=%ALLHPPS% -T CTP_Nov2013
msbuild /p:Configuration=%Variant% /clp:Verbosity=minimal /nologo libosmium.sln /flp1:logfile=build_errors.txt;errorsonly /flp2:logfile=build_warnings.txt;warningsonly

set PATH=%PATH%;%PREFIX%/bin
if "%TESTS%"=="ON" ctest -VV >build_tests.log

msbuild /p:Configuration=%Variant% /clp:Verbosity=minimal /nologo INSTALL.vcxproj

cd ..\..

call settings.bat

git clone https://github.com/osmcode/libosmium.git libosmium

cd libosmium/build-cmake
set TESTS=ON
set ALLHPPS=OFF
cmake .. -G "Visual Studio 12 Win64" -DCMAKE_BUILD_TYPE=%Variant% -DCMAKE_INSTALL_PREFIX=%PREFIX% -DBOOST_ROOT=%BOOST_ROOT% -DBoost_USE_STATIC_LIBS=ON -DBUILD_TESTING=%TESTS% -DBUILD_TRY_HPPS=%ALLHPPS% -T CTP_Nov2013
msbuild /p:Configuration=%Variant% /clp:Verbosity=minimal /nologo libosmium.sln /flp1:logfile=build_errors.txt;errorsonly /flp2:logfile=build_warnings.txt;warningsonly

set PATH=%PATH%;%PREFIX%/bin
if "%TESTS%"=="ON" ctest -VV >build_tests.log

msbuild /p:Configuration=%Variant% /clp:Verbosity=minimal /nologo INSTALL.vcxproj

cd ..\..

fix libosmium release tests

fix libosmium release tests


echo 'y' | "%ANDROID_HOME%/tools/android.bat" update sdk --no-ui --all --filter android-10,android-23,platform-tools,tools,build-tools-23.0.3

Add android sdk upload script.

Add android sdk upload script.


:: Batch file run as build command for vers.vcproj
@echo off

setlocal

set InFile=%~1
set SolutionDir=%~2
set IntDir=%~3
set OutFile=%~4
set VarsBat=%IntDir%/vers-vars.bat

:: Put cygwin in the path
call %SolutionDir%\..\third_party\cygwin\setup_env.bat

:: Load version digits as environment variables
cat %SolutionDir%\VERSION | sed "s/\(.*\)/set \1/" > %VarsBat%

:: Load branding strings as environment variables
set Distribution="chromium"
if "%CHROMIUM_BUILD%" == "_google_chrome" set Distribution="google_chrome"
cat %SolutionDir%app\theme\%Distribution%\BRANDING | sed "s/\(.*\)/set \1/" >> %VarsBat%

set OFFICIAL_BUILD=0
if "%CHROME_BUILD_TYPE%" == "_official" set OFFICIAL_BUILD=1

:: Determine the current repository revision number
set PATH=%~dp0..\..\..\..\third_party\svn;%PATH%
svn.exe info | grep.exe "Revision:" | cut -d" " -f2- | sed "s/\(.*\)/set LASTCHANGE=\1/" >> %VarsBat%
call %VarsBat%

::echo LastChange: %LASTCHANGE%

:: output file
cat %InFile% | sed "s/@MAJOR@/%MAJOR%/" ^
                  | sed "s/@MINOR@/%MINOR%/" ^
                  | sed "s/@BUILD@/%BUILD%/" ^
                  | sed "s/@PATCH@/%PATCH%/" ^
                  | sed "s/@COMPANY_FULLNAME@/%COMPANY_FULLNAME%/" ^
                  | sed "s/@COMPANY_SHORTNAME@/%COMPANY_SHORTNAME%/" ^
                  | sed "s/@PRODUCT_FULLNAME@/%PRODUCT_FULLNAME%/" ^
                  | sed "s/@PRODUCT_SHORTNAME@/%PRODUCT_SHORTNAME%/" ^
                  | sed "s/@PRODUCT_EXE@/%PRODUCT_EXE%/" ^
                  | sed "s/@COPYRIGHT@/%COPYRIGHT%/" ^
                  | sed "s/@OFFICIAL_BUILD@/%OFFICIAL_BUILD%/" ^
                  | sed "s/@LASTCHANGE@/%LASTCHANGE%/" > %OutFile%

endlocal

@echo off
:: Copyright (c) 2009 The Chromium Authors. All rights reserved.
:: Use of this source code is governed by a BSD-style license that can be
:: found in the LICENSE file.

:: Batch file run as build command for chrome_dll.vcproj

setlocal

set InFile=%~1
set SolutionDir=%~2
set IntDir=%~3
set OutFile=%~4
set VarsBat=%IntDir%/vers-vars.bat

:: Put cygwin in the path
call %SolutionDir%\..\third_party\cygwin\setup_env.bat

:: Load version digits as environment variables
cat %SolutionDir%\VERSION | sed "s/\(.*\)/set \1/" > %VarsBat%

:: Load branding strings as environment variables
set Distribution="chromium"
if "%CHROMIUM_BUILD%" == "_google_chrome" set Distribution="google_chrome"
cat %SolutionDir%app\theme\%Distribution%\BRANDING | sed "s/\(.*\)/set \1/" >> %VarsBat%

set OFFICIAL_BUILD=0
if "%CHROME_BUILD_TYPE%" == "_official" set OFFICIAL_BUILD=1

:: Look if subversion client is available. It may not be available on Windows
:: if downloaded with a tarball or depot_tools is not in the PATH.
call svn --version 2>nul 1>nul
:: If not available, just skip getting the revision number.
if errorlevel 1 goto :NO_SVN
goto :SET_ENV

:NO_SVN
:: Not having svn makes it impossible to determine the current checkout revision
:: number. On normal build, this is not an issue but for official builds, this
:: *can't* be tolerated so issue an error instead. VS will pick it up corectly.
set NO_SVN_LEVEL=error
if "%OFFICIAL_BUILD%" == "0" set NO_SVN_LEVEL=warning
echo %0(28) : %NO_SVN_LEVEL% : svn is not installed. Can't determine the revision number.
echo set LASTCHANGE=0 >> %VarsBat%
goto :GEN_FILE

:SET_ENV
call svn info | grep.exe "Revision:" | cut -d" " -f2- | sed "s/\(.*\)/set LASTCHANGE=\1/" >> %VarsBat%
goto :GEN_FILE

:GEN_FILE
call %VarsBat%
::echo LastChange: %LASTCHANGE%
:: output file
cat %InFile% | sed "s/@MAJOR@/%MAJOR%/" ^
                  | sed "s/@MINOR@/%MINOR%/" ^
                  | sed "s/@BUILD@/%BUILD%/" ^
                  | sed "s/@PATCH@/%PATCH%/" ^
                  | sed "s/@COMPANY_FULLNAME@/%COMPANY_FULLNAME%/" ^
                  | sed "s/@COMPANY_SHORTNAME@/%COMPANY_SHORTNAME%/" ^
                  | sed "s/@PRODUCT_FULLNAME@/%PRODUCT_FULLNAME%/" ^
                  | sed "s/@PRODUCT_SHORTNAME@/%PRODUCT_SHORTNAME%/" ^
                  | sed "s/@PRODUCT_EXE@/%PRODUCT_EXE%/" ^
                  | sed "s/@COPYRIGHT@/%COPYRIGHT%/" ^
                  | sed "s/@OFFICIAL_BUILD@/%OFFICIAL_BUILD%/" ^
                  | sed "s/@LASTCHANGE@/%LASTCHANGE%/" > %OutFile%

endlocal

Fix version.bat to use the 'default' svn in the PATH and not a precooked one in chromium sources.

BUG=10872
Review URL: http://codereview.chromium.org/92074

git-svn-id: http://src.chromium.org/svn/trunk/src@14312 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

Former-commit-id: 9e25ffca1ffbe5fdccab661696352fd01ce25752


@REM @file
@REM This script will exec Brotli tool with -e/-d options.
@REM
@REM Copyright (c) 2017, Intel Corporation. All rights reserved.<BR>
@REM This program and the accompanying materials
@REM are licensed and made available under the terms and conditions of the BSD License
@REM which accompanies this distribution.  The full text of the license may be found at
@REM http://opensource.org/licenses/bsd-license.php
@REM
@REM THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
@REM WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
@REM

@echo off
@setlocal

set LVL=--quality 9

:Begin
if "%1"=="" goto End

if "%1"=="-d" (
  set ARGS=%ARGS% --decompress
  shift
  goto Begin
)

if "%1"=="-e" (
  shift
  goto Begin
)

if "%1"=="-g" (
  set ARGS=%ARGS% --gap %2
  shift
  shift
  goto Begin
)

if "%1"=="-l" (
  set LVL=--quality %2
  shift
  shift
  goto Begin
)

if "%1"=="-o" (
  set ARGS=%ARGS% --output %2
  set INTMP=%2
  shift
  shift
  goto Begin
)

set ARGS=%ARGS% --input %1
shift
goto Begin

:End
Brotli %ARGS% %LVL%
@echo on

BaseTools: Add the missing copyrights in BrotliCompress.bat

Cc: Yonghong Zhu <78d981fe33a016071af5222c56d5cf77f30fb0b2@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Liming Gao <6480311aeeb4b006862f6d13ebabddc03f51e507@intel.com>
Reviewed-by: Yonghong Zhu <78d981fe33a016071af5222c56d5cf77f30fb0b2@intel.com>


cd ..
rmdir /S /Q cairo_build_x64
mkdir cairo_build_x64

REM This needs Anaconda3.

cd cairo_build_x64
cmake.exe ../cairo -G "Visual Studio 14 2015 Win64" -DCMAKE_SUPPRESS_REGENERATION:BOOL=TRUE -Dprotobuf_BUILD_TESTS:BOOL="0" ^
-DZLIB_INCLUDE_DIR:PATH="..\gtkPlusBuiltFilesForWindows\gtk-build\gtk\x64\include" ^
-DZLIB_LIBRARY:FILEPATH="..\gtkPlusBuiltFilesForWindows\gtk-build\gtk\x64\lib\zlibstat.lib" ^
-DFREETYPE_INCLUDE_DIR:PATH="..\gtkPlusBuiltFilesForWindows\gtk-build\gtk\x64\include" ^
-DFREETYPE_LIBRARY:FILEPATH="..\gtkPlusBuiltFilesForWindows\gtk-build\gtk\x64\lib\freetype.lib" ^
-DFONTCONFIG_INCLUDE_DIR:PATH="..\gtkPlusBuiltFilesForWindows\gtk-build\gtk\x64\include" ^
-DFONTCONFIG_LIBRARY:FILEPATH="..\gtkPlusBuiltFilesForWindows\gtk-build\gtk\x64\lib\fontconfig.lib" ^
-DPIXMAN_INCLUDE_DIR:PATH="..\gtkPlusBuiltFilesForWindows\gtk-build\gtk\x64\include\pixman-1" ^
-DPIXMAN_LIBRARY:FILEPATH="..\gtkPlusBuiltFilesForWindows\gtk-build\gtk\x64\lib\pixman-1.lib" ^
-DPNG_INCLUDE_DIR:PATH="..\gtkPlusBuiltFilesForWindows\gtk-build\gtk\x64\include" ^
-DPNG_LIBRARY:FILEPATH="..\gtkPlusBuiltFilesForWindows\gtk-build\gtk\x64\lib\libpng16.lib"

REM cmake.exe --build "." --target "ALL_BUILD" --config "Release"
cd ..

cd cartographer-windows

cd ..
rmdir /S /Q cairo_build_x64
mkdir cairo_build_x64

cd cairo_build_x64
cmake.exe ../cairo -G "Visual Studio 14 2015 Win64" ^
-DZLIB_INCLUDE_DIR:PATH="..\gtkPlusBuiltFilesForWindows\gtk-build\gtk\x64\include" ^
-DZLIB_LIBRARY:FILEPATH="..\gtkPlusBuiltFilesForWindows\gtk-build\gtk\x64\lib\zlibstat.lib" ^
-DFREETYPE_INCLUDE_DIR:PATH="..\gtkPlusBuiltFilesForWindows\gtk-build\gtk\x64\include" ^
-DFREETYPE_INCLUDE_DIR_freetype2:PATH="..\gtkPlusBuiltFilesForWindows\gtk-build\gtk\x64\include" ^
-DFREETYPE_INCLUDE_DIR_ft2build:PATH="..\gtkPlusBuiltFilesForWindows\gtk-build\gtk\x64\include" ^
-DFREETYPE_LIBRARY:FILEPATH="..\gtkPlusBuiltFilesForWindows\gtk-build\gtk\x64\lib\freetype.lib" ^
-DFONTCONFIG_INCLUDE_DIR:PATH="..\gtkPlusBuiltFilesForWindows\gtk-build\gtk\x64\include" ^
-DFONTCONFIG_LIBRARY:FILEPATH="..\gtkPlusBuiltFilesForWindows\gtk-build\gtk\x64\lib\fontconfig.lib" ^
-DPIXMAN_INCLUDE_DIR:PATH="..\gtkPlusBuiltFilesForWindows\gtk-build\gtk\x64\include\pixman-1" ^
-DPIXMAN_LIBRARY:FILEPATH="..\gtkPlusBuiltFilesForWindows\gtk-build\gtk\x64\lib\pixman-1.lib" ^
-DPNG_INCLUDE_DIR:PATH="..\gtkPlusBuiltFilesForWindows\gtk-build\gtk\x64\include" ^
-DPNG_PNG_INCLUDE_DIR:PATH="..\gtkPlusBuiltFilesForWindows\gtk-build\gtk\x64\include" ^
-DPNG_LIBRARY:FILEPATH="..\gtkPlusBuiltFilesForWindows\gtk-build\gtk\x64\lib\libpng16.lib"

REM cmake.exe --build "." --target "ALL_BUILD" --config "Release"
echo ^
-DCMAKE_SUPPRESS_REGENERATION:BOOL=TRUE ^

cd ..\cartographer-windows

Update Cairo.cmd

Update Cairo.cmd

 * CMake completes, but msbuild fails.
 * gtkPlusBuiltFilesForWindows\gtk-build\gtk\x64 contains CairoConfig.cmake, so I will try it.


@echo off

doskey setup="%~dp0\setup.cmd"
doskey build="%~dp0\dn3build.cmd"
doskey debug="%~dp0\dn3buildmode-debug.cmd"
doskey release="%~dp0\dn3buildmode-release.cmd"

PUSHD %~dp0\src
IF "%DN3B%" == "" (SET DN3B=Release)
echo Using build configuration "%DN3B%"...

echo Restoring all packages...
dotnet restore --infer-runtimes --ignore-failed-sources 1>nul

echo Building core...

cd dotnet-new3
dotnet build -r win10-x64 -c %DN3B% 1>nul

echo Building runner...
cd ..\Mutant.Chicken.Runner
dotnet build -c %DN3B% 1>nul

echo Copying runner...
copy bin\%DN3B%\netstandard1.5\Mutant.Chicken.Runner.dll ..\dotnet-new3\bin\%DN3B%\netcoreapp1.0\win10-x64\Mutant.Chicken.Runner.dll 1>nul

echo Building VS Template support...
cd ..\Mutant.Chicken.Orchestrator.VsTemplates
dotnet build -c %DN3B% 1>nul

echo Copying VS Template Support...
copy bin\%DN3B%\netstandard1.5\Mutant.Chicken.Orchestrator.VsTemplates.dll ..\dotnet-new3\bin\%DN3B%\netcoreapp1.0\win10-x64\Mutant.Chicken.Orchestrator.VsTemplates.dll 1>nul

echo Building Runnable Project support...
cd ..\Mutant.Chicken.Orchestrator.RunnableProjects
dotnet build -c %DN3B% 1>nul

echo Copying Runnable Project Support...
copy bin\%DN3B%\netstandard1.5\Mutant.Chicken.Orchestrator.RunnableProjects.dll ..\dotnet-new3\bin\%DN3B%\netcoreapp1.0\win10-x64\Mutant.Chicken.Orchestrator.RunnableProjects.dll 1>nul
cd ..\dotnet-new3\bin\%DN3B%\netcoreapp1.0\win10-x64

echo Artifacts built and placed.

echo Updating path...
IF "%OLDPATH%" == "" (SET "OLDPATH=%PATH%")
SET "PATH=%CD%;%OLDPATH%"

IF "%DN3RESET%" == "" (
echo Resetting to defaults...
dotnet new3 -u *

echo Registering core components...
dotnet new3 -i "dotnet-new3, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"
echo Registering VS Template components...
dotnet new3 -i "Mutant.Chicken.Orchestrator.VsTemplates, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"
echo Registering Runnable Project components...
dotnet new3 -i "Mutant.Chicken.Orchestrator.RunnableProjects, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"

echo Updating sources...
dotnet new3 -i "C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\ProjectTemplates"
dotnet new3 -i "c:\RunnableProjectTemplates"
SET DN3RESET=Done
)

echo Done.
POPD

echo.
echo You can now use `setup` from anywhere (in this console session) to run setup again.
echo You can now use `build` from anywhere (in this console session) to build dotnet-new3 in the current configuration.
echo You can now use `debug` from anywhere (in this console session) to change the active build configuration to DEBUG.
echo You can now use `release` from anywhere (in this console session) to change the active build configuration to RELEASE.

@echo on
dotnet new3 -c

@echo off

doskey setup="%~dp0\setup.cmd"
doskey build="%~dp0\dn3build.cmd"
doskey debug="%~dp0\dn3buildmode-debug.cmd"
doskey release="%~dp0\dn3buildmode-release.cmd"

PUSHD %~dp0\src
IF "%DN3B%" == "" (SET DN3B=Release)
echo Using build configuration "%DN3B%"...

echo Restoring all packages...
dotnet restore --infer-runtimes --ignore-failed-sources 1>nul

echo Building core...

cd dotnet-new3
dotnet build -r win10-x64 -c %DN3B% 1>nul

echo Building runner...
cd ..\Mutant.Chicken.Runner
dotnet build -c %DN3B% 1>nul

echo Copying runner...
copy bin\%DN3B%\netstandard1.5\Mutant.Chicken.Runner.dll ..\dotnet-new3\bin\%DN3B%\netcoreapp1.0\win10-x64\Mutant.Chicken.Runner.dll 1>nul

echo Building VS Template support...
cd ..\Mutant.Chicken.Orchestrator.VsTemplates
dotnet build -c %DN3B% 1>nul

echo Copying VS Template Support...
copy bin\%DN3B%\netstandard1.5\Mutant.Chicken.Orchestrator.VsTemplates.dll ..\dotnet-new3\bin\%DN3B%\netcoreapp1.0\win10-x64\Mutant.Chicken.Orchestrator.VsTemplates.dll 1>nul

echo Building Runnable Project support...
cd ..\Mutant.Chicken.Orchestrator.RunnableProjects
dotnet build -c %DN3B% 1>nul

echo Copying Runnable Project Support...
copy bin\%DN3B%\netstandard1.5\Mutant.Chicken.Orchestrator.RunnableProjects.dll ..\dotnet-new3\bin\%DN3B%\netcoreapp1.0\win10-x64\Mutant.Chicken.Orchestrator.RunnableProjects.dll 1>nul
cd ..\dotnet-new3\bin\%DN3B%\netcoreapp1.0\win10-x64

echo Artifacts built and placed.

echo Updating path...
IF "%OLDPATH%" == "" (SET "OLDPATH=%PATH%")
SET "PATH=%CD%;%OLDPATH%"

IF "%DN3RESET%" == "" (
echo Resetting to defaults...
dotnet new3 -u *

echo Registering core components...
dotnet new3 -i "dotnet-new3, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"
echo Registering VS Template components...
dotnet new3 -i "Mutant.Chicken.Orchestrator.VsTemplates, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"
echo Registering Runnable Project components...
dotnet new3 -i "Mutant.Chicken.Orchestrator.RunnableProjects, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"

echo Updating sources...
dotnet new3 -i "%~dp0templates"
SET DN3RESET=Done
)

echo Done.
POPD

echo.
echo You can now use `setup` from anywhere (in this console session) to run setup again.
echo You can now use `build` from anywhere (in this console session) to build dotnet-new3 in the current configuration.
echo You can now use `debug` from anywhere (in this console session) to change the active build configuration to DEBUG.
echo You can now use `release` from anywhere (in this console session) to change the active build configuration to RELEASE.

@echo on
dotnet new3 -c

Install the templates as part of setup

Install the templates as part of setup


@echo off
call tools\setenv.bat

rem get version
set /p version=<version.txt

echo ======================= make content.jar

erase /Q out\*
7z a -tzip -mx=9 -mcu=on out\content.jar ..\chrome\content

echo ======================= make application.ini

call :appini > out\application.ini

echo ======================= make windows installer package

call :heatdir ..\..\assets assets APPLICATIONFOLDER
call :heatdir tools\xulrunner xulrunner APPLICATIONFOLDER

candle -nologo oilclient.wxs -out out\oilclient.wixobj -dversion=%version%

light -nologo -ext WixUIExtension -cultures:en-us -out C:\tmp\oilclient_%version%.msi out\oilclient.wixobj out\assets.wixobj out\xulrunner.wixobj

goto :eof

rem === functions

:heatdir
heat dir %1 -nologo -sfrag -scom -sreg -gg -g1 -cg %2 -dr %3 -var var.%2_source -out out\%2.wxs
candle -nologo out\%2.wxs -out out\%2.wixobj -d%2_source=%1
goto :eof

:appini
echo Vendor=quyse.net
echo Name=oil
echo Version=%version%
echo BuildID=1234567
echo ID=oil@quyse.net
echo [Gecko]
echo MinVersion=1.8
echo MaxVersion=200.*
goto :eof

@echo off
call tools\setenv.bat

rem get version
set /p version=<version.txt

echo ======================= make content.jar

erase /Q out\*
7z a -tzip -mx=9 -mcu=on out\content.jar ..\chrome\content

echo ======================= make application.ini

call :appini > out\application.ini

echo ======================= make windows installer package

call :heatdir ..\..\assets assets APPLICATIONFOLDER
call :heatdir tools\xulrunner xulrunner APPLICATIONFOLDER

candle -nologo oilclient.wxs -out out\oilclient.wixobj -dversion=%version%

light -nologo -ext WixUIExtension -cultures:en-us -out C:\tmp\oilclient_%version%.msi out\oilclient.wixobj out\assets.wixobj out\xulrunner.wixobj

goto :eof

rem === functions

:heatdir
heat dir %1 -nologo -sfrag -scom -sreg -gg -g1 -cg %2 -dr %3 -var var.%2_source -out out\%2.wxs
candle -nologo out\%2.wxs -out out\%2.wixobj -d%2_source=%1
goto :eof

:appini
echo [App]
echo Vendor=quyse.net
echo Name=oil
echo Version=%version%
echo BuildID=1234567
echo ID=oil@quyse.net
echo [Gecko]
echo MinVersion=1.8
echo MaxVersion=200.*
goto :eof

fix mistake in build script;

fix mistake in build script;


REM Use the packed conda environment to install CEA to the version provided by the argument
CALL "%~dp0Dependencies\Python\Scripts\activate.bat"

python -m pip install --no-deps cityenergyanalyst==%1

Create pip-install-cea.bat

Create pip-install-cea.bat


REM  install Anaconda 2018.2 in C:\anaconda3 (without VS, without PATH)
REM  Start->Anaconda3->Anaconda-Prompt

pip install numpy==1.16.0

pip install pyqt5==5.11.3

pip install hdf5plugin

pip install silx

pip install srxraylib

pip install syned

pip install wofry

pip install oasys-canvas-core

pip install oasys-widget-core

pip install oasys1

conda install -c conda-forge xraylib=3.3.0

REM
REM   try: python -m oasys.canvas -l4 --force-discovery
REM   Oasys should start (with no add-ons)
REM
REM  If it works, use the install_addons_windows.bat file to install manually the addons
REM
REM  ** IMPORTANT: DO NOT USE THE ADD-ONS MENU IN THE OASYS MENU -- DO NOT UPGRADE ADDONS USING THE OASYS MENU ***

REM  install Anaconda 2018.2 in C:\anaconda3 (without VS, without PATH)
REM  Start->Anaconda3->Anaconda-Prompt

pip install numpy==1.16.0

pip install pyqt5==5.11.3

pip install hdf5plugin

pip install silx

pip install srxraylib

pip install syned

pip install wofry

pip install oasys-canvas-core

pip install oasys-widget-core

pip install oasys1

conda install -c conda-forge xraylib=3.3.0

REM
REM   try: python -m oasys.canvas -l4 --force-discovery
REM   Oasys should start (with no add-ons)
REM
REM  Use the Optioons->AddOns to install the addons from the Oasys menu bar

Update install_oasys_windows.bat

Update install_oasys_windows.bat


@echo off

:: Mimics Mac touch command that sets the date/time of a file to the current date/time.
:: Put this file in the Windows PATH
:: Sample call: touch myfile.txt

copy /b %1 +,,

:: The %1 substitutes with myfile.txt.
:: The commas indicate the omission of the Destination parameter.
:: Thanks to http://superuser.com/questions/10426/windows-equivalent-of-the-linux-command-touch/764716

Create touch.bat

Create touch.bat


make sure that we always run from the local Nant

git-svn-id: 6eea8ec865c4fa60105bc56808c028bdcf72a817@2008 079b0acf-d9fa-0310-9935-e5ade295c882


@ECHO OFF
:: Python script

PATH=%PATH%;"%SYSTEMROOT%\System32"

download_toggle_video.py %*

echo Press any key to exit...
pause
exit

Create video.bat

Create video.bat


echo -------- >>C:\Users\vagrant\debug.log
date /t >>C:\Users\vagrant\debug.log
time /t >>C:\Users\vagrant\debug.log

if "%COMPUTERNAME:~0,8%"=="VAGRANT-" (
  echo COMPUTERNAME = %COMPUTERNAME% - do nothing >> C:\Users\vagrant\debug.log
) else (
  echo COMPUTERNAME = %COMPUTERNAME% - enable WinRM >> C:\Users\vagrant\debug.log
  netsh advfirewall firewall delete rule name="vagrant-vcloud-winrm" >> C:\Users\vagrant\debug.log
)

echo -------- >>C:\Users\vagrant\debug.log
date /t >>C:\Users\vagrant\debug.log
time /t >>C:\Users\vagrant\debug.log

if "%COMPUTERNAME:~0,8%"=="VAGRANT-" (
  echo COMPUTERNAME = %COMPUTERNAME% - do nothing >> C:\Users\vagrant\debug.log
) else (
  echo COMPUTERNAME = %COMPUTERNAME% - enable WinRM >> C:\Users\vagrant\debug.log
  netsh advfirewall firewall delete rule name="vagrant-vcloud-winrm" >> C:\Users\vagrant\debug.log
  schtasks /Delete /TN enable-winrm-after-customization /F
)

remove scheduled task again after opening WinRM port


start /dC:\Users\Administrator\Desktop\pyWorkspace\CAMEO_git_code cmd /k python C:\Users\Administrator\Desktop\pyWorkspace\CAMEO_git_code\cameo\automation\automationForWEBACKERS.py
exit

CD C:\Users\Administrator\Desktop\pyWorkspace\CAMEO_git_code
python C:\Users\Administrator\Desktop\pyWorkspace\CAMEO_git_code\cameo\automation\automationForWEBACKERS.py
ECHO
PAUSE
EXIT

update bat

update bat


### test_app.bat - 2015 - gandubert ###
version = "1.2.0-b"

update minor alternative version

update minor alternative version


;= echo off
;= rem Call DOSKEY and use this file as the macrofile
;= %SystemRoot%\system32\doskey /listsize=1000 /macrofile=%0%
;= rem In batch mode, jump to the end of the file
;= goto:eof
;= Add aliases below here

clear=cls
cmderr=cd /d "%CMDER_ROOT%"
e.=explorer .
gvim="C:\Program Files (x86)\Vim\vim80\gvim.exe" $*
history=cat "%CMDER_ROOT%\config\.history"
ll=ls -l -h --show-control-chars -F --color $*
ls=ls --show-control-chars -F --color $*
nuget="C:\workspace\nuget\nuget.exe" $*
pip2="C:\Program Files\Anaconda2\Scripts\pip.exe" $*
pip3="C:\Program Files\Anaconda3\Scripts\pip.exe" $*
pwd=cd
unalias=alias /d $1
vi=vim $*
vim="C:\Program Files (x86)\Vim\vim80\vim.exe" $*
vimdiff="C:\Program Files (x86)\Vim\vim80\vim.exe" -d $*
vsdevcmd="C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\Tools\VsDevCmd.bat"
vsmsbuild="C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\Tools\VsMSBuildCmd.bat"

;= Git
g=git $*

;= Git Add
ga=git add --verbose $*
gae=git add --verbose --edit $*
gad=git add --verbose --interactive $*
gap=git add --verbose --patch $*
gau=git add --verbose --update $*

;= Git Branch
gb=git branch -vv $*
gba=git branch -vv --all $*
gbc=git checkout -b $*
gbd=git branch --delete $*
gbm=git branch --move $*
gbs=git show-branch $*

;= Git Commit
gc=git commit -v $*
gca=git commit -v --all $*
gcF=git commit -v --amend $*
gcm=git commit --message $*
gcp=git cherry-pick --ff $*
gcS=git commit --gpg-sign $*
gcSF=git commit --amend --gpg-sign $*
gco=git checkout $*
gcs=git show $*

;= Git Diff
gd=git diff $*
gdc=git diff --cached $*

;= Git Fetch
gf=git fetch --all --tags --prune $*
gfc=git clone $*
gfcr=git clone --recurse-submodules $*
gfm=git pull
gfr=git pull --rebase
gfx="C:\workspace\aliases\gfx.cmd" $*
gfu=git remote --verbose update --prune $*

;= Git Grep
gg=git grep $*
ggi=git grep --interactive $*
ggl=git grep --files-with-matches $*
ggv=git grep --invert-match $*
ggw=git grep --word-regexp $*

;= Git Index
gia=git add $*
gid=git diff --cached $*
gir=git reset $*

;= Git Log Author
gl=git log --topo-order --pretty=format:"%C(4)%aN %C(7)<%aE> %C(4)%ar %C(3)%ad %C(2)%h%C(3)%d %C(7)%<(80,trunc)%s" --first-parent $*
gla=git log --topo-order --pretty=format:"%C(4)%aN %C(7)<%aE> %C(4)%ar %C(3)%ad %C(2)%h%C(3)%d %C(7)%<(80,trunc)%s" --all $*
glag=git log --topo-order --pretty=format:"%C(4)%aN %C(7)<%aE> %C(4)%ar %C(3)%ad %C(2)%h%C(3)%d %C(7)%<(80,trunc)%s" --all --graph $*
gld=git log --topo-order --pretty=format:"%C(4)%aN %C(7)<%aE> %C(4)%ar %C(3)%ad %C(2)%h%C(3)%d %C(7)%<(80,trunc)%s" --no-merges --first-parent $*
gldp=git log --topo-order --pretty=format:"%C(4)%aN %C(7)<%aE> %C(4)%ar %C(3)%ad %C(2)%h%C(3)%d %C(7)%<(80,trunc)%s" --no-merges --first-parent --patch $*
glg=git log --topo-order --pretty=format:"%C(4)%aN %C(7)<%aE> %C(4)%ar %C(3)%ad %C(2)%h%C(3)%d %C(7)%<(80,trunc)%s" --graph $*

;= Git Log Committer
glc=git log --topo-order --pretty=format:"%C(4)%cN %C(7)<%cE> %C(4)%cr %C(3)%cd %C(2)%h%C(3)%d %C(7)%<(80,trunc)%s" --first-parent $*
glca=git log --topo-order --pretty=format:"%C(4)%cN %C(7)<%cE> %C(4)%cr %C(3)%cd %C(2)%h%C(3)%d %C(7)%<(80,trunc)%s" --all $*
glcag=git log --topo-order --pretty=format:"%C(4)%cN %C(7)<%cE> %C(4)%cr %C(3)%cd %C(2)%h%C(3)%d %C(7)%<(80,trunc)%s" --all --graph $*
glcd=git log --topo-order --pretty=format:"%C(4)%cN %C(7)<%cE> %C(4)%cr %C(3)%cd %C(2)%h%C(3)%d %C(7)%<(80,trunc)%s" --no-merges --first-parent $*
glcdp=git log --topo-order --pretty=format:"%C(4)%cN %C(7)<%cE> %C(4)%cr %C(3)%cd %C(2)%h%C(3)%d %C(7)%<(80,trunc)%s" --no-merges --first-parent --patch $*
glcg=git log --topo-order --pretty=format:"%C(4)%cN %C(7)<%cE> %C(4)%cr %C(3)%cd %C(2)%h%C(3)%d %C(7)%<(80,trunc)%s" --graph $*

gls=git log --topo-order --stat --pretty=format:"${_git_log_medium_format}" $*

;= Git Merge
gm=git merge $*
gma=git merge --abort $*
gmt=git mergetool $*

;= Git Push
gp=git push $*
gpt=git push --tags $*

;= Git Rebase
gr=git rebase $*
gra=git rebase --abort $*
grc=git rebase --continue $*
gri=git rebase --interactive $*

;= Git Remote

;= Git Stash
gs=git stash $*
gsa=git stash apply $*
gsd=git stash show --patch --stat $*
gsx=git stash drop $*
gsl=git stash list $*
gsp=git stash pop $*
gss=git stash save --include-untracked $*

;= Git Working Copy
gwa=git add --verbose $*
gws=git status $*
gwd=git diff $*
gwr=git reset --soft $*
gwc=git clean $*

;= echo off
;= rem Call DOSKEY and use this file as the macrofile
;= %SystemRoot%\system32\doskey /listsize=1000 /macrofile=%0%
;= rem In batch mode, jump to the end of the file
;= goto:eof
;= Add aliases below here

clear=cls
cmderr=cd /d "%CMDER_ROOT%"
e.=explorer .
gvim="C:\Program Files (x86)\Vim\vim80\gvim.exe" $*
history=cat "%CMDER_ROOT%\config\.history"
ll=ls -l -h --show-control-chars -F --color $*
ls=ls --show-control-chars -F --color $*
nuget="C:\workspace\nuget\nuget.exe" $*
pip2="C:\Program Files\Anaconda2\Scripts\pip.exe" $*
pip3="C:\Program Files\Anaconda3\Scripts\pip.exe" $*
pwd=cd
unalias=alias /d $1
vi=vim $*
vim="C:\Program Files (x86)\Vim\vim80\vim.exe" $*
vimdiff="C:\Program Files (x86)\Vim\vim80\vim.exe" -d $*
vsdevcmd="C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\Tools\VsDevCmd.bat"
vsmsbuild="C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\Tools\VsMSBuildCmd.bat"

;= Git
g=git $*

;= Git Add
ga=git add --verbose $*
gae=git add --verbose --edit $*
gad=git add --verbose --interactive $*
gap=git add --verbose --patch $*
gau=git add --verbose --update $*

;= Git Branch
gb=git branch -vv $*
gba=git branch -vv --all $*
gbc=git checkout -b $*
gbd=git branch --delete $*
gbm=git branch --move $*
gbs=git show-branch $*

;= Git Commit
gc=git commit -v $*
gca=git commit -v --all $*
gcF=git commit -v --amend $*
gcm=git commit --message $*
gcp=git cherry-pick --ff $*
gcS=git commit --gpg-sign $*
gcSF=git commit --amend --gpg-sign $*
gco=git checkout $*
gcs=git show $*

;= Git Data
gd=git ls-files $*
gdc=git ls-files --cached $*
gdx=git ls-files --deleted $*
gdm=git ls-files --modified $*
gdu=git ls-files --other --exclude-standard $*
gdk=git ls-files --killed $*
gdi=git status --porcelain --short --ignored | sed -n "s/^!! //p" $*

;= Git Fetch
gf=git fetch --all --tags --prune $*
gfc=git clone $*
gfcr=git clone --recurse-submodules $*
gfm=git pull
gfr=git pull --rebase
gfx="C:\workspace\aliases\gfx.cmd" $*
gfu=git remote --verbose update --prune $*

;= Git Grep
gg=git grep $*
ggi=git grep --interactive $*
ggl=git grep --files-with-matches $*
ggv=git grep --invert-match $*
ggw=git grep --word-regexp $*

;= Git Index
gia=git add $*
gid=git diff --cached $*
gir=git reset $*

;= Git Log Author
gl=git log --topo-order --pretty=format:"%C(4)%aN %C(7)<%aE> %C(4)%ar %C(3)%ad %C(2)%h%C(3)%d %C(7)%<(80,trunc)%s" --first-parent $*
gla=git log --topo-order --pretty=format:"%C(4)%aN %C(7)<%aE> %C(4)%ar %C(3)%ad %C(2)%h%C(3)%d %C(7)%<(80,trunc)%s" --all $*
glag=git log --topo-order --pretty=format:"%C(4)%aN %C(7)<%aE> %C(4)%ar %C(3)%ad %C(2)%h%C(3)%d %C(7)%<(80,trunc)%s" --all --graph $*
gld=git log --topo-order --pretty=format:"%C(4)%aN %C(7)<%aE> %C(4)%ar %C(3)%ad %C(2)%h%C(3)%d %C(7)%<(80,trunc)%s" --no-merges --first-parent $*
gldp=git log --topo-order --pretty=format:"%C(4)%aN %C(7)<%aE> %C(4)%ar %C(3)%ad %C(2)%h%C(3)%d %C(7)%<(80,trunc)%s" --no-merges --first-parent --patch $*
glg=git log --topo-order --pretty=format:"%C(4)%aN %C(7)<%aE> %C(4)%ar %C(3)%ad %C(2)%h%C(3)%d %C(7)%<(80,trunc)%s" --graph $*

;= Git Log Committer
glc=git log --topo-order --pretty=format:"%C(4)%cN %C(7)<%cE> %C(4)%cr %C(3)%cd %C(2)%h%C(3)%d %C(7)%<(80,trunc)%s" --first-parent $*
glca=git log --topo-order --pretty=format:"%C(4)%cN %C(7)<%cE> %C(4)%cr %C(3)%cd %C(2)%h%C(3)%d %C(7)%<(80,trunc)%s" --all $*
glcag=git log --topo-order --pretty=format:"%C(4)%cN %C(7)<%cE> %C(4)%cr %C(3)%cd %C(2)%h%C(3)%d %C(7)%<(80,trunc)%s" --all --graph $*
glcd=git log --topo-order --pretty=format:"%C(4)%cN %C(7)<%cE> %C(4)%cr %C(3)%cd %C(2)%h%C(3)%d %C(7)%<(80,trunc)%s" --no-merges --first-parent $*
glcdp=git log --topo-order --pretty=format:"%C(4)%cN %C(7)<%cE> %C(4)%cr %C(3)%cd %C(2)%h%C(3)%d %C(7)%<(80,trunc)%s" --no-merges --first-parent --patch $*
glcg=git log --topo-order --pretty=format:"%C(4)%cN %C(7)<%cE> %C(4)%cr %C(3)%cd %C(2)%h%C(3)%d %C(7)%<(80,trunc)%s" --graph $*

gls=git log --topo-order --stat --pretty=format:"${_git_log_medium_format}" $*

;= Git Merge
gm=git merge $*
gma=git merge --abort $*
gmt=git mergetool $*

;= Git Push
gp=git push $*
gpt=git push --tags $*

;= Git Rebase
gr=git rebase $*
gra=git rebase --abort $*
grc=git rebase --continue $*
gri=git rebase --interactive $*

;= Git Remote

;= Git Stash
gs=git stash $*
gsa=git stash apply $*
gsd=git stash show --patch --stat $*
gsx=git stash drop $*
gsl=git stash list $*
gsp=git stash pop $*
gss=git stash save --include-untracked $*

;= Git Working Copy
gwa=git add --verbose $*
gws=git status $*
gwd=git diff $*
gwr=git reset --soft $*
gwc=git clean $*

Change windows gd aliases

Change windows gd aliases


cd /d %~dp0

echo 'Start the installation = maslab-cli ='
npm -g install
echo '==> Installation successful!'

追加：Windows用のインストールファイル

追加：Windows用のインストールファイル


cd ..
cd src
call buildvccomplete.bat
pause

call ..\src\buildvccomplete.bat from build.bat


@echo off
setlocal

call script\before-branch.bat

echo.
echo.
:: crate new feature branch locally
echo -- Step 6:     Create new Release branch locally
SET /P release_version="Please enter the release version:"
git checkout -b release-%release_version% develop

echo.
echo.
:: increase version on feature branch
echo -- Step 7:     Set version in POM to %release_version%
call "%M2_HOME%/bin/mvn" versions:set -DnewVersion=%release_version% -DremoveSnapshot=true -DprocessAllModules=true -DgenerateBackupPoms=false

echo.
echo.
echo -- Step 8:     Commiting update POM Files to release-%release_version%
:: commit the pom file with the updated version
git commit -m "changing release version to %release_version%" *pom.xml
echo ... done

echo.
echo.
:: publish the feature branch to github, so that everybody sees it
echo -- Step 9:     Pushing release-%release_version% branch to Github
SET /P confirm="Should the release-%release_version% be pushed to gitgub [y/n]"
IF "%confirm%" == "y" git push origin release-%release_version%
endlocal

:exit
echo Release Branch batch job ended

@echo off
setlocal

call script\before-branch.bat

echo.
echo.
:: crate new feature branch locally
echo -- Step 6:     Create new Release branch locally
SET /P release_version="Please enter the release version:"
git checkout -b release-%release_version% develop

echo.
echo.
:: increase version on feature branch
echo -- Step 7:     Set version in POM to %release_version%
call "%M2_HOME%/bin/mvn" versions:set -DnewVersion=%release_version% -DprocessAllModules=true -DgenerateBackupPoms=false

echo.
echo.
echo -- Step 8:     Commiting update POM Files to release-%release_version%
:: commit the pom file with the updated version
git commit -m "changing release version to %release_version%" *pom.xml
echo ... done

echo.
echo.
:: publish the feature branch to github, so that everybody sees it
echo -- Step 9:     Pushing release-%release_version% branch to Github
SET /P confirm="Should the release-%release_version% be pushed to gitgub [y/n]"
IF "%confirm%" == "y" git push origin release-%release_version%
endlocal

:exit
echo Release Branch batch job ended

update release script

update release script


REM work in progress
REM Setup a non-production BigFix Eval Server with SQL Developer Edition.

REM http://software.bigfix.com/download/bes/95/BigFix-BES-9.5.9.62.exe
REM http://download.microsoft.com/download/2/5/0/2508F7B4-6DDE-4C3E-B1FA-E1EB66F2F79F/SQLServer2016-SSEI-Dev.exe

SET BASEFOLDER=C:\tmp

REM Make folder if not existing:
if not exist "%BASEFOLDER%" mkdir %BASEFOLDER%

REM Open folder:
start "" %BASEFOLDER%

REM Download SQLServer Developer Edition:
powershell -command "& { (New-Object Net.WebClient).DownloadFile('http://download.microsoft.com/download/2/5/0/2508F7B4-6DDE-4C3E-B1FA-E1EB66F2F79F/SQLServer2016-SSEI-Dev.exe', '%BASEFOLDER%\SQLServer-SSEI-Dev.exe') }" -ExecutionPolicy Bypass
REM Install SQLServer Developer Edition:
REM https://docs.microsoft.com/en-us/sql/database-engine/install-windows/install-sql-server-from-the-command-prompt?view=sql-server-2017
%BASEFOLDER%\SQLServer-SSEI-Dev.exe

REM https://github.com/jgstew/bigfix-content/blob/f36708ebf7af38f84a286f3b79131faccb1d2e9c/fixlet/Install%20SQL%20Server%20Management%20Studio%2016.5.1%20-%20Windows.bes
REM Download SQL Server Management Studio:
powershell -command "& { (New-Object Net.WebClient).DownloadFile('https://download.microsoft.com/download/0/5/B/05B2AF8F-906F-4C57-A58E-5780F64F9D62/SSMS-Setup-ENU.exe', '%BASEFOLDER%\SSMS-Setup-ENU.exe') }" -ExecutionPolicy Bypass
REM https://download.microsoft.com/download/0/5/B/05B2AF8F-906F-4C57-A58E-5780F64F9D62/SSMS-Setup-ENU.exe
REM Install SQL Server Management Studio:
%BASEFOLDER%\SSMS-Setup-ENU.exe /install /quiet /norestart

REM for some reason, this didn't create a start menu shortcut it seems for SQL Server Management Studio

REM Download BigFix Root Server:
powershell -command "& { (New-Object Net.WebClient).DownloadFile('http://software.bigfix.com/download/bes/95/BigFix-BES-9.5.9.62.exe', '%BASEFOLDER%\BigFix-BES.exe') }" -ExecutionPolicy Bypass
REM Install:
REM %BASEFOLDER%\BigFix-BES.exe

REM press any key to continue....
pause

REM work in progress
REM Setup a non-production BigFix Eval Server with SQL Developer Edition.

REM http://software.bigfix.com/download/bes/95/BigFix-BES-9.5.9.62.exe
REM http://download.microsoft.com/download/2/5/0/2508F7B4-6DDE-4C3E-B1FA-E1EB66F2F79F/SQLServer2016-SSEI-Dev.exe

SET BASEFOLDER=C:\tmp

REM Make folder if not existing:  https://stackoverflow.com/questions/4165387/create-folder-with-batch-but-only-if-it-doesnt-already-exist
if not exist "%BASEFOLDER%" mkdir %BASEFOLDER%

REM Open folder:
start "" %BASEFOLDER%

REM Download SQLServer Developer Edition:
powershell -command "& { (New-Object Net.WebClient).DownloadFile('http://download.microsoft.com/download/2/5/0/2508F7B4-6DDE-4C3E-B1FA-E1EB66F2F79F/SQLServer2016-SSEI-Dev.exe', '%BASEFOLDER%\SQLServer-SSEI-Dev.exe') }" -ExecutionPolicy Bypass
REM Install SQLServer Developer Edition:
REM https://docs.microsoft.com/en-us/sql/database-engine/install-windows/install-sql-server-from-the-command-prompt?view=sql-server-2017
%BASEFOLDER%\SQLServer-SSEI-Dev.exe

REM https://github.com/jgstew/bigfix-content/blob/f36708ebf7af38f84a286f3b79131faccb1d2e9c/fixlet/Install%20SQL%20Server%20Management%20Studio%2016.5.1%20-%20Windows.bes
REM Download SQL Server Management Studio:
powershell -command "& { (New-Object Net.WebClient).DownloadFile('https://download.microsoft.com/download/0/5/B/05B2AF8F-906F-4C57-A58E-5780F64F9D62/SSMS-Setup-ENU.exe', '%BASEFOLDER%\SSMS-Setup-ENU.exe') }" -ExecutionPolicy Bypass
REM https://download.microsoft.com/download/0/5/B/05B2AF8F-906F-4C57-A58E-5780F64F9D62/SSMS-Setup-ENU.exe
REM Install SQL Server Management Studio:
%BASEFOLDER%\SSMS-Setup-ENU.exe /install /quiet /norestart

REM for some reason, this didn't create a start menu shortcut it seems for SQL Server Management Studio

REM Download BigFix Root Server:
powershell -command "& { (New-Object Net.WebClient).DownloadFile('http://software.bigfix.com/download/bes/95/BigFix-BES-9.5.9.62.exe', '%BASEFOLDER%\BigFix-BES.exe') }" -ExecutionPolicy Bypass
REM Install:
REM %BASEFOLDER%\BigFix-BES.exe

REM press any key to continue....
pause

Update bigfix_setup_root_eval.bat

Update bigfix_setup_root_eval.bat


echo off
rem call vc.bat
call "C:\Program Files\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" x86

cls
cl /DEBUG /Z7 /c /Ox ring.c  ^
ring_string.c ring_list.c ring_item.c ring_items.c ring_hashtable.c ring_state.c ring_scanner.c ring_parser.c ring_hashlib.c ring_vmgc.c ^
ring_stmt.c ring_expr.c ring_codegen.c ring_vm.c ring_vmexpr.c ring_vmvars.c ^
ring_vmlists.c ring_vmfuncs.c ring_api.c ring_vmoop.c ring_vmcui.c ^
ring_vmtrycatch.c ring_vmstrindex.c ring_vmjump.c ring_vmduprange.c ^
ring_vmperformance.c ring_vmexit.c ring_vmstackvars.c ring_vmstate.c ring_vmmath.c ring_vmfile.c ring_vmos.c ring_vmlistfuncs.c ring_vmrefmeta.c ^
ring_ext.c ring_vmdll.c ring_objfile.c -I"..\include"

link  /DLL /OUT:..\lib\ring.dll /SUBSYSTEM:CONSOLE,"5.01"  ring_string.obj ^
ring_list.obj ring_item.obj ring_items.obj ring_hashtable.obj ring_state.obj ring_scanner.obj ring_parser.obj ring_hashlib.obj ring_vmgc.obj ^
ring_stmt.obj ring_expr.obj ring_codegen.obj ring_vm.obj ring_vmexpr.obj ring_vmvars.obj ^
ring_vmlists.obj ring_vmfuncs.obj ring_api.obj ring_vmoop.obj ring_vmcui.obj ^
ring_vmtrycatch.obj ring_vmstrindex.obj ring_vmjump.obj ring_vmduprange.obj ^
ring_vmperformance.obj ring_vmexit.obj ring_vmstackvars.obj ring_vmstate.obj ring_vmmath.obj ring_vmfile.obj ring_vmos.obj ring_vmlistfuncs.obj ring_vmrefmeta.obj ^
ring_ext.obj ring_vmdll.obj ring_objfile.obj

copy ..\lib\ring.dll ..\bin\

cl /DEBUG /Z7 ring.c ..\lib\ring.lib -I"..\include" /link /SUBSYSTEM:CONSOLE,"5.01" /OUT:..\bin\ring.exe

del *.obj

echo off
rem call vc.bat
call "C:\Program Files\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" x86

cls
rem /DEBUG /Z7
cl /c /Ox ring.c  ^
ring_string.c ring_list.c ring_item.c ring_items.c ring_hashtable.c ring_state.c ring_scanner.c ring_parser.c ring_hashlib.c ring_vmgc.c ^
ring_stmt.c ring_expr.c ring_codegen.c ring_vm.c ring_vmexpr.c ring_vmvars.c ^
ring_vmlists.c ring_vmfuncs.c ring_api.c ring_vmoop.c ring_vmcui.c ^
ring_vmtrycatch.c ring_vmstrindex.c ring_vmjump.c ring_vmduprange.c ^
ring_vmperformance.c ring_vmexit.c ring_vmstackvars.c ring_vmstate.c ring_vmmath.c ring_vmfile.c ring_vmos.c ring_vmlistfuncs.c ring_vmrefmeta.c ^
ring_ext.c ring_vmdll.c ring_objfile.c -I"..\include"

link  /DLL /OUT:..\lib\ring.dll /SUBSYSTEM:CONSOLE,"5.01"  ring_string.obj ^
ring_list.obj ring_item.obj ring_items.obj ring_hashtable.obj ring_state.obj ring_scanner.obj ring_parser.obj ring_hashlib.obj ring_vmgc.obj ^
ring_stmt.obj ring_expr.obj ring_codegen.obj ring_vm.obj ring_vmexpr.obj ring_vmvars.obj ^
ring_vmlists.obj ring_vmfuncs.obj ring_api.obj ring_vmoop.obj ring_vmcui.obj ^
ring_vmtrycatch.obj ring_vmstrindex.obj ring_vmjump.obj ring_vmduprange.obj ^
ring_vmperformance.obj ring_vmexit.obj ring_vmstackvars.obj ring_vmstate.obj ring_vmmath.obj ring_vmfile.obj ring_vmos.obj ring_vmlistfuncs.obj ring_vmrefmeta.obj ^
ring_ext.obj ring_vmdll.obj ring_objfile.obj

copy ..\lib\ring.dll ..\bin\

rem /DEBUG /Z7
cl ring.c ..\lib\ring.lib -I"..\include" /link /SUBSYSTEM:CONSOLE,"5.01" /OUT:..\bin\ring.exe

del *.obj

Update buildvccomplete.bat

Update buildvccomplete.bat


Update ringlibs/weblib/run.bat

Update ringlibs/weblib/run.bat


@echo off
pushd "%~dp0"
echo>&2 WARNING! Working directory is: %~dp0
dotnet run --no-launch-profile -f netcoreapp3.0 -p src -- %*
popd

@echo off
pushd "%~dp0"
echo>&2 WARNING! Working directory is: %~dp0
dotnet run --no-launch-profile -f netcoreapp3.1 -p src -- %*
popd

Fix target framework in "run.cmd" [ci skip]


@echo off
rem
rem Install or update Cygwin.
rem

setlocal

set _PACKAGES=cron,diffutils,inetutils,ncurses,netcat,openssh,p7zip,procps,python,rsync,screen,unzip,vim,zip,genisoimage,w3m,wodim
set _ROOTDIR=C:\cygwin
set _SITE=http://mirrors.xmission.com/cygwin
set _PREFIX=CYGWIN-SETUP:

goto :main

:check_admin
    rem Check for ADMIN privileges
    rem https://sites.google.com/site/eneerge/home/BatchGotAdmin

    echo %_PREFIX% Checking for Administrator privileges
    >nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system"
    if "%ERRORLEVEL%" EQU "0" goto :endif_check_admin
        echo %_PREFIX% ERROR: You do not have Administrator privileges
        echo %_PREFIX% Rerun from a "Run as Administrator" command prompt
        exit /b 1
    :endif_check_admin
goto :eof

:stop_services
    if not exist "%_ROOTDIR%\bin\cygrunsrv.exe" goto :eof
    for /f "usebackq" %%s in (`%_ROOTDIR%\bin\cygrunsrv.exe --list`) do (
        echo %_PREFIX% Stopping %%s
        %_ROOTDIR%\bin\cygrunsrv --stop %%s
    )
goto :eof

:start_services
    for /f "usebackq" %%s in (`%_ROOTDIR%\bin\cygrunsrv.exe --list`) do (
        echo %_PREFIX% Starting %%s
        %_ROOTDIR%\bin\cygrunsrv --start %%s
    )
goto :eof

:get_setup_exe
    if not exist %_ROOTDIR% (
        echo %_PREFIX% Creating %_ROOTDIR%
        mkdir %_ROOTDIR%
    )
    echo %_PREFIX% Fetching latest setup.exe from cygwin.com
    wget --quiet -O %_ROOTDIR%\setup.exe http://cygwin.com/setup.exe
goto :eof

:setup
    echo %_PREFIX% Running setup.exe
    %_ROOTDIR%\setup.exe --site %_SITE% --quiet-mode --no-shortcuts --root %_ROOTDIR% --local-package-dir %_ROOTDIR%\LocalPackageDir --packages %_PACKAGES%
goto :eof

:create_passwd
    if not exist %_ROOTDIR%\etc\passwd (
        echo %_PREFIX% Creating /etc/passwd
        %_ROOTDIR%\bin\bash --login -i -c '/usr/bin/mkpasswd --local > /etc/passwd'
    )
    if not exist %_ROOTDIR%\etc\group (
        echo %_PREFIX% Creating /etc/group
        %_ROOTDIR%\bin\bash --login -i -c '/usr/bin/mkgroup --local > /etc/group'
    )
goto :eof

:config_syslogd
    sc query syslogd | findstr "service does not exist" > NUL:
    if %ERRORLEVEL% NEQ 0 goto :eof

    echo %_PREFIX% Configuring syslogd
    if not exist %_ROOTDIR%\bin\syslogd-config (
        echo %_PREFIX% ERROR: inetutils not installed
        goto :eof
    )
    %_ROOTDIR%\bin\bash --login -i -c "/usr/bin/syslogd-config"
goto :eof

:config_sshd
    sc query sshd | findstr "service does not exist" > NUL:
    if %ERRORLEVEL% NEQ 0 goto :eof

    echo %_PREFIX% Configuring sshd
    if not exist %_ROOTDIR%\bin\ssh-host-config (
        echo %_PREFIX% ERROR: opensshd not installed
        goto :eof
    )
    findstr /r "^sshd:" %_ROOTDIR%\etc\passwd
    if %ERRORLEVEL% EQU 0 (
        echo %_PREFIX% ERROR: sshd account found in /etc/passwd
        goto :eof
    )
    %_ROOTDIR%\bin\bash --login -i -c "/usr/bin/ssh-host-config"
    echo %_PREFIX% Disabling reverse DNS lookup by sshd
    %_ROOTDIR%\bin\bash --login -i -c "/usr/bin/sed -i -e 's/#UseDNS yes/UseDNS no/' /etc/sshd_config"
goto :eof

:config_lsa
    reg query HKLM\SYSTEM\CurrentControlSet\Control\Lsa /v "Authentication Packages" | findstr cyglsa > NUL:
    if %ERRORLEVEL% EQU 0 goto :eof

    echo %_PREFIX% Configuring cyglsa
    %_ROOTDIR%\bin\bash --login -i -c "/usr/bin/cyglsa-config"
goto :eof

:main
    call :check_admin ||exit /b 1
    call :get_setup_exe
    call :stop_services
    call :setup
    call :create_passwd
    call :config_syslogd
    call :config_sshd
    call :start_services
    rem Do config_lsa last so that reboot message is last
    call :config_lsa

:exit

@echo off
rem
rem Install or update Cygwin.
rem

setlocal

set _PACKAGES=cron,diffutils,inetutils,ncurses,netcat,openssh,p7zip,procps,python,rsync,screen,unzip,vim,zip,genisoimage,w3m,wodim
set _ROOTDIR=C:\cygwin
set _SITE=http://mirrors.xmission.com/cygwin
set _PREFIX=CYGWIN-SETUP:

goto :main

:check_admin
    rem Check for ADMIN privileges
    rem https://sites.google.com/site/eneerge/home/BatchGotAdmin

    echo %_PREFIX% Checking for Administrator privileges
    >nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system"
    if "%ERRORLEVEL%" EQU "0" goto :endif_check_admin
        echo %_PREFIX% ERROR: You do not have Administrator privileges
        echo %_PREFIX% Rerun from a "Run as Administrator" command prompt
        exit /b 1
    :endif_check_admin
goto :eof

:stop_services
    if not exist "%_ROOTDIR%\bin\cygrunsrv.exe" goto :eof
    for /f "usebackq" %%s in (`%_ROOTDIR%\bin\cygrunsrv.exe --list`) do (
        echo %_PREFIX% Stopping %%s
        %_ROOTDIR%\bin\cygrunsrv --stop %%s
    )
goto :eof

:start_services
    for /f "usebackq" %%s in (`%_ROOTDIR%\bin\cygrunsrv.exe --list`) do (
        echo %_PREFIX% Starting %%s
        %_ROOTDIR%\bin\cygrunsrv --start %%s
    )
goto :eof

:get_setup_exe
    if not exist %_ROOTDIR% (
        echo %_PREFIX% Creating %_ROOTDIR%
        mkdir %_ROOTDIR%
    )
    echo %_PREFIX% Fetching latest setup.exe from cygwin.com
    wget --quiet -O %_ROOTDIR%\setup.exe http://cygwin.com/setup.exe
goto :eof

:setup
    echo %_PREFIX% Running setup.exe to install standard package set
    %_ROOTDIR%\setup.exe --site %_SITE% --quiet-mode --no-shortcuts --root %_ROOTDIR% --local-package-dir %_ROOTDIR%\LocalPackageDir --packages %_PACKAGES%
    echo %_PREFIX% Running setup.exe for updates
    %_ROOTDIR%\setup.exe --site %_SITE% --quiet-mode --no-shortcuts --root %_ROOTDIR% --local-package-dir %_ROOTDIR%\LocalPackageDir --packages %_PACKAGES%
goto :eof

:create_passwd
    if not exist %_ROOTDIR%\etc\passwd (
        echo %_PREFIX% Creating /etc/passwd
        %_ROOTDIR%\bin\bash --login -i -c '/usr/bin/mkpasswd --local > /etc/passwd'
    )
    if not exist %_ROOTDIR%\etc\group (
        echo %_PREFIX% Creating /etc/group
        %_ROOTDIR%\bin\bash --login -i -c '/usr/bin/mkgroup --local > /etc/group'
    )
goto :eof

:config_syslogd
    sc query syslogd | findstr "service does not exist" > NUL:
    if %ERRORLEVEL% NEQ 0 goto :eof

    echo %_PREFIX% Configuring syslogd
    if not exist %_ROOTDIR%\bin\syslogd-config (
        echo %_PREFIX% ERROR: inetutils not installed
        goto :eof
    )
    %_ROOTDIR%\bin\bash --login -i -c "/usr/bin/syslogd-config"
goto :eof

:config_sshd
    sc query sshd | findstr "service does not exist" > NUL:
    if %ERRORLEVEL% NEQ 0 goto :eof

    echo %_PREFIX% Configuring sshd
    if not exist %_ROOTDIR%\bin\ssh-host-config (
        echo %_PREFIX% ERROR: opensshd not installed
        goto :eof
    )
    findstr /r "^sshd:" %_ROOTDIR%\etc\passwd
    if %ERRORLEVEL% EQU 0 (
        echo %_PREFIX% ERROR: sshd account found in /etc/passwd
        goto :eof
    )
    %_ROOTDIR%\bin\bash --login -i -c "/usr/bin/ssh-host-config"
    echo %_PREFIX% Disabling reverse DNS lookup by sshd
    %_ROOTDIR%\bin\bash --login -i -c "/usr/bin/sed -i -e 's/#UseDNS yes/UseDNS no/' /etc/sshd_config"
goto :eof

:config_lsa
    reg query HKLM\SYSTEM\CurrentControlSet\Control\Lsa /v "Authentication Packages" | findstr cyglsa > NUL:
    if %ERRORLEVEL% EQU 0 goto :eof

    echo %_PREFIX% Configuring cyglsa
    %_ROOTDIR%\bin\bash --login -i -c "/usr/bin/cyglsa-config"
goto :eof

:main
    call :check_admin ||exit /b 1
    call :get_setup_exe
    call :stop_services
    call :setup
    call :create_passwd
    call :config_syslogd
    call :config_sshd
    call :start_services
    rem Do config_lsa last so that reboot message is last
    call :config_lsa

:exit

cygwin-setup.bat: call setup 2nd time to update installed packages


:: Copyright (c) 2012 The Native Client Authors. All rights reserved.
:: Use of this source code is governed by a BSD-style license that can be
:: found in the LICENSE file.

echo on

set BITS=32
set VCBITS=x86

call buildbot\msvs_env.bat %BITS%
call vcvarsall.bat %VCBITS%

:: Standard script emits its own annotator tags.
call python.bat buildbot/buildbot_standard.py coverage %BITS% newlib --coverage
if %ERRORLEVEL% neq 0 exit /b %ERRORLEVEL%

echo @@@BUILD_STEP summarize coverage@@@
call python.bat tools/coverage_summary.py win-x86-%BITS%
if %ERRORLEVEL% neq 0 exit /b %ERRORLEVEL%

:: Stop here and don't archive if on trybots.
if %BUILDBOT_SLAVE_TYPE% equ "" exit /b 0
if %BUILDBOT_SLAVE_TYPE% equ "Trybot" exit /b 0

echo @@@BUILD_STEP archive_coverage@@@
set GSUTIL="\b\build\scripts\slave\gsutil.bat"
set GSD_URL="http://gsdview.appspot.com/nativeclient-coverage2/revs"
set VARIANT_NAME="coverage-win-x86-%BITS%"
set COVERAGE_PATH="%VARIANT_NAME%/html/index.html"
if %BUILDBOT_REVISION% equ "" set BUILDBOT_REVISION=None
set LINK_URL="%GSD_URL%/%BUILDBOT_REVISION%/%COVERAGE_PATH%"
set GSD_BASE="gs://nativeclient-coverage2/revs"
set GS_PATH="%GSD_BASE%/%BUILDBOT_REVISION%/%VARIANT_NAME%"
python /b/build/scripts/slave/gsutil_cp_dir.py -a public-read ^
 scons-out/%VARIANT_NAME%/coverage %GS_PATH%
if %ERRORLEVEL% neq 0 exit /b %ERRORLEVEL%
echo @@@STEP_LINK@view@%LINK_URL%@@@

:: Copyright (c) 2012 The Native Client Authors. All rights reserved.
:: Use of this source code is governed by a BSD-style license that can be
:: found in the LICENSE file.

echo on

set BITS=32
set VCBITS=x86

call buildbot\msvs_env.bat %BITS%
call vcvarsall.bat %VCBITS%

:: Standard script emits its own annotator tags.
call python.bat buildbot/buildbot_standard.py coverage %BITS% newlib --coverage
if %ERRORLEVEL% neq 0 exit /b %ERRORLEVEL%

echo @@@BUILD_STEP summarize coverage@@@
call python.bat tools/coverage_summary.py win-x86-%BITS%
if %ERRORLEVEL% neq 0 exit /b %ERRORLEVEL%

:: Stop here and don't archive if on trybots.
if %BUILDBOT_SLAVE_TYPE% equ "" exit /b 0
if %BUILDBOT_SLAVE_TYPE% equ "Trybot" exit /b 0

echo @@@BUILD_STEP archive_coverage@@@
set GSUTIL="\b\build\scripts\slave\gsutil.bat"
set GSD_URL="http://gsdview.appspot.com/nativeclient-coverage2/revs"
set VARIANT_NAME="coverage-win-x86-%BITS%"
set COVERAGE_PATH="%VARIANT_NAME%/html/index.html"
if %BUILDBOT_REVISION% equ "" set BUILDBOT_REVISION=None
set LINK_URL="%GSD_URL%/%BUILDBOT_REVISION%/%COVERAGE_PATH%"
set GSD_BASE="gs://nativeclient-coverage2/revs"
set GS_PATH="%GSD_BASE%/%BUILDBOT_REVISION%/%VARIANT_NAME%"
call python.bat /b/build/scripts/slave/gsutil_cp_dir.py -a public-read ^
 scons-out/%VARIANT_NAME%/coverage %GS_PATH%
if %ERRORLEVEL% neq 0 exit /b %ERRORLEVEL%
echo @@@STEP_LINK@view@%LINK_URL%@@@

Call python.bat in archive step.

Call python.bat in archive step.

Calling archive coverage python in hopes this will solve archive failure.

BUG=None
TEST=None
R=jfb@chromium.org

Review URL: https://codereview.chromium.org/16218002

git-svn-id: 721b910a23eff8a86f00c8fd261a7587cddf18f8@11429 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2


:: Copyright 2022 The Chromium OS Authors. All rights reserved.
:: Use of this source code is governed by a BSD-style license that can be
:: found in the LICENSE file.

:: Make environment changes (cd, env vars, etc.) local, so they don't affect the calling batch file
setlocal

:: Code under repo is checked out to %KOKORO_ARTIFACTS_DIR%\git.
:: The final directory name in this path is determined by the scm name specified
:: in the job configuration
cd %KOKORO_ARTIFACTS_DIR%\git\crosvm

:: Pin rustup to a known/tested version.
set rustup_version=1.24.3

:: Install rust toolchain through rustup.
echo [%TIME%] installing rustup %rustup_version%
choco install -y rustup.install --version=%rustup_version%

:: Reload path for installed rustup binary
call RefreshEnv.cmd

:: Toolchain version and necessary components will be automatically picked
:: up from rust-toolchain
cargo install bindgen

:: Install python. The default kokoro intalled version is 3.7 but linux tests
:: seem to run on 3.9+.
choco install -y python --version=3.9.0

:: Reload path for installed rust toolchain.
call RefreshEnv.cmd

:: Log the version of the Rust toolchain
echo [%TIME%] Using Rust toolchain version:
cargo --version
rustc --version

:: Log python version
echo [%TIME%] Python version:
py --version

py -m pip install argh --user

echo [%TIME%] Calling crosvm\tools\clippy
py .\tools\clippy
if %ERRORLEVEL% neq 0 ( exit /b %ERRORLEVEL% )

echo [%TIME%] Calling crosvm\tools\run_tests
py .\tools\run_tests --arch win64 -v
if %ERRORLEVEL% neq 0 ( exit /b %ERRORLEVEL% )

exit /b %ERRORLEVEL%

:: Copyright 2022 The Chromium OS Authors. All rights reserved.
:: Use of this source code is governed by a BSD-style license that can be
:: found in the LICENSE file.

:: Make environment changes (cd, env vars, etc.) local, so they don't affect the calling batch file
setlocal

:: Code under repo is checked out to %KOKORO_ARTIFACTS_DIR%\git.
:: The final directory name in this path is determined by the scm name specified
:: in the job configuration
cd %KOKORO_ARTIFACTS_DIR%\git\crosvm

:: Pin rustup to a known/tested version.
set rustup_version=1.24.3

:: Install rust toolchain through rustup.
echo [%TIME%] installing rustup %rustup_version%
choco install --no-progress -y rustup.install --version=%rustup_version%

:: Reload path for installed rustup binary
call RefreshEnv.cmd

:: Toolchain version and necessary components will be automatically picked
:: up from rust-toolchain
cargo install bindgen

:: Install python. The default kokoro intalled version is 3.7 but linux tests
:: seem to run on 3.9+.
choco install --no-progress -y python --version=3.9.0

:: Reload path for installed rust toolchain.
call RefreshEnv.cmd

:: Log the version of the Rust toolchain
echo [%TIME%] Using Rust toolchain version:
cargo --version
rustc --version

:: Log python version
echo [%TIME%] Python version:
py --version

py -m pip install argh --user

echo [%TIME%] Calling crosvm\tools\clippy
py .\tools\clippy
if %ERRORLEVEL% neq 0 ( exit /b %ERRORLEVEL% )

echo [%TIME%] Calling crosvm\tools\run_tests
py .\tools\run_tests --arch win64 -v
if %ERRORLEVEL% neq 0 ( exit /b %ERRORLEVEL% )

exit /b %ERRORLEVEL%

ci: disable chocolatey progress output on Windows

Add the --no-progress option so that choco does not print ten thousand
lines of "Progress: ... X%" messages in the CI logs.

BUG=None
TEST=kokoro CI

Change-Id: I7ec414f4baeeb530f0dc103b256807c7f642ed53
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3657051
Tested-by: kokoro <2ac7b1f3fa578934c95181d4272be0d3bca00121@google.com>
Commit-Queue: Daniel Verkamp <72bc170b46ec491f7bdd4359a1c0bfed274de40c@chromium.org>
Reviewed-by: Dennis Kempin <cd09796fb571bec2782819dbfd33307f65b1c778@google.com>


REM @ECHO off
@SET LIT_VERSION=2.0.3

IF NOT "x%1" == "x" GOTO :%1

:rackspace-monitoring-agent
ECHO "Building agent"
IF NOT EXIST lit.exe CALL Make.bat lit
IF NOT "x%CMAKE_GENERATOR%" == "x" (
  CALL cmake -H. -Bbuild -G "%CMAKE_GENERATOR%"
) ELSE (
  CALL cmake -H. -Bbuild
)
CALL cmake --build build
CALL cmake --build build --target SignExe
GOTO :end

:lit
ECHO "Building lit"
PowerShell -NoProfile -ExecutionPolicy unrestricted -Command "iex ((new-object net.webclient).DownloadString('https://github.com/luvit/lit/raw/%LIT_VERSION%/get-lit.ps1'))"
GOTO :end

:test
CALL Make.bat rackspace-monitoring-agent
CALL lit.exe install
IF EXIST tests\tmpdir RMDIR /S /Q tests\tmpdir
CALL mkdir tests\tmpdir
CALL luvi.exe . -m tests\run.lua
exit /b %errorlevel%
GOTO :end

:package
IF NOT EXIST rackspace-monitoring-agent.exe CALL Make.bat rackspace-monitoring-agent
CALL cmake --build build --target package
CALL cmake --build build --target SignPackage
GOTO :end

:packageupload
call cmake --build build --target packageupload
GOTO :end

:clean
IF EXIST rackspace-monitoring-agent.exe DEL /F /Q rackspace-monitoring-agent.exe
IF EXIST lit.exe DEL /F /Q lit.exe
IF EXIST lit RMDIR /S /Q lit
IF EXIST luvi.exe DEL /F /Q luvi.exe
IF EXIST luvi-binaries RMDIR /S /Q luvi-binaries

:end

REM @ECHO off
@SET LIT_VERSION=2.0.3

IF NOT "x%1" == "x" GOTO :%1

:rackspace-monitoring-agent
ECHO "Building agent"
IF NOT EXIST lit.exe CALL Make.bat lit
if %errorlevel% neq 0 goto error
IF NOT "x%CMAKE_GENERATOR%" == "x" (
  CALL cmake -H. -Bbuild -G "%CMAKE_GENERATOR%"
) ELSE (
  CALL cmake -H. -Bbuild
)
if %errorlevel% neq 0 goto error
CALL cmake --build build
if %errorlevel% neq 0 goto error
CALL cmake --build build --target SignExe
if %errorlevel% neq 0 goto error
GOTO :end

:lit
ECHO "Building lit"
PowerShell -NoProfile -ExecutionPolicy unrestricted -Command "iex ((new-object net.webclient).DownloadString('https://github.com/luvit/lit/raw/%LIT_VERSION%/get-lit.ps1'))"
if %errorlevel% neq 0 goto error
GOTO :end

:test
CALL Make.bat rackspace-monitoring-agent
if %errorlevel% neq 0 goto error
CALL lit.exe install
if %errorlevel% neq 0 goto error
IF EXIST tests\tmpdir RMDIR /S /Q tests\tmpdir
CALL mkdir tests\tmpdir
CALL luvi.exe . -m tests\run.lua
if %errorlevel% neq 0 goto error
GOTO :end

:package
IF NOT EXIST rackspace-monitoring-agent.exe CALL Make.bat rackspace-monitoring-agent
CALL cmake --build build --target package
if %errorlevel% neq 0 goto error
CALL cmake --build build --target SignPackage
if %errorlevel% neq 0 goto error
GOTO :end

:packageupload
call cmake --build build --target packageupload
if %errorlevel% neq 0 goto error
GOTO :end

:clean
IF EXIST rackspace-monitoring-agent.exe DEL /F /Q rackspace-monitoring-agent.exe
IF EXIST lit.exe DEL /F /Q lit.exe
IF EXIST lit RMDIR /S /Q lit
IF EXIST luvi.exe DEL /F /Q luvi.exe
IF EXIST luvi-binaries RMDIR /S /Q luvi-binaries
GOTO :end

:error
exit /b %errorlevel%

:end

fix return code for make.bat

fix return code for make.bat


@echo off

@set SYS_PATH=%PATH%
@set GOGS_SOURCE_PATH=%CD%
@set MINGW64_I386_PATH=C:\mingw-w64\mingw32\bin
@set MINGW64_X86X64_PATH=C:\mingw-w64\mingw64\bin

cd %GOGS_SOURCE_PATH%
go clean
go clean -tags "tidb sqlite cert"

@set CGO_ENABLED=1

echo *************************************************************
echo 1. Setting up environment for MinGW-w64 GCC for 32-bit...
set PATH=%MINGW64_I386_PATH%;%GOPATH%\bin;%SYS_PATH%
echo 2. Setting up environment for golang for 32-bit...
cd %GOROOT%/src
set GOOS=windows
set GOARCH=386
call make.bat --no-clean
cd %GOGS_SOURCE_PATH%
go build -tags "tidb sqlite cert"
copy gogs.exe gogs-i386.exe
go clean -tags "tidb sqlite cert"

@echo *************************************************************
@echo 1. Setting up environment for MinGW-w64 GCC for 64-bit...
@set PATH=%MINGW64_X86X64_PATH%;%GOPATH%\bin;%SYS_PATH%
@echo 2. Setting up environment for golang for 64-bit...
cd %GOROOT%/src
set GOOS=windows
set GOARCH=amd64
call make.bat --no-clean
cd %GOGS_SOURCE_PATH%
go build -tags "tidb sqlite cert"
copy gogs.exe gogs-x86_x64.exe
go clean -tags "tidb sqlite cert"

set PATH=%SYS_PATH%
echo on

@echo off

@set SYS_PATH=%PATH%
@set GOGS_SOURCE_PATH=%CD%
@set MINGW64_I386_PATH=C:\mingw-w64\mingw32\bin
@set MINGW64_X86X64_PATH=C:\mingw-w64\mingw64\bin
REM @set GOROOT=c:\Go
REM @set GOPATH=c:\Projects\Go

REM go get -u github.com/...

cd %GOGS_SOURCE_PATH%
go clean
go clean -tags "tidb sqlite cert"

@set CGO_ENABLED=1

echo *************************************************************
echo 1. Setting up environment for MinGW-w64 GCC for 32-bit...
set PATH=%MINGW64_I386_PATH%;%GOPATH%\bin;%SYS_PATH%
echo 2. Setting up environment for golang for 32-bit...
cd %GOROOT%/src
set GOOS=windows
set GOARCH=386
call make.bat --no-clean
cd %GOGS_SOURCE_PATH%
go build -tags "tidb sqlite cert" -v
copy gogs.exe gogs-i386.exe
go clean -tags "tidb sqlite cert" -v

@echo *************************************************************
@echo 1. Setting up environment for MinGW-w64 GCC for 64-bit...
@set PATH=%MINGW64_X86X64_PATH%;%GOPATH%\bin;%SYS_PATH%
@echo 2. Setting up environment for golang for 64-bit...
cd %GOROOT%/src
set GOOS=windows
set GOARCH=amd64
call make.bat --no-clean
cd %GOGS_SOURCE_PATH%
go build -tags "tidb sqlite cert" -v
copy gogs.exe gogs-x86_x64.exe
go clean -tags "tidb sqlite cert" -v

set PATH=%SYS_PATH%
echo on

update build batch file for x86 and x64.


if not exist "%~dp0..\artifacts\build\dotnet" mkdir "%~dp0..\artifacts\build\dotnet"
if not exist "%~dp0..\artifacts\tools" mkdir "%~dp0..\artifacts\tools"

"%~dp0..\packages\ilmerge.2.14.1208\tools\ilmerge.exe" "%~dp0..\src\ReferenceGenerator\bin\%1\ReferenceGenerator.exe" "%~dp0..\src\ReferenceGenerator\bin\%1\System.Collections.Immutable.dll" "%~dp0..\src\ReferenceGenerator\bin\%1\System.Reflection.Metadata.dll" "%~dp0..\src\ReferenceGenerator\bin\%1\Newtonsoft.Json.dll" /out:"%~dp0..\artifacts\tools\RefGen.exe"  /internalize   /targetplatform:"v4,C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5"
copy "%~dp0..\src\ReferenceGenerator\bin\%1\ReferenceGenerator.exe.config" "%~dp0..\artifacts\tools\RefGen.exe.config" /y
copy "%~dp0..\src\ReferenceGenerator\NuSpec.ReferenceGenerator.targets" "%~dp0..\artifacts\build\dotnet\NuSpec.ReferenceGenerator.targets" /y

if not exist "%~dp0..\artifacts\build\dotnet" mkdir "%~dp0..\artifacts\build\dotnet"
if not exist "%~dp0..\artifacts\build\portable-win8+net45+wp8" mkdir "%~dp0..\artifacts\build\portable-win8+net45+wp8"
if not exist "%~dp0..\artifacts\tools" mkdir "%~dp0..\artifacts\tools"

"%~dp0..\packages\ilmerge.2.14.1208\tools\ilmerge.exe" "%~dp0..\src\ReferenceGenerator\bin\%1\ReferenceGenerator.exe" "%~dp0..\src\ReferenceGenerator\bin\%1\System.Collections.Immutable.dll" "%~dp0..\src\ReferenceGenerator\bin\%1\System.Reflection.Metadata.dll" "%~dp0..\src\ReferenceGenerator\bin\%1\Newtonsoft.Json.dll" /out:"%~dp0..\artifacts\tools\RefGen.exe"  /internalize   /targetplatform:"v4,C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5"
copy "%~dp0..\src\ReferenceGenerator\bin\%1\ReferenceGenerator.exe.config" "%~dp0..\artifacts\tools\RefGen.exe.config" /y
copy "%~dp0..\src\ReferenceGenerator\NuSpec.ReferenceGenerator.targets" "%~dp0..\artifacts\build\dotnet\NuSpec.ReferenceGenerator.targets" /y
copy "%~dp0..\src\ReferenceGenerator\NuSpec.ReferenceGenerator.targets" "%~dp0..\artifacts\build\portable-win8+net45+wp8\NuSpec.ReferenceGenerator.targets" /y

add build targets to profile259

add build targets to profile259


:: this batch script assumes that you have the basic GNU tools (installed with RTools)
@ECHO off
reg query HKEY_CURRENT_USER\Environment /v path | grep -o "REG_SZ.*" | cut -d" " -f5 > temp.txt
set /p VAR=<temp.txt
SETX Path %~dp0\lib\tbb;%VAR%
rm temp.txt

:: this batch script assumes that you have the basic GNU tools (installed with RTools)
@ECHO off
reg query HKEY_CURRENT_USER\Environment /v path | sed -n 's/.*REG_SZ[ ]*//p' > temp.txt
set /p VAR=<temp.txt
SETX Path %~dp0lib\tbb;%VAR%
rm temp.txt

use sed instead of grep and cut

use sed instead of grep and cut


:: Create and initialize a Python Virtual Environment
echo "Creating virtual env - .env"
virtualenv .env

echo "starting virtualenv - .env"
call .env\Scripts\activate.bat

:: Create a directory to put things in
echo "Creating 'setup' directory"
mkdir setup

:: Move the relevant files into setup directory
echo "Moving creds.json and function file(s) to setup dir"
xcopy .\creds.json .\setup\creds.json /Q /R /Y
F
xcopy .\sparrow_kms.py setup\ /Q /R /Y
xcopy .\sparrow_nokms.py setup\ /Q /R /Y
cd .\setup

:: Install requirements
echo "pip installing requirements from requirements file in target directory"
pip install -r ..\requirements.txt -t .

:: Prepares the deployment package
echo "Setting up your 7zip PATH - This assumes the installation location of 7zip is in C:\Program Files\7-Zip\"
set PATH=%PATH%;C:\Program Files\7-Zip\

echo "Zipping package"
7z a -r ..\package.zip .\*

:: Remove the setup directory used
echo "Removing setup directory and virtual environment"
cd ..
rd /Q /S .\setup
call .env\Scripts\deactivate.bat
rd /Q /S .\.env

:: changing dirs back to dir from before
echo "Opening folder containg function package - 'package.zip'"
explorer .

rem Create and initialize a Python Virtual Environment
echo "Creating virtual env - .env"
virtualenv .env

echo "starting virtualenv - .env"
call .env\Scripts\activate.bat

rem Create a directory to put things in
echo "Creating 'setup' directory"
mkdir setup

rem Move the relevant files into setup directory
echo "Moving creds.json and function file(s) to setup dir"
xcopy .\creds.json .\setup\creds.json /Q /R /Y
F
xcopy .\sparrow_kms.py setup\ /Q /R /Y
xcopy .\sparrow_nokms.py setup\ /Q /R /Y
cd .\setup

rem Install requirements
echo "pip installing requirements from requirements file in target directory"
pip install -r ..\requirements.txt -t .

rem Prepares the deployment package
echo "Setting up your 7zip PATH - This assumes the installation location of 7zip is in C:\Program Files\7-Zip\"
set PATH=%PATH%;C:\Program Files\7-Zip\

echo "Zipping package"
7z a -r ..\package.zip .\*

rem Remove the setup directory used
echo "Removing setup directory and virtual environment"
cd ..
rd /Q /S .\setup
call .env\Scripts\deactivate.bat
rd /Q /S .\.env

rem changing dirs back to dir from before
echo "Opening folder containg function package - 'package.zip'"
explorer .

add correct comment syntax

add correct comment syntax


@echo off
rem
rem Uninstall Cygwin.
rem See http://cygwin.com/faq/faq-nochunks.html#faq.setup.uninstall-all
rem
rem This would be much easier to implement as a shell script, but
rem sometimes the whole point of uninstalling Cygwin is that it is in a
rem non-working state.
rem
rem Copyright (c) 2012-2013 Tom Schutter
rem All rights reserved.
rem
rem Redistribution and use in source and binary forms, with or without
rem modification, are permitted provided that the following conditions
rem are met:
rem
rem    - Redistributions of source code must retain the above copyright
rem      notice, this list of conditions and the following disclaimer.
rem    - Redistributions in binary form must reproduce the above
rem      copyright notice, this list of conditions and the following
rem      disclaimer in the documentation and/or other materials provided
rem      with the distribution.
rem
rem THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
rem "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
rem LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
rem FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
rem COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
rem INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
rem BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
rem LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
rem CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
rem LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
rem ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
rem POSSIBILITY OF SUCH DAMAGE.
rem

setlocal

rem Global constants.
set _PREFIX=CYGWIN_UNINSTALL:

goto :main

:load_config
    set _CONFFILE=%~dp0\cygwin_setup_config.bat
    if exist "%_CONFFILE%" goto :endif_check_conffile
        echo %_PREFIX% ERROR: Configuration file "%_CONFFILE%" not found.
        exit /b 1
    :endif_check_conffile
    set _ROOTDIR=
    call "%_CONFFILE%"
    if "%_ROOTDIR%" == "" (
        echo %_PREFIX% ERROR: _ROOTDIR not defined in "%_CONFFILE%"
        exit /b 1
    )
exit /b 0

:check_rootdir
    rem Return 1 if _ROOTDIR is not a Cygwin root directory, 0 otherwise.
    echo %_PREFIX% Checking if %_ROOTDIR% is valid...
    if exist "%_ROOTDIR%" goto :endif_rootdir
        echo %_PREFIX% ERROR: ROOTDIR "%_ROOTDIR%" does not exist.
        exit /b 1
    :endif_rootdir
    if exist "%_ROOTDIR%\Cygwin.ico" goto :endif_cygwin_ico
        echo %_PREFIX% ERROR: ROOTDIR "%_ROOTDIR%" does not appear to be a Cygwin directory.
        exit /b 1
    :endif_cygwin_ico
exit /b 0

:check_admin
    rem Check for ADMIN privileges.  Return 1 if script is not being
    rem run as Administrator, 0 if it is.
    rem https://sites.google.com/site/eneerge/home/BatchGotAdmin

    echo %_PREFIX% Checking for Administrator privileges...
    >nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system"
    if "%ERRORLEVEL%" EQU "0" goto :endif_check_admin
        echo %_PREFIX% ERROR: You do not have Administrator privileges
        echo %_PREFIX% Rerun from a "Run as Administrator" command prompt
        exit /b 1
    :endif_check_admin
exit /b 0

:uninstall_lsa
    rem Return 1 if problems encountered when uninstalling cyglsa, 0 otherwise.
    echo %_PREFIX% Checking if cyglsa is hooked into OS...
    reg query HKLM\SYSTEM\CurrentControlSet\Control\Lsa /v "Authentication Packages" | findstr cyglsa > NUL:
    if %ERRORLEVEL% NEQ 0 exit /b 0

    echo %_PREFIX% Checking for sane Authentication Packages value...
    for /f "usebackq tokens=4-9" %%f in (`reg query HKLM\SYSTEM\CurrentControlSet\Control\Lsa /v "Authentication Packages"`) do set _AP_VALUE=%%f
    set _AP_VALUEQ=%_AP_VALUE:\0=?%
    for /f "usebackq delims=? tokens=1,2,3" %%f in ('%_AP_VALUEQ%') do (
        set _AP_VALUE_0=%%f
        set _AP_VALUE_1=%%g
        set _AP_VALUE_2=%%h
    )
    if not "%_AP_VALUE_0%" == "msv1_0" goto :lsa_bad
    echo %_AP_VALUE_1% | findstr cyglsa > NUL:
    if %ERRORLEVEL% NEQ 0 goto :lsa_bad
    if not "%_AP_VALUE_2%" == "" goto :lsa_bad

    echo %_PREFIX% Unhooking cyglsa
    reg add HKLM\SYSTEM\CurrentControlSet\Control\Lsa /v "Authentication Packages" /t REG_MULTI_SZ /f /d msv1_0
    echo %_PREFIX% Please reboot and rerun this script
    exit /b 1

    :lsa_bad
    echo %_PREFIX% ERROR: Don't know how to handle Authentication Packages value of %_AP_VALUE%
exit /b 1

:stop_services
    echo %_PREFIX% Stopping Cygwin services
    for /f "usebackq" %%s in (`%_ROOTDIR%\bin\cygrunsrv.exe --list`) do %_ROOTDIR%\bin\cygrunsrv --stop %%s
goto :eof

:check_for_cygwin_proc
    rem Check for any Cygwin processes.  Return 1 if uninstall should be aborted, 0 otherwise.
    echo %_PREFIX% Checking for running Cygwin processes...
    if not exist "%_ROOTDIR%\bin\ps.exe" exit /b 0
    set _TEMPFILE=%TEMP%\cygwin_setup.txt
    :retry
        "%_ROOTDIR%\bin\ps.exe" -l | findstr /v /c:"/usr/bin/ps" > %_TEMPFILE%
        findstr /v /r /c:"PID.*COMMAND" %_TEMPFILE% | findstr /r /c:"^..*" > NUL:
        if ERRORLEVEL 1 goto :ignore
        echo %_PREFIX% Found running Cygwin processes
        type %_TEMPFILE%
        del %_TEMPFILE%
        :ask_abort_retry_ignore
            set /p _ANSWER=Abort, Retry, or Ignore?
            set _ANSWER=%_ANSWER:~0,1%
            if "%_ANSWER%" == "a" exit /b 1
            if "%_ANSWER%" == "A" exit /b 1
            if "%_ANSWER%" == "r" goto :retry
            if "%_ANSWER%" == "R" goto :retry
            if "%_ANSWER%" == "i" goto :ignore
            if "%_ANSWER%" == "I" goto :ignore
        goto :ask_abort_retry_ignore
    :ignore
exit /b 0

:remove_services
    echo %_PREFIX% Removing Cygwin services
    for /f "usebackq" %%s in (`%_ROOTDIR%\bin\cygrunsrv.exe --list`) do %_ROOTDIR%\bin\cygrunsrv --remove %%s
goto :eof

:clean_registry
    echo %_PREFIX% Removing Software\Cygwin from registry
    reg delete HKLM\Software\Cygwin /va /f > NUL: 2>&1
    reg delete HKLM\Software\Wow6432Node\Cygwin /va /f > NUL: 2>&1
    reg delete HKCU\Software\Cygwin /va /f > NUL: 2>&1
goto :eof

:remove_cygwin_dir
    echo %_PREFIX% Removing %_ROOTDIR%
    rd /s /q %_ROOTDIR%
goto :eof

:remove_shortcuts
    echo %_PREFIX% Remove Cygwin shell shortcuts from Desktop and Start menu!
goto :eof

:is_cygwin_user
    rem Return 1 if the %1 user appears to have been created by Cygwin, 0 otherwise.
    set _HOMEDIR=
    for /f "usebackq tokens=3*" %%d in (`net user %1 2^>NUL ^| findstr /c:"Home\ directory" 2^>NUL`) do set _HOMEDIR=%%d
    if "%_HOMEDIR%" == "" exit /b 0
    echo %_HOMEDIR% | findstr /lib "%_ROOTDIR%" >NUL && exit /b 1
exit /b 0

:remove_local_user
    :remove_local_user_ask
        set /p _ANSWER=%_PREFIX% Remove local Cygwin user "%1" (y/n)?
        if "%_ANSWER%" == "n" goto :eof
        if "%_ANSWER%" == "N" goto :eof
        if "%_ANSWER%" == "y" goto :remove_local_user_ask_done
        if "%_ANSWER%" == "Y" goto :remove_local_user_ask_done
        goto :remove_local_user_ask
    :remove_local_user_ask_done
    echo %_PREFIX% Removing local user "%1"
    net user %1 /remove
goto :eof

:remove_local_cygwin_users
    echo %_PREFIX% Searching for users created by Cygwin...
    for /f "usebackq tokens=*" %%l in (`net user`) do (
        rem %%l is a line of output from "net user", split it into words.
        for %%u in (%%l) do (
            rem Note that many of these "users" are just cruft from the "net user" command.
            call :is_cygwin_user %%u || call :remove_local_user %%u
        )
    )
goto :eof

:main
    call :load_config ||exit /b 1
    call :check_rootdir ||exit /b 1
    call :check_admin ||exit /b 1
    call :remove_local_cygwin_users
    call :uninstall_lsa ||exit /b 1
    call :stop_services
    call :check_for_cygwin_proc ||exit /b 1
    call :remove_services
    call :clean_registry
    call :remove_cygwin_dir
    call :remove_shortcuts
    call :remove_local_users

@echo off
rem
rem Uninstall Cygwin.
rem See http://cygwin.com/faq/faq-nochunks.html#faq.setup.uninstall-all
rem
rem This would be much easier to implement as a shell script, but
rem sometimes the whole point of uninstalling Cygwin is that it is in a
rem non-working state.
rem
rem Copyright (c) 2012-2013 Tom Schutter
rem All rights reserved.
rem
rem Redistribution and use in source and binary forms, with or without
rem modification, are permitted provided that the following conditions
rem are met:
rem
rem    - Redistributions of source code must retain the above copyright
rem      notice, this list of conditions and the following disclaimer.
rem    - Redistributions in binary form must reproduce the above
rem      copyright notice, this list of conditions and the following
rem      disclaimer in the documentation and/or other materials provided
rem      with the distribution.
rem
rem THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
rem "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
rem LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
rem FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
rem COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
rem INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
rem BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
rem LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
rem CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
rem LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
rem ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
rem POSSIBILITY OF SUCH DAMAGE.
rem

setlocal

rem Global constants.
set _PREFIX=CYGWIN_UNINSTALL:

goto :main

:load_config
    set _CONFFILE=%~dp0\cygwin_setup_config.bat
    if exist "%_CONFFILE%" goto :endif_check_conffile
        echo %_PREFIX% ERROR: Configuration file "%_CONFFILE%" not found.
        exit /b 1
    :endif_check_conffile
    set _ROOTDIR=
    call "%_CONFFILE%"
    if "%_ROOTDIR%" == "" (
        echo %_PREFIX% ERROR: _ROOTDIR not defined in "%_CONFFILE%"
        exit /b 1
    )
exit /b 0

:check_rootdir
    rem Return 1 if _ROOTDIR is not a Cygwin root directory, 0 otherwise.
    echo %_PREFIX% Checking if %_ROOTDIR% is valid...
    if exist "%_ROOTDIR%" goto :endif_rootdir
        echo %_PREFIX% ERROR: ROOTDIR "%_ROOTDIR%" does not exist.
        exit /b 1
    :endif_rootdir
    if exist "%_ROOTDIR%\Cygwin.ico" goto :endif_cygwin_ico
        echo %_PREFIX% ERROR: ROOTDIR "%_ROOTDIR%" does not appear to be a Cygwin directory.
        exit /b 1
    :endif_cygwin_ico
exit /b 0

:check_admin
    rem Check for ADMIN privileges.  Return 1 if script is not being
    rem run as Administrator, 0 if it is.
    rem https://sites.google.com/site/eneerge/home/BatchGotAdmin

    echo %_PREFIX% Checking for Administrator privileges...
    >nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system"
    if "%ERRORLEVEL%" EQU "0" goto :endif_check_admin
        echo %_PREFIX% ERROR: You do not have Administrator privileges
        echo %_PREFIX% Rerun from a "Run as Administrator" command prompt
        exit /b 1
    :endif_check_admin
exit /b 0

:uninstall_lsa
    rem Return 1 if problems encountered when uninstalling cyglsa, 0 otherwise.
    echo %_PREFIX% Checking if cyglsa is hooked into OS...
    reg query HKLM\SYSTEM\CurrentControlSet\Control\Lsa /v "Authentication Packages" | findstr cyglsa > NUL:
    if %ERRORLEVEL% NEQ 0 exit /b 0

    echo %_PREFIX% Checking for sane Authentication Packages value...
    for /f "usebackq tokens=4-9" %%f in (`reg query HKLM\SYSTEM\CurrentControlSet\Control\Lsa /v "Authentication Packages"`) do set _AP_VALUE=%%f
    set _AP_VALUEQ=%_AP_VALUE:\0=?%
    for /f "usebackq delims=? tokens=1,2,3" %%f in ('%_AP_VALUEQ%') do (
        set _AP_VALUE_0=%%f
        set _AP_VALUE_1=%%g
        set _AP_VALUE_2=%%h
    )
    if not "%_AP_VALUE_0%" == "msv1_0" goto :lsa_bad
    echo %_AP_VALUE_1% | findstr cyglsa > NUL:
    if %ERRORLEVEL% NEQ 0 goto :lsa_bad
    if not "%_AP_VALUE_2%" == "" goto :lsa_bad

    echo %_PREFIX% Unhooking cyglsa
    reg add HKLM\SYSTEM\CurrentControlSet\Control\Lsa /v "Authentication Packages" /t REG_MULTI_SZ /f /d msv1_0
    echo %_PREFIX% Please reboot and rerun this script
    exit /b 1

    :lsa_bad
    echo %_PREFIX% ERROR: Don't know how to handle Authentication Packages value of %_AP_VALUE%
exit /b 1

:stop_services
    echo %_PREFIX% Stopping Cygwin services
    for /f "usebackq" %%s in (`%_ROOTDIR%\bin\cygrunsrv.exe --list`) do %_ROOTDIR%\bin\cygrunsrv --stop %%s
goto :eof

:check_for_cygwin_proc
    rem Check for any Cygwin processes.  Return 1 if uninstall should be aborted, 0 otherwise.
    echo %_PREFIX% Checking for running Cygwin processes...
    if not exist "%_ROOTDIR%\bin\ps.exe" exit /b 0
    set _TEMPFILE=%TEMP%\cygwin_setup.txt
    :retry
        "%_ROOTDIR%\bin\ps.exe" -l | findstr /v /c:"/usr/bin/ps" > %_TEMPFILE%
        findstr /v /r /c:"PID.*COMMAND" %_TEMPFILE% | findstr /r /c:"^..*" > NUL:
        if ERRORLEVEL 1 goto :ignore
        echo %_PREFIX% Found running Cygwin processes
        type %_TEMPFILE%
        del %_TEMPFILE%
        :ask_abort_retry_ignore
            set /p _ANSWER=Abort, Retry, or Ignore?
            set _ANSWER=%_ANSWER:~0,1%
            if "%_ANSWER%" == "a" exit /b 1
            if "%_ANSWER%" == "A" exit /b 1
            if "%_ANSWER%" == "r" goto :retry
            if "%_ANSWER%" == "R" goto :retry
            if "%_ANSWER%" == "i" goto :ignore
            if "%_ANSWER%" == "I" goto :ignore
        goto :ask_abort_retry_ignore
    :ignore
exit /b 0

:remove_services
    echo %_PREFIX% Removing Cygwin services
    for /f "usebackq" %%s in (`%_ROOTDIR%\bin\cygrunsrv.exe --list`) do %_ROOTDIR%\bin\cygrunsrv --remove %%s
goto :eof

:clean_registry
    echo %_PREFIX% Removing Software\Cygwin from registry
    reg delete HKLM\Software\Cygwin /va /f > NUL: 2>&1
    reg delete HKLM\Software\Wow6432Node\Cygwin /va /f > NUL: 2>&1
    reg delete HKCU\Software\Cygwin /va /f > NUL: 2>&1
goto :eof

:remove_cygwin_dir
    echo %_PREFIX% Removing %_ROOTDIR%
    rd /s /q %_ROOTDIR%
goto :eof

:remove_shortcuts
    echo %_PREFIX% Remove Cygwin shell shortcuts from Desktop and Start menu!
goto :eof

:is_cygwin_user
    rem Return 1 if the %1 user appears to have been created by Cygwin, 0 otherwise.
    set _HOMEDIR=
    for /f "usebackq tokens=3*" %%d in (`net user %1 2^>NUL ^| findstr /c:"Home\ directory" 2^>NUL`) do set _HOMEDIR=%%d
    if "%_HOMEDIR%" == "" exit /b 0
    echo %_HOMEDIR% | findstr /lib "%_ROOTDIR%" >NUL && exit /b 1
exit /b 0

:remove_local_user
    :remove_local_user_ask
        set /p _ANSWER=%_PREFIX% Remove local Cygwin user "%1" (y/n)?
        if "%_ANSWER%" == "n" goto :eof
        if "%_ANSWER%" == "N" goto :eof
        if "%_ANSWER%" == "y" goto :remove_local_user_ask_done
        if "%_ANSWER%" == "Y" goto :remove_local_user_ask_done
        goto :remove_local_user_ask
    :remove_local_user_ask_done
    echo %_PREFIX% Removing local user "%1"
    net user %1 /delete
goto :eof

:remove_local_cygwin_users
    echo %_PREFIX% Searching for users created by Cygwin...
    for /f "usebackq tokens=*" %%l in (`net user`) do (
        rem %%l is a line of output from "net user", split it into words.
        for %%u in (%%l) do (
            rem Note that many of these "users" are just cruft from the "net user" command.
            call :is_cygwin_user %%u || call :remove_local_user %%u
        )
    )
goto :eof

:main
    call :load_config ||exit /b 1
    call :check_rootdir ||exit /b 1
    call :check_admin ||exit /b 1
    call :remove_local_cygwin_users
    call :uninstall_lsa ||exit /b 1
    call :stop_services
    call :check_for_cygwin_proc ||exit /b 1
    call :remove_services
    call :clean_registry
    call :remove_cygwin_dir
    call :remove_shortcuts
    call :remove_local_cygwin_users

fix removal of local users

cygwin_uninstall.bat: fix removal of local users


call mvn dependency:get -DrepoUrl=https://oss.sonatype.org/content/repositories/snapshots -Dartifact=com.hazelcast:hazelcast:3.4-SNAPSHOT -Ddest=hazelcast.jar
start "hazelcast" java -cp hazelcast.jar -Dhazelcast.config=script\hazelcast.xml com.hazelcast.core.server.StartServer
ping -n 10 127.0.0.1 >nul
nunit-console /xml:"console-text.xml" "Hazelcast.Test/Hazelcast.Test.nunit"
ping -n 10 127.0.0.1 >nul
taskkill /F /FI "WINDOWTITLE eq hazelcast"

call mvn dependency:get -DrepoUrl=https://oss.sonatype.org/content/repositories/snapshots -Dartifact=com.hazelcast:hazelcast:3.5-SNAPSHOT -Ddest=hazelcast.jar
start "hazelcast" java -cp hazelcast.jar -Dhazelcast.config=script\hazelcast.xml com.hazelcast.core.server.StartServer
ping -n 10 127.0.0.1 >nul
nunit-console /xml:"console-text.xml" "Hazelcast.Test/Hazelcast.Test.nunit"
ping -n 10 127.0.0.1 >nul
taskkill /F /FI "WINDOWTITLE eq hazelcast"

Update csharp.bat

Update csharp.bat


@echo off
:: Note: should be configured by every user
set cmake=C:\Programs\CMake\bin
set mingw=C:\Programs\mingw\bin

set build_root=..\build
set name=note
set generator=%1
set config=%2

:: Inject our executables
set path=%path%;%cmake%;%mingw%;

call:update_build_dir

:: Generate files if it was not done before.
:: Note: this will not stop execution in case of error(s)
if NOT exist %build_root%\NUL (
	call generate_proj.bat %generator%
	)

if "%config%" == "" (
	set config=Debug
	)

pushd %build_root%

:: Build all
cmake --build . --config %config%
if NOT %errorlevel% == 0 (
	goto:eof
	)

:: Check with tests
ctest -C %config%
if NOT %errorlevel% == 0 (
	goto:eof
	)

:: Install all
:: cmake --build . --config %config% --target install
:: Workaround for broken CMake's Makefile install (?)
cmake -DBUILD_TYPE=%config% -P cmake_install.cmake

popd

:: End
goto:eof

:update_build_dir
	if "%generator%" == "" (
		set generator=msvc
	)

	if "%generator%" == "clang" (
		set build_root=%build_root%_clang
	) else if "%generator%" == "gcc" (
		set build_root=%build_root%_gcc
	) else if "%generator%" == "msvc" (
		set build_root=%build_root%_msvc
	)
goto:eof

@echo off
:: Note: should be configured by every user
set cmake=C:\Programs\CMake\bin
set mingw=C:\Programs\mingw\bin

set build_root=..\build
set name=note
set generator=%1
set config=%2

:: Inject our executables
set path=%path%;%cmake%;%mingw%;

call:update_build_dir

:: Generate files if it was not done before.
:: Note: this will not stop execution in case of error(s)
if NOT exist %build_root%\NUL (
	call generate_proj.bat %generator%
	)

if "%config%" == "" (
	set config=Debug
	)

pushd %build_root%

:: Build all
cmake --build . --config %config%
if NOT %errorlevel% == 0 (
	goto:eof
	)

:: Check with tests
ctest -C %config% --verbose
if NOT %errorlevel% == 0 (
	goto:eof
	)

:: Install all
:: cmake --build . --config %config% --target install
:: Workaround for broken CMake's Makefile install (?)
cmake -DBUILD_TYPE=%config% -P cmake_install.cmake

popd

:: End
goto:eof

:update_build_dir
	if "%generator%" == "" (
		set generator=msvc
	)

	if "%generator%" == "clang" (
		set build_root=%build_root%_clang
	) else if "%generator%" == "gcc" (
		set build_root=%build_root%_gcc
	) else if "%generator%" == "msvc" (
		set build_root=%build_root%_msvc
	)
goto:eof

Make ctest output gtests output

Make ctest output gtests output


call ant doc
svn delete https://mireka.googlecode.com/svn/doc -m "public doc is removed before update"
svn import --auto-props build/doc https://mireka.googlecode.com/svn/doc -m "public doc is updated"

fix upload-doc.bat, svn commands were not called


java -jar Collate-TUI.jar collate from src/main to collated/main include java, fxml, css

java -jar Collate-TUI.jar collate from src/test to collated/test include java

java -jar Collate-TUI.jar collate from unused to collated/unused include java, fxml, css

Add newline to end of file

Add newline to end of file


:: 用于提交当前变更(windows)
:: author: houbb
:: LastUpdateTime:  2018-11-22 09:08:52
:: 用法：双击运行，或者当前路径 cmd 直接输入 release.bat

git add .
git commit -m "[Feature] add for new"
git push
git status

:: 用于提交当前变更(windows)
:: author: houbb
:: LastUpdateTime:  2018-11-22 09:08:52
:: 用法：双击运行，或者当前路径 cmd 直接输入 .\cgit.bat

git add .
git commit -m "[Feature] add for new"
git push
git status

add for new

[Feature] add for new


@echo off
cls
echo.
echo.   Installing ArcGIS Pro without prompts, according to ENV Yukon standards
echo.
setlocal
set root=%~dp0
pushd %~dp0

:checkPrivileges
  :: courtesy of https://ss64.com/nt/syntax-elevate.html
  echo. & echo Testing: for admin privileges...
  fsutil dirty query %SYSTEMDRIVE% >nul
  if %errorLevel% NEQ 0 (
     echo ** Please rerun this script from an elevated command prompt. Exiting...
     ping 127.0.0.1 3>&1 > nul
     exit /B 1
  )
  echo Success: this script is running elevated.

:checkDotNet
  :: Check for .NET courtesy of @curtvprice
  echo. & echo Testing: for correct Dot Net framework
  REM set key=HKLM\SOFTWARE\Microsoft\.NETFrameworkDOESNOTEXIST
  set key=HKLM\SOFTWARE\Microsoft\.NETFramework
  :: 4.6.1 x64
  %WINDIR%\system32\reg.exe query %key%  /f ".NETFramework,Version=v4.6.1" /k /s >NUL
  if %errorLevel% NEQ 0 (
     echo ** Microsoft .NET Framework 4.6.1 ^(x64^) must be installed first
     echo.  Run "%root%\4-Config\install-DotNet.vbs"
     echo.  and then try again.
     ping 127.0.0.1 3>&1 > nul
     exit /B 1
  )
  echo Success: Microsoft .NET Framework 4.6.1 ^(x64^) verified

  call :install_pro

timeout /t 15
popd
goto :eof

:: --------------- Routines ------------------

:install_pro
REM https://pro.arcgis.com/en/pro-app/get-started/arcgis-pro-installation-administration.htm
  echo & . echo. Installing ArcGIS Pro...
  pushd %~dp0\1-Pro
  echo %cd%
  %SystemRoot%\System32\msiexec.exe /I ^
      %cd%\ArcGISPro.msi ^
      ESRI_LICENSE_HOST=LICSERVER ^
      SOFTWARE_CLASS=Viewer ^
      AUTHORIZATION_TYPE=CONCURRENT_USE ^
      LOCK_AUTH_SETTINGS=FALSE ^
      INSTALLDIR=C:\ArcGIS ^
      ALLUSERS=1 ^
      CHECKFORUPDATESATSTARTUP=0 ^
      ENABLEEUEI=0 ^
      /L* "%TEMP%\%~nx0.log" ^
      /qb
  popd
  echo. Logfile: "%TEMP%\%~nx0.log"
  goto :eof

:: ----- NOTES -----
:: check* routines must appear in top block and can't be called, else
:: the `exit /b` command will only exit the block and not the parent
:: script.

@echo off
cls
echo.
echo.   Installing ArcGIS Pro without prompts, according to ENV Yukon standards
echo.
setlocal
set root=%~dp0
pushd %~dp0

:checkPrivileges
  :: courtesy of https://ss64.com/nt/syntax-elevate.html
  echo. & echo Testing: for admin privileges...
  fsutil dirty query %SYSTEMDRIVE% >nul
  if %errorLevel% NEQ 0 (
     echo ** Please rerun this script from an elevated command prompt. Exiting...
     timeout /t 7
     exit /B 1
  )
  echo Success: this script is running elevated.

:checkDotNet
  :: Check for .NET courtesy of @curtvprice
  echo. & echo Testing: for correct Dot Net framework
  REM set key=HKLM\SOFTWARE\Microsoft\.NETFrameworkDOESNOTEXIST
  set key=HKLM\SOFTWARE\Microsoft\.NETFramework
  :: 4.6.1 x64
  %WINDIR%\system32\reg.exe query %key%  /f ".NETFramework,Version=v4.6.1" /k /s >NUL
  if %errorLevel% NEQ 0 (
     echo ** Microsoft .NET Framework 4.6.1 ^(x64^) must be installed first
     echo.  Run "%root%\4-Config\install-DotNet.vbs"
     echo.  and then try again.
     timeout /t 7
     exit /B 1
  )
  echo Success: Microsoft .NET Framework 4.6.1 ^(x64^) verified

  call :install_pro

timeout /t 15
popd
goto :eof

:: --------------- Routines ------------------

:install_pro
REM https://pro.arcgis.com/en/pro-app/get-started/arcgis-pro-installation-administration.htm
  echo & . echo. Installing ArcGIS Pro...
  pushd %~dp0\1-Pro
  echo %cd%
  %SystemRoot%\System32\msiexec.exe /I ^
      %cd%\ArcGISPro.msi ^
      ESRI_LICENSE_HOST=LICSERVER ^
      SOFTWARE_CLASS=Viewer ^
      AUTHORIZATION_TYPE=CONCURRENT_USE ^
      LOCK_AUTH_SETTINGS=FALSE ^
      INSTALLDIR=C:\ArcGIS ^
      ALLUSERS=1 ^
      CHECKFORUPDATESATSTARTUP=0 ^
      ENABLEEUEI=0 ^
      /L* "%TEMP%\%~nx0.log" ^
      /qb
  popd
  echo. Logfile: "%TEMP%\%~nx0.log"
  goto :eof

:: ----- NOTES -----
:: check* routines must appear in top block and can't be called, else
:: the `exit /b` command will only exit the block and not the parent
:: script.

use timeout instead of ping hack

use timeout instead of ping hack