installer: corrections wizard C# (System.Management, AppContext.BaseDirectory), fix script Inno Setup GetDiskFreeSpaceEx, ajout SUIVI_INSTALLER

This commit is contained in:
EduBox Dev
2026-06-28 22:52:45 +00:00
parent 0f07a2d2a3
commit 3c519629d2
6 changed files with 128 additions and 9 deletions
+4 -4
View File
@@ -412,9 +412,9 @@ public partial class MainForm : Form
try
{
var msiPath = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) ?? ".", "Resources", "podman-setup.msi");
var msiPath = Path.Combine(AppContext.BaseDirectory, "Resources", "podman-installer-windows-amd64.msi");
if (!File.Exists(msiPath))
throw new FileNotFoundException("Le fichier podman-setup.msi est introuvable. Vérifiez qu'il est bien inclus dans le package.");
throw new FileNotFoundException("Le fichier podman-installer-windows-amd64.msi est introuvable. Vérifiez qu'il est bien inclus dans le package.");
RunCommand("msiexec.exe", $"/i \"{msiPath}\" /qn /norestart", "Installation de Podman en cours...");
_state.PodmanInstalled = true;
@@ -506,7 +506,7 @@ public partial class MainForm : Form
{
try
{
var setupPath = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) ?? ".", "Resources", "studioE5-agent-setup.exe");
var setupPath = Path.Combine(AppContext.BaseDirectory, "Resources", "studioE5-agent-setup.exe");
if (!File.Exists(setupPath))
throw new FileNotFoundException("Le fichier studioE5-agent-setup.exe est introuvable. Vérifiez qu'il est bien inclus dans le package.");
@@ -600,7 +600,7 @@ public partial class MainForm : Form
}
// 4. Uninstall Podman
var podmanMsiPath = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) ?? ".", "Resources", "podman-setup.msi");
var podmanMsiPath = Path.Combine(AppContext.BaseDirectory, "Resources", "podman-installer-windows-amd64.msi");
if (File.Exists(podmanMsiPath))
{
RunCommand("msiexec.exe", $"/x \"{podmanMsiPath}\" /qn /norestart", "Désinstallation de Podman...");
+3 -3
View File
@@ -30,8 +30,8 @@ setup-wizard/
├── InstallerState.cs
├── PrerequisiteChecker.cs
└── Resources/
├── podman-setup.msi # MSI officiel Podman pour Windows
└── studioE5-agent-setup.exe # Package Inno Setup de l'agent
├── podman-installer-windows-amd64.msi # MSI officiel Podman pour Windows
└── studioE5-agent-setup.exe # Package Inno Setup de l'agent
```
## Build
@@ -58,7 +58,7 @@ bin\Release\net8.0-windows\win-x64\publish\StudioE5-SetupWizard.exe
1. Télécharger le MSI Podman Windows :
<https://github.com/containers/podman/releases>
2. Le renommer en `podman-setup.msi` et le placer dans `Resources/`.
2. Le renommer en `podman-installer-windows-amd64.msi` et le placer dans `Resources/`.
3. Générer le package Inno Setup de lagent (`studioE5-agent-setup.exe`) et le placer dans `Resources/`.
4. Builder et publier le wizard.
@@ -11,7 +11,11 @@
</PropertyGroup>
<ItemGroup>
<Content Include="Resources\podman-setup.msi">
<PackageReference Include="System.Management" Version="8.0.0" />
</ItemGroup>
<ItemGroup>
<Content Include="Resources\podman-installer-windows-amd64.msi">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Resources\studioE5-agent-setup.exe">