mirror of
https://github.com/barry-ran/QtScrcpy.git
synced 2025-08-04 14:48:37 +00:00
1
This commit is contained in:
parent
fd175ca2be
commit
091596b811
3 changed files with 23 additions and 13 deletions
5
.github/workflows/windows.yml
vendored
5
.github/workflows/windows.yml
vendored
|
@ -75,12 +75,13 @@ jobs:
|
||||||
shell: cmd
|
shell: cmd
|
||||||
env:
|
env:
|
||||||
vc_arch: ${{ matrix.msvc_arch }}
|
vc_arch: ${{ matrix.msvc_arch }}
|
||||||
|
publish_dir: ..\build\QtScrcpy-win${{ matrix.msvc_arch }}-v1.1.1
|
||||||
ENV_VCVARSALL: 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat'
|
ENV_VCVARSALL: 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat'
|
||||||
ENV_QT_MSVC: 'd:\a\QtScrcpy\Qt\5.12.7'
|
ENV_QT_MSVC: 'd:\a\QtScrcpy\Qt\5.12.7'
|
||||||
ENV_BUILD_DIR: '../build-win'
|
ENV_PUBLISH_DIR: '..\build\QtScrcpy-win32'
|
||||||
run: |
|
run: |
|
||||||
call "ci\win\build_for_win.bat" release %vc_arch%
|
call "ci\win\build_for_win.bat" release %vc_arch%
|
||||||
call "ci\win\publish_for_win.bat" %vc_arch%
|
call "ci\win\publish_for_win.bat" %vc_arch% %publish_dir%
|
||||||
# tag 打包
|
# tag 打包
|
||||||
- name: package
|
- name: package
|
||||||
if: startsWith(github.event.ref, 'refs/tags/')
|
if: startsWith(github.event.ref, 'refs/tags/')
|
||||||
|
|
|
@ -4,8 +4,6 @@
|
||||||
set vcvarsall="%ENV_VCVARSALL%"
|
set vcvarsall="%ENV_VCVARSALL%"
|
||||||
:: 例如 d:\a\QtScrcpy\Qt\5.12.7
|
:: 例如 d:\a\QtScrcpy\Qt\5.12.7
|
||||||
set qt_msvc_path="%ENV_QT_MSVC%"
|
set qt_msvc_path="%ENV_QT_MSVC%"
|
||||||
:: 例如 ../build-win
|
|
||||||
set build_path_name="%ENV_BUILD_DIR%"
|
|
||||||
|
|
||||||
echo=
|
echo=
|
||||||
echo=
|
echo=
|
||||||
|
@ -23,7 +21,8 @@ set script_path=%~dp0
|
||||||
set old_cd=%cd%
|
set old_cd=%cd%
|
||||||
cd /d %~dp0
|
cd /d %~dp0
|
||||||
|
|
||||||
set build_path=%script_path%%build_path_name%
|
:: 临时文件目录
|
||||||
|
set temp_path=%script_path%..\temp
|
||||||
|
|
||||||
:: 启动参数声明
|
:: 启动参数声明
|
||||||
set debug_mode="false"
|
set debug_mode="false"
|
||||||
|
@ -85,11 +84,11 @@ echo ---------------------------------------------------------------
|
||||||
echo begin qmake build
|
echo begin qmake build
|
||||||
echo ---------------------------------------------------------------
|
echo ---------------------------------------------------------------
|
||||||
|
|
||||||
if exist %build_path% (
|
if exist %temp_path% (
|
||||||
rmdir /q /s %build_path%
|
rmdir /q /s %temp_path%
|
||||||
)
|
)
|
||||||
md %build_path%
|
md %temp_path%
|
||||||
cd %build_path%
|
cd %temp_path%
|
||||||
|
|
||||||
set qmake_params=-spec win32-msvc
|
set qmake_params=-spec win32-msvc
|
||||||
|
|
||||||
|
|
|
@ -26,6 +26,13 @@ if /i "%1"=="x64" (
|
||||||
set cpu_mode=x64
|
set cpu_mode=x64
|
||||||
)
|
)
|
||||||
|
|
||||||
|
set publish_dir=%2
|
||||||
|
set errno=1
|
||||||
|
|
||||||
|
:: 提示
|
||||||
|
echo current build mode: %cpu_mode%
|
||||||
|
echo current publish dir: %publish_dir%
|
||||||
|
|
||||||
:: 环境变量设置
|
:: 环境变量设置
|
||||||
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
|
set jar_path=%script_path%..\..\third_party\scrcpy-server
|
||||||
|
@ -33,11 +40,11 @@ set keymap_path=%script_path%..\..\keymap
|
||||||
set config_path=%script_path%..\..\config
|
set config_path=%script_path%..\..\config
|
||||||
|
|
||||||
if /i %cpu_mode% == x86 (
|
if /i %cpu_mode% == x86 (
|
||||||
set publish_path=%script_path%..\build\QtScrcpy-win32\
|
set publish_path=%script_path%%publish_dir%\
|
||||||
set release_path=%script_path%..\..\output\win\x86\release
|
set release_path=%script_path%..\..\output\win\x86\release
|
||||||
set qt_msvc_path=%qt_msvc_path%\msvc2017\bin
|
set qt_msvc_path=%qt_msvc_path%\msvc2017\bin
|
||||||
) else (
|
) else (
|
||||||
set publish_path=%script_path%QtScrcpy-win64\
|
set publish_path=%script_path%%publish_dir%\
|
||||||
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 qt_msvc_path=%qt_msvc_path%\msvc2017_64\bin
|
||||||
)
|
)
|
||||||
|
@ -81,8 +88,11 @@ if /i %cpu_mode% == x86 (
|
||||||
echo=
|
echo=
|
||||||
echo=
|
echo=
|
||||||
echo ---------------------------------------------------------------
|
echo ---------------------------------------------------------------
|
||||||
echo 完成!
|
echo finish!!!
|
||||||
echo ---------------------------------------------------------------
|
echo ---------------------------------------------------------------
|
||||||
|
|
||||||
|
set errno=0
|
||||||
|
|
||||||
:return
|
:return
|
||||||
cd %old_cd%
|
cd %old_cd%
|
||||||
|
exit /B %errno%
|
Loading…
Add table
Add a link
Reference in a new issue