From 44627b4cd469de32860f8f72f1168543e9ceda9d Mon Sep 17 00:00:00 2001 From: Vendicated Date: Tue, 12 Mar 2024 03:38:37 +0100 Subject: [PATCH 1/3] autostart(linux): correctly preserve command line arguments --- scripts/start.ts | 2 +- src/main/autoStart.ts | 22 +++++++++++++++------- 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/scripts/start.ts b/scripts/start.ts index 72ce3ab..21660b0 100644 --- a/scripts/start.ts +++ b/scripts/start.ts @@ -8,4 +8,4 @@ import "./utils/dotenv"; import { spawnNodeModuleBin } from "./utils/spawn.mjs"; -spawnNodeModuleBin("electron", [".", ...(process.env.ELECTRON_LAUNCH_FLAGS?.split(" ") ?? [])]); +spawnNodeModuleBin("electron", [process.cwd(), ...(process.env.ELECTRON_LAUNCH_FLAGS?.split(" ") ?? [])]); diff --git a/src/main/autoStart.ts b/src/main/autoStart.ts index fbbc30e..19d7e00 100644 --- a/src/main/autoStart.ts +++ b/src/main/autoStart.ts @@ -5,7 +5,7 @@ */ import { app } from "electron"; -import { existsSync, mkdirSync, rmSync, writeFileSync } from "fs"; +import { existsSync, mkdirSync, renameSync, rmSync, writeFileSync } from "fs"; import { join } from "path"; interface AutoStart { @@ -17,7 +17,16 @@ interface AutoStart { function makeAutoStartLinux(): AutoStart { const configDir = process.env.XDG_CONFIG_HOME || join(process.env.HOME!, ".config"); const dir = join(configDir, "autostart"); - const file = join(dir, "vencord.desktop"); + const file = join(dir, "vesktop.desktop"); + + // IM STUPID + const legacyName = join(dir, "vencord.desktop"); + if (existsSync(legacyName)) renameSync(legacyName, file); + + // "Quoting must be done by enclosing the argument between double quotes and escaping the double quote character, + // backtick character ("`"), dollar sign ("$") and backslash character ("\") by preceding it with an additional backslash character" + // https://specifications.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html#exec-variables + const commandLine = process.argv.map(arg => '"' + arg.replace(/["$`\\]/g, "\\$&") + '"').join(" "); return { isEnabled: () => existsSync(file), @@ -25,12 +34,11 @@ function makeAutoStartLinux(): AutoStart { const desktopFile = ` [Desktop Entry] Type=Application -Version=1.0 -Name=Vencord -Comment=Vencord autostart script -Exec=${process.execPath} -Terminal=false +Name=Vesktop +Comment=Vesktop autostart script +Exec=${commandLine} StartupNotify=false +Terminal=false `.trim(); mkdirSync(dir, { recursive: true }); From b09f035ea990232041e7dfdfbea4574ca510d0ea Mon Sep 17 00:00:00 2001 From: Vendicated Date: Tue, 12 Mar 2024 03:39:57 +0100 Subject: [PATCH 2/3] Bump to v1.5.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 2f87aa0..1130fb2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "vesktop", - "version": "1.5.0", + "version": "1.5.1", "private": true, "description": "", "keywords": [], From 4abae9c7082081dcae667916d9608e23adf688a9 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 12 Mar 2024 03:51:13 +0100 Subject: [PATCH 3/3] Metainfo for v1.5.1 (#436) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- meta/dev.vencord.Vesktop.metainfo.xml | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/meta/dev.vencord.Vesktop.metainfo.xml b/meta/dev.vencord.Vesktop.metainfo.xml index 2704585..3539878 100644 --- a/meta/dev.vencord.Vesktop.metainfo.xml +++ b/meta/dev.vencord.Vesktop.metainfo.xml @@ -28,6 +28,24 @@ + + https://github.com/Vencord/Vesktop/releases/tag/v1.5.1 + +

New Features

+
    +
  • Added categories to Vesktop settings to reduce visual clutter by @justin13888
  • +
  • Added support for Vencord's transparent window options
  • +
+

Fixes

+
    +
  • Fixed ugly error popups when starting Vesktop without working internet connection
  • +
  • Fixed popout title bars on Windows
  • +
  • Fixed spellcheck entries
  • +
  • Fixed screenshare audio using microphone on debian, by @Curve
  • +
  • Fixed a bug where autostart on Linux won't preserve command line flags
  • +
+
+
https://github.com/Vencord/Vesktop/releases/tag/v1.5.0 @@ -176,4 +194,4 @@ Privacy Mod - + \ No newline at end of file