# ===================================================================== # NimPulse - Installateur une-ligne (Windows) # ===================================================================== # Usage (PowerShell) : # irm https://git.dracodev.net/Projets/NimPulse/-/raw/main/install.ps1 | iex # # Ce script telecharge le binaire nimpulse.exe et l'installe dans # %LOCALAPPDATA%\NimPulse, puis cree un raccourci sur le bureau. # ===================================================================== $ErrorActionPreference = 'Stop' # --- A ajuster selon l'emplacement reel des artefacts de release ---- $Version = "0.3.0" $BaseUrl = "https://git.dracodev.net/Projets/NimPulse/releases/download/v$Version" # --------------------------------------------------------------------- $InstallDir = Join-Path $env:LOCALAPPDATA "NimPulse" $ExeUrl = "$BaseUrl/nimpulse.exe" $ExePath = Join-Path $InstallDir "nimpulse.exe" Write-Host "Installation de NimPulse v$Version ..." # 1. Repertoire d'installation. New-Item -ItemType Directory -Force -Path $InstallDir | Out-Null # 2. Telechargement du binaire. Write-Host " Telechargement de $ExeUrl ..." Invoke-WebRequest -Uri $ExeUrl -OutFile $ExePath -UseBasicParsing # 3. Raccourci sur le bureau. try { $desktop = [Environment]::GetFolderPath("Desktop") $wsh = New-Object -ComObject WScript.Shell $lnk = $wsh.CreateShortcut((Join-Path $desktop "NimPulse.lnk")) $lnk.TargetPath = $ExePath $lnk.WorkingDirectory = $InstallDir $lnk.Save() Write-Host " Raccourci cree sur le bureau." } catch { Write-Host " (Raccourci bureau ignore : $($_.Exception.Message))" } # 4. Lancement immediat (optionnel). Write-Host "NimPulse est installe dans : $InstallDir" Write-Host "Lancez-le depuis le bureau ou :" Write-Host " & `"$ExePath`""