installer: corrections wizard C# (System.Management, AppContext.BaseDirectory), fix script Inno Setup GetDiskFreeSpaceEx, ajout SUIVI_INSTALLER
This commit is contained in:
@@ -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...");
|
||||
|
||||
@@ -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 l’agent (`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">
|
||||
|
||||
Reference in New Issue
Block a user