diff --git a/.github/workflows/windows-build.yml b/.github/workflows/windows-build.yml index dd5cdfb45..86e47e7cc 100644 --- a/.github/workflows/windows-build.yml +++ b/.github/workflows/windows-build.yml @@ -11,356 +11,7 @@ concurrency: jobs: # ============================================================================= - # Job 1: Qt5 build (stable track) - # ============================================================================= - build-windows: - runs-on: windows-latest - steps: - - name: Checkout code - uses: actions/checkout@v7 - with: - submodules: recursive - fetch-depth: 0 - - - name: Install MSYS2 - uses: msys2/setup-msys2@v2 - with: - msystem: UCRT64 - update: true - cache: true - install: >- - git - mingw-w64-ucrt-x86_64-ccache - mingw-w64-ucrt-x86_64-gcc - mingw-w64-ucrt-x86_64-cmake - mingw-w64-ucrt-x86_64-ninja - mingw-w64-ucrt-x86_64-qt5-base - mingw-w64-ucrt-x86_64-qt5-svg - mingw-w64-ucrt-x86_64-qt5-tools - mingw-w64-ucrt-x86_64-qt5-translations - mingw-w64-ucrt-x86_64-qt5-pdf - mingw-w64-ucrt-x86_64-sqlite3 - mingw-w64-ucrt-x86_64-pkg-config - mingw-w64-ucrt-x86_64-kwidgetsaddons - mingw-w64-ucrt-x86_64-kcoreaddons - mingw-w64-ucrt-x86_64-extra-cmake-modules - mingw-w64-ucrt-x86_64-nsis - mingw-w64-ucrt-x86_64-angleproject - - - name: Cache ccache - uses: actions/cache@v5 - with: - path: C:\Users\runneradmin\AppData\Local\ccache - key: ccache-windows-${{ github.ref_name }}-${{ github.sha }} - restore-keys: | - ccache-windows-${{ github.ref_name }}- - ccache-windows- - - - name: Configure ccache - shell: msys2 {0} - run: | - /ucrt64/bin/ccache --set-config=max_size=500M - /ucrt64/bin/ccache --set-config=compression=true - /ucrt64/bin/ccache -z - echo "=== ccache config ===" - /ucrt64/bin/ccache -p - - - name: Patch NSIS Welcome page — fix title font size - shell: msys2 {0} - run: | - set -euo pipefail - WELCOME_NSH=$(find /ucrt64 -path "*/Modern UI 2/Pages/Welcome.nsh" | head -1) - if [ -z "$WELCOME_NSH" ]; then - echo "WARNING: Welcome.nsh not found, skipping font patch" - else - echo "Patching: $WELCOME_NSH" - sed -i '/WelcomePage\.Title\.Font/s/"[0-9]\+" "700"/"10" "700"/' "$WELCOME_NSH" - grep 'WelcomePage.Title.Font' "$WELCOME_NSH" - echo " OK font size patched to 10" - fi - - FINISH_NSH=$(find /ucrt64 -path "*/Modern UI 2/Pages/Finish.nsh" | head -1) - if [ -z "$FINISH_NSH" ]; then - echo "WARNING: Finish.nsh not found, skipping font patch" - else - echo "Patching: $FINISH_NSH" - sed -i '/FinishPage\.Title\.Font/s/"[0-9]\+" "700"/"10" "700"/' "$FINISH_NSH" - grep 'FinishPage.Title.Font' "$FINISH_NSH" - echo " OK font size patched to 10" - fi - - - name: Force Qt5 — remove Qt6 cmake + tools - shell: msys2 {0} - run: | - set -euo pipefail - rm -rf /ucrt64/lib/cmake/Qt6 - pacman -R --noconfirm mingw-w64-ucrt-x86_64-qt6-tools 2>/dev/null || true - echo "=== windeployqt binaries ===" - ls /ucrt64/bin/windeployqt* || echo "NO windeployqt found!" - - - name: Build with cmake - shell: msys2 {0} - run: | - set -euo pipefail - cd "$GITHUB_WORKSPACE" - mkdir build && cd build - NPROC=$(nproc) - echo "Available CPUs: $NPROC" - - cmake -G Ninja \ - -DCMAKE_BUILD_TYPE=Release \ - -DCMAKE_PREFIX_PATH=/ucrt64 \ - -DQt5_DIR=/ucrt64/lib/cmake/Qt5 \ - -DQT_VERSION_MAJOR=5 \ - -DCMAKE_DISABLE_FIND_PACKAGE_Qt6=ON \ - -DBUILD_TESTING=OFF \ - -DCMAKE_POLICY_DEFAULT_CMP0077=NEW \ - -DCMAKE_POLICY_VERSION_MINIMUM=3.5 \ - -DCMAKE_CXX_FLAGS="-DQET_EXPORT_PROJECT_DB" \ - -DCMAKE_C_COMPILER_LAUNCHER=/ucrt64/bin/ccache \ - -DCMAKE_CXX_COMPILER_LAUNCHER=/ucrt64/bin/ccache \ - -DSQLite3_INCLUDE_DIR=/ucrt64/include \ - -DSQLite3_LIBRARY=/ucrt64/lib/libsqlite3.dll.a \ - .. - ninja -j"$NPROC" - - - name: Show ccache stats - shell: msys2 {0} - run: | - echo "=== ccache statistics ===" - /ucrt64/bin/ccache -s - - - name: Verify exe was built - shell: msys2 {0} - run: | - set -euo pipefail - EXE=$(find "$GITHUB_WORKSPACE/build" -maxdepth 3 -iname "qelectrotech.exe" | head -1) - if [ -z "$EXE" ]; then - echo "ERROR: no qelectrotech.exe found in build/" - find "$GITHUB_WORKSPACE/build" -maxdepth 3 -name "*.exe" || true - exit 1 - fi - SIZE=$(stat -c%s "$EXE") - echo "Exe found: $EXE ($SIZE bytes)" - [ "$SIZE" -gt 100000 ] || { echo "ERROR: exe too small"; exit 1; } - - - name: Deploy — copy exe + windeployqt + DLLs - shell: msys2 {0} - run: | - set -euo pipefail - NSIS_ROOT="$GITHUB_WORKSPACE/nsis_root" - FILES="$NSIS_ROOT/files" - BIN="$FILES/bin" - mkdir -p "$BIN" - - EXE=$(find "$GITHUB_WORKSPACE/build" -maxdepth 3 -iname "qelectrotech.exe" | head -1) - echo "Copying exe: $EXE -> $BIN/QElectroTech.exe" - cp "$EXE" "$BIN/QElectroTech.exe" - - cd "$BIN" - /ucrt64/bin/windeployqt-qt5 \ - --release \ - --no-translations \ - --no-compiler-runtime \ - ./QElectroTech.exe || true - - echo "=== 3-pass transitive DLL scan ===" - set +e - for PASS in 1 2 3; do - echo "-- Pass $PASS --" - for bin_file in "$BIN"/*.dll "$BIN"/*.exe "$BIN"/sqldrivers/*.dll "$BIN"/platforms/*.dll "$BIN"/imageformats/*.dll; do - [ -f "$bin_file" ] || continue - while IFS= read -r line; do - dll_path=$(echo "$line" | awk '{print $3}') - [ -f "$dll_path" ] || continue - dll_name=$(basename "$dll_path") - dst="$BIN/$dll_name" - if [ ! -f "$dst" ]; then - cp "$dll_path" "$dst" - echo " Copied (pass $PASS): $dll_name" - fi - done < <(ldd "$bin_file" 2>/dev/null | grep -i '/ucrt64/bin/') - done - done - set -e - - DLL_COUNT=$(find "$BIN" -name "*.dll" | wc -l) - echo "=== $DLL_COUNT DLLs present after scan ===" - ls -lh "$BIN/QElectroTech.exe" || { echo "ERROR: exe missing from bin/"; exit 1; } - [ "$DLL_COUNT" -gt 5 ] || { echo "ERROR: too few DLLs"; exit 1; } - cd "$GITHUB_WORKSPACE" - - cp /ucrt64/bin/libgcc_s_seh-1.dll "$BIN/" - cp /ucrt64/bin/libstdc++-6.dll "$BIN/" - cp /ucrt64/bin/libwinpthread-1.dll "$BIN/" - SQLITE=$(find /ucrt64/bin -name "libsqlite3*.dll" | head -1) - if [ -n "$SQLITE" ]; then - cp "$SQLITE" "$BIN/" - echo "SQLite3 copied: $(basename $SQLITE)" - else - echo "WARNING: libsqlite3 not found in /ucrt64/bin/" - fi - - cp "$GITHUB_WORKSPACE/build-aux/windows/QET64.nsi" "$NSIS_ROOT/" - cp "$GITHUB_WORKSPACE/build-aux/windows/lang_extra.nsh" "$NSIS_ROOT/" - cp "$GITHUB_WORKSPACE/build-aux/windows/lang_extra_fr.nsh" "$NSIS_ROOT/" - cp "$GITHUB_WORKSPACE/build-aux/windows/lang_extra_missing.nsh" "$NSIS_ROOT/" - cp -r "$GITHUB_WORKSPACE/build-aux/windows/nsis_base/." "$NSIS_ROOT/" - - curl -fsSL \ - "https://raw.githubusercontent.com/qelectrotech/qelectrotech-source-mirror/refs/heads/master/misc/Lancer%20QET.bat" \ - -o "$FILES/Lancer QET.bat" - cp -r "$GITHUB_WORKSPACE/elements" "$FILES/elements" || true - cp -r "$GITHUB_WORKSPACE/titleblocks" "$FILES/titleblocks" || true - cp -r "$GITHUB_WORKSPACE/examples" "$FILES/examples" || true - cp -r "$GITHUB_WORKSPACE/fonts" "$FILES/fonts" || true - - cp -r "$GITHUB_WORKSPACE/lang" "$FILES/lang" || true - find "$GITHUB_WORKSPACE/build" -name "*.qm" -exec cp {} "$FILES/lang/" \; 2>/dev/null || true - echo "=== .qm files in files/lang/ ===" - ls "$FILES/lang/"*.qm 2>/dev/null | wc -l || echo "0 .qm files" - - for f in LICENSE ChangeLog CREDIT README ELEMENTS.LICENSE; do - cp "$GITHUB_WORKSPACE/$f" "$FILES/$f" 2>/dev/null || true - done - - echo "=== Verification of key files in files/ ===" - for f in LICENSE ChangeLog CREDIT README ELEMENTS.LICENSE \ - qet_uninstall_file_associations.reg register_filetypes.bat "Lancer QET.bat"; do - [ -f "$FILES/$f" ] \ - && echo " OK : $f" \ - || echo " MISSING: $f" - done - for d in ico elements lang titleblocks fonts examples bin; do - [ -d "$FILES/$d" ] \ - && echo " OK : $d/" \ - || echo " MISSING: $d/" - done - - - name: Extract version for installer name - shell: msys2 {0} - id: qet_version - run: | - set -euo pipefail - - GITCOMMIT=$(git -C "$GITHUB_WORKSPACE" rev-parse --short HEAD) - - A=$(git -C "$GITHUB_WORKSPACE" rev-list HEAD --count) - HEAD=$(( A + 473 )) - - VERSION=$(grep 'return QVersionNumber{' "$GITHUB_WORKSPACE/sources/qetversion.cpp" \ - | head -1 \ - | awk -F '{' '{ print $2 }' \ - | awk -F '}' '{ print $1 }' \ - | sed -e 's/,/./g' -e 's/ //g') - [ -z "$VERSION" ] && VERSION="dev" - - FULL_VERSION="${VERSION}-r${HEAD}-${GITCOMMIT}_x86_64-win64" - echo "version=$FULL_VERSION" >> "$GITHUB_OUTPUT" - echo "base_version=$VERSION" >> "$GITHUB_OUTPUT" - echo "gitcommit=$GITCOMMIT" >> "$GITHUB_OUTPUT" - echo "head=$HEAD" >> "$GITHUB_OUTPUT" - echo "VERSION : $VERSION" - echo "GITCOMMIT : $GITCOMMIT" - echo "HEAD (rev) : $HEAD" - echo "FULL : $FULL_VERSION" - - - name: Patch QET64.nsi — version + exe name + absolute paths - shell: msys2 {0} - run: | - set -euo pipefail - VERSION="${{ steps.qet_version.outputs.version }}" - NSI="$GITHUB_WORKSPACE/nsis_root/QET64.nsi" - FILES_WIN=$(cygpath -w "$GITHUB_WORKSPACE/nsis_root/files") - SCRIPT="$GITHUB_WORKSPACE/build-aux/windows/patch_nsi.py" - - python3 "$SCRIPT" "$NSI" "$VERSION" "$FILES_WIN" - - echo "=== Verification ===" - grep 'SOFT_VERSION' "$NSI" | head -1 - grep -m2 'nsis_root' "$NSI" | head -2 - echo "=== Contents of nsis_root/files/ ===" - ls "$GITHUB_WORKSPACE/nsis_root/files/" - - - name: Build NSIS installer - shell: msys2 {0} - run: | - set -euo pipefail - NSIS_ROOT="$GITHUB_WORKSPACE/nsis_root" - cd "$NSIS_ROOT" - echo "=== CWD : $(pwd) ===" - MSYS2_ARG_CONV_EXCL="*" makensis /V4 QET64.nsi - RC=$? - echo "=== Contents of nsis_root after makensis ===" - ls "$NSIS_ROOT/" - [ $RC -eq 0 ] || { echo "ERROR: makensis failed (exit $RC)"; exit 1; } - - - name: Move installer to dist/ - shell: msys2 {0} - run: | - set -euo pipefail - mkdir -p "$GITHUB_WORKSPACE/dist" - INSTALLER=$(find "$GITHUB_WORKSPACE/nsis_root" -maxdepth 1 -iname "installer_*.exe" | head -1) - if [ -z "$INSTALLER" ]; then - echo "ERROR: no installer .exe found in nsis_root/" - ls "$GITHUB_WORKSPACE/nsis_root/" - exit 1 - fi - echo "Moving: $INSTALLER -> dist/" - mv "$INSTALLER" "$GITHUB_WORKSPACE/dist/" - - - name: Upload build logs on failure - if: failure() - uses: actions/upload-artifact@v7 - with: - name: build-logs - path: | - build/CMakeFiles/*.log - nsis_root/files/bin/ - if-no-files-found: warn - - - name: Zip portable (readytouse) - id: zip_portable - shell: pwsh - run: | - $version = "${{ steps.qet_version.outputs.base_version }}" - $head = "${{ steps.qet_version.outputs.head }}" - $zipName = "qelectrotech-${version}+git${head}-x86-win64-readytouse.zip" - $src = "$env:GITHUB_WORKSPACE\nsis_root\files" - $dst = "$env:GITHUB_WORKSPACE\dist\$zipName" - $7z = "C:\Program Files\7-Zip\7z.exe" - - New-Item -ItemType Directory -Force -Path "$env:GITHUB_WORKSPACE\dist" | Out-Null - & $7z a -tzip -mx=5 -mmt=on $dst "$src\*" - if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE } - - $sizeMB = [math]::Round((Get-Item $dst).Length / 1MB, 1) - Write-Output "ZIP created: $zipName ($sizeMB MB)" - "zip_name=$zipName" | Out-File -FilePath $env:GITHUB_OUTPUT -Encoding utf8 -Append - - - name: Upload portable (files/ without installer) - uses: actions/upload-artifact@v7 - with: - name: qelectrotech-${{ steps.qet_version.outputs.base_version }}+git${{ steps.qet_version.outputs.head }}-x86-win64-readytouse - path: dist/${{ steps.zip_portable.outputs.zip_name }} - retention-days: 40 - - - name: Upload NSIS installer - uses: actions/upload-artifact@v7 - with: - name: qelectrotech-windows-installer - path: dist/Installer_*.exe - retention-days: 40 - - - name: Upload portable (nom fixe pour le workflow MSI) - uses: actions/upload-artifact@v7 - with: - name: qelectrotech-windows-portable - path: nsis_root/files/ - retention-days: 40 - - # ============================================================================= - # Job 2: Qt6 build (EXPERIMENTAL track) + # Job 1: Windows build (Qt6/KF6 — sole track since the Qt5 track was removed) # # Version label: the C++ source (sources/qetversion.cpp) intentionally stays # Qt-agnostic — QT_VERSION-based detection inside the binary proved unreliable @@ -368,6 +19,9 @@ jobs: # certainty which Qt major version it configured (-DQT_VERSION_MAJOR=6), so it # is safe to label the *package* "0.200.1" at this level, without touching # QetVersion::currentVersion() or making the binary self-detect its Qt build. + # + # Job id kept as "build-windows-qt6" (not renamed to "build-windows") in case + # branch protection / required status checks reference this exact job name. # ============================================================================= build-windows-qt6: runs-on: windows-latest @@ -397,6 +51,9 @@ jobs: mingw-w64-ucrt-x86_64-qt6-pdf mingw-w64-ucrt-x86_64-sqlite3 mingw-w64-ucrt-x86_64-pkg-config + mingw-w64-ucrt-x86_64-kwidgetsaddons + mingw-w64-ucrt-x86_64-kcoreaddons + mingw-w64-ucrt-x86_64-extra-cmake-modules mingw-w64-ucrt-x86_64-nsis mingw-w64-ucrt-x86_64-angleproject @@ -456,11 +113,12 @@ jobs: -DCMAKE_PREFIX_PATH=/ucrt64 \ -DQt6_DIR=/ucrt64/lib/cmake/Qt6 \ -DQT_VERSION_MAJOR=6 \ - -DBUILD_WITH_KF5=OFF \ + -DBUILD_WITH_KF=ON \ + -DBUILD_KF=OFF \ -DPACKAGE_TESTS=OFF \ -DCMAKE_POLICY_DEFAULT_CMP0077=NEW \ -DCMAKE_POLICY_VERSION_MINIMUM=3.5 \ - -DCMAKE_CXX_FLAGS="-DQET_EXPORT_PROJECT_DB" \ + -DQET_EXPORT_PROJECT_DB=ON \ -DCMAKE_C_COMPILER_LAUNCHER=/ucrt64/bin/ccache \ -DCMAKE_CXX_COMPILER_LAUNCHER=/ucrt64/bin/ccache \ -DSQLite3_INCLUDE_DIR=/ucrt64/include \ @@ -559,10 +217,71 @@ jobs: cp -r "$GITHUB_WORKSPACE/examples" "$FILES/examples" || true cp -r "$GITHUB_WORKSPACE/fonts" "$FILES/fonts" || true - cp -r "$GITHUB_WORKSPACE/lang" "$FILES/lang" || true - find "$GITHUB_WORKSPACE/build" -name "*.qm" -exec cp {} "$FILES/lang/" \; 2>/dev/null || true - echo "=== .qm files in files/lang/ ===" - ls "$FILES/lang/"*.qm 2>/dev/null | wc -l || echo "0 .qm files" + # --- Translations --- + # Since PR #751 the .qm files are no longer tracked in git: lrelease + # generates them in build/lang/ (OUTPUT_LOCATION "lang", relative to + # the build dir). Expected set = the .ts listed in TS_FILES + # (cmake/qet_compilation_vars.cmake): a missing .qm fails the job + # instead of silently shipping an untranslated build; a .ts present + # in lang/ but not listed in TS_FILES only raises a warning. + # find/grep only, no shell glob: $GITHUB_WORKSPACE is a Windows path + # (D:\a\...) and its backslashes break glob patterns. + QM_SRC="$GITHUB_WORKSPACE/build/lang" + mkdir -p "$FILES/lang" + TS_LISTED=$(grep -o 'lang/qet_[A-Za-z_]*\.ts' "$GITHUB_WORKSPACE/cmake/qet_compilation_vars.cmake" \ + | sed -e 's#^lang/##' -e 's#\.ts$##' | LC_ALL=C sort -u || true) + [ -n "$TS_LISTED" ] || { echo "ERROR: cannot read TS_FILES from cmake/qet_compilation_vars.cmake"; exit 1; } + TS_PRESENT=$(find "$GITHUB_WORKSPACE/lang" -maxdepth 1 -name 'qet_*.ts' -exec basename {} .ts \; | LC_ALL=C sort) + UNLISTED=$(LC_ALL=C comm -13 <(echo "$TS_LISTED") <(echo "$TS_PRESENT")) + if [ -n "$UNLISTED" ]; then + echo "::warning::.ts files not in TS_FILES, no .qm built:" $UNLISTED + fi + find "$QM_SRC" -maxdepth 1 -name 'qet_*.qm' -exec cp {} "$FILES/lang/" \; 2>/dev/null || true + QM_PRESENT=$(find "$FILES/lang" -maxdepth 1 -name 'qet_*.qm' -exec basename {} .qm \; | LC_ALL=C sort) + MISSING=$(LC_ALL=C comm -23 <(echo "$TS_LISTED") <(echo "$QM_PRESENT")) + QM_COUNT=$(printf '%s\n' "$QM_PRESENT" | grep -c . || true) + TS_COUNT=$(printf '%s\n' "$TS_LISTED" | grep -c .) + echo "=== $QM_COUNT .qm files copied to files/lang/ (expected: $TS_COUNT) ===" + if [ -n "$MISSING" ]; then + echo "ERROR: missing translations:" $MISSING + find "$GITHUB_WORKSPACE/build" -name '*.qm' || true + exit 1 + fi + + # Qt's own translations (OK/Cancel buttons, standard dialogs...): + # they come from qtbase_XX.qm, not from QET's .ts, and windeployqt + # runs with --no-translations. QETApp::setLanguage() falls back to + # lang/qt_XX.qm, so copy each qtbase_XX.qm there under that name + # (qtbase_XX.qm is standalone, unlike Qt's qt_XX.qm meta catalogs). + QT_TR_DIR=/ucrt64/share/qt6/translations + if [ ! -d "$QT_TR_DIR" ]; then + QT_TR_DIR=$(cygpath -u "$(/ucrt64/bin/qtpaths6 --query QT_INSTALL_TRANSLATIONS 2>/dev/null)" 2>/dev/null || true) + fi + find "$QT_TR_DIR" -maxdepth 1 -name 'qtbase_*.qm' 2>/dev/null | while read -r f; do + l=$(basename "$f" .qm) + cp "$f" "$FILES/lang/qt_${l#qtbase_}.qm" + done + # QET languages Qt only ships with a region (pt -> pt_PT, zh -> zh_CN): + # QTranslator only shortens codes (fr_FR -> fr), it never extends them. + for q in $TS_LISTED; do + l=${q#qet_} + if [ ! -e "$FILES/lang/qt_$l.qm" ]; then + if [ -e "$QT_TR_DIR/qtbase_${l}_${l^^}.qm" ]; then + alt="$QT_TR_DIR/qtbase_${l}_${l^^}.qm" + else + alt=$(find "$QT_TR_DIR" -maxdepth 1 -name "qtbase_${l}_*.qm" 2>/dev/null | LC_ALL=C sort | head -1 || true) + fi + if [ -n "$alt" ]; then + cp "$alt" "$FILES/lang/qt_$l.qm" + fi + fi + done + QT_QM_COUNT=$(find "$FILES/lang" -maxdepth 1 -name 'qt_*.qm' | wc -l) + echo "=== $QT_QM_COUNT Qt translation files (qt_*.qm) copied from $QT_TR_DIR ===" + if [ "$QT_QM_COUNT" -eq 0 ]; then + echo "ERROR: no qtbase_*.qm found in '$QT_TR_DIR' (mingw-w64-ucrt-x86_64-qt6-translations installed?)" + exit 1 + fi for f in LICENSE ChangeLog CREDIT README ELEMENTS.LICENSE; do cp "$GITHUB_WORKSPACE/$f" "$FILES/$f" 2>/dev/null || true @@ -594,8 +313,8 @@ jobs: # Deliberately NOT parsed from sources/qetversion.cpp: the CI job # already knows for certain it configured Qt6 (-DQT_VERSION_MAJOR=6), - # so the "0.200.1" experimental-track label is set here explicitly - # rather than relying on in-binary Qt version detection. + # so the "0.200.1" version label is set here explicitly rather than + # relying on in-binary Qt version detection. VERSION="0.200.1" FULL_VERSION="${VERSION}-qt6-r${HEAD}-${GITCOMMIT}_x86_64-win64" @@ -704,43 +423,47 @@ jobs: retention-days: 40 # --------------------------------------------------------------------------- - # Job 3 : Publie les assets nightly (exe + zip, Qt5 et Qt6) sur la release + # Job 2 : Publie les assets nightly (exe + zip) sur la release # Ne tourne que sur push master (pas sur les PRs) # --------------------------------------------------------------------------- publish-nightly-assets: - needs: [build-windows, build-windows-qt6] + needs: [build-windows-qt6] runs-on: ubuntu-latest if: github.event_name != 'pull_request' permissions: contents: write steps: - - name: Download installer artifacts (Qt5 + Qt6) + - name: Download installer artifact uses: actions/download-artifact@v8 with: pattern: qelectrotech-windows-installer* path: downloaded/installer/ merge-multiple: true - - name: Download portable artifacts (Qt5 + Qt6) + - name: Download portable artifact uses: actions/download-artifact@v8 with: pattern: qelectrotech-*-readytouse path: downloaded/portable/ merge-multiple: true - - name: Delete old nightly assets (.exe and .zip) + # Only Qt6-tagged assets are deleted/replaced here. Assets without "qt6" + # in the name are the frozen Qt5 legacy build (last one ever published, + # before the Qt5 CI job was removed) — deliberately left untouched so + # they stay downloadable indefinitely instead of disappearing. + - name: Delete old nightly Qt6 assets (.exe and .zip) env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} REPO: ${{ github.repository }} run: | gh release view nightly --repo "$REPO" --json assets \ - --jq '.assets[] | select(.name | test("\\.(exe|zip)$")) | .name' \ + --jq '.assets[] | select(.name | test("qt6")) | select(.name | test("\\.(exe|zip)$")) | .name' \ | while read -r name; do - echo "Deleting old asset: $name" + echo "Deleting old Qt6 asset: $name" gh release delete-asset nightly "$name" --repo "$REPO" --yes done - echo "Old .exe and .zip assets deleted." + echo "Old Qt6 .exe and .zip assets deleted (legacy Qt5 assets left untouched)." - name: Update nightly release uses: softprops/action-gh-release@v3 @@ -759,8 +482,7 @@ jobs: > ⚠️ This is a development version; it introduces new features you want, but may cause bugs that have not yet been identified yet. > For stable releases, see the [Releases page](https://github.com/${{ github.repository }}/releases). - > 🧪 **Qt6 builds are experimental.** Files tagged `-qt6-` are built against Qt6 and are not yet - > as tested as the Qt5 track. Expect rough edges; report issues clearly labelled "Qt6". + > 🗄️ Files without `-qt6-` in the name are the last Qt5 build ever published (frozen, unmaintained). Files tagged `-qt6-` are the actively maintained build. prerelease: true make_latest: false files: | @@ -769,4 +491,4 @@ jobs: token: ${{ secrets.GITHUB_TOKEN }} # GitHub Pages is generated and deployed by windows-msi.yml - # after the MSI upload, so that all URLs (exe/zip/msi, Qt5+Qt6) are known. + # after the MSI upload, so that all URLs (exe/zip/msi) are known. diff --git a/.github/workflows/windows-msi.yml b/.github/workflows/windows-msi.yml index 3020a179c..73d57e7ab 100644 --- a/.github/workflows/windows-msi.yml +++ b/.github/workflows/windows-msi.yml @@ -25,18 +25,17 @@ jobs: strategy: fail-fast: false + # Single-entry matrix kept on purpose (rather than flattening the job): + # matrix.flavor is used as part of the MSI ProductCode seed, so changing + # it would generate a new ProductCode and break upgrade detection for + # existing installs. Keeping "qt6" here preserves continuity. matrix: include: - - flavor: qt5 - portable_artifact: qelectrotech-windows-portable - version_source: qetversion # parsed from sources/qetversion.cpp - label_suffix: "" - experimental: false - flavor: qt6 portable_artifact: qelectrotech-windows-portable-qt6 version_source: hardcoded # see note in "Extract version" step - label_suffix: "-qt6-EXPERIMENTAL" - experimental: true + label_suffix: "-qt6" + experimental: false permissions: contents: write @@ -44,7 +43,6 @@ jobs: id-token: write # Required by SignPath outputs: - qt5_msi: ${{ steps.export.outputs.msi_name_qt5 }} qt6_msi: ${{ steps.export.outputs.msi_name_qt6 }} steps: @@ -72,14 +70,12 @@ jobs: # ---------------------------------------------------------------- # 3. Extract version - # Qt5: parsed from sources/qetversion.cpp (single source of truth - # for the software's own reported version). # Qt6: hardcoded "0.200.1" here — deliberately NOT parsed from the # binary/source, since Qt-version self-detection inside the # compiled code proved unreliable (see commit e1aa65f). The CI # matrix entry already knows for certain which flavor it is - # packaging, so the experimental-track label is set explicitly - # at the packaging level instead. + # packaging, so the version label is set explicitly at the + # packaging level instead. # ---------------------------------------------------------------- - name: Extract version id: version @@ -125,10 +121,9 @@ jobs: Write-Host "Version MSI : $verMsi" Write-Host "Version display : $verDisplay" - # Qt platform argument: only Qt5 needs the QTBUG-83161 font-rendering - # workaround (GDI backend). Qt6 uses DirectWrite by default and does - # not need it. Computed once here so both the bundled "Lancer QET.bat" - # and the MSI shortcuts (wix build -d QtPlatformArgs=...) stay in sync. + # Qt platform argument: kept from the Qt5 era (QTBUG-83161 + # font-rendering workaround, GDI backend). Qt6 uses DirectWrite by + # default and does not need it, so this always resolves empty now. if ("${{ matrix.flavor }}" -eq "qt5") { $qtArgs = "-platform windows:fontengine=freetype" } else { @@ -228,10 +223,10 @@ jobs: Write-Host "Lancer QET.bat replaced for MSI installation (qtArgs: '$qtArgs')." # ---------------------------------------------------------------- - # 9. Build the MSI (unsigned) - # Qt6 (experimental) uses a distinct ProductCode seed so it never - # collides with / upgrades over the Qt5 MSI — they must be able to - # coexist as clearly separate installs. + # 9. Build the MSI (unsigned at this stage — signing happens below) + # Qt6 keeps its own ProductCode seed (distinct from the retired Qt5 + # MSI), so a machine that still has the old Qt5 MSI installed gets a + # separate, coexisting install rather than an unexpected upgrade. # ---------------------------------------------------------------- - name: Build MSI shell: pwsh @@ -289,12 +284,13 @@ jobs: retention-days: 1 if-no-files-found: error - # Qt6 stays on the unsigned/experimental track (no signing request for - # this flavor), and forks never have the SignPath secrets, so guard on - # both: only qt5, and only in the upstream repo. + # Qt6 is now signed too (previously excluded while Qt5 was the stable + # track and Qt6 was experimental-only). The remaining guard is the fork + # check: forks never have the SignPath secrets, and a fork-originated + # PR/run must never attempt a signing request. # (cf. DieterMayerOSS:fix/msi-signing-fork-guard, d3f60c88) - name: Sign MSI via SignPath - if: matrix.flavor == 'qt5' && github.repository == 'qelectrotech/qelectrotech-source-mirror' + if: github.repository == 'qelectrotech/qelectrotech-source-mirror' uses: signpath/github-action-submit-signing-request@v2 with: api-token: ${{ secrets.SIGNPATH_API_TOKEN }} @@ -314,15 +310,14 @@ jobs: retention-days: 40 if-no-files-found: error - - name: Delete old nightly .msi asset for this flavor + - name: Delete old nightly .msi asset env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} REPO: ${{ github.repository }} run: | - $pattern = if ("${{ matrix.flavor }}" -eq "qt6") { "-qt6-EXPERIMENTAL.*\\.msi$" } else { "\\.msi$" } + $pattern = "-qt6.*\\.msi$" $names = gh release view nightly --repo $env:REPO --json assets --jq ".assets[] | select(.name | test(`"$pattern`")) | .name" foreach ($name in ($names -split "`n" | Where-Object { $_ })) { - if ("${{ matrix.flavor }}" -eq "qt5" -and $name -match "-qt6-EXPERIMENTAL") { continue } Write-Host "Deleting old asset: $name" gh release delete-asset nightly $name --repo $env:REPO --yes } @@ -342,11 +337,7 @@ jobs: shell: pwsh run: | $name = "$env:MSI_NAME" - if ("${{ matrix.flavor }}" -eq "qt6") { - echo "msi_name_qt6=$name" >> $env:GITHUB_OUTPUT - } else { - echo "msi_name_qt5=$name" >> $env:GITHUB_OUTPUT - } + echo "msi_name_qt6=$name" >> $env:GITHUB_OUTPUT - name: Summary if: always() @@ -354,11 +345,11 @@ jobs: run: | Write-Host "=== MSI build summary (${{ matrix.flavor }}) ===" Write-Host "Version : ${{ steps.version.outputs.VERSION_DISPLAY }}" - Write-Host "Experimental : ${{ matrix.experimental }}" + Write-Host "Signed : true" # --------------------------------------------------------------------------- - # Job 2 : Génère et déploie la page GitHub Pages une fois les DEUX MSI - # (Qt5 + Qt6) publiés, pour que toutes les URLs soient connues. + # Job 2 : Génère et déploie la page GitHub Pages une fois le MSI publié, + # pour que toutes les URLs soient connues. # --------------------------------------------------------------------------- deploy-pages: needs: build-msi @@ -388,13 +379,17 @@ jobs: ASSETS=$(gh release view nightly --repo "$REPO" --json assets --jq '.assets[].name') - EXE_NAME=$(echo "$ASSETS" | grep -v 'qt6' | grep '\.exe$' | head -1) - ZIP_NAME=$(echo "$ASSETS" | grep -v 'qt6' | grep '\.zip$' | head -1) - MSI_NAME=$(echo "$ASSETS" | grep -v 'qt6' | grep '\.msi$' | head -1 || echo "") + EXE_NAME=$(echo "$ASSETS" | grep 'qt6' | grep '\.exe$' | head -1) + ZIP_NAME=$(echo "$ASSETS" | grep 'qt6' | grep '\.zip$' | head -1) + MSI_NAME=$(echo "$ASSETS" | grep 'qt6' | grep '\.msi$' | head -1 || echo "") - EXE_QT6_NAME=$(echo "$ASSETS" | grep 'qt6' | grep '\.exe$' | head -1 || echo "") - ZIP_QT6_NAME=$(echo "$ASSETS" | grep 'qt6' | grep '\.zip$' | head -1 || echo "") - MSI_QT6_NAME=$(echo "$ASSETS" | grep 'qt6' | grep '\.msi$' | head -1 || echo "") + # Legacy Qt5 assets (no "qt6" in the name): last ever published, + # frozen — windows-build.yml/windows-msi.yml no longer delete or + # replace these, so they keep pointing at the same files release + # after release. Rendered as a separate "legacy" section if present. + LEGACY_EXE_NAME=$(echo "$ASSETS" | grep -v 'qt6' | grep '\.exe$' | head -1 || echo "") + LEGACY_ZIP_NAME=$(echo "$ASSETS" | grep -v 'qt6' | grep '\.zip$' | head -1 || echo "") + LEGACY_MSI_NAME=$(echo "$ASSETS" | grep -v 'qt6' | grep '\.msi$' | head -1 || echo "") BASE="https://github.com/$REPO/releases/download/nightly" INSTALLER_URL="$BASE/$EXE_NAME" @@ -402,12 +397,12 @@ jobs: MSI_URL="" [ -n "$MSI_NAME" ] && MSI_URL="$BASE/$MSI_NAME" - INSTALLER_QT6_URL="" - PORTABLE_QT6_URL="" - MSI_QT6_URL="" - [ -n "$EXE_QT6_NAME" ] && INSTALLER_QT6_URL="$BASE/$EXE_QT6_NAME" - [ -n "$ZIP_QT6_NAME" ] && PORTABLE_QT6_URL="$BASE/$ZIP_QT6_NAME" - [ -n "$MSI_QT6_NAME" ] && MSI_QT6_URL="$BASE/$MSI_QT6_NAME" + LEGACY_INSTALLER_URL="" + LEGACY_PORTABLE_URL="" + LEGACY_MSI_URL="" + [ -n "$LEGACY_EXE_NAME" ] && LEGACY_INSTALLER_URL="$BASE/$LEGACY_EXE_NAME" + [ -n "$LEGACY_ZIP_NAME" ] && LEGACY_PORTABLE_URL="$BASE/$LEGACY_ZIP_NAME" + [ -n "$LEGACY_MSI_NAME" ] && LEGACY_MSI_URL="$BASE/$LEGACY_MSI_NAME" SHA="${{ github.event.workflow_run.head_sha || github.sha }}" SHORT="${SHA:0:7}" @@ -417,7 +412,7 @@ jobs: export DATE SHORT REPO SHA RUN_URL RUN_NUMBER export INSTALLER_URL PORTABLE_URL MSI_URL - export INSTALLER_QT6_URL PORTABLE_QT6_URL MSI_QT6_URL + export LEGACY_INSTALLER_URL LEGACY_PORTABLE_URL LEGACY_MSI_URL python3 source/build-aux/generate-page.py diff --git a/.gitignore b/.gitignore index d0e6f45f2..c52020c0e 100644 --- a/.gitignore +++ b/.gitignore @@ -6,4 +6,5 @@ doc/* !doc/QElectroTech.qch QElectroTech.tag -!doc/doc-utils \ No newline at end of file +!doc/doc-utils +lang/*.qm diff --git a/CMakeLists.txt b/CMakeLists.txt index 45b539de4..6440cc257 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -19,7 +19,7 @@ include(cmake/hoto_update_cmake_message.cmake) cmake_minimum_required(VERSION 3.5...4.2) project(qelectrotech - VERSION 0.100.1 + VERSION 0.200.1 DESCRIPTION "QET is a CAD/CAE editor focusing on schematics drawing features." HOMEPAGE_URL "https://qelectrotech.org/" LANGUAGES C CXX) @@ -36,7 +36,7 @@ set(QET_DIR ${PROJECT_SOURCE_DIR}) # includes below, so every subdirectory and every FetchContent dependency # sees a consistent, already-defined value. if(NOT DEFINED QT_VERSION_MAJOR) - set(QT_VERSION_MAJOR 5) + set(QT_VERSION_MAJOR 6) endif() # Some third-party CMake projects we pull in via FetchContent (e.g. @@ -48,19 +48,11 @@ endif() # INTERFACE_QT_MAJOR_VERSION mismatch at generate time. set(QT_DEFAULT_MAJOR_VERSION ${QT_VERSION_MAJOR} CACHE STRING "Qt version to use (5 or 6)" FORCE) -# Add sub directories -option(PACKAGE_TESTS "Build the tests" ON) -if(PACKAGE_TESTS) - message("Add sub directory tests") - add_subdirectory(tests) -endif() - include(cmake/paths_compilation_installation.cmake) include(cmake/start_options.cmake) include(cmake/developer_options.cmake) include(cmake/git_update_submodules.cmake) include(cmake/git_last_commit_sha.cmake) -include(cmake/fetch_kdeaddons.cmake) include(cmake/fetch_singleapplication.cmake) include(cmake/fetch_pugixml.cmake) include(cmake/qet_compilation_vars.cmake) @@ -78,12 +70,43 @@ find_package( ${QET_COMPONENTS} REQUIRED) -# Qt6 only creates the Qt::GuiPrivate target (used for QPdfEngine::drawHyperlink) -# when the GuiPrivate component is explicitly requested. Qt5 has no such -# component package and creates the target implicitly with Gui, so only -# request it on Qt6 - requesting it on Qt5 fails the whole configure. +# (QPdfEngine::drawHyperlink) needs Qt's private GUI module. +# Qt >= 6.7 ships it as a proper find_package component, but some distro +# packages (e.g. Ubuntu's qt6-base-private-dev) omit Qt6GuiPrivateConfig.cmake +# and only provide the implicit Qt6::GuiPrivate target created alongside +# Qt6::Gui. Try the component quietly, then verify the target below so a +# missing private-headers package fails here instead of at compile time. +# Qt5 has no such component as its GuiPrivate target always exists once Gui is found. if(QT_VERSION_MAJOR GREATER_EQUAL 6) - find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS GuiPrivate) + find_package(Qt6 QUIET COMPONENTS GuiPrivate) +endif() + +if(QT_VERSION_MAJOR GREATER_EQUAL 6 AND NOT TARGET Qt6::GuiPrivate) + message(FATAL_ERROR + "Qt6::GuiPrivate was not found. It is required for PDF hyperlink " + "support (). Install the Qt6 private headers " + "(e.g. 'qt6-base-private-dev' on Debian/Ubuntu) or use a Qt build " + "that provides the GuiPrivate component.") +endif() + +# PDF page import (toolbar "Ajouter un PDF") needs the QtPdf module and, +# specifically, QPdfDocument::pagePointSize() which only exists since Qt 6.4. +# Unlike GuiPrivate above, a missing QtPdf module is NOT fatal here: some +# Qt6 distributions (e.g. the Flatpak org.kde.Platform runtime) don't ship +# it at all, since it lives in the qtwebengine source tree rather than Qt6 +# core. When it's missing, or too old, the feature is silently disabled - +# see the QT_VERSION_CHECK / QET_HAS_QTPDF guards in diagrameventaddpdf.* +# and pdfpagesdialog.*. +set(QET_HAS_QTPDF FALSE) +if(QT_VERSION_MAJOR GREATER_EQUAL 6) + find_package(Qt6 QUIET COMPONENTS Pdf) + if(TARGET Qt6::Pdf AND NOT Qt6_VERSION VERSION_LESS 6.4.0) + set(QET_HAS_QTPDF TRUE) + list(APPEND QET_PRIVATE_LIBRARIES Qt::Pdf) + add_compile_definitions(QET_HAS_QTPDF) + else() + message(STATUS "QtPdf module not available (or Qt < 6.4): PDF page import feature disabled") + endif() endif() find_package(SQLite3 REQUIRED) @@ -100,25 +123,20 @@ endif() set(CMAKE_AUTOUIC_SEARCH_PATHS ${QET_DIR}/sources/ui) -# The default build only compiles the tracked .ts files to .qm (lrelease). -# Refreshing the .ts from the sources (lupdate) is a developer action behind -# the explicit "update_translations" target below: running lupdate on every -# build rewrote tracked files as a side effect, and under high parallelism -# lupdate rewriting a .ts while lrelease read the same file made the build -# fail with "Premature end of document". -set_source_files_properties(${TS_FILES} PROPERTIES OUTPUT_LOCATION "${QET_DIR}/lang") if(QT_VERSION_MAJOR EQUAL 6) - qt6_add_translation(QM_FILES ${TS_FILES}) + set(KF_MAJOR_VERSION 6) else() - qt5_add_translation(QM_FILES ${TS_FILES}) + set(KF_MAJOR_VERSION 5) endif() +include(cmake/fetch_kdeaddons.cmake) -add_custom_target(update_translations - COMMAND $ ${CMAKE_SOURCE_DIR}/sources -ts ${TS_FILES} - WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} - COMMENT "Updating .ts files from sources/ (lupdate) - developer target, run explicitly" - VERBATIM -) +# Add sub directories +option(PACKAGE_TESTS "Build the tests" ON) +if(PACKAGE_TESTS) + message("Add sub directory tests") + enable_testing() + add_subdirectory(tests) +endif() # als laatse include(cmake/define_definitions.cmake) @@ -145,6 +163,109 @@ else() ) endif() +if(APPLE) + # CFBundleIdentifier must not be empty. CMake's default Info.plist + # template fills it from MACOSX_BUNDLE_GUI_IDENTIFIER; with that unset + # the bundle ships an empty identifier, LaunchServices never registers + # the .app, and AppKit's open/save panel service (which is keyed on the + # client's bundle id) silently presents nothing -- every + # QFileDialog::getOpenFileName()/getSaveFileName() call returns an empty + # string without a panel ever appearing, so File > Open and File > Save + # as do nothing at all. + set_target_properties(${PROJECT_NAME} PROPERTIES + MACOSX_BUNDLE TRUE + MACOSX_BUNDLE_GUI_IDENTIFIER "org.qelectrotech.QElectroTech" + MACOSX_BUNDLE_BUNDLE_NAME "QElectroTech" + MACOSX_BUNDLE_BUNDLE_VERSION "${PROJECT_VERSION}" + MACOSX_BUNDLE_SHORT_VERSION_STRING "${PROJECT_VERSION}" + MACOSX_BUNDLE_COPYRIGHT "Copyright 2006-2026 The QElectroTech Team" + ) +endif() + +# The default build only compiles the tracked .ts files to .qm (lrelease). +# Refreshing the .ts from the sources (lupdate) is a developer action behind +# the explicit "update_translations" target below: running lupdate on every +# build rewrote tracked files as a side effect, and under high parallelism +# lupdate rewriting a .ts while lrelease read the same file made the build +# fail with "Premature end of document". +set_source_files_properties( + ${TS_FILES} + PROPERTIES OUTPUT_LOCATION "lang" +) +if(QT_VERSION_MAJOR EQUAL 6) + if(Qt6_VERSION VERSION_LESS "6.2") + # Qt 6.0–6.1 + qt6_add_translation(QM_FILES ${TS_FILES}) + + # qt6_add_translation() only creates custom commands. Something must + # depend on their outputs for them to run during the default build. + add_custom_target(${PROJECT_NAME}_lrelease ALL + DEPENDS ${QM_FILES} + ) + + add_custom_target(update_translations + COMMAND + $ + "${CMAKE_SOURCE_DIR}/sources" + -ts ${TS_FILES} + WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}" + COMMENT + "Updating .ts files from sources/ (lupdate) - developer target" + VERBATIM + ) + + elseif(Qt6_VERSION VERSION_LESS "6.7") + # Qt 6.2–6.6: old target-based signature + qt_add_lrelease( + ${PROJECT_NAME} + TS_FILES ${TS_FILES} + QM_FILES_OUTPUT_VARIABLE QM_FILES + ) + + # Automatically creates the update_translations umbrella target. + qt_add_lupdate( + ${PROJECT_NAME} + TS_FILES ${TS_FILES} + ) + + else() + # Qt 6.7+: new signature + qt_add_lrelease( + TS_FILES ${TS_FILES} + LRELEASE_TARGET ${PROJECT_NAME}_lrelease + QM_FILES_OUTPUT_VARIABLE QM_FILES + ) + + qt_add_lupdate( + SOURCE_TARGETS ${PROJECT_NAME} + TS_FILES ${TS_FILES} + LUPDATE_TARGET update_translations + NO_GLOBAL_TARGET + ) + endif() + +else() + # Qt 5 + qt5_add_translation(QM_FILES ${TS_FILES}) + + # Likewise, qt5_add_translation() needs a target depending on its outputs, + # unless QM_FILES are already consumed elsewhere. + add_custom_target(${PROJECT_NAME}_lrelease ALL + DEPENDS ${QM_FILES} + ) + + add_custom_target(update_translations + COMMAND + $ + "${CMAKE_SOURCE_DIR}/sources" + -ts ${TS_FILES} + WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}" + COMMENT + "Updating .ts files from sources/ (lupdate) - developer target" + VERBATIM + ) +endif() + # Optional precompiled headers -- see QET_ENABLE_PCH in # cmake/developer_options.cmake for what this trades away. # @@ -180,7 +301,7 @@ target_link_libraries( pugixml::pugixml SingleApplication::SingleApplication SQLite3::SQLite3 - ${KF5_PRIVATE_LIBRARIES} + ${KF_PRIVATE_LIBRARIES} ${QET_PRIVATE_LIBRARIES} ) @@ -221,7 +342,7 @@ target_include_directories( ${QET_DIR}/sources/svg ) -if(NOT BUILD_WITH_KF5) +if(NOT BUILD_WITH_KF) target_include_directories( ${PROJECT_NAME} PRIVATE @@ -229,7 +350,9 @@ if(NOT BUILD_WITH_KF5) ) endif() -install(TARGETS ${PROJECT_NAME}) +install(TARGETS ${PROJECT_NAME} + BUNDLE DESTINATION . +) if (NOT MINGW) install(DIRECTORY ico/breeze-icons/16x16 DESTINATION ${QET_ICONS_PATH}) diff --git a/ChangeLog_full.md b/ChangeLog_full.md index e72d5f4bc..869ca1ff4 100644 --- a/ChangeLog_full.md +++ b/ChangeLog_full.md @@ -20,6 +20,7 @@ All notable changes to QElectroTech are documented here. ### 🐛 Bug Fixes +- Fix #798: clamp element-editor and diagram-view zoom to prevent view-transform overflow crash on scroll-wheel zoom ([3ca5d4a](../../commit/3ca5d4ab2)) - Fix(windows-msi): inject rev into MSI Version Build field ([e19f523](../../commit/e19f5232277efb37435cb65a83563d73333d62ec)) - Fix #391: use wide-char path for pugixml on Windows to handle Unicode paths ([31edf30](../../commit/31edf30c619213368e9b592b51be6ca8190db831)) - Fix(#283): restore center alignment when loading table config ([f55ba56](../../commit/f55ba568f68293e06436899bcc831431e9d27295)) diff --git a/Doxyfile b/Doxyfile index 86052291d..02f275398 100644 --- a/Doxyfile +++ b/Doxyfile @@ -48,7 +48,7 @@ PROJECT_NAME = QElectroTech # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = " 0.100.0-dev" +PROJECT_NUMBER = " 0.200.1" # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a diff --git a/README.md b/README.md index 310f8abf7..7a398c5ea 100644 --- a/README.md +++ b/README.md @@ -48,8 +48,8 @@ Here are the technical choices made for the software development: * Coding language: [C++](https://en.wikipedia.org/wiki/C%2B%2B) * GUI translations: [Qt Linguist](http://doc.qt.io/qt-5/qtlinguist-index.html) * Version control: [GIT](https://github.com/qelectrotech/qelectrotech-source-mirror.git) -* Doxygen documentation :[Doxygen](https://qelectrotech.github.io/qelectrotech-source-mirror/) -* QtCreator qch doxygen :[QElectroTech.qch](https://github.com/qelectrotech/qelectrotech-source-mirror/blob/master/doc/QElectroTech.qch) +* Doxygen documentation :[Doxygen](https://download.qelectrotech.org/qet/doxygen/html/) +* QtCreator qch doxygen :[QElectroTech.qch](https://download.qelectrotech.org/qet/doxygen/QElectroTech.qch) * File format for projects, elements and titleblocks: [XML](http://www.w3schools.com/xml/xml_whatis.asp) * Main development platform: [GNU/Linux](http://getgnulinux.org/en/linux/) * Targeted platforms: Windows, GNU/Linux, Mac OS X, BSDs diff --git a/build-aux/flatpak/org.qelectrotech.QElectroTech.json b/build-aux/flatpak/org.qelectrotech.QElectroTech.json index 6085a2326..4c673b598 100644 --- a/build-aux/flatpak/org.qelectrotech.QElectroTech.json +++ b/build-aux/flatpak/org.qelectrotech.QElectroTech.json @@ -1,8 +1,10 @@ { "id": "org.qelectrotech.QElectroTech", "runtime": "org.kde.Platform", - "runtime-version": "5.15-25.08", + "runtime-version": "6.11", "sdk": "org.kde.Sdk", + "base": "io.qt.qtwebengine.BaseApp", + "base-version": "6.11", "command": "qelectrotech", "rename-desktop-file": "org.qelectrotech.qelectrotech.desktop", "rename-appdata-file": "qelectrotech.appdata.xml", @@ -25,12 +27,26 @@ "*.la", "*.a" ], + "cleanup-commands": [ + "/app/cleanup-BaseApp.sh" + ], "modules": [ "tkinter.json", "pypi-dependencies.json", { "name": "qelectrotech", - "buildsystem": "qmake", + "buildsystem": "cmake", + "config-opts": [ + "-DCMAKE_INSTALL_PREFIX=/app", + "-DQT_VERSION_MAJOR=6", + "-DBUILD_WITH_KF=ON", + "-DBUILD_KF=OFF", + "-DPACKAGE_TESTS=OFF", + "-DBUILD_PUGIXML=ON", + "-DFETCHCONTENT_FULLY_DISCONNECTED=ON", + "-DFETCHCONTENT_SOURCE_DIR_PUGIXML=/run/build/qelectrotech/pugixml", + "-DQET_EXPORT_PROJECT_DB=ON" + ], "post-install": [ "mv ${FLATPAK_DEST}/share/mime/packages/qelectrotech.xml ${FLATPAK_DEST}/share/mime/packages/org.qelectrotech.QElectroTech.xml" ], @@ -38,12 +54,6 @@ { "type": "dir", "path": "../.." - }, - { - "type": "patch", - "paths": [ - "patches/fix-the-installation-paths.patch" - ] } ] } diff --git a/build-aux/generate-page.py b/build-aux/generate-page.py index 46757aeda..4e0ec98ab 100644 --- a/build-aux/generate-page.py +++ b/build-aux/generate-page.py @@ -2,11 +2,19 @@ """ generate-page.py — Generates gh-pages/index.html for QElectroTech nightly builds. Called from windows-msi.yml deploy-pages job. + Environment variables required: DATE, SHORT, REPO, SHA, RUN_URL, RUN_NUMBER, INSTALLER_URL, PORTABLE_URL, MSI_URL (optional) -Optional (Qt6 experimental track — omitted entirely if empty): - INSTALLER_QT6_URL, PORTABLE_QT6_URL, MSI_QT6_URL + +Optional (frozen Qt5 legacy build — omitted entirely if empty): + LEGACY_INSTALLER_URL, LEGACY_PORTABLE_URL, LEGACY_MSI_URL + +NOTE: Windows Qt5 CI build removed (Qt6 is now the sole track built and +signed going forward). INSTALLER_URL / PORTABLE_URL / MSI_URL point to the +Qt6 build artifacts. The LEGACY_* variables, when set, point to the last +Qt5 nightly assets that were ever published — kept downloadable but frozen +(windows-build.yml no longer regenerates or deletes them). """ import os @@ -20,9 +28,9 @@ installer_url = os.environ.get("INSTALLER_URL", "") portable_url = os.environ.get("PORTABLE_URL", "") msi_url = os.environ.get("MSI_URL", "") -installer_qt6_url = os.environ.get("INSTALLER_QT6_URL", "") -portable_qt6_url = os.environ.get("PORTABLE_QT6_URL", "") -msi_qt6_url = os.environ.get("MSI_QT6_URL", "") +legacy_installer_url = os.environ.get("LEGACY_INSTALLER_URL", "") +legacy_portable_url = os.environ.get("LEGACY_PORTABLE_URL", "") +legacy_msi_url = os.environ.get("LEGACY_MSI_URL", "") msi_block = "" if msi_url: @@ -32,43 +40,44 @@ if msi_url: Windows Installer .msi.msi — for enterprise / GPO deployment """ -# Qt6 experimental section — only rendered if at least one Qt6 asset exists. -qt6_block = "" -if installer_qt6_url or portable_qt6_url or msi_qt6_url: - qt6_msi_btn = "" - if msi_qt6_url: - qt6_msi_btn = f""" - +# Legacy Qt5 section — only rendered if at least one legacy asset exists. +legacy_block = "" +if legacy_installer_url or legacy_portable_url or legacy_msi_url: + legacy_installer_btn = "" + if legacy_installer_url: + legacy_installer_btn = f""" + ⬇ -Windows Installer .msi (Qt6).msi — experimental, for enterprise / GPO deployment +Windows Installer (Qt5, legacy).exe — frozen, no longer updated """ - qt6_installer_btn = "" - if installer_qt6_url: - qt6_installer_btn = f""" - + legacy_msi_btn = "" + if legacy_msi_url: + legacy_msi_btn = f""" + ⬇ -Windows Installer (Qt6).exe — experimental, includes all dependencies +Windows Installer .msi (Qt5, legacy).msi — frozen, no longer updated """ - qt6_portable_btn = "" - if portable_qt6_url: - qt6_portable_btn = f""" - + legacy_portable_btn = "" + if legacy_portable_url: + legacy_portable_btn = f""" + 📦 -Windows Portable (Qt6).zip — experimental, no installation required +Windows Portable (Qt5, legacy).zip — frozen, no longer updated """ - qt6_block = f""" + legacy_block = f"""
-

🧪 Windows — x86_64 — Qt6 track

+

🗃 Windows — x86_64 — Qt5 (legacy, unmaintained)

-⚠️ Experimental. These Qt6-based installer, portable and MSI -builds are new and not as thoroughly tested as the Qt5 track above. Expect rough -edges; please report issues and mention "Qt6" explicitly. +🗃 Legacy build — frozen, no longer updated. This is the +last Qt5 build published before Windows CI switched to Qt6 only. Kept available for +anyone who still needs it, but it will not receive further fixes or security updates. +Please migrate to the Qt6 build above when you can.
-{qt6_installer_btn} -{qt6_msi_btn} -{qt6_portable_btn} +{legacy_installer_btn} +{legacy_msi_btn} +{legacy_portable_btn}
""" @@ -126,7 +135,7 @@ For production use, download a stab -{qt6_block} +{legacy_block}