OpenTomb icon indicating copy to clipboard operation
OpenTomb copied to clipboard

Building from sources

Open Joey79100 opened this issue 8 years ago • 10 comments

I tried compiling the last version using the CodeBlocks project, but there were missing dependencies (#include directives, it was whining because the files couldn't be found). So I added these files, which seemed to work:

  • \extern\freetype2\include\zlib.h
  • \extern\freetype2\include\zconf.h
  • \extern\freetype2\include\SDL2\ (the whole SDL2 folder content)
  • \src\config-opentomb.h

But then there were still other files, the next one was al.h and as I didn't know where to put it I just gave up. It's probably just me who's a noob at compiling, I've never managed to do it in the past (I mean, with OpenTomb).

I tried using CMake too, but it's even newer than CodeBlocks to me, and I have no idea where to start. I tried using the MinGW compiler, Visual Studio 2017 compiler too, but no way.

Oh, I'm on Windows by the way, I haven't tried yet on Linux (though I bet it's much simpler with CMake, according to the readme file).

May I get any help? Thanks!

Joey79100 avatar Apr 04 '17 08:04 Joey79100

That's because all these support libraries are alien to Windows. They are standard to Linux and are supported out of the box by CMake. But there is no working common framework for building or finding it on Windows, because every development environment there is unique and incompatible with each other. There was some effort to make cross-platform builds easier in the old master. But its' complexity and fragility were some of the main reasons why the old branch was finally abandoned.

I'm not a Windows developer, but as others suggested in the past you'd need to compile all of the required libraries and either edit Code::Blocks project accordingly or use CMake graphical tool to build Code::Blocks project from scratch. Hope this helps.

vvs- avatar Apr 04 '17 10:04 vvs-

Hi, Would it be possible to build a Windows version of the game on the Travis CI build machine (using mingw-w64) right after the Linux version is built ? A script could add the required DLLs and create a zip file, so Windows users could always have latest binary.

RICCIARDI-Adrien avatar Apr 04 '17 14:04 RICCIARDI-Adrien

There already is such a build box on https://semaphoreci.com/vobject/opentomb. Unfortunately, it isn't maintained for a while. If someone wants to set-up a build machine, then it doesn't need a special approval by admins here.

vvs- avatar Apr 04 '17 14:04 vvs-

Ok, I'll try to cross-compile the game for Windows on a Semaphore CI build machine. Thanks for the URL !

RICCIARDI-Adrien avatar Apr 05 '17 14:04 RICCIARDI-Adrien

Hi, I set up a build machine here : https://semaphoreci.com/ricciardi-adrien/opentomb It's dirty for now but it seems to produce working executable (I built one using SSH and I could run it). I was not able to change the repo URL to point on the real OpenTomb repo, but it is not a real problem because I can clone the right sources from the build scripts. Do you know a place where I could deploy the generated binaries ?

RICCIARDI-Adrien avatar Apr 08 '17 21:04 RICCIARDI-Adrien

There are many deployment platforms exist. Look here for example: https://github.com/integrations/feature/deployment

vvs- avatar Apr 08 '17 22:04 vvs-

Thank you for your quick reply. In the meanwhile I tested your Semaphore CI machine build script on a Semaphore SSH machine, and it is working fine (the only thing I did not test is obviously the Sourceforge deployment). Your generated binary works great on an old Windows XP PC. Why did the OpenTomb team stopped the builds ?

RICCIARDI-Adrien avatar Apr 10 '17 08:04 RICCIARDI-Adrien

Why do you think that it was a community initiative? Actually, it was a private project, just like yours. Seems that the owner lost interest and there was not many people using both Windows and Linux to have the incentive and possibility to revive it.

vvs- avatar Apr 10 '17 11:04 vvs-

I thought that because the build system was working, it was not supposed to be a reproach (sorry if you took it for). I asked because I was thinking that the Sourceforge deployment had problem. Ok, I will continue my own build machine, if I get a useful result I will tell you.

RICCIARDI-Adrien avatar Apr 10 '17 14:04 RICCIARDI-Adrien

I have easily built it for Windows (64bit build) using MSYS2 and CodeBlocks. If anybody needs help, please ask.

gajicm93 avatar May 01 '17 22:05 gajicm93