mirror of
https://github.com/iDescriptor/iDescriptor.git
synced 2026-06-21 19:35:49 +08:00
Add installer banners and update plugin paths (WIN32)
This commit is contained in:
@@ -183,7 +183,7 @@ jobs:
|
||||
|
||||
- name: Configure CMake
|
||||
run: |
|
||||
cmake -B build -S . -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="$Qt6_DIR" -DNO_DEPLOY=""
|
||||
cmake -B build -S . -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="$Qt6_DIR" -DDEPLOY=OFF
|
||||
|
||||
- name: Build with CMake
|
||||
run: cmake --build build --config Release
|
||||
|
||||
+14
-8
@@ -5,6 +5,7 @@ project(iDescriptor VERSION 0.1.0 LANGUAGES CXX)
|
||||
option(ENABLE_RECOVERY_DEVICE_SUPPORT "Enable recovery device support (requires libirecovery)" ON)
|
||||
set(PACKAGE_MANAGER_HINT "" CACHE STRING "Name of package manager(s) used to manage this build (e.g. paru, yay, pamac)")
|
||||
option(PACKAGE_MANAGER_MANAGED "Build as package manager managed version (auto updates will be handled by the package manager)" OFF)
|
||||
option(DEPLOY "Deploy the application (WIN32 only)" ON)
|
||||
|
||||
set(CMAKE_AUTOUIC ON)
|
||||
set(CMAKE_AUTOMOC ON)
|
||||
@@ -386,7 +387,7 @@ if(QT_VERSION_MAJOR EQUAL 6)
|
||||
endif()
|
||||
|
||||
# Copy runtime DLLs to build directory after building
|
||||
if(WIN32 AND NOT DEFINED NO_DEPLOY)
|
||||
if(WIN32 AND DEPLOY)
|
||||
add_custom_command(TARGET iDescriptor POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E echo "Starting Windows deployment..."
|
||||
COMMAND ${CMAKE_COMMAND}
|
||||
@@ -441,29 +442,34 @@ set(CPACK_PACKAGE_VERSION ${PROJECT_VERSION})
|
||||
set(CPACK_WIX_VERSION 4)
|
||||
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "iDescriptor Application")
|
||||
set(CPACK_PACKAGE_VENDOR "iDescriptor")
|
||||
set(CPACK_PACKAGE_CONTACT "support@idescriptor.com")
|
||||
set(CPACK_PACKAGE_CONTACT "https://github.com/iDescriptor/iDescriptor")
|
||||
|
||||
set(CPACK_OUTPUT_FILE_PREFIX "${CMAKE_BINARY_DIR}/artifacts")
|
||||
|
||||
if(WIN32)
|
||||
set(CPACK_GENERATOR "WIX;ZIP")
|
||||
|
||||
set(CPACK_PACKAGE_FILE_NAME "${PROJECT_NAME}-${PROJECT_VERSION}-Windows_x86_64")
|
||||
|
||||
set(CPACK_PACKAGE_INSTALL_DIRECTORY "${PROJECT_NAME}")
|
||||
|
||||
string(UUID CPACK_WIX_PRODUCT_GUID NAMESPACE "1a2b3c4d-5e6f-7a8b-9c0d-1e2f3a4b5c6d" NAME "${PROJECT_NAME}" TYPE MD5)
|
||||
string(UUID CPACK_WIX_UPGRADE_GUID NAMESPACE "d6c5b4a3-f2e1-d0c9-b8a7-f6e5d4c3b2a1" NAME "${PROJECT_NAME}" TYPE MD5)
|
||||
set(CPACK_WIX_UI_REF "WixUI_InstallDir")
|
||||
|
||||
set(CPACK_WIX_UI_BANNER "${CMAKE_CURRENT_SOURCE_DIR}/resources/installer/banner.bmp")
|
||||
set(CPACK_WIX_UI_DIALOG "${CMAKE_CURRENT_SOURCE_DIR}/resources/installer/dialog.bmp")
|
||||
|
||||
set(CPACK_WIX_INSTALL_SCOPE "perMachine")
|
||||
set(CPACK_WIX_PROGRAM_MENU_FOLDER "${PROJECT_NAME}")
|
||||
set(CPACK_PACKAGE_EXECUTABLES "iDescriptor" "iDescriptor")
|
||||
set(CPACK_WIX_CREATE_DESKTOP_SHORTCUT "iDescriptor")
|
||||
set(CPACK_WIX_PRODUCT_ICON "${CMAKE_CURRENT_SOURCE_DIR}/resources/icons/app-icon/icon.ico")
|
||||
if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE.rtf")
|
||||
set(CPACK_WIX_LICENSE_RTF "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE.rtf")
|
||||
endif()
|
||||
set(CPACK_WIX_PACKAGE_FILE_NAME "${PROJECT_NAME}-${PROJECT_VERSION}-win64-setup")
|
||||
|
||||
set(CPACK_WIX_LICENSE_RTF "${CMAKE_CURRENT_SOURCE_DIR}/resources/installer/LICENSE.rtf")
|
||||
|
||||
set(CPACK_INCLUDE_TOPLEVEL_DIRECTORY OFF)
|
||||
set(CPACK_ARCHIVE_COMPONENT_INSTALL TRUE)
|
||||
set(CPACK_ARCHIVE_PACKAGE_FILE_NAME "${PROJECT_NAME}-${PROJECT_VERSION}-win64-portable")
|
||||
set(CPACK_ARCHIVE_INSTALL_DIRECTORY ".")
|
||||
|
||||
# Tell CPack to use the pre-built dist directory
|
||||
set(CPACK_INSTALLED_DIRECTORIES "${CMAKE_INSTALL_PREFIX};.")
|
||||
|
||||
@@ -73,7 +73,6 @@ file(GET_RUNTIME_DEPENDENCIES
|
||||
EXECUTABLES ${EXECUTABLE_PATH}
|
||||
RESOLVED_DEPENDENCIES_VAR DLLS
|
||||
PRE_EXCLUDE_REGEXES "^api-ms-" "^ext-ms-" "^AVRT" "^avrt" "^MSVCP" "^VCRUNTIME" "^ucrtbase" "^libgcc_s_seh-1\\.dll$" "^libstdc\\+\\+-6\\.dll$" "^libwinpthread-1\\.dll$" "^Qt.*\\.dll$" "^libgstreamer-1\\.0-0\\.dll$" "^libgstbase-1\\.0-0\\.dll$" "^libgobject-2\\.0-0\\.dll$" "^libglib-2\\.0-0\\.dll$" "^libintl-8\\.dll$" "^libiconv-2\\.dll$"
|
||||
#PRE_EXCLUDE_REGEXES "^api-ms-" "^ext-ms-" "^AVRT" "^avrt" "^MSVCP" "^VCRUNTIME" "^ucrtbase"
|
||||
POST_EXCLUDE_REGEXES ".*system32/.*\\.dll" ".*SysWOW64/.*\\.dll" ".*Windows/.*\\.dll" ".*Microsoft.VC.*" ".*Qt.*\\.dll$"
|
||||
DIRECTORIES ${BUILD_DIR} ${QT_BIN_PATH} ${MSYS2_BIN_PATH} "C:/lxqt/lib" $ENV{PATH}
|
||||
)
|
||||
@@ -117,13 +116,9 @@ endforeach()
|
||||
list(LENGTH DLLS TOTAL_DLLS)
|
||||
message("Processed ${TOTAL_DLLS} runtime dependencies, copied ${COPIED_DLLS} files")
|
||||
|
||||
# Step 3: Copy GStreamer plugins
|
||||
message("Copying GStreamer plugins...")
|
||||
# OLD: file(GLOB GSTREAMER_PLUGINS "${MSYS2_BIN_PATH}/../lib/gstreamer-1.0/*.dll")
|
||||
# Replace broad copy with targeted list (matches versioned names via glob)
|
||||
set(GSTREAMER_PLUGIN_DIR "${MSYS2_BIN_PATH}/../lib/gstreamer-1.0")
|
||||
|
||||
# List of plugin basenames to copy (no extension or version). Add items as needed.
|
||||
set(WANTED_PLUGINS
|
||||
"libgstaudioconvert"
|
||||
"libgstvolume"
|
||||
@@ -227,8 +222,7 @@ endforeach()
|
||||
|
||||
message("Copying GStreamer helper executables...")
|
||||
set(GST_LIBEXEC_PATH "${MSYS2_BIN_PATH}/../libexec/gstreamer-1.0")
|
||||
file(COPY "${GST_LIBEXEC_PATH}/gst-plugin-scanner.exe" DESTINATION "${OUTPUT_DIR}/libexec/gstreamer-1.0")
|
||||
file(COPY "${GST_LIBEXEC_PATH}/gst-ptp-helper.exe" DESTINATION "${OUTPUT_DIR}/libexec/gstreamer-1.0")
|
||||
file(COPY "${GST_LIBEXEC_PATH}/gst-plugin-scanner.exe" DESTINATION "${OUTPUT_DIR}/gstreamer-1.0/libexec")
|
||||
|
||||
message("Copying executables")
|
||||
file(COPY C:/msys64/mingw64/bin/iproxy.exe DESTINATION ${OUTPUT_DIR})
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 6.2 KiB |
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
Before Width: | Height: | Size: 11 KiB |
File diff suppressed because it is too large
Load Diff
Binary file not shown.
|
After Width: | Height: | Size: 87 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 454 KiB |
+3
-10
@@ -23,7 +23,7 @@
|
||||
#include <QDir>
|
||||
#include <QStyleFactory>
|
||||
#include <QtGlobal>
|
||||
#include <stdlib.h> // For getenv
|
||||
#include <stdlib.h>
|
||||
|
||||
#ifdef WIN32
|
||||
#include "platform/windows/check_deps.h"
|
||||
@@ -35,30 +35,23 @@ int main(int argc, char *argv[])
|
||||
QString appPath = QCoreApplication::applicationDirPath();
|
||||
QString gstPluginPath =
|
||||
QDir::toNativeSeparators(appPath + "/gstreamer-1.0");
|
||||
QString gstPluginScannerPath =
|
||||
QDir::toNativeSeparators(appPath + "/gstreamer-1.0/gst-plugin-scanner");
|
||||
QString gstPluginScannerPath = QDir::toNativeSeparators(
|
||||
appPath + "/gstreamer-1.0/libexec/gst-plugin-scanner.exe");
|
||||
|
||||
// Add the application's directory to the PATH so GStreamer plugins can find
|
||||
// their dependencies (e.g., FFmpeg DLLs).
|
||||
const char *oldPath = getenv("PATH");
|
||||
QString newPath = appPath + ";" + QString(oldPath);
|
||||
qputenv("PATH", newPath.toUtf8());
|
||||
|
||||
qputenv("GST_PLUGIN_PATH", gstPluginPath.toUtf8());
|
||||
qDebug() << "GST_PLUGIN_PATH=" << gstPluginPath;
|
||||
printf("GST_PLUGIN_PATH=%s\n", gstPluginPath.toUtf8().data());
|
||||
qputenv("GST_REGISTRY_REUSE_PLUGIN_SCANNER", "yes");
|
||||
qDebug() << "GST_REGISTRY_REUSE_PLUGIN_SCANNER=yes";
|
||||
printf("GST_REGISTRY_REUSE_PLUGIN_SCANNER=yes\n");
|
||||
qputenv("GST_PLUGIN_SYSTEM_PATH", gstPluginPath.toUtf8());
|
||||
qDebug() << "GST_PLUGIN_SYSTEM_PATH=" << gstPluginPath;
|
||||
printf("GST_PLUGIN_SYSTEM_PATH=%s\n", gstPluginPath.toUtf8().data());
|
||||
qputenv("GST_DEBUG", "GST_PLUGIN_LOADING:5");
|
||||
qDebug() << "GST_DEBUG=GST_PLUGIN_LOADING:5";
|
||||
printf("GST_DEBUG=GST_PLUGIN_LOADING:5\n");
|
||||
qputenv("GST_PLUGIN_SCANNER_1_0", gstPluginScannerPath.toUtf8());
|
||||
qDebug() << "GST_PLUGIN_SCANNER_1_0=" << gstPluginScannerPath;
|
||||
printf("GST_PLUGIN_SCANNER_1_0=%s\n", gstPluginScannerPath.toUtf8().data());
|
||||
#endif
|
||||
#ifdef __APPLE__
|
||||
QString appPath = QCoreApplication::applicationDirPath();
|
||||
|
||||
Reference in New Issue
Block a user