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 <noreply@anthropic.com>
- 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 <noreply@anthropic.com>
@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

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
2 participants