fix(run): 最新版可运行,有bug

This commit is contained in:
msojocs 2022-01-23 00:12:37 +08:00
parent c3e90a073a
commit ae44ec1b65
8 changed files with 384 additions and 7 deletions

354
build/config.gypi Normal file
View File

@ -0,0 +1,354 @@
# Do not edit. File was generated by node-gyp's "configure" step
{
"target_defaults": {
"cflags": [],
"default_configuration": "Release",
"defines": [],
"include_dirs": [],
"libraries": []
},
"variables": {
"asan": 0,
"coverage": "false",
"dcheck_always_on": 0,
"debug_nghttp2": "false",
"debug_node": "false",
"enable_lto": "false",
"enable_pgo_generate": "false",
"enable_pgo_use": "false",
"error_on_warn": "false",
"force_dynamic_crt": 0,
"host_arch": "x64",
"icu_gyp_path": "tools/icu/icu-system.gyp",
"icu_small": "false",
"icu_ver_major": "70",
"is_debug": 0,
"llvm_version": "0.0",
"napi_build_version": "8",
"node_byteorder": "little",
"node_debug_lib": "false",
"node_enable_d8": "false",
"node_fipsinstall": "false",
"node_install_corepack": "true",
"node_install_npm": "false",
"node_library_files": [
"lib/tls.js",
"lib/_http_client.js",
"lib/_stream_transform.js",
"lib/url.js",
"lib/buffer.js",
"lib/_http_common.js",
"lib/stream.js",
"lib/timers.js",
"lib/crypto.js",
"lib/string_decoder.js",
"lib/path.js",
"lib/child_process.js",
"lib/async_hooks.js",
"lib/http2.js",
"lib/assert.js",
"lib/vm.js",
"lib/_stream_readable.js",
"lib/fs.js",
"lib/_http_incoming.js",
"lib/readline.js",
"lib/_http_server.js",
"lib/os.js",
"lib/trace_events.js",
"lib/_http_agent.js",
"lib/_stream_writable.js",
"lib/wasi.js",
"lib/v8.js",
"lib/_tls_common.js",
"lib/_stream_wrap.js",
"lib/cluster.js",
"lib/punycode.js",
"lib/process.js",
"lib/domain.js",
"lib/util.js",
"lib/zlib.js",
"lib/_tls_wrap.js",
"lib/_stream_passthrough.js",
"lib/repl.js",
"lib/_stream_duplex.js",
"lib/net.js",
"lib/_http_outgoing.js",
"lib/constants.js",
"lib/dgram.js",
"lib/tty.js",
"lib/worker_threads.js",
"lib/perf_hooks.js",
"lib/querystring.js",
"lib/module.js",
"lib/sys.js",
"lib/diagnostics_channel.js",
"lib/console.js",
"lib/http.js",
"lib/https.js",
"lib/inspector.js",
"lib/events.js",
"lib/dns.js",
"lib/dns/promises.js",
"lib/stream/promises.js",
"lib/stream/consumers.js",
"lib/stream/web.js",
"lib/readline/promises.js",
"lib/path/posix.js",
"lib/path/win32.js",
"lib/fs/promises.js",
"lib/timers/promises.js",
"lib/internal/validators.js",
"lib/internal/fixed_queue.js",
"lib/internal/idna.js",
"lib/internal/options.js",
"lib/internal/errors.js",
"lib/internal/blocklist.js",
"lib/internal/url.js",
"lib/internal/event_target.js",
"lib/internal/buffer.js",
"lib/internal/freeze_intrinsics.js",
"lib/internal/timers.js",
"lib/internal/stream_base_commons.js",
"lib/internal/socket_list.js",
"lib/internal/v8_prof_processor.js",
"lib/internal/worker.js",
"lib/internal/child_process.js",
"lib/internal/async_hooks.js",
"lib/internal/watchdog.js",
"lib/internal/assert.js",
"lib/internal/trace_events_async_hooks.js",
"lib/internal/histogram.js",
"lib/internal/socketaddress.js",
"lib/internal/structured_clone.js",
"lib/internal/heap_utils.js",
"lib/internal/encoding.js",
"lib/internal/freelist.js",
"lib/internal/v8_prof_polyfill.js",
"lib/internal/promise_hooks.js",
"lib/internal/abort_controller.js",
"lib/internal/error_serdes.js",
"lib/internal/linkedlist.js",
"lib/internal/util.js",
"lib/internal/repl.js",
"lib/internal/net.js",
"lib/internal/constants.js",
"lib/internal/priority_queue.js",
"lib/internal/blob.js",
"lib/internal/dgram.js",
"lib/internal/js_stream_socket.js",
"lib/internal/tty.js",
"lib/internal/querystring.js",
"lib/internal/http.js",
"lib/internal/dtrace.js",
"lib/internal/inspector_async_hook.js",
"lib/internal/cli_table.js",
"lib/internal/cluster/round_robin_handle.js",
"lib/internal/cluster/child.js",
"lib/internal/cluster/worker.js",
"lib/internal/cluster/utils.js",
"lib/internal/cluster/shared_handle.js",
"lib/internal/cluster/primary.js",
"lib/internal/policy/sri.js",
"lib/internal/policy/manifest.js",
"lib/internal/dns/promises.js",
"lib/internal/dns/utils.js",
"lib/internal/streams/readable.js",
"lib/internal/streams/pipeline.js",
"lib/internal/streams/transform.js",
"lib/internal/streams/writable.js",
"lib/internal/streams/end-of-stream.js",
"lib/internal/streams/utils.js",
"lib/internal/streams/state.js",
"lib/internal/streams/compose.js",
"lib/internal/streams/duplex.js",
"lib/internal/streams/from.js",
"lib/internal/streams/legacy.js",
"lib/internal/streams/destroy.js",
"lib/internal/streams/buffer_list.js",
"lib/internal/streams/duplexify.js",
"lib/internal/streams/passthrough.js",
"lib/internal/streams/add-abort-signal.js",
"lib/internal/streams/lazy_transform.js",
"lib/internal/tls/parse-cert-string.js",
"lib/internal/tls/secure-context.js",
"lib/internal/tls/secure-pair.js",
"lib/internal/readline/promises.js",
"lib/internal/readline/utils.js",
"lib/internal/readline/interface.js",
"lib/internal/readline/callbacks.js",
"lib/internal/readline/emitKeypressEvents.js",
"lib/internal/modules/run_main.js",
"lib/internal/modules/package_json_reader.js",
"lib/internal/modules/esm/module_job.js",
"lib/internal/modules/esm/resolve.js",
"lib/internal/modules/esm/assert.js",
"lib/internal/modules/esm/module_map.js",
"lib/internal/modules/esm/load.js",
"lib/internal/modules/esm/translators.js",
"lib/internal/modules/esm/get_format.js",
"lib/internal/modules/esm/loader.js",
"lib/internal/modules/esm/get_source.js",
"lib/internal/modules/esm/initialize_import_meta.js",
"lib/internal/modules/esm/create_dynamic_module.js",
"lib/internal/modules/cjs/helpers.js",
"lib/internal/modules/cjs/loader.js",
"lib/internal/perf/performance.js",
"lib/internal/perf/timerify.js",
"lib/internal/perf/event_loop_delay.js",
"lib/internal/perf/event_loop_utilization.js",
"lib/internal/perf/utils.js",
"lib/internal/perf/observe.js",
"lib/internal/perf/performance_entry.js",
"lib/internal/perf/usertiming.js",
"lib/internal/perf/nodetiming.js",
"lib/internal/worker/js_transferable.js",
"lib/internal/worker/io.js",
"lib/internal/repl/history.js",
"lib/internal/repl/utils.js",
"lib/internal/repl/await.js",
"lib/internal/webstreams/transfer.js",
"lib/internal/webstreams/writablestream.js",
"lib/internal/webstreams/adapters.js",
"lib/internal/webstreams/transformstream.js",
"lib/internal/webstreams/readablestream.js",
"lib/internal/webstreams/compression.js",
"lib/internal/webstreams/encoding.js",
"lib/internal/webstreams/util.js",
"lib/internal/webstreams/queuingstrategies.js",
"lib/internal/test/transfer.js",
"lib/internal/test/binding.js",
"lib/internal/legacy/processbinding.js",
"lib/internal/fs/promises.js",
"lib/internal/fs/utils.js",
"lib/internal/fs/rimraf.js",
"lib/internal/fs/dir.js",
"lib/internal/fs/streams.js",
"lib/internal/fs/sync_write_stream.js",
"lib/internal/fs/read_file_context.js",
"lib/internal/fs/watchers.js",
"lib/internal/fs/cp/cp.js",
"lib/internal/fs/cp/cp-sync.js",
"lib/internal/console/constructor.js",
"lib/internal/console/global.js",
"lib/internal/crypto/scrypt.js",
"lib/internal/crypto/cipher.js",
"lib/internal/crypto/rsa.js",
"lib/internal/crypto/x509.js",
"lib/internal/crypto/aes.js",
"lib/internal/crypto/ec.js",
"lib/internal/crypto/hkdf.js",
"lib/internal/crypto/pbkdf2.js",
"lib/internal/crypto/hashnames.js",
"lib/internal/crypto/util.js",
"lib/internal/crypto/diffiehellman.js",
"lib/internal/crypto/keygen.js",
"lib/internal/crypto/webcrypto.js",
"lib/internal/crypto/sig.js",
"lib/internal/crypto/dsa.js",
"lib/internal/crypto/keys.js",
"lib/internal/crypto/random.js",
"lib/internal/crypto/hash.js",
"lib/internal/crypto/mac.js",
"lib/internal/crypto/certificate.js",
"lib/internal/util/comparisons.js",
"lib/internal/util/iterable_weak_map.js",
"lib/internal/util/inspect.js",
"lib/internal/util/debuglog.js",
"lib/internal/util/types.js",
"lib/internal/util/inspector.js",
"lib/internal/bootstrap/pre_execution.js",
"lib/internal/bootstrap/environment.js",
"lib/internal/bootstrap/node.js",
"lib/internal/bootstrap/loaders.js",
"lib/internal/bootstrap/switches/is_main_thread.js",
"lib/internal/bootstrap/switches/is_not_main_thread.js",
"lib/internal/bootstrap/switches/does_own_process_state.js",
"lib/internal/bootstrap/switches/does_not_own_process_state.js",
"lib/internal/per_context/messageport.js",
"lib/internal/per_context/primordials.js",
"lib/internal/per_context/domexception.js",
"lib/internal/child_process/serialization.js",
"lib/internal/source_map/source_map.js",
"lib/internal/source_map/source_map_cache.js",
"lib/internal/source_map/prepare_stack_trace.js",
"lib/internal/process/promises.js",
"lib/internal/process/per_thread.js",
"lib/internal/process/task_queues.js",
"lib/internal/process/execution.js",
"lib/internal/process/signal.js",
"lib/internal/process/esm_loader.js",
"lib/internal/process/worker_thread_only.js",
"lib/internal/process/warning.js",
"lib/internal/process/policy.js",
"lib/internal/process/report.js",
"lib/internal/main/eval_stdin.js",
"lib/internal/main/eval_string.js",
"lib/internal/main/print_help.js",
"lib/internal/main/run_main_module.js",
"lib/internal/main/check_syntax.js",
"lib/internal/main/prof_process.js",
"lib/internal/main/inspect.js",
"lib/internal/main/repl.js",
"lib/internal/main/worker_thread.js",
"lib/internal/http2/compat.js",
"lib/internal/http2/core.js",
"lib/internal/http2/util.js",
"lib/internal/debugger/inspect_repl.js",
"lib/internal/debugger/inspect.js",
"lib/internal/debugger/inspect_client.js",
"lib/internal/vm/module.js",
"lib/internal/assert/assertion_error.js",
"lib/internal/assert/calltracker.js",
"lib/util/types.js",
"lib/assert/strict.js"
],
"node_module_version": 102,
"node_no_browser_globals": "false",
"node_prefix": "/usr",
"node_release_urlbase": "",
"node_section_ordering_info": "",
"node_shared": "false",
"node_shared_brotli": "true",
"node_shared_cares": "true",
"node_shared_http_parser": "false",
"node_shared_libuv": "true",
"node_shared_nghttp2": "true",
"node_shared_nghttp3": "false",
"node_shared_ngtcp2": "false",
"node_shared_openssl": "true",
"node_shared_zlib": "true",
"node_tag": "",
"node_target_type": "executable",
"node_use_bundled_v8": "true",
"node_use_dtrace": "false",
"node_use_etw": "false",
"node_use_node_code_cache": "true",
"node_use_node_snapshot": "true",
"node_use_openssl": "true",
"node_use_v8_platform": "true",
"node_with_ltcg": "false",
"node_without_node_options": "false",
"openssl_is_fips": "false",
"openssl_quic": "false",
"ossfuzz": "false",
"shlib_suffix": "so.102",
"target_arch": "x64",
"v8_enable_31bit_smis_on_64bit_arch": 0,
"v8_enable_gdbjit": 0,
"v8_enable_i18n_support": 1,
"v8_enable_inspector": 1,
"v8_enable_lite_mode": 0,
"v8_enable_object_print": 1,
"v8_enable_pointer_compression": 0,
"v8_enable_webassembly": 1,
"v8_no_strict_aliasing": 1,
"v8_optimized_debug": 1,
"v8_promise_internal_field_count": 1,
"v8_random_seed": 0,
"v8_trace_maps": 0,
"v8_use_siphash": 1,
"want_separate_host_toolset": 0,
"nodedir": "/home/msojocs/.cache/node-gyp/17.3.0",
"standalone_static_library": 1
}
}

View File

@ -1,4 +1,4 @@
{
"version": "12.6.0",
"version": "12.22.8",
"url": "https://npm.taobao.org/mirrors/node/v${version}/node-v${version}-linux-x64.tar.gz"
}

View File

@ -1,4 +1,4 @@
{
"version": "0.39.3",
"version": "0.40.0",
"url": "https://npm.taobao.org/mirrors/nwjs/v${version}/nwjs-sdk-v${version}-linux-x64.tar.gz"
}

6
package-lock.json generated Normal file
View File

@ -0,0 +1,6 @@
{
"name": "wechat-devtools",
"lockfileVersion": 2,
"requires": true,
"packages": {}
}

1
package.json Normal file
View File

@ -0,0 +1 @@
{}

View File

@ -62,6 +62,13 @@ git clone https://github.com/dragonation/wechat-devtools.git
之后即可通过点击应用图标启动微信开发者工具,也可以运行`bin/wechat-devtools`通过命令行启动
# 版本数据
| wechat-tool | nw.js | node |
|-------------|-------|------|
|1.03.2006090 |0.39.3 |12.6.0|
|1.05.2201210 |0.49.3 |13.4.0|
# 与其他Linux下的微信开发者工具版本区别
1. 支持最新版本并个人会持续更新确保运行和测试OK才会上传Release
@ -96,7 +103,7 @@ git clone https://github.com/dragonation/wechat-devtools.git
3. 为什么自己构筑或更新后的运行时编辑器和调试器是一片空白?
检查一下`conf/node.json``conf/nwjs.json`里面定义的版本是否与最新微信官方开发者工具的一致。如果有修改版本号的情况则在更新完这两个JSON文件后执行`tools/update-node``tools/update-nwjs`命令。然后删除`package.nw`目录重新执行`tools/setup-wechat-tools`命令感谢ReggieCai31的issue和解决方案
检查一下`conf/node.json``conf/nwjs.json`里面定义的版本是否与最新微信官方开发者工具的一致。如果有修改版本号的情况则在更新完这两个JSON文件后执行`tools/update-node``tools/update-nwjs`命令。然后删除`package.nw`目录重新执行`tools/setup-wechat-devtools`命令感谢ReggieCai31的issue和解决方案
4. 为什么自己构筑的运行时加载项目时会卡住?

View File

@ -11,6 +11,8 @@ DIR="$( cd -P "$( dirname "$SOURCE" )" >/dev/null 2>&1 && pwd )"
package_dir="$DIR/../package.nw"
export PATH=$DIR/../node/bin:$PATH
# npm config list
npm --version
rm -fr "${package_dir}/node_modules/vscode-windows-ca-certs" # the module is only available in windows
rm -fr "${package_dir}/node_modules/vscode-windows-registry" # the module is only available in windows
@ -32,17 +34,19 @@ rm -fr "${package_dir}/node_modules_tmp/node_modules/node-pty-node"
rm -fr "${package_dir}/node_modules_tmp/node_modules/oniguruma-node"
rm -fr "${package_dir}/node_modules_tmp/node_modules/spdlog-node"
# npm install @vscode/ripgrep --registry=https://registry.npm.taobao.org
# npm install nodegit --registry=https://registry.npm.taobao.org --nodegit_binary_host_mirror=https://npm.taobao.org/mirrors/nodegit/v0.27.0/
(cd "${package_dir}/node_modules_tmp" && npm install \
extract-file-icon \
native-keymap \
native-watchdog \
nodegit \
node-pty \
oniguruma \
spdlog \
trash \
vscode-oniguruma \
vscode-ripgrep \
nodegit \
--registry=https://registry.npm.taobao.org \
--nodegit_binary_host_mirror=https://npm.taobao.org/mirrors/nodegit/v0.27.0/) # reinstall modules

View File

@ -10,6 +10,7 @@ const urls = {
};
let branch = @.process.switches().commands[0];
let ver = @.process.switches().commands[1];
if ((!branch) || (!urls[branch])) {
branch = "stable";
}
@ -31,8 +32,12 @@ let client = @.net.httpClient();
@.fs.makeDirs(@path(__dirname, "../cache"));
@info(`Fetching wechat-dev-tool info: ${url}`);
info(`Fetching wechat-dev-tool info: ${url}`);
if(ver){
version = ver
this.next(`https://servicewechat.com/wxa-dev-logic/download_redirect?type=x64&from=mpwiki&download_version=${ver}&version_type=1`);
}else
client.request(url, {
"onSuccess": (result) => {
let links = {};
@ -46,11 +51,11 @@ let client = @.net.httpClient();
}
let url = link.split("\"")[0];
links[content].push(url);
@info(`Found ${content} link: ${url}`);
info(`Found ${content} link: ${url}`);
}
});
if (!links["windows-64"][0]) {
@error("No windows-64 dist found");
error("No windows-64 dist found");
process.exit(1);
}
this.next(links["windows-64"][0]);