diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index a191ed8e..5dcdd7ed 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -10,10 +10,12 @@ jobs: matrix: include: - platform: x64 - os: windows-2022 + os: windows-latest triplet: x64-windows runs-on: ${{ matrix.os }} env: + VCPKG_DEFAULT_BINARY_CACHE: ${{ github.workspace }}/vcpkg-cache + VCPKG_BINARY_SOURCES: 'clear;files,${{ github.workspace }}/vcpkg-cache,readwrite' VCPKG_DEFAULT_TRIPLET: ${{ matrix.triplet }}-release VCPKG_TARGET_TRIPLET: ${{ matrix.triplet }}-release VCPKG_INSTALLED_DIR: ${{ github.workspace }}/vcpkg_installed/ @@ -22,7 +24,7 @@ jobs: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v7 with: submodules: "recursive" @@ -33,22 +35,32 @@ jobs: $short=$(git rev-parse --short HEAD) (Get-Content $file -Raw) -replace '(#define\s+CFG_VERSION_NUM\s+"[^"]*)(")', "`$1-$short`$2" | Set-Content $file - - name: run-vcpkg - uses: lukka/run-vcpkg@v11 + - name: Prepare cache directory + shell: powershell + run: "mkdir -Force ${{ env.VCPKG_DEFAULT_BINARY_CACHE }}" + + - name: Cache vcpkg dependencies + uses: actions/cache@v6 with: - vcpkgJsonGlob: "./vcpkg.json" - runVcpkgInstall: true + path: ${{ env.VCPKG_DEFAULT_BINARY_CACHE }} + key: vcpkg-${{ runner.os }}-${{ hashFiles('vcpkg.json', 'vcpkg-configuration.json') }}-${{ github.run_id }} + restore-keys: | + vcpkg-${{ runner.os }}-${{ hashFiles('vcpkg.json', 'vcpkg-configuration.json') }}- + vcpkg-${{ runner.os }}- - - name: Setup MSBuild - uses: microsoft/setup-msbuild@v2 + - name: Bootstrap vcpkg + shell: powershell + run: | + .\vcpkg\bootstrap-vcpkg.bat - name: Obtain and run CMake - uses: threeal/cmake-action@v1.3.0 + uses: threeal/cmake-action@v2.1.0 with: source-dir: "." build-dir: "build" - generator: "Visual Studio 17 2022" - options: CMAKE_TOOLCHAIN_FILE=vcpkg/scripts/buildsystems/vcpkg.cmake CMAKE_INSTALL_PREFIX="${{ env.INST_DIR }}" VCPKG_TARGET_TRIPLET="${{ env.VCPKG_TARGET_TRIPLET }}" + generator: "Visual Studio 18 2026" + options: CMAKE_TOOLCHAIN_FILE=vcpkg/scripts/buildsystems/vcpkg.cmake CMAKE_INSTALL_PREFIX=${{ env.INST_DIR }} VCPKG_INSTALLED_DIR=${{ env.VCPKG_INSTALLED_DIR }} VCPKG_TARGET_TRIPLET=${{ env.VCPKG_TARGET_TRIPLET }} + run-build: false - name: Build DLL run: "cmake --build build --config Release -t INSTALL" @@ -62,19 +74,19 @@ jobs: } else { Write-Host "DLL not found" } - name: Archive DLL - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v7 with: name: SimpleGraphic-${{ matrix.triplet }}.dll path: "${{ env.INST_DIR }}/SimpleGraphic.dll" - name: Archive DLL symbols - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v7 with: name: SimpleGraphic-${{ matrix.triplet }}.pdb path: "${{ github.workspace }}/build/Release/SimpleGraphic.pdb" - name: Archive dependency DLLs - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v7 with: name: SimpleGraphic-${{ matrix.triplet }}-deps.dll path: | @@ -82,7 +94,7 @@ jobs: !${{ env.INST_DIR }}/SimpleGraphic.dll - name: Archive dependency DLL symbols - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v7 with: name: SimpleGraphic-${{ matrix.triplet }}-deps.pdb path: | @@ -99,7 +111,7 @@ jobs: - name: Notify PathOfBuilding repo if: ${{ github.event_name == 'release' }} - uses: peter-evans/repository-dispatch@v3 + uses: peter-evans/repository-dispatch@v4 with: token: ${{ secrets.WIRES77_PAT }} repository: ${{ github.repository_owner }}/PathOfBuilding @@ -108,7 +120,7 @@ jobs: - name: Notify PathOfBuilding-PoE2 repo if: ${{ github.event_name == 'release' }} - uses: peter-evans/repository-dispatch@v3 + uses: peter-evans/repository-dispatch@v4 with: token: ${{ secrets.WIRES77_PAT }} repository: ${{ github.repository_owner }}/PathOfBuilding-PoE2 diff --git a/.gitmodules b/.gitmodules index 4fdcaad5..2d41c11d 100644 --- a/.gitmodules +++ b/.gitmodules @@ -7,9 +7,6 @@ [submodule "dep/imgui"] path = dep/imgui url = https://github.com/ocornut/imgui.git -[submodule "dep/glm"] - path = dep/glm - url = https://github.com/g-truc/glm.git [submodule "libs/luautf8"] path = libs/luautf8 url = https://github.com/starwing/luautf8.git diff --git a/CMakeLists.txt b/CMakeLists.txt index b992d62e..3d15a17d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -18,7 +18,6 @@ include(${PROJECT_SOURCE_DIR}/vcpkg/scripts/buildsystems/vcpkg.cmake) set(CMAKE_INSTALL_SYSTEM_RUNTIME_DESTINATION ".") include(InstallRequiredSystemLibraries) -add_subdirectory(dep/glm) set(SIMPLEGRAPHIC_SOURCES "config.h" @@ -100,14 +99,16 @@ add_library(SimpleGraphic SHARED ) target_compile_definitions(SimpleGraphic PRIVATE - "UNICODE" "_CRT_SECURE_NO_DEPRECATE" "_CRT_SECURE_NO_WARNINGS" "_SCL_SECURE_NO_DEPRECATE" "_SCL_SECURE_NO_WARNINGS" - "GLFW_INCLUDE_NONE" "GL_SILENCE_DEPRECATION" + "GLFW_INCLUDE_NONE" + "GLM_ENABLE_EXPERIMENTAL" + "NOMINMAX" "SIMPLEGRAPHIC_EXPORTS" + "UNICODE" ) target_include_directories(SimpleGraphic @@ -121,6 +122,7 @@ find_package(CURL CONFIG REQUIRED) find_package(fmt CONFIG REQUIRED) find_package(glfw3 CONFIG REQUIRED) find_package(gli CONFIG REQUIRED) +find_package(glm CONFIG REQUIRED) find_package(LuaJIT REQUIRED) find_package(Microsoft.GSL CONFIG REQUIRED) find_package(PkgConfig REQUIRED) @@ -252,7 +254,7 @@ if (WIN32) if (NOT VCPKG_TARGET_TRIPLET MATCHES "-release") find_file(LuaJIT_DLL_DEBUG NAMES "lua51.dll" PATHS "${DEPS_DIR}" PATH_SUFFIXES "debug/bin" REQUIRED NO_DEFAULT_PATH) - find_file(ZLIB_DLL_DEBUG NAMES "zlibd1.dll" + find_file(ZLIB_DLL_DEBUG NAMES "zd.dll" PATHS "${DEPS_DIR}" PATH_SUFFIXES "debug/bin" REQUIRED NO_DEFAULT_PATH) install(FILES @@ -265,7 +267,7 @@ if (WIN32) find_file(LuaJIT_DLL_RELEASE NAMES "lua51.dll" PATHS "${DEPS_DIR}" PATH_SUFFIXES "bin" REQUIRED NO_DEFAULT_PATH) - find_file(ZLIB_DLL_RELEASE NAMES "zlib1.dll" + find_file(ZLIB_DLL_RELEASE NAMES "z.dll" PATHS "${DEPS_DIR}" PATH_SUFFIXES "bin" REQUIRED NO_DEFAULT_PATH) install(FILES diff --git a/dep/glm b/dep/glm deleted file mode 160000 index 47585fde..00000000 --- a/dep/glm +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 47585fde0c49fa77a2bf2fb1d2ead06999fd4b6e diff --git a/dep/imgui b/dep/imgui index 0962c9fb..f1cc2ae1 160000 --- a/dep/imgui +++ b/dep/imgui @@ -1 +1 @@ -Subproject commit 0962c9fb723ee1498a533f0e592d81f7e6c1ffd8 +Subproject commit f1cc2ae15e53a861a874c3034aae6798fde194ab diff --git a/engine/core/core_config.cpp b/engine/core/core_config.cpp index d5f41355..d3a3795b 100644 --- a/engine/core/core_config.cpp +++ b/engine/core/core_config.cpp @@ -10,6 +10,7 @@ #include "core_config.h" #include +#include // ======================= // core_IConfig Interface diff --git a/libs/luautf8 b/libs/luautf8 index bdd3d7fb..d65ebfa4 160000 --- a/libs/luautf8 +++ b/libs/luautf8 @@ -1 +1 @@ -Subproject commit bdd3d7fb6ef22334fde028ba792d3a16309a4de8 +Subproject commit d65ebfa4a00d6e582970ab729013bb2a629e74c9 diff --git a/vcpkg b/vcpkg index 66c0373d..04a9d8e5 160000 --- a/vcpkg +++ b/vcpkg @@ -1 +1 @@ -Subproject commit 66c0373dc7fca549e5803087b9487edfe3aca0a1 +Subproject commit 04a9d8e5212d01ee1dd9478eadd9caade4f8b0d4 diff --git a/vcpkg-configuration.json b/vcpkg-configuration.json index ab524ed0..f697b257 100644 --- a/vcpkg-configuration.json +++ b/vcpkg-configuration.json @@ -1,13 +1,13 @@ { "default-registry": { "kind": "builtin", - "baseline": "66c0373dc7fca549e5803087b9487edfe3aca0a1" + "baseline": "04a9d8e5212d01ee1dd9478eadd9caade4f8b0d4" }, "registries": [ { "kind": "filesystem", "path": "vcpkg-ports", - "baseline": "2026-07-22", + "baseline": "2026-09-09", "packages": ["glfw3", "gli", "luajit"] } ] diff --git a/vcpkg-ports/ports/gli/2026-09-09/ignore-vendored-glm.patch b/vcpkg-ports/ports/gli/2026-09-09/ignore-vendored-glm.patch new file mode 100644 index 00000000..c16bc7e7 --- /dev/null +++ b/vcpkg-ports/ports/gli/2026-09-09/ignore-vendored-glm.patch @@ -0,0 +1,12 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index b705dbaf..a7d8f70c 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -115,7 +115,6 @@ add_library(gli INTERFACE) + target_include_directories(gli INTERFACE + $ + $ +- $ + ) + install(TARGETS gli EXPORT gliTargets) + diff --git a/vcpkg-ports/ports/gli/2026-09-09/portfile.cmake b/vcpkg-ports/ports/gli/2026-09-09/portfile.cmake new file mode 100644 index 00000000..ea19e0ad --- /dev/null +++ b/vcpkg-ports/ports/gli/2026-09-09/portfile.cmake @@ -0,0 +1,30 @@ +#header-only library + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO g-truc/gli + REF 3542f8830178061e0661f5df1e89d36ba7d7b0ab + SHA512 785eba47f08c033b38ebb5ce61ec7a8fd69faf95478da0f47d5d01dce07b89dbc15c33079b4fe9361b0541dd5194d229b635bed747fc4f099f6ea1fbd292b3ba + HEAD_REF master + PATCHES + ignore-vendored-glm.patch + pr-197-fix-static_assert.patch + pr-197-remove-make_vec4-conflict.patch +) + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS "-DGLI_TEST_ENABLE=OFF" +) + +vcpkg_cmake_install() + +vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/gli) + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/lib") +file(REMOVE "${CURRENT_PACKAGES_DIR}/include/gli/CMakeLists.txt") + +# Put the license file where vcpkg expects it +# manual.md contains the "licenses" section for the project +file(INSTALL "${SOURCE_PATH}/manual.md" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) \ No newline at end of file diff --git a/vcpkg-ports/ports/gli/2026-09-09/pr-197-fix-static_assert.patch b/vcpkg-ports/ports/gli/2026-09-09/pr-197-fix-static_assert.patch new file mode 100644 index 00000000..ac4f60a1 --- /dev/null +++ b/vcpkg-ports/ports/gli/2026-09-09/pr-197-fix-static_assert.patch @@ -0,0 +1,23 @@ +From a12695bed72c7a49b772b868ac1c9c16178a720f Mon Sep 17 00:00:00 2001 +From: Beato +Date: Mon, 2 Feb 2026 11:14:21 -0300 +Subject: [PATCH] Update old GLM < 0.9.9 "GLM_STATIC_ASSERT" macro to C++11 + static_assert + +--- + gli/core/format.inl | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/gli/core/format.inl b/gli/core/format.inl +index 180bf4f74..17744fcb3 100644 +--- a/gli/core/format.inl ++++ b/gli/core/format.inl +@@ -279,7 +279,7 @@ namespace detail + { 1, glm::u8vec3(1, 1, 1), 3, swizzles(SWIZZLE_RED, SWIZZLE_GREEN, SWIZZLE_BLUE, SWIZZLE_ONE), CAP_PACKED8_BIT | CAP_NORMALIZED_BIT | CAP_UNSIGNED_BIT | CAP_DDS_GLI_EXT_BIT}, //FORMAT_RG3B2_UNORM_PACK8, + }; + +- GLM_STATIC_ASSERT(sizeof(Table) / sizeof(Table[0]) == FORMAT_COUNT, "GLI error: format descriptor list doesn't match number of supported formats"); ++ static_assert( sizeof(Table) / sizeof(Table[0]) == FORMAT_COUNT, "GLI error: format descriptor list doesn't match number of supported formats" ); + GLI_ASSERT(Format != FORMAT_UNDEFINED); + + return Table[Format - FORMAT_FIRST]; diff --git a/vcpkg-ports/ports/gli/2026-09-09/pr-197-remove-make_vec4-conflict.patch b/vcpkg-ports/ports/gli/2026-09-09/pr-197-remove-make_vec4-conflict.patch new file mode 100644 index 00000000..17ec90f2 --- /dev/null +++ b/vcpkg-ports/ports/gli/2026-09-09/pr-197-remove-make_vec4-conflict.patch @@ -0,0 +1,83 @@ +From 7c561c636cc2c5aebc433b63513cfc6c3bb53670 Mon Sep 17 00:00:00 2001 +From: Beato +Date: Mon, 2 Feb 2026 11:46:59 -0300 +Subject: [PATCH] remove GLI GLM "make_vec4" conflict + +--- + gli/core/convert_func.hpp | 8 ++++---- + gli/type.hpp | 25 +------------------------ + 2 files changed, 5 insertions(+), 28 deletions(-) + +diff --git a/gli/core/convert_func.hpp b/gli/core/convert_func.hpp +index 8f3e7a88a..b9bcede9f 100644 +--- a/gli/core/convert_func.hpp ++++ b/gli/core/convert_func.hpp +@@ -176,7 +176,7 @@ namespace detail + + static vec<4, retType, P> fetch(textureType const & Texture, typename textureType::extent_type const & TexelCoord, typename textureType::size_type Layer, typename textureType::size_type Face, typename textureType::size_type Level) + { +- return make_vec4(vec(access::load(Texture, TexelCoord, Layer, Face, Level))); ++ return glm::make_vec4(vec(access::load(Texture, TexelCoord, Layer, Face, Level))); + } + + static void write(textureType & Texture, typename textureType::extent_type const & TexelCoord, typename textureType::size_type Layer, typename textureType::size_type Face, typename textureType::size_type Level, vec<4, retType, P> const & Texel) +@@ -205,7 +205,7 @@ namespace detail + static vec<4, retType, P> fetch(textureType const & Texture, typename textureType::extent_type const & TexelCoord, typename textureType::size_type Layer, typename textureType::size_type Face, typename textureType::size_type Level) + { + static_assert(std::numeric_limits::is_iec559, "CONVERT_MODE_NORM requires a float sampler"); +- return make_vec4(compNormalize(access::load(Texture, TexelCoord, Layer, Face, Level))); ++ return glm::make_vec4(compNormalize(access::load(Texture, TexelCoord, Layer, Face, Level))); + } + + static void write(textureType & Texture, typename textureType::extent_type const & TexelCoord, typename textureType::size_type Layer, typename textureType::size_type Face, typename textureType::size_type Level, vec<4, retType, P> const & Texel) +@@ -223,7 +223,7 @@ namespace detail + static vec<4, retType, P> fetch(textureType const & Texture, typename textureType::extent_type const & TexelCoord, typename textureType::size_type Layer, typename textureType::size_type Face, typename textureType::size_type Level) + { + static_assert(std::numeric_limits::is_iec559, "CONVERT_MODE_SRGB requires a float sampler"); +- return make_vec4(convertSRGBToLinear(compNormalize(access::load(Texture, TexelCoord, Layer, Face, Level)))); ++ return glm::make_vec4(convertSRGBToLinear(compNormalize(access::load(Texture, TexelCoord, Layer, Face, Level)))); + } + + static void write(textureType & Texture, typename textureType::extent_type const & TexelCoord, typename textureType::size_type Layer, typename textureType::size_type Face, typename textureType::size_type Level, vec<4, retType, P> const & Texel) +@@ -277,7 +277,7 @@ namespace detail + static vec<4, retType, P> fetch(textureType const & Texture, typename textureType::extent_type const & TexelCoord, typename textureType::size_type Layer, typename textureType::size_type Face, typename textureType::size_type Level) + { + static_assert(std::numeric_limits::is_iec559, "CONVERT_MODE_HALF requires a float sampler"); +- return make_vec4(vec(unpackHalf(access::load(Texture, TexelCoord, Layer, Face, Level)))); ++ return glm::make_vec4(vec(unpackHalf(access::load(Texture, TexelCoord, Layer, Face, Level)))); + } + + static void write(textureType & Texture, typename textureType::extent_type const & TexelCoord, typename textureType::size_type Layer, typename textureType::size_type Face, typename textureType::size_type Level, vec<4, retType, P> const & Texel) +diff --git a/gli/type.hpp b/gli/type.hpp +index 6b88cede2..e38220aaf 100644 +--- a/gli/type.hpp ++++ b/gli/type.hpp +@@ -40,27 +40,4 @@ namespace gli + typedef ivec3 extent3d; + typedef ivec4 extent4d; + +- template +- inline vec<4, T, P> make_vec4(vec<1, T, P> const & v) +- { +- return vec<4, T, P>(v.x, static_cast(0), static_cast(0), static_cast(1)); +- } +- +- template +- inline vec<4, T, P> make_vec4(vec<2, T, P> const & v) +- { +- return vec<4, T, P>(v.x, v.y, static_cast(0), static_cast(1)); +- } +- +- template +- inline vec<4, T, P> make_vec4(vec<3, T, P> const & v) +- { +- return vec<4, T, P>(v.x, v.y, v.z, static_cast(1)); +- } +- +- template +- inline vec<4, T, P> make_vec4(vec<4, T, P> const & v) +- { +- return v; +- } +-}//namespace gli ++} //namespace gli diff --git a/vcpkg-ports/ports/gli/2026-09-09/vcpkg.json b/vcpkg-ports/ports/gli/2026-09-09/vcpkg.json new file mode 100644 index 00000000..4ae5b2e3 --- /dev/null +++ b/vcpkg-ports/ports/gli/2026-09-09/vcpkg.json @@ -0,0 +1,18 @@ +{ + "name": "gli", + "version-date": "2026-09-09", + "port-version": 0, + "description": "OpenGL Image (GLI)", + "homepage": "https://gli.g-truc.net", + "dependencies": [ + "glm", + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} diff --git a/vcpkg-ports/versions/baseline.json b/vcpkg-ports/versions/baseline.json index 7b4c091f..4bb72631 100644 --- a/vcpkg-ports/versions/baseline.json +++ b/vcpkg-ports/versions/baseline.json @@ -16,5 +16,10 @@ "glfw3": { "baseline": "3.4", "port-version": 1 }, "gli": { "baseline": "2021-07-06", "port-version": 3 }, "luajit": { "baseline": "2026-07-20", "port-version": 1 } + }, + "2026-09-09": { + "glfw3": { "baseline": "3.4", "port-version": 1 }, + "gli": { "baseline": "2026-09-09", "port-version": 0 }, + "luajit": { "baseline": "2026-07-20", "port-version": 1 } } } \ No newline at end of file diff --git a/vcpkg-ports/versions/g-/gli.json b/vcpkg-ports/versions/g-/gli.json index e0edf1ef..f41753ae 100644 --- a/vcpkg-ports/versions/g-/gli.json +++ b/vcpkg-ports/versions/g-/gli.json @@ -1,5 +1,10 @@ { "versions": [ + { + "version-date": "2026-09-09", + "port-version": 0, + "path": "$/ports/gli/2026-09-09" + }, { "version-date": "2021-07-06", "port-version": 3, diff --git a/vcpkg.json b/vcpkg.json index 2e4efdd4..2822c6d3 100644 --- a/vcpkg.json +++ b/vcpkg.json @@ -7,6 +7,7 @@ "fmt", "glfw3", "gli", + "glm", "libwebp", "luajit", "ms-gsl",