Skip to content

Commit

Permalink
Clean up install scripts and add QT6 build option
Browse files Browse the repository at this point in the history
  • Loading branch information
alex1701c committed May 5, 2024
1 parent a2ec1d4 commit 1d9db80
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 55 deletions.
19 changes: 3 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,29 +57,16 @@ sudo pacman -S cmake extra-cmake-modules knotifications kwallet kcmutils

## Installation Method

### Option A: Easy oneliner method

Easy oneliner method:
```bash
curl https://raw.githubusercontent.com/alex1701c/QuickWebShortcuts/master/install.sh | bash
```

### Option B: Easy oneliner method (without admin privileges)

```bash
curl https://raw.githubusercontent.com/alex1701c/QuickWebShortcuts/master/install-user.sh | bash
```

### Option C: Manual method

Alternatively, you can clone the repo and run the install.sh script
```bash
git clone https://github.com/alex1701c/QuickWebShortcuts.git
cd QuickWebShortcuts/
mkdir build
cd build
cmake -DKDE_INSTALL_QTPLUGINDIR=$(kf5-config --qt-plugins) -DCMAKE_BUILD_TYPE=Release ..
make
sudo make install
kquitapp5 krunner 2> /dev/null; kstart5 --windowclass krunner krunner > /dev/null 2>&1 &
./install.sh
```

**Note**: KWallet is not required for building this project but without it the proxy feature for the
Expand Down
35 changes: 0 additions & 35 deletions install-user.sh

This file was deleted.

19 changes: 15 additions & 4 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,23 @@ fi

mkdir -p build
cd build
krunner_version=$(krunner --version | grep -oP "(?<=krunner )\d+")
if [[ "$krunner_version" == "6" ]]; then
echo "Building for Plasma6"
BUILD_QT6_OPTION="-DBUILD_WITH_QT6=ON"
else
echo "Building for Plasma5"
BUILD_QT6_OPTION=""
fi

cmake -DKDE_INSTALL_QTPLUGINDIR=$(kf5-config --qt-plugins) -DCMAKE_BUILD_TYPE=Release ..
cmake .. -DCMAKE_BUILD_TYPE=Release -DKDE_INSTALL_USE_QT_SYS_PATHS=ON -DBUILD_TESTING=OFF $BUILD_QT6_OPTION
make -j$(nproc)
sudo make install

quitapp5 krunner 2> /dev/null
kstart5 --windowclass krunner krunner > /dev/null 2>&1 &
# KRunner needs to be restarted for the changes to be applied
if pgrep -x krunner > /dev/null
then
kquitapp5 krunner
fi

echo "Installation finished !";
echo "Installation finished!";
14 changes: 14 additions & 0 deletions uninstall.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/bash

# Exit if something fails
set -e

cd build
sudo make uninstall

# KRunner needs to be restarted for the changes to be applied
if pgrep -x krunner > /dev/null
then
kquitapp5 krunner
fi

0 comments on commit 1d9db80

Please sign in to comment.