Package Details: webcord 4.10.2-1

Git Clone URL: https://aur.archlinux.org/webcord.git (read-only, click to copy)
Package Base: webcord
Description: A Discord and SpaceBar Electron-based client implemented without Discord API
Upstream URL: https://github.com/SpacingBat3/WebCord
Keywords: discord electron spacebar webcord
Licenses: MIT
Submitter: Hanabishi
Maintainer: Hanabishi
Last Packager: Hanabishi
Votes: 41
Popularity: 0.58
First Submitted: 2021-11-06 15:32 (UTC)
Last Updated: 2024-10-07 16:36 (UTC)

Latest Comments

« First ‹ Previous 1 2 3 4 5 6 7 .. 10 Next › Last »

Hanabishi commented on 2023-10-31 11:42 (UTC)

This is how official packages do it.

https://wiki.archlinux.org/title/Wayland#Electron

Toesmasher commented on 2023-10-31 11:37 (UTC)

The current implementation of reading user flags currently reads electron25-flags.conf. While I can confirm that the reading of flags works as expected, including the electron version in the file name is not something I've seen in any other package. I would suggest simply using electron-flags.conf.

Hanabishi commented on 2023-10-31 10:43 (UTC)

Implemented reading of global electron flags.

Hanabishi commented on 2023-10-31 09:28 (UTC)

Not sure about webcord-flags.conf, but picking up global electron flags sounds like a good idea.

Toesmasher commented on 2023-10-31 09:21 (UTC)

Many electron packages grab electron-flags.conf for custom flags, or have their own defined such as brave-flags.conf or slack-flags.conf. I'd like to propose doing so for WebCord as well.

Patch example:

diff --git a/.gitignore b/.gitignore
index 3e0458e..d87f5ec 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,4 +3,5 @@
 !.SRCINFO
 !PKGBUILD
 !webcord.desktop
+!webcord
 !buildInfo.json
diff --git a/PKGBUILD b/PKGBUILD
index 567a5d7..373e3f0 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -17,12 +17,14 @@ source=(
     "${_snapshot}.tar.gz::${url}/archive/v${pkgver}.tar.gz"
     "buildInfo.json"
     "webcord.desktop"
+    "webcord"
 )

 sha256sums=(
     '27723a752ca4750eda16b7a1f93b785160f5f85460cc3a395a86f75c917db62a'
     'c803c7227982fad22390a8d6d11f3707171d5e9b1a394731a6a07773eab75b1f'
     '5923151d1cc05d7e2ab0cb2103921f5f3985e08e48c74e7aa12003b32c0e2bae'
+    'f2c4bc5ba00e469aafb75a5435e6dcfe133aee44f6e9025a8b60ac4b6577078c'
 )

 prepare() {
@@ -61,6 +63,9 @@ package() {
     install -Dm644 "${source[2]}" \
         -t "${pkgdir}/usr/share/applications"

+    install -Dm755 "${source[3]}" \
+        -t "${pkgdir}${bin}"
+
     cd "${_snapshot}"

     cp -r --parents "package.json" "app" "sources/"{"assets","translations"} "node_modules" \
@@ -73,8 +78,6 @@ package() {
     ln -sT "${lib}/sources/assets/icons/app.png" "${pkgdir}${icons}/${pkgname}.png"

     local exec="${pkgdir}${bin}/${pkgname}"
-    echo -n "#!/bin/sh
-exec '${_electron}' '${lib}' \"\$@\"
-" > "${exec}"
-    chmod +x "${exec}"
+
+    echo -n "exec '${_electron}' '${lib}' \${USER_FLAGS} \"\$@\"" >> "${exec}"
 }
diff --git a/webcord b/webcord
new file mode 100755
index 0000000..87f6472
--- /dev/null
+++ b/webcord
@@ -0,0 +1,9 @@
+#!/usr/bin/env bash
+XDG_CONFIG_HOME="${XDG_CONFIG_HOME:-$HOME/.config}"
+
+# Allow users to override command-line options
+USER_FLAGS_FILE="$XDG_CONFIG_HOME/webcord-flags.conf"
+if [[ -f $USER_FLAGS_FILE ]]; then
+   USER_FLAGS="$(cat $USER_FLAGS_FILE | sed 's/#.*//')"
+fi
+

The above patch reads out flags from webcord-flags.conf, electron-flags.conf might be preferable.

Hanabishi commented on 2023-10-15 10:11 (UTC)

Well, the app don't use any new functionality. 26-27 bumps were only to resolve bugs we are not affected here.

So I think for now there is more sense (and more convinient for users) to stick with Electron verison from the official repo.

Yamashiro commented on 2023-10-15 09:55 (UTC)

The release page for 4.5.0 says it's using Electron 27 now, shouldn't the dependency here be updated accordingly?

Hanabishi commented on 2023-10-07 11:20 (UTC) (edited on 2023-10-14 22:09 (UTC) by Hanabishi)

It totally does. esbuild supports glob syntax since 0.19.0.

And the current package version in official repository is 0.19.4. So you somehow have an outdated package version.

eclairevoyant commented on 2023-10-07 11:16 (UTC) (edited on 2023-10-07 11:16 (UTC) by eclairevoyant)

@Hanabishi Nonsense. My system is up to date, and I always build in a clean chroot, as per https://wiki.archlinux.org/title/DeveloperWiki:Building_in_a_clean_chroot

And if you read the error, this has nothing to do with any out-of-date package or being unable to find libraries, etc. as would indicate an outdated system.

Hanabishi commented on 2023-10-07 11:12 (UTC)

@eclairevoyant, update your system.