Compare commits
No commits in common. "73c86f0756fcd9c96397c8a56072ff4dd75c9f72" and "33f573b31e3f7255aad66363b52a5e45f6e3d0c0" have entirely different histories.
73c86f0756
...
33f573b31e
BIN
Kogus-1.0.0.exe
BIN
Kogus-1.0.0.exe
Binary file not shown.
@ -1,3 +1,5 @@
|
|||||||
|
version: "3.8"
|
||||||
|
|
||||||
services:
|
services:
|
||||||
tor:
|
tor:
|
||||||
image: dperson/torproxy
|
image: dperson/torproxy
|
||||||
|
@ -1,80 +0,0 @@
|
|||||||
;--------------------------------
|
|
||||||
; Fichier : installer.nsi
|
|
||||||
;--------------------------------
|
|
||||||
|
|
||||||
!define MUI_ICON "kogusico.ico"
|
|
||||||
!define MUI_UNICON "kogusico.ico"
|
|
||||||
!define MUI_UNINST_ICON "kogusico.ico"
|
|
||||||
|
|
||||||
!include "MUI2.nsh"
|
|
||||||
!insertmacro MUI_PAGE_WELCOME
|
|
||||||
!insertmacro MUI_PAGE_LICENSE "license.txt"
|
|
||||||
!insertmacro MUI_PAGE_DIRECTORY
|
|
||||||
!insertmacro MUI_PAGE_INSTFILES
|
|
||||||
!insertmacro MUI_PAGE_FINISH
|
|
||||||
!insertmacro MUI_LANGUAGE "French"
|
|
||||||
|
|
||||||
;--------------------------------
|
|
||||||
; Métadonnées produit
|
|
||||||
;--------------------------------
|
|
||||||
!define PRODUCT_NAME "Kogus"
|
|
||||||
!define PRODUCT_VERSION "1.0.0"
|
|
||||||
!define INSTALL_DIR "$PROGRAMFILES\\${PRODUCT_NAME}"
|
|
||||||
|
|
||||||
OutFile "Kogus-${PRODUCT_VERSION}.exe"
|
|
||||||
InstallDir "${INSTALL_DIR}"
|
|
||||||
RequestExecutionLevel admin
|
|
||||||
ShowInstDetails show
|
|
||||||
|
|
||||||
;--------------------------------
|
|
||||||
; Section : Installation
|
|
||||||
;--------------------------------
|
|
||||||
Section "Install"
|
|
||||||
|
|
||||||
; 1. Répertoire racine
|
|
||||||
SetOutPath "$INSTDIR"
|
|
||||||
|
|
||||||
; 2. Copier docker-compose.yml, config et script
|
|
||||||
File "docker-compose.yml"
|
|
||||||
File "sdk_relay.conf"
|
|
||||||
File "run.ps1"
|
|
||||||
|
|
||||||
; 3. Copier le dossier bitcoin
|
|
||||||
CreateDirectory "$INSTDIR\\bitcoin"
|
|
||||||
SetOutPath "$INSTDIR\\bitcoin"
|
|
||||||
File /r "bitcoin\\*.*"
|
|
||||||
|
|
||||||
; 4. Copier le dossier blindbit
|
|
||||||
CreateDirectory "$INSTDIR\\blindbit"
|
|
||||||
SetOutPath "$INSTDIR\\blindbit"
|
|
||||||
File /r "blindbit\\*.*"
|
|
||||||
|
|
||||||
; 5. Créer dossier de logs
|
|
||||||
CreateDirectory "$INSTDIR\\logs"
|
|
||||||
|
|
||||||
; 6. Raccourci dans le menu Démarrer
|
|
||||||
CreateDirectory "$SMPROGRAMS\\${PRODUCT_NAME}"
|
|
||||||
CreateShortCut "$SMPROGRAMS\\${PRODUCT_NAME}\\Lancer Kogus.lnk" \
|
|
||||||
"$INSTDIR\\run.ps1" "" "$INSTDIR\\run.ps1" 0
|
|
||||||
|
|
||||||
; 7. Exécuter le script d’installation/stack et journaliser
|
|
||||||
ExecWait 'cmd /c ""$SYSDIR\\WindowsPowerShell\\v1.0\\powershell.exe" -NoProfile -ExecutionPolicy Bypass -File "$INSTDIR\\run.ps1" > "$INSTDIR\\logs\\install.log" 2>&1"'
|
|
||||||
|
|
||||||
SectionEnd
|
|
||||||
|
|
||||||
;--------------------------------
|
|
||||||
; Section : Désinstallation
|
|
||||||
;--------------------------------
|
|
||||||
Section "Uninstall"
|
|
||||||
|
|
||||||
; 1. Arrêter la stack Docker
|
|
||||||
nsExec::ExecToLog '"$SYSDIR\\WindowsPowerShell\\v1.0\\powershell.exe" -NoProfile -Command "docker compose -f `"$INSTDIR\\docker-compose.yml`" down"'
|
|
||||||
|
|
||||||
; 2. Supprimer les fichiers et dossiers
|
|
||||||
RMDir /r "$INSTDIR"
|
|
||||||
|
|
||||||
; 3. Supprimer le raccourci et le dossier Menu Démarrer
|
|
||||||
Delete "$SMPROGRAMS\\${PRODUCT_NAME}\\Lancer Kogus.lnk"
|
|
||||||
RMDir "$SMPROGRAMS\\${PRODUCT_NAME}"
|
|
||||||
|
|
||||||
SectionEnd
|
|
BIN
kogusico.ico
BIN
kogusico.ico
Binary file not shown.
Before Width: | Height: | Size: 11 KiB |
@ -1 +0,0 @@
|
|||||||
License Kogus
|
|
56
run.ps1
56
run.ps1
@ -1,56 +0,0 @@
|
|||||||
# run.ps1 — script d'installation et de démarrage
|
|
||||||
|
|
||||||
Param()
|
|
||||||
|
|
||||||
# 1. Detection de la CLI Docker (docker vs docker-compose)
|
|
||||||
Write-Host "=== Verification de Docker CLI ==="
|
|
||||||
$dockerCmd = $null
|
|
||||||
try {
|
|
||||||
docker version --format '{{.Client.Version}}' > $null 2>&1
|
|
||||||
$dockerCmd = 'docker'
|
|
||||||
} catch {
|
|
||||||
try {
|
|
||||||
docker-compose version > $null 2>&1
|
|
||||||
$dockerCmd = 'docker-compose'
|
|
||||||
} catch {
|
|
||||||
$dockerCmd = $null
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($dockerCmd) {
|
|
||||||
Write-Host "Docker CLI detectee : $dockerCmd"
|
|
||||||
} else {
|
|
||||||
Write-Host "Docker non trouve. Installation de Docker Desktop..."
|
|
||||||
$installerUrl = 'https://desktop.docker.com/win/stable/Docker%20Desktop%20Installer.exe'
|
|
||||||
$installerPath = Join-Path -Path $PSScriptRoot -ChildPath 'docker-installer.exe'
|
|
||||||
Invoke-WebRequest -UseBasicParsing -Uri $installerUrl -OutFile $installerPath
|
|
||||||
Start-Process -FilePath $installerPath -ArgumentList '/quiet' -Wait
|
|
||||||
Remove-Item -Path $installerPath -Force
|
|
||||||
Write-Host "Installation de Docker Desktop terminee."
|
|
||||||
$dockerCmd = 'docker'
|
|
||||||
}
|
|
||||||
|
|
||||||
# 2. Se placer dans le repertoire contenant docker-compose.yml
|
|
||||||
Push-Location
|
|
||||||
$installRoot = Split-Path -Path $MyInvocation.MyCommand.Path -Parent
|
|
||||||
Set-Location $installRoot
|
|
||||||
|
|
||||||
# 3. Creation du dossier de logs
|
|
||||||
$logDir = Join-Path -Path $installRoot -ChildPath 'logs'
|
|
||||||
if (-not (Test-Path $logDir)) {
|
|
||||||
New-Item -ItemType Directory -Path $logDir | Out-Null
|
|
||||||
}
|
|
||||||
|
|
||||||
# 4. Demarrage de la stack et redirection des logs
|
|
||||||
$composeCmd = if ($dockerCmd -eq 'docker') { 'docker compose' } else { 'docker-compose' }
|
|
||||||
Write-Host "Lancement de '$composeCmd up -d'..."
|
|
||||||
$runLog = Join-Path -Path $logDir -ChildPath 'run.log'
|
|
||||||
# On passe par cmd.exe pour que > et 2>&1 fonctionnent correctement
|
|
||||||
& cmd.exe /c "$composeCmd up -d > `"$runLog`" 2>&1"
|
|
||||||
if ($LASTEXITCODE -ne 0) {
|
|
||||||
Write-Host "Erreur lors du demarrage. Voir le log : $runLog"
|
|
||||||
} else {
|
|
||||||
Write-Host "Stack demarree. Logs disponibles dans : $runLog"
|
|
||||||
}
|
|
||||||
|
|
||||||
Pop-Location
|
|
Loading…
x
Reference in New Issue
Block a user