Closed logzero closed 13 years ago
I can test on mac os. Why do you want to replace scons? Thanks
It is not about testing. You would have to write it for macos, complete includedirs/libdirs/links.
The idea is to reduce maintenance. You won't have to update the project files anymore because they would be generated by premake. You would run premake to update/create them. The frameworks could be moved into a separate dependencies package. The above premake script allows to generate make files, codeblocks and msvc projects.
I don't want to enforce this, am just curious how it works out, if it is a viable alternative.
You could clean up the syntax even more by replacing the if-else statements with additional configuration blocks.
configuration { "windows" }
flags { "StaticRuntime" }
includedirs {"win32/include", "win32/bullet"}
libdirs {"win32/lib"}
links {"opengl32", "glu32", "glew32", "SDLmain", "SDL", "wsock32", "ws2_32"}
files {"win32/bullet/**.h", "win32/bullet/**.cpp"}
postbuildcommands {"xcopy /d /y ..\\win32\\lib\\*.dll ..\\"}
configuration { "windows", "codeblocks" }
links {"mingw32"}
configuration { "macosx" }
links {SDL.framework"}
configuration { "not windows or macosx" }
libdirs {"/usr/X11R6/lib"}
links {"GL", "GLU", "GLEW"}
I've started testing this. Is there any way of making this work just by typing premake? it is just that I had to type premake xcode3. second thing is that under mac os framework search path is not set so that it won't find the frameworks you're linking.
I'm trying to implement premake in our system for mac os. I'm having some problems. I will post my questions here. Force feedback is enabled at compile time by a preprocessor definition. Is there any problem if force feedback is left always enabled? Why is that preprocessor flag there?
I've pushed a premake4.lua so you can work on it.
Add the search paths for the frameworks with libdir{}.
Wasn't aware that force feedback has to be enabled by a flag.
I have to tell you that framework search paths can't be set by the moment but I had reported the bug to premake. I will require a little workaround. I will leave include/definitions.h as it is for faster implementation of the premake system. I've realised there are some problems with definitions.h and some classes called VERSION and other little things. I also need someone for reviewing some comented code I think is causing some game problems but I will do all of this after merging the actual pull request I sent you. Thanks.
We should be able to generate the definitions.h file with premake.
Create new issues for the code you think is causing problems.
I'm on premake4 for linux. Almost builds :P
Builds and seems to run :D
includedirs {"/usr/local/include/bullet/"} ? Where do you have your bullet package from?
That's the default installation directory... I think I've compiled it from source :P
Should be /usr/include/bullet for system lib. http://pkgs.org/ubuntu-11.04/getdeb-games-i386/libbullet-dev_2.77-1~getdeb1_all.deb.html
also included that dir.
mac build stills buggy and needs fixes because premake stils too new :P
"needs fixes because premake stils too new" That sucks :(
Btw can you try "glPixelStorei(GL_UNPACK_SWAP_BYTES, 1)" before glTexImage2D in GenTextures.
http://www.gamedev.net/topic/371606-converting-bgr-to-rgb-in-sdl/
I'll test after trying to fix premake xcode build :D
It doesn't work...
I think the solution is to add particular cases for mac os that use BGR instead of RGB when assigning the value of the "format" variable.
Have a look at the latest patch and tell me what you think.
I think this can be closed. Am i right?
Can you do a quick ubuntu check?
Compiles and runs. :D
Closing. Can be reopened if there are issues.
I've played a bit with premake4 http://industriousone.com/what-premake as a possible replacement for scons/codeblocks/xcode.
Tested on win32 with codeblocks and msvc. It has worked flawlessly. Will test on linux/ubuntu next. I need some help with macosx.
It works analogous to cmake generating make/project files but has a very clean syntax: