Skip to content

Commit

Permalink
Adjust vcpkg baseline, along with several other things, hopefully fix…
Browse files Browse the repository at this point in the history
…ing issue #844 in the process
  • Loading branch information
stephengtuggy committed Apr 22, 2024
1 parent adc6284 commit 5b1dfaa
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 22 deletions.
17 changes: 11 additions & 6 deletions engine/CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -326,7 +331,7 @@
"hidden": true,
"inherits": "windows-default",
"displayName": "Ninja on Windows",
"generator": "Ninja",
"generator": "Ninja Multi-Config",
"condition": {
"type": "equals",
"lhs": "${hostSystemName}",
Expand Down
6 changes: 6 additions & 0 deletions engine/custom-triplets/x64-windows-win10.cmake
Original file line number Diff line number Diff line change
@@ -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")
6 changes: 1 addition & 5 deletions engine/vcpkg-configuration.json
Original file line number Diff line number Diff line change
@@ -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" ]
}
4 changes: 3 additions & 1 deletion engine/vcpkg.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
"buildin-baseline": "da4b78d35084ec4e9808aa02017028da03b8d2ab",
"dependencies": [
"boost-python",
"boost-log",
Expand All @@ -13,14 +14,15 @@
"boost-chrono",
"boost-atomic",
"boost-assign",
"boost-format",
"egl-registry",
"expat",
"freeglut",
"libpng",
"libjpeg-turbo",
"libvorbis",
"openal-soft",
"opengl",
"opengl-registry",
"openssl",
"sdl1",
"sdl2",
Expand Down
20 changes: 10 additions & 10 deletions script/bootstrap.ps1
Original file line number Diff line number Diff line change
@@ -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

Expand All @@ -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 <https://www.gnu.org/licenses/>.
# along with Vega Strike. If not, see <https://www.gnu.org/licenses/>.


# You can customize this directory location if desired, but it should be
Expand All @@ -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

Expand All @@ -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

Expand Down

0 comments on commit 5b1dfaa

Please sign in to comment.