Skip to content

Commit 812c83e

Browse files
committed
feat: comprehensive CLI tool enhancements with GLFW integration and multi-platform builds
This is a comprehensive update that enhances the CLI tool with advanced features, complete GLFW 3.4 integration, multi-platform CI/CD pipelines, and support for both glibc and musl C library variants. Version: - Bump version to 1.4.1 CLI Features: - Add CCAP_BUILD_CLI_STANDALONE option for independent CLI builds - Integrate full GLFW 3.4 source for cross-platform preview functionality - Add automatic GLFW dependency detection on Linux with Wayland/X11 support - Add JPG/PNG image format support via stb_image_write with quality control - Add comprehensive build information display in --version output - Add runtime linking information (static/dynamic) detection and display - Add libc type detection (glibc/musl) in version output - Improve help and version output formatting - Enhance error handling and warning messages Build Optimizations: - Enable LTO (Link Time Optimization) for Release builds - Add automatic symbol stripping in Release builds - Fix MSVC static runtime configuration for CMake < 3.15 - Improve Linux static linking strategy with optional fallback CI/CD Enhancements: - Add complete Wayland and X11 development dependencies for GLFW builds - Implement glibc and musl build variants for Linux - Add ARM64 cross-compilation support with QEMU verification - Add clean container-based verification for Linux CLI builds - Pin Ubuntu versions for package compatibility (ubuntu-20.04 for glibc builds) - Use ubuntu-latest with Docker containers for better isolation - Add Alpine container tests for musl builds with QEMU support - Add comprehensive CLI tool verification in release workflow - Add pkg-config to Docker builds for better dependency detection - Improve static binary verification logic across all variants Platform Support: - Windows: Full GLFW support with static linking - Linux (glibc): Tested on Ubuntu 20.04, 24.04 with Wayland/X11 - Linux (musl): Tested on Alpine with full static linking - ARM64: Cross-compilation support for both glibc and musl Development Experience: - Add dev.cmake.example updates with new CLI options - Update VS Code tasks for CLI tool builds - Improve copilot-instructions with dev.cmake usage guidance - Add CLI build verification scripts - Extract reusable functions in release.sh for better maintainability - Remove unnecessary GLFW files (examples, tests, docs) to reduce size Documentation: - Remove redundant GLFW_STATIC_LINKING_LIMITATION.md (content covered in cli.md) - Add comprehensive static linking documentation - Update CMAKE_OPTIONS.md with new build options Dependencies: - GLFW 3.4: Full source integration for preview functionality - stb_image_write: For JPG/PNG output support - Wayland/X11: Dynamic detection and linking on Linux - pkg-config: For dependency discovery in Docker builds
1 parent 5eddb09 commit 812c83e

40 files changed

Lines changed: 18675 additions & 834 deletions

.github/copilot-instructions.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,5 @@
66
- Use English for git commit messages and PR descriptions
77
- All `.md` files in `docs/` must be in English
88
- Only commit necessary new `.md` files after review.
9-
- To update the version, run `./scripts/update_version.sh <new_version>` to update related files.
9+
- To update the version, run `./scripts/update_version.sh <new_version>` to update related files.
10+
- `dev.cmake` in project root (git-ignored) overrides default CMake options. Remove it for standard builds/tests; keep only when verifying custom settings.

.github/workflows/linux-build.yml

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,9 @@ jobs:
2424
- name: Install base dependencies
2525
run: |
2626
sudo apt-get update
27-
sudo apt-get install -y cmake build-essential gcc libasan6
27+
sudo apt-get install -y cmake build-essential gcc libasan6 \
28+
libwayland-dev libxkbcommon-dev wayland-protocols \
29+
libx11-dev libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev
2830
2931
- name: Install GLFW (for Release builds only)
3032
if: matrix.build_type == 'Release'
@@ -50,7 +52,7 @@ jobs:
5052
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
5153
-DCCAP_BUILD_EXAMPLES=ON \
5254
-DCCAP_BUILD_TESTS=ON \
53-
-DBUILD_CCAP_CLI=ON \
55+
-DCCAP_BUILD_CLI=ON \
5456
$SHARED_FLAG
5557
5658
- name: Build
@@ -177,7 +179,9 @@ jobs:
177179
- name: Install dependencies
178180
run: |
179181
sudo apt-get update
180-
sudo apt-get install -y cmake build-essential clang libglfw3-dev libasan6
182+
sudo apt-get install -y cmake build-essential clang libglfw3-dev libasan6 \
183+
libwayland-dev libxkbcommon-dev wayland-protocols \
184+
libx11-dev libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev
181185
182186
- name: Setup compiler
183187
run: |
@@ -197,7 +201,7 @@ jobs:
197201
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
198202
-DCCAP_BUILD_EXAMPLES=ON \
199203
-DCCAP_BUILD_TESTS=ON \
200-
-DBUILD_CCAP_CLI=ON \
204+
-DCCAP_BUILD_CLI=ON \
201205
$SHARED_FLAG
202206
203207
- name: Build
@@ -277,7 +281,9 @@ jobs:
277281
- name: Install cross-compilation toolchain
278282
run: |
279283
sudo apt-get update
280-
sudo apt-get install -y cmake build-essential gcc-aarch64-linux-gnu g++-aarch64-linux-gnu
284+
sudo apt-get install -y cmake build-essential gcc-aarch64-linux-gnu g++-aarch64-linux-gnu \
285+
libwayland-dev libxkbcommon-dev wayland-protocols \
286+
libx11-dev libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev
281287
echo "Cross-compilation toolchain installed"
282288
283289
- name: Configure CMake for ARM64
@@ -298,7 +304,7 @@ jobs:
298304
-DCMAKE_CROSSCOMPILING=ON \
299305
-DCCAP_BUILD_EXAMPLES=ON \
300306
-DCCAP_BUILD_TESTS=ON \
301-
-DBUILD_CCAP_CLI=ON \
307+
-DCCAP_BUILD_CLI=ON \
302308
$SHARED_FLAG
303309
304310
- name: Build ARM64
@@ -400,7 +406,9 @@ jobs:
400406

401407
- name: Install dependencies
402408
run: |
403-
dnf install -y cmake gcc-c++ make libasan
409+
dnf install -y cmake gcc-c++ make libasan \
410+
wayland-devel libxkbcommon-devel wayland-protocols-devel \
411+
libX11-devel libXrandr-devel libXinerama-devel libXcursor-devel libXi-devel
404412
405413
- name: Configure CMake
406414
run: |
@@ -415,7 +423,7 @@ jobs:
415423
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
416424
-DCCAP_BUILD_EXAMPLES=ON \
417425
-DCCAP_BUILD_TESTS=ON \
418-
-DBUILD_CCAP_CLI=ON \
426+
-DCCAP_BUILD_CLI=ON \
419427
$SHARED_FLAG
420428
421429
- name: Build

.github/workflows/macos-build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
fi
3131
mkdir -p build/${{ matrix.config }}-${{ matrix.library_type }}
3232
cd build/${{ matrix.config }}-${{ matrix.library_type }}
33-
cmake ../.. -DCMAKE_BUILD_TYPE=${{ matrix.config }} -DCCAP_BUILD_TESTS=ON -DBUILD_CCAP_CLI=ON $SHARED_FLAG
33+
cmake ../.. -DCMAKE_BUILD_TYPE=${{ matrix.config }} -DCCAP_BUILD_TESTS=ON -DCCAP_BUILD_CLI=ON $SHARED_FLAG
3434
3535
- name: Build
3636
run: |

0 commit comments

Comments
 (0)