Giter VIP home page Giter VIP logo

pc-chat's Introduction

野火IM解决方案

野火IM是一套跨平台开源的即时通讯解决方案,主要包含以下内容。

仓库 说明 备注
android-chat 野火IM Android SDK源码和App源码 可以很方便地进行二次开发,或集成到现有应用当中
ios-chat 野火IM iOS SDK源码和App源码 可以很方便地进行二次开发,或集成到现有应用当中
pc-chat 基于Electron开发的PC平台应用
web-chat Web平台的Demo, 体验地址
wx-chat 微信小程序平台的Demo
server IM server
app server 应用服务端
robot_server 机器人服务端
push_server 推送服务器
docs 野火IM相关文档,包含设计、概念、开发、使用说明

pc-chat说明

本工程是野火IM PC平台,详情可以阅读docs.

开发一套IM系统真的很艰辛,请路过的朋友们给点个star,支持我们坚持下去🙏🙏🙏🙏🙏

联系我们

商务合作请优先采用邮箱和我们联系。技术问题请到野火IM论坛发帖交流。

  1. heavyrain.lee 邮箱: [email protected] 微信:wildfirechat
  2. imndx 邮箱: [email protected] 微信:wfchat

问题交流

  1. 如果大家发现bug,请在GitHub提issue
  2. 其他问题,请到野火IM论坛进行交流学习
  3. 微信公众号

体验

可下载我们已编译好的可执行文件进行体验,pc-chat 下载

login_qr

home

chat

create_conversation

开发

mac系统

环境准备

请严格安装下面的版本安装对应依赖,否则无法打包

  1. 最新版本的xCode
  2. nodejs 10.16.X
  3. npm 6.9.0
  4. python 2.7.X
  5. git
  6. npm install -g node-gyp
开发
$ npm install
$ npm run copy-mac
$ npm run dev

npm run copy-mac 是用来拷贝平台相关的功能库,如果功能库有更新,一定要再次运行拷贝。常见的错误是客户收到新的功能库,放到功能库目录后,忘记运行次命令,导致运行结果不正确。 开发、调试时,可用Login/index_dev.js替换Login/index.js,这样成功登录之后,刷新页面,不需要重新扫码登录。

打包
  1. npm install 安装依赖
  2. npm run package-mac 打包mac版本,软件生成在release目录下

windows系统

不能以管理员模式启动终端,必须以普通用户模式启动终端!!!

环境准备

请严格安装下面的版本安装对应依赖,否则无法打包

  1. nodejs v10.16.x
  2. python 2.7.X
  3. git
  4. npm 6.9.0
  5. npm install --global --vs2015 windows-build-tools # 安装内容较多,如果网络情况不好可能需要等较长时间,选择早上网络较好时安装是个好的选择
  6. npm install -g node-gyp
开发
  1. 启动CMD终端 (不能以管理员权限启动,要用普通权限)
  2. npm install
  3. 执行node -p "process.arch", 确认node架构
  4. node为32位时,执行npm run copy-win32
  5. node为64位时,执行npm run copy-win
  6. npm run dev

npm run copy-XXX 是用来拷贝平台相关的功能库,如果功能库有更新,一定要再次运行拷贝。常见的错误是客户收到新的功能库,放到功能库目录后,忘记运行次命令,导致运行结果不正确。

打包
  1. npm install 安装依赖(不能在管理员权限下运行,要用普通权限)
  2. npm run package-win32 打包windows 32位版本,软件生成在release目录下
  3. npm run package-win 打包window 64位版本,软件生成在release目录下

linux系统x64架构

环境准备

请严格安装下面的版本安装对应依赖,否则无法打包

  1. nodejs10.16.X
  2. python2.7X
  3. git
开发

具体开发、集成相关说明,请参考pc开发

$ npm install
$ npm run copy-linux
$ npm run dev
打包
  1. npm install 安装依赖
  2. npm run package-linux 打包linux版本,软件生成在release目录下

linux系统arm64架构

环境准备

请严格安装下面的版本安装对应依赖,否则无法打包

  1. nodejs10.16.X
  2. python2.7X
  3. git
  4. fpm
sudo apt-get update
sudo apt-get install ruby-dev build-essential
sudo gem install fpm -v 1.10.2

fpm 1.11版本有问题,需要使用1.10.2版本

开发

具体开发、集成相关说明,请参考pc开发

$ npm install
$ npm run copy-linux-arm64
$ npm run dev
打包
  1. npm install 安装依赖
  2. npm run package-linux-arm64 打包linux版本,软件生成在release目录下
常见问题
  1. 如何调试?PC使用了Electron,内嵌Chrome浏览器,跟在浏览器上开发调试是一样的。快捷键Ctrl +g(MAC下是CMD+g)打开开发者模式。

  2. 打包时,如果一直显示installing production dependencies platform=win32 arch=ia32 appDir=C:\<your path>\pc-chat\dist, 或者提示下载什么之类的,可将dep目录下对应平台的electron依赖,解压到对应的目录。

    // windows
    C:\Users\<你的用户名>\.electron-gyp
    // mac/linux
    ~/.electron-gyp
    
  3. 打包时,如果下载electron版本超时,可以使用我们下载好的electron放到缓存目录。

  4. windows上需要严格按照环境进行安装,mac上环境比较简单一些,安装node和node-gyp就可以了 另外如果还有问题,请试试命令npm cache clean --force ,然后删掉node_modules,再重新在非管理员权限下npm install

  5. 有些杀毒软件会对electron打包的软件报病毒,详情请参考electron报病毒 。安装时可能被杀毒软件限制安装,这时候可以让用户使用绿色免安装版(打包后release目录下的unpacked目录)。如果运行时报错,请在杀毒软件里加上例外。另外有条件的公司可以考虑去360官方或其他杀软的官方提交检测。

  6. ubuntu下,启动时,若提示,A JavaScript error occurred in the main process Uncaught Exception:Error: Cannot open /opt/wildfirechat/resources/app.asar/marswrapper.node: Error: libdouble-conversion.so.1: cannot open shared object file: No such file or directory,可安装libdouble-conversion1解决

  7. win平台野火客户端依赖Visual C++ Redistributable Package runtime。如果用户PC上没有安装就需要安装之后才能运行,请从微软官方下载安装 https://www.microsoft.com/zh-CN/download/details.aspx?id=48145 。注意这个安装包是有32位/64位区分的,需要安装对应架构的版本。

  8. MAC应用截屏时只能截屏空白桌面,无法截图窗口内容。这是因为没有通过mac系统的安全许可,在设置-》安全与隐私-》切换到隐私那个标签-》屏幕录制-》在野火IM PC应用前打勾,并重启应用。

  9. 使用cnpm后打包失败,在某些平台cnpm是会出现问题的,请使用npm。

  10. npm installUnexpected end of JSON input while parsing near...错误

    如果常见问题4解决不了,可以尝试  npm config set registry http://registry.npm.taobao.org/ ,然后在按常见问题4的步骤进行

  11. 音视频相关问题,请参考以下文档

    1. av readme
    2. 音视频常见问题

MAC 签名

如果本地存在合法的mac签名,打包程序会尝试进行签名。签名会失败,提示如下

⨯ Command failed: codesign --sign EACAEF96A100626DC13376F03E7F9E5D33A270AE --force --options runtime --entitlements mac/entitlements.mac.plist /Users/dali/Workspace/pc-chat/release/mac/wildfirechat.app/Contents/MacOS/wildfirechat
/Users/dali/Workspace/pc-chat/release/mac/wildfirechat.app/Contents/MacOS/wildfirechat: code object is not signed at all
In subcomponent: /Users/dali/Workspace/pc-chat/release/mac/wildfirechat.app/Contents/wfshot.app

其中--sign后的EACAEF96A100626DC13376F03E7F9E5D33A270AE为您的证书ID,然后使用下面命令进行签名,需要把下面的证书ID换成您自己的

# 把证书名称换成自己的
sh mac_sign.sh EACAEF96A100626DC13376F03E7F9E5D33A270AE

执行成功后,再次打包,就会顺利完成。

License

  1. Under the MIT license. See the LICENSE file for details.

  2. Under the 996ICU License. See the LICENSE file for details.

鸣谢

本项目基于wewechat开发,原项目的READ见wewechat readme

pc-chat's People

Contributors

imndx avatar trazyn avatar heavyrain2012 avatar siqiii avatar zhzbin89 avatar peaceme2019 avatar airycanon avatar axxop avatar yujun2013 avatar imhao183 avatar gaoyaoxin avatar kotojo avatar weizihua avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.