@setlocal
@set PROMPT=$$$S

@pushd "%~dp0"

if exist "%~dp0Misc\version.cmd" call "%~dp0Misc\version.cmd"

if exist goarch.txt for /F %%I in (goarch.txt) do set "GOARCH=%%I"
if "%GOARCH%" == "" for /F "delims=/ tokens=2" %%I in ('go version') do set "GOARCH=%%I"

if "%GOPATH%" == "" set "GOPATH=%USERPROFILE%\go"
for /F "delims=; tokens=1" %%I in ("%GOPATH%") do set "GOPATH1ST=%%I"

call :"%~1" %2 %3 %4 %5 %6
@popd
@endlocal
@exit /b

:""
        for /F %%I in ('git describe --tags') do set "X_VERSION=-X main.version=%%I"
        call :"build"
        @exit /b 0

:"debug"
        set "TAGS=-tags=debug"
        call :"build"
        @exit /b

:"release"
        for /F %%I in (%~dp0Misc\version.txt) do set "VERSION=%%I"
        set "X_VERSION=-X main.version=%VERSION%"
        call :"build"
        @exit /b

:"build"
        call :"fmt"
        call :"goversioninfo"
        for /F %%I in ('dir /b /s /aa nyagos.d') do attrib -A "%%I" & if exist mains\bindata.go del mains\bindata.go
        if not exist mains\bindata.go call :"bindata"
        for /F "delims=" %%V in ('git log -1 --date^=short --pretty^=format:"-X main.stamp=%%ad -X main.commit=%%H"') do go build -o nyagos.exe -ldflags "%%V %X_VERSION%" %TAGS%
        @exit /b

:"fmt"
        for /F %%I IN ('dir /s /b /aa *.go') do go fmt "%%I" & attrib -A "%%I"
        @exit /b

:"status"
        nyagos -e "print(nyagos.version or 'Snapshot on '..nyagos.stamp)"
        @exit /b

:eachdir
        powershell "ls -R | ?{ $_ -match '\.go$' } | %%{ [System.IO.Path]::GetDirectoryName($_.FullName)} | Sort-Object | Get-Unique | %%{ Write-Host 'go %~1 on',$_ ;  pushd $_ ; go %~1 ; popd }"
        exit /b

:"vet"
        call :eachdir vet
        exit /b

:"clean"
        for %%I in (nyagos.exe nyagos.syso version.now mains\bindata.go) do if exist %%I del %%I
        call :eachdir clean

:"sweep"
        for /R %%I in (*~ *.bak) do if exist %%I del %%I
        @exit /b

:"get"
        pushd "%~dp0\mains"
        go get -v
        popd
        @exit /b

:getbindata
        go get "github.com/jteeuwen/go-bindata"
        pushd "%GOPATH1ST%\src\github.com\jteeuwen\go-bindata\go-bindata"
        go build
        copy go-bindata.exe "%~dp0\."
        popd
        @exit /b

:"bindata"
        if not exist go-bindata.exe call :getbindata
        go-bindata.exe -pkg "mains" -o "mains\bindata.go" "nyagos.d/..."
        @exit /b

:getgoversioninfo
        go get "github.com/josephspurrier/goversioninfo"
        pushd "%GOPATH1ST%\src\github.com\josephspurrier\goversioninfo\cmd\goversioninfo"
        go build
        copy goversioninfo.exe "%~dp0\."
        popd
        @exit /b

:"goversioninfo"
        if not exist goversioninfo.exe call :getgoversioninfo
        powershell -ExecutionPolicy RemoteSigned -File "%~dp0mains\makejson.ps1" > "%~dp0Misc\version.json"
        goversioninfo.exe -icon mains\nyagos.ico -o "%~dp0nyagos.syso" "%~dp0Misc\version.json"
        @exit /b

:"const"
        for /F %%I in ('dir /b /s makeconst.cmd') do pushd %%~dpI & call %%I & popd
        @exit /b

:"package"
        for /F %%I in ('nyagos -e "print(nyagos.version or (string.gsub(nyagos.stamp,[[/]],[[]])))"') do set VERSION=%%I
        zip -9 "nyagos-%VERSION%-%GOARCH%.zip" nyagos.exe lua53.dll nyagos.lua .nyagos makeicon.cmd nyagos.d\*.lua nyagos.d\catalog\*.lua license.txt readme_ja.md readme.md Doc\*.md
        @exit /b

:"install"
        if not "%1" == "" set "INSTALLDIR=%1" & echo @set "INSTALLDIR=%~1" > "%~dp0Misc\version.cmd"
        if "%INSTALLDIR%" == "" (
            echo Please %0.cmd install PATH\TO\BIN, once
            @exit /b
        )
        if not exist "%INSTALLDIR%" (
            echo Please %0.cmd install EXIST\PATH\TO\BIN,  once
            @exit /b
        )

        robocopy nyagos.d "%INSTALLDIR%\nyagos.d" /E
        if not exist "%INSTALLDIR%\lua53.dll" copy lua53.dll "%INSTALLDIR%\."
        copy nyagos.lua "%INSTALLDIR%\."
        copy /-Y _nyagos "%INSTALLDIR%\."
        copy nyagos.exe "%INSTALLDIR%\."
        if errorlevel 1 (start "" "%~dpfx0" install_ & @exit /b)
        @exit /b

:"install_"
        taskkill /F /im nyagos.exe
        copy nyagos.exe "%INSTALLDIR%\."
        timeout /T 3
        @exit %ERRORLEVEL%

:"icon"
        makeicon.cmd
        @exit /b

:"help"
        echo Usage for make.cmd
        echo  %0          : Equals to '%0 build'
        echo  %0 build    : Build nyagos.exe as snapshot (ignore version.txt)
        echo  %0 release  : Build nyagos.exe as release  (see version.txt)
        echo  %0 fmt      : Format all source files with 'go fmt'
        echo  %0 clean    : Delete nyagos.exe and nyagos.syso
        echo  %0 package  : Make the package zip-file
        echo  %0 get      : Do 'go get' for each github library
        echo  %0 upgrade  : Do 'git pull' for each github library
        echo  %0 help     : Print help
        echo  %0 install INSTALLDIR
        echo     : Copy binaries to INSTALLDIR
        echo  %0 install
        echo     : Copy binaries to last INSTALLDIR
        @exit /b

@setlocal
@set PROMPT=$$$S

@pushd "%~dp0"

if exist "%~dp0Misc\version.cmd" call "%~dp0Misc\version.cmd"

if exist goarch.txt for /F %%I in (goarch.txt) do set "GOARCH=%%I"
if "%GOARCH%" == "" for /F "delims=/ tokens=2" %%I in ('go version') do set "GOARCH=%%I"

if "%GOPATH%" == "" set "GOPATH=%USERPROFILE%\go"
for /F "delims=; tokens=1" %%I in ("%GOPATH%") do set "GOPATH1ST=%%I"

call :"%~1" %2 %3 %4 %5 %6
@popd
@endlocal
@exit /b

:""
        for /F %%I in ('git describe --tags') do set "X_VERSION=-X main.version=%%I"
        call :"build"
        @exit /b 0

:"debug"
        set "TAGS=-tags=debug"
        call :"build"
        @exit /b

:"release"
        for /F %%I in (%~dp0Misc\version.txt) do set "VERSION=%%I"
        set "X_VERSION=-X main.version=%VERSION%"
        call :"build"
        @exit /b

:"build"
        call :"fmt"
        call :"goversioninfo"
        for /F %%I in ('dir /b /s /aa nyagos.d') do attrib -A "%%I" & if exist mains\bindata.go del mains\bindata.go
        if not exist mains\bindata.go call :"bindata"
        for /F "delims=" %%V in ('git log -1 --date^=short --pretty^=format:"-X main.stamp=%%ad -X main.commit=%%H"') do go build -o nyagos.exe -ldflags "%%V %X_VERSION%" %TAGS%
        @exit /b

:"fmt"
        for /F %%I IN ('dir /s /b /aa *.go') do go fmt "%%I" & attrib -A "%%I"
        @exit /b

:"status"
        nyagos -e "print(nyagos.version or 'Snapshot on '..nyagos.stamp)"
        @exit /b

:eachdir
        powershell "ls -R | ?{ $_ -match '\.go$' } | %%{ [System.IO.Path]::GetDirectoryName($_.FullName)} | Sort-Object | Get-Unique | %%{ Write-Host 'go %~1 on',$_ ;  pushd $_ ; go %~1 ; popd }"
        exit /b

:"vet"
        call :eachdir vet
        exit /b

:"clean"
        for %%I in (nyagos.exe nyagos.syso version.now mains\bindata.go) do if exist %%I del %%I
        call :eachdir clean

:"sweep"
        for /R %%I in (*~ *.bak) do if exist %%I del %%I
        @exit /b

:"get"
        go get -v
        @exit /b

:getbindata
        go get "github.com/jteeuwen/go-bindata"
        pushd "%GOPATH1ST%\src\github.com\jteeuwen\go-bindata\go-bindata"
        go build
        copy go-bindata.exe "%~dp0\."
        popd
        @exit /b

:"bindata"
        if not exist go-bindata.exe call :getbindata
        go-bindata.exe -pkg "mains" -o "mains\bindata.go" "nyagos.d/..."
        @exit /b

:getgoversioninfo
        go get "github.com/josephspurrier/goversioninfo"
        pushd "%GOPATH1ST%\src\github.com\josephspurrier\goversioninfo\cmd\goversioninfo"
        go build
        copy goversioninfo.exe "%~dp0\."
        popd
        @exit /b

:"goversioninfo"
        if not exist goversioninfo.exe call :getgoversioninfo
        powershell -ExecutionPolicy RemoteSigned -File "%~dp0mains\makejson.ps1" > "%~dp0Misc\version.json"
        goversioninfo.exe -icon mains\nyagos.ico -o "%~dp0nyagos.syso" "%~dp0Misc\version.json"
        @exit /b

:"const"
        for /F %%I in ('dir /b /s makeconst.cmd') do pushd %%~dpI & call %%I & popd
        @exit /b

:"package"
        for /F %%I in ('nyagos -e "print(nyagos.version or (string.gsub(nyagos.stamp,[[/]],[[]])))"') do set VERSION=%%I
        zip -9 "nyagos-%VERSION%-%GOARCH%.zip" nyagos.exe lua53.dll nyagos.lua .nyagos makeicon.cmd nyagos.d\*.lua nyagos.d\catalog\*.lua license.txt readme_ja.md readme.md Doc\*.md
        @exit /b

:"install"
        if not "%1" == "" set "INSTALLDIR=%1" & echo @set "INSTALLDIR=%~1" > "%~dp0Misc\version.cmd"
        if "%INSTALLDIR%" == "" (
            echo Please %0.cmd install PATH\TO\BIN, once
            @exit /b
        )
        if not exist "%INSTALLDIR%" (
            echo Please %0.cmd install EXIST\PATH\TO\BIN,  once
            @exit /b
        )

        robocopy nyagos.d "%INSTALLDIR%\nyagos.d" /E
        if not exist "%INSTALLDIR%\lua53.dll" copy lua53.dll "%INSTALLDIR%\."
        copy nyagos.lua "%INSTALLDIR%\."
        copy /-Y _nyagos "%INSTALLDIR%\."
        copy nyagos.exe "%INSTALLDIR%\."
        if errorlevel 1 (start "" "%~dpfx0" install_ & @exit /b)
        @exit /b

:"install_"
        taskkill /F /im nyagos.exe
        copy nyagos.exe "%INSTALLDIR%\."
        timeout /T 3
        @exit %ERRORLEVEL%

:"icon"
        makeicon.cmd
        @exit /b

:"help"
        echo Usage for make.cmd
        echo  %0          : Equals to '%0 build'
        echo  %0 build    : Build nyagos.exe as snapshot (ignore version.txt)
        echo  %0 release  : Build nyagos.exe as release  (see version.txt)
        echo  %0 fmt      : Format all source files with 'go fmt'
        echo  %0 clean    : Delete nyagos.exe and nyagos.syso
        echo  %0 package  : Make the package zip-file
        echo  %0 get      : Do 'go get' for each github library
        echo  %0 upgrade  : Do 'git pull' for each github library
        echo  %0 help     : Print help
        echo  %0 install INSTALLDIR
        echo     : Copy binaries to INSTALLDIR
        echo  %0 install
        echo     : Copy binaries to last INSTALLDIR
        @exit /b

Revert "Try to fix the problem `make get` fails on AppVeyor"

This reverts commit 4ec4ce4d23b04fa1481a76d9e8da032cc65dd9a9.


call fez_unpack.bat Content\Essentials.pak out
if %errorlevel% neq 0 goto error

call fez_unpack.bat Content\Other.pak out
if %errorlevel% neq 0 goto error

call xnb_decomp.bat out out_u
if %errorlevel% neq 0 goto error

call read_xnb_dir.bat out_u export
if %errorlevel% neq 0 goto error

call xma_decode.bat export
if %errorlevel% neq 0 goto error

call xwma_decode.bat export
if %errorlevel% neq 0 goto error

pause

goto end

:error
echo *** BANG ***
exit /b 1

:end

echo Unpacking Essentials.pak...
call fez_unpack.bat Content\Essentials.pak out
if %errorlevel% neq 0 goto error

echo Unpacking Other.pak...
call fez_unpack.bat Content\Other.pak out
if %errorlevel% neq 0 goto error

echo Decompressing XNBs...
call xnb_decomp.bat out out_u
if %errorlevel% neq 0 goto error

echo Converting XNBs...
call read_xnb_dir.bat out_u export
if %errorlevel% neq 0 goto error

echo Converting XWB...
call read_xact.bat "Content\Music\Wave Bank.xwb" export\Music

echo Decoding XMAs...
call xma_decode.bat export
if %errorlevel% neq 0 goto error

echo Decoding xWMAs...
call xwma_decode.bat export
if %errorlevel% neq 0 goto error

pause

goto end

:error
echo *** BANG ***
exit /b 1

:end

add XACT conversion to full_export output current step


REM Add other things if could be automated, RUN THIS AS ADMIN
@echo off
REM Windows Defender scan
cd C:\Program Files\Windows Defender\
MpCmdRun.exe -Scan 2
REM Listing possible penetrations
@echo on
echo Staring to output active processes!
wmic process list brief > BriefProcesses.txt
wmic process list full >FullProcesses.txt
wmic startup list full > StartupLists.txt

REM Add other things if could be automated, RUN THIS AS ADMIN
@echo off
REM Windows Defender scan
cd C:\Program Files\Windows Defender\
MpCmdRun.exe -Scan 2
REM Listing possible penetrations
@echo on
echo Staring to output active processes!
wmic process list brief > BriefProcesses.txt
if %errorlevel%==1 echo Brief Processes failed to write
wmic process list full >FullProcesses.txt
if %errorlevel%==1 echo Full Processes failed to write
wmic startup list full > StartupLists.txt
if %errorlevel%==1 echo Startup Processes failed to write

Update IntruderDetection.bat

Update IntruderDetection.bat


@echo off

:: 启动命令处理器扩展名 启动延缓环境变量扩展名
setlocal ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION

:: 双脱字符的功用
echo Hi there^^!

:: 如果是从图形界面（相对于命令行）启动的，则暂停
echo %cmdcmdline% | find "%~0" > nul
if %errorlevel% EQU 0 pause

::
echo %cmdcmdline% | findstr /c:"%~n0" > nul
if %errorlevel% EQU 0 pause

Add a batch script for the first commit.


:<<"::CMDLITERAL"
@ECHO OFF
REM  Usage:
REM powershell -command "& { (New-Object Net.WebClient).DownloadFile('https://raw.githubusercontent.com/jgstew/tools/master/CMD/install_bigfix.bat', 'install_bigfix.bat') }" -ExecutionPolicy Bypass
REM install_bigfix.bat __FQDN_OF_ROOT_OR_RELAY__

REM    Source: https://github.com/jgstew/tools/blob/master/CMD/install_bigfix.bat
REM   Related: https://github.com/jgstew/tools/blob/master/bash/install_bigfix.sh

REM http://stackoverflow.com/questions/2541767/what-is-the-proper-way-to-test-if-variable-is-empty-in-a-batch-file-if-not-1
IF [%1] == [] ECHO please provide FQDN for root or relay && EXIT /B
REM KNOWN ISSUE: if enhanced security is enabled on root/relay, then must use HTTPS for masthead download. This will mean that the download part will have to ignore SSL errors
SET MASTHEADURL=http://%1:52311/masthead/masthead.afxm
SET BASEFOLDER=C:\Windows\Temp

REM  TODO: handle clientsettings.cfg or masthead.afxm or actionsite.afxm already in the CWD
REM  TODO: check for admin rights http://stackoverflow.com/questions/4051883/batch-script-how-to-check-for-admin-rights

REM http://stackoverflow.com/questions/4781772/how-to-test-if-an-executable-exists-in-the-path-from-a-windows-batch-file
where /q powershell || ECHO Cound not find powershell. && EXIT /B

@ECHO ON
REM this following line will need to ignore SSL errors if HTTPS is used instead of HTTP
powershell -command "& { (New-Object Net.WebClient).DownloadFile('%MASTHEADURL%', '%BASEFOLDER%\actionsite.afxm') }" -ExecutionPolicy Bypass
powershell -command "& { (New-Object Net.WebClient).DownloadFile('http://software.bigfix.com/download/bes/95/BigFix-BES-Client-9.5.1.9.exe', '%BASEFOLDER%\BESClient.exe') }" -ExecutionPolicy Bypass
@ECHO OFF

REM https://www.ibm.com/developerworks/community/wikis/home?lang=en#!/wiki/Tivoli%20Endpoint%20Manager/page/Configuration%20Settings
REM https://gist.github.com/jgstew/51a99ab4b5997efa0318
REM http://stackoverflow.com/questions/1702762/how-to-create-an-empty-file-at-the-command-line-in-windows
REM http://stackoverflow.com/questions/7225630/how-to-echo-2-no-quotes-to-a-file-from-a-batch-script
type NUL > %BASEFOLDER%\clientsettings.cfg
REM  TODO: only do the following line if FQDN_variable is set
>>%BASEFOLDER%\clientsettings.cfg ECHO _BESClient_RelaySelect_FailoverRelay=http://%1:52311/bfmirror/downloads/
>>%BASEFOLDER%\clientsettings.cfg ECHO _BESClient_Resource_StartupNormalSpeed=1
>>%BASEFOLDER%\clientsettings.cfg ECHO _BESClient_Download_RetryMinutes=1
>>%BASEFOLDER%\clientsettings.cfg ECHO _BESClient_Resource_WorkIdle=20
>>%BASEFOLDER%\clientsettings.cfg ECHO _BESClient_Resource_SleepIdle=500
>>%BASEFOLDER%\clientsettings.cfg ECHO _BESClient_Comm_CommandPollEnable=1
>>%BASEFOLDER%\clientsettings.cfg ECHO _BESClient_Comm_CommandPollIntervalSeconds=10800
>>%BASEFOLDER%\clientsettings.cfg ECHO _BESClient_Log_Days=30
>>%BASEFOLDER%\clientsettings.cfg ECHO _BESClient_Download_UtilitiesCacheLimitMB=500
>>%BASEFOLDER%\clientsettings.cfg ECHO _BESClient_Download_DownloadsCacheLimitMB=5000
>>%BASEFOLDER%\clientsettings.cfg ECHO _BESClient_Download_MinimumDiskFreeMB=2000

ECHO
ECHO %0
ECHO %1
ECHO %MASTHEADURL%
ECHO
ECHO Installing BigFix now.
%BASEFOLDER%\BESClient.exe /s /v"/l*voicewarmup %BASEFOLDER%\install_bigfix.log /qn"

EXIT /B
::CMDLITERAL

:<<"::CMDLITERAL"
@ECHO OFF
REM  Usage:
REM powershell -command "& { (New-Object Net.WebClient).DownloadFile('https://raw.githubusercontent.com/jgstew/tools/master/CMD/install_bigfix.bat', 'install_bigfix.bat') }" -ExecutionPolicy Bypass
REM install_bigfix.bat __FQDN_OF_ROOT_OR_RELAY__

REM    Source: https://github.com/jgstew/tools/blob/master/CMD/install_bigfix.bat
REM   Related: https://github.com/jgstew/tools/blob/master/bash/install_bigfix.sh

REM http://stackoverflow.com/questions/2541767/what-is-the-proper-way-to-test-if-variable-is-empty-in-a-batch-file-if-not-1
IF [%1] == [] ECHO please provide FQDN for root or relay && EXIT /B
REM KNOWN ISSUE: if enhanced security is enabled on root/relay, then must use HTTPS for masthead download. This will mean that the download part will have to ignore SSL errors
SET MASTHEADURL=http://%1:52311/masthead/masthead.afxm
SET RELAYFQDN=%1
SET BASEFOLDER=C:\Windows\Temp

REM  TODO: handle clientsettings.cfg or masthead.afxm or actionsite.afxm already in the CWD
REM  TODO: check for admin rights http://stackoverflow.com/questions/4051883/batch-script-how-to-check-for-admin-rights

REM http://stackoverflow.com/questions/4781772/how-to-test-if-an-executable-exists-in-the-path-from-a-windows-batch-file
where /q powershell || ECHO Cound not find powershell. && EXIT /B

@ECHO ON
REM this following line will need to ignore SSL errors if HTTPS is used instead of HTTP
powershell -command "& { (New-Object Net.WebClient).DownloadFile('%MASTHEADURL%', '%BASEFOLDER%\actionsite.afxm') }" -ExecutionPolicy Bypass
powershell -command "& { (New-Object Net.WebClient).DownloadFile('http://software.bigfix.com/download/bes/95/BigFix-BES-Client-9.5.1.9.exe', '%BASEFOLDER%\BESClient.exe') }" -ExecutionPolicy Bypass
@ECHO OFF

REM https://www.ibm.com/developerworks/community/wikis/home?lang=en#!/wiki/Tivoli%20Endpoint%20Manager/page/Configuration%20Settings
REM https://gist.github.com/jgstew/51a99ab4b5997efa0318
REM http://stackoverflow.com/questions/1702762/how-to-create-an-empty-file-at-the-command-line-in-windows
REM http://stackoverflow.com/questions/7225630/how-to-echo-2-no-quotes-to-a-file-from-a-batch-script
type NUL > %BASEFOLDER%\clientsettings.cfg
REM  TODO: only do the following line if FQDN_variable is set
>>%BASEFOLDER%\clientsettings.cfg ECHO _BESClient_RelaySelect_FailoverRelay=http://%1:52311/bfmirror/downloads/
>>%BASEFOLDER%\clientsettings.cfg ECHO _BESClient_Resource_StartupNormalSpeed=1
>>%BASEFOLDER%\clientsettings.cfg ECHO _BESClient_Download_RetryMinutes=1
>>%BASEFOLDER%\clientsettings.cfg ECHO _BESClient_Resource_WorkIdle=20
>>%BASEFOLDER%\clientsettings.cfg ECHO _BESClient_Resource_SleepIdle=500
>>%BASEFOLDER%\clientsettings.cfg ECHO _BESClient_Comm_CommandPollEnable=1
>>%BASEFOLDER%\clientsettings.cfg ECHO _BESClient_Comm_CommandPollIntervalSeconds=10800
>>%BASEFOLDER%\clientsettings.cfg ECHO _BESClient_Log_Days=30
>>%BASEFOLDER%\clientsettings.cfg ECHO _BESClient_Download_UtilitiesCacheLimitMB=500
>>%BASEFOLDER%\clientsettings.cfg ECHO _BESClient_Download_DownloadsCacheLimitMB=5000
>>%BASEFOLDER%\clientsettings.cfg ECHO _BESClient_Download_MinimumDiskFreeMB=2000

ECHO
ECHO %0
ECHO %1
ECHO %MASTHEADURL%
ECHO
ECHO Installing BigFix now.
%BASEFOLDER%\BESClient.exe /s /v"/l*voicewarmup %BASEFOLDER%\install_bigfix.log /qn"

EXIT /B
::CMDLITERAL

Update install_bigfix.bat

Update install_bigfix.bat


git init
git remote add origin https://github.com/bgweber/RServer.git
git pull origin master

Create GitPull.bat

Create GitPull.bat


@echo off
@setlocal

set RoslynRoot=%~dp0
set NuGetAdditionalCommandLineArgs=-verbosity quiet -configfile "%RoslynRoot%nuget.config" -Project2ProjectTimeOut 1200
set DevDivPackages=%RoslynRoot%src\Setup\DevDivPackages

:ParseArguments
if /I "%1" == "/?" goto :Usage
if /I "%1" == "/clean" set RestoreClean=true&&shift&& goto :ParseArguments
if /I "%1" == "/fast" set RestoreFast=true&&shift&& goto :ParseArguments
goto :DoneParsing

:DoneParsing

REM Allow for alternate solutions to be passed as restore targets.
set RoslynSolution=%1
if "%RoslynSolution%" == "" set RoslynSolution=%RoslynRoot%\Roslyn.sln

REM Load in the inforation for NuGet
call "%RoslynRoot%build\scripts\LoadNuGetInfo.cmd" || goto :LoadNuGetInfoFailed

if "%RestoreClean%" == "true" (
    echo Clearing the NuGet caches
    call "%NugetExe%" locals all -clear || goto :CleanFailed
)

if "%RestoreFast%" == "" (
    echo Deleting project.lock.json files
    pushd "%RoslynRoot%src"
    echo "Dummy lock file to avoid error when there is no project.lock.json file" > project.lock.json
    del /s /q project.lock.json > nul
    popd
)

echo Restoring packages: Toolsets
call "%NugetExe%" restore "%RoslynRoot%build\ToolsetPackages\project.json" %NuGetAdditionalCommandLineArgs% || goto :RestoreFailed

echo Restoring packages: Toolsets (Dev14 VS SDK build tools)
call "%NugetExe%" restore "%RoslynRoot%build\ToolsetPackages\dev14.project.json" %NuGetAdditionalCommandLineArgs% || goto :RestoreFailed

echo Restoring packages: Toolsets (Dev15 VS SDK build tools)
call "%NugetExe%" restore "%RoslynRoot%build\ToolsetPackages\dev15.project.json" %NuGetAdditionalCommandLineArgs% || goto :RestoreFailed

echo Restoring packages: Toolsets (Dev15 VS SDK 'Willow' build tools)
call "%NugetExe%" restore "%RoslynRoot%build\ToolsetPackages\dev15Willow.project.json" %NuGetAdditionalCommandLineArgs% || goto :RestoreFailed

echo Restoring packages: Roslyn SDK
call "%NugetExe%" restore "%RoslynRoot%build\ToolsetPackages\roslynsdk.project.json" %NuGetAdditionalCommandLineArgs% || goto :RestoreFailed

echo Restoring packages: Samples
call "%NugetExe%" restore "%RoslynRoot%src\Samples\Samples.sln" %NuGetAdditionalCommandLineArgs% || goto :RestoreFailed

echo Restoring packages: Templates
call "%NugetExe%" restore "%RoslynRoot%src\Setup\Templates\Templates.sln" %NuGetAdditionalCommandLineArgs% || goto :RestoreFailed

echo Restoring packages: Roslyn (this may take some time)
call "%NugetExe%" restore "%RoslynRoot%build\Toolset.sln" %NuGetAdditionalCommandLineArgs% || goto :RestoreFailed
call "%NugetExe%" restore "%RoslynSolution%" %NuGetAdditionalCommandLineArgs% || goto :RestoreFailed

echo Restoring packages: DevDiv tools
call %NugetExe% restore "%RoslynRoot%src\Setup\DevDivInsertionFiles\DevDivInsertionFiles.sln" %NuGetAdditionalCommandLineArgs% || goto :RestoreFailed
call %NugetExe% restore "%DevDivPackages%\Roslyn\project.json" %NuGetAdditionalCommandLineArgs% || goto :RestoreFailed
call %NugetExe% restore "%DevDivPackages%\Debugger\project.json" %NuGetAdditionalCommandLineArgs% || goto :RestoreFailed

exit /b 0

:CleanFailed
echo Clean failed with ERRORLEVEL %ERRORLEVEL%
exit /b 1

:RestoreFailed
echo Restore failed with ERRORLEVEL %ERRORLEVEL%
exit /b 1

:LoadNuGetInfoFailed
echo Error loading NuGet.exe information %ERRORLEVEL%
exit /b 1

:Usage
@echo Usage: Restore.cmd /clean [Solution File]
exit /b 1

@echo off
@setlocal

set RoslynRoot=%~dp0
set NuGetAdditionalCommandLineArgs=-verbosity quiet -configfile "%RoslynRoot%nuget.config" -Project2ProjectTimeOut 1200
set DevDivPackages=%RoslynRoot%src\Setup\DevDivPackages

:ParseArguments
if /I "%1" == "/?" goto :Usage
if /I "%1" == "/clean" set RestoreClean=true&&shift&& goto :ParseArguments
if /I "%1" == "/fast" set RestoreFast=true&&shift&& goto :ParseArguments
goto :DoneParsing

:DoneParsing

REM Allow for alternate solutions to be passed as restore targets.
set RoslynSolution=%1
if "%RoslynSolution%" == "" set RoslynSolution=%RoslynRoot%\Roslyn.sln

REM Load in the inforation for NuGet
call "%RoslynRoot%build\scripts\LoadNuGetInfo.cmd" || goto :LoadNuGetInfoFailed

if "%RestoreClean%" == "true" (
    echo Clearing the NuGet caches
    call "%NugetExe%" locals all -clear || goto :CleanFailed
)

if "%RestoreFast%" == "" (
    echo Deleting project.lock.json files
    pushd "%RoslynRoot%src"
    echo "Dummy lock file to avoid error when there is no project.lock.json file" > project.lock.json
    del /s /q project.lock.json > nul
    popd
)

echo Restoring packages: Toolsets
call "%NugetExe%" restore "%RoslynRoot%build\ToolsetPackages\project.json" %NuGetAdditionalCommandLineArgs% || goto :RestoreFailed

echo Restoring packages: Toolsets (Dev14 VS SDK build tools)
call "%NugetExe%" restore "%RoslynRoot%build\ToolsetPackages\dev14.project.json" %NuGetAdditionalCommandLineArgs% || goto :RestoreFailed

echo Restoring packages: Toolsets (Dev15 VS SDK build tools)
call "%NugetExe%" restore "%RoslynRoot%build\ToolsetPackages\dev15.project.json" %NuGetAdditionalCommandLineArgs% || goto :RestoreFailed

echo Restoring packages: Toolsets (Dev15 VS SDK 'Willow' build tools)
call "%NugetExe%" restore "%RoslynRoot%build\ToolsetPackages\dev15Willow.project.json" %NuGetAdditionalCommandLineArgs% || goto :RestoreFailed

echo Restoring packages: Roslyn SDK
call "%NugetExe%" restore "%RoslynRoot%build\ToolsetPackages\roslynsdk.project.json" %NuGetAdditionalCommandLineArgs% || goto :RestoreFailed

echo Restoring packages: Samples
call "%NugetExe%" restore "%RoslynRoot%src\Samples\Samples.sln" %NuGetAdditionalCommandLineArgs% || goto :RestoreFailed

echo Restoring packages: Templates
call "%NugetExe%" restore "%RoslynRoot%src\Setup\Templates\Templates.sln" %NuGetAdditionalCommandLineArgs% || goto :RestoreFailed

echo Restoring packages: Roslyn (this may take some time)
call "%NugetExe%" restore "%RoslynRoot%build\Toolset.sln" %NuGetAdditionalCommandLineArgs% || goto :RestoreFailed
call "%NugetExe%" restore "%RoslynSolution%" %NuGetAdditionalCommandLineArgs% || goto :RestoreFailed

echo Restoring packages: DevDiv tools
call "%NugetExe%" restore "%RoslynRoot%src\Setup\DevDivInsertionFiles\DevDivInsertionFiles.sln" %NuGetAdditionalCommandLineArgs% || goto :RestoreFailed
call "%NugetExe%" restore "%DevDivPackages%\Roslyn\project.json" %NuGetAdditionalCommandLineArgs% || goto :RestoreFailed
call "%NugetExe%" restore "%DevDivPackages%\Debugger\project.json" %NuGetAdditionalCommandLineArgs% || goto :RestoreFailed

exit /b 0

:CleanFailed
echo Clean failed with ERRORLEVEL %ERRORLEVEL%
exit /b 1

:RestoreFailed
echo Restore failed with ERRORLEVEL %ERRORLEVEL%
exit /b 1

:LoadNuGetInfoFailed
echo Error loading NuGet.exe information %ERRORLEVEL%
exit /b 1

:Usage
@echo Usage: Restore.cmd /clean [Solution File]
exit /b 1

Fix restore.cmd to handle repos with spaces


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

# for the moment oasys1-srwpy 1.0.2 is not available for windows, so use older version

pip install https://files.pythonhosted.org/packages/08/6e/34d810ca5acfbab9850ed887dc9362683f4dc895aa9e7da543d7a072d121/oasys_srwpy-1.0.0-cp37-cp37m-win_amd64.whl

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

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

REM pip install srxraylib

REM  for the moment oasys1-srwpy 1.0.2 is not available for windows, so use older version

pip install https://files.pythonhosted.org/packages/08/6e/34d810ca5acfbab9850ed887dc9362683f4dc895aa9e7da543d7a072d121/oasys_srwpy-1.0.0-cp37-cp37m-win_amd64.whl

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


build\app\vds_web_server\Debug\vds_web_server.exe server start --root-folder servers\0

add WPF

add WPF


"../vendor/bin/tester.bat" -c php.ini %*

Add run-tests.bat

Add run-tests.bat


@echo off
set topdir=%cd%
set gettext-version=0.14.5
set libiconv-version=1.9.1
set glib-version=2.20.4
set gettext-srcball=gettext-%gettext-version%.tar.gz
set libiconv-srcball=libiconv-%libiconv-version%.tar.gz
set glib-srcball=glib-%glib-version%.tar.bz2

:DECOMPRESS
echo Decompressing libraries...
cd .\contrib
echo    decompressing gettext...
gunzip -c %gettext-srcball% | tar x
echo    decompressing libiconv...
gunzip -c %libiconv-srcball% | tar x
echo    decompressing glib...
bunzip2 -c %glib-srcball% | tar x
cd ..

:RENAME
echo Renaming library folder for glib...
cd .\contrib
rename glib-%glib-version% glib
cd ..

:BUILD
mkdir usr

echo Making libiconv (no NLS)...
cd .\contrib\libiconv-%libiconv-version%
nmake -f Makefile.msvc NO_NLS=1 DLL=1 MFLAGS=-MD PREFIX=%topdir%\usr
nmake -f Makefile.msvc NO_NLS=1 DLL=1 MFLAGS=-MD PREFIX=%topdir%\usr install
cd ..\..

echo Making libintl...
cd .\contrib\gettext-%gettext-version%\gettext-runtime
nmake -f Makefile.msvc config.h
cd .\intl
nmake -f Makefile.msvc DLL=1 MFLAGS=-MD PREFIX=%topdir%\usr
nmake -f Makefile.msvc DLL=1 MFLAGS=-MD PREFIX=%topdir%\usr install
cd ..\..\..

echo Making libiconv (no NLS)...
cd .\contrib\libiconv-%libiconv-version%
nmake -f Makefile.msvc DLL=1 MFLAGS=-MD PREFIX=%topdir%\usr clean
nmake -f Makefile.msvc DLL=1 MFLAGS=-MD PREFIX=%topdir%\usr
nmake -f Makefile.msvc DLL=1 MFLAGS=-MD PREFIX=%topdir%\usr install
cd ..\..

echo Making libglib and libgmodule...
cd .\contrib\glib
nmake -f Makefile.msc config.h glibconfig.h
cd .\build\win32\dirent
nmake -f makefile.msc INTL=%topdir%\usr
cd ..\..\..\glib
nmake -f Makefile.msc INTL=%topdir%\usr
copy .\glib-2.0.lib %topdir%\usr\lib
copy .\libglib-2.0-0.dll %topdir%\usr\bin
cd ..\gmodule
nmake -f Makefile.msc INTL=%topdir%\usr
copy gmodule-2.0.lib %topdir%\usr\lib
copy libgmodule-2.0-0.dll %topdir%\usr\bin
cd ..\..\..

:EXIT
popd

@echo off
set topdir=%cd%
set gettext-version=0.14.5
set libiconv-version=1.9.1
set glib-version=2.18.3
set gettext-srcball=gettext-%gettext-version%.tar.gz
set libiconv-srcball=libiconv-%libiconv-version%.tar.gz
set glib-srcball=glib-%glib-version%.tar.bz2

:DECOMPRESS
echo Decompressing libraries...
cd .\contrib
echo    decompressing gettext...
gunzip -c %gettext-srcball% | tar x
echo    decompressing libiconv...
gunzip -c %libiconv-srcball% | tar x
echo    decompressing glib...
bunzip2 -c %glib-srcball% | tar x
cd ..

:RENAME
echo Renaming library folder for glib...
cd .\contrib
rename glib-%glib-version% glib
cd ..

:BUILD
mkdir usr

echo Making libiconv (no NLS)...
cd .\contrib\libiconv-%libiconv-version%
nmake -f Makefile.msvc NO_NLS=1 DLL=1 MFLAGS=-MD PREFIX=%topdir%\usr
nmake -f Makefile.msvc NO_NLS=1 DLL=1 MFLAGS=-MD PREFIX=%topdir%\usr install
cd ..\..

echo Making libintl...
cd .\contrib\gettext-%gettext-version%\gettext-runtime
nmake -f Makefile.msvc config.h
cd .\intl
nmake -f Makefile.msvc DLL=1 MFLAGS=-MD PREFIX=%topdir%\usr
nmake -f Makefile.msvc DLL=1 MFLAGS=-MD PREFIX=%topdir%\usr install
cd ..\..\..

echo Making libiconv (no NLS)...
cd .\contrib\libiconv-%libiconv-version%
nmake -f Makefile.msvc DLL=1 MFLAGS=-MD PREFIX=%topdir%\usr clean
nmake -f Makefile.msvc DLL=1 MFLAGS=-MD PREFIX=%topdir%\usr
nmake -f Makefile.msvc DLL=1 MFLAGS=-MD PREFIX=%topdir%\usr install
cd ..\..

echo Making libglib and libgmodule...
cd .\contrib\glib
nmake -f Makefile.msc config.h glibconfig.h
cd .\build\win32\dirent
nmake -f makefile.msc INTL=%topdir%\usr
cd ..\..\..\glib
nmake -f Makefile.msc INTL=%topdir%\usr
copy .\glib-2.0.lib %topdir%\usr\lib
copy .\libglib-2.0-0.dll %topdir%\usr\bin
cd ..\gmodule
nmake -f Makefile.msc INTL=%topdir%\usr
copy gmodule-2.0.lib %topdir%\usr\lib
copy libgmodule-2.0-0.dll %topdir%\usr\bin
cd ..\..\..

:EXIT
popd

build script fix again

build script fix again

git-svn-id: 052c94d44dc5f71858233e1cc77a1afaa1b3a249@116 6487960e-e977-9441-a7b3-96befa83b359


set DEVROOT=c:\dev2
@rem place c++ addons outside of node_modules for now
@rem to make it easier to remove/recreate node_modules
set DEST=node_modules
set MAPNIK_INSTALL=c:\mapnik-v2.2.0
set NODEEXE="C:\Program Files (x86)\nodejs\node.exe"
set MAPNIK_DEST=%DEST%\mapnik\lib\mapnik
set MAPNIK_DATA_DEST=%DEST%\mapnik\lib\mapnik\share
mkdir %MAPNIK_DATA_DEST%

@rem make sure Python is on the PATH
set PATH=%PATH%;c:\Python27

@rem change into current directory
cd /d %~dp0
@rem then move to main tilemill folder
cd ..\..\
set TILEMILL_DIR=%CD%

@rem mkdir %DEST%

@rem nuke any failed c++ module installs
@rem rd /q /s node_modules\bones\node_modules\jquery\node_modules\jsdom\node_modules\contextify
@rem rd /q /s node_modules\sqlite3
rd /q /s node_modules\mapnik
rd /q /s node_modules\tilelive-mapnik\node_modules\mapnik
rd /q /s node_modules\millstone\node_modules\srs
@rem rd /q /s node_modules\millstone\node_modules\zipfile
rd /q /s node_modules\tilelive-mapnik\node_modules\eio

@rem remove then re-copy node-mapnik
xcopy /i /s /exclude:platforms\windows\excludes.txt %DEVROOT%\node-mapnik %DEST%\mapnik

@rem fixup paths to plugins making them relative
@rem to future location of mapnik itself
cd %DEST%\mapnik
@rem - note, intentially not quoting the below
set MAPNIK_INPUT_PLUGINS=path.join(__dirname, 'mapnik/lib/mapnik/input')
set MAPNIK_FONTS=path.join(__dirname, 'mapnik/lib/mapnik/fonts')
python gen_settings.py
@rem augment the settings
echo var path = require('path'); module.exports.env = {'ICU_DATA': path.join(__dirname, 'mapnik/share/icu'), 'GDAL_DATA': path.join(__dirname, 'mapnik/share/gdal'),'PROJ_LIB': path.join(__dirname, 'mapnik/share/proj') }; >> lib/mapnik_settings.js

chdir /d %TILEMILL_DIR%
@rem symlink mapnik into main directory so npm is happy
@rem mklink /d /j node_modules/mapnik %DEST%/mapnik

@rem - handle mapnik itself
rd /q /s %MAPNIK_DEST%
xcopy /i /s /exclude:platforms\windows\excludes.txt %MAPNIK_INSTALL% %MAPNIK_DEST%

@rem - move all other C++ addons into place
@rem rd /q /s %DEST%\zipfile
@rem xcopy /i /s /exclude:platforms\windows\excludes.txt %DEVROOT%\node-zipfile %DEST%\zipfile
rd /q /s %DEST%\srs
xcopy /i /s /exclude:platforms\windows\excludes.txt %DEVROOT%\node-srs %DEST%\srs
@rem rd /q /s %DEST%\sqlite3
@rem xcopy /i /s /exclude:platforms\windows\excludes.txt %DEVROOT%\node-sqlite3 %DEST%\sqlite3
@rem rd /q /s %DEST%\contextify
@rem xcopy /i /s /exclude:platforms\windows\excludes.txt %DEVROOT%\contextify %DEST%\contextify

@rem - move icu, proj, and gdal data into node-mapnik folder
rd /q /s %MAPNIK_DATA_DEST%\proj
xcopy /i /s %DEVROOT%\proj\nad %MAPNIK_DATA_DEST%\proj
rd /q /s %MAPNIK_DATA_DEST%\gdal
xcopy /i /s %DEVROOT%\gdal\data %MAPNIK_DATA_DEST%\gdal

del /q node.exe
xcopy %NODEEXE% %TILEMILL_DIR%\node.exe

set DEVROOT=c:\dev2
@rem place c++ addons outside of node_modules for now
@rem to make it easier to remove/recreate node_modules
set DEST=node_modules
set MAPNIK_INSTALL=c:\mapnik-v2.3.0
set NODEEXE="C:\Program Files (x86)\nodejs\node.exe"
set MAPNIK_DEST=%DEST%\mapnik\lib\mapnik
set MAPNIK_DATA_DEST=%DEST%\mapnik\lib\mapnik\share
mkdir %MAPNIK_DATA_DEST%

@rem make sure Python is on the PATH
set PATH=%PATH%;c:\Python27

@rem change into current directory
cd /d %~dp0
@rem then move to main tilemill folder
cd ..\..\
set TILEMILL_DIR=%CD%

@rem mkdir %DEST%

@rem nuke any failed c++ module installs
@rem rd /q /s node_modules\bones\node_modules\jquery\node_modules\jsdom\node_modules\contextify
@rem rd /q /s node_modules\sqlite3
rd /q /s node_modules\mapnik
rd /q /s node_modules\tilelive-mapnik\node_modules\mapnik
@rem rd /q /s node_modules\millstone\node_modules\srs
@rem rd /q /s node_modules\millstone\node_modules\zipfile
@rem rd /q /s node_modules\tilelive-mapnik\node_modules\eio

@rem remove then re-copy node-mapnik
xcopy /i /s /exclude:platforms\windows\excludes.txt %DEVROOT%\node-mapnik %DEST%\mapnik

@rem fixup paths to plugins making them relative
@rem to future location of mapnik itself
cd %DEST%\mapnik
@rem - note, intentially not quoting the below
set MAPNIK_INPUT_PLUGINS=path.join(__dirname, 'mapnik/lib/mapnik/input')
set MAPNIK_FONTS=path.join(__dirname, 'mapnik/lib/mapnik/fonts')
python gen_settings.py
@rem augment the settings
echo var path = require('path'); module.exports.env = {'ICU_DATA': path.join(__dirname, 'mapnik/share/icu'), 'GDAL_DATA': path.join(__dirname, 'mapnik/share/gdal'),'PROJ_LIB': path.join(__dirname, 'mapnik/share/proj') }; >> lib/mapnik_settings.js

chdir /d %TILEMILL_DIR%
@rem symlink mapnik into main directory so npm is happy
@rem mklink /d /j node_modules/mapnik %DEST%/mapnik

@rem - handle mapnik itself
rd /q /s %MAPNIK_DEST%
xcopy /i /s /exclude:platforms\windows\excludes.txt %MAPNIK_INSTALL% %MAPNIK_DEST%

@rem - move all other C++ addons into place
@rem rd /q /s %DEST%\zipfile
@rem xcopy /i /s /exclude:platforms\windows\excludes.txt %DEVROOT%\node-zipfile %DEST%\zipfile
@rem rd /q /s %DEST%\srs
@rem xcopy /i /s /exclude:platforms\windows\excludes.txt %DEVROOT%\node-srs %DEST%\srs
@rem rd /q /s %DEST%\sqlite3
@rem xcopy /i /s /exclude:platforms\windows\excludes.txt %DEVROOT%\node-sqlite3 %DEST%\sqlite3
@rem rd /q /s %DEST%\contextify
@rem xcopy /i /s /exclude:platforms\windows\excludes.txt %DEVROOT%\contextify %DEST%\contextify

@rem - move icu, proj, and gdal data into node-mapnik folder
rd /q /s %MAPNIK_DATA_DEST%\proj
xcopy /i /s %DEVROOT%\proj\nad %MAPNIK_DATA_DEST%\proj
rd /q /s %MAPNIK_DATA_DEST%\gdal
xcopy /i /s %DEVROOT%\gdal\data %MAPNIK_DATA_DEST%\gdal

del /q node.exe
xcopy %NODEEXE% %TILEMILL_DIR%\node.exe

update windows packaging script

update windows packaging script


java -Xrunhprof:cpu=samples -DWNDBVERSION=1.7 -DWNHOME=C:\nlp\opennlp\opennlp\dictionary\src\ -DWNSEARCHDIR=C:\nlp\WordNet\dict\ -jar output\dictionary-0.1.0.jar  %1 -g -h -o -a -s -Oop.txt -over -synsa -antsa -perta -famla -synsn -simsn -antsn -coorn -hypen -hypon -treen -holon -sprtn -smemn -ssubn -hholn -meron -subsn -partn -membn -hmern -nomnn -attrn -famln -synsv -simsv -antsv -coorv -hypev -hypov -treev -tropv -entav -causv -nomnv -framv -famlv -synsr -antsr -pertr -famlr

Stop error by adding space at end of line


@echo off

:: 启动命令处理器扩展名 启动延缓环境变量扩展名
setlocal ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION

:: 双脱字符的功用
echo Hi there^^!

:: 如果是从图形界面（相对于命令行）启动的，则暂停
echo %cmdcmdline% | find "%~0" > nul
if %errorlevel% EQU 0 pause

::
echo %cmdcmdline% | findstr /c:"%~n0" > nul
if %errorlevel% EQU 0 pause

@echo off

:: 启动命令处理器扩展名 启动延缓环境变量扩展名
setlocal ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION

:: 双脱字符的功用
echo Hi there^^!

:: 如果是从图形界面（相对于命令行）启动的，则暂停
echo %cmdcmdline% | find "%~0" > nul
if %errorlevel% EQU 0 pause

:: 图形界面启动则暂停，替代方案
echo %cmdcmdline% | findstr /c:"%~n0" > nul
if %errorlevel% EQU 0 pause

Complete comments.

Complete comments.


REM Set variables for Microsoft Visual Studio for Python 2.7
REM @call "C:\Users\michaelh3\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\vcvarsall.bat" amd64
REM Set environ as workaround for bugs (See http://stackoverflow.com/questions/2817869/error-unable-to-find-vcvarsall-bat and http://bugs.python.org/issue23246)
REM SET DISTUTILS_USE_SDK=1
REM SET MSSdk=1

@call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x86_amd64

REM Test build
python setup.py sdist bdist_wheel
REM Upload to PyPi
REM python setup.py sdist bdist_wheel upload

REM Set variables for Microsoft Visual Studio for Python 2.7
REM @call "C:\Users\michaelh3\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\vcvarsall.bat" amd64
REM Set environ as workaround for bugs (See http://stackoverflow.com/questions/2817869/error-unable-to-find-vcvarsall-bat and http://bugs.python.org/issue23246)
REM SET DISTUTILS_USE_SDK=1
REM SET MSSdk=1

REM Set variables for Microsoft Visual Studio for Python 3.6
@call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x86_amd64

REM Test build
python setup.py sdist bdist_wheel
REM Upload to PyPi
REM python setup.py sdist bdist_wheel upload

Update bat file for Python 3 build

Update bat file for Python 3 build


@echo Off
set config=%1
if "%config%" == "" (
   set config=Release
)

set version=
if not "%PackageVersion%" == "" (
   set version=-Version %PackageVersion%
)

REM Build
msbuild AW.Model.RWX.sln /p:Configuration="%config%" /m /v:M /fl /flp:LogFile=msbuild.log;Verbosity=Normal /nr:false

REM Package
mkdir Build
cmd /c %nuget% pack "Bloyteg.AW.Model.RWX\Bloyteg.AW.Model.RWX.fsproj" -symbols -o Build -p Configuration=%config% %version% -IncludeReferencedProjects

@echo Off
set config=%1
if "%config%" == "" (
   set config=Release
)

set version=
if not "%PackageVersion%" == "" (
   set version=-Version %PackageVersion%
)

REM Build
%WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild AW.Model.RWX.sln /p:Configuration="%config%" /m /v:M /fl /flp:LogFile=msbuild.log;Verbosity=Normal /nr:false

REM Package
mkdir Build
cmd /c %nuget% pack "Bloyteg.AW.Model.RWX\Bloyteg.AW.Model.RWX.fsproj" -symbols -o Build -p Configuration=%config% %version% -IncludeReferencedProjects

Update build script.

Update build script.


@echo off
setlocal EnableDelayedExpansion
set R2_BASE=""
set frida_version=14.2.17
if "%PLATFORM%" == "x64" (set frida_os_arch=x86_64) else (set frida_os_arch=x86)
for /f %%i in ('radare2 -H R2_USER_PLUGINS') do set R2_PLUGDIR=%%i
REM for /f %%i in ('where radare2') do set R2_BASE=%%i\..
set R2_BASE=%cd%\radare2
set DEBUG=/O2
set INSTALL=

for /f %%i in ('radare2 -qv') do set R2V=%%i

if not exist %R2_BASE% (
	echo radare2 not found
	set /p R2_BASE="Please enter full path of radare2 installation: "
	set /p R2_PLUGDIR="Please enter full path of radare2 plugin dir (radare2 -H): "
)

echo Using R2_BASE: %R2_BASE%
set R2_INC=/I"%R2_BASE%\include" /I"%R2_BASE%\include\libr" /I"%R2_BASE%\include\libr\sdb"

for %%i in (%*) do (
	if "%%i"=="debug" (set DEBUG=/Z7)
	if "%%i"=="install" (set INSTALL=1)
)

copy config.h.w64 config.h
call npm install
cd src
cat .\_agent.js | xxd -i > .\_agent.h || (echo "xxd not in path?" & exit /b 1)

mkdir frida > nul 2>&1
cd frida

set FRIDA_SDK_URL="https://github.com/frida/frida/releases/download/!frida_version!/frida-core-devkit-!frida_version!-windows-!frida_os_arch!.exe"

if not exist ".\frida-core-sdk-!frida_version!-!frida_os_arch!.exe" (
	echo Downloading Frida Core Sdk

	powershell -command "(New-Object System.Net.WebClient).DownloadFile($env:FRIDA_SDK_URL, ""frida-core-sdk.exe-!frida_version!-!frida_os_arch!"")" ^
	|| wget -q --show-progress %FRIDA_SDK_URL% .\frida-core-sdk.exe -O .\frida-core-sdk-!frida_version!-!frida_os_arch!.exe || python -m wget %FRIDA_SDK_URL% -o frida-core-sdk-!frida_version!-!frida_os_arch!.exe

	echo Extracting...
	.\frida-core-sdk-!frida_version!-!frida_os_arch!.exe || (echo Failed to extract & exit /b 1)
)
cd ..

echo Compiling...
echo cl %DEBUG% /MT /nologo /LD /Gy /D_USRDLL /D_WINDLL io_frida.c %R2_INC% /I"%cd%" /I"%cd%\frida" "%cd%\frida\frida-core.lib" "%R2_BASE%\lib\*.lib"
cl %DEBUG% /MT /nologo /LD /Gy /D_USRDLL /D_WINDLL io_frida.c %R2_INC% /I"%cd%" /I"%cd%\frida" "%cd%\frida\frida-core.lib" "%R2_BASE%\lib\*.lib" || (echo Compilation Failed & exit /b 1)

zip ..\r2frida-%R2V%-w64.zip io_frida.dll
if not "%INSTALL%"=="" (
	echo Installing...
	mkdir "%R2_PLUGDIR%" > nul 2>&1
	echo Copying 'io_frida.dll' to %R2_PLUGDIR%
	copy io_frida.dll "%R2_PLUGDIR%\io_frida.dll"
	if not "%DEBUG%"=="/O2" (
		echo Copying 'io_frida.pdb' to %R2_PLUGDIR%
		cp io_frida.pdb "%R2_PLUGDIR%\io_frida.pdb"
	)
)

@echo off
setlocal EnableDelayedExpansion
set R2_BASE=""
set frida_version=14.2.17
if "%PLATFORM%" == "x64" (set frida_os_arch=x86_64) else (set frida_os_arch=x86)
for /f %%i in ('radare2 -H R2_USER_PLUGINS') do set R2_PLUGDIR=%%i
REM for /f %%i in ('where radare2') do set R2_BASE=%%i\..
set R2_BASE=%cd%\radare2
set DEBUG=/O2
set INSTALL=

for /f %%i in ('radare2 -qv') do set R2V=%%i

if not exist %R2_BASE% (
	echo radare2 not found
	set /p R2_BASE="Please enter full path of radare2 installation: "
	set /p R2_PLUGDIR="Please enter full path of radare2 plugin dir (radare2 -H): "
)

echo Using R2_BASE: %R2_BASE%
set R2_INC=/I"%R2_BASE%\include" /I"%R2_BASE%\include\libr" /I"%R2_BASE%\include\libr\sdb"

for %%i in (%*) do (
	if "%%i"=="debug" (set DEBUG=/Z7)
	if "%%i"=="install" (set INSTALL=1)
)

copy config.h.w64 config.h
call npm install
cd src
REM cat .\_agent.js | xxd -i > .\_agent.h || (echo "xxd not in path?" & exit /b 1)
cat _agent.js | r2 -nfqcpc $< | grep 0x > _agent.h || (echo "r2 must be in path & exit /b 1)

mkdir frida > nul 2>&1
cd frida

set FRIDA_SDK_URL="https://github.com/frida/frida/releases/download/!frida_version!/frida-core-devkit-!frida_version!-windows-!frida_os_arch!.exe"

if not exist ".\frida-core-sdk-!frida_version!-!frida_os_arch!.exe" (
	echo Downloading Frida Core Sdk

	powershell -command "(New-Object System.Net.WebClient).DownloadFile($env:FRIDA_SDK_URL, ""frida-core-sdk.exe-!frida_version!-!frida_os_arch!"")" ^
	|| wget -q --show-progress %FRIDA_SDK_URL% .\frida-core-sdk.exe -O .\frida-core-sdk-!frida_version!-!frida_os_arch!.exe || python -m wget %FRIDA_SDK_URL% -o frida-core-sdk-!frida_version!-!frida_os_arch!.exe

	echo Extracting...
	.\frida-core-sdk-!frida_version!-!frida_os_arch!.exe || (echo Failed to extract & exit /b 1)
)
cd ..

echo Compiling...
echo cl %DEBUG% /MT /nologo /LD /Gy /D_USRDLL /D_WINDLL io_frida.c %R2_INC% /I"%cd%" /I"%cd%\frida" "%cd%\frida\frida-core.lib" "%R2_BASE%\lib\*.lib"
cl %DEBUG% /MT /nologo /LD /Gy /D_USRDLL /D_WINDLL io_frida.c %R2_INC% /I"%cd%" /I"%cd%\frida" "%cd%\frida\frida-core.lib" "%R2_BASE%\lib\*.lib" || (echo Compilation Failed & exit /b 1)

zip ..\r2frida-%R2V%-w64.zip io_frida.dll
if not "%INSTALL%"=="" (
	echo Installing...
	mkdir "%R2_PLUGDIR%" > nul 2>&1
	echo Copying 'io_frida.dll' to %R2_PLUGDIR%
	copy io_frida.dll "%R2_PLUGDIR%\io_frida.dll"
	if not "%DEBUG%"=="/O2" (
		echo Copying 'io_frida.pdb' to %R2_PLUGDIR%
		cp io_frida.pdb "%R2_PLUGDIR%\io_frida.pdb"
	)
)

Fix #260 - Remove the need for xxd on windows build, just use r2


@echo off
.nuget\nuget.exe install FAKE -OutputDirectory packages -ExcludeVersion
packages\FAKE\tools\FAKE.exe build.fsx %*

@echo off

if not exist .paket\paket.bootstrapper.exe goto pktbootnotfound
.paket\paket.bootstrapper.exe
if not errorlevel 0 goto pktbootfailed

.paket\paket.exe restore
if not errorlevel 0 goto pktrestorefailed

packages\FAKE\tools\FAKE.exe %* --fsiargs -d:MONO build.fsx
if not errorlevel 0 goto fakefailed

set exit_code=0
goto leave

:pktbootnotfound
echo command not found: .paket\paket.bootstrapper.exe
set exit_code=1
goto leave

:pktbootfailed
echo command failed: .paket\paket.bootstrapper.exe
set exit_code=1
goto leave

:pktrestorefailed
echo command failed: .paket\paket.exe restore
set exit_code=1
goto leave

:fakefailed
echo command failed: packages\FAKE\tools\FAKE.exe %* --fsiargs -d:MONO build.fsx
set exit_code=1
goto leave

:leave
exit /b %exit_code%

Fix build.cmd to use paket

Fix build.cmd to use paket


@echo off
cd %~dp0

SETLOCAL
SET CACHED_NUGET=%LocalAppData%\NuGet\NuGet.exe

IF EXIST %CACHED_NUGET% goto copynuget
echo Downloading latest version of NuGet.exe...
IF NOT EXIST %LocalAppData%\NuGet md %LocalAppData%\NuGet
@powershell -NoProfile -ExecutionPolicy unrestricted -Command "$ProgressPreference = 'SilentlyContinue'; Invoke-WebRequest 'https://www.nuget.org/nuget.exe' -OutFile '%CACHED_NUGET%'"

:copynuget
IF EXIST .nuget\nuget.exe goto restore
md .nuget
copy %CACHED_NUGET% .nuget\nuget.exe > nul

:restore
IF EXIST packages\KoreBuild goto run
.nuget\NuGet.exe install KoreBuild -ExcludeVersion -o packages -nocache -pre
.nuget\NuGet.exe install Sake -version 0.2 -o packages -ExcludeVersion

IF "%SKIP_DOTNET_INSTALL%"=="1" goto run
CALL packages\KoreBuild\build\kvm upgrade -runtime CLR -x86
CALL packages\KoreBuild\build\kvm install default -runtime CoreCLR -x86

:run
CALL packages\KoreBuild\build\kvm use default -runtime CLR -x86
packages\Sake\tools\Sake.exe -I packages\KoreBuild\build -f makefile.shade %*

@echo off
cd %~dp0

SETLOCAL
SET CACHED_NUGET=%LocalAppData%\NuGet\NuGet.exe

IF EXIST %CACHED_NUGET% goto copynuget
echo Downloading latest version of NuGet.exe...
IF NOT EXIST %LocalAppData%\NuGet md %LocalAppData%\NuGet
@powershell -NoProfile -ExecutionPolicy unrestricted -Command "$ProgressPreference = 'SilentlyContinue'; Invoke-WebRequest 'https://www.nuget.org/nuget.exe' -OutFile '%CACHED_NUGET%'"

:copynuget
IF EXIST .nuget\nuget.exe goto restore
md .nuget
copy %CACHED_NUGET% .nuget\nuget.exe > nul

:restore
IF EXIST packages\KoreBuild goto run
.nuget\NuGet.exe install KoreBuild -ExcludeVersion -o packages -nocache -pre
.nuget\NuGet.exe install Sake -version 0.2 -o packages -ExcludeVersion

IF "%SKIP_KRE_INSTALL%"=="1" goto run
CALL packages\KoreBuild\build\kvm upgrade -runtime CLR -x86
CALL packages\KoreBuild\build\kvm install default -runtime CoreCLR -x86

:run
CALL packages\KoreBuild\build\kvm use default -runtime CLR -x86
packages\Sake\tools\Sake.exe -I packages\KoreBuild\build -f makefile.shade %*

Change SKIP_DOTNET_INSTALL to SKIP_KRE_INSTALL


if %PY3K% equ 1 (
  set BUILD_PYTHON="-DBUILD_PYTHON_INTERFACE=ON"
  set PYTHON_VERSION="%PY_VER%m"
) else (
  set BUILD_PYTHON="-DBUILD_PYTHON2_INTERFACE=ON"
  set PYTHON_VERSION="%PY_VER%"
)

mkdir "%SRC_DIR%"\build
pushd "%SRC_DIR%"\build

cmake -DCMAKE_BUILD_TYPE=Release -DPYTHON_INCLUDE_DIR=%PREFIX%\include\python%PYTHON_VERSION%\ -DPYTHON_LIBRARY=%PREFIX%\lib\python%PYTHON_VERSION%\libpython%PYTHON_VERSION%.dll -DCMAKE_PREFIX_PATH=%PREFIX% -DCMAKE_INSTALL_PREFIX="%LIBRARY_PREFIX%" %BUILD_PYTHON%" -G "Ninja" ..
ninja
ninja install

move %LIBRARY_PREFIX%\python\_helics.pyd %SP_DIR%
move %LIBRARY_PREFIX%\python\helics.py %SP_DIR%

popd

if %PY3K% equ 1 (
  set BUILD_PYTHON="-DBUILD_PYTHON_INTERFACE=ON"
  set PYTHON_VERSION="%PY_VER%m"
) else (
  set BUILD_PYTHON="-DBUILD_PYTHON2_INTERFACE=ON"
  set PYTHON_VERSION="%PY_VER%"
)

mkdir "%SRC_DIR%"\build
pushd "%SRC_DIR%"\build

set PY_VER_NO_DOT=%PY_VER:.=%

cmake -DCMAKE_BUILD_TYPE=Release -DPYTHON_LIBRARY="%PREFIX%\libs\python%PY_VER_NO_DOT%.lib"  -DPYTHON_INCLUDE_DIR="%PREFIX%\include" -DCMAKE_PREFIX_PATH="%LIBRARY_PREFIX%" -DCMAKE_INSTALL_PREFIX="%LIBRARY_PREFIX%" %BUILD_PYTHON%" -G "Ninja" ..
ninja
ninja install

move %LIBRARY_PREFIX%\python\_helics.pyd %SP_DIR%
move %LIBRARY_PREFIX%\python\helics.py %SP_DIR%

popd

Update bld.bat with PY_VER_NO_DOT

Update bld.bat with PY_VER_NO_DOT


@echo off

echo Started creating ortc nuget package...

set failure=0
set powershell_path=%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\powershell.exe
set PROGFILES=%ProgramFiles%
if not "%ProgramFiles(x86)%" == "" set PROGFILES=%ProgramFiles(x86)%
set MSVCDIR="%PROGFILES%\Microsoft Visual Studio 14.0"
set nuget=bin\nuget.exe
set SOLUTIONPATH=winrt\projects\ortc-lib-sdk-win.vs2015.sln
set nugetBasePath=winrt\nuget
set nugetPath=%nugetBasePath%\package
set nugetSpec=%nugetPath%\org.ortc.nuspec

if NOT EXIST %nuget% (
	echo Nuget donwload started
	call:downloadNuget
	if "%failure%" neq "0" goto:eof
)

if NOT EXIST %MSVCDIR% (
    set MSVCDIR="%PROGFILES%\Microsoft Visual Studio 12.0"
)

if NOT EXIST %MSVCDIR% (
    call:failure 1 "Microsoft Visual Studio 12.0 or 14.0 is not installed."
	goto:eof
)

::call:buildProjects x86
::if "%failure%" neq "0" goto:eof

::call:buildProjects x64
::if "%failure%" neq "0" goto:eof

::call:buildProjects ARM
::if "%failure%" neq "0" goto:eof

call:preparePackage
if "%failure%" neq "0" goto:eof

call:makeNuget

goto:eof

:downloadNuget
%powershell_path% "Start-BitsTransfer https://dist.nuget.org/win-x86-commandline/latest/nuget.exe -Destination bin\nuget.exe"

if ERRORLEVEL 1 call:failure %errorlevel% "Could not download nuget.exe"
goto:eof

:buildProjects
call %MSVCDIR%\VC\vcvarsall.bat %1
if ERRORLEVEL 1 call:failure %errorlevel% "Could not setup %1 compiler"

MSBuild %SOLUTIONPATH% /t:api\org_ortc\org_ortc /property:Configuration=Release /property:Platform=%1
if %errorlevel% neq 0 call:failure %errorlevel% "Building org.ortc projects has failed"

goto:eof

:preparePackage

set nugetTargetPath=%nugetBasePath%\org.ortc.targets
set nugetSpecPath=%nugetBasePath%\org.ortc.nuspec

set nugetBuildPath=%nugetPath%\build
set nugetBuildNativePath=%nugetBuildPath%\native
set nugetBuildNetCorePath=%nugetBuildPath%\netcore45
set nugetBuildNetCorex86Path=%nugetBuildNetCorePath%\x86
set nugetBuildNetCorex64Path=%nugetBuildNetCorePath%\x64
set nugetBuildNetCoreARMPath=%nugetBuildNetCorePath%\arm

set nugetLibPath=%nugetPath%\lib
set nugetLibNetCorePath=%nugetLibPath%\netcore45
set nugetLibUAPPath=%nugetLibPath%\uap10.0

set nugetRuntimesPath=%nugetPath%\runtimes
set nugetRuntimesx86Path=%nugetRuntimesPath%\win10-x86\native
set nugetRuntimesx64Path=%nugetRuntimesPath%\win10-x64\native
set nugetRuntimesARMPath=%nugetRuntimesPath%\win10-arm\native

set sourcex86Path=winrt\Build\x86\Release\org.ortc
set sourcex86DllPath=%sourcex86Path%\org.ortc.dll
set sourcex86WinmdPath=%sourcex86Path%\org.ortc.winmd
set sourcex86PdbPath=%sourcex86Path%\org.ortc.pdb

set sourcex64Path=winrt\Build\x64\Release\org.ortc
set sourcex64DllPath=%sourcex64Path%\org.ortc.dll
set sourcex64WinmdPath=%sourcex64Path%\org.ortc.winmd
set sourcex64PdbPath=%sourcex64Path%\org.ortc.pdb

set sourcexARMPath=winrt\Build\ARM\Release\org.ortc
set sourcexARMDllPath=%sourcexARMPath%\org.ortc.dll
set sourcexARMWinmdPath=%sourcexARMPath%\org.ortc.winmd
set sourcexARMPdbPath=%sourcexARMPath%\org.ortc.pdb

call:createFolder %nugetPath%
if "%failure%" neq "0" goto:eof

call::copyFiles %sourcexARMDllPath% %nugetRuntimesARMPath%
if "%failure%" neq "0" goto:eof

call::copyFiles %sourcex64DllPath% %nugetRuntimesx64Path%
if "%failure%" neq "0" goto:eof

call::copyFiles %sourcex86DllPath% %nugetRuntimesx86Path%
if "%failure%" neq "0" goto:eof

call::copyFiles %sourcex86WinmdPath% %nugetLibUAPPath%
if "%failure%" neq "0" goto:eof

call::copyFiles %nugetTargetPath% %nugetBuildNativePath%
if "%failure%" neq "0" goto:eof

call:copyFiles %nugetSpecPath% %nugetPath%
if "%failure%" neq "0" goto:eof

goto:eof

:makeNuget

%nuget% pack %nugetSpec% -OutputDirectory %nugetBasePath%\Output
if ERRORLEVEL 1 call:failure %errorlevel% "Failed creating the org.ortc nuget package"

goto:eof
:copyFiles
if EXIST %1 (
	call:createFolder %2
	echo Copying %1 to %2
	copy %1 %2
	if ERRORLEVEL 1 call:failure %errorlevel% "Could not copy a %1"
) else (
	call:failure 1 "Could not copy a %1"
)
goto:eof

:createFolder
if NOT EXIST %1 (
	mkdir %1
	if ERRORLEVEL 1 call:failure %errorlevel% "Could not make a directory %1"
)
goto:eof
:failure
echo.

echo ERROR: %~2

echo.
echo FAILURE: Could not create a nuget package.

set failure=%~1

goto:eof

:done
echo.
echo Success: ORTC nuget package is created.
echo.

@echo off

echo Started creating ortc nuget package...

set failure=0
set powershell_path=%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\powershell.exe
set PROGFILES=%ProgramFiles%
if not "%ProgramFiles(x86)%" == "" set PROGFILES=%ProgramFiles(x86)%
set MSVCDIR="%PROGFILES%\Microsoft Visual Studio 14.0"
set nuget=bin\nuget.exe
set SOLUTIONPATH=winrt\projects\ortc-lib-sdk-win.vs2015.sln
set nugetBasePath=winrt\nuget
set nugetPath=%nugetBasePath%\package
set nugetSpec=%nugetPath%\org.ortc.nuspec
set nugetOutputPath=%nugetBasePath%\Output

if NOT EXIST %nuget% (
	echo Nuget donwload started
	call:downloadNuget
	if "%failure%" neq "0" goto:eof
)

if NOT EXIST %MSVCDIR% (
    set MSVCDIR="%PROGFILES%\Microsoft Visual Studio 12.0"
)

if NOT EXIST %MSVCDIR% (
    call:failure 1 "Microsoft Visual Studio 12.0 or 14.0 is not installed."
	goto:eof
)

::call:buildProjects x86
::if "%failure%" neq "0" goto:eof

::call:buildProjects x64
::if "%failure%" neq "0" goto:eof

::call:buildProjects ARM
::if "%failure%" neq "0" goto:eof

call:preparePackage
if "%failure%" neq "0" goto:eof

call:makeNuget

goto:eof

:downloadNuget
%powershell_path% "Start-BitsTransfer https://dist.nuget.org/win-x86-commandline/latest/nuget.exe -Destination bin\nuget.exe"

if ERRORLEVEL 1 call:failure %errorlevel% "Could not download nuget.exe"
goto:eof

:buildProjects
call %MSVCDIR%\VC\vcvarsall.bat %1
if ERRORLEVEL 1 call:failure %errorlevel% "Could not setup %1 compiler"

MSBuild %SOLUTIONPATH% /t:api\org_ortc\org_ortc /property:Configuration=Release /property:Platform=%1
if %errorlevel% neq 0 call:failure %errorlevel% "Building org.ortc projects has failed"

goto:eof

:preparePackage

set nugetTargetPath=%nugetBasePath%\org.ortc.targets
set nugetSpecPath=%nugetBasePath%\org.ortc.nuspec

set nugetBuildPath=%nugetPath%\build
set nugetBuildNativePath=%nugetBuildPath%\native
set nugetBuildNetCorePath=%nugetBuildPath%\netcore45
set nugetBuildNetCorex86Path=%nugetBuildNetCorePath%\x86
set nugetBuildNetCorex64Path=%nugetBuildNetCorePath%\x64
set nugetBuildNetCoreARMPath=%nugetBuildNetCorePath%\arm

set nugetLibPath=%nugetPath%\lib
set nugetLibNetCorePath=%nugetLibPath%\netcore45
set nugetLibUAPPath=%nugetLibPath%\uap10.0

set nugetRuntimesPath=%nugetPath%\runtimes
set nugetRuntimesx86Path=%nugetRuntimesPath%\win10-x86\native
set nugetRuntimesx64Path=%nugetRuntimesPath%\win10-x64\native
set nugetRuntimesARMPath=%nugetRuntimesPath%\win10-arm\native

set sourcex86Path=winrt\Build\x86\Release\org.ortc
set sourcex86DllPath=%sourcex86Path%\org.ortc.dll
set sourcex86WinmdPath=%sourcex86Path%\org.ortc.winmd
set sourcex86PdbPath=%sourcex86Path%\org.ortc.pdb

set sourcex64Path=winrt\Build\x64\Release\org.ortc
set sourcex64DllPath=%sourcex64Path%\org.ortc.dll
set sourcex64WinmdPath=%sourcex64Path%\org.ortc.winmd
set sourcex64PdbPath=%sourcex64Path%\org.ortc.pdb

set sourcexARMPath=winrt\Build\ARM\Release\org.ortc
set sourcexARMDllPath=%sourcexARMPath%\org.ortc.dll
set sourcexARMWinmdPath=%sourcexARMPath%\org.ortc.winmd
set sourcexARMPdbPath=%sourcexARMPath%\org.ortc.pdb

call:createFolder %nugetPath%
if "%failure%" neq "0" goto:eof

call::copyFiles %sourcexARMDllPath% %nugetRuntimesARMPath%
if "%failure%" neq "0" goto:eof

call::copyFiles %sourcex64DllPath% %nugetRuntimesx64Path%
if "%failure%" neq "0" goto:eof

call::copyFiles %sourcex86DllPath% %nugetRuntimesx86Path%
if "%failure%" neq "0" goto:eof

call::copyFiles %sourcex86WinmdPath% %nugetLibUAPPath%
if "%failure%" neq "0" goto:eof

call::copyFiles %nugetTargetPath% %nugetBuildNativePath%
if "%failure%" neq "0" goto:eof

call:copyFiles %nugetSpecPath% %nugetPath%
if "%failure%" neq "0" goto:eof

goto:eof

:makeNuget
call:createFolder %nugetOutputPath%
if "%failure%" neq "0" goto:eof

%nuget% pack %nugetSpec% -OutputDirectory %nugetOutputPath%
if ERRORLEVEL 1 call:failure %errorlevel% "Failed creating the org.ortc nuget package"

goto:eof
:copyFiles
if EXIST %1 (
	call:createFolder %2
	echo Copying %1 to %2
	copy %1 %2
	if ERRORLEVEL 1 call:failure %errorlevel% "Could not copy a %1"
) else (
	call:failure 1 "Could not copy a %1"
)
goto:eof

:createFolder
if NOT EXIST %1 (
	mkdir %1
	if ERRORLEVEL 1 call:failure %errorlevel% "Could not make a directory %1"
)
goto:eof
:failure
echo.

echo ERROR: %~2

echo.
echo FAILURE: Could not create a nuget package.

set failure=%~1

goto:eof

:done
echo.
echo Success: ORTC nuget package is created.
echo.

Set output folder for nuget package

Set output folder for nuget package


@echo off

if not exists build\win (
    mkdir build\win
    )

cd build\win

CMAKE="cmake"

%CMAKE% ^
    -DBUILD_WIN=TRUE ^
    -DCMAKE_BUILD_TYPE=Release ^
    ..\..

%CMAKE% --build . --target install --config Release

Add build-win.bat

Add build-win.bat


rem dennyhalim.com
cd %appdata%\google\chrome
cd %programfiles%\google\chrome
chrome.exe --process-per-site --renderer-process-limit=1 --disk-cache-size=1

Create chrome-faster.cmd

Create chrome-faster.cmd


:: batch file
@echo off

if NOT EXIST "variables.bat" (
    :: No variable file defined
    shutdown -s -t 0
)
:: Source variables
call variables.bat
if NOT EXIST %reportURLFile% (
    :: No report URL file defined
    shutdown -s -t 0
)
if NOT EXIST %srcDir% (
    :: No source dir defined
    shutdown -s -t 0
)

SET /P reportURL=<%reportURLFile%
SET userAgent="CCX/CI_BOT"
SET logFile="%reportFolder%/log.html"

call :postStatus "preparation" "Copy testsuite to local folder"
call :executeCommand robocopy %suiteSrcDir% %suiteDstDir% /e

call :postStatus "preparation" "Copy code to local folder"
call :executeCommand robocopy %srcDir% %dstDir% /e
call :executeCommand cd %dstDir%

call :postStatus "building" "Compiling CCExtractor"
:: Go to Windows build folder
call :executeCommand cd windows
:: Build CCExtractor using the sln script
call :executeCommand "C:\Program Files (x86)\MSBuild\14.0\Bin\MSBuild" ccextractor.sln
:: check whether installation successful
if EXIST Debug\ccextractorwin.exe (
    cd Debug
    :: Run testsuite
    call :postStatus "testing" "Running tests"
    call :executeCommand cd %suiteDstDir%
    call :executeCommand "%tester%" --entries "%testFile%" --executable "%dstDir%/windows/Debug/ccextractor" --tempfolder "%tempFolder%" --timeout 3000 --reportfolder "%reportFolder%" --resultfolder "%resultFolder%" --samplefolder "%sampleFolder%" --method Server --url "%reportURL%"
    call :postStatus "completed" "Ran all tests"
    :: Shut down
    shutdown -s -t 0
)
else
(
    call :haltAndCatchFire "build"
)
EXIT /B %ERRORLEVEL%
:: Functions to shorten the script

:: Fail when the exit status is not equal to 0
:executeCommand
%* > "%logFile%"
SET /A status=%ERRORLEVEL%
IF %status% NEQ 0 (
    :: No message needed as we post before anyway
    call :haltAndCatchFire ""
)
EXIT /B 0

:: Post status to the server
:postStatus
curl -s -A "%userAgent%" --data "type=progress&status=%~1&message=%~2" -w "\n" "%reportURL%" >> "%logFile%"
EXIT /B 0

:: Exit script and post abort status
:haltAndCatchFire
call :postStatus "canceled" %~1 >> "%logFile%"
shutdown -s -t 0
EXIT /B 0

@echo off

if NOT EXIST "variables.bat" (
    rem No variable file defined
    shutdown -s -t 0
)
rem Source variables
call variables.bat
if NOT EXIST %reportURLFile% (
    rem No report URL file defined
    shutdown -s -t 0
)
if NOT EXIST %srcDir% (
    rem No source dir defined
    shutdown -s -t 0
)

SET /P reportURL=<%reportURLFile%
SET userAgent="CCX/CI_BOT"
SET logFile="%reportFolder%/log.html"

call :postStatus "preparation" "Copy testsuite to local folder"
call :executeCommand robocopy %suiteSrcDir% %suiteDstDir% /e

call :postStatus "preparation" "Copy code to local folder"
call :executeCommand robocopy %srcDir% %dstDir% /e
call :executeCommand cd %dstDir%

call :postStatus "building" "Compiling CCExtractor"
rem Go to Windows build folder
call :executeCommand cd windows
rem Build CCExtractor using the sln script
call :executeCommand "C:\Program Files (x86)\MSBuild\14.0\Bin\MSBuild" ccextractor.sln
rem check whether installation successful
if EXIST Debug\ccextractorwin.exe (
    cd Debug
    rem Run testsuite
    call :postStatus "testing" "Running tests"
    call :executeCommand cd %suiteDstDir%
    call :executeCommand "%tester%" --entries "%testFile%" --executable "%dstDir%/windows/Debug/ccextractor" --tempfolder "%tempFolder%" --timeout 3000 --reportfolder "%reportFolder%" --resultfolder "%resultFolder%" --samplefolder "%sampleFolder%" --method Server --url "%reportURL%"
    call :postStatus "completed" "Ran all tests"
    rem Shut down
    shutdown -s -t 0
)
else
(
    call :haltAndCatchFire "build"
)
EXIT /B %ERRORLEVEL%
rem Functions to shorten the script

rem Fail when the exit status is not equal to 0
:executeCommand
%* > "%logFile%"
SET /A status=%ERRORLEVEL%
IF %status% NEQ 0 (
    rem No message needed as we post before anyway
    call :haltAndCatchFire ""
)
EXIT /B 0

rem Post status to the server
:postStatus
curl -s -A "%userAgent%" --data "type=progress&status=%~1&message=%~2" -w "\n" "%reportURL%" >> "%logFile%"
EXIT /B 0

rem Exit script and post abort status
:haltAndCatchFire
call :postStatus "canceled" %~1 >> "%logFile%"
shutdown -s -t 0
EXIT /B 0

replace :: with rem

replace :: with rem


setlocal
call settings.bat

call fetch.bat http://www.gaia-gis.it/gaia-sins/readosm-1.0.0b.tar.gz readosm-1.0.0b

cd readosm-1.0.0b

if NOT EXIST %PREFIX%\include\expat.h ( echo "Sorry, need expat to build" & exit /b 1 )

if "%Compiler%"=="MINGW" (
  SET "PATH=%MSYSDIR%;%PATH%"
  if NOT EXIST Makefile (bash -c "./configure %CONFARGS%")
  %ER%
  bash -c "make install"
  %ER%
) else (
"%SEDC%" -i nmake.opt -e "s@INSTDIR=.*@INSTDIR=\$\(PREFIX\)@"

if "%Variant%" == "Debug" (
    "%SEDC%" -i nmake.opt -e "s@\/MD @\/MDd \/Zi @"
    "%SEDC%" -i nmake.opt -e "s@\/Ox@@"
)

"%SEDC%" -i makefile.vc -e "s@C:\\\\OSGeo4W@$(PREFIX)@g"
"%SEDC%" -i makefile.vc -e "s@C:\\\\OSGeo4w@$(PREFIX)@g"
"%SEDC%" -i makefile.vc -e "s@libexpat.lib@expat.lib@g"
"%SEDC%" -i makefile.vc -e "s@sqlite3_i.lib@sqlite3.lib@g"

nmake -f makefile.vc install
%ER%
)

setlocal
call settings.bat

call fetch.bat http://www.gaia-gis.it/gaia-sins/readosm-1.0.0d.tar.gz readosm-1.0.0d

cd readosm-1.0.0d

if NOT EXIST %PREFIX%\include\expat.h ( echo "Sorry, need expat to build" & exit /b 1 )

if "%Compiler%"=="MINGW" (
  SET "PATH=%MSYSDIR%;%PATH%"
  if NOT EXIST Makefile (bash -c "./configure %CONFARGS%")
  %ER%
  bash -c "make install"
  %ER%
) else (
"%SEDC%" -i nmake.opt -e "s@INSTDIR=.*@INSTDIR=\$\(PREFIX\)@"

if "%Variant%" == "Debug" (
    "%SEDC%" -i nmake.opt -e "s@\/MD @\/MDd \/Zi @"
    "%SEDC%" -i nmake.opt -e "s@\/Ox@@"
)

"%SEDC%" -i makefile.vc -e "s@C:\\\\OSGeo4W@$(PREFIX)@g"
"%SEDC%" -i makefile.vc -e "s@C:\\\\OSGeo4w@$(PREFIX)@g"
"%SEDC%" -i makefile.vc -e "s@libexpat.lib@expat.lib@g"
"%SEDC%" -i makefile.vc -e "s@sqlite3_i.lib@sqlite3.lib@g"

nmake -f makefile.vc install
%ER%
)

update readosm to 1.0.0d

update readosm to 1.0.0d


@ECHO OFF
SETLOCAL
REM SETLOCAL is on, so changes to the path not persist to the actual user's path

git.exe --version 2> NUL
if %ERRORLEVEL%==9009 GOTO :trydefaultpath
GOTO :EOF

:trydefaultpath
path=C:\Program Files (x86)\Git\cmd;C:\Program Files\Git\cmd;%PATH%
git.exe --version 2> NUL
if %ERRORLEVEL%==9009 GOTO :showerror
GOTO :EOF

:showerror
ECHO Git is not in your path and could not be found in C:\Program Files (x86)\Git\cmd nor in C:\Program Files\Git\cmd
set /p install=" Do you want to install Git through Chocolatey [y/n]? " %=%
if %install%==y (
	GOTO :installgit
) else (
	GOTO :cantcontinue
)

:cantcontinue
ECHO Can't complete the build without Git being in the path. Please add it to be able to continue.
GOTO :EOF

:installgit
ECHO Installing Chocolatey first
@powershell -NoProfile -ExecutionPolicy unrestricted -Command "iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))" && SET PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin
ECHO Installing Git through Chocolatey
choco install git

@ECHO OFF
SETLOCAL
REM SETLOCAL is on, so changes to the path not persist to the actual user's path

git.exe --version
if %ERRORLEVEL%==9009 GOTO :trydefaultpath
GOTO :EOF

:trydefaultpath
path=C:\Program Files (x86)\Git\cmd;C:\Program Files\Git\cmd;%PATH%
git.exe --version
if %ERRORLEVEL%==9009 GOTO :showerror
GOTO :EOF

:showerror
ECHO Git is not in your path and could not be found in C:\Program Files (x86)\Git\cmd nor in C:\Program Files\Git\cmd
set /p install=" Do you want to install Git through Chocolatey [y/n]? " %=%
if %install%==y (
	GOTO :installgit
) else (
	GOTO :cantcontinue
)

:cantcontinue
ECHO Can't complete the build without Git being in the path. Please add it to be able to continue.
GOTO :EOF

:installgit
ECHO Installing Chocolatey first
@powershell -NoProfile -ExecutionPolicy unrestricted -Command "iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))" && SET PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin
ECHO Installing Git through Chocolatey
choco install git

Build - fix InstallGit.cmd

Build - fix InstallGit.cmd


@echo off
:: Copyright (c) 2010 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.

set THISDIR=%~dp0
set TOOL_NAME="unknown"

:: Get the tool name and put it into TOOL_NAME {{{1
:: NB: SHIFT command doesn't modify %*
:PARSE_ARGS_LOOP
  if %1 == () GOTO:TOOLNAME_NOT_FOUND
  if %1 == --tool GOTO:TOOLNAME_FOUND
  SHIFT
  goto :PARSE_ARGS_LOOP

:TOOLNAME_NOT_FOUND
echo "Please specify a tool (tsan or drmemory) by using --tool flag"
set %ERRORLEVEL% 1
goto :EOF

:TOOLNAME_FOUND
SHIFT
set TOOL_NAME=%1
:: }}}
if %TOOL_NAME% == drmemory GOTO :SETUP_DRMEMORY
if %TOOL_NAME% == tsan     GOTO :SETUP_TSAN
echo "Unknown tool: %TOOL_NAME%! Only tsan and drmemory are supported right now"
set %ERRORLEVEL% 1
goto :EOF

:SETUP_DRMEMORY
:: Set up DRMEMORY_COMMAND to invoke Dr. Memory {{{1
set DRMEMORY_PATH=%THISDIR%..\..\third_party\drmemory
set DRMEMORY_SFX=%DRMEMORY_PATH%\drmemory-windows-sfx.exe
if EXIST %DRMEMORY_SFX% GOTO DRMEMORY_BINARY_OK
echo "Can't find Dr. Memory executables."
echo "See http://www.chromium.org/developers/how-tos/using-valgrind/dr-memory"
echo "for the instructions on how to get them."
set %ERRORLEVEL% 1
goto :EOF

:DRMEMORY_BINARY_OK
%DRMEMORY_SFX% -o%DRMEMORY_PATH%\unpacked -y
set DRMEMORY_COMMAND=%DRMEMORY_PATH%\unpacked\exports32\bin\drmemory.exe -dr %DRMEMORY_PATH%\unpacked\exports
:: }}}
goto :RUN_TESTS

:SETUP_TSAN
:: Set up PIN_COMMAND to invoke TSan {{{1
set TSAN_PATH=%THISDIR%..\..\third_party\tsan
set TSAN_SFX=%TSAN_PATH%\tsan-x86-windows-sfx.exe
if EXIST %TSAN_SFX% GOTO TSAN_BINARY_OK
echo "Can't find ThreadSanitizer executables."
echo "See http://www.chromium.org/developers/how-tos/using-valgrind/threadsanitizer/threadsanitizer-on-windows"
echo "for the instructions on how to get them."
set %ERRORLEVEL% 1
goto :EOF

:TSAN_BINARY_OK
%TSAN_SFX% -o%TSAN_PATH%\unpacked -y
set PIN_COMMAND=%TSAN_PATH%\unpacked\tsan-x86-windows\tsan.bat
:: }}}
goto :RUN_TESTS

:RUN_TESTS
set PYTHONPATH=%THISDIR%../python/google
set RUNNING_ON_VALGRIND=yes
python %THISDIR%/chrome_tests.py %*

@echo off
:: Copyright (c) 2010 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.

set THISDIR=%~dp0
set TOOL_NAME="unknown"

:: Get the tool name and put it into TOOL_NAME {{{1
:: NB: SHIFT command doesn't modify %*
:PARSE_ARGS_LOOP
  if %1 == () GOTO:TOOLNAME_NOT_FOUND
  if %1 == --tool GOTO:TOOLNAME_FOUND
  SHIFT
  goto :PARSE_ARGS_LOOP

:TOOLNAME_NOT_FOUND
echo "Please specify a tool (tsan or drmemory) by using --tool flag"
set %ERRORLEVEL% 1
goto :EOF

:TOOLNAME_FOUND
SHIFT
set TOOL_NAME=%1
:: }}}
if %TOOL_NAME% == drmemory GOTO :SETUP_DRMEMORY
if %TOOL_NAME% == tsan     GOTO :SETUP_TSAN
echo "Unknown tool: %TOOL_NAME%! Only tsan and drmemory are supported right now"
set %ERRORLEVEL% 1
goto :EOF

:SETUP_DRMEMORY
:: Set up DRMEMORY_COMMAND to invoke Dr. Memory {{{1
set DRMEMORY_PATH=%THISDIR%..\..\third_party\drmemory
set DRMEMORY_SFX=%DRMEMORY_PATH%\drmemory-windows-sfx.exe
if EXIST %DRMEMORY_SFX% GOTO DRMEMORY_BINARY_OK
echo "Can't find Dr. Memory executables."
echo "See http://www.chromium.org/developers/how-tos/using-valgrind/dr-memory"
echo "for the instructions on how to get them."
set %ERRORLEVEL% 1
goto :EOF

:DRMEMORY_BINARY_OK
%DRMEMORY_SFX% -o%DRMEMORY_PATH%\unpacked -y
set DRMEMORY_COMMAND=%DRMEMORY_PATH%\unpacked\bin\drmemory.exe
:: }}}
goto :RUN_TESTS

:SETUP_TSAN
:: Set up PIN_COMMAND to invoke TSan {{{1
set TSAN_PATH=%THISDIR%..\..\third_party\tsan
set TSAN_SFX=%TSAN_PATH%\tsan-x86-windows-sfx.exe
if EXIST %TSAN_SFX% GOTO TSAN_BINARY_OK
echo "Can't find ThreadSanitizer executables."
echo "See http://www.chromium.org/developers/how-tos/using-valgrind/threadsanitizer/threadsanitizer-on-windows"
echo "for the instructions on how to get them."
set %ERRORLEVEL% 1
goto :EOF

:TSAN_BINARY_OK
%TSAN_SFX% -o%TSAN_PATH%\unpacked -y
set PIN_COMMAND=%TSAN_PATH%\unpacked\tsan-x86-windows\tsan.bat
:: }}}
goto :RUN_TESTS

:RUN_TESTS
set PYTHONPATH=%THISDIR%../python/google
set RUNNING_ON_VALGRIND=yes
python %THISDIR%/chrome_tests.py %*

Update Dr. Memory paths to account for the new version of the DrM SFX
TBR=bruening
TEST=DrM FYI bot starts the proper version of DrM
Review URL: http://codereview.chromium.org/6507041

git-svn-id: dd90618784b6a4b323ea0c23a071cb1c9e6f2ac7@75250 4ff67af0-8c30-449e-8e8b-ad334ec8d88c


@echo off

rmdir /s /q "%USERPROFILE%/zpm-install" 2>NUL

set root=%cd%

mkdir "%USERPROFILE%/zpm-install"
cd "%USERPROFILE%/zpm-install"

if exist "premake5.zip" del /q "premake5.zip"

powershell -command "Invoke-WebRequest -Uri https://repo.continuum.io/miniconda/Miniconda3-latest-Windows-x86_64.exe -OutFile miniconda.exe"

if defined GH_TOKEN (
    powershell -command "Invoke-WebRequest -Uri https://github.com/premake/premake-core/releases/download/v5.0.0-alpha11/premake-5.0.0-alpha11-windows.zip -OutFile premake5.zip -Headers @{'Authorization'='token %GH_TOKEN%'}"
) else (
    powershell -command "Invoke-WebRequest -Uri https://github.com/premake/premake-core/releases/download/v5.0.0-alpha11/premake-5.0.0-alpha11-windows.zip -OutFile premake5.zip"
)
echo Finished downloading premake...

powershell -command "Expand-Archive premake5.zip -DestinationPath ."

git clone https://github.com/Zefiros-Software/ZPM.git ./zpm --depth 1 -b features/refactor

for /f %%i in ('.\premake5 show install --file=zpm/zpm.lua') do set ZPM_DIR=%%i
set CONDA_DIR="%ZPM_DIR%/conda/"
echo %CONDA_DIR%
start /wait "" miniconda.exe /RegisterPython=0 /AddToPath=0 /S /D=%CONDA_DIR%

echo Finished cloning ZPM...

if defined GH_TOKEN (
    premake5.exe --github-token=%GH_TOKEN% --file=zpm/zpm.lua install zpm
) else (
    premake5.exe --file=zpm/zpm.lua install zpm
)

cd %root%

rmdir /s /q "%USERPROFILE%/zpm-install"

echo ZPM is installed, however a restart is required!

SET PATH=%PATH%;%USERPROFILE%\zpm\bin\

@echo off

rmdir /s /q "%USERPROFILE%/zpm-install" 2>NUL

set root=%cd%

mkdir "%USERPROFILE%/zpm-install"
cd "%USERPROFILE%/zpm-install"

if exist "premake5.zip" del /q "premake5.zip"

powershell -command "Invoke-WebRequest -Uri https://repo.continuum.io/miniconda/Miniconda3-latest-Windows-x86_64.exe -OutFile miniconda.exe"

if defined GH_TOKEN (
    powershell -command "Invoke-WebRequest -Uri https://github.com/premake/premake-core/releases/download/v5.0.0-alpha11/premake-5.0.0-alpha11-windows.zip -OutFile premake5.zip -Headers @{'Authorization'='token %GH_TOKEN%'}"
) else (
    powershell -command "Invoke-WebRequest -Uri https://github.com/premake/premake-core/releases/download/v5.0.0-alpha11/premake-5.0.0-alpha11-windows.zip -OutFile premake5.zip"
)
echo Finished downloading premake...

powershell -command "Expand-Archive premake5.zip -DestinationPath ."

git clone https://github.com/Zefiros-Software/ZPM.git ./zpm --depth 1 -b features/refactor

for /f "tokens=*" %i in ('.\premake5 show install --file=zpm/zpm.lua') do set ZPM_DIR=%i
set CONDA_DIR="%ZPM_DIR%/conda/"
echo %CONDA_DIR%
start /wait "" miniconda.exe /RegisterPython=0 /AddToPath=0 /S /D=%CONDA_DIR%

echo Finished cloning ZPM...

if defined GH_TOKEN (
    premake5.exe --github-token=%GH_TOKEN% --file=zpm/zpm.lua install zpm
) else (
    premake5.exe --file=zpm/zpm.lua install zpm
)

cd %root%

rmdir /s /q "%USERPROFILE%/zpm-install"

echo ZPM is installed, however a restart is required!

SET PATH=%PATH%;%USERPROFILE%\zpm\bin\

Fix batch syntax

Fix batch syntax


@echo off

rem
rem Licensed to the Apache Software Foundation (ASF) under one or more
rem contributor license agreements.  See the NOTICE file distributed with
rem this work for additional information regarding copyright ownership.
rem The ASF licenses this file to You under the Apache License, Version 2.0
rem (the "License"); you may not use this file except in compliance with
rem the License.  You may obtain a copy of the License at
rem
rem    http://www.apache.org/licenses/LICENSE-2.0
rem
rem Unless required by applicable law or agreed to in writing, software
rem distributed under the License is distributed on an "AS IS" BASIS,
rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
rem See the License for the specific language governing permissions and
rem limitations under the License.
rem

rem This script loads spark-env.cmd if it exists, and ensures it is only loaded once.
rem spark-env.cmd is loaded from SPARK_CONF_DIR if set, or within the current directory's
rem conf\ subdirectory.

set SPARK_ENV_CMD=spark-env.cmd
if not defined SPARK_ENV_LOADED (
  set SPARK_ENV_LOADED=1

  if [%SPARK_CONF_DIR%] == [] (
    set SPARK_CONF_DIR=%~dp0..\conf
  )

  set SPARK_ENV_CMD=%SPARK_CONF_DIR%\%SPARK_ENV_CMD%
  if exist %SPARK_ENV_CMD% (
    call %SPARK_ENV_CMD%
  )
)

rem Setting SPARK_SCALA_VERSION if not already set.

set SCALA_VERSION_1=2.13
set SCALA_VERSION_2=2.12

set ASSEMBLY_DIR1=%SPARK_HOME%\assembly\target\scala-%SCALA_VERSION_1%
set ASSEMBLY_DIR2=%SPARK_HOME%\assembly\target\scala-%SCALA_VERSION_2%
set ENV_VARIABLE_DOC=https://spark.apache.org/docs/latest/configuration.html#environment-variables

if not defined SPARK_SCALA_VERSION (
  if exist %ASSEMBLY_DIR2% if exist %ASSEMBLY_DIR1% (
    echo Presence of build for multiple Scala versions detected ^(%ASSEMBLY_DIR1% and %ASSEMBLY_DIR2%^).
    echo Remove one of them or, set SPARK_SCALA_VERSION=%SCALA_VERSION_1% in spark-env.cmd.
    echo Visit %ENV_VARIABLE_DOC% for more details about setting environment variables in spark-env.cmd.
    echo Either clean one of them or, set SPARK_SCALA_VERSION in spark-env.cmd.
    exit 1
  )
  if exist %ASSEMBLY_DIR1% (
    set SPARK_SCALA_VERSION=%SCALA_VERSION_1%
  ) else (
    set SPARK_SCALA_VERSION=%SCALA_VERSION_2%
  )
)
exit /b 0

@echo off

rem
rem Licensed to the Apache Software Foundation (ASF) under one or more
rem contributor license agreements.  See the NOTICE file distributed with
rem this work for additional information regarding copyright ownership.
rem The ASF licenses this file to You under the Apache License, Version 2.0
rem (the "License"); you may not use this file except in compliance with
rem the License.  You may obtain a copy of the License at
rem
rem    http://www.apache.org/licenses/LICENSE-2.0
rem
rem Unless required by applicable law or agreed to in writing, software
rem distributed under the License is distributed on an "AS IS" BASIS,
rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
rem See the License for the specific language governing permissions and
rem limitations under the License.
rem

rem This script loads spark-env.cmd if it exists, and ensures it is only loaded once.
rem spark-env.cmd is loaded from SPARK_CONF_DIR if set, or within the current directory's
rem conf\ subdirectory.

if not defined SPARK_ENV_LOADED (
  set SPARK_ENV_LOADED=1

  if [%SPARK_CONF_DIR%] == [] (
    set SPARK_CONF_DIR=%~dp0..\conf
  )

  call :LoadSparkEnv
)

rem Setting SPARK_SCALA_VERSION if not already set.

set SCALA_VERSION_1=2.13
set SCALA_VERSION_2=2.12

set ASSEMBLY_DIR1=%SPARK_HOME%\assembly\target\scala-%SCALA_VERSION_1%
set ASSEMBLY_DIR2=%SPARK_HOME%\assembly\target\scala-%SCALA_VERSION_2%
set ENV_VARIABLE_DOC=https://spark.apache.org/docs/latest/configuration.html#environment-variables

if not defined SPARK_SCALA_VERSION (
  if exist %ASSEMBLY_DIR2% if exist %ASSEMBLY_DIR1% (
    echo Presence of build for multiple Scala versions detected ^(%ASSEMBLY_DIR1% and %ASSEMBLY_DIR2%^).
    echo Remove one of them or, set SPARK_SCALA_VERSION=%SCALA_VERSION_1% in spark-env.cmd.
    echo Visit %ENV_VARIABLE_DOC% for more details about setting environment variables in spark-env.cmd.
    echo Either clean one of them or, set SPARK_SCALA_VERSION in spark-env.cmd.
    exit 1
  )
  if exist %ASSEMBLY_DIR1% (
    set SPARK_SCALA_VERSION=%SCALA_VERSION_1%
  ) else (
    set SPARK_SCALA_VERSION=%SCALA_VERSION_2%
  )
)
exit /b 0

:LoadSparkEnv
if exist "%SPARK_CONF_DIR%\spark-env.cmd" (
  call "%SPARK_CONF_DIR%\spark-env.cmd"
)

[SPARK-32227] Fix regression bug in load-spark-env.cmd with Spark 3.0.0

### What changes were proposed in this pull request?
Fix regression bug in load-spark-env.cmd with Spark 3.0.0

### Why are the changes needed?
cmd doesn't support set env twice. So set `SPARK_ENV_CMD=%SPARK_CONF_DIR%\%SPARK_ENV_CMD%` doesn't take effect, which caused regression.

### Does this PR introduce _any_ user-facing change?
No

### How was this patch tested?
Manually tested.
1. Create a spark-env.cmd under conf folder. Inside this, `echo spark-env.cmd`
2. Run old load-spark-env.cmd, nothing printed in the output
2. Run fixed load-spark-env.cmd, `spark-env.cmd` showed in the output.

Closes #29044 from warrenzhu25/32227.

Lead-authored-by: Warren Zhu <a88894bc69d176b4f5c0606d3283ce90c66f0abb@microsoft.com>
Co-authored-by: Warren Zhu <90ae6f1fb511b57e924f9c5918579d46eaeea524@gmail.com>
Signed-off-by: HyukjinKwon <2680965ad5aae29275c8fb10150cb10f5554e78b@apache.org>


echo project (my_sundials_test)>CMakeLists.txt
echo add_executable (cvRoberts_dns cvRoberts_dns.c) >>CMakeLists.txt
echo target_link_libraries (cvRoberts_dns LINK_PUBLIC m sundials_cvode openblas sundials_nvecserial) >>CMakeLists.txt
echo enable_testing() >>CMakeLists.txt
echo add_test (test_roberts cvRoberts_dns) >>CMakeLists.txt

cmake -G "NMake Makefiles" .
nmake
ctest

echo project (my_sundials_test)>CMakeLists.txt
echo include_directories ("$ENV{PREFIX}/include") >>CMakeLists.txt
echo add_executable (cvRoberts_dns cvRoberts_dns.c) >>CMakeLists.txt
echo target_link_libraries (cvRoberts_dns LINK_PUBLIC m sundials_cvode openblas sundials_nvecserial) >>CMakeLists.txt
echo enable_testing() >>CMakeLists.txt
echo add_test (test_roberts cvRoberts_dns) >>CMakeLists.txt

cmake -G "NMake Makefiles" .
nmake
ctest

use cmake's include_directories directive in run_test.bat


@echo off
del *.sdf

del *.VC.db
del /s *.aps
del /a:h *.suo
rmdir /s /q .vs
rmdir /s /q ipch
rmdir /s /q x64
rmdir /s /q Debug
rmdir /s /q Release
rmdir /s /q EopMon\x64
rmdir /s /q EopMon\Debug
rmdir /s /q EopMon\Release
cd HyperPlatform
clean.bat

update clean.bat

update clean.bat


rem all of this because msbuild command line does not work well with packages restore

cd ..

set solution=MrAdvice.sln
.nuget\nuget.exe restore %solution%
msbuild %solution% /m /p:Configuration=Debug /p:Platform="Any CPU"

rem all of this because msbuild command line does not work well with packages restore

set solution=MrAdvice.sln
.nuget\nuget.exe restore %solution%
msbuild %solution% /m /p:Configuration=Debug /p:Platform="Any CPU"

Update ci-build.bat

Update ci-build.bat


@ECHO off

powershell.exe -ExecutionPolicy Unrestricted -noexit .\system\deploy.ps1

@ECHO off

powershell.exe -ExecutionPolicy Unrestricted .\system\deploy.ps1

PAUSE

improve behavior of deploy.cmd

improve behavior of deploy.cmd


:: Copyright 2013 The Go 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 off

if exist mkall.sh goto dirok
echo mkall_windows.bat must be run from src\pkg\syscall directory
goto :end
:dirok

go build mksyscall_windows.go
.\mksyscall_windows syscall_windows.go security_windows.go |gofmt >zsyscall_windows.go
del mksyscall_windows.exe

:end

:: Copyright 2013 The Go 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 off

if exist mkall.sh goto dirok
echo mkall_windows.bat must be run from src\syscall directory
goto :end
:dirok

go build mksyscall_windows.go
.\mksyscall_windows syscall_windows.go security_windows.go |gofmt >zsyscall_windows.go
del mksyscall_windows.exe

:end

fix comment in mkall_windows.bat

syscall: fix comment in mkall_windows.bat

src/pkg -> src

LGTM=alex.brainman
R=alex.brainman
CC=golang-codereviews
https://codereview.appspot.com/139400043


@echo off
rem Setup MCL and echo the environment
rem Usage: eval `cmd.exe /c SetupWSLcross.bat x64`

IF "%~1"=="x86" GOTO search
IF "%~1"=="x64" GOTO search

GOTO badarg

:search
IF EXIST "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Auxiliary\Build\vcvarsall.bat". (
   call "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Auxiliary\Build\vcvarsall.bat" %~1 > nul
   goto continue
)

IF EXIST "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat". (
   call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" %~1 > nul
   goto continue
)

IF EXIST "C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Auxiliary\Build\vcvarsall.bat". (
   call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Auxiliary\Build\vcvarsall.bat" %~1 > nul
   goto continue
)

IF EXIST "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvarsall.bat". (
   call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvarsall.bat" %~1 > nul
   goto continue
)

IF EXIST "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Auxiliary\Build\vcvarsall.bat". (
   call "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Auxiliary\Build\vcvarsall.bat" %~1 > nul
   goto continue
)

IF EXIST "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat". (
   call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" %~1 > nul
   goto continue
)

IF EXIST "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat". (
   call "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" %~1 > nul
   goto continue
)

GOTO no_vcvars

:continue

FOR /F "delims==" %%F IN ('where cl.exe') DO SET _cl_exec_=%%F
FOR %%F IN ("%_cl_exec_%") DO SET CL_PATH=%%~dpF

FOR /F "delims==" %%F IN ('where rc.exe') DO SET _rc_exec_=%%F
FOR %%F IN ("%_rc_exec_%") DO SET RC_PATH=%%~dpF

rem Order is important for some unknown reason
set WSLENV=VCToolsRedistDir/up:CL_PATH/up:RC_PATH/up:LIBPATH/ul:LIB/ul:INCLUDE/ul
wsl.exe echo INCLUDE=\"$INCLUDE\";
wsl.exe echo LIB=\"$LIB\";
wsl.exe echo LIBPATH=\"$LIBPATH\";
wsl.exe echo VCToolsRedistDir=\"$VCToolsRedistDir\";
wsl.exe echo PATH=\"$CL_PATH\":\"$RC_PATH\":'$PATH';
wsl.exe echo WSLENV='$WSLENV:LIBPATH/l:LIB/l:INCLUDE/l';
rem wsl.exe echo export 'INCLUDE LIB LIBPATH VCToolsRedistDir WSLENV PATH';
wsl.exe echo "# Eval this file eval \`cmd.exe /c SetupWSLcross.bat\`"

exit

:badarg
echo "Bad TARGET or not specified: %~1 expected x86 or x64"
exit

:no_vcvars
echo "Error: SetupWSLcross.bat: Could not find vcvarsall.bat"
echo "   edit erts/etc/win32/wsl_tools/SetupWSLcross.bat"
exit

@echo off
rem Setup MCL and echo the environment
rem Usage: eval `cmd.exe /c SetupWSLcross.bat x64`

IF "%~1"=="x86" GOTO search
IF "%~1"=="x64" GOTO search

GOTO badarg

:search
IF EXIST "C:\Program Files\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\Build\vcvarsall.bat". (
   call "C:\Program Files\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\Build\vcvarsall.bat" %~1 > nul
   goto continue
)

IF EXIST "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat". (
   call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" %~1 > nul
   goto continue
)

IF EXIST "C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Auxiliary\Build\vcvarsall.bat". (
   call "C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Auxiliary\Build\vcvarsall.bat" %~1 > nul
   goto continue
)

IF EXIST "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvarsall.bat". (
   call "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvarsall.bat" %~1 > nul
   goto continue
)

IF EXIST "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Auxiliary\Build\vcvarsall.bat". (
   call "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Auxiliary\Build\vcvarsall.bat" %~1 > nul
   goto continue
)

IF EXIST "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat". (
   call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" %~1 > nul
   goto continue
)

IF EXIST "C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Auxiliary\Build\vcvarsall.bat". (
   call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Auxiliary\Build\vcvarsall.bat" %~1 > nul
   goto continue
)

IF EXIST "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvarsall.bat". (
   call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvarsall.bat" %~1 > nul
   goto continue
)

IF EXIST "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Auxiliary\Build\vcvarsall.bat". (
   call "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Auxiliary\Build\vcvarsall.bat" %~1 > nul
   goto continue
)

IF EXIST "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat". (
   call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" %~1 > nul
   goto continue
)

IF EXIST "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat". (
   call "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" %~1 > nul
   goto continue
)

GOTO no_vcvars

:continue

FOR /F "delims==" %%F IN ('where cl.exe') DO SET _cl_exec_=%%F
FOR %%F IN ("%_cl_exec_%") DO SET CL_PATH=%%~dpF

FOR /F "delims==" %%F IN ('where rc.exe') DO SET _rc_exec_=%%F
FOR %%F IN ("%_rc_exec_%") DO SET RC_PATH=%%~dpF

rem Order is important for some unknown reason
set WSLENV=VCToolsRedistDir/up:CL_PATH/up:RC_PATH/up:LIBPATH/ul:LIB/ul:INCLUDE/ul
wsl.exe echo INCLUDE=\"$INCLUDE\";
wsl.exe echo LIB=\"$LIB\";
wsl.exe echo LIBPATH=\"$LIBPATH\";
wsl.exe echo VCToolsRedistDir=\"$VCToolsRedistDir\";
wsl.exe echo PATH=\"$CL_PATH\":\"$RC_PATH\":'$PATH';
wsl.exe echo WSLENV='$WSLENV:LIBPATH/l:LIB/l:INCLUDE/l';
rem wsl.exe echo export 'INCLUDE LIB LIBPATH VCToolsRedistDir WSLENV PATH';
wsl.exe echo "# Eval this file eval \`cmd.exe /c SetupWSLcross.bat\`"

exit

:badarg
echo "Bad TARGET or not specified: %~1 expected x86 or x64"
exit

:no_vcvars
echo "Error: SetupWSLcross.bat: Could not find vcvarsall.bat"
echo "   edit erts/etc/win32/wsl_tools/SetupWSLcross.bat"
exit

enable Visual Studio 2022 for Windows

enable Visual Studio 2022 for Windows

Visual Studio default path has changes in 2022, it is no
longer a 32-bit application.


@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem
@rem  Gradle startup script for Windows
@rem
@rem ##########################################################################

@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal

@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS=

set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%

@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome

set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto init

echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.

goto fail

:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe

if exist "%JAVA_EXE%" goto init

echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.

goto fail

:init
@rem Get command-line arguments, handling Windowz variants

if not "%OS%" == "Windows_NT" goto win9xME_args
if "%@eval[2+2]" == "4" goto 4NT_args

:win9xME_args
@rem Slurp the command line arguments.
set CMD_LINE_ARGS=
set _SKIP=2

:win9xME_args_slurp
if "x%~1" == "x" goto execute

set CMD_LINE_ARGS=%*
goto execute

:4NT_args
@rem Get arguments from the 4NT Shell from JP Software
set CMD_LINE_ARGS=%$

:execute
@rem Setup the command line

set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar

@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%

:end
@rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd

:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
if  not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
exit /b 1

:mainEnd
if "%OS%"=="Windows_NT" endlocal

:omega

put gradlew.bat back in.... for dem windozers


@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem
@rem  Gradle startup script for Windows
@rem
@rem ##########################################################################

@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal

set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%

@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS="-Xmx64m"

@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome

set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto init

echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.

goto fail

:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe

if exist "%JAVA_EXE%" goto init

echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.

goto fail

:init
@rem Get command-line arguments, handling Windows variants

if not "%OS%" == "Windows_NT" goto win9xME_args

:win9xME_args
@rem Slurp the command line arguments.
set CMD_LINE_ARGS=
set _SKIP=2

:win9xME_args_slurp
if "x%~1" == "x" goto execute

set CMD_LINE_ARGS=%*

:execute
@rem Setup the command line

set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar

@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%

:end
@rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd

:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
if  not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
exit /b 1

:mainEnd
if "%OS%"=="Windows_NT" endlocal

:omega

Add missing gradle wrapper file

Add missing gradle wrapper file


@echo off

SET Rscript="D:\GCModeller\src\R-sharp\App\net5.0\Rscript.exe"

%Rscript% --build

pause

Create build-unix.cmd

Create build-unix.cmd