diff --git a/.github/workflows/Windows-CI.yml b/.github/workflows/Windows-CI.yml
index eee73215a8..be29c00fba 100644
--- a/.github/workflows/Windows-CI.yml
+++ b/.github/workflows/Windows-CI.yml
@@ -33,17 +33,16 @@ jobs:
VCPKG_ROOT: '${{ github.workspace }}/v'
# Tells vcpkg where binary packages are stored.
VCPKG_DEFAULT_BINARY_CACHE: '${{ github.workspace }}/vbincache'
- ## Let's use GitHub Action cache as storage for the vcpkg Binary Caching feature.
- #VCPKG_BINARY_SOURCES: 'clear;x-gha,readwrite'
+ # Let's use GitHub Action cache as storage for the vcpkg Binary Caching feature.
+ VCPKG_BINARY_SOURCES: 'x-gha,readwrite'
VCPKG_DEFAULT_TRIPLET: x64-windows
VCPKG_DEFAULT_HOST_TRIPLET: x64-windows
- PYTHONHOME: '${{ github.workspace }}/v/packages/python3_x64-windows/tools/python3'
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Set env vars needed for vcpkg to leverage the GitHub Action cache as a storage
# for Binary Caching.
- - uses: actions/github-script@d7906e4ad0b1822421a7e6a35d5ca353c962f410 #v6.4.1
+ - uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea #v7.0.1
with:
script: |
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
@@ -51,40 +50,45 @@ jobs:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: checkout
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 #v4.1.1
+ uses: actions/checkout@1d96c772d19495a3b5c517cd2bc0cb401ea0529f #v4.1.3
+
+ - name: Setup Python
+ uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d #v5.1.0
+ with:
+ python-version: 3.11
- name: "Create directory '${{ env.VCPKG_DEFAULT_BINARY_CACHE }}'"
run: mkdir -p $VCPKG_DEFAULT_BINARY_CACHE
shell: bash
- name: install-cmake
- uses: lukka/get-cmake@359fbae4b163fa01633e6de228fa7f2a31ab1fc7 #v3.26.1
+ uses: lukka/get-cmake@4931ab1fc1604964c055eb330edb3f6b26ba0cfa #v3.29.2
with:
- cmakeVersion: 3.26.1
+ cmakeVersion: 3.29.2
ninjaVersion: 1.11.1
- # # Restore vcpkg from the GitHub Action cache service. Note that packages are restored by vcpkg's binary caching
- # # when it is being run afterward by CMake.
- # - name: restore-vcpkg
- # uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 #v3.3.1
- # with:
- # # The first path is the location of vcpkg: it contains the vcpkg executable and data files, as long as the
- # # built package archives (aka binary cache) which are located by VCPKG_DEFAULT_BINARY_CACHE env var.
- # # The other paths starting with '!' are exclusions: they contain temporary files generated during the build of the installed packages.
- # path: |
- # ${{ env.VCPKG_ROOT }}
- # !${{ env.VCPKG_ROOT }}/buildtrees
- # !${{ env.VCPKG_ROOT }}/packages
- # !${{ env.VCPKG_ROOT }}/downloads
- # !${{ env.VCPKG_ROOT }}/installed
- # # The key is composed in a way that it gets properly invalidated whenever a different version of vcpkg is being used.
- # key: |
- # ${{ hashFiles( '.git/modules/vcpkg/HEAD' )}}
+ # Restore vcpkg from the GitHub Action cache service. Note that packages are restored by vcpkg's binary caching
+ # when it is being run afterward by CMake.
+ - name: restore-vcpkg
+ uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 #v4.0.2
+ with:
+ # The first path is the location of vcpkg: it contains the vcpkg executable and data files, as long as the
+ # built package archives (aka binary cache) which are located by VCPKG_DEFAULT_BINARY_CACHE env var.
+ # The other paths starting with '!' are exclusions: they contain temporary files generated during the build of the installed packages.
+ path: |
+ ${{ env.VCPKG_ROOT }}
+ !${{ env.VCPKG_ROOT }}/buildtrees
+ !${{ env.VCPKG_ROOT }}/packages
+ !${{ env.VCPKG_ROOT }}/downloads
+ !${{ env.VCPKG_ROOT }}/installed
+ # The key is composed in a way that it gets properly invalidated whenever a different version of vcpkg is being used.
+ key: |
+ ${{ matrix.os }}-${{ hashFiles( './engine/vcpkg.json' )}}
- name: install-vcpkg
- #if: steps.cache.outputs.cache-hit != 'true'
+ if: steps.cache.outputs.cache-hit != 'true'
run: |
- git clone https://github.com/vegastrike/vcpkg-local.git ${{ env.VCPKG_ROOT }}
+ git clone https://github.com/Microsoft/vcpkg.git ${{ env.VCPKG_ROOT }}
${{ env.VCPKG_ROOT }}\bootstrap-vcpkg.bat -disableMetrics
- name: run-build-script
@@ -99,7 +103,7 @@ jobs:
run: .\script\test.ps1 -Generator ${{ matrix.cmake-generator }} -EnablePIE ${{ matrix.enable-pie }} -BuildType ${{ matrix.build-type }}
- name: Upload test results
- uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 #v3.1.3
+ uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 #v4.3.3
if: failure()
with:
name: test_results_xml
diff --git a/engine/CMakePresets.json b/engine/CMakePresets.json
index 50944c6d30..546555ffa7 100644
--- a/engine/CMakePresets.json
+++ b/engine/CMakePresets.json
@@ -279,12 +279,17 @@
"displayName": "Windows Default",
"description": "Default build for Windows",
"environment": {
- "VCPKG_DEFAULT_TRIPLET": "x64-windows",
- "VCPKG_DEFAULT_HOST_TRIPLET": "x64-windows",
- "VCPKG_TARGET_TRIPLET": "x64-windows",
- "VCPKG_HOST_TRIPLET": "x64-windows"
+ "VCPKG_TARGET_TRIPLET": "x64-windows-win10",
+ "VCPKG_HOST_TRIPLET": "x64-windows-win10"
+ },
+ "cacheVariables": {
+ "CMAKE_TOOLCHAIN_FILE": {
+ "value": "$env{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake",
+ "type": "FILEPATH"
+ },
+ "VCPKG_TARGET_TRIPLET": "x64-windows-win10",
+ "VCPKG_HOST_TRIPLET": "x64-windows-win10"
},
- "toolchainFile": "$env{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake",
"debug": {
"output": true,
"find": true
@@ -326,7 +331,7 @@
"hidden": true,
"inherits": "windows-default",
"displayName": "Ninja on Windows",
- "generator": "Ninja",
+ "generator": "Ninja Multi-Config",
"condition": {
"type": "equals",
"lhs": "${hostSystemName}",
diff --git a/engine/custom-triplets/x64-windows-win10.cmake b/engine/custom-triplets/x64-windows-win10.cmake
new file mode 100644
index 0000000000..86fcd42071
--- /dev/null
+++ b/engine/custom-triplets/x64-windows-win10.cmake
@@ -0,0 +1,6 @@
+set(VCPKG_TARGET_ARCHITECTURE x64)
+set(VCPKG_CRT_LINKAGE dynamic)
+set(VCPKG_LIBRARY_LINKAGE dynamic)
+
+set(VCPKG_C_FLAGS "${VCPKG_C_FLAGS} /DBOOST_ALL_DYN_LINK /DBOOST_USE_WINAPI_VERSION=0x0A00 /D_WIN32_WINNT=0x0A00 /DWINVER=0x0A00")
+set(VCPKG_CXX_FLAGS "${VCPKG_CXX_FLAGS} /DBOOST_ALL_DYN_LINK /DBOOST_USE_WINAPI_VERSION=0x0A00 /D_WIN32_WINNT=0x0A00 /DWINVER=0x0A00")
diff --git a/engine/vcpkg-configuration.json b/engine/vcpkg-configuration.json
index 81539fafef..fce0cec112 100644
--- a/engine/vcpkg-configuration.json
+++ b/engine/vcpkg-configuration.json
@@ -1,8 +1,4 @@
{
"$schema": "https://raw.githubusercontent.com/microsoft/vcpkg-tool/main/docs/vcpkg-configuration.schema.json",
- "default-registry": {
- "kind": "git",
- "baseline": "45c660987c371515ddcc5c355e7989c0d652b85f",
- "repository": "https://github.com/vegastrike/vcpkg-local"
- }
+ "overlay-triplets": [ "./custom-triplets" ]
}
diff --git a/engine/vcpkg.json b/engine/vcpkg.json
index 3f98a5b5c4..e7d79b999e 100644
--- a/engine/vcpkg.json
+++ b/engine/vcpkg.json
@@ -2,6 +2,7 @@
"$schema": "https://raw.githubusercontent.com/microsoft/vcpkg-tool/main/docs/vcpkg.schema.json",
"name": "vega-strike",
"version-string": "0.9.0",
+ "builtin-baseline": "da4b78d35084ec4e9808aa02017028da03b8d2ab",
"dependencies": [
"boost-python",
"boost-log",
@@ -13,6 +14,8 @@
"boost-chrono",
"boost-atomic",
"boost-assign",
+ "boost-format",
+ "egl-registry",
"expat",
"freeglut",
"libpng",
@@ -20,7 +23,6 @@
"libvorbis",
"openal-soft",
"opengl",
- "opengl-registry",
"openssl",
"sdl1",
"sdl2",
diff --git a/script/bootstrap.ps1 b/script/bootstrap.ps1
index 2e9409a6a7..8cb171077f 100644
--- a/script/bootstrap.ps1
+++ b/script/bootstrap.ps1
@@ -1,6 +1,6 @@
# bootstrap.ps1
-# Copyright (C) 2021-2023 Stephen G. Tuggy and other Vega Strike contributors
+# Copyright (C) 2021-2024 Stephen G. Tuggy and other Vega Strike contributors
# https://github.com/vegastrike/Vega-Strike-Engine-Source
@@ -13,11 +13,11 @@
# Vega Strike is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
-# along with Vega Strike. If not, see .
+# along with Vega Strike. If not, see .
# You can customize this directory location if desired, but it should be
@@ -26,18 +26,18 @@ param(
[String]$VCPKG_PARENT_DIR = "C:\Projects"
)
-Set-Variable -Name CMAKE_VERSION -Value "3.26.1"
+Set-Variable -Name CMAKE_VERSION -Value "3.29.2"
-New-Item "$VCKPG_PARENT_DIR" -ItemType Directory -Force
-Push-Location "$VCKPG_PARENT_DIR"
+New-Item "$VCPKG_PARENT_DIR" -ItemType Directory -Force
+Push-Location "$VCPKG_PARENT_DIR"
git clone https://github.com/vegastrike/vcpkg-local.git ./v
.\v\bootstrap-vcpkg.bat -disableMetrics
-[Environment]::SetEnvironmentVariable('VCPKG_ROOT', "$VCKPG_PARENT_DIR\v", 'User')
-$env:VCPKG_ROOT = "$VCKPG_PARENT_DIR\v"
+[Environment]::SetEnvironmentVariable('VCPKG_ROOT', "$VCPKG_PARENT_DIR\v", 'User')
+$env:VCPKG_ROOT = "$VCPKG_PARENT_DIR\v"
$path = [Environment]::GetEnvironmentVariable('PATH', 'User')
-$newPath = $path + ";$VCKPG_PARENT_DIR\v\downloads\tools\cmake-$CMAKE_VERSION-windows\cmake-$CMAKE_VERSION-windows-i386\bin"
+$newPath = $path + ";$VCPKG_PARENT_DIR\v\downloads\tools\cmake-$CMAKE_VERSION-windows\cmake-$CMAKE_VERSION-windows-i386\bin"
[Environment]::SetEnvironmentVariable('PATH', $newPath, 'User')
$env:PATH = $newPath
@@ -47,7 +47,7 @@ $env:VCPKG_DEFAULT_TRIPLET = $triplet
[Environment]::SetEnvironmentVariable('VCPKG_DEFAULT_HOST_TRIPLET', $triplet, 'User')
$env:VCPKG_DEFAULT_HOST_TRIPLET = $triplet
-$pythonHome = "$VCKPG_PARENT_DIR\v\packages\python3_x64-windows\tools\python3"
+$pythonHome = "$VCPKG_PARENT_DIR\v\packages\python3_x64-windows\tools\python3"
[Environment]::SetEnvironmentVariable('PYTHONHOME', $pythonHome, 'User')
$env:PYTHONHOME = $pythonHome