Top Related Projects
小程序组件化开发框架
This is the repo for Vue 2. For Vue 3, go to https://github.com/vuejs/core
A cross-platform framework using Vue.js
开放式跨端跨框架解决方案,支持使用 React/Vue/Nerv 等框架来开发微信/京东/百度/支付宝/字节跳动/ QQ 小程序/H5/React Native 等应用。 https://taro.zone/
🦎 一套代码运行多端,一端所见即多端所见
微信小程序组件 / API / 云开发示例
Quick Overview
The cytle/wechat_web_devtools repository is an unofficial Linux port of the WeChat Web DevTools. It allows developers to run WeChat mini-programs and official account development tools on Linux systems, which are officially only supported on Windows and macOS.
Pros
- Enables WeChat development on Linux platforms
- Provides a workaround for developers who prefer or require Linux environments
- Regularly updated to keep pace with official WeChat Web DevTools releases
- Includes installation scripts and detailed documentation for easy setup
Cons
- Unofficial port, which may lack full feature parity with official versions
- Potential for compatibility issues or bugs not present in official releases
- May require additional setup steps compared to official Windows/macOS versions
- Could be affected by changes in WeChat's policies or development tools
Getting Started
To install and run the WeChat Web DevTools on Linux:
-
Clone the repository:
git clone https://github.com/cytle/wechat_web_devtools.git
-
Navigate to the project directory:
cd wechat_web_devtools
-
Run the installation script:
./bin/wxdt install
-
Launch the WeChat Web DevTools:
./bin/wxdt
For more detailed instructions and troubleshooting, refer to the project's README.md file.
Competitor Comparisons
小程序组件化开发框架
Pros of wepy
- Official framework developed by Tencent, ensuring long-term support and compatibility
- Offers a Vue.js-like development experience, making it easier for Vue developers to transition
- Provides a more comprehensive ecosystem with plugins and components
Cons of wepy
- Steeper learning curve for developers not familiar with Vue.js
- May introduce additional complexity for simpler projects
- Less flexibility compared to using native WeChat Mini Program development tools
Code Comparison
wepy:
<template>
<view>{{ message }}</view>
</template>
<script>
import wepy from 'wepy'
export default class MyComponent extends wepy.component {
data = {
message: 'Hello, WePY!'
}
}
</script>
wechat_web_devtools:
Page({
data: {
message: 'Hello, WeChat Mini Program!'
}
})
wepy provides a more structured, component-based approach similar to Vue.js, while wechat_web_devtools uses the native WeChat Mini Program syntax. wepy's code structure may be more familiar to web developers, but it requires additional compilation steps. wechat_web_devtools offers a more direct development experience within the WeChat ecosystem.
This is the repo for Vue 2. For Vue 3, go to https://github.com/vuejs/core
Pros of Vue
- Larger community and ecosystem, with more resources and third-party libraries
- More versatile, suitable for a wide range of web applications
- Better documentation and learning resources
Cons of Vue
- Steeper learning curve for beginners compared to wechat_web_devtools
- May be overkill for simple projects or specific WeChat mini-program development
- Requires additional setup and configuration for WeChat-specific features
Code Comparison
Vue component example:
<template>
<div>{{ message }}</div>
</template>
<script>
export default {
data() {
return {
message: 'Hello, Vue!'
}
}
}
</script>
wechat_web_devtools WeChat mini-program example:
Page({
data: {
message: 'Hello, WeChat!'
},
onLoad: function() {
// Page initialization
}
})
The Vue example shows a component-based structure with separate template and script sections, while the wechat_web_devtools example demonstrates a more straightforward page-based approach specific to WeChat mini-programs.
A cross-platform framework using Vue.js
Pros of uni-app
- Cross-platform development: Supports multiple platforms including iOS, Android, Web, and various mini-programs
- Rich ecosystem: Extensive plugin library and UI components
- Vue.js-based: Familiar syntax for Vue developers
Cons of uni-app
- Steeper learning curve: Requires understanding of uni-app specific concepts
- Limited customization: Some platform-specific features may be challenging to implement
Code Comparison
uni-app:
<template>
<view>
<text>{{ message }}</text>
</view>
</template>
<script>
export default {
data() {
return {
message: 'Hello uni-app!'
}
}
}
</script>
wechat_web_devtools:
Page({
data: {
message: 'Hello WeChat!'
}
})
Key Differences
- uni-app uses Vue.js syntax, while wechat_web_devtools uses WeChat's proprietary framework
- uni-app offers cross-platform development, whereas wechat_web_devtools is specific to WeChat mini-programs
- uni-app has a more extensive ecosystem, but wechat_web_devtools provides deeper integration with WeChat features
Use Cases
- Choose uni-app for cross-platform projects targeting multiple app stores and platforms
- Opt for wechat_web_devtools when focusing solely on WeChat mini-program development with native WeChat capabilities
开放式跨端跨框架解决方案,支持使用 React/Vue/Nerv 等框架来开发微信/京东/百度/支付宝/字节跳动/ QQ 小程序/H5/React Native 等应用。 https://taro.zone/
Pros of Taro
- Cross-platform development: Taro supports multiple platforms, including WeChat Mini Programs, H5, React Native, and more
- Unified development experience: Uses React-like syntax for consistent coding across platforms
- Active community and regular updates: Maintained by a large team with frequent releases and improvements
Cons of Taro
- Learning curve: Requires understanding of React concepts and Taro-specific APIs
- Build process complexity: May require additional configuration for optimal performance across platforms
Code Comparison
Taro (React-like syntax):
import { Component } from '@tarojs/taro'
import { View, Text } from '@tarojs/components'
export default class Index extends Component {
render() {
return <View><Text>Hello, World!</Text></View>
}
}
wechat_web_devtools (Native WeChat Mini Program syntax):
Page({
data: {},
onLoad: function() {
console.log('Page loaded')
}
})
Key Differences
- Taro provides a more familiar React-like development experience
- wechat_web_devtools focuses specifically on WeChat Mini Programs
- Taro offers greater flexibility for cross-platform development
- wechat_web_devtools provides a more direct approach to WeChat-specific features
Both projects aim to improve the development experience for WeChat Mini Programs, but Taro extends its reach to multiple platforms while wechat_web_devtools specializes in the WeChat ecosystem.
🦎 一套代码运行多端,一端所见即多端所见
Pros of Chameleon
- Cross-platform development framework supporting multiple platforms (Web, WeChat Mini Program, Alipay Mini Program, Baidu Smart Program, etc.)
- Unified development experience with a single codebase for multiple platforms
- Rich set of UI components and APIs for rapid development
Cons of Chameleon
- Steeper learning curve due to its custom syntax and framework-specific concepts
- Potentially less flexibility compared to native platform development
- May have limitations in accessing certain platform-specific features
Code Comparison
Chameleon:
<template>
<view>
<text>Hello, {{name}}!</text>
</view>
</template>
<script>
class Index {
data = {
name: 'Chameleon'
}
}
export default new Index();
</script>
wechat_web_devtools:
Page({
data: {
name: 'WeChat'
},
onLoad: function() {
// Page initialization
}
})
Key Differences
- Chameleon uses a Vue-like syntax for component development, while wechat_web_devtools follows WeChat Mini Program's native syntax
- Chameleon aims for cross-platform compatibility, whereas wechat_web_devtools is specifically for WeChat Mini Program development
- Chameleon provides a more abstracted development approach, while wechat_web_devtools offers direct access to WeChat-specific APIs and features
微信小程序组件 / API / 云开发示例
Pros of miniprogram-demo
- Official demo from WeChat, ensuring up-to-date and accurate implementation
- Comprehensive examples covering various WeChat Mini Program features
- Well-structured and documented, making it easier for developers to learn and implement
Cons of miniprogram-demo
- Focused solely on WeChat Mini Program development, lacking cross-platform compatibility
- May not include advanced or custom implementations that some developers might need
Code Comparison
miniprogram-demo:
Page({
data: {
text: 'This is page data.'
},
onLoad: function(options) {
// Page load
},
onReady: function() {
// Page ready
}
})
wechat_web_devtools:
const nw = require('nw.gui');
const path = require('path');
const fs = require('fs');
function createWindow() {
// Create window logic
}
The code snippets highlight the different focus of each repository. miniprogram-demo showcases actual WeChat Mini Program page structure and lifecycle methods, while wechat_web_devtools deals with creating a development environment using NW.js.
Convert
designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual CopilotREADME
Linux微信webå¼åè å·¥å ·
linux ä¸ä½¿ç¨å¾®ä¿¡webå¼åè å·¥å ·.
Description
Linux微信webå¼åè
å·¥å
·, å¯å¨ linux
æ¡é¢ç¯å¢è·èµ· 微信å¼åè
å·¥å
·
,
åçæ¯ 微信å¼åè
å·¥å
·
æ¬è´¨æ¯ nw.js
ç¨åº, æå®ç§»æ¤å° linux
䏿²¡å¤§é®é¢.
è´è´£ç¼è¯ wxml
å wxss
ç wcc
å wcsc
(å¯è½è¿æå
¶ä»åè½),
åå©ç¨ wine
æ¥è·å³å¯.
Usage
ä¸è½½é¡¹ç®ååå§å
git clone https://github.com/cytle/wechat_web_devtools.git
cd wechat_web_devtools
# èªå¨ä¸è½½ææ° `nw.js` , åæ¶é¨ç½²ç®å½ `~/.config/wechat_web_devtools/`
./bin/wxdt install
å¯å¨ideï¼å¼ååè°è¯ç½é¡µ
è¿è¡åå¤:
GUI
ç¯å¢
./bin/wxdt # å¯å¨
å¯å¨ideï¼å¼ååé¢è§å°ç¨åº
è¿è¡åå¤:
GUI
ç¯å¢- éè¦å®è£
wine
- å¹¶ä¸å·²ç»æ§è¡è¿
./bin/wxdt install
./bin/wxdt # å¯å¨
å½ä»¤è¡åHTTPè°ç¨
è¿è¡åå¤:
GUI
ç¯å¢ï¼å½ä»¤è¡åHTTPè°ç¨
ä¼èªå¨å¯å¨ide
(æå¡å¨æ²¡æ¡ä»¶çå¯ä»¥ä½¿ç¨docker
)- å¹¶ä¸å·²ç»æ§è¡è¿
./bin/wxdt install
- å¨
ide
ç设置ä¸å¼å¯æå¡ç«¯å£ï¼ 设置 -> å®å ¨ -> æå¡ç«¯å£(å¼å¯)
å½ä»¤è¡å·¥å
·æå¨ä½ç½®: <å®è£
è·¯å¾>/bin/cli
端å£å·æä»¶ä½ç½®ï¼~/.config/wechat_web_devtools/Default/.ide
å¾®ä¿¡ææ¡£åè:
Docker
æªå®è£
wine
ï¼ä»
écli
è°ç¨
å¯ä»¥ç´æ¥run
docker run -it \
-v $PWD:/projects \
canyoutle/wxdt \
sh -c "cli -l && cli -p /projects/your-project"
ææ¯å¯å¨ä¸ä¸ªæä¹ ç容å¨
docker run -d \
--name wxdt \
-p 6080:80 \
-v $PWD:/projects \
canyoutle/wxdt
docker exec -it wxdt cli -l # ç»å½
docker exec -it wxdt cli -p /projects/your-project # é¢è§å·¥ç¨
docker stop wxdt # æå容å¨
docker start wxdt # 䏿¬¡ä½¿ç¨ï¼ä¸ç¨årunï¼å¯ä»¥ç´æ¥exec
å ¶å®è¯´æ
å®è£ Wine
请åèæç´¢å¼æå®è£
Wineï¼ä»¥ä¸æ¯Ubuntu
ä¸ä¸¤ç§å®è£
1. å®è£
wine-binfmt
sudo apt-get install wine-binfmt
sudo update-binfmts --import /usr/share/binfmts/wine
2. æ£å¸¸å®è£
wine
dpkg --add-architecture i386 \
&& wget -nc https://dl.winehq.org/wine-builds/winehq.key \
&& apt-key add winehq.key \
&& apt-add-repository 'deb https://dl.winehq.org/wine-builds/ubuntu/ bionic main' \
&& apt-get update \
&& apt-get install -y --no-install-recommends --allow-unauthenticated winehq-stable
./bin/wxdt install
æ¥é失败
./nw: error while loading shared libraries: libnw.so: cannot open shared object file: No such file or directory
该é误æ¯ç± nw.js
ä¸è½½å¤±è´¥æè´.
å é¤ç¼å, éæ°ä¸è½½å³å¯.
rm -rf /path/to/wechat_web_devtools/dist
rm -rf /tmp/wxdt_xsp
# 请å¡å¿
çå¾
æ§è¡å®æ
./bin/wxdt install
åè
wcc
å wcsc
ç¼è¯é误
æ¯wine
没å®è£
好导è´çï¼ææ¯æ²¡ææåæ¿æ¢wcc
å wcsc
两个äºè¿å¶æä»¶
- æ¹æ¡ä¸: å®è£
wine
并䏿§è¡./bin/wxdt install
- æ¹æ¡äº: å®è£
wine-binfmt
宿å, ç¹å» ç¼è¯ å³å¯.
åè:
- https://github.com/cytle/wechat_web_devtools/issues/66#issuecomment-368434141
- https://github.com/cytle/wechat_web_devtools/issues/56#issuecomment-371999385
æ´æ°å°ææ°ç
æ¹æ¡ä¸: ç´æ¥ä»å½åé¡¹ç®æºç è¿è¡ æ´æ° (稳å®, æ¨è)
git pull origin
æ¹æ¡äº: 使ç¨è ¾è®¯åå§å®è£ ç¨åº è¿è¡ èªå©å¤å¶æ´æ° (åæ¶, èªè¡æè ¾)
注: 妿æ½é£äº, å¯ä»¥å°è¯ä½¿ç¨ git reset --hard
çæä½, è¿åå°æåçç¶æ.
æ§è¡æ´æ°, èªå¨ä¸è½½ææ° Windows x64
çå¼åè
å·¥å
·, å¹¶ä¸ä½¿ç¨7z
è§£å. Â
./bin/update_package_nw.sh
æ¹æ¡ä¸: åä¸ æå¨æå® -l <微信å¼åå·¥å ·ä¸è½½å°å> -v <çæ¬å·> (坿å®é¢åå¸çæå¼åç)
注: -l -v é项å¡å¿ åæ¶æå®, å¹¶ä¸çæ¬å· å½¢å¦1.02.2001191
./bin/update_package_nw.sh -l <微信å¼åå·¥å
·ä¸è½½å°å> -v <çæ¬å·>
Tips
- è¿è¡æ²¡é®é¢ï¼æ¬¢è¿PR
Ubuntuç¯å¢ä¸ç¼è¾å¨åä½å®è£
Ubuntuç¯å¢ä¸é»è®¤æ²¡æCosolas
åä½ï¼åæ¶ç®åæ æ³ä¿®æ¹åä½ï¼å æ¤ä¸è½½å®è£
Consolaså使¯è¾ä¼æ¹æ¡ï¼ä½¿å¾ç¼è¾å¨å°æ¾ç¤ºæ´èæã
- ä¸è½½
https://github.com/kakkoyun/linux.files/raw/master/fonts/Consolas.ttf
è³/usr/local/share/fonts
or~/.fonts
sudo fc-cache -f
é建åä½ç¼å- 确认åä½å®è£ æå
sudo fc-list|grep Consol
.fonts/Consolas.ttf: Consolas:style=Regular
- éå¯å¾®ä¿¡å¼åè å·¥å ·
å¸è½½
- å
³é
微信webå¼åè å·¥å ·
- é¡¹ç®æä»¶å¤¹ä¸è¿è¡
./bin/wxdt uninstall
(å 餿¡é¢å¾æ ã微信webå¼åè å·¥å ·é ç½®ç®å½), å¼åè å·¥å ·é ç½®æä»¶, ææå·¥ç¨åç»å½ä¿¡æ¯å伿¶å¤± - å é¤é¡¹ç®æä»¶å¤¹
Arch Linux
Arch Linux åå ¶è¡çåè¡çï¼å¦ Manjaroï¼å¯ä»¥éè¿ AUR è¿è¡å®è£ ï¼https://aur.archlinux.org/packages/wechat-devtool/
æªå¾
ä¸é¢é¡¹ç®æ¥èªwechat-v2ex
èµèµ

Changelog
å 责声æ
微信å¼åè å·¥å ·çæå½è ¾è®¯å ¬å¸ææï¼æ¬é¡¹ç®æ¨å¨äº¤æµå¦ä¹ ä¹ç¨ã妿ä¸å½ä¹å¤ï¼è¯·èç³»æ¬äººï¼é®ç®±ï¼canyoutle@gmail.com
Top Related Projects
小程序组件化开发框架
This is the repo for Vue 2. For Vue 3, go to https://github.com/vuejs/core
A cross-platform framework using Vue.js
开放式跨端跨框架解决方案,支持使用 React/Vue/Nerv 等框架来开发微信/京东/百度/支付宝/字节跳动/ QQ 小程序/H5/React Native 等应用。 https://taro.zone/
🦎 一套代码运行多端,一端所见即多端所见
微信小程序组件 / API / 云开发示例
Convert
designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual Copilot