Projects based on the developer’s path: github.com/dawndiy/ele… I made some minor changes to the project. But eventually electronic-wechat was packaged as a Snap app.
\
1) Plan 1
\
In the whole scenario, we simply download and package a stably compiled release. Source code for this project:
Github.com/liu-xiao-gu…
\
snapcraft.yaml
\
Name: electronic-wechat version: '1.4.0' Summary: A better wechat on macOS and Linux. Built with Electron. Description: | Electronic WeChat is a unoffical WeChat client. A better WeChat on macOS and Linux. Built with Electron. grade: stable # must be 'stable' to release into candidate/stable channels confinement: strict # use 'strict' once you have the right plugs and slots apps: electronic-wechat: command: desktop-launch $SNAP/wechat.wrapper plugs: - unity7 - opengl - network - pulseaudio - home - browser-support - gsettings - x11 parts: electronic-wechat: plugin: Dump the source: https://github.com/geeeeeeeeek/electronic-wechat/releases/download/v1.4.0/linux-x64.tar.gz stage - packages: - libnss3 - fontconfig-config - gnome-themes-standard - fonts-wqy-microhei - libasound2-data - fcitx-frontend-gtk2 - overlay-scrollbar-gtk2 - libatk-adaptor - libcanberra-gtk-module filesets: no-easy-install-files: - -usr/sbin/update-icon-caches - -README.md stage: - $no-easy-install-files prime: - $no-easy-install-files wechat-copy: plugin: dump source: . filesets: wechat.wrapper: wechat.wrapper after: - electronic-wechat - desktop-gtk2Copy the code
\
Here, we directly download the address https://github.com/geeeeeeeeek/electronic-wechat/releases/download/v1.4.0/linux-x64.tar.gz has compiled a stable version, And pack it. Here we can use the dump plugin to help us install.
\
2) Plan 2
\
We can use the latest code to compile and package. The source code for this project is at:
\
Github.com/liu-xiao-gu… \
\
snapcraft.yaml
\
Name: electronic-wechat version: '1.4.0' Summary: A better wechat on macOS and Linux. Built with Electron. Description: | Electronic WeChat is a unoffical WeChat client. A better WeChat on macOS and Linux. Built with Electron. grade: stable # must be 'stable' to release into candidate/stable channels confinement: strict # use 'strict' once you have the right plugs and slots apps: electronic-wechat: command: desktop-launch $SNAP/wechat.wrapper plugs: - unity7 - opengl - network - pulseaudio - home - browser-support - gsettings - x11 parts: electronic-wechat: plugin: nodejs source-type: git source: https://github.com/geeeeeeeeek/electronic-wechat/ source-branch: production npm-run: - build:linux install: cp -r dist $SNAPCRAFT_PART_INSTALL stage-packages: - libnss3 - fontconfig-config - gnome-themes-standard - fonts-wqy-microhei - libasound2-data - fcitx-frontend-gtk2 - overlay-scrollbar-gtk2 - libatk-adaptor - libcanberra-gtk-module filesets: no-easy-install-files: - -usr/sbin/update-icon-caches - -README.md stage: - $no-easy-install-files prime: - $no-easy-install-files wechat-copy: plugin: dump source: . filesets: wechat.wrapper: wechat.wrapper after: - electronic-wechat - desktop-gtk2Copy the code
The latest code is at github.com/geeeeeeeeek… It can be found. We use the NodeJS plugin to help us package. Here we use snapcraft Scriplets to override install in our nodeJS plugin:
\
install: cp -r dist $SNAPCRAFT_PART_INSTALL
Copy the code
\
We can even delete npm-run and use snapcraft Scriplets:
\
build: npm run build:linux
Copy the code
\
We type the following command in the root directory of the project:
\
$ snapcraft
Copy the code
It will finally help us generate the.snap files we need. We can install into our system:
\
$ sudo snap install electronic-wechat_1.4.0_amd64.snap --dangerous
Copy the code
\
liuxg@liuxg:~$Snap List Name Version Rev Developer Notes Core 16.04.1 888 Canonical - Electronic -wechat 1.4.0 x1 - Hello-world 6.3 27 Canonical - Hello-xiaoguo 1.0 x1 - Snappy -debug 0.28 26 Canonical - Ubuntu - app-Platform 1 22 canonical -Copy the code
We can see that Electronic-Wechat has been successfully installed on my computer. To run our app:
\
\
\
\
\
\
\
\