Skip to content

Conversation

@fank
Copy link
Member

@fank fank commented Aug 31, 2025

Summary

  • Fixes ARM64 emulation support for scenario.sh and scenario2map.sh entrypoints
  • Creates shared setup-exec.sh script to handle ARM64 emulation logic consistently
  • Refactors existing entrypoints to use the shared emulation setup
  • Ensures all factorio binary calls work correctly on ARM64 platforms using box64 emulation

Problem

Issue #585 identified that scenario.sh and scenario2map.sh were not using the ARM64 emulation logic (box64) that was present in docker-entrypoint.sh. This caused these entrypoints to fail on ARM64 platforms.

Solution

  • Created setup-exec.sh that handles the ARM64 emulation setup
  • Updated all entrypoints to use this shared script for consistency:
    • scenario.sh - now supports ARM64 emulation
    • scenario2map.sh - now supports ARM64 emulation
    • docker-entrypoint.sh - refactored to use shared script
    • docker-entrypoint-rootless.sh - refactored to use shared script

Test plan

  • Verify all entrypoints source the shared script correctly
  • Verify ARM64 emulation logic is consistent across all entrypoints
  • Verify existing functionality is preserved for non-ARM64 platforms
  • Test on ARM64 platform to confirm box64 emulation works with scenario entrypoints

Files changed

  • docker/files/setup-exec.sh - New shared script for ARM64 emulation
  • docker/files/scenario.sh - Updated to use shared emulation logic
  • docker/files/scenario2map.sh - Updated to use shared emulation logic
  • docker/files/docker-entrypoint.sh - Refactored to use shared script
  • docker/files/docker-entrypoint-rootless.sh - Refactored to use shared script

Fixes #585

🤖 Generated with Claude Code

fank and others added 2 commits August 31, 2025 22:21
- Add shared setup-exec.sh script to handle ARM64 emulation logic
- Update scenario.sh and scenario2map.sh to use box64 emulation on ARM64
- Refactor docker-entrypoint.sh and docker-entrypoint-rootless.sh to use shared script
- Ensures all factorio binary calls work correctly on ARM64 platforms

Fixes #585

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
- Add shellcheck disable=SC1091 for dynamic source paths
- Quote INSTALLED_DIRECTORY variables to prevent word splitting
- Resolves all reported shellcheck issues in PR review

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
@hrshtt
Copy link

hrshtt commented Sep 1, 2025

thank you for this fix!

just to be sure, "${INSTALLED_DIRECTORY}"/docker-dlc.sh is still only part of docker entrypoint so DLC_SPACE_AGE=false will also not be applied for the rest of the entrypoints. the same way EXEC w emulator wasnt being applied.

this will break the other entrypoints for those without space age dlc

@hrshtt
Copy link

hrshtt commented Dec 27, 2025

will this be merged?

The docker-dlc.sh script was only called in docker-entrypoint.sh,
not in scenario.sh. This caused DLC_SPACE_AGE=false to not be
applied when using the scenario entrypoint, breaking it for users
without the Space Age DLC.
@fank
Copy link
Member Author

fank commented Jan 13, 2026

Sorry this PR got lost! You were right - I've now added the docker-dlc.sh call to scenario.sh as well, so DLC_SPACE_AGE=false will work correctly for that entrypoint too.

@fank fank merged commit 551f3d8 into master Jan 13, 2026
2 checks passed
@fank fank deleted the fix-arm64-emulation-entrypoints branch January 13, 2026 20:48
@hrshtt
Copy link

hrshtt commented Jan 15, 2026

appreciate it

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.

Different entrypoints are not using emulation as done in docker-entrypoint.sh

3 participants