Implement a docker hub image for compiling MWO?

Everything about development and the OpenMW source code.
Tibbnak
Posts: 1
Joined: 20 Jul 2017, 08:24

Implement a docker hub image for compiling MWO?

Post by Tibbnak »

Docker Kit (Often used through Kitematic but can also be done through docker's command line), is a package creation and management tool that works alongside virtualbox to run stuff through containers.

One of the things people have done is set up compile and cross-compile environments and complex toolchains, then host it as an image on ducker hub ( https://hub.docker.com/ ) which can be publically searched and downloaded. With the compiling images specifically, people can feed source repositories into these containers and it compiles the code and drops it back out.


So, I was wondering if anyone was interested in setting up a Docker Container for compiling and cross-compiling openMW?

You could pre-install the dependencies and set up the cmake and compiler ahead of time and just have a script to download the git repository and check if the dependencies need an update, ask a few options, compile the code, and then spit the compiled binaries out.

You don't have to worry about OS or compiler changes or such because you can set exactly what you want to use in the container, and anyone who uses the container uses an identical environment.
User avatar
Thunderforge
Posts: 503
Joined: 06 Jun 2017, 05:57

Re: Implement a docker hub image for compiling MWO?

Post by Thunderforge »

As someone who had a difficult time getting OpenMW to compile on my Mac, I would gladly welcome a cross-platform solution that "just works" because everything is sandboxed in its own container.
Naugrim
Posts: 172
Joined: 08 Jan 2016, 01:32
Location: Spain

Re: Implement a docker hub image for compiling MWO?

Post by Naugrim »

The problem for me is that getting a Windows docker image is not an easy task, afaik there's a windows server base image available only.
And I don't know if you can create a MacOS one without creating licence problems.

An then, in linux, even though a sandboxs option would be great, it's not that hard to get the dependencies using a package manager :/ So the pain points are not as complicated.

The real problem to build OpenMW on windows for me right now are the QT dependencies, the rest are not that hard to get using MSYS2, and then you can have several MSYS2 instalations to isolate the build env.
User avatar
Ace (SWE)
Posts: 887
Joined: 15 Aug 2011, 14:56

Re: Implement a docker hub image for compiling MWO?

Post by Ace (SWE) »

For Windows, I've written up a script that downloads all the correct pre-compiled dependencies, installing them locally into the OpenMW directory.

It's not perfect - far from it probably - but it gets you build environments for 32 and 64-bit builds, currently for VS2013 and 2015.
Might try to package up for VS2017 soon too, but that probably won't happen until sometime in august.

If you have a documented procedure for building it with MSYS though, then feel free to post that somewhere, I'd love to see it.
corristo
Posts: 495
Joined: 12 Aug 2011, 08:29

Re: Implement a docker hub image for compiling MWO?

Post by corristo »

Code: Select all

And I don't know if you can create a MacOS one without creating licence problems.
No licensing problems if you run the image on a real Mac.
Naugrim
Posts: 172
Joined: 08 Jan 2016, 01:32
Location: Spain

Re: Implement a docker hub image for compiling MWO?

Post by Naugrim »

Ace (SWE) wrote: 22 Jul 2017, 10:39 If you have a documented procedure for building it with MSYS though, then feel free to post that somewhere, I'd love to see it.
I took a break to work on building OpenTESArena and ReGoth and I want to retake OpenMW this week. But don't expect this anytime soon.
I am just starting to understand the details in C++ building on Windows.
Naugrim
Posts: 172
Joined: 08 Jan 2016, 01:32
Location: Spain

Re: Implement a docker hub image for compiling MWO?

Post by Naugrim »

Ace (SWE) wrote: 22 Jul 2017, 10:39 If you have a documented procedure for building it with MSYS though, then feel free to post that somewhere, I'd love to see it.
I finally got to compile, and it was totally my fault XD
But my version runs way slower than the official release, and the physics go crazy in Balmora, which does not happen with v.0.42.
I will run a few more tests and try to build with scrawl's OpenSceneGraph fork.

Btw, the process is pretty simple with MSYS2, just install the proper packages and build MyGUI 3.2.2 tag (current master does not compile).
User avatar
Ace (SWE)
Posts: 887
Joined: 15 Aug 2011, 14:56

Re: Implement a docker hub image for compiling MWO?

Post by Ace (SWE) »

Naugrim wrote: 01 Aug 2017, 23:05
Ace (SWE) wrote: 22 Jul 2017, 10:39 If you have a documented procedure for building it with MSYS though, then feel free to post that somewhere, I'd love to see it.
I finally got to compile, and it was totally my fault XD
But my version runs way slower than the official release, and the physics go crazy in Balmora, which does not happen with v.0.42.
I will run a few more tests and try to build with scrawl's OpenSceneGraph fork.

Btw, the process is pretty simple with MSYS2, just install the proper packages and build MyGUI 3.2.2 tag (current master does not compile).
So, what you're saying is that It Should Just Work™?

I'll have to try that out later then, see if it's possible to automate the whole procedure for AppVeyor.

Never hurts to add more compilation methods after all.
Naugrim
Posts: 172
Joined: 08 Jan 2016, 01:32
Location: Spain

Re: Implement a docker hub image for compiling MWO?

Post by Naugrim »

Ace (SWE) wrote: 05 Aug 2017, 09:53
So, what you're saying is that It Should Just Work™?
Yes, I could reproduce the process in another machine without any problems. Just follow instructions here: viewtopic.php?f=8&t=4451&p=48520&hilit=linking#p48520
Note that the original post contains a wrong package for QT, other than that it should work. But as I said, this build runs slower than the VC build.

Also, I could build scrawls osg, simply because I did not know which branch/tag to use. I checked the CI build script, but it uses a prebuild binary :/
User avatar
Ace (SWE)
Posts: 887
Joined: 15 Aug 2011, 14:56

Re: Implement a docker hub image for compiling MWO?

Post by Ace (SWE) »

The prebuilt binary is just the head of the master branch at that time, and it should probably be updated since I expect more things to have happened since.
Post Reply