ngld / old-knossos

A mod launcher/installer for FSO
https://fsnebula.org/knossos/
Apache License 2.0
58 stars 23 forks source link

Error installing FS2 with GOG installer #195

Open jullebarge opened 4 years ago

jullebarge commented 4 years ago

I'm trying to install GOG version of Freespace 2 via Knossos but I always get this error during the installation:

Error

The installer does not contain the retail files! Please make sure you selected the correct installer!

OK

Is there a way to fix it ?

I'm using last version of Knossos (0.14.1) on Windows 10, and I'm using GOG version of the game.

that-guy-melvin commented 4 years ago

I've seen the same thing on linux; latest git build (0.14.2-dev+1e72833) and GOG 'setup_freespace_2_1.20v2(33372).[exe/bin]' - innoextract seems to properly extract the installer to a temp directory, but knossos doesn't seem to then properly parse the file paths.


Installing to a temp directory (using wine since I'm on linux), then pointing knossos at the root vp still works fine, so there's that obvious workaround.

Goober5000 commented 4 years ago

The format of the GOG setup files has changed, and the Knossos code hasn't yet been updated to work with the new format.

As a workaround, you can use @that-guy-melvin's method, or you can install FSO with the FSO Installer and then point Knossos at that.

A proper fix will require someone to edit the Knossos code that interfaces with the setup files.

chief1983 commented 4 years ago

I have determined that the format is still InnoSetup, just a newer version. They support disk spanning now, and that's what GOG must be using. v1.5+ of innoextract supports it, but we currently integrate v1.4. We need to update our innoextract version to something newer, and see if we need to adjust the command line options to get it to extract correctly. That latter part could be tested with a standalone innoextract installer if someone wants to give it a try.

Goober5000 commented 4 years ago

FSO Installer already uses innoextract v1.8 to extract and copy the GOG files: https://github.com/scp-fs2open/fsoinstaller/blob/master/src/com/fsoinstaller/wizard/InnoExtractTask.java

I don't know if knossos uses innoextract the same way, but the current version of FSO Installer is confirmed to work with the most recent GOG format.

chief1983 commented 4 years ago

Either this was fixed anonymously, or was just always updating in the background, but see this now:

https://fsnebula.org/storage/knossos/innoextract.json

Linux and Windows should already have access to 1.8's capabilities. macOS is behind again, the version in that link is still v1.4.

cliff.gordon:~  $ ~/Downloads/innoextract --version
innoextract 1.4
Extracts installers created by Inno Setup 1.2.10 to 5.5.3

I might be able to build an updated version of it, then we'd just need to overwrite the one in that json link. I can't seem to compile innoextract following their instructions though. I get some errors when it tries to configure boost. Latest CMake and Boost from brew. macOS 10.15.5 and 10.13.5.

chief1983 commented 4 years ago

I got past the configuration errors, but I still can't get it to link statically. The version bundled with the FSO Installer is also not linked statically, so if you don't have the right libs installed on your macOS system, it will not run. Any help getting innoextract to compile on macOS with statically linked libs would be appreciated (short of that, bundling them into the Knossos app and modifying the headers of the innoextract binary so that it can find them could maybe work too).

ngld commented 4 years ago

Sorry, should've posted here yesterday. I've already updated the macOS build. I installed Boost through Homebrew, cloned the git repo for innoextract, removed the Boost link check (check_link_library(Boost Boost_LIBRARIES)) from the CMakeLists.txt and ran cmake with -DUSE_STATIC_LIBS=ON.

I updated the innoextract.json a few months ago when someone (I think Goober?) told me about the issue.

The latest commit also fixes the paths. With that change I was able to use the latest GOG installer again.

chief1983 commented 4 years ago

Excellent! So the version at innoextract.mac64.7z on the nebula has been updated to 1.8? Then it makes sense that all we should need at that point is changes to use the new command line parameters to extract correctly. Good to hear!

ngld commented 4 years ago

Yes, I've updated the macOS build (innoextract.mac64.7z) to 1.8. The command line parameters are the same as before. However, the directory structure of the extracted installer looks different so I had to modify the code that copies the retail files into the FS2 folder.

chief1983 commented 4 years ago

Yeah sorry I was looking at that commit from your last message, but I figured there must have been something about command line options in there I was missing, besides the path stuff. I guess it must be smart enough to figure out that it's GOG with the default options, and the new overrides I saw aren't necessary. Nice.