Skip to content

add MSYS2/MinGW as compile option #288

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

Merged
merged 1 commit into from
May 13, 2025
Merged

Conversation

BJNFNE
Copy link
Contributor

@BJNFNE BJNFNE commented May 13, 2025

Summary by CodeRabbit

  • Documentation
    • Added detailed instructions for building the project on Windows using MinGW/MSYS2, including setup steps and required dependencies.

Copy link

coderabbitai bot commented May 13, 2025

Walkthrough

The documentation file docs/BUILD.md was updated to include a new section with step-by-step instructions for building the project on Windows using MinGW/MSYS2. The instructions cover environment setup, dependency installation, and the build process, providing guidance specific to this toolchain.

Changes

File(s) Change Summary
docs/BUILD.md Added a section describing how to build the project on Windows using MinGW/MSYS2, including setup and commands.

Possibly related PRs

  • Update Windows version #239: Updates and clarifies existing Windows build instructions and supported versions in docs/BUILD.md; both PRs modify Windows build documentation but focus on different aspects.

Poem

In the warren of Windows, a new path appears,
With MinGW and MSYS2, the build process clears.
Follow the steps, dependencies in tow,
Soon your project will compile and glow!
🐇✨

Tip

⚡️ Faster reviews with caching
  • CodeRabbit now supports caching for code and dependencies, helping speed up reviews. This means quicker feedback, reduced wait times, and a smoother review experience overall. Cached data is encrypted and stored securely. This feature will be automatically enabled for all accounts on May 16th. To opt out, configure Review - Disable Cache at either the organization or repository level. If you prefer to disable all data retention across your organization, simply turn off the Data Retention setting under your Organization Settings.

Enjoy the performance boost—your workflow just got faster.


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 (3)
docs/BUILD.md (3)

141-143: Avoid bare URLs in documentation.
Markdown style guidelines discourage using bare URLs. Please switch to link syntax for clarity and accessibility:

Install MSYS2: [msys2.org](https://www.msys2.org/)
🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

143-143: Bare URL used
null

(MD034, no-bare-urls)


145-149: Standardize heading punctuation.
Trailing colons in headings are unconventional and may impact readability. Remove the colon:

-#### Clone this repo recursively:
+#### Clone this repo recursively
🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

145-145: Heading levels should only increment by one level at a time
Expected: h2; Actual: h4

(MD001, heading-increment)


145-145: Trailing punctuation in heading
Punctuation: ':'

(MD026, no-trailing-punctuation)


163-167: Clarify shell environment for building.
Building under MSYS2 requires using the “MSYS2 MinGW x64 UCRT64” shell (not the default MSYS shell) so that the correct toolchain and PATH are in effect. Please add a note to launch that environment before running:

chmod a+x configure
./configure
make -j4
📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between acb7bd1 and 7d291e3.

📒 Files selected for processing (1)
  • docs/BUILD.md (1 hunks)
🧰 Additional context used
🪛 markdownlint-cli2 (0.17.2)
docs/BUILD.md

143-143: Bare URL used
null

(MD034, no-bare-urls)


145-145: Heading levels should only increment by one level at a time
Expected: h2; Actual: h4

(MD001, heading-increment)


145-145: Trailing punctuation in heading
Punctuation: ':'

(MD026, no-trailing-punctuation)

docs/BUILD.md Outdated
Comment on lines 152 to 157
### Install libaries

```bash
pacman -S mingw-w64-ucrt-x86_64-gcc
pacman -S mingw-w64-x86_64-qt5-base
pacman -S mingw-w64-x86_64-qt5-tools
pacman -S mingw-w64-x86_64-qt5-script
```
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

Fix typo and enhance package installation.

  1. Correct the typo in the heading: libarieslibraries.
  2. Precede installs with a full MSYS2 update (pacman -Syu) to ensure package database and core packages are current.
  3. Include the Qt5 SVG package (mingw-w64-x86_64-qt5-svg) to match the Linux SVG dependency.

Apply this diff:

-### Install libaries
+#### Install libraries

+# Update MSYS2 package database and core system
+```bash
+pacman -Syu --noconfirm
+# After reopening the MSYS2 shell, finalize:
+pacman -Su --noconfirm
+```

-```bash
- pacman -S mingw-w64-ucrt-x86_64-gcc
- pacman -S mingw-w64-x86_64-qt5-base
- pacman -S mingw-w64-x86_64-qt5-tools
- pacman -S mingw-w64-x86_64-qt5-script
-```
+```bash
+pacman -S \
+  mingw-w64-ucrt-x86_64-gcc \
+  mingw-w64-x86_64-qt5-base \
+  mingw-w64-x86_64-qt5-tools \
+  mingw-w64-x86_64-qt5-script \
+  mingw-w64-x86_64-qt5-svg
+```

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

♻️ Duplicate comments (2)
docs/BUILD.md (2)

154-157: 🛠️ Refactor suggestion

Enhance MSYS2 package installation
Precede installs with a full update, group packages in one command, and include the Qt5 SVG & script packages.

-```bash
-pacman -S mingw-w64-ucrt-x86_64-gcc
-pacman -S mingw-w64-x86_64-qt5-tools
-```
+```bash
+# Update MSYS2 package database and core system
+pacman -Syu --noconfirm
+pacman -Su --noconfirm
+
+# Install required toolchain and Qt5 modules
+pacman -S \
+  mingw-w64-ucrt-x86_64-gcc \
+  mingw-w64-x86_64-qt5-base \
+  mingw-w64-x86_64-qt5-tools \
+  mingw-w64-x86_64-qt5-script \
+  mingw-w64-x86_64-qt5-svg \
+  --noconfirm
+```

152-152: 🛠️ Refactor suggestion

Fix typo and align heading level for the installation subsection
Correct the spelling and use the same H4 level you use elsewhere for substeps.

-### Install libaries
+#### Install libraries:
🧹 Nitpick comments (2)
docs/BUILD.md (2)

143-143: Convert bare URL to a markdown link
Avoid using a bare URL to satisfy Markdown lint rules and improve readability.

-Install MSYS2: https://www.msys2.org/
+Install MSYS2: [MSYS2](https://www.msys2.org/)
🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

143-143: Bare URL used
null

(MD034, no-bare-urls)


159-165: Clarify build environment and optimize parallel build
Recommend running these in the MinGW-w64 UCRT64 shell and leveraging all cores automatically.

-#### Build
-
-```bash
-chmod a+x configure
-./configure
-make -j4
-```
+#### Build
+
+> **Note:** Launch the **MSYS2 MinGW-w64 UCRT64** shell before proceeding.
+
+```bash
+chmod a+x configure
+./configure
+# Use all available cores
+make -j$(nproc)
+```
📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 7d291e3 and 8c5e524.

📒 Files selected for processing (1)
  • docs/BUILD.md (1 hunks)
🧰 Additional context used
🪛 markdownlint-cli2 (0.17.2)
docs/BUILD.md

143-143: Bare URL used
null

(MD034, no-bare-urls)


145-145: Heading levels should only increment by one level at a time
Expected: h2; Actual: h4

(MD001, heading-increment)


145-145: Trailing punctuation in heading
Punctuation: ':'

(MD026, no-trailing-punctuation)

🔇 Additional comments (1)
docs/BUILD.md (1)

141-141: Header consistency with existing sections
The H1 header # How to build with MinGW/MSYS2 aligns well with the other platform-specific sections above.

@BJNFNE
Copy link
Contributor Author

BJNFNE commented May 13, 2025

This compiles fine for all executables.

diec.exe can only be used at the moment.
die.exe can be executed but never shown an window, maybe QT5 related?

@DosX-dev DosX-dev merged commit 8687e90 into horsicq:master May 13, 2025
1 check passed
@BJNFNE BJNFNE deleted the msys2-new branch May 13, 2025 18:34
@coderabbitai coderabbitai bot mentioned this pull request May 14, 2025
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.

2 participants