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>
This commit is contained in:
50
tools/create_shortcut.ps1
Normal file
50
tools/create_shortcut.ps1
Normal file
@@ -0,0 +1,50 @@
|
||||
# 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")
|
||||
}
|
||||
34
tools/make_icon.py
Normal file
34
tools/make_icon.py
Normal file
@@ -0,0 +1,34 @@
|
||||
"""Genere resources/app.ico a partir de l'icone dessinee par l'application.
|
||||
|
||||
A relancer seulement si l'icone change : le fichier .ico est necessaire au
|
||||
raccourci Windows (et a un futur packaging), alors que l'application dessine
|
||||
la sienne en memoire au demarrage.
|
||||
|
||||
Usage : venv\\Scripts\\python.exe tools\\make_icon.py
|
||||
"""
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
ROOT = Path(__file__).resolve().parent.parent
|
||||
sys.path.insert(0, str(ROOT))
|
||||
|
||||
from PySide6.QtCore import QSize # noqa: E402
|
||||
from PySide6.QtGui import QIcon # noqa: E402
|
||||
from PySide6.QtWidgets import QApplication # noqa: E402
|
||||
|
||||
from app.theme import build_app_icon # noqa: E402
|
||||
|
||||
|
||||
def main() -> None:
|
||||
app = QApplication(sys.argv) # noqa: F841 - requis pour manipuler des QPixmap
|
||||
icon: QIcon = build_app_icon()
|
||||
target = ROOT / "resources" / "app.ico"
|
||||
# plusieurs tailles pour un rendu net dans la barre des taches et l'explorateur
|
||||
pixmap = icon.pixmap(QSize(256, 256))
|
||||
if not pixmap.save(str(target), "ICO"):
|
||||
raise SystemExit(f"Echec de l'ecriture de {target}")
|
||||
print(f"Icone generee : {target}")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
Reference in New Issue
Block a user