Skip to content

Commit 35611c7

Browse files
committed
#36 add wechat, fix opencloud desktop removal
1 parent 2aa6f45 commit 35611c7

8 files changed

Lines changed: 91 additions & 2 deletions

File tree

apps/opencloud/Dockerfile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ RUN \
1717
curl -o \
1818
/tmp/opencloud.app -L \
1919
"https://github.com/opencloud-eu/desktop/releases/download/${OC_VERSION}/OpenCloud_Desktop-${OC_VERSION}-linux-gcc-x86_64.AppImage" && \
20-
chmod +x /tmp/opencloud.app && \
2120
cd /tmp && \
2221
chmod +x /tmp/opencloud.app && \
2322
./opencloud.app --appimage-extract && \

apps/opencloud/remove

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ rm -f $HOME/.local/share/icons/hicolor/scalable/apps/opencloud.png
44
echo "Removing start menu entry"
55
rm -f $HOME/.local/share/applications/opencloud-pa.desktop
66
echo "Removing desktop shortcut"
7-
rm -f $HOME/Desktop/obsidian-pa.desktop
7+
rm -f $HOME/Desktop/opencloud-pa.desktop

apps/wechat/Dockerfile

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
ARG REPO
2+
FROM ghcr.io/${REPO}:debian-trixie AS rootfs
3+
ARG REPO
4+
5+
# Install packages
6+
RUN \
7+
echo "**** install packages ****" && \
8+
apt-get update && \
9+
apt-get install -y \
10+
libatk1.0-0 \
11+
libatk-bridge2.0-0 \
12+
libnss3 \
13+
libxcb-icccm4 \
14+
libxcb-image0 \
15+
libxcb-keysyms1 \
16+
libxcb-render-util0 \
17+
libxcb-shape0 \
18+
libxcomposite1 \
19+
libxdamage1 \
20+
libxkbcommon0 \
21+
libxkbcommon-x11-0 && \
22+
ARCH=$(uname -m| sed 's/aarch64/arm64/') && \
23+
curl -o \
24+
/tmp/wechat.app -L \
25+
"https://dldir1v6.qq.com/weixin/Universal/Linux/WeChatLinux_${ARCH}.AppImage" && \
26+
cd /tmp && \
27+
chmod +x /tmp/wechat.app && \
28+
./wechat.app --appimage-extract && \
29+
mv squashfs-root /opt/wechat && \
30+
echo "**** customize desktop file ****" && \
31+
sed -i \
32+
-e "/^Exec=/c Exec=/bin/sh -c \"\$HOME\/.local\/bin\/proot-apps run ghcr.io/${REPO}:wechat %U\"" \
33+
-e "s/Name=wechat/Name=wechat PA/g" \
34+
-e '/^TryExec=/d' \
35+
/opt/wechat/wechat.desktop && \
36+
mv \
37+
/opt/wechat/wechat.desktop \
38+
/usr/share/applications/wechat-pa.desktop && \
39+
echo "**** set bin name ****" && \
40+
echo "wechat-pa" > /bin-name && \
41+
echo "**** cleanup ****" && \
42+
apt-get autoclean && \
43+
rm -rf \
44+
/root/.cache \
45+
/var/lib/apt/lists/* \
46+
/var/tmp/* \
47+
/tmp/*
48+
49+
COPY ./entrypoint /entrypoint
50+
COPY ./install /install
51+
COPY ./remove /remove
52+
53+
FROM scratch
54+
COPY --from=rootfs / /

apps/wechat/entrypoint

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/bash
2+
3+
# Start wechat
4+
/opt/wechat/AppRun "$@"

apps/wechat/install

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#!/bin/bash
2+
3+
## Desktop and icons install ##
4+
echo "Adding icon"
5+
mkdir -p $HOME/.local/share/icons/hicolor/scalable/apps/
6+
cp \
7+
/opt/wechat/wechat.png \
8+
$HOME/.local/share/icons/hicolor/scalable/apps/
9+
echo "Adding start menu entry"
10+
mkdir -p $HOME/.local/share/applications/
11+
cp \
12+
/usr/share/applications/wechat-pa.desktop \
13+
$HOME/.local/share/applications/
14+
echo "Adding desktop shortcut"
15+
mkdir -p $HOME/Desktop
16+
cp \
17+
/usr/share/applications/wechat-pa.desktop \
18+
$HOME/Desktop/
19+
chmod +x $HOME/Desktop/wechat-pa.desktop

apps/wechat/remove

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/bin/bash
2+
echo "Removing icon"
3+
rm -f $HOME/.local/share/icons/hicolor/scalable/apps/wechat.png
4+
echo "Removing start menu entry"
5+
rm -f $HOME/.local/share/applications/wechat-pa.desktop
6+
echo "Removing desktop shortcut"
7+
rm -f $HOME/Desktop/wechat-pa.desktop

metadata/img/wechat.svg

Lines changed: 1 addition & 0 deletions
Loading

metadata/metadata.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -439,6 +439,11 @@ include:
439439
arch: linux/amd64,linux/arm64
440440
icon: webcord.png
441441
description: "WebCord can be summarized as a pack of security and privacy hardenings, Discord features reimplementations, Electron / Chromium / Discord bugs workarounds, stylesheets, internal pages and wrapped https://discord.com page, designed to conform with ToS as much as it is possible."
442+
- name: wechat
443+
full_name: WeChat
444+
arch: linux/amd64,linux/arm64
445+
icon: wechat.svg
446+
description: "WeChat or Weixin in Chinese is an instant messaging, social media, and mobile payment app developed by Tencent."
442447
- name: winegui
443448
full_name: WineGUI
444449
arch: linux/amd64

0 commit comments

Comments
 (0)