BitiTiger / qtcreator-plugin-discord-presence

Discord Rich Presence plugin for newer versions of Qt Creator (fork that follows Arch Linux's package versions)
GNU General Public License v3.0
0 stars 0 forks source link

libdiscord-rpc.so is not included in the CI artifact #1

Open BitiTiger opened 6 months ago

BitiTiger commented 6 months ago

When installing the plugin generated from GitHub CI, I get a warning about a missing libdiscord-rpc.so file. The file has to be fetched from the Discord RPC repo. This should be easy to script into the CI.

Error from Qt Creator:

/home/cait/.local/share/data/QtProject/qtcreator/plugins/12.0.2/lib/qtcreator/plugins/libCuteDiscordPresence.so: Cannot load library /home/cait/.local/share/data/QtProject/qtcreator/plugins/12.0.2/lib/qtcreator/plugins/libCuteDiscordPresence.so: (libdiscord-rpc.so: kan inte öppna delad objektfil: Filen eller katalogen finns inte)

A directory tree of the plugins directory:

cait@Mikoshi ~> cd .local/share/data/QtProject/qtcreator/plugins/
cait@Mikoshi ~/.l/s/d/Q/q/plugins> eza --tree --icons -al
drwxr-xr-x   - cait 12 mar 19:50  .
drwxr-xr-x   - cait 12 mar 19:50 └──  12.0.2
drwxr-xr-x   - cait 12 mar 19:50    └──  lib
drwxr-xr-x   - cait 12 mar 19:50       └──  qtcreator
.rw-r--r-- 14k cait 12 mar 19:50          ├──  libdiscord-rpc.so.12
.rw-r--r-- 14k cait 12 mar 19:50          ├──  libdiscord-rpc.so.12.0.2
drwxr-xr-x   - cait 12 mar 19:50          └──  plugins
.rw-r--r-- 73k cait 12 mar 19:50             └──  libCuteDiscordPresence.so
cait@Mikoshi ~/.l/s/d/Q/q/plugins> 

A directory tree of the 7z file:

cait@Mikoshi ~/Hämtningar> 7z l CuteDiscordPresence-12.0.2-linux-x64.7z 

7-Zip [64] 17.05 : Copyright (c) 1999-2021 Igor Pavlov : 2017-08-28
p7zip Version 17.05 (locale=sv_SE.UTF-8,Utf16=on,HugeFiles=on,64 bits,20 CPUs x64)

Scanning the drive for archives:
1 file, 22370 bytes (22 KiB)

Listing archive: CuteDiscordPresence-12.0.2-linux-x64.7z

--
Path = CuteDiscordPresence-12.0.2-linux-x64.7z
Type = 7z
Physical Size = 22370
Headers Size = 259
Method = LZMA2:96k
Solid = +
Blocks = 1

   Date      Time    Attr         Size   Compressed  Name
------------------- ----- ------------ ------------  ------------------------
2024-03-12 17:52:53 D....            0            0  lib
2024-03-12 17:52:53 D....            0            0  lib/qtcreator
2024-03-12 17:52:53 D....            0            0  lib/qtcreator/plugins
2024-03-12 17:52:53 ....A           24        22111  lib/qtcreator/libdiscord-rpc.so.12
2024-03-12 17:52:53 ....A        14064               lib/qtcreator/libdiscord-rpc.so.12.0.2
2024-03-12 17:52:53 ....A        72968               lib/qtcreator/plugins/libCuteDiscordPresence.so
------------------- ----- ------------ ------------  ------------------------
2024-03-12 17:52:53              87056        22111  3 files, 3 folders
cait@Mikoshi ~/Hämtningar> 
BitiTiger commented 6 months ago

I can confirm that grabbing the Linux build of Discord RPC from the releases page will fix this issue. Copying discord-rpc/linux-dynamic/lib/libdiscord-rpc.so from the release zip archive to ~/.local/share/data/QtProject/qtcreator/plugins/12.0.2/lib/qtcreator/plugins/libdiscord-rpc.so will solve the problem.

This file can be fetched by the CI script and added to the artifact at lib/qtcreator/plugins/libdiscord-rpc.so. Then it will be installed to the correct location and this plugin will finally work normally.

eduardoc7 commented 5 months ago

Just commenting that this issue has been resolved in the latest changes to the plugin. You can check it out in the released version: https://github.com/eduardoc7/qtcreator-plugin-discord-presence/releases/tag/v0.1.0

And update your fork. Thank you for reporting