mirror of
https://github.com/msojocs/wechat-web-devtools-linux.git
synced 2025-07-22 00:00:04 +08:00
add direct command supports to avoid wine-binfmt
This commit is contained in:
parent
ff3093a616
commit
f031ab7350
@ -8,10 +8,10 @@ while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symli
|
||||
done
|
||||
DIR="$( cd -P "$( dirname "$SOURCE" )" >/dev/null 2>&1 && pwd )"
|
||||
|
||||
cd $APPDATA/..
|
||||
cd $DIR/..
|
||||
|
||||
export WECHAT_DEVTOOLS_DIR="$DIR/../nwjs"
|
||||
export APPDATA="$DIR/../nwjs"
|
||||
export PATH="$DIR/../node/bin:$DIR/../nwjs:$PATH"
|
||||
export PATH="$DIR/../wine:$DIR/../node/bin:$DIR/../nwjs:$PATH"
|
||||
|
||||
LANG=zh_CN.UTF-8 exec "$DIR"/../nwjs/nw --load-extension="$DIR"/../nwjs/package.nw/js/ideplugin "$@"
|
||||
|
@ -8,10 +8,10 @@ while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symli
|
||||
done
|
||||
DIR="$( cd -P "$( dirname "$SOURCE" )" >/dev/null 2>&1 && pwd )"
|
||||
|
||||
cd $APPDATA/..
|
||||
cd $DIR/..
|
||||
|
||||
export WECHAT_DEVTOOLS_DIR="$DIR/../nwjs"
|
||||
export APPDATA="$DIR/../nwjs"
|
||||
export PATH="$DIR/../node/bin:$DIR/../nwjs:$PATH"
|
||||
export PATH="$DIR/../wine:$DIR/../node/bin:$DIR/../nwjs:$PATH"
|
||||
|
||||
$DIR/../tools/wechat-devtools-cli "$@"
|
||||
|
@ -9,7 +9,7 @@
|
||||
|
||||
# 进度
|
||||
|
||||
当前工具可以在Linux上构筑最新版1.02.2004020(截止时间2020年4月2日),但目前暂不支持CLI模式。
|
||||
当前工具可以在Linux上构筑最新版1.02.2004020(截止时间2020年4月2日),支持CLI模式。
|
||||
|
||||
# 使用方法
|
||||
|
||||
|
@ -137,6 +137,15 @@ const packageDir = "$APPDATA/Tencent/微信开发者工具/package.nw";
|
||||
|
||||
@.task.execute(@path(__dirname, "patch-wechat-devtools"), [], false, this.test);
|
||||
|
||||
}).then(function () {
|
||||
|
||||
@info("Patching wcc and wcsc");
|
||||
|
||||
@.fs.copyFile.sync(@path(__dirname, "../wine/wcc"), @path(__dirname, "package.nw/js/vendor/wcc"));
|
||||
@.fs.copyFile.sync(@path(__dirname, "../wine/wcsc"), @path(__dirname, "package.nw/js/vendor/wcsc"));
|
||||
|
||||
this.next();
|
||||
|
||||
}).finished((error) => {
|
||||
|
||||
if (error) {
|
||||
|
11
wine/wcc
Executable file
11
wine/wcc
Executable file
@ -0,0 +1,11 @@
|
||||
#!/bin/sh
|
||||
|
||||
SOURCE="${BASH_SOURCE[0]}"
|
||||
while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink
|
||||
DIR="$( cd -P "$( dirname "$SOURCE" )" >/dev/null 2>&1 && pwd )"
|
||||
SOURCE="$(readlink "$SOURCE")"
|
||||
[[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE" # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located
|
||||
done
|
||||
DIR="$( cd -P "$( dirname "$SOURCE" )" >/dev/null 2>&1 && pwd )"
|
||||
|
||||
wine "$DIR/wcc.exe" "$@"
|
11
wine/wcsc
Executable file
11
wine/wcsc
Executable file
@ -0,0 +1,11 @@
|
||||
#!/bin/sh
|
||||
|
||||
SOURCE="${BASH_SOURCE[0]}"
|
||||
while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink
|
||||
DIR="$( cd -P "$( dirname "$SOURCE" )" >/dev/null 2>&1 && pwd )"
|
||||
SOURCE="$(readlink "$SOURCE")"
|
||||
[[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE" # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located
|
||||
done
|
||||
DIR="$( cd -P "$( dirname "$SOURCE" )" >/dev/null 2>&1 && pwd )"
|
||||
|
||||
wine "$DIR/wcsc.exe" "$@"
|
Loading…
x
Reference in New Issue
Block a user