mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-05-13 13:20:03 +02:00
Compare commits
39 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fb769b884c | ||
|
|
2ae9ec87bb | ||
|
|
76d311cb35 | ||
|
|
b016cc9f54 | ||
|
|
526e39e909 | ||
|
|
d781105dfd | ||
|
|
f6b93c6b71 | ||
|
|
61319bbbd6 | ||
|
|
1b522c251b | ||
|
|
acfdab77fa | ||
|
|
8e327448cc | ||
|
|
7a8cee0ce6 | ||
|
|
82b8e7947e | ||
|
|
e542a05d3f | ||
|
|
0b337a1514 | ||
|
|
48fec1db98 | ||
|
|
31f946426b | ||
|
|
efa74dd0f5 | ||
|
|
703797bb97 | ||
|
|
ef75ee736a | ||
|
|
15e623ac5f | ||
|
|
df82a1125d | ||
|
|
7edc2e0241 | ||
|
|
55ae3fc3c6 | ||
|
|
2f72e6164c | ||
|
|
e40f9c6b72 | ||
|
|
ef261a7afd | ||
|
|
1550944011 | ||
|
|
32733187b8 | ||
|
|
79542edd3b | ||
|
|
9e0ec69c61 | ||
|
|
2e0a1a55e3 | ||
|
|
308f2ea838 | ||
|
|
9a9a5446cf | ||
|
|
0f8d835a1b | ||
|
|
663336a7bc | ||
|
|
4fab90d5b9 | ||
|
|
f67df92f0e | ||
|
|
7e2c2cccf8 |
106
.github/workflows/test-vs2026.yml
vendored
Normal file
106
.github/workflows/test-vs2026.yml
vendored
Normal file
@@ -0,0 +1,106 @@
|
|||||||
|
name: Test Windows VS2026 migration
|
||||||
|
|
||||||
|
# Ce workflow vérifie que le build QElectroTech fonctionne sur l'image
|
||||||
|
# windows-2025-vs2026, avant la migration forcée du 8 juin 2026.
|
||||||
|
# Il peut être supprimé une fois la migration confirmée OK.
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch: # déclenchement manuel uniquement
|
||||||
|
schedule:
|
||||||
|
- cron: '0 4 * * 1' # chaque lundi à 4h00 UTC (optionnel)
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
test-vs2026:
|
||||||
|
name: Build on windows-2025-vs2026
|
||||||
|
runs-on: windows-2025-vs2026 # <-- image avec VS 2026
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
submodules: recursive
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- name: Install MSYS2 + dependencies
|
||||||
|
uses: msys2/setup-msys2@v2
|
||||||
|
with:
|
||||||
|
msystem: UCRT64
|
||||||
|
update: false
|
||||||
|
install: >-
|
||||||
|
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-sqlite3
|
||||||
|
mingw-w64-ucrt-x86_64-pkgconf
|
||||||
|
mingw-w64-ucrt-x86_64-extra-cmake-modules
|
||||||
|
mingw-w64-ucrt-x86_64-kwidgetsaddons-qt5
|
||||||
|
mingw-w64-ucrt-x86_64-kcoreaddons-qt5
|
||||||
|
mingw-w64-ucrt-x86_64-nsis
|
||||||
|
mingw-w64-ucrt-x86_64-ccache
|
||||||
|
mingw-w64-ucrt-x86_64-7zip
|
||||||
|
git
|
||||||
|
|
||||||
|
- name: Force Qt5 (remove Qt6 interference)
|
||||||
|
shell: msys2 {0}
|
||||||
|
run: |
|
||||||
|
rm -rf /ucrt64/lib/cmake/Qt6 || true
|
||||||
|
pacman -R --noconfirm mingw-w64-ucrt-x86_64-qt6-tools 2>/dev/null || true
|
||||||
|
|
||||||
|
- name: Cache ccache
|
||||||
|
uses: actions/cache@v4
|
||||||
|
with:
|
||||||
|
path: C:\Users\runneradmin\AppData\Local\ccache
|
||||||
|
key: ccache-vs2026-${{ runner.os }}-${{ github.sha }}
|
||||||
|
restore-keys: |
|
||||||
|
ccache-vs2026-${{ runner.os }}-
|
||||||
|
|
||||||
|
- name: Configure (CMake)
|
||||||
|
shell: msys2 {0}
|
||||||
|
run: |
|
||||||
|
set -euo pipefail
|
||||||
|
cmake -B build -G Ninja \
|
||||||
|
-DCMAKE_BUILD_TYPE=Release \
|
||||||
|
-DQt5_DIR=/ucrt64/lib/cmake/Qt5 \
|
||||||
|
-DQT_VERSION_MAJOR=5 \
|
||||||
|
-DCMAKE_DISABLE_FIND_PACKAGE_Qt6=ON \
|
||||||
|
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
|
||||||
|
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
|
||||||
|
-DCMAKE_CXX_FLAGS="-DQET_EXPORT_PROJECT_DB"
|
||||||
|
|
||||||
|
- name: Build
|
||||||
|
shell: msys2 {0}
|
||||||
|
run: |
|
||||||
|
set -euo pipefail
|
||||||
|
cmake --build build --parallel $(nproc)
|
||||||
|
|
||||||
|
- name: Verify executable
|
||||||
|
shell: msys2 {0}
|
||||||
|
run: |
|
||||||
|
set -euo pipefail
|
||||||
|
EXE=$(find build -name "qelectrotech.exe" | head -1)
|
||||||
|
if [ -z "$EXE" ]; then
|
||||||
|
echo "ERROR: qelectrotech.exe introuvable après le build"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
SIZE=$(stat -c%s "$EXE")
|
||||||
|
echo "Executable trouvé : $EXE ($SIZE octets)"
|
||||||
|
if [ "$SIZE" -lt 100000 ]; then
|
||||||
|
echo "ERROR: exe trop petit ($SIZE octets), build probablement incomplet"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
echo "BUILD VS2026 : OK ✓"
|
||||||
|
|
||||||
|
- name: Summary
|
||||||
|
if: always()
|
||||||
|
shell: msys2 {0}
|
||||||
|
run: |
|
||||||
|
echo "=== Résumé de compatibilité VS2026 ==="
|
||||||
|
gcc --version
|
||||||
|
cmake --version
|
||||||
|
ninja --version
|
||||||
|
echo "Image runner : windows-2025-vs2026"
|
||||||
|
echo "Date du test : $(date -u)"
|
||||||
243
.github/workflows/windows-build.yml
vendored
243
.github/workflows/windows-build.yml
vendored
@@ -316,11 +316,30 @@ jobs:
|
|||||||
nsis_root/files/bin/
|
nsis_root/files/bin/
|
||||||
if-no-files-found: warn
|
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)
|
- name: Upload portable (files/ without installer)
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: qelectrotech-${{ steps.qet_version.outputs.base_version }}+git${{ steps.qet_version.outputs.head }}-x86-win64-readytouse
|
name: qelectrotech-${{ steps.qet_version.outputs.base_version }}+git${{ steps.qet_version.outputs.head }}-x86-win64-readytouse
|
||||||
path: nsis_root/files/
|
path: dist/${{ steps.zip_portable.outputs.zip_name }}
|
||||||
retention-days: 14
|
retention-days: 14
|
||||||
|
|
||||||
- name: Upload NSIS installer
|
- name: Upload NSIS installer
|
||||||
@@ -330,6 +349,13 @@ jobs:
|
|||||||
path: dist/Installer_*.exe
|
path: dist/Installer_*.exe
|
||||||
retention-days: 14
|
retention-days: 14
|
||||||
|
|
||||||
|
- name: Upload portable (nom fixe pour le workflow MSI)
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: qelectrotech-windows-portable
|
||||||
|
path: nsis_root/files/
|
||||||
|
retention-days: 14
|
||||||
|
|
||||||
# ---------------------------------------------------------------------------
|
# ---------------------------------------------------------------------------
|
||||||
# Job 2 : Publie une release nightly + page GitHub Pages
|
# Job 2 : Publie une release nightly + page GitHub Pages
|
||||||
# Ne tourne que sur push master (pas sur les PRs)
|
# Ne tourne que sur push master (pas sur les PRs)
|
||||||
@@ -340,13 +366,17 @@ jobs:
|
|||||||
if: github.event_name != 'pull_request'
|
if: github.event_name != 'pull_request'
|
||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: write
|
||||||
|
pages: write
|
||||||
|
id-token: write
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout gh-pages branch
|
- name: Checkout master (for build-aux scripts)
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
ref: gh-pages
|
ref: master
|
||||||
path: gh-pages
|
path: source
|
||||||
|
sparse-checkout: build-aux/generate-page.py
|
||||||
|
sparse-checkout-cone-mode: false
|
||||||
|
|
||||||
- name: Download installer artifact
|
- name: Download installer artifact
|
||||||
uses: actions/download-artifact@v4
|
uses: actions/download-artifact@v4
|
||||||
@@ -354,6 +384,13 @@ jobs:
|
|||||||
name: qelectrotech-windows-installer
|
name: qelectrotech-windows-installer
|
||||||
path: downloaded/installer/
|
path: downloaded/installer/
|
||||||
|
|
||||||
|
- name: Download portable artifact
|
||||||
|
uses: actions/download-artifact@v4
|
||||||
|
with:
|
||||||
|
pattern: qelectrotech-*-readytouse
|
||||||
|
path: downloaded/portable/
|
||||||
|
merge-multiple: true
|
||||||
|
|
||||||
- name: Update nightly release
|
- name: Update nightly release
|
||||||
uses: softprops/action-gh-release@v2
|
uses: softprops/action-gh-release@v2
|
||||||
with:
|
with:
|
||||||
@@ -368,14 +405,19 @@ jobs:
|
|||||||
| **Run** | https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }} |
|
| **Run** | https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }} |
|
||||||
| **Date** | ${{ github.event.head_commit.timestamp }} |
|
| **Date** | ${{ github.event.head_commit.timestamp }} |
|
||||||
|
|
||||||
> ⚠️ This release is overwritten on every push to `master`.
|
> ⚠️ 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).
|
> For stable releases, see the [Releases page](https://github.com/${{ github.repository }}/releases).
|
||||||
prerelease: true
|
prerelease: true
|
||||||
make_latest: false
|
make_latest: false
|
||||||
files: downloaded/installer/*.exe
|
files: |
|
||||||
|
downloaded/installer/*.exe
|
||||||
|
downloaded/portable/*.zip
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
- name: Generate download page (index.html)
|
- name: Generate download page (index.html)
|
||||||
|
env:
|
||||||
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
DATE: "placeholder"
|
||||||
run: |
|
run: |
|
||||||
DATE=$(date -u '+%Y-%m-%d %H:%M UTC')
|
DATE=$(date -u '+%Y-%m-%d %H:%M UTC')
|
||||||
SHORT="${{ github.sha }}"
|
SHORT="${{ github.sha }}"
|
||||||
@@ -384,174 +426,27 @@ jobs:
|
|||||||
RUN_URL="https://github.com/$REPO/actions/runs/${{ github.run_id }}"
|
RUN_URL="https://github.com/$REPO/actions/runs/${{ github.run_id }}"
|
||||||
EXE_NAME=$(ls downloaded/installer/*.exe | xargs -I{} basename {})
|
EXE_NAME=$(ls downloaded/installer/*.exe | xargs -I{} basename {})
|
||||||
INSTALLER_URL="https://github.com/$REPO/releases/download/nightly/$EXE_NAME"
|
INSTALLER_URL="https://github.com/$REPO/releases/download/nightly/$EXE_NAME"
|
||||||
|
ZIP_NAME=$(ls downloaded/portable/*.zip | xargs -I{} basename {})
|
||||||
|
PORTABLE_URL="https://github.com/$REPO/releases/download/nightly/$ZIP_NAME"
|
||||||
|
MSI_NAME=$(gh release view nightly --json assets --jq '.assets[].name' 2>/dev/null \
|
||||||
|
| grep '\.msi$' | head -1 || echo "")
|
||||||
|
MSI_URL=""
|
||||||
|
[ -n "$MSI_NAME" ] && MSI_URL="https://github.com/$REPO/releases/download/nightly/$MSI_NAME"
|
||||||
|
DATE=$(date -u '+%Y-%m-%d %H:%M UTC')
|
||||||
|
export DATE SHORT REPO SHA="${{ github.sha }}" RUN_URL
|
||||||
|
export RUN_NUMBER="${{ github.run_number }}"
|
||||||
|
export INSTALLER_URL PORTABLE_URL MSI_URL
|
||||||
|
# Write the page generator script to /tmp (build-aux/ not available
|
||||||
|
# in deploy-pages job which only checks out gh-pages branch)
|
||||||
|
python3 source/build-aux/generate-page.py
|
||||||
|
|
||||||
mkdir -p gh-pages
|
- name: Add .nojekyll to disable Jekyll processing
|
||||||
cat > gh-pages/index.html << HTMLEOF
|
run: touch gh-pages/.nojekyll
|
||||||
<!DOCTYPE html>
|
|
||||||
<html lang="en">
|
|
||||||
<head>
|
|
||||||
<meta charset="UTF-8">
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
||||||
<title>QElectroTech – Nightly Builds</title>
|
|
||||||
<style>
|
|
||||||
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
|
|
||||||
body {
|
|
||||||
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
|
|
||||||
background: #f0f4f8;
|
|
||||||
color: #2d3748;
|
|
||||||
min-height: 100vh;
|
|
||||||
}
|
|
||||||
header {
|
|
||||||
background: linear-gradient(135deg, #1a365d 0%, #2b6cb0 100%);
|
|
||||||
color: white;
|
|
||||||
padding: 48px 24px 40px;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
header h1 { font-size: 2.2em; letter-spacing: -0.5px; margin-bottom: 8px; }
|
|
||||||
header p { opacity: 0.8; font-size: 1.05em; }
|
|
||||||
main {
|
|
||||||
max-width: 680px;
|
|
||||||
margin: 40px auto;
|
|
||||||
padding: 0 20px 60px;
|
|
||||||
}
|
|
||||||
.card {
|
|
||||||
background: white;
|
|
||||||
border-radius: 12px;
|
|
||||||
padding: 28px;
|
|
||||||
margin-bottom: 24px;
|
|
||||||
box-shadow: 0 2px 12px rgba(0,0,0,0.08);
|
|
||||||
}
|
|
||||||
.card h2 {
|
|
||||||
font-size: 1em;
|
|
||||||
text-transform: uppercase;
|
|
||||||
letter-spacing: 0.06em;
|
|
||||||
color: #718096;
|
|
||||||
margin-bottom: 16px;
|
|
||||||
}
|
|
||||||
.meta {
|
|
||||||
font-size: 0.875em;
|
|
||||||
color: #4a5568;
|
|
||||||
line-height: 1.8;
|
|
||||||
margin-bottom: 20px;
|
|
||||||
}
|
|
||||||
.meta a { color: #2b6cb0; text-decoration: none; }
|
|
||||||
.meta a:hover { text-decoration: underline; }
|
|
||||||
.badge {
|
|
||||||
display: inline-block;
|
|
||||||
background: #ebf8ff;
|
|
||||||
color: #2b6cb0;
|
|
||||||
border-radius: 4px;
|
|
||||||
font-size: 0.8em;
|
|
||||||
font-weight: 600;
|
|
||||||
padding: 2px 8px;
|
|
||||||
margin-left: 6px;
|
|
||||||
vertical-align: middle;
|
|
||||||
}
|
|
||||||
.warning {
|
|
||||||
background: #fffbeb;
|
|
||||||
border-left: 4px solid #f6ad55;
|
|
||||||
border-radius: 4px;
|
|
||||||
padding: 12px 16px;
|
|
||||||
font-size: 0.875em;
|
|
||||||
color: #744210;
|
|
||||||
margin-bottom: 24px;
|
|
||||||
line-height: 1.5;
|
|
||||||
}
|
|
||||||
.warning a { color: #c05621; }
|
|
||||||
.downloads { display: flex; flex-direction: column; gap: 12px; }
|
|
||||||
.btn {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
gap: 12px;
|
|
||||||
padding: 14px 20px;
|
|
||||||
border-radius: 8px;
|
|
||||||
font-size: 0.95em;
|
|
||||||
font-weight: 600;
|
|
||||||
text-decoration: none;
|
|
||||||
transition: transform 0.1s, box-shadow 0.1s;
|
|
||||||
}
|
|
||||||
.btn:hover {
|
|
||||||
transform: translateY(-1px);
|
|
||||||
box-shadow: 0 4px 12px rgba(0,0,0,0.15);
|
|
||||||
}
|
|
||||||
.btn-primary { background: #2b6cb0; color: white; }
|
|
||||||
.btn-secondary { background: #edf2f7; color: #2d3748; }
|
|
||||||
.btn-icon { font-size: 1.3em; }
|
|
||||||
.btn-text small {
|
|
||||||
display: block;
|
|
||||||
font-weight: 400;
|
|
||||||
font-size: 0.8em;
|
|
||||||
opacity: 0.75;
|
|
||||||
margin-top: 1px;
|
|
||||||
}
|
|
||||||
footer {
|
|
||||||
text-align: center;
|
|
||||||
font-size: 0.8em;
|
|
||||||
color: #a0aec0;
|
|
||||||
padding: 32px 0 0;
|
|
||||||
}
|
|
||||||
footer a { color: #718096; text-decoration: none; }
|
|
||||||
</style>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<header>
|
|
||||||
<h1>⚡ QElectroTech</h1>
|
|
||||||
<p>Nightly Windows Builds</p>
|
|
||||||
</header>
|
|
||||||
|
|
||||||
<main>
|
- name: Upload GitHub Pages artifact
|
||||||
<div class="card">
|
uses: actions/upload-pages-artifact@v3
|
||||||
<h2>Build info</h2>
|
with:
|
||||||
<div class="meta">
|
path: gh-pages/
|
||||||
📅 <strong>$DATE</strong><br>
|
|
||||||
🔀 Commit <a href="https://github.com/$REPO/commit/${{ github.sha }}"><code>$SHORT</code></a><br>
|
|
||||||
🔧 <a href="$RUN_URL">CI Run #${{ github.run_number }}</a>
|
|
||||||
<span class="badge">nightly</span>
|
|
||||||
</div>
|
|
||||||
<div class="warning">
|
|
||||||
⚠️ These builds are generated automatically on every commit to <code>master</code>
|
|
||||||
and may be unstable or incomplete.
|
|
||||||
For production use, download a
|
|
||||||
<a href="https://github.com/$REPO/releases">stable release</a>.
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="card">
|
- name: Deploy to GitHub Pages
|
||||||
<h2>🪟 Windows — x86_64</h2>
|
uses: actions/deploy-pages@v4
|
||||||
<div class="downloads">
|
|
||||||
<a class="btn btn-primary" href="$INSTALLER_URL">
|
|
||||||
<span class="btn-icon">⬇</span>
|
|
||||||
<span class="btn-text">
|
|
||||||
Windows Installer
|
|
||||||
<small>.exe — recommended, includes all dependencies</small>
|
|
||||||
</span>
|
|
||||||
</a>
|
|
||||||
<a class="btn btn-secondary" href="https://github.com/$REPO/releases/tag/nightly">
|
|
||||||
<span class="btn-icon">📦</span>
|
|
||||||
<span class="btn-text">
|
|
||||||
All nightly files on GitHub
|
|
||||||
<small>Release page with checksums</small>
|
|
||||||
</span>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</main>
|
|
||||||
|
|
||||||
<footer>
|
|
||||||
Auto-generated by GitHub Actions ·
|
|
||||||
<a href="https://github.com/$REPO">Source on GitHub</a> ·
|
|
||||||
<a href="https://qelectrotech.org">qelectrotech.org</a>
|
|
||||||
</footer>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
HTMLEOF
|
|
||||||
|
|
||||||
- name: Commit and push to gh-pages
|
|
||||||
run: |
|
|
||||||
cd gh-pages
|
|
||||||
git config user.name "github-actions[bot]"
|
|
||||||
git config user.email "github-actions[bot]@users.noreply.github.com"
|
|
||||||
git add index.html
|
|
||||||
git diff --staged --quiet \
|
|
||||||
|| git commit -m "nightly: build #${{ github.run_number }} (${{ github.sha }})"
|
|
||||||
git push origin gh-pages
|
|
||||||
|
|||||||
275
.github/workflows/windows-msi.yml
vendored
Normal file
275
.github/workflows/windows-msi.yml
vendored
Normal file
@@ -0,0 +1,275 @@
|
|||||||
|
name: Windows MSI (WiX v7)
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
inputs:
|
||||||
|
run_id:
|
||||||
|
description: "Run ID of 'Windows Build' (leave empty for the latest successful run)"
|
||||||
|
required: false
|
||||||
|
default: ""
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-msi:
|
||||||
|
name: Build MSI with WiX v7
|
||||||
|
runs-on: windows-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
# ----------------------------------------------------------------
|
||||||
|
# 1. Checkout (to retrieve QElectroTech.wxs and sources)
|
||||||
|
# ----------------------------------------------------------------
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
# ----------------------------------------------------------------
|
||||||
|
# 2. Download the portable artifact from the main build
|
||||||
|
# Requires windows-build.yml to upload an artifact named
|
||||||
|
# "qelectrotech-windows-portable" (fixed name)
|
||||||
|
# ----------------------------------------------------------------
|
||||||
|
- name: Download portable artifact
|
||||||
|
uses: actions/download-artifact@v4
|
||||||
|
with:
|
||||||
|
name: qelectrotech-windows-portable
|
||||||
|
path: artifact\files
|
||||||
|
run-id: ${{ github.event.inputs.run_id || github.run_id }}
|
||||||
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
repository: ${{ github.repository }}
|
||||||
|
|
||||||
|
# ----------------------------------------------------------------
|
||||||
|
# 3. Extract version from sources
|
||||||
|
# ----------------------------------------------------------------
|
||||||
|
- name: Extract version
|
||||||
|
id: version
|
||||||
|
shell: pwsh
|
||||||
|
run: |
|
||||||
|
# Version from qetversion.cpp (same logic as windows-build.yml)
|
||||||
|
$src = Get-Content "sources\qetversion.cpp" -Raw -ErrorAction SilentlyContinue
|
||||||
|
if ($src -match 'return QVersionNumber\{([^}]+)\}') {
|
||||||
|
$ver = $Matches[1] -replace '\s','' -replace ',','.'
|
||||||
|
} else {
|
||||||
|
# Fallback: CMakeLists.txt
|
||||||
|
$cmake = Get-Content "CMakeLists.txt" -Raw
|
||||||
|
if ($cmake -match 'project\s*\([^)]*VERSION\s+([\d]+\.[\d]+\.[\d]+)') {
|
||||||
|
$ver = $Matches[1]
|
||||||
|
} else {
|
||||||
|
$ver = "0.0.0"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
# Numeric MSI version: 4 digits required (e.g. 0.100.1.0)
|
||||||
|
$verMsi = "$ver.0"
|
||||||
|
|
||||||
|
# Short SHA for the display version
|
||||||
|
$sha = git rev-parse --short HEAD 2>$null
|
||||||
|
if (-not $sha) { $sha = "unknown" }
|
||||||
|
|
||||||
|
# Cumulative revision number (same calculation as windows-build.yml)
|
||||||
|
$count = git rev-list HEAD --count 2>$null
|
||||||
|
$rev = [int]$count + 473
|
||||||
|
|
||||||
|
$verDisplay = "${ver}-r${rev}-${sha}_x86_64-win64"
|
||||||
|
|
||||||
|
echo "VERSION_MSI=$verMsi" >> $env:GITHUB_OUTPUT
|
||||||
|
echo "VERSION_DISPLAY=$verDisplay" >> $env:GITHUB_OUTPUT
|
||||||
|
Write-Host "Version MSI : $verMsi"
|
||||||
|
Write-Host "Version display : $verDisplay"
|
||||||
|
|
||||||
|
# ----------------------------------------------------------------
|
||||||
|
# 4. Install WiX v7, accept EULA and install WixUI extension
|
||||||
|
# All done in one step: PATH is updated within the same step
|
||||||
|
# so wix is immediately available for eula and extension commands
|
||||||
|
# ----------------------------------------------------------------
|
||||||
|
- name: Install WiX v7
|
||||||
|
shell: pwsh
|
||||||
|
run: |
|
||||||
|
dotnet tool install --global wix --version 7.0.0
|
||||||
|
# Update PATH immediately for the rest of this step
|
||||||
|
$toolsPath = [System.IO.Path]::Combine($env:USERPROFILE, '.dotnet', 'tools')
|
||||||
|
$env:PATH = "$toolsPath;$env:PATH"
|
||||||
|
# Also export for subsequent steps
|
||||||
|
echo $toolsPath >> $env:GITHUB_PATH
|
||||||
|
# Accept OSMF EULA (official CI/CD method: writes a sentinel file)
|
||||||
|
wix eula accept wix7
|
||||||
|
# Install WixUI extension
|
||||||
|
wix extension add WixToolset.UI.wixext/7.0.0
|
||||||
|
Write-Host "WiX v7 installed, EULA accepted, UI extension added."
|
||||||
|
|
||||||
|
# ----------------------------------------------------------------
|
||||||
|
# 5. Check that the WXS file exists in the repository
|
||||||
|
# ----------------------------------------------------------------
|
||||||
|
- name: Check WXS file
|
||||||
|
shell: pwsh
|
||||||
|
run: |
|
||||||
|
$wxs = "build-aux\windows\QElectroTech.wxs"
|
||||||
|
if (-not (Test-Path $wxs)) {
|
||||||
|
Write-Error "WXS file not found: $wxs"
|
||||||
|
Write-Host "Contents of build-aux\windows\ :"
|
||||||
|
Get-ChildItem "build-aux\windows\" -ErrorAction SilentlyContinue
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
Write-Host "WXS found: $wxs"
|
||||||
|
|
||||||
|
# ----------------------------------------------------------------
|
||||||
|
# 6. Check the artifact structure and locate files/
|
||||||
|
# ----------------------------------------------------------------
|
||||||
|
- name: Check artifact structure
|
||||||
|
shell: pwsh
|
||||||
|
run: |
|
||||||
|
Write-Host "=== Contents of artifact\files (2 levels) ==="
|
||||||
|
Get-ChildItem -Path "artifact\files" -Depth 2 |
|
||||||
|
Select-Object FullName | Format-Table -AutoSize
|
||||||
|
|
||||||
|
# Search for qelectrotech.exe in the artifact
|
||||||
|
$exe = Get-ChildItem -Path "artifact\files" -Filter "qelectrotech.exe" -Recurse | Select-Object -First 1
|
||||||
|
if (-not $exe) {
|
||||||
|
Write-Error "qelectrotech.exe not found in artifact"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
Write-Host "Executable: $($exe.FullName) ($([math]::Round($exe.Length/1MB,1)) MB)"
|
||||||
|
|
||||||
|
# FilesDir = folder containing bin\
|
||||||
|
$binDir = $exe.Directory.FullName
|
||||||
|
$filesDir = Split-Path $binDir -Parent
|
||||||
|
|
||||||
|
echo "FILES_DIR=$filesDir" >> $env:GITHUB_ENV
|
||||||
|
Write-Host "FILES_DIR: $filesDir"
|
||||||
|
|
||||||
|
# ----------------------------------------------------------------
|
||||||
|
# 7. Convert LICENSE (GPL-2) to RTF for the WixUI licence screen
|
||||||
|
# RTF is the only format accepted by Windows Installer.
|
||||||
|
# The conversion wraps plain text lines in basic RTF markup.
|
||||||
|
# ----------------------------------------------------------------
|
||||||
|
- name: Convert LICENSE to RTF
|
||||||
|
shell: pwsh
|
||||||
|
run: |
|
||||||
|
$licSrc = "LICENSE"
|
||||||
|
$licRtf = "$env:TEMP\License.rtf"
|
||||||
|
|
||||||
|
if (-not (Test-Path $licSrc)) {
|
||||||
|
Write-Error "LICENSE file not found in repository root"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
$lines = Get-Content $licSrc -Encoding UTF8
|
||||||
|
|
||||||
|
# RTF header — Courier New, 9pt, black
|
||||||
|
$rtf = New-Object System.Text.StringBuilder
|
||||||
|
[void]$rtf.AppendLine('{\rtf1\ansi\ansicpg1252\deff0')
|
||||||
|
[void]$rtf.AppendLine('{\fonttbl{\f0\fmodern\fprq1\fcharset0 Courier New;}}')
|
||||||
|
[void]$rtf.AppendLine('{\colortbl;\red0\green0\blue0;}')
|
||||||
|
[void]$rtf.AppendLine('\f0\fs18\cf1')
|
||||||
|
|
||||||
|
foreach ($line in $lines) {
|
||||||
|
# Escape RTF special characters
|
||||||
|
$escaped = $line `
|
||||||
|
-replace '\\', '\\\\' `
|
||||||
|
-replace '\{', '\{' `
|
||||||
|
-replace '\}', '\}'
|
||||||
|
[void]$rtf.AppendLine("$escaped\par")
|
||||||
|
}
|
||||||
|
|
||||||
|
[void]$rtf.AppendLine('}')
|
||||||
|
|
||||||
|
[System.IO.File]::WriteAllText($licRtf, $rtf.ToString(), [System.Text.Encoding]::ASCII)
|
||||||
|
echo "LICENSE_RTF=$licRtf" >> $env:GITHUB_ENV
|
||||||
|
Write-Host "License.rtf generated: $licRtf ($([math]::Round((Get-Item $licRtf).Length/1KB,1)) KB)"
|
||||||
|
|
||||||
|
# ----------------------------------------------------------------
|
||||||
|
# 8. Replace Lancer QET.bat with the MSI-specific version
|
||||||
|
# The portable version uses relative paths suited for the zip.
|
||||||
|
# The MSI version uses %~dp0 to resolve paths relative to
|
||||||
|
# the installation directory in Program Files.
|
||||||
|
# ----------------------------------------------------------------
|
||||||
|
- name: Replace Lancer QET.bat for MSI
|
||||||
|
shell: pwsh
|
||||||
|
run: |
|
||||||
|
$bat = "$env:FILES_DIR\Lancer QET.bat"
|
||||||
|
$content = "@echo off`r`nstart `"`" `"%~dp0bin\qelectrotech.exe`" --common-elements-dir=`"%~dp0elements/`" --common-tbt-dir=`"%~dp0titleblocks/`" --lang-dir=`"%~dp0lang/`" -style windowsvista`r`n"
|
||||||
|
[System.IO.File]::WriteAllText($bat, $content, [System.Text.Encoding]::ASCII)
|
||||||
|
Write-Host "Lancer QET.bat replaced for MSI installation."
|
||||||
|
Write-Host "=== Content of new Lancer QET.bat ==="
|
||||||
|
Get-Content $bat
|
||||||
|
|
||||||
|
# ----------------------------------------------------------------
|
||||||
|
# 9. Build the MSI
|
||||||
|
# ----------------------------------------------------------------
|
||||||
|
- name: Build MSI
|
||||||
|
shell: pwsh
|
||||||
|
run: |
|
||||||
|
$version = "${{ steps.version.outputs.VERSION_MSI }}"
|
||||||
|
$verDisplay = "${{ steps.version.outputs.VERSION_DISPLAY }}"
|
||||||
|
$filesDir = $env:FILES_DIR
|
||||||
|
$licRtf = $env:LICENSE_RTF
|
||||||
|
$wxs = "build-aux\windows\QElectroTech.wxs"
|
||||||
|
$outputName = "QElectroTech-${verDisplay}.msi"
|
||||||
|
|
||||||
|
New-Item -ItemType Directory -Force -Path "dist" | Out-Null
|
||||||
|
|
||||||
|
Write-Host "=== wix build ==="
|
||||||
|
Write-Host " WXS : $wxs"
|
||||||
|
Write-Host " Version : $version"
|
||||||
|
Write-Host " FilesDir : $filesDir"
|
||||||
|
Write-Host " LicenseRtf : $licRtf"
|
||||||
|
Write-Host " Output : dist\$outputName"
|
||||||
|
|
||||||
|
wix build $wxs `
|
||||||
|
-arch x64 `
|
||||||
|
-d "Version=$version" `
|
||||||
|
-d "ProductVersion=$verDisplay" `
|
||||||
|
-d "FilesDir=$filesDir" `
|
||||||
|
-d "LicenseRtf=$licRtf" `
|
||||||
|
-ext WixToolset.UI.wixext `
|
||||||
|
-o "dist\$outputName"
|
||||||
|
|
||||||
|
if (-not (Test-Path "dist\$outputName")) {
|
||||||
|
Write-Error "MSI not generated: dist\$outputName"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
$size = [math]::Round((Get-Item "dist\$outputName").Length / 1MB, 1)
|
||||||
|
Write-Host "MSI generated: dist\$outputName ($size MB) ✓"
|
||||||
|
echo "MSI_NAME=$outputName" >> $env:GITHUB_ENV
|
||||||
|
|
||||||
|
# ----------------------------------------------------------------
|
||||||
|
# 10. Upload the MSI artifact
|
||||||
|
# ----------------------------------------------------------------
|
||||||
|
- name: Upload MSI artifact
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: qelectrotech-windows-msi
|
||||||
|
path: dist\*.msi
|
||||||
|
retention-days: 14
|
||||||
|
if-no-files-found: error
|
||||||
|
|
||||||
|
# ----------------------------------------------------------------
|
||||||
|
# 11. Upload MSI to nightly release
|
||||||
|
# The nightly release is created/updated by windows-build.yml.
|
||||||
|
# The MSI is added here so the GitHub Pages can link to it.
|
||||||
|
# ----------------------------------------------------------------
|
||||||
|
- name: Upload MSI to nightly release
|
||||||
|
uses: softprops/action-gh-release@v2
|
||||||
|
with:
|
||||||
|
tag_name: nightly
|
||||||
|
files: dist/*.msi
|
||||||
|
fail_on_unmatched_files: true
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
# ----------------------------------------------------------------
|
||||||
|
# 12. Summary
|
||||||
|
# ----------------------------------------------------------------
|
||||||
|
- name: Summary
|
||||||
|
if: always()
|
||||||
|
shell: pwsh
|
||||||
|
run: |
|
||||||
|
Write-Host "=== MSI build summary ==="
|
||||||
|
Write-Host "Version : ${{ steps.version.outputs.VERSION_DISPLAY }}"
|
||||||
|
Write-Host "WiX : v7.0.0"
|
||||||
|
Write-Host "Runner image : ${{ runner.os }} / ${{ runner.arch }}"
|
||||||
|
if (Test-Path "dist\$env:MSI_NAME") {
|
||||||
|
$size = [math]::Round((Get-Item "dist\$env:MSI_NAME").Length / 1MB, 1)
|
||||||
|
Write-Host "MSI : $env:MSI_NAME ($size MB) ✓"
|
||||||
|
} else {
|
||||||
|
Write-Host "MSI : FAILED ✗"
|
||||||
|
}
|
||||||
112
build-aux/generate-page.py
Normal file
112
build-aux/generate-page.py
Normal file
@@ -0,0 +1,112 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
"""
|
||||||
|
generate-page.py — Generates gh-pages/index.html for QElectroTech nightly builds.
|
||||||
|
Called from windows-build.yml deploy-pages job.
|
||||||
|
Environment variables required:
|
||||||
|
DATE, SHORT, REPO, SHA, RUN_URL, RUN_NUMBER,
|
||||||
|
INSTALLER_URL, PORTABLE_URL, MSI_URL (optional)
|
||||||
|
"""
|
||||||
|
import os
|
||||||
|
|
||||||
|
date = os.environ.get("DATE", "")
|
||||||
|
short = os.environ.get("SHORT", "")
|
||||||
|
repo = os.environ.get("REPO", "")
|
||||||
|
sha = os.environ.get("SHA", "")
|
||||||
|
run_url = os.environ.get("RUN_URL", "")
|
||||||
|
run_number = os.environ.get("RUN_NUMBER", "")
|
||||||
|
installer_url = os.environ.get("INSTALLER_URL", "")
|
||||||
|
portable_url = os.environ.get("PORTABLE_URL", "")
|
||||||
|
msi_url = os.environ.get("MSI_URL", "")
|
||||||
|
|
||||||
|
msi_block = ""
|
||||||
|
if msi_url:
|
||||||
|
msi_block = f"""
|
||||||
|
<a class="btn btn-msi" href="{msi_url}">
|
||||||
|
<span class="btn-icon">⬇</span>
|
||||||
|
<span class="btn-text">Windows Installer .msi<small>.msi — for enterprise / GPO deployment</small></span>
|
||||||
|
</a>"""
|
||||||
|
|
||||||
|
html = f"""<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<title>QElectroTech – Nightly Builds</title>
|
||||||
|
<style>
|
||||||
|
*,*::before,*::after{{box-sizing:border-box;margin:0;padding:0}}
|
||||||
|
body{{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif;background:#f0f4f8;color:#2d3748;min-height:100vh}}
|
||||||
|
header{{background:linear-gradient(135deg,#1a365d 0%,#2b6cb0 100%);color:white;padding:48px 24px 40px;text-align:center}}
|
||||||
|
header h1{{font-size:2.2em;letter-spacing:-0.5px;margin-bottom:8px}}
|
||||||
|
header p{{opacity:.8;font-size:1.05em}}
|
||||||
|
main{{max-width:680px;margin:40px auto;padding:0 20px 60px}}
|
||||||
|
.card{{background:white;border-radius:12px;padding:28px;margin-bottom:24px;box-shadow:0 2px 12px rgba(0,0,0,.08)}}
|
||||||
|
.card h2{{font-size:1em;text-transform:uppercase;letter-spacing:.06em;color:#718096;margin-bottom:16px}}
|
||||||
|
.meta{{font-size:.875em;color:#4a5568;line-height:1.8;margin-bottom:20px}}
|
||||||
|
.meta a{{color:#2b6cb0;text-decoration:none}}
|
||||||
|
.meta a:hover{{text-decoration:underline}}
|
||||||
|
.badge{{display:inline-block;background:#ebf8ff;color:#2b6cb0;border-radius:4px;font-size:.8em;font-weight:600;padding:2px 8px;margin-left:6px;vertical-align:middle}}
|
||||||
|
.warning{{background:#fffbeb;border-left:4px solid #f6ad55;border-radius:4px;padding:12px 16px;font-size:.875em;color:#744210;margin-bottom:24px;line-height:1.5}}
|
||||||
|
.warning a{{color:#c05621}}
|
||||||
|
.downloads{{display:flex;flex-direction:column;gap:12px}}
|
||||||
|
.btn{{display:flex;align-items:center;gap:12px;padding:14px 20px;border-radius:8px;font-size:.95em;font-weight:600;text-decoration:none;transition:transform .1s,box-shadow .1s}}
|
||||||
|
.btn:hover{{transform:translateY(-1px);box-shadow:0 4px 12px rgba(0,0,0,.15)}}
|
||||||
|
.btn-primary{{background:#2b6cb0;color:white}}
|
||||||
|
.btn-msi{{background:#6b46c1;color:white}}
|
||||||
|
.btn-secondary{{background:#edf2f7;color:#2d3748}}
|
||||||
|
.btn-icon{{font-size:1.3em}}
|
||||||
|
.btn-text small{{display:block;font-weight:400;font-size:.8em;opacity:.75;margin-top:1px}}
|
||||||
|
footer{{text-align:center;font-size:.8em;color:#a0aec0;padding:32px 0 0}}
|
||||||
|
footer a{{color:#718096;text-decoration:none}}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<header>
|
||||||
|
<h1>⚡ QElectroTech</h1>
|
||||||
|
<p>Nightly Windows Builds</p>
|
||||||
|
</header>
|
||||||
|
<main>
|
||||||
|
<div class="card">
|
||||||
|
<h2>Build info</h2>
|
||||||
|
<div class="meta">
|
||||||
|
📅 <strong>{date}</strong><br>
|
||||||
|
🔀 Commit <a href="https://github.com/{repo}/commit/{sha}"><code>{short}</code></a><br>
|
||||||
|
🔧 <a href="{run_url}">CI Run #{run_number}</a>
|
||||||
|
<span class="badge">nightly</span>
|
||||||
|
</div>
|
||||||
|
<div class="warning">
|
||||||
|
⚠️ This is a development version; it introduces new features you want,
|
||||||
|
but may cause bugs that have not yet been identified yet in <code>master</code>.
|
||||||
|
For production use, download a <a href="https://github.com/{repo}/releases">stable release</a>.
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="card">
|
||||||
|
<h2>🏹 Windows — x86_64</h2>
|
||||||
|
<div class="downloads">
|
||||||
|
<a class="btn btn-primary" href="{installer_url}">
|
||||||
|
<span class="btn-icon">⬇</span>
|
||||||
|
<span class="btn-text">Windows Installer<small>.exe — recommended, includes all dependencies</small></span>
|
||||||
|
</a>
|
||||||
|
{msi_block}
|
||||||
|
<a class="btn btn-secondary" href="{portable_url}">
|
||||||
|
<span class="btn-icon">📦</span>
|
||||||
|
<span class="btn-text">Windows Portable<small>.zip — no installation required, extract and run "Lancer QET.bat"</small></span>
|
||||||
|
</a>
|
||||||
|
<a class="btn btn-secondary" href="https://github.com/{repo}/releases/tag/nightly">
|
||||||
|
<span class="btn-icon">📦</span>
|
||||||
|
<span class="btn-text">All nightly files on GitHub<small>Release page with checksums</small></span>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</main>
|
||||||
|
<footer>
|
||||||
|
Auto-generated by GitHub Actions ·
|
||||||
|
<a href="https://github.com/{repo}">Source on GitHub</a> ·
|
||||||
|
<a href="https://qelectrotech.org">qelectrotech.org</a>
|
||||||
|
</footer>
|
||||||
|
</body>
|
||||||
|
</html>"""
|
||||||
|
|
||||||
|
os.makedirs("gh-pages", exist_ok=True)
|
||||||
|
with open("gh-pages/index.html", "w", encoding="utf-8") as f:
|
||||||
|
f.write(html)
|
||||||
|
print("index.html written OK")
|
||||||
118
build-aux/windows/QElectroTech.wxs
Normal file
118
build-aux/windows/QElectroTech.wxs
Normal file
@@ -0,0 +1,118 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!--
|
||||||
|
QElectroTech.wxs - WiX v7 installer definition
|
||||||
|
Generates a self-contained x64 MSI for QElectroTech (MSYS2/UCRT64 build).
|
||||||
|
|
||||||
|
Variables passed from the wix build command line:
|
||||||
|
-d FilesDir=<absolute path to artifact\files>
|
||||||
|
-d Version=<numeric version e.g. 0.100.1.0>
|
||||||
|
-d ProductVersion=<display version e.g. 0.100.1-r8770-abc1234_x86_64-win64>
|
||||||
|
-d LicenseRtf=<absolute path to License.rtf>
|
||||||
|
-->
|
||||||
|
<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs"
|
||||||
|
xmlns:ui="http://wixtoolset.org/schemas/v4/wxs/ui">
|
||||||
|
|
||||||
|
<Package
|
||||||
|
Name="QElectroTech"
|
||||||
|
Manufacturer="QElectroTech Team"
|
||||||
|
Version="$(var.Version)"
|
||||||
|
UpgradeCode="A1B2C3D4-E5F6-7890-ABCD-EF1234567890"
|
||||||
|
Language="1033"
|
||||||
|
Codepage="1252"
|
||||||
|
InstallerVersion="500"
|
||||||
|
Scope="perMachine">
|
||||||
|
|
||||||
|
<!-- Embed all cabinet files inside the MSI (self-contained installer) -->
|
||||||
|
<MediaTemplate EmbedCab="yes" CompressionLevel="high" />
|
||||||
|
|
||||||
|
<!-- In-place upgrade: automatically uninstalls the previous version -->
|
||||||
|
<MajorUpgrade
|
||||||
|
DowngradeErrorMessage="A newer version of QElectroTech is already installed."
|
||||||
|
Schedule="afterInstallInitialize" />
|
||||||
|
|
||||||
|
<!-- Installation directory -->
|
||||||
|
<StandardDirectory Id="ProgramFiles64Folder">
|
||||||
|
<Directory Id="INSTALLDIR" Name="QElectroTech" />
|
||||||
|
</StandardDirectory>
|
||||||
|
|
||||||
|
<!-- ============================================================
|
||||||
|
All application files harvested in one pass from files\**
|
||||||
|
============================================================ -->
|
||||||
|
<ComponentGroup Id="CG_AllFiles" Directory="INSTALLDIR">
|
||||||
|
<Files Include="$(var.FilesDir)\**" />
|
||||||
|
</ComponentGroup>
|
||||||
|
|
||||||
|
<!-- ============================================================
|
||||||
|
Desktop + Start Menu shortcuts
|
||||||
|
============================================================ -->
|
||||||
|
<ComponentGroup Id="CG_Shortcuts" Directory="INSTALLDIR">
|
||||||
|
<Component Id="C_ShortcutDesktop" Guid="F1A2B3C4-D5E6-7890-5678-012345678901">
|
||||||
|
<Shortcut Id="DesktopShortcut"
|
||||||
|
Directory="DesktopFolder"
|
||||||
|
Name="QElectroTech"
|
||||||
|
Target="[INSTALLDIR]Lancer QET.bat"
|
||||||
|
Icon="qet.ico"
|
||||||
|
WorkingDirectory="INSTALLDIR" />
|
||||||
|
<RegistryValue Root="HKCU"
|
||||||
|
Key="Software\QElectroTech"
|
||||||
|
Name="DesktopShortcut"
|
||||||
|
Type="integer" Value="1"
|
||||||
|
KeyPath="yes" />
|
||||||
|
</Component>
|
||||||
|
<Component Id="C_ShortcutStartMenu" Guid="A2B3C4D5-E6F7-8901-6789-123456789012">
|
||||||
|
<Shortcut Id="StartMenuShortcut"
|
||||||
|
Directory="ProgramMenuFolder"
|
||||||
|
Name="QElectroTech"
|
||||||
|
Target="[INSTALLDIR]Lancer QET.bat"
|
||||||
|
Icon="qet.ico"
|
||||||
|
WorkingDirectory="INSTALLDIR" />
|
||||||
|
<RegistryValue Root="HKCU"
|
||||||
|
Key="Software\QElectroTech"
|
||||||
|
Name="StartMenuShortcut"
|
||||||
|
Type="integer" Value="1"
|
||||||
|
KeyPath="yes" />
|
||||||
|
</Component>
|
||||||
|
</ComponentGroup>
|
||||||
|
|
||||||
|
<!-- ============================================================
|
||||||
|
.qet file association
|
||||||
|
============================================================ -->
|
||||||
|
<ComponentGroup Id="CG_FileAssoc" Directory="INSTALLDIR">
|
||||||
|
<Component Id="C_FileAssoc" Guid="B3C4D5E6-F7A8-9012-7890-234567890123">
|
||||||
|
<RegistryValue Root="HKCR" Key=".qet" Type="string" Value="QElectroTech.Document" KeyPath="yes" />
|
||||||
|
<RegistryValue Root="HKCR" Key="QElectroTech.Document" Type="string" Value="QElectroTech Project" />
|
||||||
|
<RegistryValue Root="HKCR" Key="QElectroTech.Document\DefaultIcon" Type="string"
|
||||||
|
Value="[INSTALLDIR]ico\qelectrotech.ico" />
|
||||||
|
<RegistryValue Root="HKCR" Key="QElectroTech.Document\shell\open\command" Type="string"
|
||||||
|
Value=""[INSTALLDIR]bin\qelectrotech.exe" "%1"" />
|
||||||
|
</Component>
|
||||||
|
</ComponentGroup>
|
||||||
|
|
||||||
|
<!-- ============================================================
|
||||||
|
Icon for shortcuts
|
||||||
|
============================================================ -->
|
||||||
|
<Icon Id="qet.ico" SourceFile="$(var.FilesDir)\ico\qelectrotech.ico" />
|
||||||
|
|
||||||
|
<!-- ============================================================
|
||||||
|
Main feature (everything included)
|
||||||
|
============================================================ -->
|
||||||
|
<Feature Id="ProductFeature" Title="QElectroTech" Level="1">
|
||||||
|
<ComponentGroupRef Id="CG_AllFiles" />
|
||||||
|
<ComponentGroupRef Id="CG_Shortcuts" />
|
||||||
|
<ComponentGroupRef Id="CG_FileAssoc" />
|
||||||
|
</Feature>
|
||||||
|
|
||||||
|
<!-- WixUI_Minimal with QElectroTech GPL-2 license -->
|
||||||
|
<ui:WixUI Id="WixUI_Minimal" />
|
||||||
|
|
||||||
|
<!-- WixVariable without ui: namespace, at Package level -->
|
||||||
|
<WixVariable Id="WixUILicenseRtf" Value="$(var.LicenseRtf)" />
|
||||||
|
|
||||||
|
<!-- Properties shown in Programs and Features -->
|
||||||
|
<Property Id="ARPPRODUCTICON" Value="qet.ico" />
|
||||||
|
<Property Id="ARPHELPLINK" Value="https://qelectrotech.org" />
|
||||||
|
<Property Id="ARPURLINFOABOUT" Value="https://qelectrotech.org" />
|
||||||
|
<Property Id="ARPCOMMENTS" Value="Free electrical schematic editor" />
|
||||||
|
|
||||||
|
</Package>
|
||||||
|
</Wix>
|
||||||
2
elements
2
elements
Submodule elements updated: 73c0dfb4bf...d4b76b45c2
@@ -310,7 +310,8 @@ echo
|
|||||||
echo "______________________________________________________________"
|
echo "______________________________________________________________"
|
||||||
echo "Re Create zip tarball:"
|
echo "Re Create zip tarball:"
|
||||||
|
|
||||||
/usr/bin/ditto -c -k --sequesterRsrc --keepParent $BUNDLE "build-aux/mac-osx/${APPNAME}-$VERSION-r$HEAD-arm64.zip"
|
#/usr/bin/ditto -c -k --sequesterRsrc --keepParent $BUNDLE "build-aux/mac-osx/${APPNAME}-$VERSION-r$HEAD-arm64.zip"
|
||||||
|
cd "$(dirname $BUNDLE)" && zip -r --symlinks "build-aux/mac-osx/${APPNAME}-$VERSION-r$HEAD-arm64.zip" "$BUNDLE" && cd -
|
||||||
|
|
||||||
|
|
||||||
# Clean up disk folder
|
# Clean up disk folder
|
||||||
|
|||||||
Reference in New Issue
Block a user