Development > Coding

Using cmake to setup build env

<< < (3/11) > >>

hwoarangmy:

--- Quote from: DarkRain on August 16, 2015, 02:52:50 am ---There seems to be no support for SDL2?
--- End quote ---
It works with both. I've tested on windows with SDL2 (I downloaded) and SDL (from the package). Both worked. You just have to choose the corresponding includes you want and the libraries.


--- Quote from: DarkRain on August 16, 2015, 02:52:50 am ---Also yes, having the option to turn projects on and off would be nice, as for dependecies, I gues that would be most useful for windows user I'd think?
--- End quote ---
I guess that most users won't use radiant and it has many dependencies so it could be nice to be able to turn it off. And if we are there, we can do the same for all.

BTW, note that I've simplified the rc files to allow choosing the path. Do you want me to change the codeblocks projects in build/projects to match ?
Moreover, I don't know how to choose the icon on linux (the equivalent to the rc files). Do you know how does it work ?

EDIT: I've installed SDL2/SDL2-mixer/SDL2-ttf and I confirm it works when we change the include paths/libraries. I remember having read news about bugs in UFOAI when using SDL2. Later, the makefile can be changed to look for SDL2 before SDL.
Note that I've tested and if SDL2 is installed but not SDL, SDL2 is not found

EDIT2: If you want to try, I've updated the commit in my repo so that if SDL is found, it is used. And if not, it will search for SDL2.

DarkRain:

--- Quote from: hwoarangmy on August 16, 2015, 11:03:20 am ---It works with both. I've tested on windows with SDL2 (I downloaded) and SDL (from the package). Both worked. You just have to choose the corresponding includes you want and the libraries.

--- End quote ---
I've now had time to actually test and I see this now, my bad.


--- Quote ---I guess that most users won't use radiant and it has many dependencies so it could be nice to be able to turn it off. And if we are there, we can do the same for all.

--- End quote ---
But on linux after running cmake you can just do make ufo game to build just the game, so most helpful to windows user (but now that I think VS should have something similar...) anyway I mostly meant that a dependency path would be most helpful to windows users, still making the other modules optional would be nice anyway.


--- Quote ---BTW, note that I've simplified the rc files to allow choosing the path. Do you want me to change the codeblocks projects in build/projects to match ?

--- End quote ---
For consistency I'd have to say yes please.


--- Quote ---Moreover, I don't know how to choose the icon on linux (the equivalent to the rc files). Do you know how does it work ?

--- End quote ---
Linux executables don't have icons


--- Quote ---EDIT: I've installed SDL2/SDL2-mixer/SDL2-ttf and I confirm it works when we change the include paths/libraries. I remember having read news about bugs in UFOAI when using SDL2. Later, the makefile can be changed to look for SDL2 before SDL.
Note that I've tested and if SDL2 is installed but not SDL, SDL2 is not found

EDIT2: If you want to try, I've updated the commit in my repo so that if SDL is found, it is used. And if not, it will search for SDL2.

--- End quote ---
Well we currently have SDL2 taking priority over SDL (and the worst bugs are already fixed :) ) so this is maybe backwards, but OK for starting.

hwoarangmy:

--- Quote from: DarkRain on August 17, 2015, 05:21:26 am ---But on linux after running cmake you can just do make ufo game to build just the game, so most helpful to windows user (but now that I think VS should have something similar...)
--- End quote ---
Well, it is always possible to compile only one project but the point with turning them optional is to not ask for dependencies. This way, if you disable uforadiant, for example, cmake will not ask for GTK (or at least won't complain if it is missing)


--- Quote from: DarkRain on August 17, 2015, 05:21:26 am ---Linux executables don't have icons
--- End quote ---
Ok, nice to know


--- Quote from: DarkRain on August 17, 2015, 05:21:26 am ---Well we currently have SDL2 taking priority over SDL (and the worst bugs are already fixed :) ) so this is maybe backwards, but OK for starting.
--- End quote ---
Ok. So, I will change so that SDL2 is chosen in priority to SDL.


--- Quote from: DarkRain on August 17, 2015, 05:21:26 am ---For consistency I'd have to say yes please.
--- End quote ---
Ok. I will do that.

Note that I won't be around for a few days so I won't have time to do requested changes now. I will do them once I'm back ^^

DarkRain:

--- Quote from: hwoarangmy on August 17, 2015, 09:54:03 am ---Well, it is always possible to compile only one project but the point with turning them optional is to not ask for dependencies. This way, if you disable uforadiant, for example, cmake will not ask for GTK (or at least won't complain if it is missing)

--- End quote ---

You have a good point there.


--- Quote ---Note that I won't be around for a few days so I won't have time to do requested changes now. I will do them once I'm back ^^

--- End quote ---
That's OK, take care!

hwoarangmy:
I'm almost done with what I wanted to do. I could build all the projects with Windows and Linux. All of them are optional (only UFO and GAME checked by default).
However, I'm lacking quick description for the projects:
- GAME: "Build the library handling the battlescape"
- UFO2MAP: "Build the tool to compile maps"
- UFODED: ?
- UFO: "Build the main game"
- UFOMODEL: ?
- UFOSLICER: ?
- UFORADIANT: "Build UFO AI editor"
- UFOTESTALL: "Build unitary tests"

If someone could fill unknow projects (or complete the other ones if needed), it would be nice.

I'm also building a package with UFO AI dependencies only (allowing to build with any code-blocks/MinGW anyone has installed instead of having to use a full bundle)

Now, I'm going to try to build the game with an older computer with MinGW32 (I've currently used MinGW64) and with MSVS2013 (except radiant and maybe testall because they have too many dependencies). If I can build it with MSVS2013, I will add required dependencies in the bundle.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version