mirror of
https://github.com/valentderah/totk-pc-recomp.git
synced 2026-11-21 12:55:57 +00:00
Start the Linux rebuild through the AppImage file, not its vanished mount
The setup wrote the path of its Python inside the AppImage mount into build-cache/rebuild.txt. The mount is gone once the setup exits, so the game could not start the rebuild for code cheats and ExeFS patches, kept its old code, and rebuild.skip then stopped every later attempt. The command now starts $APPIMAGE --rebuild <install folder>, and a rebuild that does not start leaves no rebuild.skip (#560, #403) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
04ccb9cd36
commit
35c590bacd
4 files changed
+33
-4
No files matched your search
@@ -526,6 +526,21 @@ class CleanupTest(unittest.TestCase):
|
||||
self.assertEqual(lines[1:], ['-c', steps.REBUILD_BOOT, str(self.ctx.layout.root), '--root',
|
||||
str(self.ctx.layout.root), '--rebuild', str(self.dest)])
|
||||
|
||||
def test_appimage_rebuild_command_starts_the_appimage(self):
|
||||
# The AppImage's mount, where its Python lives, is gone once the setup exits (#560, #403)
|
||||
appimage = Path(self.tmp.name) / 'TotK-Setup-x86_64.AppImage'
|
||||
appimage.write_bytes(b'')
|
||||
with mock.patch.dict('os.environ', {'APPIMAGE': str(appimage)}):
|
||||
self.assertEqual(self.run_cleanup(), 'ok')
|
||||
lines = (self.dest / 'build-cache' / 'rebuild.txt').read_text(encoding='utf-8').splitlines()
|
||||
self.assertEqual(lines, [str(appimage.resolve()), '--rebuild', str(self.dest)])
|
||||
|
||||
def test_appimage_variable_without_the_file_keeps_the_python_command(self):
|
||||
with mock.patch.dict('os.environ', {'APPIMAGE': str(Path(self.tmp.name) / 'gone.AppImage')}):
|
||||
self.assertEqual(self.run_cleanup(), 'ok')
|
||||
lines = (self.dest / 'build-cache' / 'rebuild.txt').read_text(encoding='utf-8').splitlines()
|
||||
self.assertEqual(lines[1:3], ['-c', steps.REBUILD_BOOT])
|
||||
|
||||
def test_emptied_romfs_fails(self):
|
||||
for p in (self.dest / 'romfs').iterdir():
|
||||
p.unlink()
|
||||
|
||||
Reference in new issue
Block a user