From c5004dd52ba4aebf8c8a1ffc65b16c3561d5a3fb Mon Sep 17 00:00:00 2001 From: olcxja Date: Fri, 29 May 2026 22:38:05 +0200 Subject: [PATCH] test installer (fix taksbar icon) --- .forgejo/workflows/Linux.yaml | 2 +- assets/Miarven.desktop | 8 ------- assets/install.sh | 40 +++++++++++++++++++++++++++++++++++ assets/olcxja.miarven.desktop | 8 +++++++ build-linux.sh | 4 +++- 5 files changed, 52 insertions(+), 10 deletions(-) delete mode 100755 assets/Miarven.desktop create mode 100644 assets/install.sh create mode 100644 assets/olcxja.miarven.desktop diff --git a/.forgejo/workflows/Linux.yaml b/.forgejo/workflows/Linux.yaml index 5f8f9d24..1240fb24 100644 --- a/.forgejo/workflows/Linux.yaml +++ b/.forgejo/workflows/Linux.yaml @@ -33,7 +33,7 @@ jobs: run: npx cap copy electron - name: Build - run: mkdir -p build && cd build && npx electron-packager ../electron miarven --platform=linux --arch=x64 --icon=../icons/icon.png --overwrite --asar && cp ../icons/icon.png ./miarven-linux-x64/icon.png && cp ../assets/Miarven.desktop ./miarven-linux-x64/Miarven.desktop + run: mkdir -p build && cd build && npx electron-packager ../electron miarven --platform=linux --arch=x64 --icon=../icons/icon.png --overwrite --asar && cp ../icons/icon.png ./miarven-linux-x64/icon.png && cp ../assets/olcxja.miarven.desktop ./miarven-linux-x64/olcxja.miarven.desktop && cp ../assets/install.sh ./miarven-linux-x64/install.sh && chmod +x ./miarven-linux-x64/install.sh - name: Upload Artifact uses: actions/upload-artifact@v3 diff --git a/assets/Miarven.desktop b/assets/Miarven.desktop deleted file mode 100755 index e5a9d02b..00000000 --- a/assets/Miarven.desktop +++ /dev/null @@ -1,8 +0,0 @@ -[Desktop Entry] -Name=Miarven -Exec=bash -c 'DIR="$(dirname "%k")"; mkdir -p ~/.local/share/icons; cp "$DIR/icon.png" ~/.local/share/icons/olcxjamiarven.png; cd "$DIR" && ./miarven' -Icon=olcxjamiarven -Type=Application -Categories=Internet -StartupNotify=true -StartupWMClass=olcxja.miarven \ No newline at end of file diff --git a/assets/install.sh b/assets/install.sh new file mode 100644 index 00000000..f131e079 --- /dev/null +++ b/assets/install.sh @@ -0,0 +1,40 @@ +#!/usr/bin/env bash + +set -e + +echo "WARNING: Make sure you don't run this script in a folder that contains anything more than Miarven" +echo "otherwise it may result in data loss" + +read -r -p "Press Enter to continue (or Ctrl+C, to cancel)..." + +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" + +BIN_DIR="$HOME/.local/bin/olcxja.miarven" +APP_DIR="$HOME/.local/share/applications" + +echo "1. Copying files..." +mkdir -p "$BIN_DIR" +mkdir -p "$APP_DIR" + +cp -r "$SCRIPT_DIR/"* "$BIN_DIR/" + +echo "2. Creating shortcut..." + +mv "$BIN_DIR/olcxja.miarven.desktop" "$APP_DIR/olcxja.miarven.desktop" + +echo "3. Adding executable permissions..." +chmod +x "$APP_DIR/olcxja.miarven.desktop" +chmod +x "$BIN_DIR/miarven" + +echo "4. Cleaning installation..." + +rm -f "$BIN_DIR/olcxja.miarven.desktop" +rm -f "$BIN_DIR/install.sh" + +echo "5. Installation completed. Cleaning up and launching..." + +rm -rf "$SCRIPT_DIR"/* + +"$BIN_DIR/miarven" & + +exit 0 \ No newline at end of file diff --git a/assets/olcxja.miarven.desktop b/assets/olcxja.miarven.desktop new file mode 100644 index 00000000..ce4b8034 --- /dev/null +++ b/assets/olcxja.miarven.desktop @@ -0,0 +1,8 @@ +[Desktop Entry] +Name=Miarven +Exec=~/.local/bin/olcxja.miarven/miarven +Icon=olcxja.miarven +Type=Application +Categories=Internet +StartupNotify=true +StartupWMClass=olcxja.miarven \ No newline at end of file diff --git a/build-linux.sh b/build-linux.sh index ea13dbb0..a9a4c938 100755 --- a/build-linux.sh +++ b/build-linux.sh @@ -2,4 +2,6 @@ mkdir build cd build npx electron-packager ../electron miarven --platform=linux --arch=x64 --icon=../electron/assets/icon.png --overwrite --asar cp ../icons/icon.png ./miarven-linux-x64/icon.png -cp ../assets/Miarven.desktop ./miarven-linux-x64/Miarven.desktop \ No newline at end of file +cp ../assets/olcxja.miarven.desktop ./miarven-linux-x64/olcxja.miarven.desktop +cp ../assets/install.sh ./miarven-linux-x64/install.sh +chmod +x ./miarven-linux-x64/install.sh \ No newline at end of file