Open SirMishaa opened 4 years ago
I have such a dockerfile, just haven't run it in a while, if it still works I can send it to you ^^.
I am already in the process of making one
Okay, be careful with the config.lua file, it should look like this:
-- This file contains special configurations values, such as directories to extern libraries (Qt)
-- Please copy this file to a config.lua with your values
-- Use separate directories option otherwise
-- Use PackageFolder when directory contains include/bin(/lib) directories, use [Bin|Include|Lib]Path otherwise
-- Curl precompiled binaries
cURL = {
IncludePath = [[/usr/include/x86_64-linux-gnu/]], BinPath = [[/usr/lib/x86_64-linux-gnu/]], LibPath = [[/usr/lib/x86_64-linux-gnu/]]
}
-- Nazara base directory (should contains bin, include and lib directories)
Nazara = {
PackageFolder = [[/root/NazaraEngine/package/]]
}
-- Qt base directory (should contains bin, include and lib directories)
Qt = {
MocPath = [[/usr/lib/x86_64-linux-gnu/qt5/bin/moc]],
BinPath = [[/usr/lib/x86_64-linux-gnu/]],
LibPath = [[/usr/lib/x86_64-linux-gnu/]],
IncludePath = [[/usr/include/x86_64-linux-gnu/qt5/]]
}
This was my main source of error back when I did mine ^^.
I still have an error while compiling BurgWar
With this config (config.lua) :
-- This file contains special configurations values, such as directories to extern libraries (Qt)
-- Please copy this file to a config.lua with your values
-- Use separate directories option otherwise
-- Use PackageFolder when directory contains include/bin(/lib) directories, use [Bin|Include|Lib]Path otherwise
-- Curl precompiled binaries
cURL = {
-- PackageFolder = ":system" -- Use ":system" to tell this library is installed system-wide (typically on Linux)
IncludePath = [[/usr/include/x86_64-linux-gnu/]],
BinPath = [[/usr/lib/x86_64-linux-gnu/]],
LibPath = [[/usr/lib/x86_64-linux-gnu/]]
}
-- Nazara base directory (should contains bin, include and lib directories)
Nazara = {
PackageFolder = [[/usr/lib/NazaraEngine/package/]]
}
-- Qt base directory (should contains bin, include and lib directories)
Qt = {
MocPath = [[/usr/lib/x86_64-linux-gnu/qt5/bin/moc]],
BinPath = [[/usr/lib/x86_64-linux-gnu/]],
LibPath = [[/usr/lib/x86_64-linux-gnu/]],
IncludePath = [[/usr/include/x86_64-linux-gnu/qt5/]]
}
-- This work will work with root Dockerfile, you MUST NOT rename the file.
About the commit 586dc3b72ddc065a0baea4b41c97abd0f33c7a66, the container should be able and ready to compile the game with all installed dependencies.
But it doesn't have to (and It MUST NOT). We should be able to compile burgwar by running the container that will compile the game directly in the folder, not in the container.
Container could be built like this :
docker build --tag burgwar .
And it could be started like this :
docker container run -v ${PWD}:/root/BurgWar
The container will automatically execute a command to compile Burgwar. The flag -v
is used to specify the location of burgwar (${pwd}
is the current folder). The volume will then be shared with the container and it will be able to manipulate it.
It is therefore necessary to make a few small changes. I'll take care of it if I have some time.
Is this still necessary now that Burg'War can compile with a few commands thanks to xmake?
It is indeed less necessary than before, but what about people who don't want to install xmake and all the compilation tools (gcc, build-essential, ...) on their system?
The advantage of Docker is that it doesn't "dirty" the user's environment, since it is compiled on a container.
I think the dockerfile should be updated to use xmake now.
What do you think about it?
It would be interesting to use Docker to compile the game more simply.
If you are interested, I can create a dockerfile that will automatically download Nazara and its dependencies and compile the game automatically.
For example with a build folder that will contain the compiled game.
What do you think?