update wechat-devtool
parent
ec33856386
commit
c3d7d48836
|
@ -2,13 +2,13 @@
|
|||
|
||||
app_name="wechat-devtools"
|
||||
tmp_dir="/tmp/${app_name}_tmp"
|
||||
version="1.06.2405020-1"
|
||||
version="1.06.2405020-2"
|
||||
release="v${version}"
|
||||
|
||||
deb_url="https://github.com/msojocs/wechat-web-devtools-linux/releases/download/${release}/io.github.msojocs.wechat-devtools-linux_${version}_amd64.deb"
|
||||
|
||||
# 打包前, 要改启动脚本的变量声明
|
||||
# root_dir="/usr/lib/wechat-devtools"
|
||||
# root_dir="/usr/share/wechat-devtools"
|
||||
|
||||
# 创建临时目录, 用于下载官方包
|
||||
if [ -d $tmp_dir ]; then
|
||||
|
@ -31,7 +31,7 @@ if [ "$1" == "" ]; then
|
|||
echo "创建待打包目录..."
|
||||
mkdir -p "./unpack/DEBIAN"
|
||||
mkdir -p "./unpack/usr/bin"
|
||||
mkdir -p "./unpack/usr/lib/${app_name}"
|
||||
mkdir -p "./unpack/usr/share/${app_name}"
|
||||
mkdir -p "./unpack/usr/share/applications"
|
||||
|
||||
source_dir="${tmp_dir}/${app_name}/opt/apps/io.github.msojocs.wechat-devtools-linux"
|
||||
|
@ -45,28 +45,28 @@ if [ "$1" == "" ]; then
|
|||
|
||||
echo "解包完成, 复制到待打包目录..."
|
||||
mv "${source_dir}/files/bin/bin" "./unpack/usr"
|
||||
mv "${source_dir}/files/bin/nwjs" "./unpack/usr/lib/${app_name}"
|
||||
mv "${source_dir}/files/bin/package.nw" "./unpack/usr/lib/${app_name}"
|
||||
mv "${source_dir}/files/bin/nwjs" "./unpack/usr/share/${app_name}"
|
||||
mv "${source_dir}/files/bin/package.nw" "./unpack/usr/share/${app_name}"
|
||||
mv "${source_dir}/entries/icons" "./unpack/usr/share"
|
||||
|
||||
for i in ./unpack/usr/share/icons/hicolor/*/*/*; do
|
||||
mv $i ${i/io.github.msojocs.wechat-devtools-linux/wechat-devtools}
|
||||
done
|
||||
|
||||
rm -rf "./unpack/usr/lib/${app_name}/package.nw/node_modules/wcc/bin/mac"
|
||||
rm -rf "./unpack/usr/lib/${app_name}/package.nw/node_modules/wcc/bin/windows"
|
||||
rm -rf "./unpack/usr/share/${app_name}/package.nw/node_modules/wcc/bin/mac"
|
||||
rm -rf "./unpack/usr/share/${app_name}/package.nw/node_modules/wcc/bin/windows"
|
||||
|
||||
cp "./unpack/usr/lib/${app_name}/nwjs/locales/en-US.pak" "$tmp_dir/en-US.pak"
|
||||
cp "./unpack/usr/lib/${app_name}/nwjs/locales/en-US.pak.info" "$tmp_dir/en-US.pak.info"
|
||||
cp "./unpack/usr/lib/${app_name}/nwjs/locales/zh-CN.pak" "$tmp_dir/zh-CN.pak"
|
||||
cp "./unpack/usr/lib/${app_name}/nwjs/locales/zh-CN.pak.info" "$tmp_dir/zh-CN.pak.info"
|
||||
cp "./unpack/usr/share/${app_name}/nwjs/locales/en-US.pak" "$tmp_dir/en-US.pak"
|
||||
cp "./unpack/usr/share/${app_name}/nwjs/locales/en-US.pak.info" "$tmp_dir/en-US.pak.info"
|
||||
cp "./unpack/usr/share/${app_name}/nwjs/locales/zh-CN.pak" "$tmp_dir/zh-CN.pak"
|
||||
cp "./unpack/usr/share/${app_name}/nwjs/locales/zh-CN.pak.info" "$tmp_dir/zh-CN.pak.info"
|
||||
|
||||
rm -rf ./unpack/usr/lib/${app_name}/nwjs/locales/*
|
||||
rm -rf ./unpack/usr/share/${app_name}/nwjs/locales/*
|
||||
|
||||
cp "$tmp_dir/en-US.pak" "./unpack/usr/lib/${app_name}/nwjs/locales/"
|
||||
cp "$tmp_dir/en-US.pak.info" "./unpack/usr/lib/${app_name}/nwjs/locales/"
|
||||
cp "$tmp_dir/zh-CN.pak" "./unpack/usr/lib/${app_name}/nwjs/locales/"
|
||||
cp "$tmp_dir/zh-CN.pak.info" "./unpack/usr/lib/${app_name}/nwjs/locales/"
|
||||
cp "$tmp_dir/en-US.pak" "./unpack/usr/share/${app_name}/nwjs/locales/"
|
||||
cp "$tmp_dir/en-US.pak.info" "./unpack/usr/share/${app_name}/nwjs/locales/"
|
||||
cp "$tmp_dir/zh-CN.pak" "./unpack/usr/share/${app_name}/nwjs/locales/"
|
||||
cp "$tmp_dir/zh-CN.pak.info" "./unpack/usr/share/${app_name}/nwjs/locales/"
|
||||
|
||||
rm -rf $tmp_dir
|
||||
|
||||
|
@ -90,7 +90,7 @@ MimeType=x-scheme-handler/wechatide
|
|||
""" > ./unpack/usr/share/applications/wechat-devtools.desktop
|
||||
|
||||
echo "文件复制完成, 手动修改启动脚本的root_dir定义为以下内容..."
|
||||
echo "root_dir=\"/usr/lib/wechat-devtools\""
|
||||
echo "root_dir=\"/usr/share/wechat-devtools\""
|
||||
|
||||
elif [ "$1" == "pack" ]; then
|
||||
|
||||
|
|
Loading…
Reference in New Issue