mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-13 15:44:36 +00:00
Merge pull request #1768 from marauder2k9-torque/bugs-reported
Some checks are pending
Linux Build / Ubuntu GCC Latest (push) Waiting to run
Linux Build / Ubuntu GCC 13 (push) Waiting to run
MacOSX Build / macOS ARM Clang Ninja (push) Waiting to run
MacOSX Build / macOS ARM Xcode (push) Waiting to run
Windows Build / Windows MSVC Ninja (push) Waiting to run
Windows Build / Windows MSVC Visual Studio 2022 (push) Waiting to run
Windows Build / Windows MSVC Visual Studio 2026 (push) Waiting to run
Some checks are pending
Linux Build / Ubuntu GCC Latest (push) Waiting to run
Linux Build / Ubuntu GCC 13 (push) Waiting to run
MacOSX Build / macOS ARM Clang Ninja (push) Waiting to run
MacOSX Build / macOS ARM Xcode (push) Waiting to run
Windows Build / Windows MSVC Ninja (push) Waiting to run
Windows Build / Windows MSVC Visual Studio 2022 (push) Waiting to run
Windows Build / Windows MSVC Visual Studio 2026 (push) Waiting to run
Bugs Reported Steve_Yorkshire
This commit is contained in:
commit
1683b74937
6 changed files with 221 additions and 148 deletions
131
.github/workflows/build-linux-gcc.yml
vendored
131
.github/workflows/build-linux-gcc.yml
vendored
|
|
@ -4,17 +4,13 @@ on:
|
||||||
branches: [development]
|
branches: [development]
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [development]
|
branches: [development]
|
||||||
env:
|
|
||||||
build_type: "Release"
|
|
||||||
cc: "gcc"
|
|
||||||
cxx: "g++"
|
|
||||||
|
|
||||||
concurrency:
|
concurrency:
|
||||||
group: ci-${{github.actor}}-${{github.head_ref || github.run_number}}-${{github.ref}}-linux
|
group: ci-${{github.actor}}-${{github.head_ref || github.run_number}}-${{github.ref}}-linux
|
||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
checks: write
|
checks: write
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-linux:
|
build-linux:
|
||||||
|
|
@ -24,21 +20,29 @@ jobs:
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
config:
|
config:
|
||||||
- {
|
- {
|
||||||
name: "Ubuntu Latest GCC",
|
name: "Ubuntu GCC 13",
|
||||||
build_type: "Release",
|
build_type: "Release",
|
||||||
cc: "gcc",
|
cc: "gcc-13",
|
||||||
cxx: "g++",
|
cxx: "g++-13",
|
||||||
generator: "Ninja"
|
generator: "Ninja",
|
||||||
}
|
}
|
||||||
|
- {
|
||||||
|
name: "Ubuntu GCC Latest",
|
||||||
|
build_type: "Release",
|
||||||
|
cc: "gcc",
|
||||||
|
cxx: "g++",
|
||||||
|
generator: "Ninja",
|
||||||
|
}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Print env
|
- name: Print env
|
||||||
run: |
|
run: |
|
||||||
echo github.event.action: ${{ github.event.action }}
|
echo github.event.action: ${{ github.event.action }}
|
||||||
echo github.event_name: ${{ github.event_name }}
|
echo github.event_name: ${{ github.event_name }}
|
||||||
|
|
||||||
- name: Run GIT Init
|
- name: Run GIT Init
|
||||||
run: git init
|
run: git init
|
||||||
|
|
@ -48,62 +52,63 @@ jobs:
|
||||||
|
|
||||||
- name: Install Linux Dependencies
|
- name: Install Linux Dependencies
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get install ninja-build
|
sudo apt-get update && \
|
||||||
ninja --version
|
sudo apt-get install -y \
|
||||||
cmake --version
|
ninja-build \
|
||||||
gcc --version
|
build-essential \
|
||||||
sudo apt-get update && \
|
nasm \
|
||||||
sudo apt-get install -y \
|
python3 \
|
||||||
build-essential \
|
python3-pip \
|
||||||
nasm \
|
gcc-12 g++-12 \
|
||||||
libogg-dev \
|
gcc-13 g++-13 \
|
||||||
libxft-dev \
|
clang \
|
||||||
libx11-dev \
|
libogg-dev \
|
||||||
libxxf86vm-dev \
|
libxft-dev \
|
||||||
libopenal-dev \
|
libx11-dev \
|
||||||
libasound2-dev \
|
libxxf86vm-dev \
|
||||||
libpipewire-0.3-dev \
|
libopenal-dev \
|
||||||
portaudio19-dev \
|
libasound2-dev \
|
||||||
oss4-dev \
|
libpipewire-0.3-dev \
|
||||||
libjack-dev \
|
portaudio19-dev \
|
||||||
libpulse-dev \
|
oss4-dev \
|
||||||
libdbus-1-dev \
|
libjack-dev \
|
||||||
libfreetype6-dev \
|
libpulse-dev \
|
||||||
libxcursor-dev \
|
libdbus-1-dev \
|
||||||
libxinerama-dev \
|
libfreetype6-dev \
|
||||||
libxi-dev \
|
libxcursor-dev \
|
||||||
libxrandr-dev \
|
libxinerama-dev \
|
||||||
libxss-dev \
|
libxi-dev \
|
||||||
libglu1-mesa-dev \
|
libxrandr-dev \
|
||||||
libgtk-3-dev
|
libxss-dev \
|
||||||
|
libglu1-mesa-dev \
|
||||||
sudo apt-get install -y \
|
libgtk-3-dev
|
||||||
python3
|
ninja --version
|
||||||
|
cmake --version
|
||||||
pip install jinja2
|
${{matrix.config.cc}} --version
|
||||||
|
python3 -m pip install --break-system-packages jinja2
|
||||||
|
|
||||||
- name: Configure, Build & Install
|
- name: Configure, Build & Install
|
||||||
uses: threeal/cmake-action@v1.3.0
|
uses: threeal/cmake-action@v1.3.0
|
||||||
with:
|
with:
|
||||||
source-dir: ${{github.workspace}}
|
source-dir: ${{github.workspace}}
|
||||||
build-dir: ${{github.workspace}}/build
|
build-dir: ${{github.workspace}}/build
|
||||||
c-compiler: ${{matrix.config.cc}}
|
c-compiler: ${{matrix.config.cc}}
|
||||||
cxx-compiler: ${{matrix.config.cxx}}
|
cxx-compiler: ${{matrix.config.cxx}}
|
||||||
generator: ${{matrix.config.generator}}
|
generator: ${{matrix.config.generator}}
|
||||||
options: CMAKE_BUILD_TYPE=${{matrix.config.build_type}} TORQUE_APP_NAME=Torque3D TORQUE_TESTING=ON
|
options: CMAKE_BUILD_TYPE=${{matrix.config.build_type}} TORQUE_APP_NAME=Torque3D TORQUE_TESTING=ON
|
||||||
run-build: true
|
run-build: true
|
||||||
build-args: --config ${{matrix.config.build_type}} --target install
|
build-args: --config ${{matrix.config.build_type}} --target install
|
||||||
|
|
||||||
- name: Unit Tests
|
- name: Unit Tests
|
||||||
run: |
|
run: |
|
||||||
cd "${{github.workspace}}/My Projects/Torque3D/game"
|
cd "${{github.workspace}}/My Projects/Torque3D/game"
|
||||||
./Torque3D runTests.tscript
|
./Torque3D runTests.tscript
|
||||||
|
|
||||||
- name: Test Reporter
|
- name: Test Reporter
|
||||||
uses: phoenix-actions/test-reporting@v14
|
uses: phoenix-actions/test-reporting@v14
|
||||||
with:
|
with:
|
||||||
name: Linux test results
|
name: ${{matrix.config.name}} test results
|
||||||
path: "**/My Projects/Torque3D/game/test_detail.xml"
|
path: "**/My Projects/Torque3D/game/test_detail.xml"
|
||||||
reporter: java-junit
|
reporter: java-junit
|
||||||
fail-on-error: true
|
fail-on-error: true
|
||||||
if: github.event_name != 'pull_request'
|
if: github.event_name != 'pull_request'
|
||||||
77
.github/workflows/build-macos-clang.yml
vendored
77
.github/workflows/build-macos-clang.yml
vendored
|
|
@ -4,41 +4,47 @@ on:
|
||||||
branches: [development]
|
branches: [development]
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [development]
|
branches: [development]
|
||||||
env:
|
|
||||||
build_type: "Release"
|
|
||||||
cc: "clang"
|
|
||||||
cxx: "clang++"
|
|
||||||
|
|
||||||
concurrency:
|
concurrency:
|
||||||
group: ci-${{github.actor}}-${{github.head_ref || github.run_number}}-${{github.ref}}-macosx
|
group: ci-${{github.actor}}-${{github.head_ref || github.run_number}}-${{github.ref}}-macosx
|
||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
checks: write
|
checks: write
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-linux:
|
build-macos:
|
||||||
if: github.repository == 'TorqueGameEngines/Torque3D'
|
if: github.repository == 'TorqueGameEngines/Torque3D'
|
||||||
name: ${{matrix.config.name}}
|
name: ${{matrix.config.name}}
|
||||||
runs-on: macos-latest
|
runs-on: ${{matrix.config.os}}
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
config:
|
config:
|
||||||
- {
|
- {
|
||||||
name: "MacOSX Latest Clang",
|
name: "macOS ARM Clang Ninja",
|
||||||
build_type: "Release",
|
os: "macos-latest",
|
||||||
cc: "clang",
|
build_type: "Release",
|
||||||
cxx: "clang++",
|
cc: "clang",
|
||||||
generator: "Ninja"
|
cxx: "clang++",
|
||||||
}
|
generator: "Ninja",
|
||||||
|
}
|
||||||
|
- {
|
||||||
|
name: "macOS ARM Xcode",
|
||||||
|
os: "macos-latest",
|
||||||
|
build_type: "Release",
|
||||||
|
cc: "clang",
|
||||||
|
cxx: "clang++",
|
||||||
|
generator: "Xcode",
|
||||||
|
}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Print env
|
- name: Print env
|
||||||
run: |
|
run: |
|
||||||
echo github.event.action: ${{ github.event.action }}
|
echo github.event.action: ${{ github.event.action }}
|
||||||
echo github.event_name: ${{ github.event_name }}
|
echo github.event_name: ${{ github.event_name }}
|
||||||
|
|
||||||
- name: Run GIT Init
|
- name: Run GIT Init
|
||||||
run: git init
|
run: git init
|
||||||
|
|
@ -48,32 +54,33 @@ jobs:
|
||||||
|
|
||||||
- name: Install MacOSX Dependencies
|
- name: Install MacOSX Dependencies
|
||||||
run: |
|
run: |
|
||||||
brew install ninja zip unzip curl pkgconfig
|
brew install ninja zip unzip curl pkgconfig
|
||||||
ninja --version
|
ninja --version
|
||||||
cmake --version
|
cmake --version
|
||||||
|
clang --version
|
||||||
|
|
||||||
- name: Configure, Build & Install
|
- name: Configure, Build & Install
|
||||||
uses: threeal/cmake-action@v1.3.0
|
uses: threeal/cmake-action@v1.3.0
|
||||||
with:
|
with:
|
||||||
source-dir: ${{github.workspace}}
|
source-dir: ${{github.workspace}}
|
||||||
build-dir: ${{github.workspace}}/build
|
build-dir: ${{github.workspace}}/build
|
||||||
c-compiler: ${{matrix.config.cc}}
|
c-compiler: ${{matrix.config.cc}}
|
||||||
cxx-compiler: ${{matrix.config.cxx}}
|
cxx-compiler: ${{matrix.config.cxx}}
|
||||||
generator: ${{matrix.config.generator}}
|
generator: ${{matrix.config.generator}}
|
||||||
options: CMAKE_BUILD_TYPE=${{matrix.config.build_type}} TORQUE_APP_NAME=Torque3D TORQUE_TESTING=ON
|
options: CMAKE_BUILD_TYPE=${{matrix.config.build_type}} TORQUE_APP_NAME=Torque3D TORQUE_TESTING=ON
|
||||||
run-build: true
|
run-build: true
|
||||||
build-args: --config ${{matrix.config.build_type}} --target install
|
build-args: --config ${{matrix.config.build_type}} --target install
|
||||||
|
|
||||||
- name: Unit Tests
|
- name: Unit Tests
|
||||||
run: |
|
run: |
|
||||||
cd "${{github.workspace}}/My Projects/Torque3D/game"
|
cd "${{github.workspace}}/My Projects/Torque3D/game"
|
||||||
./Torque3D.app/Contents/MacOS/Torque3D runTests.tscript
|
./Torque3D.app/Contents/MacOS/Torque3D runTests.tscript
|
||||||
|
|
||||||
- name: Test Reporter
|
- name: Test Reporter
|
||||||
uses: phoenix-actions/test-reporting@v14
|
uses: phoenix-actions/test-reporting@v14
|
||||||
with:
|
with:
|
||||||
name: MacOS Test results
|
name: ${{matrix.config.name}} test results
|
||||||
path: "**/My Projects/Torque3D/game/test_detail.xml"
|
path: "**/My Projects/Torque3D/game/test_detail.xml"
|
||||||
reporter: java-junit
|
reporter: java-junit
|
||||||
fail-on-error: true
|
fail-on-error: true
|
||||||
if: github.event_name != 'pull_request'
|
if: github.event_name != 'pull_request'
|
||||||
103
.github/workflows/build-windows-msvc.yml
vendored
103
.github/workflows/build-windows-msvc.yml
vendored
|
|
@ -4,38 +4,71 @@ on:
|
||||||
branches: [development]
|
branches: [development]
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [development]
|
branches: [development]
|
||||||
|
|
||||||
concurrency:
|
concurrency:
|
||||||
group: ci-${{github.actor}}-${{github.head_ref || github.run_number}}-${{github.ref}}-windows
|
group: ci-${{github.actor}}-${{github.head_ref || github.run_number}}-${{github.ref}}-windows
|
||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
checks: write
|
checks: write
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-windows:
|
build-windows:
|
||||||
if: github.repository == 'TorqueGameEngines/Torque3D'
|
if: github.repository == 'TorqueGameEngines/Torque3D'
|
||||||
name: ${{matrix.config.name}}
|
name: ${{matrix.config.name}}
|
||||||
runs-on: windows-latest
|
runs-on: ${{matrix.config.os}}
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
config:
|
config:
|
||||||
- {
|
- {
|
||||||
name: "Windows Latest MSVC",
|
name: "Windows MSVC Ninja",
|
||||||
build_type: "Release",
|
os: "windows-latest",
|
||||||
cc: "cl",
|
build_type: "Release",
|
||||||
cxx: "cl",
|
cc: "cl",
|
||||||
environment_script: "C:/Program Files (x86)/Microsoft Visual Studio/2022/Enterprise/VC/Auxiliary/Build/vcvars64.bat",
|
cxx: "cl",
|
||||||
generator: "Visual Studio 17 2022"
|
generator: "Ninja",
|
||||||
}
|
cmake_args: "",
|
||||||
|
compiler_family: "msvc",
|
||||||
|
msvc_arch: "amd64",
|
||||||
|
can_test: false,
|
||||||
|
}
|
||||||
|
- {
|
||||||
|
name: "Windows MSVC Visual Studio 2022",
|
||||||
|
os: "windows-2022",
|
||||||
|
build_type: "Release",
|
||||||
|
cc: "cl",
|
||||||
|
cxx: "cl",
|
||||||
|
generator: "Visual Studio 17 2022",
|
||||||
|
cmake_args: "",
|
||||||
|
compiler_family: "msvc",
|
||||||
|
msvc_arch: "amd64",
|
||||||
|
can_test: false,
|
||||||
|
}
|
||||||
|
- {
|
||||||
|
name: "Windows MSVC Visual Studio 2026",
|
||||||
|
os: "windows-latest",
|
||||||
|
build_type: "Release",
|
||||||
|
cc: "cl",
|
||||||
|
cxx: "cl",
|
||||||
|
generator: "Visual Studio 18 2026",
|
||||||
|
cmake_args: "",
|
||||||
|
compiler_family: "msvc",
|
||||||
|
msvc_arch: "amd64",
|
||||||
|
can_test: true,
|
||||||
|
}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- uses: ilammy/msvc-dev-cmd@v1.13.0
|
- uses: ilammy/msvc-dev-cmd@v1.13.0
|
||||||
|
with:
|
||||||
|
arch: ${{matrix.config.msvc_arch}}
|
||||||
|
|
||||||
- name: Print env
|
- name: Print env
|
||||||
run: |
|
run: |
|
||||||
echo github.event.action: ${{ github.event.action }}
|
echo github.event.action: ${{ github.event.action }}
|
||||||
echo github.event_name: ${{ github.event_name }}
|
echo github.event_name: ${{ github.event_name }}
|
||||||
|
|
||||||
- name: Run GIT Init
|
- name: Run GIT Init
|
||||||
run: git init
|
run: git init
|
||||||
|
|
@ -43,33 +76,39 @@ jobs:
|
||||||
- name: Setup MSVC problem matcher
|
- name: Setup MSVC problem matcher
|
||||||
uses: ammaraskar/msvc-problem-matcher@master
|
uses: ammaraskar/msvc-problem-matcher@master
|
||||||
|
|
||||||
- name: Install Dependencies For ${{matrix.config.name}}
|
- name: Add Clang to PATH
|
||||||
|
if: matrix.config.compiler_family == 'clang-cl'
|
||||||
run: |
|
run: |
|
||||||
cmake --version
|
echo "C:\Program Files\LLVM\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
|
||||||
cmd "${{matrix.config.environment_script}}"
|
|
||||||
|
- name: Verify toolchain
|
||||||
|
run: cmake --version
|
||||||
|
|
||||||
- name: Configure, Build & Install
|
- name: Configure, Build & Install
|
||||||
uses: threeal/cmake-action@v1.3.0
|
uses: threeal/cmake-action@v1.3.0
|
||||||
with:
|
with:
|
||||||
source-dir: ${{github.workspace}}
|
source-dir: ${{github.workspace}}
|
||||||
build-dir: ${{github.workspace}}/build
|
build-dir: ${{github.workspace}}/build
|
||||||
c-compiler: ${{matrix.config.cc}}
|
c-compiler: ${{matrix.config.cc}}
|
||||||
cxx-compiler: ${{matrix.config.cxx}}
|
cxx-compiler: ${{matrix.config.cxx}}
|
||||||
generator: ${{matrix.config.generator}}
|
generator: ${{matrix.config.generator}}
|
||||||
options: CMAKE_BUILD_TYPE=${{matrix.config.build_type}} TORQUE_APP_NAME=Torque3D TORQUE_TESTING=ON
|
args: ${{matrix.config.cmake_args}}
|
||||||
run-build: true
|
options: CMAKE_BUILD_TYPE=${{matrix.config.build_type}} TORQUE_APP_NAME=Torque3D TORQUE_TESTING=ON
|
||||||
build-args: --config ${{matrix.config.build_type}} --target install
|
run-build: true
|
||||||
|
build-args: --config ${{matrix.config.build_type}} --target install
|
||||||
|
|
||||||
|
# Skipped for ARM64 — binary cannot run on the x64 host runner.
|
||||||
- name: Unit Tests
|
- name: Unit Tests
|
||||||
|
if: matrix.config.can_test
|
||||||
run: |
|
run: |
|
||||||
cd "${{github.workspace}}/My Projects/Torque3D/game"
|
cd "${{github.workspace}}/My Projects/Torque3D/game"
|
||||||
./Torque3D.exe runTests.tscript
|
./Torque3D.exe runTests.tscript
|
||||||
|
|
||||||
- name: Test Reporter
|
- name: Test Reporter
|
||||||
uses: phoenix-actions/test-reporting@v14
|
uses: phoenix-actions/test-reporting@v14
|
||||||
with:
|
with:
|
||||||
name: Windows test results
|
name: ${{matrix.config.name}} test results
|
||||||
path: "**/My Projects/Torque3D/game/test_detail.xml"
|
path: "**/My Projects/Torque3D/game/test_detail.xml"
|
||||||
reporter: java-junit
|
reporter: java-junit
|
||||||
fail-on-error: true
|
fail-on-error: true
|
||||||
if: github.event_name != 'pull_request'
|
if: github.event_name != 'pull_request' && matrix.config.can_test
|
||||||
|
|
@ -575,7 +575,6 @@ if (MSVC)
|
||||||
/fp:except- # No FP exception overhead
|
/fp:except- # No FP exception overhead
|
||||||
/bigobj # >64k sections - consoleObject.h template depth needs this
|
/bigobj # >64k sections - consoleObject.h template depth needs this
|
||||||
/Qpar- # Disable auto-paralleliser (causes subtle correctness bugs)
|
/Qpar- # Disable auto-paralleliser (causes subtle correctness bugs)
|
||||||
/NODEFAULTLIB
|
|
||||||
${_TORQUE_MSVC_WARNINGS}
|
${_TORQUE_MSVC_WARNINGS}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
@ -621,8 +620,8 @@ if (MSVC)
|
||||||
)
|
)
|
||||||
|
|
||||||
target_link_options(${TORQUE_APP_NAME} PRIVATE
|
target_link_options(${TORQUE_APP_NAME} PRIVATE
|
||||||
$<$<CONFIG:Debug>:/DEBUG:FASTLINK /INCREMENTAL>
|
$<$<CONFIG:Debug>:/DEBUG:FULL /INCREMENTAL>
|
||||||
$<$<CONFIG:RelWithDebInfo>:/INCREMENTAL /DEBUG:FASTLINK /OPT:REF /OPT:ICF>
|
$<$<CONFIG:RelWithDebInfo>:/INCREMENTAL /DEBUG:FULL /OPT:REF /OPT:ICF>
|
||||||
$<$<CONFIG:Release>:/INCREMENTAL>
|
$<$<CONFIG:Release>:/INCREMENTAL>
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
@ -768,21 +767,21 @@ if (TORQUE_TARGET_PROPERTIES)
|
||||||
endif (TORQUE_TARGET_PROPERTIES)
|
endif (TORQUE_TARGET_PROPERTIES)
|
||||||
target_include_directories(${TORQUE_APP_NAME} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} "${CMAKE_BINARY_DIR}/temp" ${TORQUE_INCLUDE_DIRECTORIES})
|
target_include_directories(${TORQUE_APP_NAME} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} "${CMAKE_BINARY_DIR}/temp" ${TORQUE_INCLUDE_DIRECTORIES})
|
||||||
|
|
||||||
target_precompile_headers(${TORQUE_APP_NAME} PRIVATE
|
# target_precompile_headers(${TORQUE_APP_NAME} PRIVATE
|
||||||
<vector>
|
# <vector>
|
||||||
<string>
|
# <string>
|
||||||
<map>
|
# <map>
|
||||||
<memory>
|
# <memory>
|
||||||
<algorithm>
|
# <algorithm>
|
||||||
<type_traits>
|
# <type_traits>
|
||||||
<cstring>
|
# <cstring>
|
||||||
<cstdlib>
|
# <cstdlib>
|
||||||
<cstdio>
|
# <cstdio>
|
||||||
<cmath>
|
# <cmath>
|
||||||
<cstdint>
|
# <cstdint>
|
||||||
<cmath>
|
# <cmath>
|
||||||
"console/engineObject.h"
|
# "console/engineObject.h"
|
||||||
)
|
# )
|
||||||
|
|
||||||
if(TORQUE_TESTING)
|
if(TORQUE_TESTING)
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
|
|
|
||||||
|
|
@ -1748,6 +1748,28 @@ void Namespace::relinkPackages()
|
||||||
activatePackage(mActivePackages[i]);
|
activatePackage(mActivePackages[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool Namespace::isPackageActive(StringTableEntry name)
|
||||||
|
{
|
||||||
|
S32 x;
|
||||||
|
|
||||||
|
for (x = 0; x < mNumActivePackages; x++)
|
||||||
|
{
|
||||||
|
if (mActivePackages[x] == name)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
DefineEngineFunction(isPackageActive, bool, (String identifier), ,
|
||||||
|
"@brief Returns true if the identifier is a package and is active, otherwise false.\n\n"
|
||||||
|
"@ingroup Packages\n")
|
||||||
|
{
|
||||||
|
StringTableEntry name = StringTable->insert(identifier.c_str());
|
||||||
|
return Namespace::isPackageActive(name);
|
||||||
|
}
|
||||||
|
|
||||||
DefineEngineFunction(isPackage, bool, (String identifier), ,
|
DefineEngineFunction(isPackage, bool, (String identifier), ,
|
||||||
"@brief Returns true if the identifier is the name of a declared package.\n\n"
|
"@brief Returns true if the identifier is the name of a declared package.\n\n"
|
||||||
|
|
|
||||||
|
|
@ -275,6 +275,7 @@ public:
|
||||||
static void printNamespaceEntries(Namespace * g, bool dumpScript = true, bool dumpEngine = true);
|
static void printNamespaceEntries(Namespace * g, bool dumpScript = true, bool dumpEngine = true);
|
||||||
static void unlinkPackages();
|
static void unlinkPackages();
|
||||||
static void relinkPackages();
|
static void relinkPackages();
|
||||||
|
static bool isPackageActive(StringTableEntry name);
|
||||||
static bool isPackage(StringTableEntry name);
|
static bool isPackage(StringTableEntry name);
|
||||||
static U32 getActivePackagesCount();
|
static U32 getActivePackagesCount();
|
||||||
static StringTableEntry getActivePackage(U32 index);
|
static StringTableEntry getActivePackage(U32 index);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue