docs: document install and desktop-launcher setup commands
Modernize the build instructions (cmake -B build) and document the three install paths: per-user without sudo, system-wide with sudo, and the desktop launcher integration that turns PacManager into a regular app shown by any application menu (wofi, GNOME, KDE...). 🤖 Generated with Codebuff Co-Authored-By: Codebuff <noreply@codebuff.com>
This commit is contained in:
2 files changed
+88
-20
No files matched your search
+44
-10
@@ -52,26 +52,60 @@ sudo pacman -S qt6-base cmake gcc base-devel
|
|||||||
```bash
|
```bash
|
||||||
cd package-manager
|
cd package-manager
|
||||||
|
|
||||||
# Create the build directory
|
# Configure and compile
|
||||||
mkdir -p build && cd build
|
cmake -B build -DFWS_BUILD_EXAMPLE_PLUGIN=ON
|
||||||
|
cmake --build build -j$(nproc)
|
||||||
|
```
|
||||||
|
|
||||||
# Configure
|
### Install
|
||||||
cmake .. -DCMAKE_INSTALL_PREFIX=/usr
|
|
||||||
|
|
||||||
# Compile
|
**User install** (recommended, no sudo — the binary goes to `~/.local/bin`):
|
||||||
make -j$(nproc)
|
|
||||||
|
|
||||||
# Install (optional)
|
```bash
|
||||||
sudo make install
|
cmake --install build --prefix ~/.local
|
||||||
|
|
||||||
|
# To run `PacManager` from a terminal (optional):
|
||||||
|
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc # then restart your shell
|
||||||
|
```
|
||||||
|
|
||||||
|
**System install** (root, into `/usr/local/bin`):
|
||||||
|
|
||||||
|
```bash
|
||||||
|
sudo cmake --install build
|
||||||
|
```
|
||||||
|
|
||||||
|
### Show up in the app launcher (a real app, no command)
|
||||||
|
|
||||||
|
To make PacManager appear in the launcher of any desktop (wofi, GNOME, KDE...), like a pacman install:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
mkdir -p ~/.local/share/applications ~/.local/share/icons/hicolor/scalable/apps
|
||||||
|
cp resources/icons/package.svg ~/.local/share/icons/hicolor/scalable/apps/org.fws.PacManager.svg
|
||||||
|
cat > ~/.local/share/applications/org.fws.PacManager.desktop <<EOF
|
||||||
|
[Desktop Entry]
|
||||||
|
Type=Application
|
||||||
|
Name=PacManager
|
||||||
|
GenericName=Package Manager
|
||||||
|
Comment=Package manager for Arch Linux
|
||||||
|
Exec=$HOME/.local/bin/PacManager
|
||||||
|
Icon=org.fws.PacManager
|
||||||
|
Terminal=false
|
||||||
|
Categories=System;Utility;Qt;
|
||||||
|
Keywords=package;pacman;flatpak;install;update;
|
||||||
|
StartupNotify=true
|
||||||
|
EOF
|
||||||
|
update-desktop-database ~/.local/share/applications
|
||||||
```
|
```
|
||||||
|
|
||||||
### Run
|
### Run
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# From the build directory
|
# From the build directory
|
||||||
./PacManager
|
./build/PacManager
|
||||||
|
|
||||||
# Or from /usr/bin after install
|
# From the app launcher (recommended): $mod+R (Hyprland) or your application menu, type "PacManager"
|
||||||
|
|
||||||
|
# From a terminal, after install + PATH
|
||||||
PacManager
|
PacManager
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
@@ -52,26 +52,60 @@ sudo pacman -S qt6-base cmake gcc base-devel
|
|||||||
```bash
|
```bash
|
||||||
cd package-manager
|
cd package-manager
|
||||||
|
|
||||||
# Créer le dossier de build
|
# Configurer + compiler
|
||||||
mkdir -p build && cd build
|
cmake -B build -DFWS_BUILD_EXAMPLE_PLUGIN=ON
|
||||||
|
cmake --build build -j$(nproc)
|
||||||
|
```
|
||||||
|
|
||||||
# Configurer
|
### Installer
|
||||||
cmake .. -DCMAKE_INSTALL_PREFIX=/usr
|
|
||||||
|
|
||||||
# Compiler
|
**Installation utilisateur** (recommandée, sans sudo — le binaire va dans `~/.local/bin`) :
|
||||||
make -j$(nproc)
|
|
||||||
|
|
||||||
# Installer (optionnel)
|
```bash
|
||||||
sudo make install
|
cmake --install build --prefix ~/.local
|
||||||
|
|
||||||
|
# Pour lancer `PacManager` depuis un terminal (optionnel) :
|
||||||
|
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc # puis relancez votre shell
|
||||||
|
```
|
||||||
|
|
||||||
|
**Installation système** (root, dans `/usr/local/bin`) :
|
||||||
|
|
||||||
|
```bash
|
||||||
|
sudo cmake --install build
|
||||||
|
```
|
||||||
|
|
||||||
|
### Apparaître dans le launcher (vraie app, sans commande)
|
||||||
|
|
||||||
|
Pour que PacManager s'affiche dans le launcher de n'importe quel bureau (wofi, GNOME, KDE…), comme une install pacman :
|
||||||
|
|
||||||
|
```bash
|
||||||
|
mkdir -p ~/.local/share/applications ~/.local/share/icons/hicolor/scalable/apps
|
||||||
|
cp resources/icons/package.svg ~/.local/share/icons/hicolor/scalable/apps/org.fws.PacManager.svg
|
||||||
|
cat > ~/.local/share/applications/org.fws.PacManager.desktop <<EOF
|
||||||
|
[Desktop Entry]
|
||||||
|
Type=Application
|
||||||
|
Name=PacManager
|
||||||
|
GenericName=Package Manager
|
||||||
|
Comment=Gestionnaire de paquets pour Arch Linux
|
||||||
|
Exec=$HOME/.local/bin/PacManager
|
||||||
|
Icon=org.fws.PacManager
|
||||||
|
Terminal=false
|
||||||
|
Categories=System;Utility;Qt;
|
||||||
|
Keywords=package;pacman;flatpak;install;update;
|
||||||
|
StartupNotify=true
|
||||||
|
EOF
|
||||||
|
update-desktop-database ~/.local/share/applications
|
||||||
```
|
```
|
||||||
|
|
||||||
### Lancer
|
### Lancer
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Depuis le dossier build
|
# Depuis le dossier build
|
||||||
./PacManager
|
./build/PacManager
|
||||||
|
|
||||||
# Ou depuis /usr/bin après install
|
# Depuis le launcher (recommandé) : $mod+R (Hyprland) ou menu d'applications, tapez « PacManager »
|
||||||
|
|
||||||
|
# Depuis un terminal, après installation + PATH
|
||||||
PacManager
|
PacManager
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user