Hi all!
I finally finished migrating orx from svn/sourceforge.net to hg/bitbucket.org.
I will only be working on the new mercurial repository as of now. The repository is at
https://bitbucket.org/orx/orx, or, if you'd rather have an URL that's maybe easier to remember, you can use
http://code.orx-project.org/orx
Scroll has been hosted on the same account for the past few weeks and I believe this will make external proposition/patches easier to integrate.
I suggest only cloning the default branch (aka trunk) (hg clone -b default ...) as all the historical branches might add quite some traffic for nothing otherwise.
Now, I'll need to update the whole site/forum/wiki to point to the new place and that's where I'd love to have some help from the community.
I've changed the link on the main page to go to bitbucket. I haven't changed the download link yet but that will come in the future.
Actually the future in this case means whenever I get a continuous integration ready for orx, probably using buildbot. I'll setup the master on my own private server at home that should be available 24/7, but I'll need some slaves, even if they're only available from time to time.
I will be providing slaves for doxygen, msvs2008, codelite, mac os (x86/x64) x and iOS builds myself (with quite some downtime), but I'll need some slaves for msvs2010, linux x86/x64 and Android.
The more slaves, the better, this way we should have access to build regularly, including API doxygen doc.
No more 1.5 years between releases anymore!
Now that sounds pretty neat on paper but I have almost no clue on how to setup a buildbot nor how to compile most of the versions from the command line. If anybody wants to help with that, please let me know!
Thanks in advance!
Cheers!
Comments
about android, currently orx is compiled when the application is compiled.
I probably can change that to build orx as a static lib.
and provide a slave to build the thing (if bandwidth requirement aren't too high)
about cloning only the default branch, unfortunately, that's not how mercurials is working.
when you clone a repositoy, you can't clone a part of it, you allways clone the whole repository including all branches.
if you want to split branches from the main repository, you need to create forks in differents repositories.
Forks works like branches (more or less)
If repo A is the main, and repo B is a 'forked-branch', you can pull changes from A into B, and chanes from B into A (when work on B is finish)
I think codelite generates makefiles for it's own use, and I've used those makefiles successfully from the commandline.
I can provide a Linux 32 and a Linux 64 (Both Ubuntu 12.04 LTS) as slaves.
There's another post in this forum about supporting PreMake to generate all the project/make files, by AlgoJerVIA.
Unfortunately 7 months later I haven't been able to look at his work as I've been crunching for 6 months straight at work and had a lot going on in my personal life too. I guess now it's time to get back on it, as a prerequisite of the whole buildbot integration.
I just can't get motivated, I hate writing this kind of scripts.
Anyway, playing around with it, I seem to have gotten it working well on Linux (both with make and codelite) for all applicable build types. The exception being that the plugins themselves are not currently compiled, but plugin builds still compile for the library itself.
I think I found a way to get embedded and static builds with Xcode, but it requires testing:
I implemented (hopefully) a command line argument
--build-type which can be set to dynamic or static for Xcode builds. eg: --build-type=static
Of course, I have no clue what compiler/linker options are needed for Xcode, so the resultant solution wouldn't be compileable anyways in the current state.
If someone wants to tell me a few things, I will hack at it further.
Specifically:
-What plugins should be built for what platforms/architectures?
-What compile/linker options/flags etc... are needed for non linux platforms (win-msvc, win-mingw, osx)
-As above, what libraries do I need to link against?
-Are the iOS and Android builds even pre-compilable (Lydesik mentions that Android is always built with the app) If so, what settings are needed? https://forum.orx-project.org/uploads/legacy/fbfiles/files/premake4.txt
but dont't worry about it since it's all custom Makefile fragments for the android ndk-build script, I'pretty sure it wont fit with premake.
I'll integrate it with buildbot and provide the slaves.
(I still need to investigate on this and how to package this stuff)
For now, I think we can focus on the embedded versions only. That will also motivate me to rewrite all the tutorials that are not using that version.
I'll check the different compiler options, hopefully tonight, and will post them here, same for the linker/external libraries.
The iOS build is precompilable, and it actually requires an extra step after compilation to merge all the versions (iPhone, iPad, arm6, arm7, ...) in one universal binary file, using the lipo tool.
I won't be able to check your work myself before this week end at best, unfortunately, but I'll provide you with all the info in the meantime.
Thanks again for your help!
I haven't had the opportunity to look into XCode (OS X/iOS) unfortunately.
Would any Windows users care to test?
Just grab the premake4 file attached, rename it to premake4.lua and put it in the orx/code/build directory. Make sure premake4 is installed and run it to create the projects.
The command is: premake4 vs2010
You can use vs2008, vs2005, or codelite instead of vs2010.
Also, you need to run it from inside the orx/code/build directory.
If it explodes in your face, come back here and yell at me. https://forum.orx-project.org/uploads/legacy/fbfiles/files/premake4-ce42b8b04f48d74abca33b30a62516c3.txt
I'll give it a try tomorrow night. Would you rather have a write access to orx instead of posting the file here?
Another option would be to fork orx and create some pull requests.
I'll remove orx.premake too.
I recently want to try SublimeTex and remove VS, so I need to compile orx on Windows using another compiler. I just installed MinGW and tried to create a Makefile to compil orxLIB. I asked some questions to Iarwain and he talked to me about that post.
I have downloaded premake, read really quickly its documentation, ran it in the build directory with the command premak4 gmake. It's magic and really nice, it works and compile find (I have tested orxLIB compilation). Really nice idea to use this tool!
But, I have a problem at link, external libraries are not found, I suppose it's normal because I haven't compil them (ld cannot find -lBox2D for example).
It's planned to create a premake file for external library? Or maybe I missed something?
I find some mingw library in the extern directory. There's nothing to build them, but the library exist, don't know how
(EDIT: I'm stupid, I know how, using codelite on windows ... but I don't have it)
So I did some little change in the premake4.lua and now I have a orx.dll (not tested yet).
I replace some "codelite" to "gmake":
1/ line 369 : to enable all extern mingw library in the library path
2/ line 468 : to enable sndfile to be linked
With that, mingw32-make orxLIB seems to work.
So, I suppose there's not a lot to do to enable gmake on windows without hacking the premake file like me
4babce, good job, really appreciate, thanks !
I have made the required changes, so gmake should build properly on windows now.
And, yes, hopefully the extern dependancies will be automatically built in the future, but for the time being they should be pre-compiled for you.
Your modification works! Thanks!
I will post here some little remarks when I will found some mistake about premake.
For example, I saw that building the debug configuration for orx build orx.exe instead of orxd.exe.
I finally got the time to give it a try, however I ran into some troubles.
When I run premake4 vs2010 (or any configuration, really), I get an error about "invalid flags". It'll actually stop at the first "flags" found in the script, no matter its value. Any idea?
PS: Using Premake 4.4-beta4 on windows.
I ended up forking premake-dev in the orx's bitbucket account (nice that premake is also hosted on bitbucket), and will be toying around and see if I can make something work using the premake 4.5 dev version.
If someone wants to help, all users having an access to the orx group account on bitbucket have access to that fork.
I made a few changes to premake already and got all the windows versions (gmake, codelite, vs) running perfectly (embedded/non-embedded + static/dynamic + debug/profile/release).
I'll check linux next as it should rely on the gmake/codelite work and shouldn't bring many surprises.
Lastly will be mac os x as for now the xcode project generated doesn't allow to specify a SDK (and it defaults to the iOS one on my macbook O_o).
Erwin Courmans of Bullet Physics fame wrote a patch a year ago to support this (as long as iphone builds), but it hasn't been integrated to premake (at least not in the stable repository).
I see if I can integrate in our clone and support ipad as well.
I rewrote most of the premake4.lua file for orx in the process but I didn't commit it yet as I don't want to break the linux support if someone is already using it. Those who are interested can find the latest version on my dropbox: https://www.dropbox.com/s/5kut2g15vh54q7h/premake4.lua
Anyway, playing around with the file on linux64 with make.
Some issues:
Need to add Somewhere to the 'orx' project so that static64 builds correctly.
Second,
It looks like profile and release 32 builds are wonky, objects (cursor and profile overlay excluded) dissappear shortly after they spawn. To be more specific, the walls fade in, then dissappear. The balls and text spawn for a fraction of a second, then dissappear. It appears the objects are still alive however, based on the profiler.
Defining __orxDEBUG__ for those builds fixes the problem.
Have not tested non-embedded builds yet.
I'll add pthread anyway but that sounds weird as orx doesn't use threads at all. Which file is asking for those symbols? It's an optimization bug of some versions of gcc that where reported a few times in the forum. It mostly affects orxFXs and it doesn't happen with all versions of gcc. I guess we'll have to isolate exactly which optimization flags are responsible and manually deactivate them.
I modified premake tonight as the linux codelite projects were not correctly created. I'll commit the binaries soon.
However, I do need pthread.
gcc 4.7.2
glibc 2.16.0
I tried rebuilding libglfw to no avail.
I also installed a new linux32 box on my computer last night, so now I have one linux64 (Linux Mint 11) and two linux32 (Ubuntu 8.04 and Ubuntu 12.10).
On the linux64, with gcc 4.5.2, all the optimized builds run fine.
On the Ubuntu 8.04, with gcc 4.2.4, all the optimized builds run fine.
On the Ubuntu 12.10, with gcc 4.7.2, the optimized builds are broken the way you described (ie. the alpha is reset to 0 when a FX that contain an alpha slot finishes).
On windows/mingw(gcc) and os x/gcc, I never was able to repro that issue, no matter which version I used.
With visual studio or llvm/clang, I never encountered that issue either, so I really wonder what rubs those versions of gcc/linux the wrong way.
I'll track down which optimization flags are responsible, but it's going to be annoying.
For now, if you remove the Object.AddFX calls from the WallTrack in code/bin/BounceAlt.ini, you shouldn't see any object disappearing anymore.
Interestingly, enabling with -O2 fixes it, whereas just -O2
its broken. However, -O2 is supposed to imply -fschedule-insns, so what the heck?
Disabling any one of: with O2 enabled will also cause it work correctly. Enabling all of those above with -O1 will break it; removing one of them and it works again.
No idea if disabling any of the O1 flags might also cause it to start working.
EDIT:
As a thought: does compiling with -O2 and -fno-schedule-insns on any of the other gcc versions cause the problem to appear?
Does enabling schedule-insns fix it in addition to -O3 too?
And yes, you're right, schedule-insns (as well as schedule-insns2) are supposed to be part of -O2.
I'll look if I can find any info on the gcc mailing lists as it surely doesn't happen only to us.
As for using no-schedule-insns on other versions, I'll give it a try and let you know.
It only handles the dynamic version for mac at the moment, and no XCode project either (as premake is actually creating 3 separate projects instead of having a single project with 3 targets ).
Anyway, that's enough for our integrated building needs and I did some buildbot work at home last night (including a server that runs and two (a window and a mac) slaves that can sync and compile code.
Now on to write scripts for creating the packages and pushing them online.
Hopefully that means that we should soon be able to witness new binary package releases.
I'll take a look to setup a buildbot slave for android.
about packaging:
Is there a preferred layout for content?
both android versions are static build and require a bunch of files like libBox2D.a, libNvEvent.a, libSOIL.a + some Android.mk required by the ndk build script.
Lydesik
Also, why don't you merge all your static libraries together so that users only have to link -lorx in the end?
EDIT: Something like:
That also means to duplicate all the config files as it's done in the tutorial folder, and I'm not very fond of the idea.
That being said, you can easily modify the code/build/premake4.lua script in order to output different platform to different folders and then generate your own makefile/IDE project file.
The manually created IDE project files will soon disappear except for the XCode ones as premake isn't doing a viable work for it, unfortunately.
Ie: instead of /lib/dynamic, /lib/static, /bin and /bin/plugins/demo you'll have /lib/dynamic/x32, /lib/dynamic/x64, etc...