mirror of
https://github.com/barry-ran/QtScrcpy.git
synced 2025-07-31 04:58:37 +00:00
chore: update publish_for_win.bat
This commit is contained in:
parent
756aba62c9
commit
972d5be9d8
1 changed files with 20 additions and 9 deletions
|
@ -1,5 +1,5 @@
|
||||||
@echo off
|
@echo off
|
||||||
set qt_msvc_path="D:\Qt\Qt5.12.4\5.12.4\msvc2017\bin"
|
set qt_msvc_path="D:\Qt\Qt5.12.4\5.12.4\"
|
||||||
|
|
||||||
:: 获取脚本绝对路径
|
:: 获取脚本绝对路径
|
||||||
set script_path=%~dp0
|
set script_path=%~dp0
|
||||||
|
@ -9,25 +9,32 @@ cd /d %~dp0
|
||||||
|
|
||||||
:: 启动参数声明
|
:: 启动参数声明
|
||||||
set cpu_mode=x86
|
set cpu_mode=x86
|
||||||
if /i "%2"=="x86" (
|
if /i "%1"=="x86" (
|
||||||
set cpu_mode=x86
|
set cpu_mode=x86
|
||||||
)
|
)
|
||||||
if /i "%2"=="x64" (
|
if /i "%1"=="x64" (
|
||||||
set cpu_mode=x64
|
set cpu_mode=x64
|
||||||
)
|
)
|
||||||
|
|
||||||
:: 环境变量设置
|
:: 环境变量设置
|
||||||
set PATH=%qt_msvc_path%;%PATH%
|
|
||||||
|
|
||||||
set publish_path=%script_path%publish\
|
set adb_path=%script_path%third_party\adb\win\*.*
|
||||||
set adb_path=%script_path%\third_party\adb\win\*.*
|
set jar_path=%script_path%third_party\scrcpy-server.jar
|
||||||
set jar_path=%script_path%\third_party\scrcpy-server.jar
|
set keymap_path=%script_path%keymap
|
||||||
set keymap_path=%script_path%\keymap
|
|
||||||
|
|
||||||
if /i %cpu_mode% == x86 (
|
if /i %cpu_mode% == x86 (
|
||||||
|
set publish_path=%script_path%QtScrcpy-win32\
|
||||||
set release_path=%script_path%output\win\release
|
set release_path=%script_path%output\win\release
|
||||||
|
set qt_msvc_path=%qt_msvc_path%msvc2017\bin
|
||||||
) else (
|
) else (
|
||||||
|
set publish_path=%script_path%QtScrcpy-win64\
|
||||||
set release_path=%script_path%output\win-x64\release
|
set release_path=%script_path%output\win-x64\release
|
||||||
|
set qt_msvc_path=%qt_msvc_path%msvc2017_64\bin
|
||||||
|
)
|
||||||
|
set PATH=%qt_msvc_path%;%PATH%
|
||||||
|
|
||||||
|
if exist %publish_path% (
|
||||||
|
rmdir /s/q %publish_path%
|
||||||
)
|
)
|
||||||
|
|
||||||
:: 复制要发布的包
|
:: 复制要发布的包
|
||||||
|
@ -43,7 +50,11 @@ windeployqt %publish_path%\QtScrcpy.exe
|
||||||
rmdir /s/q %publish_path%\iconengines
|
rmdir /s/q %publish_path%\iconengines
|
||||||
rmdir /s/q %publish_path%\imageformats
|
rmdir /s/q %publish_path%\imageformats
|
||||||
rmdir /s/q %publish_path%\translations
|
rmdir /s/q %publish_path%\translations
|
||||||
del %publish_path%\vc_redist.x86.exe
|
if /i %cpu_mode% == x86 (
|
||||||
|
del %publish_path%\vc_redist.x86.exe
|
||||||
|
) else (
|
||||||
|
del %publish_path%\vc_redist.x64.exe
|
||||||
|
)
|
||||||
|
|
||||||
echo=
|
echo=
|
||||||
echo=
|
echo=
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue