v0.17.0 — Doc tool auto-deploy + revert (mirror of Report)

Adds the same deploy + backup/revert mechanism as Report, but for the
local Documentation web tool :
  PROSERVE-source/_doc/  →  C:\xampp\htdocs\ProserveDoc\
  http://localhost/ProserveDoc/

Default DocumentationUrl in the launcher set to http://localhost/ProserveDoc/
so the Documentation sidebar tab works out of the box on a fresh install
without any manual config.

Implementation
- LocalConfig.DocToolConfig (HtdocsRoot/FolderName/AutoDeploy/MaxBackups,
  defaults to ProserveDoc folder, 3 backups kept).
- IDocToolDeployer + DocToolDeployer : near-duplicate of the Report
  deployer with SourceSubdir = "_doc". Reuses ReportTool's BackupInfo /
  DeployStatus / DeployResult / DeployProgress types so we don't fork
  the data model.
- MainViewModel : new install step 7 right after the Report deploy step,
  mirrors its progress reporting + error dialogs (silent on
  XamppNotFound since the Report step already warned for the same root).
- SettingsViewModel : DocBackupViewModel + Doc properties + RedeployDoc
  + Revert commands. Loads the doc backups list in background like
  the Report ones.
- SettingsDialog.xaml : new « OUTIL DOCUMENTATION » card under the
  « OUTIL REPORT » one in Avancés, with the same fields and backup table.
- Strings.cs : doc-specific status / progress / error labels in 5 langs ;
  reuses some labels from Report where the wording is identical.

Versions bumped to 0.17.0.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-03 11:18:13 +02:00
parent c50abeb8d0
commit e608a5d29d
11 changed files with 604 additions and 11 deletions

View File

@@ -36,12 +36,11 @@ public sealed class LocalConfig
public string ReportUrl { get; set; } = "http://localhost/ProserveReport/";
/// <summary>
/// URL de la documentation locale (onglet "Documentation"). Vide par défaut :
/// l'utilisateur peut pointer vers une URL locale ou web. Si vide, l'onglet
/// affiche un placeholder avec les liens vers les fichiers .pptx du dossier
/// d'install du launcher.
/// URL de la documentation locale (onglet "Documentation"). Pointe par défaut
/// vers l'install standard ASTERION dans XAMPP. Surchargeable dans Settings →
/// Avancés. Si vide, l'onglet affiche un placeholder.
/// </summary>
public string DocumentationUrl { get; set; } = string.Empty;
public string DocumentationUrl { get; set; } = "http://localhost/ProserveDoc/";
public LicenseConfig License { get; set; } = new();
@@ -53,6 +52,14 @@ public sealed class LocalConfig
/// </summary>
public ReportToolConfig ReportTool { get; set; } = new();
/// <summary>
/// Configuration du déploiement de l'outil Documentation (page web locale
/// embarquée dans l'onglet "Documentation"). Même mécanisme que ReportTool :
/// copie de <c>_doc/</c> bundled dans le ZIP PROSERVE vers
/// <c>{HtdocsRoot}\{FolderName}</c> avec backups horodatés et revert.
/// </summary>
public DocToolConfig DocTool { get; set; } = new();
/// <summary>
/// Connexion à la base MySQL locale (XAMPP) utilisée par PROSERVE pour ses
/// statistiques. Le launcher s'en sert pour appliquer les migrations bundled
@@ -118,6 +125,19 @@ public sealed class ReportToolConfig
public int MaxBackups { get; set; } = 3;
}
/// <summary>
/// Mêmes paramètres que <see cref="ReportToolConfig"/> mais pour la
/// documentation locale (sous-dossier <c>_doc/</c> du ZIP, déployé vers
/// <c>{HtdocsRoot}\ProserveDoc</c> par défaut).
/// </summary>
public sealed class DocToolConfig
{
public string HtdocsRoot { get; set; } = @"C:\xampp\htdocs";
public string FolderName { get; set; } = "ProserveDoc";
public bool AutoDeploy { get; set; } = true;
public int MaxBackups { get; set; } = 3;
}
public sealed class LicenseConfig
{
public string? EncryptedKey { get; set; }