-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add some scripts and fix installation issues
- Loading branch information
Showing
9 changed files
with
70 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
.venv | ||
.env | ||
.vscode | ||
.vscode | ||
/build |
This file was deleted.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#!/bin/bash -e | ||
|
||
cd ../ | ||
mkdir -p build | ||
cp -r ./msi_ec_dbus/dbus_conf ./build/dbus_conf | ||
cp -r ./msi_control_ui/icons ./build/icons | ||
cp ./scripts/install.sh ./build | ||
cp ./scripts/uninstall.sh ./build | ||
|
||
echo 'Building dbus service...' | ||
cd ./msi_ec_dbus | ||
cargo build --release | ||
cp ./target/release/msi_ec_dbus ../build/ | ||
|
||
echo 'Building binary...' | ||
cd ../msi_control_ui | ||
cargo build --release | ||
cp ./target/release/msi_control ../build/ | ||
|
||
echo 'Done.' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#!/bin/bash -e | ||
|
||
if [ "$(id -u)" != "0" ]; then | ||
echo "This script must be run as root" 1>&2 | ||
exit 1 | ||
fi | ||
|
||
DBUS_BIN=msi_ec_dbus | ||
DBUS_CONF='msi_ec_dbus.conf' | ||
DBUS_SERVICE='org.msi_ec_dbus.service' | ||
|
||
LIBEXEC_PATH='/usr/libexec/' | ||
DBUS_SYSTEM_PATH='/usr/share/dbus-1/system.d/' | ||
DBUS_SERVICES_PATH='/usr/share/dbus-1/system-services/' | ||
|
||
GUI_BIN=msi_control | ||
|
||
echo "Installation..." | ||
|
||
mkdir -p /opt/msi_control | ||
cp ./msi_control /opt/msi_control/msi_control | ||
cp -r ./icons /opt/msi_control/ | ||
|
||
install -vDm755 ./$DBUS_BIN $LIBEXEC_PATH$DBUS_BIN | ||
install -vDm644 ./dbus_conf/$DBUS_CONF $DBUS_SYSTEM_PATH$DBUS_CONF | ||
install -vDm644 ./dbus_conf/$DBUS_SERVICE $DBUS_SERVICES_PATH$DBUS_SERVICE | ||
|
||
echo "Done." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/bin/bash -e | ||
|
||
if [ "$(id -u)" != "0" ]; then | ||
echo "This script must be run as root" 1>&2 | ||
exit 1 | ||
fi | ||
|
||
echo 'Uninstallation...' | ||
|
||
rm -rfv /opt/msi_control | ||
|
||
rm -fv /usr/libexec/msi_ec_dbus | ||
rm -fv /usr/share/dbus-1/system.d/msi_ec_dbus.conf | ||
rm -fv /usr/share/dbus-1/system-services/org.msi_ec_dbus.service | ||
|
||
echo 'Done.' |
This file was deleted.
Oops, something went wrong.