innoextract icon indicating copy to clipboard operation
innoextract copied to clipboard

GOG galaxy files are extracted to inconsistent paths

Open sigboe opened this issue 5 years ago • 7 comments

extracting the following installers and more have issue

setup_beneath_a_steel_sky_1.0_%2820270%29.exe
setup_jill_of_the_jungle_1.0_%2824660%29.exe
setup_ultima_iv_-_quest_of_the_avatar_1.0_%2822309%29.exe

example command

innoextract --include app --gog ${filename}

the app folder will be almost empty. On the latest snapshot, it works a little bit better. There I can run this command

innoextract --gog ${filename} --output-dir tmp

That is dropping the --include app and, then I need to also have the --output-dir tmp to not mess up the folder. Then it extracts the files but its not in the app folder. So innoextracts fails to understand the file-structure.

This is example output-dir I am guessing that __redist and __support should not be extracted, and everything except commonappdata and tmp should be inside the app

drwxr-xr-x. 2 sigurdb sigurdb     4096 feb.  16 23:44 app
drwxr-xr-x. 3 sigurdb sigurdb     4096 feb.  16 23:44 commonappdata
-rw-r--r--. 1 sigurdb sigurdb      157 april 25  2018 goggame-1207658695.hashdb
-rw-r--r--. 1 sigurdb sigurdb     1382 april 25  2018 goggame-1207658695.info
-rw-r--r--. 1 sigurdb sigurdb     3006 april 25  2018 goggame-1207658695.script
-rw-r--r--. 1 sigurdb sigurdb   183572 april 25  2018 manual.pdf
-rw-r--r--. 1 sigurdb sigurdb     6829 april 25  2018 readme.txt
drwxr-xr-x. 4 sigurdb sigurdb     4096 feb.  16 23:44 scummvm
-rw-r--r--. 1 sigurdb sigurdb   419427 april 25  2018 sky.cpt
-rw-r--r--. 1 sigurdb sigurdb    40780 april 25  2018 sky.dnr
-rw-r--r--. 1 sigurdb sigurdb 72395713 april 25  2018 sky.dsk
drwxr-xr-x. 2 sigurdb sigurdb     4096 feb.  16 23:44 tmp
-rw-r--r--. 1 sigurdb sigurdb    39283 april 25  2018 walkthrough.pdf
drwxr-xr-x. 3 sigurdb sigurdb     4096 feb.  16 23:44 __redist
drwxr-xr-x. 3 sigurdb sigurdb     4096 feb.  16 23:44 __support

sigboe avatar Feb 16 '19 22:02 sigboe

@dscharrer I compiled the newest version and it performs worse.

./innoextract --version
innoextract 1.8-dev + d2ec70d
Extracts installers created by Inno Setup 1.2.10 to 6.0.0

on Jill of the jungle, a free game on GOG so you can try it.

./innoextract --gog --output-dir out setup_jill_of_the_jungle_1.0_\(24660\).exe
Warning: Unexpected setup data version: 5.6.2 (unicode)
Warning: Unexpected Language Detection value: 4
Warning: Unexpected Auto Boolean value: 195
Stream error while parsing setup headers!
 ├─ detected setup version: 5.6.2 (unicode)
 └─ error reason: basic_ios::clear: iostream error
If you are sure the setup file is not corrupted, consider 
filing a bug report at http://innoextract.constexpr.org/issues
Done with 1 error and 3 warnings.

In the snapshot it is missing files and wrong folder structure.

sigboe avatar Feb 27 '19 18:02 sigboe

Extracting "Escape from Monkey Island™" - setup data version 5.5.7 (unicode)

This extracts with bad folder structure

sigurdb@zig-pc-04 ~/wyvern_tmp % ls out    
Chorus.flt    Mss32.dll      artLuc.m4b                 license.txt   voiceAll.m4b
HintBook.pdf  Reverb3.flt    artMel.m4b                 lip.m4b       voiceJam.m4b
Install/       Sdelay.flt     artMon.m4b                 local.m4b     voiceLuc.m4b
Manual.pdf    Textures/       binkw32.dll                patch.m4b     voiceMel.m4b
Monkey.exe    Update1_1.txt  commonappdata/              readme.txt    voiceMon.m4b
Monkey4.exe   app/            goggame-1885026907.hashdb  sfx.m4b       __redist/
Movies/        artAll.m4b     goggame-1885026907.info    syscheck.exe  __support/
Mp3dec.asi    artJam.m4b     goggame-1885026907.script  tmp/

Game works fine though

sigboe avatar Feb 27 '19 18:02 sigboe

Extracting "Ultima™ 4 - Quest of the Avatar" - setup data version 5.5.7 (unicode)

also messed up folder structure some of the files are inside __support/app

EDIT: Jill of the Jungle also has the files I am missing in the __support/app folder

sigboe avatar Feb 27 '19 18:02 sigboe

Support for Inno Setup 5.6.2 GOG installers is covered in issue 74.

I don't really think the folder structure is wrong - those are the paths stored in the installer. I guess I could have added the app prefix to gog galaxy file paths, but changing that now might break people's scripts - not sure that is worth it since there is no guarantee that other installers will have an app directory (which is just innoextracts's expansion of the {app} variable).

then I need to also have the --output-dir tmp to not mess up the folder

Like most extracting programs on Linux (tar, unzip, cabextract, …), innoextract will extract whatever is contained in the archive into the output directory, which is the current working directory by default. You should not be extracting to directories where random files will cause a problem.

dscharrer avatar Mar 01 '19 02:03 dscharrer

@dscharrer Okay I agree with the extract to . not a good idea, and I will not do it.

sorry I am confused about two things.

These are afaik not galaxy files. They are the same files you can download through the browser. I don't have the galaxy client.

also if I run the setup through wine, I get the files the way I expect. No __support folder I need to check for files in and move them to the folder with the other files. And no discrepancy between if the files are in the root of the archive or inside app. And

Jill of the Jungle % ls
 0.dem   10.jn2                           desert.ddt                  jill1.exe      map.jn3
 0.jn2   10.jn3                           dosbox_jill.conf            jill1.sha      mobydick.ddt
 1.dem   11.jn2                           dosbox_jill_single.conf     jill1.vcl      neoclass.ddt
 1.jn1   11.jn3                           dungo.ddt                   jill2.cfg      ominous.ddt
 1.jn2   12.jn3                           end1.mac                    jill2.exe      order.doc
 1.jn3   13.jn2                           end2.mac                    jill2.sha      order-uk.doc
 2.dem   13.jn3                           foreign.doc                 jill2.vcl      peaks.ddt
 2.jn1   14.jn3                           funky.ddt                   jill3.cfg      seven.ddt
 2.jn3   15.jn2                           gog.ico                     jill3.exe      spiders.ddt
 3.jn1   17.jn2                           goggame-1129701343.hashdb   jill3.sha      stealth.ddt
 3.jn2   20.jn2                           goggame-1129701343.ico      jill3.vcl      support.ico
 3.jn3   50.jn1                           goggame-1129701343.info     jn1demo.mac    sysop.doc
 4.jn1   DOSBOX                           goggame-1129701343.script   jn2dem1.mac    undrgrnd.ddt
 4.jn3   EULA.txt                         goglog.ini                  jn2dem2.mac    unins000.dat
 5.jn3  'Launch Jill of the Jungle.lnk'   helpme.exe                  jn2dem3.mac    unins000.exe
 6.jn1   action.ddt                       intro.jn1                   jn3dem1.mac    unins000.ini
 6.jn3   alien.ddt                        intro.jn2                   jn3dem2.mac    unins000.msg
 7.jn3   bonzo.ddt                        intro.jn3                   jn3dem3.mac    vendor.doc
 8.jn3   catalog.exe                      it.ddt                      jupiter.ddt    webcache.zip
 9.jn1   cubist.ddt                       jill.dma                    kuntamon.ddt   wild.ddt
 9.jn2   dan.ddt                          jill.doc                    license.doc    zeppelin.ddt
 9.jn3   deepevil.ddt                     jill1.cfg                   map.jn1

sigboe avatar Mar 01 '19 07:03 sigboe

These are afaik not galaxy files.

The files inside the installer are the same files (or rather, slices of files) that the GOG Galaxy would download, just packaged up in an installer. GOG's custom Inno Setup scripts then reassemble them during setup. Check the output using the --no-gog-galaxy option to see what the files look to Inno Setup.

innoextract has special support for such GOG installers. But it currently puts the reconstructed galaxy files into the root directory instead of under {app} - I'm considering changing that.

Gog also uses files in __support and __redist subdirectories, both as galaxy- and as regular Inno Setup files. innoextract currently doesn't have any support for GOG's scripts that move these to the right locations. There is no plan to add generic support for Inno Setup scripts as ultimately you'd need Wine or another Windows emulation to support everything, but special support for GOG-isms is possible.

dscharrer avatar Mar 01 '19 19:03 dscharrer

@dscharrer If you change the extraction path of the reconstructed files, please make it obvious in the changelog of the release including this. Some tools, including ./play.it, are currently relying on these files not being put in app. Changing this behaviour is not an issue, but please make sure people using your work don’t get caught by surprise ;)

vv221 avatar Mar 01 '19 20:03 vv221