Files
pyssh-client/tools/create_shortcut.ps1
snoopy b977842186 Client SSH/SFTP personnel pour Windows
Reunit en un seul outil les fonctions utiles de MobaXterm, Termius et Bitvise,
sans compte ni service tiers, avec toutes les donnees en local.

- Terminaux multi-onglets : sessions SSH et terminaux Windows locaux
  (PowerShell / cmd) via la pseudo-console native ConPTY
- Gestionnaire de fichiers SFTP facon WinSCP : double panneau, colonnes
  triables, glisser-deposer, renommage, permissions, file de transferts.
  Ouvrable sur une connexion en cours sans creer de favori
- Gestion des cles SSH : generation Ed25519/RSA, import, export
- Gestion du fichier known_hosts, avec remplacement guide d'une cle d'hote
  modifiee (cas frequent des serveurs en DHCP)
- Trois themes (clair, bleu nuit, noir), commutables a chaud
- Authentification automatique reprenant le comportement de la commande ssh
  (agent SSH et cles ~/.ssh), mot de passe demande seulement en secours

Aucun mot de passe n'est stocke sur le disque.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-04 06:50:10 +02:00

51 lines
1.6 KiB
PowerShell

# Cree un raccourci Windows pour lancer l'application sans fenetre de console.
#
# Usage : clic droit sur ce fichier > "Executer avec PowerShell"
# ou : powershell -ExecutionPolicy Bypass -File tools\create_shortcut.ps1
#
# Options :
# -Desktop place aussi une copie sur le Bureau
# -StartMenu place aussi une copie dans le menu Demarrer
param(
[switch]$Desktop,
[switch]$StartMenu
)
$root = Split-Path -Parent $PSScriptRoot
$target = Join-Path $root "venv\Scripts\pythonw.exe" # pythonw = pas de console noire
$script = Join-Path $root "main.py"
$icon = Join-Path $root "resources\app.ico"
if (-not (Test-Path $target)) {
Write-Host "Environnement virtuel introuvable. Lancez d'abord setup.bat." -ForegroundColor Red
exit 1
}
if (-not (Test-Path $icon)) {
# l'icone se regenere depuis l'application elle-meme
& (Join-Path $root "venv\Scripts\python.exe") (Join-Path $root "tools\make_icon.py")
}
$shell = New-Object -ComObject WScript.Shell
function New-AppShortcut([string]$path) {
$lnk = $shell.CreateShortcut($path)
$lnk.TargetPath = $target
$lnk.Arguments = '"' + $script + '"'
$lnk.WorkingDirectory = $root
$lnk.IconLocation = $icon
$lnk.Description = "Client SSH/SFTP personnel"
$lnk.Save()
Write-Host "Raccourci cree : $path" -ForegroundColor Green
}
New-AppShortcut (Join-Path $root "PySSH Client.lnk")
if ($Desktop) {
New-AppShortcut (Join-Path ([Environment]::GetFolderPath("Desktop")) "PySSH Client.lnk")
}
if ($StartMenu) {
$programs = Join-Path ([Environment]::GetFolderPath("StartMenu")) "Programs"
New-AppShortcut (Join-Path $programs "PySSH Client.lnk")
}