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
|
||||
cd package-manager
|
||||
|
||||
# Create the build directory
|
||||
mkdir -p build && cd build
|
||||
# Configure and compile
|
||||
cmake -B build -DFWS_BUILD_EXAMPLE_PLUGIN=ON
|
||||
cmake --build build -j$(nproc)
|
||||
```
|
||||
|
||||
# Configure
|
||||
cmake .. -DCMAKE_INSTALL_PREFIX=/usr
|
||||
### Install
|
||||
|
||||
# Compile
|
||||
make -j$(nproc)
|
||||
**User install** (recommended, no sudo — the binary goes to `~/.local/bin`):
|
||||
|
||||
# Install (optional)
|
||||
sudo make install
|
||||
```bash
|
||||
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
|
||||
|
||||
```bash
|
||||
# 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
|
||||
```
|
||||
|
||||
|
||||
Reference in new issue
Block a user