fix: Enable Windows cross-compilation for FF146#534
Open
LeooNic wants to merge 1 commit into
Open
Conversation
Four issues prevented building Camoufox v146 for Windows (cross-compiling from Linux with --target=x86_64-pc-mingw32): 1. pid_t undefined: The POSIX pid_t type is not available in MinGW/MSVC cross-compilation headers. Added conditional typedef in HeadlessWindowCapturer.h and nsScreencastService.cpp. (ref: issue daijro#445) 2. camoufox.exe.manifest missing: The windows-theming-bug patch renamed the reference in Makefile.in from firefox.exe.manifest to camoufox.exe.manifest but did not rename the actual file. Added git rename directives to the patch. 3. Document.h include missing: The anti-font-fingerprinting patch uses doc->GetInnerWindow() in gfxTextRun.cpp but only had a forward declaration of Document. Added the full include. 4. Dockerfile git setup: Changed setup-minimal to setup (requires git repo for patch reset/apply cycle) and added git config for commits inside the container. Tested: Successfully cross-compiled and ran on Windows 11, verified with CreepJS (headless: 0%, stealth: 0%, lies: 1). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes 4 issues that prevented cross-compiling Camoufox v146 for Windows (
--target=x86_64-pc-mingw32from Linux):pid_tundefined: Added conditionaltypedef int pid_tfor Windows targets inHeadlessWindowCapturer.handnsScreencastService.cpp(ref FF146 Build Errors Thread #445)camoufox.exe.manifestmissing: Added git rename directives towindows-theming-bug-modified.patchso the manifest file is properly renamed fromfirefox.exe.manifestDocument.hinclude missing: Added#include "mozilla/dom/Document.h"inanti-font-fingerprinting.patchforgfxTextRun.cpp(was usingdoc->GetInnerWindow()with only a forward declaration)setup-minimaltosetupand added git config (required for the patch reset/apply cycle)Testing
Build instructions
Test plan
🤖 Generated with Claude Code