merge new features
This commit is contained in:
@@ -32,6 +32,21 @@ set(CMAKE_CXX_FLAGS_PROFILE "${CMAKE_CXX_FLAGS_RELEASE}")
|
||||
# Use Unicode for all projects.
|
||||
add_definitions(-DUNICODE -D_UNICODE)
|
||||
|
||||
# flutter_inappwebview_windows requires NuGet; help CMake find it
|
||||
if(NOT DEFINED NUGET OR NUGET STREQUAL "NUGET-NOTFOUND")
|
||||
find_program(NUGET nuget PATHS
|
||||
"$ENV{USERPROFILE}\\.local\\bin"
|
||||
"$ENV{LOCALAPPDATA}\\Microsoft\\WinGet\\Links"
|
||||
"C:/ProgramData/chocolatey/bin"
|
||||
NO_DEFAULT_PATH
|
||||
)
|
||||
find_program(NUGET nuget)
|
||||
if(NUGET AND NOT NUGET STREQUAL "NUGET-NOTFOUND")
|
||||
message(STATUS "Found NuGet: ${NUGET}")
|
||||
set(NUGET "${NUGET}" CACHE FILEPATH "nuget executable" FORCE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Compilation settings that should be applied to most targets.
|
||||
#
|
||||
# Be cautious about adding new options here, as plugins use this function by
|
||||
@@ -112,6 +127,12 @@ ENSURE_WINDOWS_ARCHIVE(
|
||||
# them to the application.
|
||||
include(flutter/generated_plugins.cmake)
|
||||
|
||||
if(MSVC)
|
||||
if(TARGET flutter_inappwebview_windows_plugin)
|
||||
# flutter_inappwebview 插件有很多 MSVC 警告, 屏蔽该插件不输出任何警告
|
||||
target_compile_options(flutter_inappwebview_windows_plugin PRIVATE /W0)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# === Installation ===
|
||||
# Support files are copied into place next to the executable, so that it can
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
#include <desktop_drop/desktop_drop_plugin.h>
|
||||
#include <file_selector_windows/file_selector_windows.h>
|
||||
#include <flutter_acrylic/flutter_acrylic_plugin.h>
|
||||
#include <flutter_inappwebview_windows/flutter_inappwebview_windows_plugin_c_api.h>
|
||||
#include <media_kit_libs_windows_video/media_kit_libs_windows_video_plugin_c_api.h>
|
||||
#include <media_kit_video/media_kit_video_plugin_c_api.h>
|
||||
#include <permission_handler_windows/permission_handler_windows_plugin.h>
|
||||
@@ -24,6 +25,8 @@ void RegisterPlugins(flutter::PluginRegistry* registry) {
|
||||
registry->GetRegistrarForPlugin("FileSelectorWindows"));
|
||||
FlutterAcrylicPluginRegisterWithRegistrar(
|
||||
registry->GetRegistrarForPlugin("FlutterAcrylicPlugin"));
|
||||
FlutterInappwebviewWindowsPluginCApiRegisterWithRegistrar(
|
||||
registry->GetRegistrarForPlugin("FlutterInappwebviewWindowsPluginCApi"));
|
||||
MediaKitLibsWindowsVideoPluginCApiRegisterWithRegistrar(
|
||||
registry->GetRegistrarForPlugin("MediaKitLibsWindowsVideoPluginCApi"));
|
||||
MediaKitVideoPluginCApiRegisterWithRegistrar(
|
||||
|
||||
@@ -6,6 +6,7 @@ list(APPEND FLUTTER_PLUGIN_LIST
|
||||
desktop_drop
|
||||
file_selector_windows
|
||||
flutter_acrylic
|
||||
flutter_inappwebview_windows
|
||||
media_kit_libs_windows_video
|
||||
media_kit_video
|
||||
permission_handler_windows
|
||||
|
||||
Reference in New Issue
Block a user