Compare commits
6 Commits
33f573b31e
...
73c86f0756
Author | SHA1 | Date | |
---|---|---|---|
![]() |
73c86f0756 | ||
![]() |
2497dc1c56 | ||
![]() |
0859bd5625 | ||
![]() |
1bcc2fb4f0 | ||
![]() |
a82222bea1 | ||
![]() |
1fff60e77a |
BIN
Kogus-1.0.0.exe
Normal file
BIN
Kogus-1.0.0.exe
Normal file
Binary file not shown.
@ -1,5 +1,3 @@
|
|||||||
version: "3.8"
|
|
||||||
|
|
||||||
services:
|
services:
|
||||||
tor:
|
tor:
|
||||||
image: dperson/torproxy
|
image: dperson/torproxy
|
||||||
|
80
installer.nsi
Normal file
80
installer.nsi
Normal file
@ -0,0 +1,80 @@
|
|||||||
|
;--------------------------------
|
||||||
|
; 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
Normal file
BIN
kogusico.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 11 KiB |
1
license.txt
Normal file
1
license.txt
Normal file
@ -0,0 +1 @@
|
|||||||
|
License Kogus
|
56
run.ps1
Normal file
56
run.ps1
Normal file
@ -0,0 +1,56 @@
|
|||||||
|
# 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