mirror of
https://github.com/barry-ran/QtScrcpy.git
synced 2025-04-20 19:44:59 +00:00
chore: update publish script
This commit is contained in:
parent
3478dcaa98
commit
0575efc2da
3 changed files with 94 additions and 8 deletions
|
@ -153,7 +153,7 @@ macos {
|
|||
QMAKE_BUNDLE_DATA += APP_FFMPEG
|
||||
|
||||
APP_CONFIG.files = $$files($$PWD/../config/config.ini)
|
||||
APP_CONFIG.path = Contents/MacOS
|
||||
APP_CONFIG.path = Contents/MacOS/config
|
||||
QMAKE_BUNDLE_DATA += APP_CONFIG
|
||||
|
||||
# mac application icon
|
||||
|
|
85
ci/mac/publish_for_mac.sh
Executable file
85
ci/mac/publish_for_mac.sh
Executable file
|
@ -0,0 +1,85 @@
|
|||
echo
|
||||
echo
|
||||
echo ---------------------------------------------------------------
|
||||
echo check ENV
|
||||
echo ---------------------------------------------------------------
|
||||
|
||||
# 从环境变量获取必要参数
|
||||
# 例如 /Users/barry/Qt5.12.5/5.12.5
|
||||
echo ENV_QT_PATH $ENV_QT_PATH
|
||||
|
||||
# 获取绝对路径,保证其他目录执行此脚本依然正确
|
||||
{
|
||||
cd $(dirname "$0")
|
||||
script_path=$(pwd)
|
||||
cd -
|
||||
} &> /dev/null # disable output
|
||||
# 设置当前目录,cd的目录影响接下来执行程序的工作目录
|
||||
old_cd=$(pwd)
|
||||
cd $(dirname "$0")
|
||||
|
||||
# 启动参数声明
|
||||
publish_dir=$1
|
||||
|
||||
# 提示
|
||||
echo current publish dir: $publish_dir
|
||||
|
||||
# 环境变量设置
|
||||
keymap_path=$script_path/../../keymap
|
||||
# config_path=$script_path/../../config
|
||||
|
||||
publish_path=$script_path/$publish_dir
|
||||
release_path=$script_path/../../output/mac/release
|
||||
|
||||
export PATH=$PATH:$ENV_QT_PATH/clang_64/bin
|
||||
|
||||
if [ -d "$publish_path" ]; then
|
||||
rm -rf $publish_path
|
||||
fi
|
||||
|
||||
# 复制要发布的包
|
||||
cp -r $release_path $publish_path
|
||||
cp -r $keymap_path $publish_path/QtScrcpy.app/Contents/MacOS
|
||||
# cp -r $config_path $publish_path/QtScrcpy.app/Contents/MacOS
|
||||
|
||||
# 添加qt依赖包
|
||||
macdeployqt $publish_path/QtScrcpy.app
|
||||
|
||||
# 删除多余qt依赖包
|
||||
|
||||
# PlugIns
|
||||
rm -rf $publish_path/QtScrcpy.app/Contents/PlugIns/iconengines
|
||||
# 截图功能需要libqjpeg.dylib
|
||||
rm -f $publish_path/QtScrcpy.app/Contents/PlugIns/imageformats/libqgif.dylib
|
||||
rm -f $publish_path/QtScrcpy.app/Contents/PlugIns/imageformats/libqicns.dylib
|
||||
rm -f $publish_path/QtScrcpy.app/Contents/PlugIns/imageformats/libqico.dylib
|
||||
# rm -f $publish_path/QtScrcpy.app/Contents/PlugIns/imageformats/libqjpeg.dylib
|
||||
rm -f $publish_path/QtScrcpy.app/Contents/PlugIns/imageformats/libqmacheif.dylib
|
||||
rm -f $publish_path/QtScrcpy.app/Contents/PlugIns/imageformats/libqmacjp2.dylib
|
||||
rm -f $publish_path/QtScrcpy.app/Contents/PlugIns/imageformats/libqtga.dylib
|
||||
rm -f $publish_path/QtScrcpy.app/Contents/PlugIns/imageformats/libqtiff.dylib
|
||||
rm -f $publish_path/QtScrcpy.app/Contents/PlugIns/imageformats/libqwbmp.dylib
|
||||
rm -f $publish_path/QtScrcpy.app/Contents/PlugIns/imageformats/libqwebp.dylib
|
||||
rm -rf $publish_path/QtScrcpy.app/Contents/PlugIns/virtualkeyboard
|
||||
rm -rf $publish_path/QtScrcpy.app/Contents/PlugIns/printsupport
|
||||
rm -rf $publish_path/QtScrcpy.app/Contents/PlugIns/platforminputcontexts
|
||||
rm -rf $publish_path/QtScrcpy.app/Contents/PlugIns/iconengines
|
||||
rm -rf $publish_path/QtScrcpy.app/Contents/PlugIns/bearer
|
||||
|
||||
# Frameworks
|
||||
rm -rf $publish_path/QtScrcpy.app/Contents/Frameworks/QtVirtualKeyboard.framework
|
||||
rm -rf $publish_path/Contents/Frameworks/QtSvg.framework
|
||||
|
||||
# qml
|
||||
rm -rf $publish_path/QtScrcpy.app/Contents/Frameworks/QtQml.framework
|
||||
rm -rf $publish_path/QtScrcpy.app/Contents/Frameworks/QtQuick.framework
|
||||
|
||||
echo
|
||||
echo
|
||||
echo ---------------------------------------------------------------
|
||||
echo finish!!!
|
||||
echo ---------------------------------------------------------------
|
||||
|
||||
# 恢复当前目录
|
||||
cd $old_cd
|
||||
exit 0
|
|
@ -1,7 +1,4 @@
|
|||
@echo off
|
||||
:: 从环境变量获取必要参数
|
||||
:: 例如 d:\a\QtScrcpy\Qt\5.12.7
|
||||
set qt_msvc_path="%ENV_QT_MSVC%"
|
||||
|
||||
echo=
|
||||
echo=
|
||||
|
@ -9,7 +6,11 @@ echo ---------------------------------------------------------------
|
|||
echo check ENV
|
||||
echo ---------------------------------------------------------------
|
||||
|
||||
echo ENV_QT_MSVC %ENV_QT_MSVC%
|
||||
:: 从环境变量获取必要参数
|
||||
:: 例如 d:\a\QtScrcpy\Qt\5.12.7
|
||||
set qt_msvc_path="%ENV_QT_PATH%"
|
||||
|
||||
echo ENV_QT_PATH %ENV_QT_PATH%
|
||||
|
||||
:: 获取脚本绝对路径
|
||||
set script_path=%~dp0
|
||||
|
@ -19,6 +20,9 @@ cd /d %~dp0
|
|||
|
||||
:: 启动参数声明
|
||||
set cpu_mode=x86
|
||||
set publish_dir=%2
|
||||
set errno=1
|
||||
|
||||
if /i "%1"=="x86" (
|
||||
set cpu_mode=x86
|
||||
)
|
||||
|
@ -26,9 +30,6 @@ if /i "%1"=="x64" (
|
|||
set cpu_mode=x64
|
||||
)
|
||||
|
||||
set publish_dir=%2
|
||||
set errno=1
|
||||
|
||||
:: 提示
|
||||
echo current build mode: %cpu_mode%
|
||||
echo current publish dir: %publish_dir%
|
||||
|
|
Loading…
Add table
Reference in a new issue