Skip to content

Run from source#8

Draft
LevFendi wants to merge 7 commits intomainfrom
run-from-source
Draft

Run from source#8
LevFendi wants to merge 7 commits intomainfrom
run-from-source

Conversation

@LevFendi
Copy link
Member

@LevFendi LevFendi commented Mar 7, 2026

No description provided.

LevFendi and others added 2 commits March 7, 2026 16:24
- 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>
@LevFendi LevFendi self-assigned this Mar 7, 2026
@LevFendi LevFendi added documentation Improvements or additions to documentation enhancement New feature or request labels Mar 7, 2026
LevFendi and others added 5 commits March 8, 2026 19:52
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant