From fb7b2389c33bef903f236f4dd0c0b98dfc0bbbe8 Mon Sep 17 00:00:00 2001 From: ertopogo Date: Wed, 26 Nov 2025 04:02:41 +0100 Subject: Feat: Ajout de la configuration Tridactyl (Native Messenger + .tridactylrc) et scripts de maintenance --- scripts/install-tridactyl-native.ps1 | 49 ++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 scripts/install-tridactyl-native.ps1 (limited to 'scripts/install-tridactyl-native.ps1') diff --git a/scripts/install-tridactyl-native.ps1 b/scripts/install-tridactyl-native.ps1 new file mode 100644 index 0000000..fed740b --- /dev/null +++ b/scripts/install-tridactyl-native.ps1 @@ -0,0 +1,49 @@ +# Script pour installer le native messenger Tridactyl +# Copie le fichier tridactyl.json vers l'emplacement attendu par Firefox + +$ErrorActionPreference = "Stop" + +Write-Host "=== Installation du Native Messenger Tridactyl ===" -ForegroundColor Cyan +Write-Host "" + +$sourcePath = "$env:USERPROFILE\.tridactyl\tridactyl.json" +$targetPath = "$env:APPDATA\Mozilla\NativeMessagingHosts\tridactyl.json" +$targetDir = Split-Path $targetPath -Parent + +# Verifier que le fichier source existe +if (-not (Test-Path $sourcePath)) { + Write-Host "[ERREUR] Fichier source introuvable: $sourcePath" -ForegroundColor Red + Write-Host "Assurez-vous que le native messenger est installe dans: $sourcePath" -ForegroundColor Yellow + exit 1 +} + +Write-Host "Source: $sourcePath" -ForegroundColor Gray +Write-Host "Destination: $targetPath" -ForegroundColor Gray +Write-Host "" + +# Creer le repertoire de destination si necessaire +if (-not (Test-Path $targetDir)) { + Write-Host "Creation du repertoire: $targetDir" -ForegroundColor Yellow + New-Item -ItemType Directory -Path $targetDir -Force | Out-Null + Write-Host "[OK] Repertoire cree" -ForegroundColor Green +} + +# Copier le fichier +Write-Host "Copie du fichier..." -ForegroundColor Yellow +Copy-Item -Path $sourcePath -Destination $targetPath -Force +Write-Host "[OK] Fichier copie avec succes" -ForegroundColor Green + +# Verifier que le fichier a ete copie correctement +if (Test-Path $targetPath) { + Write-Host "" + Write-Host "[OK] Installation terminee avec succes!" -ForegroundColor Green + Write-Host "" + Write-Host "Prochaines etapes:" -ForegroundColor Yellow + Write-Host "1. Redemarrez Firefox completement" -ForegroundColor Gray + Write-Host "2. Ouvrez Firefox et appuyez sur ':' pour ouvrir Tridactyl" -ForegroundColor Gray + Write-Host "3. Tapez ':native' pour verifier la connexion" -ForegroundColor Gray +} else { + Write-Host "[ERREUR] Le fichier n'a pas ete copie correctement" -ForegroundColor Red + exit 1 +} + -- cgit v1.2.3