18-08-19, 16:14 | #2351 | |
Member
Joined: Aug 2019
Posts: 24
|
Quote:
But I also feel like this as well: |
|
18-08-19, 16:41 | #2352 |
Member
Joined: Jun 2015
Posts: 138
|
I don't think that using unsupported tools will lead you anywhere. If I was you I'd use a cross-compilation from Linux to Windows target. But this is not for everyone, of course.
I just found that old conversation on GitHub, may be it will be of some use: https://github.com/opentomb/OpenTomb/issues/286. |
18-08-19, 16:47 | #2353 | ||
Member
Joined: Aug 2019
Posts: 24
|
Quote:
EDIT: Basically what I am doing now is starting a new project in Code:Blocks from scratch. Because screw Cmake, it makes things a whole lot harder. I am following this tutorial now: https://www.moddb.com/games/opentomb...codeblocks-ide EDIT 2: Wow. Windows sucks so much. I just found out why it wouldn't build. Apparently even though I am the Administrator and ran the program as administrator it won't let me build a folder outside the Code:Blocks directory because of the stupid Windows permissions that are all screwed up. Once I set the build directory to the project folder it started compiling. Hopefully it works this time! EDIT 3: Nope! Same old BS! It gave me more errors this time than when I used Cmake. We really need a better template for compiling OpenTomb on Windows, because right now it is hell! Here is the build error log: Quote:
Here are the search directories I used as well: Do you think using QtCreator would be an easier way to compile Cmake project files? Because in that Github link you gave me someone used that program and got it to work. Becuase it is avaliable for Windows: https://www.qt.io/download Also I am not using a unsupported compilier. I am using the suggested one from the OpenTomb Github: https://github.com/opentomb/OpenTomb Their tutorial is not very good. Because I did everything they said and it still doesn't work: "Compiling There is a CMakeLists.txt file provided with source code, so you can compile OpenTomb using CMake. On Windows, you can also compile it from Code::Blocks or Netbeans IDE. Alternatively, you can manually compile it in Code::Blocks or Netbeans by recursively adding all source files from /src directory, and adding these libraries in Linker Settings under Project Build options: libmingw32.a libSDL2main.a libSDL2.dll.a libpng.a libz.a libpthread.a " I am all out of ideas for now. So if you guys have any I would love to hear them. Last edited by ExpertRaider; 18-08-19 at 19:04. |
||
18-08-19, 19:22 | #2354 |
Member
Joined: Jun 2015
Posts: 138
|
By unsupported I meant, well, there is no one to use and support it. The tutorial you have followed is six years old and describes a very old OpenTomb version. The readme quote is obsolete and nobody ever bothered to update very scarce documentation anyway. Even TeslaRus is not here listening. In open source world everything depends on the volunteers which might be scarce as well. This project is of pre-alpha quality and you shouldn't expect an enterprise class support from a few amateurs which are still here just by a coincidence.
That said, there are people who were able to build it on Windows, but that requires a lot of patience and experience. If they don't want to share an advice now, that's either because they are not here for a long time or they don't care anymore. I'd repeat my advice: use some package management for Windows, e.g. MSYS, take it from official site and/or rebuild all required libraries yourselves. After all use CMake without any IDE to build the project. That's what was done in the past and should work in the future. I'm sorry and good luck. |
18-08-19, 21:42 | #2355 | |
Member
Joined: Aug 2019
Posts: 24
|
Quote:
It even supports local splitscreen for Tomb Raider 1: https://www.youtube.com/watch?v=DzkwfX9QwFs I don't even have to compile it either which is a BIG plus! Hopefully it will develop to support TR2, TR3, and TR4 in the future. |
|
23-08-19, 15:54 | #2356 |
Member
Joined: Aug 2019
Posts: 24
|
OMG! I finally got OpenTomb to compile correctly. I found out what those SDL errors were. I was using 64-bit libraries when I should have been using 32-bit libraries. Because if you use the 64-bit version of the SDL libraries it will show those errors. That is because OpenTomb is a 32-bit application. I thought that I needed 64-bit libraries because my Windows OS was 64-bit. But I have learned that you need the libraries that are built for the particular program you are compiling. So once I changed all of the required libraries to 32-bit it compiled correctly on QtCreator.
But it still refused to compile on Code:Blocks because it is a piece of garbage. So I switched to QtCreator and it is so much better! It works flawlessly with Cmake as well. I also learned that Cmake cannot find the libraries that are needed from the Cmakelsits.txt unless you put the include and lib folders in the Cmake directory. That is so stupid that you need them in the same directory as Cmake. Nowhere in the OpenTomb documentation did it say that they needed to be in the Cmake directory. So I am going to make a tutorial describing how I got OpenTomb to compile flawlessly on Windows. That way people in the future can avoid all of the chaos I went through. Long story short, DON'T USE CODE:BLOCKS BECAUSE IT SUCKS! One thing I did notice though is that OpenTomb doesn't play any music tracks or secret cues at all. All of the NPCs do not follow Lara and they are stuck in their spawn positions. They have animations but when you kill them they have no death animation. Is this intended or have I messed up something in compiling? |
23-08-19, 17:13 | #2357 |
Member
Joined: Jun 2015
Posts: 138
|
Yes, that's what I told you all along: compile it yourself, don't use precompiled binaries unless they are built for that specific configuration you are using.
Enemies should follow Lara and their death should be animated but only in TR1, other versions have very rudimentary functionality. Besides TR1 the most advanced is TR2 where many levels are completable. Music and sound effects should work in all versions, make sure that your directory structure is correct, i.e. you have audio, data and fmv subdirectories. Also, make sure that your audio format is the same as in scripts/audio/soundtrack.lua, BTW, you should place engine in the same directory where scripts subdirectory is. This is described in documentation. |
24-08-19, 20:19 | #2358 |
Member
Joined: Aug 2019
Posts: 24
|
How To Compile OpenTomb In Windows Using Qt Creator - 2019 Tutorial
Alright, first thing you want to do is download the latest version of OpenTomb from the official github here: https://github.com/opentomb/OpenTomb Here is a direct link to the latest version of OpenTomb: https://github.com/opentomb/OpenTomb/archive/master.zip You can extract this with the Windows .zip extractor or you can download and use the free version of Winrar. I prefer Winrar because it extracts faster Official Site: https://www.win-rar.com/download.html Direct Links: - WinRar 64-Bit Installer: https://www.win-rar.com/postdownload...true&subD=true - WinRar 32-Bit Installer: https://www.win-rar.com/postdownload...true&subD=true Now we need to download Cmake, this will make compiling the project easier because it will combine all of the libraries that we need into a completed project that we can load in later with Qt Creator. Download Cmake from the official website: https://cmake.org/download/ Direct Download Links: (These depend on your OS type and not the program type. Basically whether you have a 32-bit or 64-bit OS) I prefer zip links myself because you don't know what could be in an installer executable. But I have included both installer and zip links so choose your own preference. - Windows 64-bit Zip Link: https://github.com/Kitware/CMake/rel...-win64-x64.zip - Windows 64-bit Installer Link: https://github.com/Kitware/CMake/rel...-win64-x64.msi - Windows 32-bit Zip Link: https://github.com/Kitware/CMake/rel...-win32-x86.zip - Windows 32-bit Installer Link: https://github.com/Kitware/CMake/rel...-win32-x86.msi Next download QtCreator: https://www.qt.io/download-qt-instal...2-bfb62735f3e5 The online installer will automatically detect which Windows OS you are using. Don't worry about making an account, we are using the free Open Source version of Qt Creator so there is no licensing involved. Just click the skip button and continue. Make sure you install the latest version of Qt Creator which is 5.13.0. Next open up the Qt 5.13.0 drop down menu and select the MinGW 7.3.0 32-bit check box. You can also install the MinGW 7.3.0 64-bit one if you want. But we will be using the 32-bit MinGW compiler in this tutorial. You will also need to open the Developer And Designer Tools drop menu and select the MinGW 7.3.0 32-bit check box. Again you can select the MinGW 7.3.0 64-bit one as well if you plan on making 64-bit programs in the future. But for this tutorial we will only use the 32-bit one since OpenTomb is a 32-bit application. We need the Developer And Designer Tools because this will download most of the dependencies and libraries that we need. I will go into detail how to download the rest later. Once you do all of that click next and agree to the terms. Then select where you want to install Qt Creator and then click next. Then click install, it will take a bit since it must download all of the files online. After that is done installing you can hunt for all of the needed dependencies and libraries that we need. Here is a list: (Direct Links that are bolded are required for the project. Ones that are not are optional if you are compiling other 64-bit programs in the future) 1. SDL2 Development Libraries 2.0.10 - For MinGW Compiler: Official site: https://www.libsdl.org/download-2.0.php Direct Link (Both 32-bit and 64-bit - Use only 32-bit): https://www.libsdl.org/release/SDL2-...0-mingw.tar.gz 2. LibPNG - 1.6.36: Official site: https://libs4win.com/libpng/index.html Direct Links: - (MinGW 5.3.0 - 32-bit Only): https://libs4win.com/libpng/libpng-1...debug-info.zip - (MinGW 7.3.0 - 64 bit Only): https://libs4win.com/libpng/libpng-1...debug-info.zip 3. LibZ - 1.2.11: Official site: https://libs4win.com/libzlib/index.html Direct Links: - (MinGW 5.3.0 - 32 bit Only): https://libs4win.com/libzlib/libzlib...debug-info.zip - (MinGW 7.3.0 - 64 bit Only): https://libs4win.com/libzlib/libzlib...debug-info.zip 4. Lua - 5.3.5: Official Site: https://sourceforge.net/projects/lua...aries/Dynamic/ Direct Links: - Lua-5.3.5 (32-bit Only): https://sourceforge.net/projects/lua...b.zip/download - Lua-5.3.5 (64-bit Only): https://sourceforge.net/projects/lua...b.zip/download 5. OpenAL Soft - 1.19.1: Official Site: https://www.openal-soft.org/ Direct Link (Both 32-bit and 64-bit - Use only 32-bit): https://www.openal-soft.org/openal-b...1.19.1-bin.zip 6. FreeType 2.10.1: Official Site: https://github.com/ubawurinna/freety...aries/releases Direct Link (Both 32-bit and 64-bit - Use only 32-bit): https://github.com/ubawurinna/freety...1/freetype.zip 7. LibPThread - Already included in Qt Creator 5.13.0 - MinGW 7.3.0 32-bit Development Libraries 8. LibMinGW32 - Already included in Qt Creator 5.13.0 - MinGW 7.3.0 32-bit Development Libraries Once you are done downloading all of that extract them and then you must move all of the files in the lib and include directories inside of the Cmake directory. But first you must create two new folders inside the Cmake directory. Make these folders in the directory where the bin folder is located. Make a lib folder and an include folder. Here is a list of the libraries that you must put inside those folders: 1. SDL2 Development Libraries 2.0.10 32-bit - For MinGW Compiler:
2. LibPNG - 1.6.36:
3. LibZ - 1.2.11:
4. Lua - 5.3.5:
5. OpenAL Soft - 1.19.1:
6. FreeType 2.10.1:
7. LibPThread - Already included in Qt Creator 5.13.0 - MinGW 7.3.0 32-bit Development Libraries 8. LibMinGW32 - Already included in Qt Creator 5.13.0 - MinGW 7.3.0 32-bit Development Libraries Next follow this tutorial on how to setup Cmake to work with Qt Creator: https://doc.qt.io/qtcreator/creator-project-cmake.html Now after all that is done you can open Qt Creator 4.9.2 and open the CMakeLists.txt file found in the OpenTomb source code we downloaded before. To do this click file and Open File Or Project and navigate to your OpenTomb source code folder. Then open the CMakeLists.txt file. Cmake should automatically start configuring your project to work with Qt Creator. If not then right click on the OpenTomb project and click Run Cmake. If you have any errors at this point check your Cmake directory again and make sure you have all of the required libraries. If it has successfully configured it should output Configuring Done and then should continue to generate the project file. Once that is finished it should say Generating Done and this signifies that Cmake was successful in creating your project. Now to address the errors in the source code of OpenTomb. There are two files that need to be modified in order for this project to compile properly. Here is a list: 1. gui.cpp code found in OpenTomb-master/OpenTomb-master/src/gui: Needs #include <stdio.h> added to the code. This can be done manually by adding #include <stdio.h> to the include list at the top of the code like this: Code:
#include <stdint.h> #include <string.h> #include <ctype.h> #include <stdio.h> #include "../core/gl_util.h" #include "../core/gl_font.h" #include "../core/gl_text.h" #include "../core/system.h" #include "../core/console.h" #include "../core/vmath.h" #include "../core/gui/gui_obj.h" #include "../core/gui/gui_console.h" #include "../render/camera.h" #include "../render/render.h" #include "../render/shader_description.h" #include "../render/shader_manager.h" #include "../script/script.h" #include "../audio/audio.h" #include "../image.h" #include "../mesh.h" #include "../skeletal_model.h" #include "../entity.h" #include "../character_controller.h" #include "../engine.h" #include "../controls.h" #include "../engine_string.h" #include "../world.h" #include "../inventory.h" #include "gui.h" #include "gui_menu.h" #include "gui_inventory.h" Link: https://mega.nz/#!lewQ3KZT Decryption Key: !n803BP3Osaic2DuP0vNJmXo-RKfh3kd47DXBZ8qDemo If you are using the download method be sure to replace the gui.cpp file in OpenTomb-master/OpenTomb-master/src/gui with the one you downloaded. 2. gui_menu.cpp code from OpenTomb-master/OpenTomb-master/src/gui: needs #include <stdlib.h> added to the code. This can be done manually by adding #include <stdlib.h> to the include list at the top of the code like this: Code:
#include <stdint.h> #include <string.h> #include <stdio.h> #include <ctype.h> #include <stdlib.h> #include "../core/system.h" #include "../core/vmath.h" #include "../core/utf8_32.h" #include "../engine.h" #include "../controls.h" #include "../game.h" #include "../gameflow.h" #include "gui.h" #include "gui_menu.h" static gui_object_p Gui_CreateMenuRoot(); static gui_object_p Gui_AddListItem(gui_object_p cont); static gui_object_p Gui_ListInventoryMenu(gui_object_p root, int dy); extern "C" int handle_to_container(struct gui_object_s *obj, int cmd); extern "C" int handle_to_item(struct gui_object_s *obj, int cmd); extern "C" int handle_on_crosshair(struct gui_object_s *obj, int cmd); extern "C" int handle_load_game_cont(struct gui_object_s *obj, int cmd); extern "C" int handle_save_game_cont(struct gui_object_s *obj, int cmd); extern "C" int handle_new_game_cont(struct gui_object_s *obj, int cmd); extern "C" int handle_home_cont(struct gui_object_s *obj, int cmd); extern "C" int handle_controls_cont(struct gui_object_s *obj, int cmd); extern "C" int handle_main_menu(struct gui_object_s *obj, int cmd); extern "C" void handle_screen_resized_inv(struct gui_object_s *obj, int w, int h); extern "C" void handle_screen_resized_main(struct gui_object_s *obj, int w, int h); extern "C" int handle_save_name_edit_complete(struct gui_object_s *obj, int cmd); Link: https://mega.nz/#!kL4GlCTa Decryption Key: !qdXggA5NOOHocajYjEmp0_ZeoNft4YYhZToxGoAo3So If you are using the download method be sure to replace the gui_menu.cpp file in OpenTomb-master/OpenTomb-master/src/gui with the one you downloaded. Now all that is left is to build the project. To do this click on the build tab and click build project "OpenTomb". If there are no issues it should successfully build the project and generate OpenTomb.exe. The path to the executable should be in the same directory as the OpenTomb source code. The folder should be called "build-OpenTomb-master-Desktop_Qt_5_13_0_MinGW_32_bit-Default". Open this folder and you should see OpenTomb.exe. Copy that executable and stick it in your OpenTomb-master/OpenTomb-master directory. The executable should be in the same directory that you got your CMakeLists.txt from. By now you would think that this is all over right? WRONG! You need to make sure you have all of the required .dll files in the same directory as the OpenTomb.exe. Otherwise it will fail to run and will crash. So here is a list of .dll files that you will need: 1. SDL2.dll: Copy this dll from the SDL2-devel-2.0.10-mingw/SDL2-2.0.10/x86_64-w64-mingw32/bin folder that we downloaded. Place it in the same directory as OpenTomb.exe. 2. soft_oal.dll: Copy this dll from the openal-soft-1.19.1-bin/openal-soft-1.19.1-bin/bin/Win32 folder that we downloaded. Place it in the same directory as OpenTomb.exe 3. libpng16.dll: Copy this dll from the libpng-1.6.36-mingw530-x86-release-with-debug-info/bin folder that we downloaded. Place it in the same directory as OpenTomb.exe 4. libzlib.dll: Copy this dll from the libzlib-1.2.11-mingw530-x86-release-with-debug-info/bin folder that we downloaded. Place it in the same directory as OpenTomb.exe 5. libgcc_s_dw2-1.dll: Copy this dll from the Qt directory which by default is C:/Qt. The dll should be located in C:/Qt/Tools/mingw730_32/bin. If you don't have this directory you should re-download the necessary Developer tools. So go back to the part of the tutorial where I describe this. If you have this directory find libgcc_s_dw2-1.dll in the bin folder and copy it in the same directory as OpenTomb.exe 6. libstdc++-6.dll: Copy this dll from the Qt directory which by default is C:/Qt. The dll should be located in C:/Qt/Tools/mingw730_32/bin. Find libstdc++-6.dll in the bin folder and copy it in the same directory as OpenTomb.exe 7. libwinpthread-1.dll: Copy this dll from the Qt directory which by default is C:/Qt. The dll should be located in C:/Qt/Tools/mingw730_32/bin. Find libwinpthread-1.dll in the bin folder and copy it in the same directory as OpenTomb.exe Then you are all done setting up the dependencies and libraries! Now you need to setup the particular data files for the Tomb Raider game you are playing. Follow these easy steps: It's all simple - you need all classic TR game resources. Problem is, these resources (except level files themselves) are tend to be in some cryptic formats or incompatible across game versions. Because of this, you need to convert some game resources by yourself or get them from somewhere on the Net. Anyway, here is the list of all needed assets and where to get them: - Data folders from each game. Get them from your retail game CDs or Steam/GOG bundles. Just take data folder from each game's folder, and put it into corresponding /data/tr*/ folder. - Audio folders from TR3-TR5. As with data folders, take audio folder from each of those game's folder, and put it into corresponding /data/tr*/ folder. - CD audio tracks from TR1-2. To enable music for TR1 and TR2, you need their CD soundtracks in OGG format. You can download individual TR1 and TR2 soundtrack packages for TR1 and TR2 right here:http://opentomb.earvillage.net/ - or the whole TR1-TR2 package right here: https://www.dropbox.com/s/fm3qpdhnbz...ntomb.zip?dl=0 - Loading screens for TR1-3 and TR5. For TR3, get them from pix directory of your installed official game. Just put this pix directory into /data/tr3/ folder. As for other games, it's a bit tricky to get loading screens, as there were no loading screens for PC versions TR1-2, TR4 used level screenshots as loading screens, and TR5 used encrypted format to store all loading graphics. So, to ease your life, you can simply download loading screen package here: https://www.dropbox.com/s/uycdw9x294...reens.zip?dl=0 Just put it right into OpenTomb directory, and that should do the trick. Finally this tutorial has come to an end. I hope this will help everyone who had trouble getting OpenTomb to compile and have fun with OpenTomb! Last edited by ExpertRaider; 24-08-19 at 22:09. |
28-08-19, 01:19 | #2359 |
Member
Joined: Oct 2014
Posts: 269
|
|
04-09-19, 19:35 | #2360 |
Member
Joined: Aug 2019
Posts: 24
|
Thanks! I am always happy to help other people with complicated stuff like this. Maybe in the future OpenTomb can be compiled in Windows without all of those extra libraries. Because with all of the stuff you need to download it can be tough to decide which libraries to use. Glad that my tutorial worked for you though!
|
Thread Tools | |
|
|