@echo OFF
@setlocal

@rem Copyright (c) nexB Inc. and others. All rights reserved.
@rem SPDX-License-Identifier: Apache-2.0
@rem See http://www.apache.org/licenses/LICENSE-2.0 for the license text.
@rem See https://github.com/nexB/ for support or download.
@rem See https://aboutcode.org for more information about nexB OSS projects.

@rem ################################
@rem # A configuration script to set things up:
@rem # create a virtualenv and install or update thirdparty packages.
@rem # Source this script for initial configuration
@rem # Use configure --help for details

@rem # This script will search for a virtualenv.pyz app in etc\thirdparty\virtualenv.pyz
@rem # Otherwise it will download the latest from the VIRTUALENV_PYZ_URL default
@rem ################################

@rem ################################
@rem # Defaults. Change these variables to customize this script
@rem ################################

@rem # Requirement arguments passed to pip and used by default or with --dev.
set "REQUIREMENTS=--editable ."
set "DEV_REQUIREMENTS=--editable .[testing]"

@rem # where we create a virtualenv
set "VIRTUALENV_DIR=tmp"

@rem # Cleanable files and directories to delete with the --clean option
set "CLEANABLE=build tmp"

@rem # extra  arguments passed to pip
set "PIP_EXTRA_ARGS= "

@rem # the URL to download virtualenv.pyz if needed
set VIRTUALENV_PYZ_URL=https://bootstrap.pypa.io/virtualenv.pyz
@rem ################################

@rem ################################
@rem # Current directory where this script lives
set CFG_ROOT_DIR=%~dp0
set "CFG_BIN_DIR=%CFG_ROOT_DIR%\%VIRTUALENV_DIR%\Scripts"

@rem ################################
@rem # Set the quiet flag to empty if not defined
if not defined CFG_QUIET (
    set "CFG_QUIET= "
)

@rem ################################
@rem # Main command line entry point
set CFG_DEV_MODE=0
set "CFG_REQUIREMENTS=%REQUIREMENTS%"

if "%1" EQU "--help"   (goto cli_help)
if "%1" EQU "--clean"  (goto clean)
if "%1" EQU "--dev"    (
    set "CFG_REQUIREMENTS=%DEV_REQUIREMENTS%"
    set CFG_DEV_MODE=1
)
if "%1" EQU "--python" (
    echo "The --python option is now DEPRECATED. Use the PYTHON_EXECUTABLE environment"
    echo "variable instead. Run configure --help for details."
    exit /b 0
)

@rem ################################
@rem # find a proper Python to run
@rem # Use environment variables or a file if available.
@rem # Otherwise the latest Python by default.
if not defined PYTHON_EXECUTABLE (
    @rem # check for a file named PYTHON_EXECUTABLE
    if exist ""%CFG_ROOT_DIR%\PYTHON_EXECUTABLE"" (
        set /p PYTHON_EXECUTABLE=<""%CFG_ROOT_DIR%\PYTHON_EXECUTABLE""
    ) else (
        set "PYTHON_EXECUTABLE=py"
    )
)

:create_virtualenv
@rem # create a virtualenv for Python
@rem # Note: we do not use the bundled Python 3 "venv" because its behavior and
@rem # presence is not consistent across Linux distro and sometimes pip is not
@rem # included either by default. The virtualenv.pyz app cures all these issues.

if not exist ""%CFG_BIN_DIR%\python.exe"" (
    if not exist "%CFG_BIN_DIR%" (
        mkdir %CFG_BIN_DIR%
    )

    if exist ""%CFG_ROOT_DIR%\etc\thirdparty\virtualenv.pyz"" (
        %PYTHON_EXECUTABLE% "%CFG_ROOT_DIR%\etc\thirdparty\virtualenv.pyz" ^
            --wheel embed --pip embed --setuptools embed ^
            --seeder pip ^
            --never-download ^
            --no-periodic-update ^
            --no-vcs-ignore ^
            %CFG_QUIET% ^
            %CFG_ROOT_DIR%\%VIRTUALENV_DIR%
    ) else (
        if not exist ""%CFG_ROOT_DIR%\%VIRTUALENV_DIR%\virtualenv.pyz"" (
            curl -o "%CFG_ROOT_DIR%\%VIRTUALENV_DIR%\virtualenv.pyz" %VIRTUALENV_PYZ_URL%

            if %ERRORLEVEL% neq 0 (
                exit /b %ERRORLEVEL%
            )
        )
        %PYTHON_EXECUTABLE% "%CFG_ROOT_DIR%\%VIRTUALENV_DIR%\virtualenv.pyz" ^
            --wheel embed --pip embed --setuptools embed ^
            --seeder pip ^
            --never-download ^
            --no-periodic-update ^
            --no-vcs-ignore ^
            %CFG_QUIET% ^
            %CFG_ROOT_DIR%\%VIRTUALENV_DIR%
    )
)

if %ERRORLEVEL% neq 0 (
    exit /b %ERRORLEVEL%
)

:install_packages
@rem # install requirements in virtualenv
@rem # note: --no-build-isolation means that pip/wheel/setuptools will not
@rem # be reinstalled a second time and reused from the virtualenv and this
@rem # speeds up the installation.
@rem # We always have the PEP517 build dependencies installed already.

%CFG_BIN_DIR%\pip install ^
    --upgrade ^
    --no-build-isolation ^
    %CFG_QUIET% ^
    %PIP_EXTRA_ARGS% ^
    %CFG_REQUIREMENTS%

if %ERRORLEVEL% neq 0 (
    exit /b %ERRORLEVEL%
)

exit /b 0

@rem ################################

:cli_help
    echo An initial configuration script
    echo "  usage: configure [options]"
    echo " "
    echo The default is to configure for regular use. Use --dev for development.
    echo " "
    echo The options are:
    echo " --clean: clean built and installed files and exit."
    echo " --dev:   configure the environment for development."
    echo " --help:  display this help message and exit."
    echo " "
    echo By default, the python interpreter version found in the path is used.
    echo Alternatively, the PYTHON_EXECUTABLE environment variable can be set to
    echo configure another Python executable interpreter to use. If this is not
    echo set, a file named PYTHON_EXECUTABLE containing a single line with the
    echo path of the Python executable to use will be checked last.
    exit /b 0

:clean
@rem # Remove cleanable file and directories and files from the root dir.
echo "* Cleaning ..."
for %%F in (%CLEANABLE%) do (
    rmdir /s /q "%CFG_ROOT_DIR%\%%F" >nul 2>&1
    del /f /q "%CFG_ROOT_DIR%\%%F" >nul 2>&1
)
exit /b 0

@echo OFF
@setlocal

@rem Copyright (c) nexB Inc. and others. All rights reserved.
@rem SPDX-License-Identifier: Apache-2.0
@rem See http://www.apache.org/licenses/LICENSE-2.0 for the license text.
@rem See https://github.com/nexB/ for support or download.
@rem See https://aboutcode.org for more information about nexB OSS projects.

@rem ################################
@rem # A configuration script to set things up:
@rem # create a virtualenv and install or update thirdparty packages.
@rem # Source this script for initial configuration
@rem # Use configure --help for details

@rem # This script will search for a virtualenv.pyz app in etc\thirdparty\virtualenv.pyz
@rem # Otherwise it will download the latest from the VIRTUALENV_PYZ_URL default
@rem ################################

@rem ################################
@rem # Defaults. Change these variables to customize this script
@rem ################################

@rem # Requirement arguments passed to pip and used by default or with --dev.
set "REQUIREMENTS=--editable ."
set "DEV_REQUIREMENTS=--editable .[testing]"

@rem # where we create a virtualenv
set "VIRTUALENV_DIR=tmp"

@rem # Cleanable files and directories to delete with the --clean option
set "CLEANABLE=build tmp"

@rem # extra  arguments passed to pip
set "PIP_EXTRA_ARGS= "

@rem # the URL to download virtualenv.pyz if needed
set VIRTUALENV_PYZ_URL=https://bootstrap.pypa.io/virtualenv.pyz
@rem ################################

@rem ################################
@rem # Current directory where this script lives
set CFG_ROOT_DIR=%~dp0
set "CFG_BIN_DIR=%CFG_ROOT_DIR%\%VIRTUALENV_DIR%\Scripts"

@rem ################################
@rem # Set the quiet flag to empty if not defined
if not defined CFG_QUIET (
    set "CFG_QUIET= "
)

@rem ################################
@rem # Main command line entry point
set CFG_DEV_MODE=0
set "CFG_REQUIREMENTS=%REQUIREMENTS%"

if "%1" EQU "--help"   (goto cli_help)
if "%1" EQU "--clean"  (goto clean)
if "%1" EQU "--dev"    (
    set "CFG_REQUIREMENTS=%DEV_REQUIREMENTS%"
    set CFG_DEV_MODE=1
)
if "%1" EQU "--python" (
    echo "The --python option is now DEPRECATED. Use the PYTHON_EXECUTABLE environment"
    echo "variable instead. Run configure --help for details."
    exit /b 0
)

@rem ################################
@rem # find a proper Python to run
@rem # Use environment variables or a file if available.
@rem # Otherwise the latest Python by default.
if not defined PYTHON_EXECUTABLE (
    @rem # check for a file named PYTHON_EXECUTABLE
    if exist ""%CFG_ROOT_DIR%\PYTHON_EXECUTABLE"" (
        set /p PYTHON_EXECUTABLE=<""%CFG_ROOT_DIR%\PYTHON_EXECUTABLE""
    ) else (
        set "PYTHON_EXECUTABLE=py"
    )
)

:create_virtualenv
@rem # create a virtualenv for Python
@rem # Note: we do not use the bundled Python 3 "venv" because its behavior and
@rem # presence is not consistent across Linux distro and sometimes pip is not
@rem # included either by default. The virtualenv.pyz app cures all these issues.

if not exist ""%CFG_BIN_DIR%\python.exe"" (
    if not exist "%CFG_BIN_DIR%" (
        mkdir %CFG_BIN_DIR%
    )

    if exist ""%CFG_ROOT_DIR%\etc\thirdparty\virtualenv.pyz"" (
        %PYTHON_EXECUTABLE% "%CFG_ROOT_DIR%\etc\thirdparty\virtualenv.pyz" ^
            --wheel embed --pip embed --setuptools embed ^
            --seeder pip ^
            --never-download ^
            --no-periodic-update ^
            --no-vcs-ignore ^
            %CFG_QUIET% ^
            %CFG_ROOT_DIR%\%VIRTUALENV_DIR%
    ) else (
        if not exist ""%CFG_ROOT_DIR%\%VIRTUALENV_DIR%\virtualenv.pyz"" (
            curl -o "%CFG_ROOT_DIR%\%VIRTUALENV_DIR%\virtualenv.pyz" %VIRTUALENV_PYZ_URL%

            if %ERRORLEVEL% neq 0 (
                exit /b %ERRORLEVEL%
            )
        )
        %PYTHON_EXECUTABLE% "%CFG_ROOT_DIR%\%VIRTUALENV_DIR%\virtualenv.pyz" ^
            --wheel embed --pip embed --setuptools embed ^
            --seeder pip ^
            --never-download ^
            --no-periodic-update ^
            --no-vcs-ignore ^
            %CFG_QUIET% ^
            %CFG_ROOT_DIR%\%VIRTUALENV_DIR%
    )
)

if %ERRORLEVEL% neq 0 (
    exit /b %ERRORLEVEL%
)

:install_packages
@rem # install requirements in virtualenv
@rem # note: --no-build-isolation means that pip/wheel/setuptools will not
@rem # be reinstalled a second time and reused from the virtualenv and this
@rem # speeds up the installation.
@rem # We always have the PEP517 build dependencies installed already.

%CFG_BIN_DIR%\pip install ^
    --upgrade ^
    --no-build-isolation ^
    %CFG_QUIET% ^
    %PIP_EXTRA_ARGS% ^
    %CFG_REQUIREMENTS%

@rem # Create junction to bin to have the same directory between linux and windows
mklink /J %CFG_ROOT_DIR%\%VIRTUALENV_DIR%\bin %CFG_ROOT_DIR%\%VIRTUALENV_DIR%\Scripts

if %ERRORLEVEL% neq 0 (
    exit /b %ERRORLEVEL%
)

exit /b 0

@rem ################################

:cli_help
    echo An initial configuration script
    echo "  usage: configure [options]"
    echo " "
    echo The default is to configure for regular use. Use --dev for development.
    echo " "
    echo The options are:
    echo " --clean: clean built and installed files and exit."
    echo " --dev:   configure the environment for development."
    echo " --help:  display this help message and exit."
    echo " "
    echo By default, the python interpreter version found in the path is used.
    echo Alternatively, the PYTHON_EXECUTABLE environment variable can be set to
    echo configure another Python executable interpreter to use. If this is not
    echo set, a file named PYTHON_EXECUTABLE containing a single line with the
    echo path of the Python executable to use will be checked last.
    exit /b 0

:clean
@rem # Remove cleanable file and directories and files from the root dir.
echo "* Cleaning ..."
for %%F in (%CLEANABLE%) do (
    rmdir /s /q "%CFG_ROOT_DIR%\%%F" >nul 2>&1
    del /f /q "%CFG_ROOT_DIR%\%%F" >nul 2>&1
)
exit /b 0

Create junction from Scripts to bin

Create junction from Scripts to bin

 * This is handy for windows to have the same path as linux

Signed-off-by: Chin Yeung Li <6ccf8ba77c1e60cfc87b1db28da7a91e12151748@nexb.com>


@echo off

if not exist .\misc\build.bat cd ..\
if not exist .\build mkdir .\build

if not "%MSVC_CONFIGURED%" == "TRUE" (
    call .\misc\configure-msvc.bat
)

cl /nologo .\source\win32_platform.cpp ^
    -Fo.\build\ -Fd.\build\game.pdb -Fe.\build\game.exe ^
    /W4 /wd4100 /wd4201 /wd4505 /MT /Od /Oi /Zi ^
    /link /subsystem:windows user32.lib gdi32.lib

REM create symlink of assets folder
if not exist .\build\assets (
    mklink /D .\build\assets ..\assets
    if ERRORLEVEL 1 (
        echo [WARNING] Assets folder symlink creation failed, probably not running this as admin...
    )
)

add assets symlinking to the build script


@echo off
rem #------------------------------------------------------------------------------
rem # Copyright 2014 Esri
rem # Licensed under the Apache License, Version 2.0 (the "License");
rem # you may not use this file except in compliance with the License.
rem # You may obtain a copy of the License at
rem #
rem #   http://www.apache.org/licenses/LICENSE-2.0
rem #
rem # Unless required by applicable law or agreed to in writing, software
rem # distributed under the License is distributed on an "AS IS" BASIS,
rem # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
rem # See the License for the specific language governing permissions and
rem # limitations under the License.
rem #==============================================================================
rem # Name:          InstallOpsServer.bat
rem #
rem # Purpose:       This is the main Ops Server installation script.
rem #
rem #==============================================================================
title Operations Server Installer

REM ---------------------------------------------------------------------
REM Set user specified variables
REM ---------------------------------------------------------------------
Call InstallSettings.bat

REM ---------------------------------------------------------------------
REM Set other variables
REM ---------------------------------------------------------------------
set ops_AGSVersion=10.3
set ops_PortalVersion=10.3

REM Define ArcGIS Data Store Path
REM NOTE: must have "\" at end of path
set ops_agsDataStoreDIR=C:\arcgisdatastore\

REM Define PostgreSQL paths
set ops_postgresqlInstallDIR=C:\PostgreSQL\9.3
set ops_postgresqlDataDIR=%ops_postgresqlInstallDIR%\data

REM Define path to Esri SoftwareAuthorization.exe
set ops_softwareAuthExePath="C:\Program Files\Common Files\ArcGIS\bin\SoftwareAuthorization.exe"

REM Define path to ConfigureWebAdaptor.exe
set ops_ConfWebAdaptorExePath="C:\Program Files (x86)\Common Files\ArcGIS\WebAdaptor\IIS\Tools\ConfigureWebAdaptor.exe"

REM ---------------------------------------------------------------------
REM Set the names of ArcGIS Server Web Adaptor and Portal for ArcGIS Web Adaptor
set ops_WebAdaptor_AGS=ags
set ops_WebAdaptor_Portal=arcgis

set sectionBreak===================================================================================
set ops_tempInstallDir=C:\OpsServerInstallTemp
cls

REM ---------------------------------------------------------------------
REM Check if command prompt is running in elevated permissions mode
REM (i.e. "run as administrator)
REM ---------------------------------------------------------------------
echo.
echo --Checking if Windows Command window is running as administrator
echo   by querying LOCAL SERVICE user registry entries...
echo.
reg query HKU\S-1-5-19
if "%ERRORLEVEL%"=="1" (
    echo.
    echo **********************************************************
    echo **  ERROR:
    echo **  You are _NOT_ running Windows Command window
    echo **  in elevated administrator mode ^(i.e., the CMD.exe
    echo **  must be "Run as administrator"^).
    echo **  Exiting InstallOpsServer.bat.
    echo **********************************************************
    echo.
    goto end
)
cls

REM ---------------------------------------------------------------------
REM Check if user "installed" configuration script in correct location
REM ---------------------------------------------------------------------
echo.
echo --Checking if installation scripts are installed in the correct location...

set ops_ScriptRootName=ops-server-config
set ops_ScriptRoot=C:\%ops_ScriptRootName%\

echo %~dp0 | find /I "%ops_ScriptRoot%"

if "%ERRORLEVEL%"=="1" (
    echo.
    echo **********************************************************
    echo **  ERROR:
    echo **  The '%ops_ScriptRootName%' folder is not installed in
    echo **  the correct location. It should be located at:
    echo **  %ops_ScriptRoot%
    echo **  Exiting InstallOpsServer.bat.
    echo **********************************************************
    echo.
    goto end
)
cls

REM ---------------------------------------------------------------------
REM Check if Software Root path exists and you have access to the folder
REM ---------------------------------------------------------------------

echo.
echo --Checking if specified software root path '%ops_softwareRoot%' exists...

if not exist %ops_softwareRoot% (
    echo.
    echo **********************************************************
    echo **  ERROR:
    echo **  The software root path ^(variable 'ops_softwareRoot'^)
    echo **  '%ops_softwareRoot%'
    echo **  you have specified does not exist or your account does
    echo **  not have access to this location.
    echo **  Exiting InstallOpsServer.bat.
    echo **********************************************************
    echo.
    goto end
)
cls

echo.
echo --Checking if you have access to the software root path '%ops_softwareRoot%'...

dir %ops_softwareRoot%
if "%ERRORLEVEL%"=="1" (
    echo.
    echo **********************************************************
    echo **  ERROR:
    echo **  Your account does not have access to the sofware root
    echo **  folder path '%ops_ScriptRoot%'
    echo **  Exiting InstallOpsServer.bat.
    echo **********************************************************
    echo.
    goto end
)
cls

REM ---------------------------------------------------------------------
REM Check software dependencies
REM ---------------------------------------------------------------------
REM Always call SetOverallErrorLevel.bat after running one of the "check"
REM batch files under the "Checks" folder.

REM Set error "flag" to initial "good" value of zero.
set ops_OverallErrLvl=0

REM Check if IIS is running/installed.
Call %~dp0..\SupportFiles\BatchFiles\Checks\IsInstalled_IIS.bat
Call %~dp0..\SupportFiles\BatchFiles\SetOverallErrorLevel.bat %ops_CheckErrLvl%

REM Check if .NET 3.5 is installed.
Call %~dp0..\SupportFiles\BatchFiles\Checks\IsInstalled_NETFramework3_5.bat
Call %~dp0..\SupportFiles\BatchFiles\SetOverallErrorLevel.bat %ops_CheckErrLvl%

REM Check if .NET 4.5 is installed
Call %~dp0..\SupportFiles\BatchFiles\Checks\IsInstalled_NETFramework4_5.bat
Call %~dp0..\SupportFiles\BatchFiles\SetOverallErrorLevel.bat %ops_CheckErrLvl%

REM Pause script execution if dependencies are not met.
Call %~dp0..\SupportFiles\BatchFiles\CheckErrorLevel.bat %ops_OverallErrLvl%

REM Clear screen
cls

:start
REM ---------------------------------------------------------------------
REM Start Block
REM ---------------------------------------------------------------------
echo *************************************************************************
echo *                    Operations Server Installation                     *
echo *************************************************************************
echo.
echo 1. Install
echo.
echo 0. Quit
echo.

set /p choice="Enter the number of your choice: "

if "%choice%"=="1" (
    set opsServerInstallType=Install
    REM was having problems with the IIS check on some systems;
    REM for now, set variable to "NO" so that it does not run
    REM the check. Not critical to run the check, since we do tell
    REM users that they have to uninstall IIS if it is already installed.
    set ops_Check_IIS_Existence=NO
    set ops_Check_DriveExistence=YES
    goto ValidationBeforeExecution
)
if "%choice%"=="0" exit
echo Invalid choice: %choice%
echo.
pause
cls
goto start

:ValidationBeforeExecution
REM ---------------------------------------------------------------------
REM Validate before executing the rest of the installation process
REM ---------------------------------------------------------------------

REM -------------------------------------------
REM Check if IIS is running
REM -------------------------------------------
if "%ops_Check_IIS_Existence%"=="YES" (
    REM ERRORLEVEL values when using the following "sc query" statement...
    REM If IIS service exists and is running: 0
    REM If IIS service exists and is stopped: 1
    REM If IIS service does not exist       : 1

    echo.
    echo.
    echo --Checking if IIS Web Server is running on this machine...
    echo.

    sc query W3SVC | find "RUNNING"
    if "%ERRORLEVEL%"=="0" (
        echo.
        echo **********************************************************
        echo **  ERROR:
        echo **  You have choosen to install Portal on a machine where
        echo **  IIS Web Server is also running. Please stop the IIS service
        echo **  ^(i.e. World Wide Web Publishing Service^) and set the startup
        echo **  type to "Manual", or uninstall IIS Web Server.
        echo **  Exiting InstallOpsServer.bat.
        echo **********************************************************
        echo.
        goto end
    )
    echo  IIS Web Server is not running or is not installed.
    echo.

)

REM -------------------------------------------
REM Check drives specified in cache and data
REM drive variables exist.
REM -------------------------------------------
if "%ops_Check_DriveExistence%"=="YES" (

    REM More info about using 'EXIST' command to determine drive
    REM existance can be found at: http://support.microsoft.com/kb/65994.
    REM An alternate choice to determine drive existance is to use:
    REM WMIC logicaldisk get name | find /I "%ops_cacheDrive%:"
    REM Then check immediately afterward if "%ERRORLEVEL%"=="1",
    REM which means drive letter does not exist.

    echo.
    echo --Checking if specified cache drive '%ops_cacheDrive%' exists...

    if not exist %ops_cacheDrive%:\NUL (
        echo.
        echo **********************************************************
        echo **  ERROR:
        echo **  The cache drive you have specified '%ops_cacheDrive%'
        echo **  does not exist. Either the 'ops_cacheDrive' variable in
        echo **  the InstallOpsServer.bat file is set to an incorrect
        echo **  drive letter or the drive is not mounted.
        echo **  Exiting InstallOpsServer.bat.
        echo **********************************************************
        echo.
        goto end
    ) else (
        echo Cache drive '%ops_cacheDrive%' exists.
    )

    echo.
    echo --Checking if specified data drive '%ops_dataDrive%' exists...

    if not exist %ops_dataDrive%:\NUL (
        echo.
        echo **********************************************************
        echo **  ERROR:
        echo **  The data drive you have specified '%ops_dataDrive%'
        echo **  does not exist. Either the 'ops_dataDrive' variable in
        echo **  the InstallOpsServer.bat file is set to an incorrect
        echo **  drive letter or the drive is not mounted.
        echo **  Exiting InstallOpsServer.bat.
        echo **********************************************************
        echo.
        goto end
    ) else (
        echo Data drive '%ops_dataDrive%' exists.
    )

)

if "%opsServerInstallType%"=="Install" goto Install

:Install
REM ---------------------------------------------------------------------
REM Install Software
REM ---------------------------------------------------------------------
echo.
echo Installation of Ops Server starting...
date /T
time /T
echo.

REM Install RDBMS
if "%ops_install_rdbms%"=="YES" (
    Call %~dp0PostgreSQL\InstallPostgreSQL.bat
)

REM Install ArcGIS Server
if "%ops_install_server%"=="YES" (
    Call %~dp0ArcGISServer\InstallArcGISServer.bat
)

REM Create ArcGIS Server site and data stores
if "%ops_create_ags_site%"=="YES" (
    Call %~dp0ArcGISServer\CreateArcGISServerSite.bat
)

REM Install Web Adaptor
if "%ops_install_webadaptor%"=="YES" (
    Call %~dp0WebAdaptorIIS\InstallWebAdaptor.bat
)

REM Change ArcGIS security configuration
if "%ops_change_ags_security%"=="YES" (
    Call %~dp0ArcGISServer\SupportFiles\ChangeAGSSecurityConfig.bat
)

REM Register ArcGIS Server with the web adaptor as HTTPS
if "%ops_register_ags_https%"=="YES" (
    Call %~dp0WebAdaptorIIS\RegisterAGSwithWebAdaptorHTTPS.bat
)

REM Install ArcGIS Data Store
if "%ops_install_ags_datastore%"=="YES" (
    Call %~dp0ArcGISDataStore\InstallAGSDataStore.bat
)

REM Create ArcGIS Data Store
if "%ops_create_ags_datastore%"=="YES" (
    Call %~dp0ArcGISDataStore\SupportFiles\CreateAGSDataStore.bat
)

REM Install Message Simulator - Copy Message Simulator files and
REM create a Windows Scheduled Task
if "%ops_install_message_simulator%"=="YES" (
    Call %~dp0MessageSimulator\InstallMessageSimulator.bat
)

REM Install Portal Related Software
if "%ops_install_portal%"=="YES" (
    Call %~dp0Portal\InstallPortal.bat
)

REM Install Esri Maps for Office Web Content
if "%ops_install_em4o_webcontent%"=="YES" (
    Call %~dp0EsriMapsForOffice\WebContent\InstallEM4OWebContent.bat
)

REM Create Operations Dashboard ClickOnce Application and deploy to portal folders
if "%ops_create_opsdashboard_installer%"=="YES" (
    Call %~dp0OpsDashboardUtility\CreateOneClickInstaller.bat
)

REM Create the portal primary administrator account
if "%ops_create_portal_admin_account%"=="YES" (
    Call %~dp0Portal\Portal\CreatePortalAdminAccount.bat
)

REM Register portal with the webadaptor
if "%ops_register_portal%"=="YES" (
    Call %~dp0WebAdaptorIIS\RegisterPortalwithWebAdaptor.bat
)

REM Federate ArcGIS Server site with portal, set hosted server,
REM set SSL properties, and reset Utility service URLs
if "%ops_federate_ags%"=="YES" (
    Call %~dp0ArcGISServer\SupportFiles\FederateAGS.bat
)

REM Install ArcGIS GeoEvent Extension for ArcGIS Server
if "%ops_install_geoevent%"=="YES" (
    Call %~dp0GeoEvent\InstallGeoEvent.bat
)

REM Install Geoevent Extension for ArcGIS Server Patches
if "%ops_install_geoevent_patches%"=="YES" (
    Call %~dp0GeoEvent\InstallGeoEventPatches.bat
)

REM Install Predictive Analysis Web Services
if "%ops_install_predictive_analysis%"=="YES" (
    Call %~dp0PredictiveAnalysis\InstallPredictiveAnalysis.bat
)

goto end

:end
REM ---------------------------------------------------------------------
REM End Block
REM ---------------------------------------------------------------------
echo.
echo.
echo %sectionBreak%
echo Clean Up...

REM ------------------------------------------
REM Remove temp install folder
REM ------------------------------------------
echo.
echo Removing temp OpsServer install folder if exists...

IF EXIST %ops_tempInstallDir% (
 rmdir /S /Q %ops_tempInstallDir%
)
echo.
echo.
echo Execution of InstallOpsServer.bat script completed.
date /T
time /T
echo.
pause
REM exit

@echo off
rem #------------------------------------------------------------------------------
rem # Copyright 2014 Esri
rem # Licensed under the Apache License, Version 2.0 (the "License");
rem # you may not use this file except in compliance with the License.
rem # You may obtain a copy of the License at
rem #
rem #   http://www.apache.org/licenses/LICENSE-2.0
rem #
rem # Unless required by applicable law or agreed to in writing, software
rem # distributed under the License is distributed on an "AS IS" BASIS,
rem # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
rem # See the License for the specific language governing permissions and
rem # limitations under the License.
rem #==============================================================================
rem # Name:          InstallOpsServer.bat
rem #
rem # Purpose:       This is the main Ops Server installation script.
rem #
rem #==============================================================================
title Operations Server Installer

REM ---------------------------------------------------------------------
REM Set user specified variables
REM ---------------------------------------------------------------------
Call InstallSettings.bat

REM ---------------------------------------------------------------------
REM Set other variables
REM ---------------------------------------------------------------------
set ops_AGSVersion=10.4
set ops_PortalVersion=10.4

REM Define ArcGIS Data Store Path
REM NOTE: must have "\" at end of path
set ops_agsDataStoreDIR=C:\arcgisdatastore\

REM Define PostgreSQL paths
set ops_postgresqlInstallDIR=C:\PostgreSQL\9.3
set ops_postgresqlDataDIR=%ops_postgresqlInstallDIR%\data

REM Define path to Esri SoftwareAuthorization.exe
set ops_softwareAuthExePath="C:\Program Files\Common Files\ArcGIS\bin\SoftwareAuthorization.exe"

REM Define path to ConfigureWebAdaptor.exe
set ops_ConfWebAdaptorExePath="C:\Program Files (x86)\Common Files\ArcGIS\WebAdaptor\IIS\Tools\ConfigureWebAdaptor.exe"

REM ---------------------------------------------------------------------
REM Set the names of ArcGIS Server Web Adaptor and Portal for ArcGIS Web Adaptor
set ops_WebAdaptor_AGS=ags
set ops_WebAdaptor_Portal=arcgis

set sectionBreak===================================================================================
set ops_tempInstallDir=C:\OpsServerInstallTemp
cls

REM ---------------------------------------------------------------------
REM Check if command prompt is running in elevated permissions mode
REM (i.e. "run as administrator)
REM ---------------------------------------------------------------------
echo.
echo --Checking if Windows Command window is running as administrator
echo   by querying LOCAL SERVICE user registry entries...
echo.
reg query HKU\S-1-5-19
if "%ERRORLEVEL%"=="1" (
    echo.
    echo **********************************************************
    echo **  ERROR:
    echo **  You are _NOT_ running Windows Command window
    echo **  in elevated administrator mode ^(i.e., the CMD.exe
    echo **  must be "Run as administrator"^).
    echo **  Exiting InstallOpsServer.bat.
    echo **********************************************************
    echo.
    goto end
)
cls

REM ---------------------------------------------------------------------
REM Check if user "installed" configuration script in correct location
REM ---------------------------------------------------------------------
echo.
echo --Checking if installation scripts are installed in the correct location...

set ops_ScriptRootName=ops-server-config
set ops_ScriptRoot=C:\%ops_ScriptRootName%\

echo %~dp0 | find /I "%ops_ScriptRoot%"

if "%ERRORLEVEL%"=="1" (
    echo.
    echo **********************************************************
    echo **  ERROR:
    echo **  The '%ops_ScriptRootName%' folder is not installed in
    echo **  the correct location. It should be located at:
    echo **  %ops_ScriptRoot%
    echo **  Exiting InstallOpsServer.bat.
    echo **********************************************************
    echo.
    goto end
)
cls

REM ---------------------------------------------------------------------
REM Check if Software Root path exists and you have access to the folder
REM ---------------------------------------------------------------------

echo.
echo --Checking if specified software root path '%ops_softwareRoot%' exists...

if not exist %ops_softwareRoot% (
    echo.
    echo **********************************************************
    echo **  ERROR:
    echo **  The software root path ^(variable 'ops_softwareRoot'^)
    echo **  '%ops_softwareRoot%'
    echo **  you have specified does not exist or your account does
    echo **  not have access to this location.
    echo **  Exiting InstallOpsServer.bat.
    echo **********************************************************
    echo.
    goto end
)
cls

echo.
echo --Checking if you have access to the software root path '%ops_softwareRoot%'...

dir %ops_softwareRoot%
if "%ERRORLEVEL%"=="1" (
    echo.
    echo **********************************************************
    echo **  ERROR:
    echo **  Your account does not have access to the sofware root
    echo **  folder path '%ops_ScriptRoot%'
    echo **  Exiting InstallOpsServer.bat.
    echo **********************************************************
    echo.
    goto end
)
cls

REM ---------------------------------------------------------------------
REM Check software dependencies
REM ---------------------------------------------------------------------
REM Always call SetOverallErrorLevel.bat after running one of the "check"
REM batch files under the "Checks" folder.

REM Set error "flag" to initial "good" value of zero.
set ops_OverallErrLvl=0

REM Check if IIS is running/installed.
Call %~dp0..\SupportFiles\BatchFiles\Checks\IsInstalled_IIS.bat
Call %~dp0..\SupportFiles\BatchFiles\SetOverallErrorLevel.bat %ops_CheckErrLvl%

REM Check if .NET 3.5 is installed.
Call %~dp0..\SupportFiles\BatchFiles\Checks\IsInstalled_NETFramework3_5.bat
Call %~dp0..\SupportFiles\BatchFiles\SetOverallErrorLevel.bat %ops_CheckErrLvl%

REM Check if .NET 4.5 is installed
Call %~dp0..\SupportFiles\BatchFiles\Checks\IsInstalled_NETFramework4_5.bat
Call %~dp0..\SupportFiles\BatchFiles\SetOverallErrorLevel.bat %ops_CheckErrLvl%

REM Pause script execution if dependencies are not met.
Call %~dp0..\SupportFiles\BatchFiles\CheckErrorLevel.bat %ops_OverallErrLvl%

REM Clear screen
cls

:start
REM ---------------------------------------------------------------------
REM Start Block
REM ---------------------------------------------------------------------
echo *************************************************************************
echo *                    Operations Server Installation                     *
echo *************************************************************************
echo.
echo 1. Install
echo.
echo 0. Quit
echo.

set /p choice="Enter the number of your choice: "

if "%choice%"=="1" (
    set opsServerInstallType=Install
    REM was having problems with the IIS check on some systems;
    REM for now, set variable to "NO" so that it does not run
    REM the check. Not critical to run the check, since we do tell
    REM users that they have to uninstall IIS if it is already installed.
    set ops_Check_IIS_Existence=NO
    set ops_Check_DriveExistence=YES
    goto ValidationBeforeExecution
)
if "%choice%"=="0" exit
echo Invalid choice: %choice%
echo.
pause
cls
goto start

:ValidationBeforeExecution
REM ---------------------------------------------------------------------
REM Validate before executing the rest of the installation process
REM ---------------------------------------------------------------------

REM -------------------------------------------
REM Check if IIS is running
REM -------------------------------------------
if "%ops_Check_IIS_Existence%"=="YES" (
    REM ERRORLEVEL values when using the following "sc query" statement...
    REM If IIS service exists and is running: 0
    REM If IIS service exists and is stopped: 1
    REM If IIS service does not exist       : 1

    echo.
    echo.
    echo --Checking if IIS Web Server is running on this machine...
    echo.

    sc query W3SVC | find "RUNNING"
    if "%ERRORLEVEL%"=="0" (
        echo.
        echo **********************************************************
        echo **  ERROR:
        echo **  You have choosen to install Portal on a machine where
        echo **  IIS Web Server is also running. Please stop the IIS service
        echo **  ^(i.e. World Wide Web Publishing Service^) and set the startup
        echo **  type to "Manual", or uninstall IIS Web Server.
        echo **  Exiting InstallOpsServer.bat.
        echo **********************************************************
        echo.
        goto end
    )
    echo  IIS Web Server is not running or is not installed.
    echo.

)

REM -------------------------------------------
REM Check drives specified in cache and data
REM drive variables exist.
REM -------------------------------------------
if "%ops_Check_DriveExistence%"=="YES" (

    REM More info about using 'EXIST' command to determine drive
    REM existance can be found at: http://support.microsoft.com/kb/65994.
    REM An alternate choice to determine drive existance is to use:
    REM WMIC logicaldisk get name | find /I "%ops_cacheDrive%:"
    REM Then check immediately afterward if "%ERRORLEVEL%"=="1",
    REM which means drive letter does not exist.

    echo.
    echo --Checking if specified cache drive '%ops_cacheDrive%' exists...

    if not exist %ops_cacheDrive%:\NUL (
        echo.
        echo **********************************************************
        echo **  ERROR:
        echo **  The cache drive you have specified '%ops_cacheDrive%'
        echo **  does not exist. Either the 'ops_cacheDrive' variable in
        echo **  the InstallOpsServer.bat file is set to an incorrect
        echo **  drive letter or the drive is not mounted.
        echo **  Exiting InstallOpsServer.bat.
        echo **********************************************************
        echo.
        goto end
    ) else (
        echo Cache drive '%ops_cacheDrive%' exists.
    )

    echo.
    echo --Checking if specified data drive '%ops_dataDrive%' exists...

    if not exist %ops_dataDrive%:\NUL (
        echo.
        echo **********************************************************
        echo **  ERROR:
        echo **  The data drive you have specified '%ops_dataDrive%'
        echo **  does not exist. Either the 'ops_dataDrive' variable in
        echo **  the InstallOpsServer.bat file is set to an incorrect
        echo **  drive letter or the drive is not mounted.
        echo **  Exiting InstallOpsServer.bat.
        echo **********************************************************
        echo.
        goto end
    ) else (
        echo Data drive '%ops_dataDrive%' exists.
    )

)

if "%opsServerInstallType%"=="Install" goto Install

:Install
REM ---------------------------------------------------------------------
REM Install Software
REM ---------------------------------------------------------------------
echo.
echo Installation of Ops Server starting...
date /T
time /T
echo.

REM Install RDBMS
if "%ops_install_rdbms%"=="YES" (
    Call %~dp0PostgreSQL\InstallPostgreSQL.bat
)

REM Install ArcGIS Server
if "%ops_install_server%"=="YES" (
    Call %~dp0ArcGISServer\InstallArcGISServer.bat
)

REM Create ArcGIS Server site and data stores
if "%ops_create_ags_site%"=="YES" (
    Call %~dp0ArcGISServer\CreateArcGISServerSite.bat
)

REM Install Web Adaptor
if "%ops_install_webadaptor%"=="YES" (
    Call %~dp0WebAdaptorIIS\InstallWebAdaptor.bat
)

REM Change ArcGIS security configuration
if "%ops_change_ags_security%"=="YES" (
    Call %~dp0ArcGISServer\SupportFiles\ChangeAGSSecurityConfig.bat
)

REM Register ArcGIS Server with the web adaptor as HTTPS
if "%ops_register_ags_https%"=="YES" (
    Call %~dp0WebAdaptorIIS\RegisterAGSwithWebAdaptorHTTPS.bat
)

REM Install ArcGIS Data Store
if "%ops_install_ags_datastore%"=="YES" (
    Call %~dp0ArcGISDataStore\InstallAGSDataStore.bat
)

REM Create ArcGIS Data Store
if "%ops_create_ags_datastore%"=="YES" (
    Call %~dp0ArcGISDataStore\SupportFiles\CreateAGSDataStore.bat
)

REM Install Message Simulator - Copy Message Simulator files and
REM create a Windows Scheduled Task
if "%ops_install_message_simulator%"=="YES" (
    Call %~dp0MessageSimulator\InstallMessageSimulator.bat
)

REM Install Portal Related Software
if "%ops_install_portal%"=="YES" (
    Call %~dp0Portal\InstallPortal.bat
)

REM Install Esri Maps for Office Web Content
if "%ops_install_em4o_webcontent%"=="YES" (
    Call %~dp0EsriMapsForOffice\WebContent\InstallEM4OWebContent.bat
)

REM Create Operations Dashboard ClickOnce Application and deploy to portal folders
if "%ops_create_opsdashboard_installer%"=="YES" (
    Call %~dp0OpsDashboardUtility\CreateOneClickInstaller.bat
)

REM Create the portal primary administrator account
if "%ops_create_portal_admin_account%"=="YES" (
    Call %~dp0Portal\Portal\CreatePortalAdminAccount.bat
)

REM Register portal with the webadaptor
if "%ops_register_portal%"=="YES" (
    Call %~dp0WebAdaptorIIS\RegisterPortalwithWebAdaptor.bat
)

REM Federate ArcGIS Server site with portal, set hosted server,
REM set SSL properties, and reset Utility service URLs
if "%ops_federate_ags%"=="YES" (
    Call %~dp0ArcGISServer\SupportFiles\FederateAGS.bat
)

REM Install ArcGIS GeoEvent Extension for ArcGIS Server
if "%ops_install_geoevent%"=="YES" (
    Call %~dp0GeoEvent\InstallGeoEvent.bat
)

REM Install Geoevent Extension for ArcGIS Server Patches
if "%ops_install_geoevent_patches%"=="YES" (
    Call %~dp0GeoEvent\InstallGeoEventPatches.bat
)

REM Install Predictive Analysis Web Services
if "%ops_install_predictive_analysis%"=="YES" (
    Call %~dp0PredictiveAnalysis\InstallPredictiveAnalysis.bat
)

goto end

:end
REM ---------------------------------------------------------------------
REM End Block
REM ---------------------------------------------------------------------
echo.
echo.
echo %sectionBreak%
echo Clean Up...

REM ------------------------------------------
REM Remove temp install folder
REM ------------------------------------------
echo.
echo Removing temp OpsServer install folder if exists...

IF EXIST %ops_tempInstallDir% (
 rmdir /S /Q %ops_tempInstallDir%
)
echo.
echo.
echo Execution of InstallOpsServer.bat script completed.
date /T
time /T
echo.
pause
REM exit

Update AGS & Portal version variables to 10.4


#!/bin/bash

BINARY=enum
BINARY_HOME=%PREFIX%\bin

git clone https://github.com/msg-byu/enumlib.git
git clone https://github.com/msg-byu/symlib.git

cd %SRC_DIR%\symlib\src

F90=gfortran
make

cd %SRC_DIR%\enumlib\src

make
make enum.x
make makestr.x

cp enum.x %BINARY_HOME%
cp makestr.x %BINARY_HOME%

#!/bin/bash

SET BINARY=enum
SET BINARY_HOME=%PREFIX%\bin

git clone https://github.com/msg-byu/enumlib.git
git clone https://github.com/msg-byu/symlib.git

cd %SRC_DIR%\symlib\src

SET F90=gfortran
make

cd %SRC_DIR%\enumlib\src

make
make enum.x
make makestr.x

copy enum.x %BINARY_HOME%
copy makestr.x %BINARY_HOME%

DEbug windows build.

DEbug windows build.


sudo ovs-vsctl add-port br0 ethX

sudo ovs-vsctl list-ports br0

sudo ovs-vsctl show

sudo ovs-vsctl set-controller br0 tcp:<controller_ip>:6633

sudo ovs-vsctl set-fail-mode br0 secure

sudo ovs-ofctl dump-flows br0

Create commonCmd_mininet.cmd

Create commonCmd_mininet.cmd


@for %%a in (*.mid) do @midisplit "%%a" "%%~na-split.mid"

rem @set midisplit_dir=%~dp0
rem
rem :dispatch_loop
rem   @if "%1"=="" @goto dispatch_done
rem   @echo %midisplit_dir%midisplit "%1" "%~dpn1.mid"
rem   @shift
rem   @goto dispatch_loop
rem :dispatch_done

Add Windows batch file for batch conversion.


rem @echo off

set headersdir=%1
set headersname=%2
set libs=%3
set bins=%4

rem ************************************************************************
rem * check environment variables

if not "%INCLUDEDIR%"=="" goto includedirset
echo The INCLUDEDIR environment variable must be set to point to a directory
echo to be able to perform the installation procedure.
exit

:includedirset
if exist %INCLUDEDIR%\*.* goto includedirexists
echo The INCLUDEDIR environment variable must point to an existing directory
echo to be able to perform the installation procedure.
exit

:includedirexists

if not "%LIBDIR%"=="" goto libdirset
echo The LIBDIR environment variable must be set to point to a directory
echo to be able to perform the installation procedure.
exit

:libdirset
if exist %LIBDIR%\*.* goto libdirexists
echo The LIBDIR environment variable must point to an existing directory
echo to be able to perform the installation procedure.
exit

:libdirexists
if not "%BINDIR%"=="" goto bindirset
echo The BINDIR environment variable must be set to point to a directory
echo to be able to perform the installation procedure.
exit

:bindirset
if exist %BINDIR%\*.* goto bindirexists
echo The BINDIR environment variable must point to an existing directory
echo to be able to perform the installation procedure.
exit

:bindirexists

echo All is well installing...

rem ************************************************************************
rem * check input variables and install if necessary

if "%headersdir%"=="" goto skipheaders
if "%headersname%"=="" goto skipheaders

xcopy /S /I /Y %headersdir% %INCLUDEDIR%\%headersname%

:skipheaders

if "%libs%"=="" goto skiplibs
xcopy /S /I /Y %libs% %LIBDIR%

:skiplibs

if "%bins%"=="" goto skipbins
xcopy /S /I /Y %bins% %BINDIR%

:skipbins

echo Installation finished.

rem @echo off

set headersdir=%1
set headersname=%2
set libs=%3
set bins=%4

rem ************************************************************************
rem * check environment variables

if not "%INCLUDEDIR%"=="" goto includedirset
echo The INCLUDEDIR environment variable must be set to point to a directory
echo to be able to perform the installation procedure.
exit

:includedirset
if exist "%INCLUDEDIR%\*.*" goto includedirexists
echo The INCLUDEDIR environment variable must point to an existing directory
echo to be able to perform the installation procedure.
exit

:includedirexists

if not "%LIBDIR%"=="" goto libdirset
echo The LIBDIR environment variable must be set to point to a directory
echo to be able to perform the installation procedure.
exit

:libdirset
if exist "%LIBDIR%\*.*" goto libdirexists
echo The LIBDIR environment variable must point to an existing directory
echo to be able to perform the installation procedure.
exit

:libdirexists
if not "%BINDIR%"=="" goto bindirset
echo The BINDIR environment variable must be set to point to a directory
echo to be able to perform the installation procedure.
exit

:bindirset
if exist "%BINDIR%\*.*" goto bindirexists
echo The BINDIR environment variable must point to an existing directory
echo to be able to perform the installation procedure.
exit

:bindirexists

echo All is well installing...

rem ************************************************************************
rem * check input variables and install if necessary

if "%headersdir%"=="" goto skipheaders
if "%headersname%"=="" goto skipheaders

xcopy /S /I /Y %headersdir% "%INCLUDEDIR%\%headersname%"

:skipheaders

if "%libs%"=="" goto skiplibs
xcopy /S /I /Y %libs% "%LIBDIR%"

:skiplibs

if "%bins%"=="" goto skipbins
xcopy /S /I /Y %bins% "%BINDIR%"

:skipbins

echo Installation finished.

update to build files to support spaces in path names


mkdir build
cd build

cmake ^
    -G "Ninja" ^
    -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^
    -DCMAKE_BUILD_TYPE=Release ^
    -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^
    -DBUILD_TESTING=ON ^
    %SRC_DIR%
if errorlevel 1 exit 1

:: Build.
cmake --build . --config Release --parallel 1
if errorlevel 1 exit 1

:: Install.
cmake --build . --config Release --target install
if errorlevel 1 exit 1

:: Test.
ctest --output-on-failure -C Release
if errorlevel 1 exit 1

mkdir build
cd build

cmake ^
    -G "Ninja" ^
    -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^
    -DCMAKE_BUILD_TYPE=Release ^
    -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^
    -DBUILD_TESTING=ON ^
    %SRC_DIR%
if errorlevel 1 exit 1

:: Build.
:: Workaround for https://github.com/conda-forge/staged-recipes/pull/20623#issuecomment-1268431348
cmake --build . --config Release --target GzDummyStaticPlugin
if errorlevel 1 exit 1

cmake --build . --config Release
if errorlevel 1 exit 1

:: Install.
cmake --build . --config Release --target install
if errorlevel 1 exit 1

:: Test.
ctest --output-on-failure -C Release
if errorlevel 1 exit 1

Update bld_cxx.bat

Update bld_cxx.bat


@echo off
:: set path to erlang installation

SETLOCAL ENABLEDELAYEDEXPANSION

set ERL_R17_1=6.1
set ERL_R17=6.0
set ERL_R16B03=5.10.4
set ERL_R16B02=5.10.3
set ERL_R16B01=5.10.2
set ERL_R16B=5.10.1
set ERL_R15B03_1=5.9.3.1
set ERL_R15B03=5.9.3
set ERL_R15B02=5.9.2
set ERL_R15B01=5.9.1
set ERL_R15B=5.9
set ERL_R14B04=5.8.5
set ERL_R14B03=5.8.4
set ERL_R14B02=5.8.3
set ERL_R14B01=5.8.2
set ERL_R14B=5.8.1
set ERL_R14A=5.8
set ERL_R13B04=5.7.5
set ERL_R13B03=5.7.4
set ERL_R13B02=5.7.3
set ERL_R13B01=5.7.2
set ERL_ALL=%ERL_R17_1% %ERL_R17% %ERL_R16B03% %ERL_R16B02% %ERL_R16B01% %ERL_R16B% %ERL_R15B03_1% %ERL_R15B03% %ERL_R15B02% %ERL_R15B01% %ERL_R15B% %ERL_R14B04% %ERL_R14B03% %ERL_R14B02% %ERL_R14B01% %ERL_R14B% %ERL_R14A% %ERL_R13B04% %ERL_R13B03% %ERL_R13B02% %ERL_R13B01%
if not defined ERLANG_HOME (
    FOR %%c in (%ERL_ALL%) DO (
        FOR %%p in ("%ProgramFiles%\erl%%c" "%ProgramFiles(x86)%\erl%%c") DO (
            set FULL_PATH=%%p
            if exist !FULL_PATH! (
                set ERLANG_HOME=%%p
                goto found
            )
        )
    )
)

:found

echo ERLANG_HOME=%ERLANG_HOME%

ENDLOCAL & set ERLANG_HOME=%ERLANG_HOME%

@echo off
:: set path to erlang installation

SETLOCAL ENABLEDELAYEDEXPANSION

set ERL_R17_3=6.1
set ERL_R17_1=6.1
set ERL_R17=6.0
set ERL_R16B03=5.10.4
set ERL_R16B02=5.10.3
set ERL_R16B01=5.10.2
set ERL_R16B=5.10.1
set ERL_R15B03_1=5.9.3.1
set ERL_R15B03=5.9.3
set ERL_R15B02=5.9.2
set ERL_R15B01=5.9.1
set ERL_R15B=5.9
set ERL_R14B04=5.8.5
set ERL_R14B03=5.8.4
set ERL_R14B02=5.8.3
set ERL_R14B01=5.8.2
set ERL_R14B=5.8.1
set ERL_R14A=5.8
set ERL_R13B04=5.7.5
set ERL_R13B03=5.7.4
set ERL_R13B02=5.7.3
set ERL_R13B01=5.7.2
set ERL_ALL=%ERL_R17_3% %ERL_R17_1% %ERL_R17% %ERL_R16B03% %ERL_R16B02% %ERL_R16B01% %ERL_R16B% %ERL_R15B03_1% %ERL_R15B03% %ERL_R15B02% %ERL_R15B01% %ERL_R15B% %ERL_R14B04% %ERL_R14B03% %ERL_R14B02% %ERL_R14B01% %ERL_R14B% %ERL_R14A% %ERL_R13B04% %ERL_R13B03% %ERL_R13B02% %ERL_R13B01%
if not defined ERLANG_HOME (
    FOR %%c in (%ERL_ALL%) DO (
        FOR %%p in ("%ProgramFiles%\erl%%c" "%ProgramFiles(x86)%\erl%%c") DO (
            set FULL_PATH=%%p
            if exist !FULL_PATH! (
                set ERLANG_HOME=%%p
                goto found
            )
        )
    )
)

:found

echo ERLANG_HOME=%ERLANG_HOME%

ENDLOCAL & set ERLANG_HOME=%ERLANG_HOME%

windows: add support for Erlang 17.3 in the batch scripts


set GOPATH=%~dp0;
go get github.com/bradfitz/gomemcache/memcache
go get github.com/millken/cache2go
go get github.com/vmihailenco/msgpack
go build -ldflags "-s" kwan
mv kwan ./bin/

fix windows build on go 1.5.1

fix windows build on go 1.5.1


@echo off
REM
REM Author: Klaus Bild
REM E-Mail: klaus.bild@gmail.com

REM Needed for variable expansion
SETLOCAL ENABLEDELAYEDEXPANSION
REM Set Backup-Directory, change to your environment
set DBBACKUPPATH=E:\Transfer
REM get all databases of db2 instance and loop through the list
FOR /F "tokens=5" %%a IN ('DB2CMD.EXE -c -w -i DB2 list DATABASE DIRECTORY ^| findstr "Alias"') DO (
				set DATABASES=%%a,!DATABASES!
				title Starting database %%a backup on %date% at %time%...
				DB2CMD.EXE -c -w -i DB2 BACKUP DATABASE %%a to %DBBACKUPPATH% COMPRESS
				)
ECHO Successfull created backups for %DATABASES% in %DBBACKUPPATH%a

Create backupDatabasesOffline.bat

Create backupDatabasesOffline.bat


dotnet pack ../src/ReactiveSignalR/ReactiveSignalR.csproj -c Release -o ./packages

Add packaging batch

Add packaging batch


@ECHO OFF
SETLOCAL

REM Use '$' as a variable name prefix to avoid MSBuild variable collisions with these variables
set $target=%1
set $aspRuntimeVersion=%2
set $queue=%3
set $arch=%4
set $quarantined=%5
set $ef=%6
set $helixTimeout=%7
set $installPlaywright=%8
REM Batch only supports up to 9 arguments using the %# syntax, need to shift to get more

set DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1
set DOTNET_MULTILEVEL_LOOKUP=0
set InstallPlaywright=%installPlaywright%
set PLAYWRIGHT_BROWSERS_PATH=%CD%\ms-playwright
set PLAYWRIGHT_DRIVER_PATH=%CD%\.playwright\win-x64\native\playwright.cmd

set "PATH=%HELIX_WORKITEM_ROOT%;%PATH%;%HELIX_WORKITEM_ROOT%\node\bin"
echo Set path to: "%PATH%"
echo.

set exit_code=0

echo "Restore: dotnet restore RunTests\RunTests.csproj --ignore-failed-sources"
dotnet restore RunTests\RunTests.csproj --ignore-failed-sources

if errorlevel neq 0 (
    set exit_code=%errorlevel%
    echo "Finished running tests: exit_code=%exit_code%"
    EXIT /b %exit_code%
)

echo "Running tests: dotnet run --no-restore --project RunTests\RunTests.csproj -- --target %$target% --runtime %$aspRuntimeVersion% --queue %$queue% --arch %$arch% --quarantined %$quarantined% --ef %$ef% --helixTimeout %$helixTimeout%"
dotnet run --no-restore --project RunTests\RunTests.csproj -- --target %$target% --runtime %$aspRuntimeVersion% --queue %$queue% --arch %$arch% --quarantined %$quarantined% --ef %$ef% --helixTimeout %$helixTimeout%
if errorlevel neq 0 (
    set exit_code=%errorlevel%
)
echo "Finished running tests: exit_code=%exit_code%"
EXIT /b %exit_code%

@ECHO OFF
SETLOCAL

REM Use '$' as a variable name prefix to avoid MSBuild variable collisions with these variables
set $target=%1
set $aspRuntimeVersion=%2
set $queue=%3
set $arch=%4
set $quarantined=%5
set $ef=%6
set $helixTimeout=%7
set $installPlaywright=%8
REM Batch only supports up to 9 arguments using the %# syntax, need to shift to get more

set DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1
set DOTNET_MULTILEVEL_LOOKUP=0
set InstallPlaywright=%installPlaywright%
set PLAYWRIGHT_BROWSERS_PATH=%CD%\ms-playwright
set PLAYWRIGHT_DRIVER_PATH=%CD%\.playwright\win-x64\native\playwright.cmd

set "PATH=%HELIX_WORKITEM_ROOT%;%PATH%;%HELIX_WORKITEM_ROOT%\node\bin"
echo Set path to: "%PATH%"
echo.

set exit_code=0

echo "Restore: dotnet restore RunTests\RunTests.csproj --ignore-failed-sources"
dotnet restore RunTests\RunTests.csproj --ignore-failed-sources

if not errorlevel 0 (
    set exit_code=%errorlevel%
    echo "Restore runtests failed: exit_code=%exit_code%"
    EXIT /b %exit_code%
)

echo "Running tests: dotnet run --no-restore --project RunTests\RunTests.csproj -- --target %$target% --runtime %$aspRuntimeVersion% --queue %$queue% --arch %$arch% --quarantined %$quarantined% --ef %$ef% --helixTimeout %$helixTimeout%"
dotnet run --no-restore --project RunTests\RunTests.csproj -- --target %$target% --runtime %$aspRuntimeVersion% --queue %$queue% --arch %$arch% --quarantined %$quarantined% --ef %$ef% --helixTimeout %$helixTimeout%
if not errorlevel 0 (
    set exit_code=%errorlevel%
)
echo "Finished running tests: exit_code=%exit_code%"
EXIT /b %exit_code%

Fix error level for win7 helix runs (#32965)


ECHO CHOCO INSTALL
choco install docfx -y || exit /b
ECHO CHOCO UPGRADE
choco upgrade docfx -y || exit /b
ECHO NUGET RESTORE
nuget restore
ECHO DOCFX
docfx docfx\docfx.json || exit /b
ECHO DELETE docs
del docs /s /q || exit /b
REM the CNAME file is generated in the doc folder when added through the github
REM settings page. Apparently github uses this file to determine the custom
REM domain. The line above deletes the whole docs folder so we need to copy it
REM from the docfx folder. If we ever want to change the custom domain settings
REM we need to alter the docfx\CNAME file and not use the github settings page.
ECHO COPY CNAME
copy docfx\CNAME docs /Y || exit /b
ECHO COPY _site TO docs
xcopy docfx\_site docs /E /Y || exit /b

ECHO CHOCO INSTALL
choco install docfx -y || exit /b
ECHO CHOCO UPGRADE
choco upgrade docfx -y || exit /b
ECHO NUGET RESTORE
nuget restore mapsui.sln
ECHO DOCFX
docfx docfx\docfx.json || exit /b
ECHO DELETE docs
del docs /s /q || exit /b
REM the CNAME file is generated in the doc folder when added through the github
REM settings page. Apparently github uses this file to determine the custom
REM domain. The line above deletes the whole docs folder so we need to copy it
REM from the docfx folder. If we ever want to change the custom domain settings
REM we need to alter the docfx\CNAME file and not use the github settings page.
ECHO COPY CNAME
copy docfx\CNAME docs /Y || exit /b
ECHO COPY _site TO docs
xcopy docfx\_site docs /E /Y || exit /b

Add nuget restore mapsui.sln to build-site.cmd


@echo off

setlocal enabledelayedexpansion

set PLAY_VERSION="2.2-SNAPSHOT"

if defined JPDA_PORT set DEBUG_PARAM="-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=%JPDA_PORT%"

set p=%~dp0
set p=%p:\=/%
set fp=file:///!p: =%%20!

java -Xms512M -Xmx1024M -Xss1M -XX:+CMSClassUnloadingEnabled -XX:MaxPermSize=256M %DEBUG_PARAM% %JAVA_OPTS% -Dfile.encoding=UTF-8 -Dplay.version="%PLAY_VERSION%" -Dsbt.ivy.home="%~dp0..\repository" -Dplay.home="%~dp0." -Dsbt.boot.properties="%fp%sbt/sbt.boot.properties" %PLAY_OPTS% -jar "%~dp0sbt\sbt-launch.jar" %*

:end
endlocal

@echo off

setlocal enabledelayedexpansion

set PLAY_VERSION="2.2-SNAPSHOT"

if defined JPDA_PORT set DEBUG_PARAM="-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=%JPDA_PORT%"

set p=%~dp0
set p=%p:\=/%
set fp=file:///!p: =%%20!

java -Xms512M -Xmx1024M -Xss1M -XX:+CMSClassUnloadingEnabled -XX:MaxPermSize=256M %DEBUG_PARAM% %JAVA_OPTS% -Dfile.encoding=UTF-8 -Dinput.encoding=Cp1252 -Dplay.version="%PLAY_VERSION%" -Dsbt.ivy.home="%~dp0..\repository" -Dplay.home="%~dp0." -Dsbt.boot.properties="%fp%sbt/sbt.boot.properties" %PLAY_OPTS% -jar "%~dp0sbt\sbt-launch.jar" %*

:end
endlocal

Fix command history in Windows

Fix command history in Windows

SBT 0.13 uses JLine 2.x, which interacts badly with the existing setting
-Dfile.encoding=UTF-8. However, the JLine terminal encoding can be
overridden by providing the option -Dinput.encoding=Cp1252.


REM This is the jenkins build script for building/testing
REM Blaze.
REM
REM Jenkins Requirements:
REM   - Anaconda should be installed in ~/anaconda
REM   - Use a jenkins build matrix for multiple
REM     platforms/python versions
REM   - Use the XShell plugin to launch this script
REM   - Call the script from the root workspace
REM     directory as buildscripts/jenkins-build
REM

REM Require a version of Python to be selected
if "%PYTHON_VERSION%" == "" exit /b 1

REM Jenkins has '/' in its workspace. Fix it to '\' to simplify the DOS commands.
set WORKSPACE=%WORKSPACE:/=\%

rd /q /s %WORKSPACE%\build
REM Fail if we couldn't fully remove the temporary dir
if EXIST %WORKSPACE%\build\ exit /b 1

REM Use conda to create a conda environment of the required
REM python version and containing the dependencies.
SET PYENV_PREFIX=%WORKSPACE%\build\pyenv
REM TODO: Add cffi to this list once it is added to anaconda windows.

call C:\Anaconda\Scripts\conda create --yes --channel https://conda.binstar.org/mwiebe -p %PYENV_PREFIX% python=%PYTHON_VERSION%  cython scipy ply dynd-python nose flask pyparsing pyyaml setuptools dateutil pip pytables sqlalchemy h5py pandas requests pytest toolz cytoolz bcolz || exit /b 1
call C:\Anaconda\Scripts\conda install --yes --channel blaze mongodb

echo on
set PYTHON_EXECUTABLE=%PYENV_PREFIX%\Python.exe
set PATH=%PYENV_PREFIX%;%PYENV_PREFIX%\Scripts;%PATH%

REM Temporary hack to install datashape
rd /q /s datashape
git clone https://github.com/ContinuumIO/datashape.git || exit /b 1
pushd datashape
%PYTHON_EXECUTABLE% setup.py install || exit /b 1
popd

REM Temporary hack to install blz
IF "%PYTHON_VERSION%" == "2.6" call pip install unittest2 unicodecsv
IF "%PYTHON_VERSION%" == "2.7" call pip install unicodecsv

call pip install multipledispatch

IF %ERRORLEVEL% NEQ 0 exit /b 1

REM Build/install Blaze
%PYTHON_EXECUTABLE% setup.py install || exit /b 1

call py.test --doctest-modules -vv --pyargs blaze --junitxml=test_results.xml || exit /b 1

exit /b 0

REM This is the jenkins build script for building/testing
REM Blaze.
REM
REM Jenkins Requirements:
REM   - Anaconda should be installed in ~/anaconda
REM   - Use a jenkins build matrix for multiple
REM     platforms/python versions
REM   - Use the XShell plugin to launch this script
REM   - Call the script from the root workspace
REM     directory as buildscripts/jenkins-build
REM

REM Require a version of Python to be selected
if "%PYTHON_VERSION%" == "" exit /b 1

REM Jenkins has '/' in its workspace. Fix it to '\' to simplify the DOS commands.
set WORKSPACE=%WORKSPACE:/=\%

rd /q /s %WORKSPACE%\build
REM Fail if we couldn't fully remove the temporary dir
if EXIST %WORKSPACE%\build\ exit /b 1

REM Use conda to create a conda environment of the required
REM python version and containing the dependencies.
SET PYENV_PREFIX=%WORKSPACE%\build\pyenv
REM TODO: Add cffi to this list once it is added to anaconda windows.

call C:\Anaconda\Scripts\conda create --yes --channel https://conda.binstar.org/mwiebe -p %PYENV_PREFIX% python=%PYTHON_VERSION%  cython scipy ply dynd-python nose flask pyparsing pyyaml setuptools dateutil pip pytables sqlalchemy h5py pandas requests pytest toolz cytoolz bcolz || exit /b 1

call C:\Anaconda\Scripts\conda install --yes --channel blaze mongodb || exit /b 1

REM create a mongo service
mkdir c:\data\db
mkdir c:\data\log
set cfgpath="C:\users\%username%\Anaconda\mongod.cfg"
echo logpath=c:\data\log\mongod.log> %cfgpath%
echo dbpath=c:\data\db>> %cfgpath%
sc.exe create MongoDB binPath= "\"%cfgpath%\" --service --config=\"%cfgpath%\"" DisplayName= "MongoDB 2.6 Standard" start= "auto"
net start MongoDB

echo on
set PYTHON_EXECUTABLE=%PYENV_PREFIX%\Python.exe
set PATH=%PYENV_PREFIX%;%PYENV_PREFIX%\Scripts;%PATH%

REM Temporary hack to install datashape
rd /q /s datashape
git clone https://github.com/ContinuumIO/datashape.git || exit /b 1
pushd datashape
%PYTHON_EXECUTABLE% setup.py install || exit /b 1
popd

REM Temporary hack to install blz
IF "%PYTHON_VERSION%" == "2.6" call pip install unittest2 unicodecsv
IF "%PYTHON_VERSION%" == "2.7" call pip install unicodecsv

call pip install multipledispatch

IF %ERRORLEVEL% NEQ 0 exit /b 1

REM Build/install Blaze
%PYTHON_EXECUTABLE% setup.py install || exit /b 1

call py.test --doctest-modules -vv --pyargs blaze --junitxml=test_results.xml

net stop MongoDB
sc.exe delete MongoDB

IF %ERRORLEVEL% NEQ 0 exit /b 1
exit /b 0

Add mongodb to windows jenkins

Add mongodb to windows jenkins


@echo on
cd %APPVEYOR_BUILD_FOLDER%
SET "PREVPATH=%PATH%"
SET "PREVMSYSEM=%MSYSTEM%"

SET "PATH=C:\msys64\mingw64\bin;C:\msys64\usr\bin;%PATH%"
SET "MSYSTEM=MINGW64"
SET "APPVEYOR_CACHE_ENTRY_ZIP_ARGS=-m0=Copy"

bash -lc "cd ${APPVEYOR_BUILD_FOLDER} && if [ -s ""llvm+clang-5.0.0-win64-msvc-release.tar.xz"" ]; then echo 'skipping LLVM download'; else wget 'https://s3.amazonaws.com/superjoe/temp/llvm%%2bclang-5.0.0-win64-msvc-release.tar.xz'; fi && tar xf llvm+clang-5.0.0-win64-msvc-release.tar.xz" || exit /b

SET "PATH=%PREVPATH%"
SET "MSYSTEM=%PREVMSYSTEM%"
SET "ZIGBUILDDIR=%APPVEYOR_BUILD_FOLDER%\build-msvc-release"
SET "ZIGPREFIXPATH=C:\Libraries\LLVM-5.0.0"

mkdir %ZIGBUILDDIR%
cd %ZIGBUILDDIR%
cmake.exe .. -Thost=x64 -G"Visual Studio 14 2015 Win64" "-DCMAKE_INSTALL_PREFIX=%ZIGBUILDDIR%" "-DCMAKE_PREFIX_PATH=%ZIGPREFIXPATH%" -DCMAKE_BUILD_TYPE=Release "-DZIG_LIBC_INCLUDE_DIR=C:\Program Files (x86)\Windows Kits\10\Include\10.0.26624.0\ucrt" "-DZIG_LIBC_LIB_DIR=C:\Program Files (x86)\Windows Kits\10\bin\x64\ucrt" "-DZIG_LIBC_STATIC_LIB_DIR=C:\Program Files (x86)\Windows Kits\10\Lib\10.0.26624.0\ucrt\x64" || exit /b
msbuild /p:Configuration=Release INSTALL.vcxproj || exit /b

bin\zig.exe build --build-file ..\build.zig test || exit /b

@echo "MSVC build succeeded, proceeding with MinGW build"
cd %APPVEYOR_BUILD_FOLDER%
SET "PATH=C:\msys64\mingw64\bin;C:\msys64\usr\bin;%PATH%"
SET "MSYSTEM=MINGW64"

bash -lc "pacman -Syu --needed --noconfirm"
bash -lc "pacman -Su --needed --noconfirm"

bash -lc "pacman -S --needed --noconfirm make mingw64/mingw-w64-x86_64-make mingw64/mingw-w64-x86_64-cmake mingw64/mingw-w64-x86_64-clang mingw64/mingw-w64-x86_64-llvm mingw64/mingw-w64-x86_64-lld mingw64/mingw-w64-x86_64-gcc"

bash -lc "cd ${APPVEYOR_BUILD_FOLDER} && mkdir build && cd build && cmake .. -G""MSYS Makefiles"" -DCMAKE_INSTALL_PREFIX=$(pwd) -DZIG_LIBC_LIB_DIR=$(dirname $(cc -print-file-name=crt1.o)) -DZIG_LIBC_INCLUDE_DIR=$(echo -n | cc -E -x c - -v 2>&1 | grep -B1 ""End of search list."" | head -n1 | cut -c 2- | sed ""s/ .*//"") -DZIG_LIBC_STATIC_LIB_DIR=$(dirname $(cc -print-file-name=crtbegin.o)) && make && make install"

@echo "MinGW build successful"

@echo on
cd %APPVEYOR_BUILD_FOLDER%
SET "PREVPATH=%PATH%"
SET "PREVMSYSEM=%MSYSTEM%"

SET "PATH=C:\msys64\mingw64\bin;C:\msys64\usr\bin;%PATH%"
SET "MSYSTEM=MINGW64"
SET "APPVEYOR_CACHE_ENTRY_ZIP_ARGS=-m0=Copy"

bash -lc "cd ${APPVEYOR_BUILD_FOLDER} && if [ -s ""llvm+clang-5.0.0-win64-msvc-release.tar.xz"" ]; then echo 'skipping LLVM download'; else wget 'https://s3.amazonaws.com/superjoe/temp/llvm%%2bclang-5.0.0-win64-msvc-release.tar.xz'; fi && tar xf llvm+clang-5.0.0-win64-msvc-release.tar.xz" || exit /b

SET "PATH=%PREVPATH%"
SET "MSYSTEM=%PREVMSYSTEM%"
SET "ZIGBUILDDIR=%APPVEYOR_BUILD_FOLDER%\build-msvc-release"
SET "ZIGPREFIXPATH=%APPVEYOR_BUILD_FOLDER%\llvm+clang-5.0.0-win64-msvc-release"

mkdir %ZIGBUILDDIR%
cd %ZIGBUILDDIR%
cmake.exe .. -Thost=x64 -G"Visual Studio 14 2015 Win64" "-DCMAKE_INSTALL_PREFIX=%ZIGBUILDDIR%" "-DCMAKE_PREFIX_PATH=%ZIGPREFIXPATH%" -DCMAKE_BUILD_TYPE=Release "-DZIG_LIBC_INCLUDE_DIR=C:\Program Files (x86)\Windows Kits\10\Include\10.0.26624.0\ucrt" "-DZIG_LIBC_LIB_DIR=C:\Program Files (x86)\Windows Kits\10\bin\x64\ucrt" "-DZIG_LIBC_STATIC_LIB_DIR=C:\Program Files (x86)\Windows Kits\10\Lib\10.0.26624.0\ucrt\x64" || exit /b
msbuild /p:Configuration=Release INSTALL.vcxproj || exit /b

bin\zig.exe build --build-file ..\build.zig test || exit /b

@echo "MSVC build succeeded, proceeding with MinGW build"
cd %APPVEYOR_BUILD_FOLDER%
SET "PATH=C:\msys64\mingw64\bin;C:\msys64\usr\bin;%PATH%"
SET "MSYSTEM=MINGW64"

bash -lc "pacman -Syu --needed --noconfirm"
bash -lc "pacman -Su --needed --noconfirm"

bash -lc "pacman -S --needed --noconfirm make mingw64/mingw-w64-x86_64-make mingw64/mingw-w64-x86_64-cmake mingw64/mingw-w64-x86_64-clang mingw64/mingw-w64-x86_64-llvm mingw64/mingw-w64-x86_64-lld mingw64/mingw-w64-x86_64-gcc"

bash -lc "cd ${APPVEYOR_BUILD_FOLDER} && mkdir build && cd build && cmake .. -G""MSYS Makefiles"" -DCMAKE_INSTALL_PREFIX=$(pwd) -DZIG_LIBC_LIB_DIR=$(dirname $(cc -print-file-name=crt1.o)) -DZIG_LIBC_INCLUDE_DIR=$(echo -n | cc -E -x c - -v 2>&1 | grep -B1 ""End of search list."" | head -n1 | cut -c 2- | sed ""s/ .*//"") -DZIG_LIBC_STATIC_LIB_DIR=$(dirname $(cc -print-file-name=crtbegin.o)) && make && make install"

@echo "MinGW build successful"

Revert "try using appveyor's llvm copy"

Revert "try using appveyor's llvm copy"

This reverts commit 35dc987dc88712d6e70f3b8c9cd076fe43fcd874.


g++ -o2 -std=c++11 main.cpp core/Halite.cpp -I ../environment networking/Networking.cpp -o environment.exe -static

g++ -o2 -std=c++11 main.cpp core/Halite.cpp -I . networking/Networking.cpp -o halite.exe -static

change -I to .

change -I to .

... why?
Simply because compiling in the same directory is hard if i have to copy the tclap/ directory in another directory called ../environment that i need to create. Or, the other way around: This way it's simpler. Dont you think? :smile:


@ECHO OFF
rem ------------------------------------------------------------------------------
rem  Copyright 2015 Esri
rem  Licensed under the Apache License, Version 2.0 (the "License");
rem  you may not use this file except in compliance with the License.
rem  You may obtain a copy of the License at
rem
rem    http://www.apache.org/licenses/LICENSE-2.0
rem
rem  Unless required by applicable law or agreed to in writing, software
rem  distributed under the License is distributed on an "AS IS" BASIS,
rem  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
rem  See the License for the specific language governing permissions and
rem  limitations under the License.
rem ------------------------------------------------------------------------------
rem  TestKickStart.bat
rem ------------------------------------------------------------------------------
rem  requirements:
rem  * ArcGIS Desktop 10.X+ or ArcGIS Pro 1.X+
rem  * Python 2.7 or Python 3.4
rem  author: ArcGIS Solutions
rem  company: Esri
rem ==================================================
rem  description:
rem  This file starts the test running for Desktop (Python 2.7+) and
rem  ArcGIS Pro (Python 3.4+).
rem
rem ==================================================
rem  history:
rem  5/9/2016: JH - initial creation
rem ==================================================

REM usage: set LOG=<defaultLogFileName.log>
REM name is optional; if not specified, name will be specified for you
set LOG=

REM =====================================================
REM If you have BOTH versions of Python installed:

ECHO Python 3.4 Tests ===============================
REM py -3.4 TestRunner.py %LOG%
"C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\python.exe" TestRunner.py %LOG%

ECHO Python 2.7 Tests ===============================
REM py -2.7 TestRunner.py %LOG%
python.exe TestRunner.py %LOG%

REM =====================================================
REM If you only have ONE version of Python installed:
REM python TestRunner.py
pause

@ECHO OFF
rem ------------------------------------------------------------------------------
rem  Copyright 2015 Esri
rem  Licensed under the Apache License, Version 2.0 (the "License");
rem  you may not use this file except in compliance with the License.
rem  You may obtain a copy of the License at
rem
rem    http://www.apache.org/licenses/LICENSE-2.0
rem
rem  Unless required by applicable law or agreed to in writing, software
rem  distributed under the License is distributed on an "AS IS" BASIS,
rem  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
rem  See the License for the specific language governing permissions and
rem  limitations under the License.
rem ------------------------------------------------------------------------------
rem  TestKickStart.bat
rem ------------------------------------------------------------------------------
rem  requirements:
rem  * ArcGIS Desktop 10.X+ or ArcGIS Pro 1.X+
rem  * Python 2.7 or Python 3.4
rem  author: ArcGIS Solutions
rem  company: Esri
rem ==================================================
rem  description:
rem  This file starts the test running for Desktop (Python 2.7+) and
rem  ArcGIS Pro (Python 3.4+).
rem
rem ==================================================
rem  history:
rem  5/9/2016: JH - initial creation
rem ==================================================

REM usage: set LOG=<defaultLogFileName.log>
REM name is optional; if not specified, name will be specified for you
set LOG=

REM =====================================================
REM If you have BOTH versions of Python installed:

ECHO Python 3.4 Tests ===============================
REM py -3.4 TestRunner.py %LOG%
"C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\python.exe" TestRunner.py %LOG%

ECHO Python 2.7 Tests ===============================
REM py -2.7 TestRunner.py %LOG%
python TestRunner.py %LOG%

REM =====================================================
REM If you only have ONE version of Python installed:
REM python TestRunner.py
pause

update TestKickStart.bat file

update TestKickStart.bat file


:: Copyright 2019 The TensorFlow Authors. All Rights Reserved.
::
:: Licensed under the Apache License, Version 2.0 (the "License");
:: you may not use this file except in compliance with the License.
:: You may obtain a copy of the License at
::
::     http://www.apache.org/licenses/LICENSE-2.0
::
:: Unless required by applicable law or agreed to in writing, software
:: distributed under the License is distributed on an "AS IS" BASIS,
:: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
:: See the License for the specific language governing permissions and
:: limitations under the License.
:: =============================================================================

SET PYTHON_DIRECTORY=Python35

CALL tensorflow\tools\ci_build\release\common_win.bat

for %%a in ("%~dp0.") do set "PARENT_DIR=%%~nxa"
bash -l tensorflow\tools\ci_build\release\windows\%PARENT_DIR%\release_pip_rename.sh

call tensorflow\tools\ci_build\windows\cpu\pip\run.bat --release_build

:: Copyright 2019 The TensorFlow Authors. All Rights Reserved.
::
:: Licensed under the Apache License, Version 2.0 (the "License");
:: you may not use this file except in compliance with the License.
:: You may obtain a copy of the License at
::
::     http://www.apache.org/licenses/LICENSE-2.0
::
:: Unless required by applicable law or agreed to in writing, software
:: distributed under the License is distributed on an "AS IS" BASIS,
:: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
:: See the License for the specific language governing permissions and
:: limitations under the License.
:: =============================================================================

SET PYTHON_DIRECTORY=Python35

CALL tensorflow\tools\ci_build\release\common_win.bat

call tensorflow\tools\ci_build\windows\cpu\pip\run.bat --release_build

for %%a in ("%~dp0.") do set "PARENT_DIR=%%~nxa"
bash -l tensorflow\tools\ci_build\release\windows\%PARENT_DIR%\release_pip_rename.sh

Test a new change in windows/release_v1 build.

PiperOrigin-RevId: 278036050
Change-Id: Iba3847d0b28aea44cabc05a52da0db242a6e1530


echo off
setlocal

REM elevated window does not set current directory correctly.
REM Workaround it by passing the current directory as 1st parameter
pushd %1

certutil -addstore -f root RootCATest.cer
certutil -f -p test -importpfx "WcfTestServer.pfx"
netsh http add sslcert ipport=0.0.0.0:44285 certhash=1d85a3f6cd2c022c5ca54e5cb200a47f89ba0d3d appid={00000000-0000-0000-0000-000000000000}
start powershell -ExecutionPolicy Bypass -File ..\test\Bridge\bin\ensureBridge.ps1 %2 %3 %4 %5 %6 %7
exit /b

echo off
setlocal

REM elevated window does not set current directory correctly.
REM Workaround it by passing the current directory as 1st parameter
pushd %1

certutil -addstore -f root RootCATest.cer
certutil -f -p test -importpfx "WcfTestServer.pfx"
netsh http add sslcert ipport=0.0.0.0:44285 certhash=1d85a3f6cd2c022c5ca54e5cb200a47f89ba0d3d appid={00000000-0000-0000-0000-000000000000}

if '%BridgeHost%' neq '' (
   set _bridgeHostArg=-hostName %BridgeHost%
)

if '%BridgePort%' neq '' (
   set _bridgePortArg=-portNumber %BridgePort%
)

if '%BridgeAllowRemote%' neq '' (
   set _bridgeAllowRemoteArg=-allowRemote %BridgeAllowRemote%
)

echo Executing: start powershell -ExecutionPolicy Bypass -File ..\test\Bridge\bin\ensureBridge.ps1 %_bridgeHostArg% %_bridgePortArg% %_bridgeAllowRemoteArg%

start powershell -ExecutionPolicy Bypass -File ..\test\Bridge\bin\ensureBridge.ps1 %_bridgeHostArg% %_bridgePortArg% %_bridgeAllowRemoteArg%
exit /b

Allow Bridge environment variables to configure Bridge use


del Aeneid.aux
del Aeneid.pdf
del Aeneid.ppo
del Aeneid.ppg

pushd %~dp0
pdflatex Aeneid.tex
if errorlevel 1 goto error

makeindex -s Aeneid.ist -o Aeneid.gls Aeneid.glo
if errorlevel 1 goto error

makeindex -s Aeneid.ist -o Aeneid.common-gls Aeneid.common-glo
if errorlevel 1 goto error

makeindex -s Aeneid.ist -o Aeneid.uncommon-gls Aeneid.uncommon-glo
if errorlevel 1 goto error

dotnet run --project %~dp0..\..\src\IxMilia.Classics.ReorderFootnotes\IxMilia.Classics.ReorderFootnotes.csproj Aeneid.ppg Aeneid.ppo
if errorlevel 1 goto error

pdflatex Aeneid.tex
if errorlevel 1 goto error

exit /b 0

:error
popd
echo There was an error building the PDF.  See above output for details.
exit /b 1

pushd %~dp0

del Aeneid.aux
del Aeneid.pdf
del Aeneid.ppo
del Aeneid.ppg

pdflatex Aeneid.tex
if errorlevel 1 goto error

makeindex -s Aeneid.ist -o Aeneid.gls Aeneid.glo
if errorlevel 1 goto error

makeindex -s Aeneid.ist -o Aeneid.common-gls Aeneid.common-glo
if errorlevel 1 goto error

makeindex -s Aeneid.ist -o Aeneid.uncommon-gls Aeneid.uncommon-glo
if errorlevel 1 goto error

dotnet run --project %~dp0..\..\src\IxMilia.Classics.ReorderFootnotes\IxMilia.Classics.ReorderFootnotes.csproj Aeneid.ppg Aeneid.ppo
if errorlevel 1 goto error

pdflatex Aeneid.tex
if errorlevel 1 goto error

exit /b 0

:error
popd
echo There was an error building the PDF.  See above output for details.
exit /b 1

fix directory setting in helper script

fix directory setting in helper script


:: Build keybase.exe with prerelease options
set GOARCH=386
set GO15VENDOREXPERIMENT=1

:: for Jenkins
if DEFINED WORKSPACE set GOPATH=%WORKSPACE%
if NOT DEFINED DOKAN_PATH set DOKAN_PATH=%GOPATH%\bin\dokan-dev\dokan-v1.0.0-RC4.2
echo DOKAN_PATH %DOKAN_PATH%

echo GOPATH %GOPATH%

echo GOROOT %GOROOT%
pushd %GOPATH%\src\github.com\keybase\client\go\keybase
go version
go generate

for /f %%i in ('winresource.exe -cv') do set KEYBASE_VERSION=%%i
echo KEYBASE_VERSION %KEYBASE_VERSION%
for /f %%i in ('winresource.exe -cb') do set KEYBASE_BUILD=%%i
echo KEYBASE_BUILD %KEYBASE_BUILD%
go build -a -tags "prerelease production" -ldflags="-X github.com/keybase/client/go/libkb.PrereleaseBuild=%KEYBASE_BUILD%"

:: Then build kbfsdokan.
:: First, sanity-check the hashes
copy %DOKAN_PATH%\Win32\Release\dokan1.lib %GOPATH%\src\github.com\keybase\kbfs\dokan

::for /f "usebackq tokens=2*" %%i in (`powershell Get-FileHash -Algorithm sha1 %GOPATH%\src\github.com\keybase\kbfs\dokan\dokan.lib`) do set DOKANLIBHASH=%%i
::if NOT %DOKANLIBHASH%==1C9316A567B805C4A6ADAF0ABE1424FFFB36A3BD exit /B 1
::for /f "usebackq tokens=2*" %%i in (`powershell Get-FileHash -Algorithm sha1 %GOPATH%\bin\dokan-dev\dokan-v0.8.0\Win32\Release\dokan.dll`) do set DOKANDLLHASH=%%i
::if NOT %DOKANDLLHASH%==5C4FC6B6E3083E575EED06DE3115A6D05B30DB02 exit /B 1

pushd %GOPATH%\src\github.com\keybase\kbfs\kbfsdokan
:: winresource invokes git to get the current revision
for /f %%i in ('git -C %GOPATH%\src\github.com\keybase\kbfs rev-parse --short HEAD') do set KBFS_HASH=%%i
for /f "tokens=1 delims=+" %%i in ("%KEYBASE_BUILD%") do set KBFS_BUILD=%%i+%KBFS_HASH%
echo KBFS_BUILD %KBFS_BUILD%
go build -a -tags "prerelease production" -ldflags="-X github.com/keybase/kbfs/libkbfs.PrereleaseBuild=%KBFS_BUILD%"
popd

:: Updater
pushd %GOPATH%\src\github.com\keybase\go-updater\service
go build -a -o upd.exe
popd

:: Runquiet
pushd %GOPATH%\src\github.com\keybase\client\go\tools\runquiet
go build -ldflags "-H windowsgui"
popd

:: Then the desktop:
pushd  %GOPATH%\src\github.com\keybase\client\desktop
:: rmdir /s /q node_modules
npm i

buildui.bat
popd

:: Build keybase.exe with prerelease options
set GOARCH=386
set GO15VENDOREXPERIMENT=1

:: for Jenkins
if DEFINED WORKSPACE set GOPATH=%WORKSPACE%
if NOT DEFINED DOKAN_PATH set DOKAN_PATH=%GOPATH%\bin\dokan-dev\dokan-v1.0.0-RC4.2
echo DOKAN_PATH %DOKAN_PATH%

echo GOPATH %GOPATH%

:: CGO causes dll loading security vulnerabilities
set CGO_ENABLED=0
echo GOROOT %GOROOT%
pushd %GOPATH%\src\github.com\keybase\client\go\keybase
:: Make sure the whole build fails if we can't build keybase
del keybase.exe
go version
go generate

for /f %%i in ('winresource.exe -cv') do set KEYBASE_VERSION=%%i
echo KEYBASE_VERSION %KEYBASE_VERSION%
for /f %%i in ('winresource.exe -cb') do set KEYBASE_BUILD=%%i
echo KEYBASE_BUILD %KEYBASE_BUILD%
go build -a -tags "prerelease production" -ldflags="-X github.com/keybase/client/go/libkb.PrereleaseBuild=%KEYBASE_BUILD%"

:: Then build kbfsdokan.
:: First, sanity-check the hashes
copy %DOKAN_PATH%\Win32\Release\dokan1.lib %GOPATH%\src\github.com\keybase\kbfs\dokan

::for /f "usebackq tokens=2*" %%i in (`powershell Get-FileHash -Algorithm sha1 %GOPATH%\src\github.com\keybase\kbfs\dokan\dokan.lib`) do set DOKANLIBHASH=%%i
::if NOT %DOKANLIBHASH%==1C9316A567B805C4A6ADAF0ABE1424FFFB36A3BD exit /B 1
::for /f "usebackq tokens=2*" %%i in (`powershell Get-FileHash -Algorithm sha1 %GOPATH%\bin\dokan-dev\dokan-v0.8.0\Win32\Release\dokan.dll`) do set DOKANDLLHASH=%%i
::if NOT %DOKANDLLHASH%==5C4FC6B6E3083E575EED06DE3115A6D05B30DB02 exit /B 1

pushd %GOPATH%\src\github.com\keybase\kbfs\kbfsdokan
:: Make sure the whole build fails if we can't build kbfsdokan
del kbfsdokan.exe
:: winresource invokes git to get the current revision
for /f %%i in ('git -C %GOPATH%\src\github.com\keybase\kbfs rev-parse --short HEAD') do set KBFS_HASH=%%i
for /f "tokens=1 delims=+" %%i in ("%KEYBASE_BUILD%") do set KBFS_BUILD=%%i+%KBFS_HASH%
echo KBFS_BUILD %KBFS_BUILD%
set CGO_ENABLED=1
go build -a -tags "prerelease production" -ldflags="-X github.com/keybase/kbfs/libkbfs.PrereleaseBuild=%KBFS_BUILD%"
popd

:: Updater
pushd %GOPATH%\src\github.com\keybase\go-updater\service
go build -a -o upd.exe
popd

:: Runquiet
pushd %GOPATH%\src\github.com\keybase\client\go\tools\runquiet
go build -ldflags "-H windowsgui"
popd

:: Then the desktop:
pushd  %GOPATH%\src\github.com\keybase\client\desktop
:: rmdir /s /q node_modules
npm i

buildui.bat
popd

Build keybase without CGO, kbfsdokan with CGO (#3419)


@echo off

if not exist "%JAVA_HOME%\bin\java.exe" echo Please set the JAVA_HOME variable in your environment, We need java(x64)! jdk8 or later is better! & EXIT /B 1
set "JAVA=%JAVA_HOME%\bin\java.exe"

setlocal

set BASE_DIR=%~dp0
set BASE_DIR=%BASE_DIR:~0,-1%
for %%d in (%BASE_DIR%) do set BASE_DIR=%%~dpd

set CLASSPATH=.;%BASE_DIR%conf;%CLASSPATH%

set "JAVA_OPT=%JAVA_OPT% -server -Xms2g -Xmx2g -Xmn1g -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=320m"
set "JAVA_OPT=%JAVA_OPT% -XX:+UseConcMarkSweepGC -XX:+UseCMSCompactAtFullCollection -XX:CMSInitiatingOccupancyFraction=70 -XX:+CMSParallelRemarkEnabled -XX:SoftRefLRUPolicyMSPerMB=0 -XX:+CMSClassUnloadingEnabled -XX:SurvivorRatio=8 -XX:-UseParNewGC"
set "JAVA_OPT=%JAVA_OPT% -verbose:gc -Xloggc:"%USERPROFILE%\rmq_srv_gc.log" -XX:+PrintGCDetails"
set "JAVA_OPT=%JAVA_OPT% -Dnacos.home=%BASE_DIR%"

if not ""%2"" == "cluster"
set "JAVA_OPT=%JAVA_OPT% -Dnacos.standalone=true"

set "JAVA_OPT=%JAVA_OPT% -XX:-OmitStackTraceInFastThrow"
set "JAVA_OPT=%JAVA_OPT% -XX:-UseLargePages"
set "JAVA_OPT=%JAVA_OPT% -jar %BASE_DIR%\target\nacos-server.jar"
set "JAVA_OPT=%JAVA_OPT% -cp "%CLASSPATH%""
set CMD_LINE_ARGS=

call "%JAVA%" %JAVA_OPT% %*

@echo off

if not exist "%JAVA_HOME%\bin\java.exe" echo Please set the JAVA_HOME variable in your environment, We need java(x64)! jdk8 or later is better! & EXIT /B 1
set "JAVA=%JAVA_HOME%\bin\java.exe"

setlocal

set BASE_DIR=%~dp0
set BASE_DIR=%BASE_DIR:~0,-1%
for %%d in (%BASE_DIR%) do set BASE_DIR=%%~dpd

set CLASSPATH=.;%BASE_DIR%conf;%CLASSPATH%

set "JAVA_OPT=%JAVA_OPT% -server -Xms2g -Xmx2g -Xmn1g -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=320m"
set "JAVA_OPT=%JAVA_OPT% -XX:+UseConcMarkSweepGC -XX:+UseCMSCompactAtFullCollection -XX:CMSInitiatingOccupancyFraction=70 -XX:+CMSParallelRemarkEnabled -XX:SoftRefLRUPolicyMSPerMB=0 -XX:+CMSClassUnloadingEnabled -XX:SurvivorRatio=8 -XX:-UseParNewGC"
set "JAVA_OPT=%JAVA_OPT% -verbose:gc -Xloggc:"%USERPROFILE%\rmq_srv_gc.log" -XX:+PrintGCDetails"
set "JAVA_OPT=%JAVA_OPT% -Dnacos.home=%BASE_DIR%"

if not ""%2"" == "cluster" set "JAVA_OPT=%JAVA_OPT% -Dnacos.standalone=true"

set "JAVA_OPT=%JAVA_OPT% -XX:-OmitStackTraceInFastThrow"
set "JAVA_OPT=%JAVA_OPT% -XX:-UseLargePages"
set "JAVA_OPT=%JAVA_OPT% -jar %BASE_DIR%\target\nacos-server.jar"
set "JAVA_OPT=%JAVA_OPT% -cp "%CLASSPATH%""

call "%JAVA%" %JAVA_OPT% %*

fix windows startup

fix windows startup