如何打包electronic-wechat(微信)为snap包
来源:互联网 发布:www.4399js.com 编辑:程序博客网 时间:2024/05/19 15:25
基于开发者程路的项目:https://github.com/dawndiy/electronic-wechat-snap,我对该项目做了一些小的修改.但最终把electronic-wechat打包为snap应用.
1)方案一
在整个方案中,我们直接把一个稳定编译好的发布直接下载打包.这个项目的源码:
https://github.com/liu-xiao-guo/wechat
snapcraft.yaml
name: electronic-wechatversion: '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 channelsconfinement: strict # use 'strict' once you have the right plugs and slotsapps: electronic-wechat: command: desktop-launch $SNAP/wechat.wrapper plugs: - unity7 - opengl - network - pulseaudio - home - browser-support - gsettings - x11parts: electronic-wechat: plugin: dump 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-gtk2
2)方案二
我们可以利用最新的代码来编译,并打包.这个项目的源码在:
https://github.com/liu-xiao-guo/wechat1
snapcraft.yaml
name: electronic-wechatversion: '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 channelsconfinement: strict # use 'strict' once you have the right plugs and slotsapps: electronic-wechat: command: desktop-launch $SNAP/wechat.wrapper plugs: - unity7 - opengl - network - pulseaudio - home - browser-support - gsettings - x11parts: 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-gtk2
最新的代码在地址https://github.com/geeeeeeeeek/electronic-wechat/可以找到.我们利用nodejs plugin来帮我们进行打包.在这里,我们使用了snapcraft的Scriplets来覆盖我们的nodejs plugin中的install:
install: cp -r dist $SNAPCRAFT_PART_INSTALL
对于上面的npm-run那一句,我们甚至也可以删除,并用snapcraft中的Scriplets来实现:
build: npm run build:linux
我们在项目的根目录下打入如下的命令:
$ snapcraft
它将最终帮我们生成我们所需要的.snap文件.我们可以安装到我们的系统中:
$ sudo snap install electronic-wechat_1.4.0_amd64.snap --dangerous
liuxg@liuxg:~$ snap listName Version Rev Developer Notescore 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 -
我们可以看到electronic-wechat已经被成功安装到我的电脑中.运行我们的应用:
0 0
- 如何打包electronic-wechat(微信)为snap包
- electronic-wechat
- Linux和Mac下的微信电脑版electronic-wechat(非官方)
- linux (ubuntu/mint)安装electronic-wechat
- fedora electronic-wechat安装
- 如何为我们的Snappy Ubuntu应用编译并打包Snap(1)
- 如何为我们的Snappy Ubuntu应用编译并打包Snap(2)
- 如何为我们的Snappy Ubuntu应用编译并打包Snap(1)
- 如何把HTML5应用打包为一个snap应用
- 如何在ubuntu下安装微信electronic-chat
- 微信(WeChat web page)
- weChat微信 研究
- 如何打包nodejs snap应用
- 如何使用QEMU来编译打包armhf/arm64的snap包
- 如何把一个qmake的Ubuntu手机应用打包为一个snap应用
- 如何把一个CMake的Ubuntu手机应用打包为一个snap应用
- 如何把一个Qt应用打包为一个snap应用--snapcraft scriptlets应用实例
- Zabbix-3.0.3实现微信(WeChat)告警
- 从几个动物故事告诉你如何做好团队管理
- led驱动程序的总结
- 归档与压缩命令的总结 -- gzip, gunzip, zcat, bzip2, bunzip2, bzcat, xz, unxz, xzcat, zip, unzip, tar
- 电脑开机服务器模式,nas模式,一体化OS和PAAS,支持远程开机装APP,宿舍家用,神器
- 可怕的线程上下文类装载器(TCCL)
- 如何打包electronic-wechat(微信)为snap包
- 数据结构(一)排序算法
- 使用NSURLSessionDataTask发送get和post请求
- 数据结构经典算法学习之01背包问题
- Android多语言适配文件夹命名
- 生成树
- 大学是什么?如何渡过?
- 第17章 控件模版(6)——通过样式应用模版
- 1关于网络的思考,pc如何接入互联网 2互联网是什么? 3pc之间怎么互相访问?