Skip to content

Ensure that steam lib is included in all release packages#117

Merged
LiquidityC merged 1 commit intodevfrom
packaging_fixes
Apr 7, 2025
Merged

Ensure that steam lib is included in all release packages#117
LiquidityC merged 1 commit intodevfrom
packaging_fixes

Conversation

@LiquidityC
Copy link
Member

@LiquidityC LiquidityC commented Apr 7, 2025

Summary by CodeRabbit

  • Chores
    • Enhanced the installation process to dynamically select runtime components based on build type and platform.
    • Clarified installation paths for different distributions, ensuring a more consistent deployment experience for Steam and non-Steam builds.

@coderabbitai
Copy link

coderabbitai bot commented Apr 7, 2025

Walkthrough

The pull request updates the project's CMake installation configuration. The runtime component assignment is now dynamic using ${PACKAGE_COMPONENT} based on the build type (Release or Beta). Additionally, the conditional structure for including system runtime libraries has been reorganized to check for a STEAM build first and then, if on Windows, add the Steam API DLL; otherwise, it sets a Linux library path. Furthermore, the installation destinations for the targets have been altered: non-Steam builds now install to bin/ while Steam builds install to the current directory (.).

Changes

File(s) Summary
CMakeLists.txt - Updated CMAKE_INSTALL_SYSTEM_RUNTIME_COMPONENT from "Release" to "${PACKAGE_COMPONENT}"
- Reorganized conditional structure for STEAM and WIN32 checks
- Modified runtime installation destinations (non-Steam: bin/, Steam: .)

Sequence Diagram(s)

sequenceDiagram
    participant BuildSystem as Build System
    participant CMake as CMake Configuration
    participant Installer as Installer

    BuildSystem->>CMake: Process CMakeLists.txt
    alt STEAM Build?
         CMake->>CMake: Set COMPONENT using ${PACKAGE_COMPONENT}
         alt WIN32 Build?
              CMake->>Installer: Copy Steam API DLL and set destination "."
         else
              CMake->>Installer: Add Linux library path and set destination "."
         end
    else
         CMake->>Installer: Set destination to "bin/"
    end
Loading

Poem

I'm a rabbit with a joyful skip,
Hopping through code on a lively trip.
With dynamic paths and tweaks in sight,
My build now shines both day and night.
Steam or no, I leap with glee—
A merry build for you and me! 🐇✨


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.
    • Generate unit testing code for this file.
    • 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 generate unit testing code for this file.
    • @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 generate unit testing code.
    • @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.

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 resolve resolve all the CodeRabbit review comments.
  • @coderabbitai plan to trigger planning for file edits and PR creation.
  • @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: 0

🧹 Nitpick comments (2)
CMakeLists.txt (2)

307-320: Conditional Inclusion of Steam Libraries
This block conditionally appends the Steam runtime libraries for Steam builds. On Windows, it appends the Steam API DLL, and on Linux, it includes both the Linux Steam API library and an additional file (build_deps/linux/breakhack.run). Please confirm that the file paths for these components are correct and that including breakhack.run is intentional for your Linux release packages. If these paths are subject to change or need further clarification, consider adding inline comments or abstracting them into dedicated variables.


323-332: Non-Steam Installation Configuration
For non-Steam builds, the INSTALL() commands now explicitly set the runtime destination to bin/ for both the Release and Beta components, along with installing asset files to a designated subdirectory. This configuration clearly differentiates non-Steam installations. For maintainability—and to reduce potential future duplication—it might be helpful to define a variable (e.g., NON_STEAM_RUNTIME_DEST) that holds the value bin/ and use it throughout these install commands.

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 31e95f5 and 0d884b0.

📒 Files selected for processing (1)
  • CMakeLists.txt (3 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (11)
  • GitHub Check: build (macos-latest, Debug, clang)
  • GitHub Check: build (macos-latest, Release, clang)
  • GitHub Check: build (ubuntu-latest, Debug, mingw-w64-gcc)
  • GitHub Check: build (macos-latest, Debug, gcc)
  • GitHub Check: build (macos-latest, Release, gcc)
  • GitHub Check: build (ubuntu-latest, Release, mingw-w64-gcc)
  • GitHub Check: build (ubuntu-latest, Debug, clang)
  • GitHub Check: build (ubuntu-latest, Debug, gcc)
  • GitHub Check: build (ubuntu-latest, Release, gcc)
  • GitHub Check: build (ubuntu-latest, Release, clang)
  • GitHub Check: Analyze (c-cpp)
🔇 Additional comments (2)
CMakeLists.txt (2)

305-306: Dynamic Packaging Component and Destination Update
The change to set CMAKE_INSTALL_SYSTEM_RUNTIME_COMPONENT using the dynamic ${PACKAGE_COMPONENT} ensures that the build system will correctly assign a "Release" or "Beta" component based on the build type. Also, setting CMAKE_INSTALL_SYSTEM_RUNTIME_DESTINATION to "." appears intended to adjust the location where the system runtime libraries are installed. Please verify that this global setting harmonizes with the later, more explicit INSTALL() commands (which override the destination for non-Steam builds) and aligns with your overall distribution layout.


340-349: Steam Build Installation Adjustments
For Steam builds, the installation targets for both Release and Beta components are now configured with RUNTIME DESTINATION ., which ensures the runtime files end up in the package root as required by the PR objective. This change aligns with the updated packaging strategy for Steam builds.

@LiquidityC LiquidityC enabled auto-merge (squash) April 7, 2025 18:21
@LiquidityC LiquidityC merged commit cf73786 into dev Apr 7, 2025
13 checks passed
@LiquidityC LiquidityC deleted the packaging_fixes branch April 7, 2025 18:24
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