-
-
Notifications
You must be signed in to change notification settings - Fork 25
Fix bridge lib copy on windows #85
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Fix bridge lib copy on windows #85
Conversation
WalkthroughThe CMake configuration for the Windows plugin was simplified by removing the install step and associated variables. The DLL path is now directly set in the Changes
Poem
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🧹 Nitpick comments (1)
windows/CMakeLists.txt (1)
23-27
: Quote the DLL path to avoid list–element splitting
set()
treats semicolons as list separators. Quoting guards against accidental splitting if the path ever contains a semicolon (rare, but cheap insurance) and makes the intent explicit.-set(openpgp_bundled_libraries - ${LIBOPENPGP_BRIDGE_PATH} +set(openpgp_bundled_libraries + "${LIBOPENPGP_BRIDGE_PATH}" PARENT_SCOPE )
set(BUILD_BUNDLE_DIR "$<TARGET_FILE_DIR:${BINARY_NAME}>") | ||
# Make the "install" step default, as it's required to run. | ||
set(CMAKE_VS_INCLUDE_INSTALL_TO_DEFAULT_BUILD 1) | ||
if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) | ||
set(CMAKE_INSTALL_PREFIX "${BUILD_BUNDLE_DIR}" CACHE PATH "..." FORCE) | ||
endif() | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
BINARY_NAME
is undefined – BUILD_BUNDLE_DIR
will expand to an empty path at configure-time
BUILD_BUNDLE_DIR
is set using ${BINARY_NAME}
, but that variable is never declared in this file (and is not part of the standard Flutter-plugin template). A missing value will silently evaluate to an empty string, breaking any downstream logic that relies on BUILD_BUNDLE_DIR
.
-set(BUILD_BUNDLE_DIR "$<TARGET_FILE_DIR:${BINARY_NAME}>")
+# If the intent is the plugin DLL directory, use the target created above.
+set(BUILD_BUNDLE_DIR "$<TARGET_FILE_DIR:${PLUGIN_NAME}>")
#
# Alternatively, drop the variable entirely if nothing consumes it any more.
🤖 Prompt for AI Agents
In windows/CMakeLists.txt around lines 18 to 19, the variable BINARY_NAME is
used but never defined, causing BUILD_BUNDLE_DIR to expand to an empty path.
Define BINARY_NAME appropriately before its usage, typically by setting it to
the target binary name or retrieving it from a relevant variable, so that
BUILD_BUNDLE_DIR resolves correctly and downstream logic depending on it
functions as expected.
Old CMake rules somehow did not result in copying libopenpgp_bridge.dll to final project.
New rules use linux rules as a template and copy the library.
Summary by CodeRabbit