Draft
Conversation
- run.bat: sets up Python (downloads embeddable if needed), installs
dependencies into a venv or embedded Python, and runs main.py.
Subsequent runs skip setup and start immediately.
Fixes vs initial version:
- Fast path now requires setup marker for both venv and embed paths,
so a failed mid-setup run doesn't skip to launch with missing deps
- Check errorlevel after get-pip.py execution
- Quote BASE_PYTHON and VENV_DIR in venv creation command
- Detect ARM64 vs amd64 for correct embeddable download URL
- Quote SETUP_MARKER in echo redirect
- README: replace duplicated install instructions with a link to the
main FactorioAccess repo README as the single source of truth.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
uv manages Python version installation and venv creation itself, replacing the embeddable Python download, .pth editing, and get-pip bootstrap with a single binary. ARM64 detection is still needed for the uv binary itself. Removes --force-embed flag (no longer applicable with uv). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Unescaped ) was closing the if block prematurely, causing 'may was unexpected at this time' error. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- build_main.py: add --setup-only flag that exits after venv creation and dep install, before re-invoking itself to run PyInstaller - run.bat: drop independent venv/pip logic; call build_main.py --setup-only instead. uv is retained as a fallback to download Python 3.11 if not found on PATH, with the executable path then passed to build_main.py. Venv dir aligned to ./venv to match build_main.py. Verify venv exists after setup since build_main.py does not propagate pip errors as a non-zero exit code. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
build_main.py uses os.system() without checking pip's return code, so a failed playsound install (git dep) went undetected. Now we import playsound to verify, and if missing we wipe the venv so the next run retries setup rather than hitting the fast path with missing deps. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- requirements.txt: install pre-built wheel from GitHub Releases on Windows (stable URL, no C compiler needed); keep source build for Linux/macOS - run.bat: check fa_launcher_audio imports (not just playsound) and give a clear error pointing to MSVC Build Tools if it's missing; document the MSVC requirement in the header comment Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The script does more than just run - on first launch it downloads Python, sets up a venv, and installs all dependencies. The new name sets clearer expectations for users. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
LevFendi
commented
Mar 22, 2026
Member
Author
There was a problem hiding this comment.
The bat script calls build_main.py to set up the environment but then using this added flag it exits early before attempting the python freeze.
Pre-built wheels mean Windows users no longer need C++ Build Tools. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Member
Author
|
Tested bat script on Windows 11, no MSVC installed, fresh copy of launcher repo (not a git clone). Output summary: |
Switches from the rc1 test URL to the stable latest-release URL now that testing is complete. Co-Authored-By: Claude Sonnet 4.6 <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.
The overall aim of this group of PRs is to add the option for Windows users to run from source with relatively low hassle. This is meant as a decisive workaround to launcher exe files being flagged by antivirus software.
Changes
install-and-run.batas a one-click script to handle most of install and run work. It does the following:build_main.pyBuild from sourceinstructions to the main repo readme: Users need to install git and clone the launcher repo to the correct place. Then they run the bat script.Related PRs
Testing history
Windows 11, no MSVC installed, fresh copy of repo (not a git clone)
requirements.txtwas temporarily modified to pointfa_launcher_audioat thev0.1.0-rc1pre-release wheel URLdirectly (since
releases/latest/downloaddoes not resolve to pre-releases). The final PR usesreleases/latest/downloadwhich will resolve once the launcher-audio PR is merged and a release is tagged.install-and-run.batwas run from a copy of the repo placed inside a Factorio zip install directory. The scriptdownloaded Python 3.11 via uv, installed all dependencies including
fa_launcher_audiofrom the pre-built GitHubRelease wheel (no C compiler required), and launched the launcher successfully to the main menu, which then successfully runs the game.