summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rwxr-xr-xdist/install_nightly.sh39
-rwxr-xr-xdist/install_release.sh34
-rw-r--r--install.sh37
-rw-r--r--plugin_loader.service13
5 files changed, 73 insertions, 51 deletions
diff --git a/.gitignore b/.gitignore
index d550eaae..dff282fb 100644
--- a/.gitignore
+++ b/.gitignore
@@ -10,7 +10,6 @@ __pycache__/
.Python
build/
develop-eggs/
-dist/
downloads/
eggs/
.eggs/
diff --git a/dist/install_nightly.sh b/dist/install_nightly.sh
new file mode 100755
index 00000000..26384e03
--- /dev/null
+++ b/dist/install_nightly.sh
@@ -0,0 +1,39 @@
+#!/bin/sh
+
+HOMEBREW_FOLDER=/home/deck/homebrew
+
+# Create folder structure
+rm -rf ${HOMEBREW_FOLDER}/services
+mkdir -p ${HOMEBREW_FOLDER}/services
+mkdir -p ${HOMEBREW_FOLDER}/plugins
+
+# Download latest nightly build and install it
+rm -rf /tmp/plugin_loader
+mkdir -p /tmp/plugin_loader
+curl -L https://nightly.link/SteamDeckHomebrew/PluginLoader/workflows/build/main/Plugin%20Loader.zip --output /tmp/plugin_loader/PluginLoader.zip
+unzip /tmp/plugin_loader/PluginLoader.zip -d /tmp/plugin_loader
+cp /tmp/plugin_loader/PluginLoader ${HOMEBREW_FOLDER}/services/PluginLoader
+rm -rf /tmp/plugin_loader
+chmod +x ${HOMEBREW_FOLDER}/services/PluginLoader
+
+systemctl --user stop plugin_loader
+systemctl --user disable plugin_loader
+rm -f /home/deck/.config/systemd/user/plugin_loader.service
+cat > /home/deck/.config/systemd/user/plugin_loader.service <<- EOM
+[Unit]
+Description=SteamDeck Plugin Loader
+
+[Service]
+Type=simple
+
+ExecStart=/home/deck/homebrew/services/PluginLoader
+WorkingDirectory=/home/deck/homebrew/services
+
+Environment=PLUGIN_PATH=/home/deck/homebrew/plugins
+
+[Install]
+WantedBy=default.target
+EOM
+systemctl --user daemon-reload
+systemctl --user start plugin_loader
+systemctl --user enable plugin_loader \ No newline at end of file
diff --git a/dist/install_release.sh b/dist/install_release.sh
new file mode 100755
index 00000000..449b720d
--- /dev/null
+++ b/dist/install_release.sh
@@ -0,0 +1,34 @@
+#!/bin/sh
+
+HOMEBREW_FOLDER=/home/deck/homebrew
+
+# Create folder structure
+rm -rf ${HOMEBREW_FOLDER}/services
+mkdir -p ${HOMEBREW_FOLDER}/services
+mkdir -p ${HOMEBREW_FOLDER}/plugins
+
+# Download latest nightly build and install it
+curl -L https://github.com/SteamDeckHomebrew/PluginLoader/releases/latest/download/PluginLoader --output ${HOMEBREW_FOLDER}/services/PluginLoader
+chmod +x ${HOMEBREW_FOLDER}/services/PluginLoader
+
+systemctl --user stop plugin_loader
+systemctl --user disable plugin_loader
+rm /home/deck/.config/systemd/user/plugin_loader.service
+cat > /home/deck/.config/systemd/user/plugin_loader.service <<- EOM
+[Unit]
+Description=SteamDeck Plugin Loader
+
+[Service]
+Type=simple
+
+ExecStart=/home/deck/homebrew/services/PluginLoader
+WorkingDirectory=/home/deck/homebrew/services
+
+Environment=PLUGIN_PATH=/home/deck/homebrew/plugins
+
+[Install]
+WantedBy=default.target
+EOM
+systemctl --user daemon-reload
+systemctl --user start plugin_loader
+systemctl --user enable plugin_loader \ No newline at end of file
diff --git a/install.sh b/install.sh
deleted file mode 100644
index f24cb83f..00000000
--- a/install.sh
+++ /dev/null
@@ -1,37 +0,0 @@
-#!/bin/sh
-
-if [ "$EUID" -ne 0 ]; then
- echo "Please run this script as root"
- exit
-fi
-
-HOMEBREW_FOLDER=/home/deck/homebrew
-LOADER_FOLDER=$(realpath $(dirname "$0"))
-
-# Create folder structure
-rm -rf ${HOMEBREW_FOLDER}/services/plugin_loader
-mkdir -p ${HOMEBREW_FOLDER}/services/plugin_loader
-mkdir -p ${HOMEBREW_FOLDER}/plugins
-chown -R deck ${HOMEBREW_FOLDER}
-
-# Install our files
-cp -a ${LOADER_FOLDER}/plugin_loader/. /home/deck/homebrew/services/plugin_loader/
-
-# Install pip if it's not installed yet
-python -m pip &> /dev/null
-if [ $? -ne 0 ]; then
- curl https://bootstrap.pypa.io/get-pip.py --output /tmp/get-pip.py
- python /tmp/get-pip.py
-fi
-
-# Install dependencies
-python -m pip install -r requirements.txt
-
-# Create a service
-systemctl stop plugin_loader
-
-cp ./plugin_loader.service /etc/systemd/system/plugin_loader.service
-
-systemctl daemon-reload
-systemctl enable plugin_loader
-systemctl start plugin_loader \ No newline at end of file
diff --git a/plugin_loader.service b/plugin_loader.service
deleted file mode 100644
index 8c979ea0..00000000
--- a/plugin_loader.service
+++ /dev/null
@@ -1,13 +0,0 @@
-[Unit]
-Description=SteamDeck Plugin Manager
-
-[Service]
-Type=simple
-
-ExecStart=/usr/bin/python3 /home/deck/homebrew/services/plugin_loader/main.py
-WorkingDirectory=/home/deck/homebrew/services/plugin_loader
-
-Environment=PLUGIN_PATH=/home/deck/homebrew/plugins
-
-[Install]
-WantedBy=default.target