Skip to content

Commit d4579d3

Browse files
committed
update vcpkg configuration
1 parent 3f923bf commit d4579d3

File tree

6 files changed

+124
-15
lines changed

6 files changed

+124
-15
lines changed

.devcontainer/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ RUN apt update && \
3535
libxml2-dev \
3636
mingw-w64 \
3737
mingw-w64-tools \
38+
nasm \
3839
ninja-build \
3940
qtbase5-dev \
4041
qttools5-dev \
Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
name: "Ryzom Client: cross compile 32-Bit windows client"
2+
3+
on:
4+
push:
5+
branches: [ "core4", "feature/*" ]
6+
paths:
7+
- .github/workflows/cross-compile-client.yml
8+
# TODO use nel package instead
9+
- nel/**
10+
- ryzom/**
11+
- cmake/**
12+
- CMakeModules/**
13+
- CMakeLists.txt
14+
- CMakePresets.json
15+
pull_request:
16+
branches: [ "core4" ]
17+
paths:
18+
- .github/workflows/cross-compile-client.yml
19+
# TODO use nel package instead
20+
- nel/**
21+
- ryzom/**
22+
- cmake/**
23+
- CMakeModules/**
24+
- CMakeLists.txt
25+
- CMakePresets.json
26+
workflow_dispatch:
27+
28+
jobs:
29+
build:
30+
runs-on: ubuntu-24.04
31+
32+
steps:
33+
- uses: actions/checkout@v4
34+
- name: Set reusable strings
35+
# Turn repeated input strings (such as the build output directory) into step outputs. These step outputs can be used throughout the workflow file.
36+
id: strings
37+
shell: bash
38+
run: |
39+
echo "build-output-dir=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT"
40+
echo "vcpkg-dir=${{ github.workspace }}/.vcpkg" >> "$GITHUB_OUTPUT"
41+
COMMIT_HASH=${{ github.sha }}
42+
echo "version=sha.${COMMIT_HASH:0:8}" >> "$GITHUB_OUTPUT"
43+
44+
- uses: lukka/get-cmake@v3.29.5
45+
with:
46+
cmakeVersion: 3.27.9
47+
48+
- name: Dependencies
49+
run: |
50+
sudo apt update
51+
sudo apt install --yes \
52+
libasound2-dev \
53+
libgl1-mesa-dev \
54+
libjack-dev \
55+
libpulse-dev \
56+
libxrandr-dev \
57+
libxrender-dev \
58+
libxxf86vm-dev \
59+
mingw-w64 \
60+
mingw-w64-tools \
61+
ninja-build
62+
git clone --depth 1 --branch openssl-3.0.12 https://github.com/openssl/openssl.git
63+
cd openssl
64+
./Configure mingw --cross-compile-prefix=i686-w64-mingw32- --prefix=/usr/i686-w64-mingw32
65+
make
66+
sudo make install
67+
68+
- name: Cache vcpkg Dependencies
69+
uses: actions/cache@v4
70+
with:
71+
path: ${{ steps.strings.outputs.vcpkg-dir }}
72+
key: vcpkg-ubuntu-24.04-mingw
73+
74+
- name: Configure CMake
75+
run: >
76+
cmake --version;
77+
cmake -B ${{ steps.strings.outputs.build-output-dir }}
78+
-G Ninja
79+
-DCMAKE_TOOLCHAIN_FILE=${{ github.workspace }}/CMakeModules/toolchain-mingw.cmake
80+
-DCMAKE_CONFIGURATION_TYPES=Release
81+
-DFINAL_VERSION=OFF
82+
-DCMAKE_TOOLCHAIN_FILE=$VCPKG_ROOT/scripts/buildsystems/vcpkg.cmake
83+
-DVCPKG_INSTALLED_DIR=${{ steps.strings.outputs.vcpkg-dir }}
84+
-DWITH_DRIVER_OPENAL=ON
85+
-DWITH_DRIVER_OPENGL=ON
86+
-DWITH_INSTALL_LIBRARIES=OFF
87+
-DWITH_NEL_SAMPLES=OFF
88+
-DWITH_NEL_TESTS=OFF
89+
-DWITH_NEL_TOOLS=OFF
90+
-DWITH_RYZOM_CLIENT=ON
91+
-DWITH_RYZOM_SERVER=OFF
92+
-DWITH_RYZOM_TOOLS=OFF
93+
-S ${{ github.workspace }}
94+
95+
- name: Build
96+
run: cmake --build ${{ steps.strings.outputs.build-output-dir }} --config Release
97+
98+
- uses: actions/upload-artifact@v4
99+
with:
100+
name: ryzom-client-win32-${{ steps.strings.outputs.version }}
101+
path: ${{ steps.strings.outputs.build-output-dir }}/bin

.github/workflows/cross-compile-client.yml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: "Ryzom Client: cross compile 32-Bit windows client"
1+
name: build 32-Bit windows client
22

33
on:
44
push:
@@ -37,7 +37,7 @@ jobs:
3737
shell: bash
3838
run: |
3939
echo "build-output-dir=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT"
40-
echo "vcpkg-dir=${{ github.workspace }}/.vcpkg" >> "$GITHUB_OUTPUT"
40+
echo "hunter-dir=${{ github.workspace }}/.hunter" >> "$GITHUB_OUTPUT"
4141
COMMIT_HASH=${{ github.sha }}
4242
echo "version=sha.${COMMIT_HASH:0:8}" >> "$GITHUB_OUTPUT"
4343
@@ -65,11 +65,11 @@ jobs:
6565
make
6666
sudo make install
6767
68-
- name: Cache vcpkg Dependencies
68+
- name: Cache Hunter Dependencies
6969
uses: actions/cache@v4
7070
with:
71-
path: ${{ steps.strings.outputs.vcpkg-dir }}
72-
key: vcpkg-ubuntu-24.04-mingw
71+
path: ${{ steps.strings.outputs.hunter-dir }}
72+
key: hunter-ubuntu-24.04-mingw
7373

7474
- name: Configure CMake
7575
run: >
@@ -79,8 +79,9 @@ jobs:
7979
-DCMAKE_TOOLCHAIN_FILE=${{ github.workspace }}/CMakeModules/toolchain-mingw.cmake
8080
-DCMAKE_CONFIGURATION_TYPES=Release
8181
-DFINAL_VERSION=OFF
82-
-DCMAKE_TOOLCHAIN_FILE=$VCPKG_ROOT/scripts/buildsystems/vcpkg.cmake
83-
-DVCPKG_INSTALLED_DIR=${{ steps.strings.outputs.vcpkg-dir }}
82+
-DHUNTER_CONFIGURATION_TYPES=Release
83+
-DHUNTER_ENABLED=ON
84+
-DHUNTER_ROOT=${{ steps.strings.outputs.hunter-dir }}
8485
-DWITH_DRIVER_OPENAL=ON
8586
-DWITH_DRIVER_OPENGL=ON
8687
-DWITH_INSTALL_LIBRARIES=OFF

cmake/CMakePresets.base.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@
4242
"name": "vcpkg",
4343
"hidden": true,
4444
"cacheVariables": {
45-
"VCPKG_INSTALLED_DIR": "${sourceDir}/build/.vcpkg",
4645
"CMAKE_TOOLCHAIN_FILE": "$env{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake"
4746
}
4847
},

vcpkg-configuration.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,20 @@
11
{
2+
"$schema": "https://raw.githubusercontent.com/microsoft/vcpkg-tool/main/docs/vcpkg-configuration.schema.json",
23
"default-registry": {
34
"kind": "git",
4-
"baseline": "47bf3d1ac192b3fa0feb6e6ac9c845de179eebe9",
5+
"baseline": "890e0f0506f9dcb76800dfa2ea28b03ebc627bfa",
56
"repository": "https://github.com/microsoft/vcpkg"
67
},
78
"registries": [
89
{
910
"kind": "artifact",
1011
"location": "https://github.com/microsoft/vcpkg-ce-catalog/archive/refs/heads/main.zip",
1112
"name": "microsoft"
13+
},
14+
{
15+
"kind": "artifact",
16+
"location": "https://artifacts.tools.arm.com/vcpkg-registry",
17+
"name": "arm"
1218
}
1319
]
1420
}

vcpkg.json

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,19 @@
11
{
2+
"$schema": "https://raw.githubusercontent.com/microsoft/vcpkg-tool/main/docs/vcpkg.schema.json",
23
"dependencies": [
34
"curl",
5+
"ffmpeg",
46
"freetype",
57
"giflib",
68
"gtest",
7-
"ijg-libjpeg",
9+
"libjpeg-turbo",
10+
"libogg",
811
"libpng",
12+
"libvorbis",
913
"libxml2",
1014
"lua",
15+
"openal-soft",
1116
"openssl",
12-
"zlib",
13-
"libogg",
14-
"libvorbis",
15-
"ffmpeg",
16-
"openal-soft"
17+
"zlib"
1718
]
1819
}

0 commit comments

Comments
 (0)