4 pages de détail avec courbe (Canvas), navigation depuis home.qml, sélecteurs de variable pour circuits/batteries
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
@echo off
|
||||
powershell -ExecutionPolicy Bypass -File "%~dp0deploy_wasm.ps1"
|
||||
|
||||
+31
-7
@@ -11,12 +11,10 @@
|
||||
# ============================================================================
|
||||
|
||||
param(
|
||||
[string]$BuildDir = "O:\Technique\Projets_Qt\koriolan\shipheart_wasm\build\WebAssembly_Qt_6_8_3_Release",
|
||||
[string]$AssetsDir = "O:\Technique\Projets_Qt\koriolan\shipheart_wasm\deploy", # manifest.json, icônes, sw.js "modèle" (CACHE_NAME sans version)
|
||||
[string]$CM5Host = "192.168.1.220",
|
||||
[int]$CM5Port = 2022,
|
||||
[string]$CM5User = "koriolan",
|
||||
[string]$CM5Path = "/var/www/shipheart-poc-wasm/"
|
||||
[string]$BuildDir = "C:\Users\pierr\KORIOLAN\Koriolan - Documents\Technique\Projets_Qt\koriolan\shipheart_wasm\build\WebAssembly_Qt_6_8_3_Release",
|
||||
[string]$AssetsDir = "C:\Users\pierr\KORIOLAN\Koriolan - Documents\Technique\Projets_Qt\koriolan\shipheart_wasm\deploy",
|
||||
[string]$CM5Alias = "cm5", # alias défini dans %USERPROFILE%\.ssh\config
|
||||
[string]$CM5Path = "/var/www/shipheart-wasm/"
|
||||
)
|
||||
|
||||
$ErrorActionPreference = "Stop"
|
||||
@@ -44,6 +42,32 @@ if ('serviceWorker' in navigator) {
|
||||
"@
|
||||
Set-Content "$BuildDir\index.html" $html -NoNewline
|
||||
|
||||
# --- 2bis. Remplacer l'écran de chargement Qt par défaut (logo Qt + texte
|
||||
# technique "Qt for WebAssembly: ...") par un écran plus sobre, réutilisant
|
||||
# l'icône de l'app déjà déployée. Fait ici plutôt que via une configuration
|
||||
# CMake dédiée : plusieurs retours d'expérience Qt confirment que Qt Creator
|
||||
# régénère de toute façon le HTML par défaut au build, quelle que soit la
|
||||
# tentative de template personnalisé côté CMake - rester sur ce mécanisme de
|
||||
# post-traitement, déjà fiable pour le manifest/service-worker, est plus sûr.
|
||||
$html = Get-Content "$BuildDir\index.html" -Raw
|
||||
$ancienSpinner = '(?s)<figure[^>]*id="qtspinner">.*?</figure>'
|
||||
$nouveauSpinner = @"
|
||||
<figure style="overflow:visible;" id="qtspinner">
|
||||
<center style="margin-top:1.5em; line-height:150%; font-family: sans-serif; color: rgb(0 118 154);">
|
||||
<img src="icon-512.png" style="display:block; margin:0 auto; max-width:55vw; max-height:55vh; width:auto; height:auto;">
|
||||
<p style="margin-bottom: 5%;">
|
||||
<strong>ShipHeart™</strong>
|
||||
<br />
|
||||
by Koriolan
|
||||
</p>
|
||||
<div id="qtstatus"></div>
|
||||
<noscript>JavaScript is disabled. Please enable JavaScript to use this application.</noscript>
|
||||
</center>
|
||||
</figure>
|
||||
"@
|
||||
$html = $html -replace $ancienSpinner, $nouveauSpinner
|
||||
Set-Content "$BuildDir\index.html" $html -NoNewline
|
||||
|
||||
# --- 3. Versionner sw.js (change le CACHE_NAME à chaque déploiement) ---
|
||||
# Le fichier "modèle" (CACHE_NAME générique) vit dans $AssetsDir, sous
|
||||
# contrôle de version - on ne le modifie jamais sur place, on écrit la
|
||||
@@ -60,7 +84,7 @@ Copy-Item "$AssetsDir\icon-512.png" "$BuildDir\icon-512.png" -Force
|
||||
|
||||
$fichiers = "index.html","qtloader.js","qtlogo.svg","shipheart_wasm.js","shipheart_wasm.wasm","shipheart_wasm.worker.js","sw.js","manifest.json","icon-192.png","icon-512.png"
|
||||
foreach ($f in $fichiers) {
|
||||
scp -P $CM5Port "$BuildDir\$f" "${CM5User}@${CM5Host}:${CM5Path}"
|
||||
scp "$BuildDir\$f" "${CM5Alias}:${CM5Path}"
|
||||
}
|
||||
|
||||
Write-Host "Déploiement terminé - version $version"
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 7.6 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 7.4 KiB After Width: | Height: | Size: 23 KiB |
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "ShipHeart (POC WASM)",
|
||||
"short_name": "ShipHeart POC",
|
||||
"description": "POC d'accès à ShipHeart via WebAssembly - jusqu'à home_accueil.qml",
|
||||
"name": "ShipHeart",
|
||||
"short_name": "ShipHeart",
|
||||
"description": "Accès à distance à ShipHeart",
|
||||
"start_url": "./index.html",
|
||||
"display": "fullscreen",
|
||||
"orientation": "landscape",
|
||||
|
||||
Reference in New Issue
Block a user