docs: instructions d'installation détaillées par OS dans le README
CI / Lint (push) Successful in 18m3s
CI / Test (push) Successful in 9m12s
CI / Build (linux/amd64) (push) Failing after 1m11s
CI / Build (windows/amd64) (push) Failing after 0s
CI / Build (darwin/arm64) (push) Failing after 1s
CI / Build (linux/arm64) (push) Failing after 1s
CI / Build (windows/arm64) (push) Failing after 1s
CI / Build (darwin/amd64) (push) Failing after 4m4s
CI / Release (push) Skipped
CI / Lint (push) Successful in 18m3s
CI / Test (push) Successful in 9m12s
CI / Build (linux/amd64) (push) Failing after 1m11s
CI / Build (windows/amd64) (push) Failing after 0s
CI / Build (darwin/arm64) (push) Failing after 1s
CI / Build (linux/arm64) (push) Failing after 1s
CI / Build (windows/arm64) (push) Failing after 1s
CI / Build (darwin/amd64) (push) Failing after 4m4s
CI / Release (push) Skipped
- Linux : dépendances par distro (apt/pacman/dnf/apk), téléchargement amd64/arm64, service systemd - macOS : Apple Silicon et Intel, service launchd - Windows : téléchargement amd64/arm64, PATH permanent, service NSSM, pare-feu - Suppression de la section service redondante (déplacée dans les sections par OS)
This commit is contained in:
@@ -25,33 +25,204 @@ Copier sur une machine → coller sur une autre, automatiquement et instantaném
|
|||||||
- **Configuration simple** — fichier TOML + variables d'environnement
|
- **Configuration simple** — fichier TOML + variables d'environnement
|
||||||
- **LAN uniquement** — aucune donnée ne quitte votre réseau local
|
- **LAN uniquement** — aucune donnée ne quitte votre réseau local
|
||||||
|
|
||||||
## Installation rapide
|
## Installation
|
||||||
|
|
||||||
### Via install.sh (recommandé)
|
### Méthode 1 : Script automatique (tous OS)
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
curl -sSL https://git.dracodev.net/Projets/clip-sync/raw/branch/main/install.sh | bash
|
curl -sSL https://git.dracodev.net/Projets/clip-sync/raw/branch/main/install.sh | bash
|
||||||
```
|
```
|
||||||
|
|
||||||
Le script détecte automatiquement votre OS et architecture.
|
Le script détecte OS + architecture, télécharge le binaire, l'installe dans `~/.local/bin/` et crée une config par défaut.
|
||||||
|
|
||||||
### Compilation manuelle
|
---
|
||||||
|
|
||||||
|
### Méthode 2 : Instructions détaillées par OS
|
||||||
|
|
||||||
|
#### 🐧 Linux (X11 ou Wayland)
|
||||||
|
|
||||||
|
**1. Installer les dépendances**
|
||||||
|
|
||||||
|
| Distribution | X11 | Wayland |
|
||||||
|
|---|---|---|
|
||||||
|
| **Debian / Ubuntu** | `sudo apt install xclip` | `sudo apt install wl-clipboard` |
|
||||||
|
| **Arch / Manjaro** | `sudo pacman -S xclip` | `sudo pacman -S wl-clipboard` |
|
||||||
|
| **Fedora / RHEL** | `sudo dnf install xclip` | `sudo dnf install wl-clipboard` |
|
||||||
|
| **Alpine** | `sudo apk add xclip` | `sudo apk add wl-clipboard` |
|
||||||
|
|
||||||
|
clip-sync détecte automatiquement X11 vs Wayland via `$XDG_SESSION_TYPE`.
|
||||||
|
|
||||||
|
**2. Télécharger le binaire**
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# amd64
|
||||||
|
curl -sSL -o ~/.local/bin/clip-sync \
|
||||||
|
https://git.dracodev.net/Projets/clip-sync/releases/download/latest/clip-sync-linux-amd64
|
||||||
|
chmod +x ~/.local/bin/clip-sync
|
||||||
|
|
||||||
|
# arm64 (Raspberry Pi, etc.)
|
||||||
|
curl -sSL -o ~/.local/bin/clip-sync \
|
||||||
|
https://git.dracodev.net/Projets/clip-sync/releases/download/latest/clip-sync-linux-arm64
|
||||||
|
chmod +x ~/.local/bin/clip-sync
|
||||||
|
```
|
||||||
|
|
||||||
|
**3. Vérifier le PATH**
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Ajouter ~/.local/bin au PATH si ce n'est pas déjà fait
|
||||||
|
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc
|
||||||
|
source ~/.bashrc
|
||||||
|
```
|
||||||
|
|
||||||
|
**4. Vérifier l'installation**
|
||||||
|
|
||||||
|
```bash
|
||||||
|
clip-sync --version
|
||||||
|
# → clip-sync v0.1.0
|
||||||
|
```
|
||||||
|
|
||||||
|
**5. Installer comme service (systemd --user)**
|
||||||
|
|
||||||
|
```bash
|
||||||
|
mkdir -p ~/.config/systemd/user/
|
||||||
|
curl -sSL -o ~/.config/systemd/user/clip-sync.service \
|
||||||
|
https://git.dracodev.net/Projets/clip-sync/raw/branch/main/clip-sync.service
|
||||||
|
systemctl --user daemon-reload
|
||||||
|
systemctl --user enable --now clip-sync
|
||||||
|
systemctl --user status clip-sync
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
#### 🍎 macOS
|
||||||
|
|
||||||
|
**1. Aucune dépendance externe** — `pbpaste`/`pbcopy` sont intégrés à macOS.
|
||||||
|
|
||||||
|
**2. Télécharger le binaire**
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Apple Silicon (M1/M2/M3)
|
||||||
|
curl -sSL -o ~/.local/bin/clip-sync \
|
||||||
|
https://git.dracodev.net/Projets/clip-sync/releases/download/latest/clip-sync-darwin-arm64
|
||||||
|
chmod +x ~/.local/bin/clip-sync
|
||||||
|
|
||||||
|
# Intel Mac
|
||||||
|
curl -sSL -o ~/.local/bin/clip-sync \
|
||||||
|
https://git.dracodev.net/Projets/clip-sync/releases/download/latest/clip-sync-darwin-amd64
|
||||||
|
chmod +x ~/.local/bin/clip-sync
|
||||||
|
```
|
||||||
|
|
||||||
|
**3. Vérifier le PATH**
|
||||||
|
|
||||||
|
```bash
|
||||||
|
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.zshrc
|
||||||
|
source ~/.zshrc
|
||||||
|
```
|
||||||
|
|
||||||
|
**4. Vérifier l'installation**
|
||||||
|
|
||||||
|
```bash
|
||||||
|
clip-sync --version
|
||||||
|
# → clip-sync v0.1.0
|
||||||
|
```
|
||||||
|
|
||||||
|
**5. Installer comme service (launchd)**
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cat > ~/Library/LaunchAgents/com.clip-sync.plist << 'EOF'
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"
|
||||||
|
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
|
<plist version="1.0">
|
||||||
|
<dict>
|
||||||
|
<key>Label</key>
|
||||||
|
<string>com.clip-sync</string>
|
||||||
|
<key>ProgramArguments</key>
|
||||||
|
<array>
|
||||||
|
<string>/Users/$(whoami)/.local/bin/clip-sync</string>
|
||||||
|
</array>
|
||||||
|
<key>RunAtLoad</key>
|
||||||
|
<true/>
|
||||||
|
<key>KeepAlive</key>
|
||||||
|
<true/>
|
||||||
|
<key>StandardOutPath</key>
|
||||||
|
<string>/Users/$(whoami)/Library/Logs/clip-sync.log</string>
|
||||||
|
<key>StandardErrorPath</key>
|
||||||
|
<string>/Users/$(whoami)/Library/Logs/clip-sync.err</string>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
||||||
|
EOF
|
||||||
|
|
||||||
|
launchctl load ~/Library/LaunchAgents/com.clip-sync.plist
|
||||||
|
launchctl list | grep clip-sync
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
#### 🪟 Windows
|
||||||
|
|
||||||
|
**1. Aucune dépendance externe** — clip-sync utilise l'API Win32 native (user32.dll, kernel32.dll) sans CGo ni runtime externe.
|
||||||
|
|
||||||
|
**2. Télécharger le binaire**
|
||||||
|
|
||||||
|
```powershell
|
||||||
|
# amd64 (standard)
|
||||||
|
Invoke-WebRequest -Uri `
|
||||||
|
"https://git.dracodev.net/Projets/clip-sync/releases/download/latest/clip-sync-windows-amd64.exe" `
|
||||||
|
-OutFile "$env:USERPROFILE\bin\clip-sync.exe"
|
||||||
|
|
||||||
|
# arm64 (Surface Pro X, etc.)
|
||||||
|
Invoke-WebRequest -Uri `
|
||||||
|
"https://git.dracodev.net/Projets/clip-sync/releases/download/latest/clip-sync-windows-arm64.exe" `
|
||||||
|
-OutFile "$env:USERPROFILE\bin\clip-sync.exe"
|
||||||
|
```
|
||||||
|
|
||||||
|
**3. Ajouter au PATH**
|
||||||
|
|
||||||
|
```powershell
|
||||||
|
# PowerShell (admin) — permanent
|
||||||
|
[Environment]::SetEnvironmentVariable(
|
||||||
|
"Path",
|
||||||
|
[Environment]::GetEnvironmentVariable("Path", "User") + ";$env:USERPROFILE\bin",
|
||||||
|
"User"
|
||||||
|
)
|
||||||
|
```
|
||||||
|
|
||||||
|
**4. Vérifier l'installation** (redémarrer le terminal après l'étape 3)
|
||||||
|
|
||||||
|
```powershell
|
||||||
|
clip-sync --version
|
||||||
|
# → clip-sync v0.1.0
|
||||||
|
```
|
||||||
|
|
||||||
|
**5. Installer comme service Windows (NSSM)**
|
||||||
|
|
||||||
|
Télécharger [NSSM](https://nssm.cc/download) et l'extraire, puis :
|
||||||
|
|
||||||
|
```powershell
|
||||||
|
nssm install clip-sync %USERPROFILE%\bin\clip-sync.exe
|
||||||
|
nssm set clip-sync AppStdout %USERPROFILE%\AppData\Local\clip-sync\stdout.log
|
||||||
|
nssm set clip-sync AppStderr %USERPROFILE%\AppData\Local\clip-sync\stderr.log
|
||||||
|
nssm set clip-sync AppStdoutCreationDisposition 4
|
||||||
|
nssm set clip-sync AppStderrCreationDisposition 4
|
||||||
|
nssm start clip-sync
|
||||||
|
```
|
||||||
|
|
||||||
|
**6. Pare-feu Windows** — la première exécution peut déclencher une alerte. Autoriser l'accès réseau privé.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### Compilation depuis les sources
|
||||||
|
|
||||||
|
Prérequis : [Go 1.21+](https://go.dev/dl/)
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
git clone https://git.dracodev.net/Projets/clip-sync.git
|
git clone https://git.dracodev.net/Projets/clip-sync.git
|
||||||
cd clip-sync
|
cd clip-sync
|
||||||
make build # binaire dans ./bin/
|
make build # binaire dans ./bin/
|
||||||
|
make install # copie vers ~/.local/bin/
|
||||||
```
|
```
|
||||||
|
|
||||||
### Prérequis par plateforme
|
|
||||||
|
|
||||||
| Plateforme | Dépendance | Installation |
|
|
||||||
|-----------|-------------------|-------------------------------------------|
|
|
||||||
| Linux X11 | `xclip` | `apt install xclip` / `pacman -S xclip` |
|
|
||||||
| Linux Wayland | `wl-clipboard` | `apt install wl-clipboard` |
|
|
||||||
| macOS | intégré (pbpaste/pbcopy) | — |
|
|
||||||
| Windows | intégré (Win32 API, pas de dépendance externe) | — |
|
|
||||||
|
|
||||||
## Démarrage rapide
|
## Démarrage rapide
|
||||||
|
|
||||||
### 1. Créer la configuration
|
### 1. Créer la configuration
|
||||||
@@ -115,26 +286,6 @@ Copiez du texte sur la machine A (Ctrl+C), collez sur la machine B (Ctrl+V).
|
|||||||
| `CLIP_SYNC_PORT` | `daemon.port` |
|
| `CLIP_SYNC_PORT` | `daemon.port` |
|
||||||
| `CLIP_SYNC_POLL_MS` | `daemon.poll_interval_ms` |
|
| `CLIP_SYNC_POLL_MS` | `daemon.poll_interval_ms` |
|
||||||
|
|
||||||
## Exécution en tant que service
|
|
||||||
|
|
||||||
### Linux (systemd --user)
|
|
||||||
|
|
||||||
```bash
|
|
||||||
mkdir -p ~/.config/systemd/user/
|
|
||||||
cp clip-sync.service ~/.config/systemd/user/
|
|
||||||
systemctl --user daemon-reload
|
|
||||||
systemctl --user enable --now clip-sync
|
|
||||||
```
|
|
||||||
|
|
||||||
### Windows (NSSM)
|
|
||||||
|
|
||||||
```powershell
|
|
||||||
nssm install clip-sync C:\Users\<user>\bin\clip-sync.exe
|
|
||||||
nssm set clip-sync AppStdout C:\Users\<user>\AppData\Local\clip-sync\stdout.log
|
|
||||||
nssm set clip-sync AppStderr C:\Users\<user>\AppData\Local\clip-sync\stderr.log
|
|
||||||
nssm start clip-sync
|
|
||||||
```
|
|
||||||
|
|
||||||
## Déboguer
|
## Déboguer
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
|||||||
Reference in New Issue
Block a user