mirror of
https://github.com/msojocs/wechat-web-devtools-linux.git
synced 2025-07-22 00:00:04 +08:00
Merge branch 'master' into dev
This commit is contained in:
commit
87d6149780
@ -1,6 +1,12 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
root_dir=$(cd `dirname $0`/.. && pwd -P)
|
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
|
||||||
|
root_dir="$( cd -P "$( dirname "$SOURCE" )"/.. >/dev/null 2>&1 && pwd )"
|
||||||
|
|
||||||
# 数据目录处理
|
# 数据目录处理
|
||||||
if [ -z $XDG_CONFIG_HOME ];then
|
if [ -z $XDG_CONFIG_HOME ];then
|
||||||
|
@ -6,27 +6,12 @@ while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symli
|
|||||||
SOURCE="$(readlink "$SOURCE")"
|
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
|
[[ $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
|
done
|
||||||
DIR="$( cd -P "$( dirname "$SOURCE" )" >/dev/null 2>&1 && pwd )"
|
root_dir="$( cd -P "$( dirname "$SOURCE" )"/.. >/dev/null 2>&1 && pwd )"
|
||||||
|
|
||||||
cd $DIR/..
|
cd $root_dir
|
||||||
|
|
||||||
export WECHAT_DEVTOOLS_DIR="$DIR/../nwjs"
|
export WECHAT_DEVTOOLS_DIR="$root_dir/nwjs"
|
||||||
export APPDATA="$DIR/../nwjs"
|
export APPDATA="$root_dir/nwjs"
|
||||||
export PATH="$DIR/../wine:$DIR/../node/bin:$DIR/../nwjs:$PATH"
|
export PATH="$root_dir/wine:$root_dir/node/bin:$root_dir/nwjs:$PATH"
|
||||||
|
|
||||||
$DIR/../tools/wechat-devtools-cli "$@"
|
node $root_dir/package.nw/js/common/cli/index.js "$@"
|
||||||
|
|
||||||
# #!/bin/bash
|
|
||||||
# root_dir=$(cd `dirname $0`/.. && pwd -P)
|
|
||||||
|
|
||||||
# echo "cli"
|
|
||||||
|
|
||||||
# export WECHAT_DEVTOOLS_DIR="$root_dir/nwjs"
|
|
||||||
# export APPDATA="$HOME/.config"
|
|
||||||
# export USERPROFILE="$root"
|
|
||||||
# export PATH="$root_dir/wine:$root_dir/node/bin:$root_dir/nwjs:$PATH"
|
|
||||||
# export CALLING_DIR=$root_dir
|
|
||||||
|
|
||||||
# node $root_dir/bin/cli.js "$@"
|
|
||||||
|
|
||||||
# cd $root_dir
|
|
||||||
|
@ -36,6 +36,7 @@ source=("nwjs-v${_nwjs_ver}.tar.gz::https://npm.taobao.org/mirrors/nwjs/v${_nwjs
|
|||||||
"wechat-devtools.desktop"
|
"wechat-devtools.desktop"
|
||||||
"logo.svg"
|
"logo.svg"
|
||||||
"wechat-devtools"
|
"wechat-devtools"
|
||||||
|
"wechat-devtools-cli"
|
||||||
"fix-cli.sh"
|
"fix-cli.sh"
|
||||||
"fix-menu.sh"
|
"fix-menu.sh"
|
||||||
"fix-core.sh"
|
"fix-core.sh"
|
||||||
@ -58,6 +59,7 @@ md5sums=(ac7680788544c457daee11aaf69798fe # nwjs
|
|||||||
"SKIP"
|
"SKIP"
|
||||||
"SKIP"
|
"SKIP"
|
||||||
"SKIP"
|
"SKIP"
|
||||||
|
"SKIP"
|
||||||
"SKIP")
|
"SKIP")
|
||||||
options=('!strip')
|
options=('!strip')
|
||||||
|
|
||||||
@ -85,6 +87,7 @@ build() {
|
|||||||
|
|
||||||
# prepare nw-gyp
|
# prepare nw-gyp
|
||||||
_log "prepare nw-gyp"
|
_log "prepare nw-gyp"
|
||||||
|
node --version
|
||||||
npm uninstall node-gyp -g
|
npm uninstall node-gyp -g
|
||||||
npm install nw-gyp node-gyp -g
|
npm install nw-gyp node-gyp -g
|
||||||
|
|
||||||
@ -93,6 +96,7 @@ build() {
|
|||||||
cp "$(which node)" "${srcdir}/node.${_node_version}"
|
cp "$(which node)" "${srcdir}/node.${_node_version}"
|
||||||
|
|
||||||
# run fix scripts
|
# run fix scripts
|
||||||
|
export NW_PACKAGE_DIR="${srcdir}/package.nw"
|
||||||
export NW_VERSION=$_nwjs_ver
|
export NW_VERSION=$_nwjs_ver
|
||||||
# fix-package-name.js使用
|
# fix-package-name.js使用
|
||||||
export srcdir=$srcdir
|
export srcdir=$srcdir
|
||||||
@ -110,7 +114,6 @@ build() {
|
|||||||
package() {
|
package() {
|
||||||
mkdir -p "${pkgdir}${_install_dir}"
|
mkdir -p "${pkgdir}${_install_dir}"
|
||||||
cd "${pkgdir}${_install_dir}"
|
cd "${pkgdir}${_install_dir}"
|
||||||
mkdir -p bin
|
|
||||||
|
|
||||||
cp -r "${srcdir}/nwjs" .
|
cp -r "${srcdir}/nwjs" .
|
||||||
cp -r "${srcdir}/package.nw" .
|
cp -r "${srcdir}/package.nw" .
|
||||||
@ -120,6 +123,10 @@ package() {
|
|||||||
cd nwjs && ln -s node node.exe
|
cd nwjs && ln -s node node.exe
|
||||||
|
|
||||||
install -Dm755 "${srcdir}/wechat-devtools" "${pkgdir}${_install_dir}/bin/wechat-devtools"
|
install -Dm755 "${srcdir}/wechat-devtools" "${pkgdir}${_install_dir}/bin/wechat-devtools"
|
||||||
|
install -Dm755 "${srcdir}/wechat-devtools-cli" "${pkgdir}${_install_dir}/bin/wechat-devtools-cli"
|
||||||
install -Dm644 "${srcdir}/wechat-devtools.desktop" "${pkgdir}/usr/share/applications/wechat-devtools.desktop"
|
install -Dm644 "${srcdir}/wechat-devtools.desktop" "${pkgdir}/usr/share/applications/wechat-devtools.desktop"
|
||||||
install -Dm644 "${srcdir}/logo.svg" "${pkgdir}/usr/share/icons/hicolor/scalable/apps/wechat-devtools.svg"
|
install -Dm644 "${srcdir}/logo.svg" "${pkgdir}/usr/share/icons/hicolor/scalable/apps/wechat-devtools.svg"
|
||||||
|
mkdir -p "${pkgdir}/usr/bin"
|
||||||
|
ln -s "${_install_dir}/bin/wechat-devtools" "${pkgdir}/usr/bin/wechat-devtools"
|
||||||
|
ln -s "${_install_dir}/bin/wechat-devtools-cli" "${pkgdir}/usr/bin/wechat-devtools-cli"
|
||||||
}
|
}
|
||||||
|
11
test/buid-deepin.sh
Normal file
11
test/buid-deepin.sh
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
root_dir=$(cd `dirname $0`/.. && pwd -P)
|
||||||
|
cd $root_dir
|
||||||
|
export NO_WINE=false
|
||||||
|
docker-compose up
|
||||||
|
$root_dir/tools/build-deepin.sh $@
|
||||||
|
|
||||||
|
export NO_WINE=true
|
||||||
|
$root_dir/tools/fix-core.sh
|
||||||
|
$root_dir/tools/fix-other.sh
|
||||||
|
$root_dir/tools/build-deepin.sh $@
|
@ -56,6 +56,7 @@ COMPILER_MD5=$( md5sum tmp/compiler.tar.gz | cut -d ' ' -f1 )
|
|||||||
rm -rf $build_dir
|
rm -rf $build_dir
|
||||||
mkdir -p $build_dir
|
mkdir -p $build_dir
|
||||||
cp "$root_dir/bin/wechat-devtools" "$build_dir"
|
cp "$root_dir/bin/wechat-devtools" "$build_dir"
|
||||||
|
cp "$root_dir/bin/wechat-devtools-cli" "$build_dir"
|
||||||
cp "$root_dir/tools"/*.sh "$build_dir"
|
cp "$root_dir/tools"/*.sh "$build_dir"
|
||||||
cp "$root_dir/tools"/*.js "$build_dir"
|
cp "$root_dir/tools"/*.js "$build_dir"
|
||||||
cp "$root_dir/res/aur"/* "$build_dir"
|
cp "$root_dir/res/aur"/* "$build_dir"
|
||||||
|
@ -1,3 +0,0 @@
|
|||||||
#!/usr/bin/env node
|
|
||||||
|
|
||||||
require("../nwjs/package.nw/js/common/cli/index.js");
|
|
Loading…
x
Reference in New Issue
Block a user