Skip to content

Conversation

@4z0t
Copy link
Member

@4z0t 4z0t commented Apr 6, 2025

Seems like MSYS2 got some unreliable updates which just caused my fresh setup to fail to build patches. With this guide it worked properly.

Summary by CodeRabbit

  • Documentation
    • Enhanced setup guide with clearer installation instructions for required components.
    • Added new sections covering Visual Studio configuration and patching workflow.
    • Expanded testing documentation with multiple approaches and debugging suggestions.
    • Improved overall clarity and formatting throughout the setup guide.

✏️ Tip: You can customize this high-level summary in your review settings.

@4z0t 4z0t marked this pull request as draft April 7, 2025 20:43
@4z0t
Copy link
Member Author

4z0t commented Apr 7, 2025

I have to test on fresh machine again. Because seems like it requires MSVC libs which are obtainable via Visual Studio Installer

@4z0t 4z0t marked this pull request as ready for review September 3, 2025 17:36
@Garanas
Copy link
Member

Garanas commented Sep 17, 2025

I can't really comment on this procedure. I've never done it myself. Is the workflow still working stable?

@coderabbitai
Copy link

coderabbitai bot commented Jan 28, 2026

📝 Walkthrough

Walkthrough

SETUP.md documentation expanded with clarified installation instructions for Clang, Visual Studio, and GCC via Chocolatey. Added new Patcher section, build script usage details, and expanded testing and debugging guidance. Removed references to MSYS2-based setup.

Changes

Cohort / File(s) Summary
Documentation Updates
SETUP.md
Expanded and reorganized setup instructions: added Visual Studio component requirements and subsection, reworked Clang/LLVM installation guidance with specific binary naming, updated GCC installation to use Chocolatey with mingw64 path, introduced new Patcher section, clarified build script syntax and testing approaches (FAF client/repo options), added FADeepProbe debugger suggestion, and minor formatting refinements throughout.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 A setup guide now shines so bright,
With Clang and GCC paths set right,
Visual Studio steps arranged with care,
Patcher and debugger placed just there!
Clear instructions from nose to tail,

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Update Setup guide' directly reflects the main change: expanding and improving the SETUP.md documentation with updated installation procedures and clarified instructions.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


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

Comment @coderabbitai help to get the list of available commands and usage tips.

@4z0t
Copy link
Member Author

4z0t commented Jan 28, 2026

Okay lets see what this AI says

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: 3

🤖 Fix all issues with AI agents
In `@SETUP.md`:
- Line 8: Update the sentence in SETUP.md to use the possessive "its" instead of
the contraction "it's": change "requires it's components" to "requires its
components" so the line reads "You will need GCC and Clang compilers and some
components of Visual Studio (Yes, patching game engine that was originally built
with Visual Studio requires its components)."
- Line 30: Update the informal phrasing in the README/SETUP text by replacing
"gonna be installed at `C:\ProgramData\mingw64`" with the formal wording "will
be installed at `C:\ProgramData\mingw64`" so the sentence reads: "Run `choco
install mingw --x86 -y --no-progress` which will be installed at
`C:\ProgramData\mingw64`."
- Around line 29-31: Update the incorrect Chocolatey installation path on line
containing "C:\ProgramData\mingw64" to the correct Chocolatey install location
"C:\ProgramData\chocolatey\lib\mingw\tools\install\mingw32\bin\" and explicitly
reference the full executable paths
"C:\ProgramData\chocolatey\lib\mingw\tools\install\mingw32\bin\g++.exe" and
"C:\ProgramData\chocolatey\lib\mingw\tools\install\mingw32\bin\ld.exe"; also
replace the informal phrase "gonna be installed" with "will be installed" in
that same line.
🧹 Nitpick comments (1)
SETUP.md (1)

39-41: Consider adding parameter descriptions for clarity.

The command syntax example lists four paths, but adding brief inline descriptions could help users avoid mistakes when setting up the build script.

📝 Suggested enhancement
 ```bat
-python main.py [Path to patches folder] [Path to clang++.exe] [Path to ld.exe] [Path to g++.exe]
+python main.py [Path to patches folder] [Path to clang++.exe] [Path to ld.exe from GCC] [Path to g++.exe from GCC]

Or add a brief example:
```markdown
```bat
python main.py [Path to patches folder] [Path to clang++.exe] [Path to ld.exe] [Path to g++.exe]

Example:

python main.py C:\patches C:\LLVM\bin\clang++.exe C:\ProgramData\mingw64\mingw32\bin\ld.exe C:\ProgramData\mingw64\mingw32\bin\g++.exe

# Compilers

You will need GCC and Clang compilers.
You will need GCC and Clang compilers and some components of Visual Studio (Yes, patching game engine that was originally built with Visual Studio requires it's components).
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Fix grammar: use possessive "its" instead of contraction "it's".

The phrase "requires it's components" should be "requires its components" (possessive form, not contraction).

✏️ Proposed fix
-You will need GCC and Clang compilers and some components of Visual Studio (Yes, patching game engine that was originally built with Visual Studio requires it's components).
+You will need GCC and Clang compilers and some components of Visual Studio (Yes, patching game engine that was originally built with Visual Studio requires its components).
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
You will need GCC and Clang compilers and some components of Visual Studio (Yes, patching game engine that was originally built with Visual Studio requires it's components).
You will need GCC and Clang compilers and some components of Visual Studio (Yes, patching game engine that was originally built with Visual Studio requires its components).
🤖 Prompt for AI Agents
In `@SETUP.md` at line 8, Update the sentence in SETUP.md to use the possessive
"its" instead of the contraction "it's": change "requires it's components" to
"requires its components" so the line reads "You will need GCC and Clang
compilers and some components of Visual Studio (Yes, patching game engine that
was originally built with Visual Studio requires its components)."

Comment on lines +29 to 31
* Install [chocolatey](https://chocolatey.org/)
* Run `choco install mingw --x86 -y --no-progress` which is gonna be installed at `C:\ProgramData\mingw64`.
* You need paths to `/mingw32/bin/g++.exe` and `/mingw32/bin/ld.exe`
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

# First, locate and read the SETUP.md file to understand the full context
fd -t f "SETUP.md" | head -5

Repository: FAForever/fa-python-binary-patcher

Length of output: 86


🏁 Script executed:

# Read the SETUP.md file to see lines 29-31 in context
cat -n SETUP.md

Repository: FAForever/fa-python-binary-patcher

Length of output: 2331


🌐 Web query:

Chocolatey mingw package installation path --x86 flag C:\ProgramData

💡 Result:

With Chocolatey installed in the default location, %ChocolateyInstall is C:\ProgramData\chocolatey. (docs.chocolatey.org)

For the community mingw (MinGW-w64) package, the package script extracts the archive into an install folder inside the package’s tools directory, i.e. typically:

  • 64-bit default install path (most common):
    C:\ProgramData\chocolatey\lib\mingw\tools\install\... (community.chocolatey.org)
  • The --x86 flag tells Chocolatey to use the 32-bit download (url) instead of the 64-bit download (url64bit), but it still extracts under that same ...\lib\mingw\tools\install\ folder. (community.chocolatey.org)

To confirm on your machine, check:

  • %ChocolateyInstall%\lib\mingw\tools\install
  • or run in PowerShell: Write-Host $env:ChocolateyInstall (docs.chocolatey.org)

Citations:


🌐 Web query:

Chocolatey mingw package tools install directory structure mingw32 mingw64

💡 Result:

For Chocolatey packages, the extracted “real” files typically live under:

  • %ChocolateyInstall%\lib\<package>\tools\install\... (default %ChocolateyInstall% is C:\ProgramData\chocolatey).

mingw / MinGW-w64 (Chocolatey package name: mingw)

The toolchain is placed under the package’s tools\install\mingw64\..., e.g.:

  • C:\ProgramData\chocolatey\lib\mingw\tools\install\mingw64\bin (compiler/binutils, etc.) [1]
  • You may also see subtrees like ...\mingw64\opt\bin\... referenced by Chocolatey shims (e.g., python.exe) [2]
  • GCC’s versioned libs/headers are under paths like ...\mingw64\lib\gcc\x86_64-w64-mingw32\<ver>\... [3]

So, for this package, mingw64 is the directory you normally add to PATH (or let Chocolatey shims handle).

Packages that provide both mingw32 and mingw64

Some Chocolatey packages (e.g., WinLibs-based ones) extract both architectures side-by-side and then use:

  • <installDir>\mingw32\bin
  • <installDir>\mingw64\bin [4]

This is where the “mingw32 and mingw64 directory structure” usually comes from.

Sources: [1] [2] [3] [4]


🌐 Web query:

Chocolatey mingw --x86 flag 32-bit binaries mingw32 directory

💡 Result:

  • --x86 (aka --forcex86) tells Chocolatey to force the 32‑bit build even on a 64‑bit Windows machine. [1]
  • For the Chocolatey mingw package, the install script unpacks into the package’s tools\install folder (under Chocolatey’s lib\mingw directory). [2]
    • Typical path: C:\ProgramData\chocolatey\lib\mingw\tools\install\
  • The 32‑bit MinGW-w64 binaries will then be under the mingw32 tree, i.e.:
    • C:\ProgramData\chocolatey\lib\mingw\tools\install\mingw32\bin\ [2]
  • On a 64‑bit machine, using --x86 makes the mingw package use its i686 (32‑bit) download (url), instead of the url64bit (x86_64) download. [2]

Sources: [1] Chocolatey install command docs (option --x86). [2] Chocolatey mingw package install script showing tools\install location and 32/64-bit URLs.


Line 30: Incorrect installation path.

choco install mingw --x86 does not install to C:\ProgramData\mingw64. The actual installation path is C:\ProgramData\chocolatey\lib\mingw\tools\install\mingw32\bin\ (when using the --x86 flag for 32-bit binaries). Update line 30 to reflect the correct Chocolatey installation location and provide the full path to the executables.

Additionally, replace the informal "gonna be" with "will be" on line 30.

🧰 Tools
🪛 LanguageTool

[style] ~30-~30: The word ‘gonna’ is informal.
Context: ... mingw --x86 -y --no-progresswhich is gonna be installed atC:\ProgramData\mingw64...

(GONNA)

🤖 Prompt for AI Agents
In `@SETUP.md` around lines 29 - 31, Update the incorrect Chocolatey installation
path on line containing "C:\ProgramData\mingw64" to the correct Chocolatey
install location
"C:\ProgramData\chocolatey\lib\mingw\tools\install\mingw32\bin\" and explicitly
reference the full executable paths
"C:\ProgramData\chocolatey\lib\mingw\tools\install\mingw32\bin\g++.exe" and
"C:\ProgramData\chocolatey\lib\mingw\tools\install\mingw32\bin\ld.exe"; also
replace the informal phrase "gonna be installed" with "will be installed" in
that same line.

* x64: pacman -S mingw-w64-x86_64-gcc

* Install [chocolatey](https://chocolatey.org/)
* Run `choco install mingw --x86 -y --no-progress` which is gonna be installed at `C:\ProgramData\mingw64`.
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Use formal language in documentation.

Replace the informal "gonna be" with "will be" for better documentation quality.

✏️ Proposed fix
-* Run `choco install mingw --x86 -y --no-progress` which is gonna be installed at `C:\ProgramData\mingw64`.
+* Run `choco install mingw --x86 -y --no-progress` which will be installed at `C:\ProgramData\mingw64`.

As per coding guidelines: The word 'gonna' is informal and should be avoided in documentation.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
* Run `choco install mingw --x86 -y --no-progress` which is gonna be installed at `C:\ProgramData\mingw64`.
* Run `choco install mingw --x86 -y --no-progress` which will be installed at `C:\ProgramData\mingw64`.
🧰 Tools
🪛 LanguageTool

[style] ~30-~30: The word ‘gonna’ is informal.
Context: ... mingw --x86 -y --no-progresswhich is gonna be installed atC:\ProgramData\mingw64...

(GONNA)

🤖 Prompt for AI Agents
In `@SETUP.md` at line 30, Update the informal phrasing in the README/SETUP text
by replacing "gonna be installed at `C:\ProgramData\mingw64`" with the formal
wording "will be installed at `C:\ProgramData\mingw64`" so the sentence reads:
"Run `choco install mingw --x86 -y --no-progress` which will be installed at
`C:\ProgramData\mingw64`."

@4z0t 4z0t merged commit 39a477b into main Jan 28, 2026
2 checks passed
@4z0t 4z0t deleted the doc/UpdateSetup branch January 28, 2026 19:16
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.

4 participants