Skip to content

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

divinebird
Copy link

@divinebird divinebird commented Jun 26, 2025

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

  • Chores
    • Simplified Windows plugin build configuration for improved clarity and maintainability. No changes to user-facing features.

Copy link

coderabbitai bot commented Jun 26, 2025

Walkthrough

The 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 openpgp_bundled_libraries variable and exported to the parent scope, eliminating the need for explicit file installation commands.

Changes

File(s) Change Summary
windows/CMakeLists.txt Removed install commands and related variables; directly sets and exports DLL path in a variable

Poem

A hop, a skip, a DLL path,
No install steps, no aftermath.
CMake’s simpler, less to track,
The bunny’s code is lean, not slack.
With bundled libraries set just right,
The build hops forward, light and bright! 🐇✨


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.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need 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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@coderabbitai coderabbitai bot left a 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
 )
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between de80509 and cba813a.

📒 Files selected for processing (1)
  • windows/CMakeLists.txt (1 hunks)

Comment on lines 18 to 19
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()

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

⚠️ Potential issue

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant