dreamer / luxtorpeda

Steam Play compatibility tool to run games using native Linux engines
https://luxtorpeda.gitlab.io/
GNU General Public License v2.0
393 stars 9 forks source link

Morrowind (22320) - Packaging In Progress #6

Closed d10sfan closed 5 years ago

d10sfan commented 5 years ago

This adds the start of support for Morrowind through the OpenMW engine. This engine has alot of dependencies, so this one is a bit of a doozy. This one needs a recursive submodule download, similar to the Arx one. I ended up including the gcc source to build the newer one (for support of c++ 14), not sure if there's a better way for that.

https://gitlab.com/d10sfan/luxtorpeda-openmw

So far, I've been able to get up to the point of attempting to compile openmw, but was running into some reference errors. I'll look at it again soon. If anyone wants to look at it in its current state, the build gcc section lines will need to be uncommented, as well as the mkdir for pfx. That was mainly to avoid having to do it each time, as it takes quite a while to compile.

dreamer commented 5 years ago

Building GCC is a no-go - I will include a newer version of the compiler in next release of steam-runtime, so this task is blocked until then. It will be nice to have a newer compiler for all other packages as well.

d10sfan commented 5 years ago

On this package, I attempted to do a bit more with the docker and didn't really get anywhere. I pushed up the latest of where I'm at so far, just to show what packages are needed. I'll probably try doing a build locally when I've got some more time

d10sfan commented 5 years ago

I've made some good progress with the new docker image. I did have to install automake (apt-get install automake), other than that it's using packages built using the build script, with alot of deps. This repo helped me get the right package versions and dependencies needed: https://github.com/OpenMW/openmw-deps-mac

I was able to build all the way through but now dealing with getting all these libraries available in the finished product. The openmw lib folder has all the library pieces in it in the release that they give, so now figuring out how to use that properly.

d10sfan commented 5 years ago

As an experiment, I created a modified version of the released 0.45 version of openmw (mainly putting it in a dist folder, and then converting the archive to a .tar.xz) and passing it through luxtorpeda. The built version needed a system copy of qt4 (they didn't include it), whether I picked qt5 or qt4 version. After that was done, the game worked well through steam.

So with that, I'll probably create a similar launcher script to theirs that sets the LD_LIBRARY_PATH to the right location, and then work on figuring which of the library files are needed.

dreamer commented 5 years ago

Great progress :) I will add automake to Docker image with the next update.

Regarding Qt4 - Steam Runtime provides gtk2 and binds gtk2 libraries to the system ones, but unfortunately there's no Qt lib in sight. Perhaps this dependency comes with the Ogre engine used by MyGUI?

I think it might be time to start the dialogue with OpenMW development team :)

d10sfan commented 5 years ago

I think the qt4 dep is for their launcher and install wizard. Something like gtk would of course make life alot easier. Do you know if there's any licensing problems to packaging the qt4 libs in our archive?

dreamer commented 5 years ago

I don't expect any licensing issues, but I suspect building them will be a major PITA.

dreamer commented 5 years ago

@d10sfan I upped your permissions to maintainer for packages you created, prepared luxtorpeda/mirrors/openmw and created empty project luxtorpeda/packages/openmw. I think you know what to do ;)

I am synchronizing all mirrors roughly once a day, but can trigger sync on demand as well, if you'll need it.

d10sfan commented 5 years ago

Nice! I'll work on the library including part and let you know once I've made further progress.

d10sfan commented 5 years ago

Was finally able to get a working version of openmw from the build script, but there's some instability I'm working on. The repo is here still: https://gitlab.com/d10sfan/luxtorpeda-openmw. I'm working on moving it to the new one with some cleanup soon.

The libraries being included right now are pretty verbose, in that it may be overkill for what's needed, so I'll see if there's anything I can do about that. I also need to change the build config for openmw to build in release mode I believe.

But all the qt4 and other deps are there and I was able to start from a fresh installation of morrowind, have luxtorpeda extract my dist file, and then play the starting point of the game. A few times transitions were causing crashing and saving the game crashed at least once. I think at least some of the library versions may be incorrect, so I'll take another look at that soon.

I'll send another update once I've got a stable build and in the new repo.

dreamer commented 5 years ago

After a brief look: Steam Runtime provides libpng and libjpeg - so theoretically those submodules could be avoided - if they were not picked by default, then maybe Docker image is missing header files for these two? (I will add devel packages to the image if it turns out to be the case).

I believe yasm is a build-time dependency - I can add version 1.1.0-1 to the image - is this compatible or a newer one is needed?

d10sfan commented 5 years ago

Yeah those weren't being found by the binary even under steam runtime I believe. This game was wanting libpng12, so maybe they don't provide that one?

I believe that should be ok, yasm was used to build ffmpeg, it isn't needed by the actual binary.

dreamer commented 5 years ago

libpng12.so.0 is offered by Steam Runtime; it might be the case of missing headers or a bug in OpenMW dynamically loading/expecting libpng12.so instead of specific ABI (I made similar error myself in the past so now I'm extra careful about it ;) ).

d10sfan commented 5 years ago

Ah interesting ok, I did try building without libpng, without it the binary complained, but the actual build process was fine. I have to give it an explicit directory to find the libraries (a script based on the launcher script that is in the built binaries) so maybe it has trouble finding them through the steam runtime. That script overrides the LD_LIBRARY_PATH, so that could be why.

d10sfan commented 5 years ago

I was able to fix the crashing problem, it was due to the version of osg. I was able to create a working binary package and have openmw work on my system. I'm now re-doing it in the new repo and based on the new scripting stuff. I disabled the gitlab-ci file for now, just to avoid it trying to build anything for a bit.

I'll let you know once that package is ready for review. I'm running a test build now.

The only thing I had to manually install at this point is autoconf, everything else is handled by the build script. The build script for now also does the submodule recursive update, not sure if there's a better way to do that (like through gitlab's ci process).

d10sfan commented 5 years ago

Added PR #13

d10sfan commented 5 years ago

Closed, tracking further progress in PR