Separate the SDK and Qt sample build projects
Compared with f612cfd:
- Move the capture SDK, private IOCTL wrapper, and optional preview helper under GVFG_SDK with an independent top-level CMake project and version source.
- Move the Qt preview application into GVFG_Qt_Sample and consume prebuilt SDK DLLs and compiler-specific import libraries through imported CMake targets instead of compiling SDK sources as subdirectories.
- Resolve Qt Creator configuration-specific SDK build directories automatically, copy the three runtime DLLs beside the sample executable, and keep missing MSVC or MinGW artifacts as explicit configure errors.
- Update Release and Debug packaging scripts to read SDK and sample outputs separately, and update the repository build instructions for the two-project workflow.
- Preserve the pre-existing uncommitted device display-name suffix change outside this commit.
Validation: independent MSVC SDK configure/build and independent Qt MSVC sample configure/build passed; the sample build graph contains no SDK implementation sources; git diff --check passed. No MinGW link, runtime launch, capture, audio playback, or hardware validation was run.
This commit is contained in:
+17
-15
@@ -4,7 +4,8 @@ setlocal EnableExtensions
|
||||
set "PROJECT_DIR=%~dp0"
|
||||
set "PROJECT_DIR=%PROJECT_DIR:~0,-1%"
|
||||
|
||||
if not defined SOURCE_BIN set "SOURCE_BIN=%PROJECT_DIR%\build\Desktop_Qt_6_10_2_MSVC2022_64bit-Debug\bin"
|
||||
if not defined SDK_SOURCE_BIN set "SDK_SOURCE_BIN=%PROJECT_DIR%\GVFG_SDK\build\Desktop_Qt_6_10_2_MSVC2022_64bit-Debug\bin"
|
||||
if not defined SAMPLE_SOURCE_BIN set "SAMPLE_SOURCE_BIN=%PROJECT_DIR%\GVFG_Qt_Sample\build\Desktop_Qt_6_10_2_MSVC2022_64bit-Debug\bin"
|
||||
if not defined QT_BIN set "QT_BIN=C:\Qt\6.10.2\msvc2022_64\bin"
|
||||
if not defined VSDEVCMD set "VSDEVCMD=C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\Common7\Tools\VsDevCmd.bat"
|
||||
|
||||
@@ -15,7 +16,7 @@ if "%~1"=="" (
|
||||
)
|
||||
|
||||
for /f %%I in ('powershell -NoProfile -ExecutionPolicy Bypass -Command "Get-Date -Format yyyyMMdd_HHmm"') do set "STAMP=%%I"
|
||||
for /f "tokens=3" %%I in ('findstr /C:"project(gvfg_standalone VERSION" "%PROJECT_DIR%\CMakeLists.txt"') do set "PACKAGE_VERSION=%%I"
|
||||
for /f "tokens=3" %%I in ('findstr /C:"project(gvfg_sdk VERSION" "%PROJECT_DIR%\GVFG_SDK\CMakeLists.txt"') do set "PACKAGE_VERSION=%%I"
|
||||
|
||||
if not defined PACKAGE_VERSION (
|
||||
echo [package] ERROR: Project version not found in CMakeLists.txt.
|
||||
@@ -29,22 +30,23 @@ set "STAGE_DIR=%STAGE_ROOT%\%PACKAGE_NAME%"
|
||||
set "WINDEPLOYQT=%QT_BIN%\windeployqt.exe"
|
||||
|
||||
echo [package] Configuration: Debug
|
||||
echo [package] Source: "%SOURCE_BIN%"
|
||||
echo [package] SDK source: "%SDK_SOURCE_BIN%"
|
||||
echo [package] Sample source: "%SAMPLE_SOURCE_BIN%"
|
||||
echo [package] Output: "%ZIP_PATH%"
|
||||
|
||||
if not exist "%SOURCE_BIN%\gvfg_qt_preview.exe" (
|
||||
if not exist "%SAMPLE_SOURCE_BIN%\gvfg_qt_preview.exe" (
|
||||
echo [package] ERROR: gvfg_qt_preview.exe not found.
|
||||
goto fail
|
||||
)
|
||||
if not exist "%SOURCE_BIN%\gvfg.dll" (
|
||||
if not exist "%SDK_SOURCE_BIN%\gvfg.dll" (
|
||||
echo [package] ERROR: gvfg.dll not found.
|
||||
goto fail
|
||||
)
|
||||
if not exist "%SOURCE_BIN%\giga_ioctl.dll" (
|
||||
if not exist "%SDK_SOURCE_BIN%\giga_ioctl.dll" (
|
||||
echo [package] ERROR: giga_ioctl.dll not found.
|
||||
goto fail
|
||||
)
|
||||
if not exist "%SOURCE_BIN%\gvfg_preview.dll" (
|
||||
if not exist "%SDK_SOURCE_BIN%\gvfg_preview.dll" (
|
||||
echo [package] ERROR: gvfg_preview.dll not found.
|
||||
goto fail
|
||||
)
|
||||
@@ -58,14 +60,14 @@ if exist "%STAGE_ROOT%" rmdir /S /Q "%STAGE_ROOT%" || goto fail
|
||||
mkdir "%STAGE_DIR%" || goto fail
|
||||
|
||||
echo [package] Copy application files and debug symbols...
|
||||
copy /Y "%SOURCE_BIN%\gvfg_qt_preview.exe" "%STAGE_DIR%\" >nul || goto fail
|
||||
copy /Y "%SOURCE_BIN%\gvfg.dll" "%STAGE_DIR%\" >nul || goto fail
|
||||
copy /Y "%SOURCE_BIN%\giga_ioctl.dll" "%STAGE_DIR%\" >nul || goto fail
|
||||
copy /Y "%SOURCE_BIN%\gvfg_preview.dll" "%STAGE_DIR%\" >nul || goto fail
|
||||
if exist "%SOURCE_BIN%\gvfg_qt_preview.pdb" copy /Y "%SOURCE_BIN%\gvfg_qt_preview.pdb" "%STAGE_DIR%\" >nul || goto fail
|
||||
if exist "%SOURCE_BIN%\gvfg.pdb" copy /Y "%SOURCE_BIN%\gvfg.pdb" "%STAGE_DIR%\" >nul || goto fail
|
||||
if exist "%SOURCE_BIN%\giga_ioctl.pdb" copy /Y "%SOURCE_BIN%\giga_ioctl.pdb" "%STAGE_DIR%\" >nul || goto fail
|
||||
if exist "%SOURCE_BIN%\gvfg_preview.pdb" copy /Y "%SOURCE_BIN%\gvfg_preview.pdb" "%STAGE_DIR%\" >nul || goto fail
|
||||
copy /Y "%SAMPLE_SOURCE_BIN%\gvfg_qt_preview.exe" "%STAGE_DIR%\" >nul || goto fail
|
||||
copy /Y "%SDK_SOURCE_BIN%\gvfg.dll" "%STAGE_DIR%\" >nul || goto fail
|
||||
copy /Y "%SDK_SOURCE_BIN%\giga_ioctl.dll" "%STAGE_DIR%\" >nul || goto fail
|
||||
copy /Y "%SDK_SOURCE_BIN%\gvfg_preview.dll" "%STAGE_DIR%\" >nul || goto fail
|
||||
if exist "%SAMPLE_SOURCE_BIN%\gvfg_qt_preview.pdb" copy /Y "%SAMPLE_SOURCE_BIN%\gvfg_qt_preview.pdb" "%STAGE_DIR%\" >nul || goto fail
|
||||
if exist "%SDK_SOURCE_BIN%\gvfg.pdb" copy /Y "%SDK_SOURCE_BIN%\gvfg.pdb" "%STAGE_DIR%\" >nul || goto fail
|
||||
if exist "%SDK_SOURCE_BIN%\giga_ioctl.pdb" copy /Y "%SDK_SOURCE_BIN%\giga_ioctl.pdb" "%STAGE_DIR%\" >nul || goto fail
|
||||
if exist "%SDK_SOURCE_BIN%\gvfg_preview.pdb" copy /Y "%SDK_SOURCE_BIN%\gvfg_preview.pdb" "%STAGE_DIR%\" >nul || goto fail
|
||||
|
||||
echo [package] Deploy Qt Debug runtime...
|
||||
if exist "%VSDEVCMD%" call "%VSDEVCMD%" -arch=x64 >nul || goto fail
|
||||
|
||||
Reference in New Issue
Block a user