Skip to content

Commit fb34113

Browse files
Merge pull request #739 from fernandotonon/feat/updater-off-package-builds
build(updater): disable auto-updater in package-manager builds (#439)
2 parents 8bae618 + 13c94af commit fb34113

4 files changed

Lines changed: 15 additions & 6 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -749,6 +749,7 @@ jobs:
749749
sudo cmake -S . -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} \
750750
-DCMAKE_CXX_FLAGS="-g" -DCMAKE_C_FLAGS="-g" \
751751
-DENABLE_STABLE_DIFFUSION=ON \
752+
-DENABLE_AUTO_UPDATER=OFF \
752753
-DASSIMP_DIR=/usr/local/lib/cmake/assimp-${{ env.ASSIMP_DIR_VERSION }} \
753754
-DASSIMP_INCLUDE_DIR=/usr/local/include/assimp \
754755
-DQt6_DIR=/home/runner/work/QtMeshEditor/Qt/${{ env.QT_VERSION }}/gcc_64/lib/cmake/Qt6 \
@@ -990,10 +991,13 @@ jobs:
990991
DEBIAN_FRONTEND: noninteractive
991992
run: |
992993
sudo apt-get update
993-
sudo apt-get install -y -o Dpkg::Options::=--force-confdef -o Dpkg::Options::=--force-confold \
994+
# libretro PSX core is installed later via install-ps1-libretro-core.sh
995+
# (buildbot download). Dropping libretro-beetle-psx here avoids apt
996+
# stalls that have consumed the whole job timeout on GitHub runners.
997+
timeout 600 sudo apt-get install -y -o Dpkg::Options::=--force-confdef -o Dpkg::Options::=--force-confold \
994998
libxcb-cursor0 libxcb-xinerama0 libx11-dev xvfb \
995999
mesa-utils libgl1-mesa-dri libegl-mesa0 libgbm1 libglx-mesa0 \
996-
libsecret-1-dev libretro-beetle-psx libsodium-dev
1000+
libsecret-1-dev libsodium-dev
9971001
# Start Xvfb with GLX support for Ogre GL initialization
9981002
Xvfb :99 -screen 0 1024x768x24 +extension GLX > /dev/null 2>&1 &
9991003
sleep 3

docs/AUTO_UPDATER_DESIGN.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ Only **`Portable`** enables download/install. All others show `updateCommandHint
102102
| **Portable** | macOS: `/Applications/QtMeshEditor.app`; Linux: `/opt/QtMeshEditor/`; Windows: zip layout / MSI registry `QtMeshEditor` without WinGet key. |
103103
| **Unknown** | CI trees, dev `build_local/`, ambiguous paths — **no self-update** (fail closed). |
104104

105-
`ENABLE_AUTO_UPDATER=OFF` for snap/flatpak/deb/docker CI builds (#439) so the code path is absent in those artifacts.
105+
`ENABLE_AUTO_UPDATER=OFF` for snap/flatpak/deb/docker CI builds (#439) so the code path is absent in those artifacts. **Wired:** `build-linux` passes `-DENABLE_AUTO_UPDATER=OFF` when producing `qtmesheditor_amd64.deb` (snap + Docker consume the same package). Package builds also remove **Help → Check for Updates** from the menu at runtime.
106106

107107
### PoC status
108108

src/CMakeLists.txt

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,9 @@ ADD_SUBDIRECTORY("${CMAKE_CURRENT_SOURCE_DIR}/PS1")
283283
# if we don't include this CMake will not include ui headers properly:
284284
include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${BUILD_INCLUDE_DIR} ${BUILD_UIH_DIR})
285285

286-
add_subdirectory(updater)
286+
if(ENABLE_AUTO_UPDATER OR BUILD_TESTS)
287+
add_subdirectory(updater)
288+
endif()
287289

288290
##############################################################
289291
# Processing ogre-procedural
@@ -540,9 +542,12 @@ Qt::QuickControls2
540542
meshoptimizer
541543
xatlas
542544
qtmesh_sodium
543-
qtmesh_updater
544545
)
545546

547+
if(ENABLE_AUTO_UPDATER)
548+
target_link_libraries(${CMAKE_PROJECT_NAME} qtmesh_updater)
549+
endif()
550+
546551
# One-time legacy secret-store read for migration (see CloudCredentialStore).
547552
if(APPLE)
548553
target_link_libraries(${CMAKE_PROJECT_NAME} "-framework Security")

src/mainwindow.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2258,7 +2258,7 @@ void MainWindow::initToolBar()
22582258
#ifdef ENABLE_AUTO_UPDATER
22592259
ui->actionVerify_Update->setText(tr("Check for Updates..."));
22602260
#else
2261-
ui->actionVerify_Update->setVisible(false);
2261+
ui->menuHelp->removeAction(ui->actionVerify_Update);
22622262
#endif
22632263

22642264
// Keyboard Shortcuts reference in Help menu

0 commit comments

Comments
 (0)