Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to run Wechat Web developer tools under Linux system

2025-04-04 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly explains "how to run Wechat Web developer tools under Linux system", interested friends may wish to have a look. The method introduced in this paper is simple, fast and practical. Now let the editor take you to learn "how to run Wechat Web developer tools on Linux".

Wechat Web developer tools are only available in window and mac versions, so it takes a lot of trouble to run Wechat Web developer tools on Linux.

Note: the step or file with * is not sure whether it works or not.

My system is Linux Mint version 18.1.

1. Download nwjs

Download nwjs (SDK for http://nwjs.io/).

2. Copy Wechat web developer tools to nwjs

Copy package.nw, icon.ico, * Wechat web developer tools .exe from the Wechat web developer tools folder installed under the window system into the folder unzipped by nwjs sdk.

* extract Wechat web developer tool .exe, and move the files in the extracted folder to the folder unzipped by nwjs sdk.

3. Modify the code

Go to the nwjs folder and run in the terminal

$. / nw

There will be a prompt Cannot find module'.

According to the prompt, modify the module name in the file that prompts the error, because there will be errors in the case of the name, such as the appServiceConfig module, whose actual module name is appserviceConfig, all due to uppercase and lowercase errors that prevent the module from being found.

There will be several files that need to be modified according to the error prompt.

4. Create a run-detectors file in WeChat Mini Programs's project file

Create a run-detectors file in the WeChat Mini Programs project folder because the file does not have an extension and will be considered a folder on the linux system, resulting in an error if the file cannot be found.

5. Download wine

Run on the command line

$sudo apt-get install wine

When you right-select the wine environment to run wcc.exe, you will be prompted to install the dependency. Wcc.exe is in the / home/ username / .config/ Wechat web developer tools / WeappVendor folder of linux.

6. Load the project

Before loading the project, * run wcc.exe and wcsc.exe under wine (you may get an error if you don't run wcc.exe and wcsc.exe in advance). * * the compilation may be slower after loading the project, about 3, 5s to 10s, and later will be faster because of the cache.

Modify the wcc.exe and wcsc.exe file names to remove .exe.

Go to the package.nw/app/dist/weapp/ folder, find commit/build.js, trans/transWxmlToJs.js, and utils/vendorManager.js, and change the wcc.exe and wcsc.exe in the code to wcc and wcsc.

Errors may be reported using the editing feature, so do not use your own editing feature.

7. Editor

It is recommended to use webstorm. Set it in File-Editor-code style-File Types as shown below. Add wxss to the css type file and wxml to the html type file.

Wechat's file changes automatically refresh will have 3 to 5 seconds to compile, not very fast.

At this point, I believe you have a better understanding of "how to run Wechat Web developer tools under Linux". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report