From 35bd83fcf586e840bfc9d06e7bfe027f026693f8 Mon Sep 17 00:00:00 2001 From: TheAlexDev23 Date: Sat, 14 Sep 2024 22:03:55 +0200 Subject: [PATCH] Moved install scripts to separate directory and cleaned them up a bit. --- README.md | 24 ++++++++++++----- .../power-daemon-mgr/dev-tmp-install-clean.sh | 2 +- install-gtk.sh | 27 ------------------- .../install-daemon.sh | 0 scripts/install-gtk.sh | 17 ++++++++++++ .../install-webview.sh | 12 +-------- uninstall.sh => scripts/uninstall.sh | 0 7 files changed, 36 insertions(+), 46 deletions(-) delete mode 100755 install-gtk.sh rename install-daemon-only.sh => scripts/install-daemon.sh (100%) create mode 100755 scripts/install-gtk.sh rename install-webview.sh => scripts/install-webview.sh (56%) rename uninstall.sh => scripts/uninstall.sh (100%) diff --git a/README.md b/README.md index a61e36e..7ed0367 100644 --- a/README.md +++ b/README.md @@ -88,8 +88,8 @@ AUR: `power-options-gtk` or `power-options-gtk-git` for bleeding edge ```bash git clone https://github.com/TheAlexDev23/power-options/ --depth=1 -cd power-options -chmod +x ./install-gtk.sh +cd power-options/scripts +chmod +x *.sh # Run as local user, will require sudo password ./install-gtk.sh ``` @@ -102,8 +102,8 @@ AUR: `power-options-webview` or `power-options-webview-git` for bleeding edge # dioxus-cli is required cargo install dioxus-cli git clone https://github.com/TheAlexDev23/power-options/ --depth=1 -cd power-options -chmod +x ./install-webview.sh +cd power-options/scripts +chmod +x *.sh # Run as local user, will require sudo password ./install-webview.sh ``` @@ -114,10 +114,10 @@ AUR: `power-options-daemon` or `power-options-daemon-git` for bleeding edge ```bash git clone https://github.com/TheAlexDev23/power-options/ --depth=1 -cd power-options -chmod +x ./install-webview.sh +cd power-options/scripts +chmod +x *.sh # Run as local user, will require sudo password -./install-daemon-only.sh +./install-daemon.sh ``` ## Dependencies @@ -142,6 +142,16 @@ GTK frontend: - yad - libadwaita +## Updating + +If you've installed using the AUR, your package manager should handle the +updates. + +If you've installed using install scripts, simply pull the latest changes and +re-run the install scripts again. **Important, do not run ./uninstall.sh if you +want to keep your profiles** + + ## Limitations - Network configuration only works on intel cards and cards that use iwlwifi - Resolution and refresh rate control only works on X11 (other options should diff --git a/crates/power-daemon-mgr/dev-tmp-install-clean.sh b/crates/power-daemon-mgr/dev-tmp-install-clean.sh index 1fdc1c3..457cdcf 100755 --- a/crates/power-daemon-mgr/dev-tmp-install-clean.sh +++ b/crates/power-daemon-mgr/dev-tmp-install-clean.sh @@ -3,7 +3,7 @@ cargo build sudo rm /usr/lib/systemd/system/power-options.service sudo cp ../../target/debug/power-daemon-mgr -f /usr/bin/ sudo power-daemon-mgr -vvv generate-base-files --path / --program-path /usr/bin/power-daemon-mgr --verbose-daemon -sudo power-daemon-mgr -vvv generate-configt-files --path / +sudo power-daemon-mgr -vvv generate-config-files --path / sudo systemctl restart acpid sudo systemctl daemon-reload sudo systemctl restart power-options \ No newline at end of file diff --git a/install-gtk.sh b/install-gtk.sh deleted file mode 100755 index 879e555..0000000 --- a/install-gtk.sh +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/bash - -set -e - -pushd crates/power-daemon-mgr -cargo build --release -popd - -pushd crates/frontend-gtk -cargo build --release -popd - -sudo cp -f target/release/power-daemon-mgr /usr/bin/ -sudo cp -f target/release/frontend-gtk /usr/bin/power-options-gtk - -sudo target/release/power-daemon-mgr -v generate-base-files --path / --program-path /usr/bin/power-daemon-mgr - -sudo systemctl restart acpid -sudo systemctl daemon-reload -sudo systemctl enable power-options -sudo systemctl start power-options - -sudo cp -f icon.png /usr/share/icons/power-options.png - -sudo cp -f install/power-options-gtk.desktop /usr/share/applications/ - -echo "If you see D-Bus related issues, please restart your system." \ No newline at end of file diff --git a/install-daemon-only.sh b/scripts/install-daemon.sh similarity index 100% rename from install-daemon-only.sh rename to scripts/install-daemon.sh diff --git a/scripts/install-gtk.sh b/scripts/install-gtk.sh new file mode 100755 index 0000000..6422746 --- /dev/null +++ b/scripts/install-gtk.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +set -e + +./install-daemon.sh + +pushd crates/frontend-gtk +cargo build --release +popd + +sudo cp -f target/release/frontend-gtk /usr/bin/power-options-gtk + +sudo cp -f icon.png /usr/share/icons/power-options.png + +sudo cp -f install/power-options-gtk.desktop /usr/share/applications/ + +echo "If you see D-Bus related issues, please restart your system." \ No newline at end of file diff --git a/install-webview.sh b/scripts/install-webview.sh similarity index 56% rename from install-webview.sh rename to scripts/install-webview.sh index 2a4449a..33e21c3 100755 --- a/install-webview.sh +++ b/scripts/install-webview.sh @@ -2,27 +2,17 @@ set -e -pushd crates/power-daemon-mgr -cargo build --release -popd +./install-daemon.sh pushd crates/frontend-webview dx build --release popd -sudo cp -f target/release/power-daemon-mgr /usr/bin/ sudo cp -f target/release/frontend /usr/bin/power-options-webview -sudo target/release/power-daemon-mgr -v generate-base-files --path / --program-path /usr/bin/power-daemon-mgr - sudo mkdir /usr/lib/power-options-webview sudo cp -r crates/frontend-webview/assets /usr/lib/power-options-webview -sudo systemctl restart acpid -sudo systemctl daemon-reload -sudo systemctl enable power-options -sudo systemctl start power-options - sudo cp -f icon.png /usr/share/icons/power-options.png sudo cp -f install/power-options-webview.desktop /usr/share/applications/ diff --git a/uninstall.sh b/scripts/uninstall.sh similarity index 100% rename from uninstall.sh rename to scripts/uninstall.sh