0c7605c9b6
* Update the minimum CMake version to 3.20 Sets the cmake_minimum_required calls to version 3.20 and updates the README.md to point at the general CMake download page instead of a stale link. * Remove unnecessary cmake minimum version It was using an old 3.0 version and can be removed. * Additional updates to CMake 3.20, build scripts Updates the version and remove logic to find a CMake in 3rdParty. * Removing backup path to ninja path in the build_ninja_windows.cmd The backup path for finding ninja was coming from the Perforce depot which isn't available for o3de builds. * Removing reference to 3rdParty Android SDK 29 from the build and run unit test script The Android SDK is not part of the new 3rdParty system and users are expected to install the Android SDK on their own in order to build the engine for Android. * Update the get_python scripts and README No longer try to append a CMake path to LY_3RDPARTY_PATH, but do still support LY_CMAKE_PATH because there are still uses of it. Remove mention of an LY_3RDPARTY_PATH-relative CMake path from the README.md. * Removing LY_NINJA_PATH from the build_ninja_windows.cmd Co-authored-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
70 lines
2.6 KiB
Batchfile
70 lines
2.6 KiB
Batchfile
@ECHO OFF
|
|
REM
|
|
REM All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
|
|
REM its licensors.
|
|
REM
|
|
REM For complete copyright and license terms please see the LICENSE at the root of this
|
|
REM distribution (the "License"). All use of this software is governed by the License,
|
|
REM or, if provided, by the license below or the license accompanying this file. Do not
|
|
REM remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
|
|
REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
REM
|
|
|
|
setlocal enabledelayedexpansion
|
|
|
|
SET CMD_DIR=%~dp0
|
|
SET CMD_DIR=%CMD_DIR:~0,-1%
|
|
|
|
|
|
REM General strategy: Check if python is already installed
|
|
REM If not, use cmake and the new package system to install it.
|
|
|
|
REM Is python installed?
|
|
cd /D %CMD_DIR%
|
|
call python.cmd --version > NUL
|
|
IF !ERRORLEVEL!==0 (
|
|
echo get_python.bat: Python is already installed:
|
|
call python.cmd --version
|
|
call "%CMD_DIR%\pip.cmd" install -r "%CMD_DIR%/requirements.txt" --quiet --disable-pip-version-check --no-warn-script-location
|
|
call "%CMD_DIR%\pip.cmd" install -e "%CMD_DIR%/../scripts/o3de" --quiet --disable-pip-version-check --no-warn-script-location --no-deps
|
|
exit /B 0
|
|
)
|
|
|
|
cd /D %CMD_DIR%\..
|
|
REM IF you update this logic, update it in scripts/build/Platform/Windows/env_windows.cmd
|
|
REM If cmake is not found on path, try a known location at LY_CMAKE_PATH
|
|
where /Q cmake
|
|
IF NOT !ERRORLEVEL!==0 (
|
|
IF "%LY_CMAKE_PATH%"=="" (
|
|
ECHO ERROR: CMake was not found on the PATH and LY_CMAKE_PATH is not defined.
|
|
ECHO Please ensure CMake is on the path or set LY_CMAKE_PATH.
|
|
EXIT /b 1
|
|
)
|
|
|
|
PATH !LY_CMAKE_PATH!;!PATH!
|
|
where /Q cmake
|
|
if NOT !ERRORLEVEL!==0 (
|
|
ECHO ERROR: CMake was not found on the PATH or at the known location: !LY_CMAKE_PATH!
|
|
ECHO Please add it to the path, set LY_CMAKE_PATH to be the directory containing it, or place it
|
|
ECHO at the above location.
|
|
EXIT /b 1
|
|
)
|
|
)
|
|
|
|
REM output the version number for forensic logging
|
|
cmake --version
|
|
cmake -DPAL_PLATFORM_NAME:string=Windows -D "LY_3RDPARTY_PATH:string=%CMD_DIR%" -P "%CMD_DIR%\get_python.cmake"
|
|
|
|
if ERRORLEVEL 1 (
|
|
ECHO ERROR: Unable to fetch python using cmake.
|
|
ECHO - Is LY_PACKAGE_SERVER_URLS set?
|
|
ECHO - Do you have permission to access the packages?
|
|
EXIT /b 1
|
|
)
|
|
|
|
echo calling PIP to install requirements...
|
|
call "%CMD_DIR%\pip.cmd" install -r "%CMD_DIR%/requirements.txt" --disable-pip-version-check --no-warn-script-location
|
|
call "%CMD_DIR%\pip.cmd" install -e "%CMD_DIR%/../scripts/o3de" --disable-pip-version-check --no-warn-script-location --no-deps
|
|
exit /B %ERRORLEVEL%
|
|
|