# Atlas — installeur Windows (CreatEnove) # irm https://createnove.com/downloads/omni/install.ps1 | iex # Variables : $env:OMNI_DIR (défaut %USERPROFILE%\Atlas), $env:OMNI_OUI=1 (oui à tout) $ErrorActionPreference = "Stop" $Version = "3.0.0"; $ZipUrl = "https://createnove.com/downloads/atlas/Atlas_v3.0.0.zip"; $ZipSha = "fbeebd4ee3a598b5a2741eccf0622c87832926071046f3a69f5e042481c8174e" $Dest = if ($env:OMNI_DIR) { $env:OMNI_DIR } else { Join-Path $env:USERPROFILE "Atlas" } Write-Host "● Atlas $Version — votre IA locale, par CreatEnove" -ForegroundColor Magenta Write-Host " Dossier : $Dest · Données : $env:USERPROFILE\.atlas" function Demander($q) { if ($env:OMNI_OUI -eq "1") { return $true }; $r = Read-Host "$q [o/N]"; return $r -match '^(o|oui|y|yes)$' } # 1. Python 3.8+ $Py = $null foreach ($c in @("py -3", "python", "python3")) { try { $v = & cmd /c "$c -c ""import sys;print(sys.version_info>=(3,8))"" 2>nul"; if ($v -eq "True") { $Py = $c; break } } catch {} } if (-not $Py) { if ((Get-Command winget -ErrorAction SilentlyContinue) -and (Demander "Python est absent. L'installer avec winget ?")) { winget install -e --id Python.Python.3.12 --accept-package-agreements --accept-source-agreements Write-Host "Rouvrez PowerShell puis relancez cette commande." -ForegroundColor Yellow; exit 0 } Write-Host "✗ Python 3.8+ requis : https://www.python.org/downloads/windows/ (cochez « Add to PATH »)" -ForegroundColor Red; exit 1 } Write-Host "✓ Python trouvé ($Py)" # 2. Téléchargement + vérification SHA-256 $Tmp = Join-Path ([IO.Path]::GetTempPath()) ("omni-" + [guid]::NewGuid()) New-Item -ItemType Directory -Path $Tmp | Out-Null $Zip = Join-Path $Tmp "omni.zip" Write-Host "· Téléchargement…" [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 Invoke-WebRequest -Uri $ZipUrl -OutFile $Zip -UseBasicParsing if ((Get-FileHash $Zip -Algorithm SHA256).Hash.ToLower() -ne $ZipSha) { Write-Host "✗ Empreinte SHA-256 inattendue : installation annulée." -ForegroundColor Red; exit 1 } Write-Host "✓ Archive vérifiée (SHA-256)" # 3. Décompression (mise à jour sans toucher aux données) Expand-Archive -Path $Zip -DestinationPath $Tmp -Force New-Item -ItemType Directory -Path $Dest -Force | Out-Null Copy-Item -Path (Join-Path $Tmp "Atlas\*") -Destination $Dest -Recurse -Force Remove-Item $Tmp -Recurse -Force Write-Host "✓ Application installée dans $Dest" # 4. Moteur llama.cpp $Ls = (Get-Command llama-server -ErrorAction SilentlyContinue).Source if (-not $Ls -and (Get-Command winget -ErrorAction SilentlyContinue)) { if (Demander "Installer llama.cpp (moteur des modèles locaux) avec winget ?") { winget install -e --id ggml.llamacpp --accept-package-agreements --accept-source-agreements $Ls = (Get-Command llama-server -ErrorAction SilentlyContinue).Source if (-not $Ls) { Write-Host " (ouvrez un nouveau PowerShell pour que llama-server soit trouvé)" } } } Push-Location $Dest if ($Ls) { & cmd /c "$Py run.py config llama_server ""$Ls""" | Out-Null; Write-Host "✓ llama-server : $Ls" } # 5. Modules optionnels if (Demander "Installer les modules optionnels (fenêtre native, terminal enrichi, QR codes, PDF) ?") { & cmd /c "$Py -m pip install --user --quiet pywebview rich qrcode pypdf pillow" } # 6. Lanceurs & cmd /c "$Py run.py make-launchers" | Out-Null Pop-Location Write-Host "" Write-Host "Terminé. Pour démarrer : double-cliquez « Lancer Atlas.bat » dans $Dest, ou :" -ForegroundColor Magenta Write-Host " cd `"$Dest`"; $Py run.py" Write-Host " Accès depuis vos autres appareils : $Py run.py reseau tunnel (ou Réglages › Accès distant)"