Giter VIP home page Giter VIP logo

wechat_web_devtools's Introduction

WeChat Web DevTools 是什么?

WeChat Web DevTools 是腾讯官方提供用于微信 Web 开发和微信小程序开发的工具,由于官方只提供了 Windows 和 MacOS 版的工具,很多 Linux 爱好者很苦恼,所以我就折腾了半天把成功贡献给大家

WeChat Web DevTools

应码友要求,现分离出核心版本,核心版本不包含 nwjs,体积大大减小,需要使用核心版本的请移步 https://github.com/yuan1994/wechat_web_devtools/tree/core

下载安装

阿里云OSS下载(推荐):

wget http://oss.yuan1994.com/github/wechat_dev_tools/latest/wechat_web_devtools.tar.gz
tar -zxvf wechat_dev_tools.tar.gz

或者直接下载:http://oss.yuan1994.com/github/wechat_dev_tools/latest/wechat_web_devtools.tar.gz

composer安装:

composer create-project yuan1994/wechat_web_devtools wechat_web_devtools  --prefer-dist

本人是玩 PHP 的,别拍我 ^_^

git克隆:

git clone https://github.com/yuan1994/wechat_web_devtools

直接下载:

https://github.com/yuan1994/wechat_web_devtools/archive/master.zip

开始使用

一键安装

cd /path/to/wechat_web_devtools
./install.sh <install_path>

执行 ./install.sh 命令时请不要使用 sudo,待会儿会提醒你输入密码的,否则会导致应用用户组错误 <install_path> 为安装路径,例如 /home/tianpian/software,默认为 /opt/tencent

按步骤安装

  1. 将下载后的安装包改名为 wechat_web_devtools
mv wechat_web_devtools-master wechat_web_devtools

直接使用 git 克隆或者 composer 安装的可以省去此步骤,因为下载后的文件名就是 wechat_web_devtools

  1. 创建文件夹
sudo mkdir /opt/tencent/
  1. 移动文件
sudo mv ./wechat_web_devtools /opt/tencent
  1. 修改用户组
sudo chown -R tianpian:tianpian /opt/tencent/wechat_web_devtools

请将上面的 tianpian 改成你自己当前用户的用户名,否则开发者工具运行时会提示无权限

  1. 启动软件
/opt/tencent/wechat_web_devtools/nw

至此最新版微信开发者工具就能正常运行啦,如果有问题请提交 issues ,请上传截图或者粘贴上终端的错误信息

以上命令都在 ubuntu 14.04 上测试通过

快捷启动

桌面快捷启动图标(在 ubuntu 14.04 系统上测试的)

移动快捷启动图标到系统里即可

sudo cp /opt/tencent/wechat_web_devtools/wechat_web_devtools.desktop /usr/share/applications/

然后按下 Windows 键,左上角输入软件名称 Wechat Web DevTools,点击图标启动即可

终端启动

// 建立软链接
sudo ln -s /opt/tencent/wechat_web_devtools/nw /usr/local/bin/wechat_web_devtools
// 使用命令启动
wechat_web_devtools &

推荐启动时加入 & 符号,这样可以启用后台进程,启动后等待终端输出信息后再回车一次,这样就可以解放一个终端了

微信开发工具老版本

微信开发工具 v0.7.0 支持移动调试,但以后的版本不支持了,为了在一台机器上使用多个微信开发工具,可以找到 package.json,将 package.json 文件中的 nameappname 都改名,例如在后面加一个 old,该方法在 Linux\MacOS\Windows 都适用, Linux 版 v0.7.0 请移步 https://github.com/yuan1994/wechat_web_devtools/tree/v0.7.0

本人是 Linux 小白,如果有错误的地方或可以修改的地方请大神指教,欢迎大神拍砖

免责声明

该微信开发者工具系腾讯旗下产品,版权归腾讯公司所有,如果版权侵犯请联系我

wechat_web_devtools's People

Contributors

a-wing avatar rexlevin avatar yuan1994 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

wechat_web_devtools's Issues

linux mint cinnamon 18 运行出错

太感谢了,制作了这个工具。不然我还得在linxu和虚拟机之间来回切换。
linux mint cinnamon 18安装没有问题,终端运行有错误提示:
[21324:21324:1121/165043:ERROR:browser_plugin_guest.cc(440)] Attempting to require callback on nonexistent surface
界面无法加载预览页面,一直显示进度条,时间长了会提示错误,如图,请问这个大概是什么问题呢?谢谢!
image
image

创建项目后出现编译错误问题……疑似nw版本问题?

WAService.js:7 Uncaught SyntaxError: Unexpected token <
util.js:1 Uncaught ReferenceError: define is not defined
app.js:1 Uncaught ReferenceError: define is not defined
index.js:1 Uncaught ReferenceError: define is not defined
appservice:17 Fri May 05 2017 01:50:08 GMT+0800 (CST) page 编译错误
appservice:18 pages/index/index 出现脚本错误或者未正确调用 Page()(anonymous function) @ appservice:18
logs.js:1 Uncaught ReferenceError: define is not defined
appservice:23 Fri May 05 2017 01:50:08 GMT+0800 (CST) page 编译错误
appservice:24 pages/logs/logs 出现脚本错误或者未正确调用 Page()(anonymous function) @ appservice:24

在目录树界面创建文件夹时不能重命名

本人在测试小程序的时候发现创建文件夹的时,更改名字后回车,顶部提示不能重命名该文件夹,手动修改了 777 权限后问题依旧,但是创建具体的 JS 、 JSON 、 WXML 、 WXSS 文件时却正常,请问有什么解决方法吗?

调用wcc路径问题

在使用中有个调用wcc的问题,始终会访问项目路径+home路径+wcc。
比如我的项目路径是:/depot/WebChatProject/demo
home下wcc路径是:/home/rexlevin/.config/微信web开发者工具/WeappVendor/wcc
最后报错信息是:Error: ENOENT: no such file or directory, open '/depot/WebChatProject/demo/home/rexlevin/.config/微信web开发者工具/WeappVendor/wcc'

另:哥们很快啊,我昨天才留意到tx更新的ide,还没下包看呢,你已经更新了。

Ubuntu14.04无法打开

xu-cat@xu-cat:~$ /opt/tencent/wechat_web_devtools/nw
bash: /opt/tencent/wechat_web_devtools/nw: cannot execute binary file: 可执行文件格式错误

xu-cat@xu-cat:~$ sudo /opt/tencent/wechat_web_devtools/nw
/opt/tencent/wechat_web_devtools/nw: 1: /opt/tencent/wechat_web_devtools/nw: Syntax error: word unexpected (expecting ")")

Linux小白,以下两句都试过
sudo chown -R xu-cat.xu-cat /opt/tencent
sudo chown -R xu-cat /opt/tencent

运行时候出现问题打不开

λ ~/ /opt/tencent/wechat_web_devtools/nw
[12966:12966:0505/163542:ERROR:desktop_window_tree_host_x11.cc(908)] Not implemented reached in virtual void views::DesktopWindowTreeHostX11::InitModalType(ui::ModalType)

Cannot find module 'async'

ubuntu

Error: Cannot find module 'async'
at Function.Module._resolveFilename (module.js:479:15)
at Function.Module._load (module.js:422:25)
at Module.require (module.js:507:17)
at require (internal/module.js:20:19)
at init (/home/sharkseven/installer/wechat_web_devtools/app/dist/common/request/request.js:1:3133)
at Object. (/home/sharkseven/installer/wechat_web_devtools/app/dist/common/request/request.js:1:3433)
at Module._compile (module.js:580:32)
at Object.Module._extensions..js (module.js:595:10)
at Module.load (module.js:497:32)
at tryModuleLoad (module.js:456:12)

bug

VM93:2 run-detectors: unable to find an interpreter for /home/simon/.config/微信web开发者工具/WeappVendor/wcc.exe

运行install.sh报错

git clone 下来后进入目录运行install.sh 报如下错误

cp: target '/opt/tencent/wechat_web_devtools' is not a directory
sed: can't read /opt/tencent/wechat_web_devtools/wechat_web_devtools.desktop: No such file or directory
chown: cannot access '/opt/tencent/wechat_web_devtools': No such file or directory
./install.sh: line 30: /opt/tencent/wechat_web_devtools/wechat_web_devtools: No such file or directory
cp: cannot stat '/opt/tencent/wechat_web_devtools/wechat_web_devtools.desktop': No such file or directory
chown: cannot dereference '/usr/local/bin/wechat_web_devtools': No such file or directory
Installation Successfully!

Application Path: /opt/tencent/wechat_web_devtools
Soft Link Path: /usr/local/bin/wechat_web_devtools

手动复制后可以运行,但是一直不显示登录二维码;

这是个什么错

VM96:2 run-detectors: unable to find an interpreter for /home/taoqf/.config/微信web开发者工具/WeappVendor/wcc.exe

加载运行报错

感谢库主的分享,我运行的时候报如下错误
console.group("Mon Jan 01 2018 09:42:21 GMT+0800 (CST) 渲染层错误")
console.error(/home/zhangdi/.config/微信web开发者工具/WeappVendor/wcc.exe: 1: /home/zhangdi/.config/微信web开发者工具/WeappVendor/wcc.exe: MZ������@������: not found /home/zhangdi/.config/微信web开发者工具/WeappVendor/wcc.exe: 5: /home/zhangdi/.config/微信web开发者工具/WeappVendor/wcc.exe: Syntax error: word unexpected (expecting ")") )

更新出错

本人ubuntu16.04. 本来是可以正常运行的,打开后提示更新,然后点了更新后就出错了.

/opt/tencent/wechat_web_devtools/node_modules/node-windows/lib/node-windows.js:19
  throw 'ngn-windows is only supported on Windows.';
  ^
ngn-windows is only supported on Windows.

求更新

希网作者能更新,或者可不可以分享一下适配方法,谢谢

Error: Invalid URL passed to App.getProxyForURL()

启动的时候弹窗:(无法加载以下来源的扩展程序:.清单文件缺失或不可读)
终端显示错误:

extensions::nw.App:66
    return nwNatives.getProxyForURL.apply(this, arguments);
                                    ^

Error: Invalid URL passed to App.getProxyForURL()
    at Object.<anonymous> (extensions::nw.App:66:37)
    at Object.handleRequest (extensions::binding:63:27)
    at Object.<anonymous> (extensions::binding:425:32)
    at Object.getProxyForURL (/opt/tencent/wechat_web_devtools/app/dist/utils/tools.js:1:2134)
    at b (/opt/tencent/wechat_web_devtools/app/dist/utils/checkUp.js:1:582)
    at c (/opt/tencent/wechat_web_devtools/app/dist/utils/checkUp.js:1:854)
    at e (/opt/tencent/wechat_web_devtools/app/dist/utils/checkUp.js:1:2190)
    at _exports (/opt/tencent/wechat_web_devtools/app/dist/utils/checkUp.js:1:3467)
    at b (/opt/tencent/wechat_web_devtools/app/dist/common/loadInit/init.js:1:971)
    at Request.g [as _callback] (/opt/tencent/wechat_web_devtools/app/dist/common/request/request.js:1:3024)

Uncaught ReferenceError: define is not defined

今天一打开开发工具,就看到一个消息显示说WAService更新了,结果发现有这样的错。于是创建了一个默认的那个helloworld小程序,出现同样的错。

image

ubuntu16启动时报错,但能启动网页开发

如图
终端输出如下:
/opt/tencent/wechat_web_devtools/nw
[8255:8255:0215/102832:ERROR:desktop_window_tree_host_x11.cc(1131)] Not implemented reached in virtual void views::DesktopWindowTreeHostX11::InitModalType(ui::ModalType)
extensions::nw.App:66
return nwNatives.getProxyForURL.apply(this, arguments);
^

Error: Invalid URL passed to App.getProxyForURL()
at Object. (extensions::nw.App:66:37)
at Object.handleRequest (extensions::binding:63:27)
at Object. (extensions::binding:425:32)
at Object.getProxyForURL (/opt/tencent/wechat_web_devtools/app/dist/utils/tools.js:1:2134)
at b (/opt/tencent/wechat_web_devtools/app/dist/utils/checkUp.js:1:582)
at c (/opt/tencent/wechat_web_devtools/app/dist/utils/checkUp.js:1:854)
at e (/opt/tencent/wechat_web_devtools/app/dist/utils/checkUp.js:1:2190)
at _exports (/opt/tencent/wechat_web_devtools/app/dist/utils/checkUp.js:1:3467)
at b (/opt/tencent/wechat_web_devtools/app/dist/common/loadInit/init.js:1:971)
at Request.g [as _callback] (/opt/tencent/wechat_web_devtools/app/dist/common/request/request.js:1:3024)

使用quickstart测试新安装的wechat_web_devtools出错—变异.xml文件错误

您好,首先很感谢您的工作...
我使用一键安装完整版wechat_web_devtools,引用quickstart空项目,打开项目后出现如下错误,抄录信息如下:

编译.wxml文件错误,错误信息:/home/zhouyl/.config/微信web开发者工具/WeappVendor/wcc.exe: 1: /home/zhouyl/.config/微信web开发者工具/WeappVendor/wcc.exe: Mz????@????: not found
/home/zhouyl/.config/微信web开发者工具/WeappVendor/wcc.exe: 5: /home/zhouyl/.config/微信web开发者工具/WeappVendor/wcc.exe: Syntax error: word unexpected (expecting ")"),可在控制台查看更详细信息

编译后,调试信息定位到

console.error( pages/logs/logs 出现脚本错误或者未正确调用 Page())

Sourcesindex.js确实发现圆括号和花括号的语法有些问题

define("pages/index/index.js", function(require, module, exports, window,document,frames,self,location,navigator,localStorage,history,Caches,screen,alert,confirm,prompt,fetch,XMLHttpRequest,WebSocket,webkit,WeixinJSCore,WeixinJSBridge,Reporter,print){ 'use strict';

我尝试修改在上述 index.js补回括号,可能是无法保存,所以没看到修改后的效果。
没办法,于是抛个issue给您,希望您能提供帮助,多谢!

界面显示有问题

安装成功 但是运行官方demo时界面出不来 appid也是对的 扫描到手机上查看界面是正常的 很奇怪的问题 求大神指教

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.