diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 1051598..1089d8d 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -16,10 +16,10 @@ on: jobs: build: name: Build - # windows-latest目前是windows server 2019 + # windows-latest目前是windows server 2022 # windows server 2019安装的是vs2019,windows server 2016安装的是vs2017 # https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idruns-on - runs-on: windows-2019 + runs-on: windows-latest # 矩阵配置 https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idstrategymatrix strategy: @@ -39,8 +39,8 @@ jobs: # 使用表达式语法${{}}访问上下文 https://help.github.com/en/actions/reference/context-and-expression-syntax-for-github-actions env: target-name: QtScrcpy - vcvarsall-path: 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat' - vcinstall-path: 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC' + vcvarsall-path: 'C:\Program Files (x86)\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat' + vcinstall-path: 'C:\Program Files (x86)\Microsoft Visual Studio\2022\Enterprise\VC' qt-install-path: ${{ github.workspace }}/${{ matrix.qt-ver }} plantform-des: win # 步骤 diff --git a/QtScrcpy/QtScrcpyCore b/QtScrcpy/QtScrcpyCore index b118082..fd3cfa5 160000 --- a/QtScrcpy/QtScrcpyCore +++ b/QtScrcpy/QtScrcpyCore @@ -1 +1 @@ -Subproject commit b118082a176c051b327622a5fd11dabd731a2a2b +Subproject commit fd3cfa521b3e9c407f7afe9117089b51e5e07dd8 diff --git a/QtScrcpy/audio/audiooutput.cpp b/QtScrcpy/audio/audiooutput.cpp index 033abc8..e6825f7 100644 --- a/QtScrcpy/audio/audiooutput.cpp +++ b/QtScrcpy/audio/audiooutput.cpp @@ -1,8 +1,9 @@ -#include -#include #include -#include +#include #include +#include +#include +#include #if (QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)) #include @@ -85,6 +86,7 @@ bool AudioOutput::runSndcpyProcess(const QString &serial, int port, bool wait) m_sndcpy.start("sndcpy.bat", params); #else QStringList params{"sndcpy.sh", serial, QString::number(port)}; + m_sndcpy.setWorkingDirectory(QCoreApplication::applicationDirPath()); m_sndcpy.start("bash", params); #endif diff --git a/QtScrcpy/util/config.cpp b/QtScrcpy/util/config.cpp index c8b8eee..8d32737 100644 --- a/QtScrcpy/util/config.cpp +++ b/QtScrcpy/util/config.cpp @@ -21,7 +21,7 @@ #define COMMON_PUSHFILE_DEF "/sdcard/" #define COMMON_SERVER_VERSION_KEY "ServerVersion" -#define COMMON_SERVER_VERSION_DEF "3.2" +#define COMMON_SERVER_VERSION_DEF "3.3.1" #define COMMON_SERVER_PATH_KEY "ServerPath" #define COMMON_SERVER_PATH_DEF "/data/local/tmp/scrcpy-server.jar" diff --git a/ci/win/build_for_win.bat b/ci/win/build_for_win.bat index f5ce265..a869baa 100644 --- a/ci/win/build_for_win.bat +++ b/ci/win/build_for_win.bat @@ -86,7 +86,7 @@ if exist %temp_path% ( md %temp_path% cd %temp_path% -set cmake_params=-DCMAKE_PREFIX_PATH=%qt_cmake_path% -DCMAKE_BUILD_TYPE=%build_mode% -G "Visual Studio 16 2019" -A %cmake_vs_build_mode% +set cmake_params=-DCMAKE_PREFIX_PATH=%qt_cmake_path% -DCMAKE_BUILD_TYPE=%build_mode% -G "Visual Studio 17 2022" -A %cmake_vs_build_mode% echo cmake params: %cmake_params% cmake %cmake_params% ../.. diff --git a/config/config.ini b/config/config.ini index 4642b8f..e09aa46 100644 --- a/config/config.ini +++ b/config/config.ini @@ -12,7 +12,7 @@ RenderExpiredFrames=0 # 视频解码方式:-1 自动,0 软解,1 dx硬解,2 opengl硬解 UseDesktopOpenGL=-1 # scrcpy-server的版本号(不要修改) -ServerVersion=3.2 +ServerVersion=3.3.1 # scrcpy-server推送到安卓设备的路径 ServerPath=/data/local/tmp/scrcpy-server.jar # 自定义adb路径,例如D:/android/tools/adb.exe