Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

--language option does not work as expected #122

Closed
chilikk opened this issue Jan 8, 2021 · 2 comments
Closed

--language option does not work as expected #122

chilikk opened this issue Jan 8, 2021 · 2 comments

Comments

@chilikk
Copy link

chilikk commented Jan 8, 2021

Consider the following installer: HotA_1.6.1_setup.exe (can be downloaded from
here https://www.vault.acidcave.net/download.php?id=614
or any other mirror listed here https://h3hota.com/en/download)

SHA-256 sum of the installer: 79f3330e4d47ef0f065fdbe5ccd07b34eceaafb6f7ebe0bc8b2b4a4d83484c23

The installer contains language-dependent files, as correctly detected by innoextract:

$ innoextract --list-languages --silent HotA_1.6.1_setup.exe
English English
Russian Русский

Trying to use one of these languages with the --language option does not seem to make any difference though

Neither when trying to list language-dependent files

$ innoextract --language=English --language-only --list HotA_1.6.1_setup.exe
Listing "HotA 1.6.1 + HD 5.0 RC76" - setup data version 5.6.0 (unicode)
Done.
$ innoextract --language=Russian --language-only --list HotA_1.6.1_setup.exe
Listing "HotA 1.6.1 + HD 5.0 RC76" - setup data version 5.6.0 (unicode)
Done.

Nor when actually trying to extract

$ mkdir english russian
$ innoextract --language=English --output-dir english --extract HotA_1.6.1_setup.exe
$ innoextract --language=Russian --output-dir russian --extract HotA_1.6.1_setup.exe
$ diff -r english russian
  ## no diff

The installer does however contain language-specific files, which is correctly handled by --collisions=rename-all option

$ mkdir all_lang
$ innoextract --collisions=rename-all --output-dir all_lang --extract HotA_1.6.1_setup.exe
$ diff -r all_lang english
Only in english/app/Data: HotA_l_ext.lod
Only in all_lang/app/Data: HotA_l_ext.lod#Lang\Eng
Only in all_lang/app/Data: HotA_l_ext.lod#Lang\Rus
... more differences with Lang-suffix

I have tried both the latest version available in Arch linux repository

$ innoextract --version
innoextract 1.9
Extracts installers created by Inno Setup 1.2.10 to 6.0.5

As well as compiled from the latest 660546a commit on github

./innoextract --version
innoextract 1.10-dev + 660546a
Extracts installers created by Inno Setup 1.2.10 to 6.1.2

Unfortunately I do not know how the installer in question has been created or whether it is a general or a specific problem, but it feels that the innoextract is already able to differentiate between the files when using the --collisions=rename-all options, so there should be a possible solution for the --language option. I might also be doing something wrong, in which case I would be happy to get some pointers!

@dscharrer
Copy link
Owner

In your installer the files are not conditional based on the setup language but rather on setup components lang\eng and lang\rus. Excluding files based on component is not supported yet (see issue #12).

Another problem is that the component IDs use backslashes - we need to replace those with a safe character or extracting on Windows will not work as expected.

@dscharrer
Copy link
Owner

The second issue is tracked in #123, closing this as duplicate of that and #12.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants