Skip to content

Commit 9d7b8ec

Browse files
fix(release): bundle ONNX Runtime SONAME + fix Windows installer upload (3.8.1) (#750)
The 3.8.0 release shipped a broken Linux .deb / Docker image and never attached the Windows installer. Two independent release-pipeline bugs: 1. Linux/Docker: since #404 turned ENABLE_ONNX on for the Linux release, the binary links ONNX Runtime, but the POST_BUILD copied only the resolved versioned lib (libonnxruntime.so.1.20.1) — not the SONAME the loader requests (libonnxruntime.so.1) — so the packaged binary aborts with "libonnxruntime.so.1: cannot open shared object file" (caught by both scan-assets-qtmesh and docker-publish's ldd check). Fix: OnnxRuntime.cmake exposes QTMESH_ONNX_LIB_DIR and the app/UnitTests POST_BUILD glob-copy every libonnxruntime.so* / .dylib / .dll (versioned file + SONAME symlinks). 2. Windows: Inno Setup writes the installer to packaging/windows/Output/ (its default OutputDir), but the release upload globbed the repo root, so "Upload Windows installer to release" failed with "Can not find any file by QtMeshEditor-<v>-setup-Windows.exe" (long-standing — failing every release since 3.5.x). Fix: point the upload at packaging/windows/Output/. Bump to 3.8.1 + sync pinned doc refs so a re-cut release publishes a working Linux .deb/Docker image and the Windows installer asset. Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 4626b23 commit 9d7b8ec

6 files changed

Lines changed: 49 additions & 26 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -558,7 +558,10 @@ jobs:
558558
env:
559559
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
560560
with:
561-
file: QtMeshEditor-${{github.ref_name}}-setup-Windows.exe
561+
# Inno Setup writes to packaging/windows/Output/ (its default OutputDir,
562+
# next to the .iss) — the upload must point there, not the repo root,
563+
# or the installer asset is never attached to the release.
564+
file: packaging/windows/Output/QtMeshEditor-${{github.ref_name}}-setup-Windows.exe
562565
update_latest_release: true
563566
overwrite: false
564567
verbose: true

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ cmake_minimum_required(VERSION 3.24.0)
1313
cmake_policy(SET CMP0005 NEW)
1414
cmake_policy(SET CMP0048 NEW) # manages project version
1515

16-
project(QtMeshEditor VERSION 3.8.0 LANGUAGES C CXX)
16+
project(QtMeshEditor VERSION 3.8.1 LANGUAGES C CXX)
1717
message(STATUS "Building QtMeshEditor version ${PROJECT_VERSION}")
1818

1919
set(QTMESHEDITOR_VERSION_STRING "\"${PROJECT_VERSION}\"")

README.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ Available on the [GitHub Actions Marketplace](https://github.com/marketplace/act
3535
**Versioning**
3636

3737
- **Always follow the latest GitHub release** — use the Marketplace floating tag `fernandotonon/QtMeshEditor@v1` (same pattern as the [Marketplace example](https://github.com/marketplace/actions/qtmesheditor)). The composite action defaults to `image-tag: latest`, so the Docker CLI tracks the newest published `ghcr.io/fernandotonon/qtmesh` image.
38-
- **Reproducible builds** — pin the action and the container to the same semver as this repository’s `project(QtMeshEditor VERSION …)` in `CMakeLists.txt` (currently **3.8.0**). After bumping the version in CMake, run `./scripts/sync-doc-versions-from-cmake.sh` to refresh the pinned refs in `README.md` and the docs site fallback; CI enforces the match with `./scripts/sync-doc-versions-from-cmake.sh --check`.
38+
- **Reproducible builds** — pin the action and the container to the same semver as this repository’s `project(QtMeshEditor VERSION …)` in `CMakeLists.txt` (currently **3.8.1**). After bumping the version in CMake, run `./scripts/sync-doc-versions-from-cmake.sh` to refresh the pinned refs in `README.md` and the docs site fallback; CI enforces the match with `./scripts/sync-doc-versions-from-cmake.sh --check`.
3939

4040
Pinned workflow template (action + `ghcr.io` image aligned):
4141

@@ -53,10 +53,10 @@ jobs:
5353
- uses: actions/checkout@v4
5454

5555
- name: Run QtMesh scan
56-
uses: fernandotonon/QtMeshEditor@3.8.0
56+
uses: fernandotonon/QtMeshEditor@3.8.1
5757
with:
5858
command: scan
59-
image-tag: "3.8.0"
59+
image-tag: "3.8.1"
6060
env:
6161
QTMESH_CLOUD_TOKEN: ${{ secrets.QTMESH_CLOUD_TOKEN }}
6262
```
@@ -81,37 +81,37 @@ Release tags are listed on the [releases page](https://github.com/fernandotonon/
8181

8282
```yaml
8383
# Validate a specific mesh
84-
- uses: fernandotonon/QtMeshEditor@3.8.0
84+
- uses: fernandotonon/QtMeshEditor@3.8.1
8585
with:
8686
command: validate
8787
input-file: ./models/character.fbx
88-
image-tag: "3.8.0"
88+
image-tag: "3.8.1"
8989
9090
# Convert FBX → glTF
91-
- uses: fernandotonon/QtMeshEditor@3.8.0
91+
- uses: fernandotonon/QtMeshEditor@3.8.1
9292
with:
9393
command: convert
9494
input-file: ./models/character.fbx
9595
output-file: ./output/character.gltf2
96-
image-tag: "3.8.0"
96+
image-tag: "3.8.1"
9797
9898
# Resample Mixamo animations (200+ keyframes → 30)
99-
- uses: fernandotonon/QtMeshEditor@3.8.0
99+
- uses: fernandotonon/QtMeshEditor@3.8.1
100100
with:
101101
command: anim
102102
input-file: ./animations/dance.fbx
103103
output-file: ./output/dance_optimized.fbx
104104
options: --resample 30
105-
image-tag: "3.8.0"
105+
image-tag: "3.8.1"
106106
107107
# Get mesh info as JSON
108-
- uses: fernandotonon/QtMeshEditor@3.8.0
108+
- uses: fernandotonon/QtMeshEditor@3.8.1
109109
id: info
110110
with:
111111
command: info
112112
input-file: ./models/character.fbx
113113
options: --json
114-
image-tag: "3.8.0"
114+
image-tag: "3.8.1"
115115
116116
# Docker (alternative — :latest tracks newest image; pin :3.4.0 to match semver action ref)
117117
docker run --rm -v $(pwd):/workspace ghcr.io/fernandotonon/qtmesh:latest scan ./assets --fail-on error

cmake/OnnxRuntime.cmake

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,13 @@ endif()
7070
list(GET _ort_libs 0 QTMESH_ONNX_RUNTIME_LIB)
7171
set(QTMESH_ONNX_RUNTIME_LIB "${QTMESH_ONNX_RUNTIME_LIB}"
7272
CACHE FILEPATH "Path to the ONNX Runtime shared library to ship next to the binary" FORCE)
73+
# The lib dir holds the versioned shared lib PLUS its SONAME symlinks
74+
# (libonnxruntime.so.1 / libonnxruntime.so) that the loader actually requests
75+
# at runtime — copying only the resolved file leaves the binary unable to find
76+
# libonnxruntime.so.1. Expose the dir so the POST_BUILD copies the whole set.
77+
get_filename_component(QTMESH_ONNX_LIB_DIR "${QTMESH_ONNX_RUNTIME_LIB}" DIRECTORY)
78+
set(QTMESH_ONNX_LIB_DIR "${QTMESH_ONNX_LIB_DIR}"
79+
CACHE PATH "Directory of the ONNX Runtime shared library + its SONAME symlinks" FORCE)
7380

7481
add_library(qtmesh_onnx SHARED IMPORTED GLOBAL)
7582
set_target_properties(qtmesh_onnx PROPERTIES

src/CMakeLists.txt

Lines changed: 25 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -583,12 +583,20 @@ endif()
583583
# won't be found at runtime.
584584
if(ENABLE_ONNX)
585585
target_link_libraries(${CMAKE_PROJECT_NAME} qtmesh_onnx)
586-
if(QTMESH_ONNX_RUNTIME_LIB)
587-
add_custom_command(TARGET ${CMAKE_PROJECT_NAME} POST_BUILD
588-
COMMAND ${CMAKE_COMMAND} -E copy_if_different
589-
"${QTMESH_ONNX_RUNTIME_LIB}"
590-
"$<TARGET_FILE_DIR:${CMAKE_PROJECT_NAME}>"
591-
COMMENT "Copying ONNX Runtime shared library next to QtMeshEditor")
586+
if(QTMESH_ONNX_LIB_DIR)
587+
# Copy the versioned lib AND its SONAME symlinks (libonnxruntime.so.1 /
588+
# .so) — the loader requests the SONAME, not the resolved versioned name,
589+
# so copying only one file breaks `.deb`/Docker packaging.
590+
file(GLOB _ort_runtime_libs
591+
"${QTMESH_ONNX_LIB_DIR}/libonnxruntime.so*"
592+
"${QTMESH_ONNX_LIB_DIR}/libonnxruntime*.dylib"
593+
"${QTMESH_ONNX_LIB_DIR}/onnxruntime.dll")
594+
foreach(_ortlib ${_ort_runtime_libs})
595+
add_custom_command(TARGET ${CMAKE_PROJECT_NAME} POST_BUILD
596+
COMMAND ${CMAKE_COMMAND} -E copy_if_different
597+
"${_ortlib}" "$<TARGET_FILE_DIR:${CMAKE_PROJECT_NAME}>"
598+
COMMENT "Copying ONNX Runtime lib ${_ortlib} next to QtMeshEditor")
599+
endforeach()
592600
endif()
593601
endif()
594602

@@ -696,12 +704,17 @@ if(BUILD_TESTS)
696704
# Link ONNX Runtime for tests if enabled (#404)
697705
if(ENABLE_ONNX)
698706
target_link_libraries(UnitTests qtmesh_onnx)
699-
if(QTMESH_ONNX_RUNTIME_LIB)
700-
add_custom_command(TARGET UnitTests POST_BUILD
701-
COMMAND ${CMAKE_COMMAND} -E copy_if_different
702-
"${QTMESH_ONNX_RUNTIME_LIB}"
703-
"$<TARGET_FILE_DIR:UnitTests>"
704-
COMMENT "Copying ONNX Runtime shared library next to UnitTests")
707+
if(QTMESH_ONNX_LIB_DIR)
708+
file(GLOB _ort_test_libs
709+
"${QTMESH_ONNX_LIB_DIR}/libonnxruntime.so*"
710+
"${QTMESH_ONNX_LIB_DIR}/libonnxruntime*.dylib"
711+
"${QTMESH_ONNX_LIB_DIR}/onnxruntime.dll")
712+
foreach(_ortlib ${_ort_test_libs})
713+
add_custom_command(TARGET UnitTests POST_BUILD
714+
COMMAND ${CMAKE_COMMAND} -E copy_if_different
715+
"${_ortlib}" "$<TARGET_FILE_DIR:UnitTests>"
716+
COMMENT "Copying ONNX Runtime lib ${_ortlib} next to UnitTests")
717+
endforeach()
705718
endif()
706719
endif()
707720

website/src/hooks/useQtmeshActionRef.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { useEffect, useState } from 'react';
22

33
const QTMESH_RELEASES_LATEST_API = 'https://api.github.com/repos/fernandotonon/QtMeshEditor/releases/latest';
4-
const QTMESH_ACTION_REF_FALLBACK = 'fernandotonon/QtMeshEditor@3.8.0';
4+
const QTMESH_ACTION_REF_FALLBACK = 'fernandotonon/QtMeshEditor@3.8.1';
55
const CACHE_KEY = 'qtmesh.actionRef.cache.v1';
66
const CACHE_TTL_MS = 6 * 60 * 60 * 1000;
77

0 commit comments

Comments
 (0)