Welcome to The Bug Genie
Please fill in your username and password below, and press "Continue" to log in.If you have not already registered, please use the "Register new account" tab to do so.
![]() Please wait while updating issue type...
Could not save your changes
This issue has been changed since you started editing it
Data that has been changed is highlighted in red below. Undo your changes to see the updated information
You have changed this issue, but haven't saved your changes yet. To save it, press the Save changes button to the right
This issue is blocking the next release
![]() Create a comment There are no comments
There is nothing attached to this issue
This issue has no duplicates
There are no code checkins for this issue |
|||||||||||||||||||||||||||||
Really delete this comment?
Really delete this comment?
I hope this log is more useful to you guys.
Really delete this comment?
Really delete this comment?
Either way, try changing lines 138 to 143 in CMakeLists.txt from
to just
and in src/core/Core.cpp remove lines 159 to 161:
Thanks.
Really delete this comment?
Really delete this comment?
Did you also remove the find_package(SDL 1.2 EXACT)? That needs to stay!
Really delete this comment?
Daniel Scharrer wrote:
Really delete this comment?
It *should* automatically be disabled if the linker doesn't support it, but for some reason that doesn't work on OS X - my only explanation is that CMake ends up using two different linkers for the test and the actual build
Anyway, I just disabled the check completely now for OS X so you shouldn't even need to set SET_OPTIMIZATION_FLAGS anymore.
Really delete this comment?
Really delete this comment?
Re, A
Daniel Scharrer wrote:
Really delete this comment?
It seems that we need to manually link against the SDLmain library and can't on CMake to find that for us. I've updated the code in the repository to do that. Can you try again, this time without making any changes in CMakeLists.txt or Core.cpp. Thanks.
Really delete this comment?
Daniel Scharrer wrote:
Really delete this comment?
Do you know where you have installed SDL? Is there a libSDLmain.a?
What is the output of
Also, what is the output of this when run in the arx build directory after cmake:
Thanks for sticking around.
This might also be relevant: http://forums.codeblocks.org/index.php?topic=9691.0
Really delete this comment?
Those files are needed for SDL on OS X in order to "glue" things together (.m is the extension used by Objective-C source files). You can get them from SDL's website when you download the framework. Unlike Windows and Linux there are no separate runtime and development libraries, there is just one framework and it comes with those two extra files. I followed the instructions in the Wiki to create an XCode project, then I dumped the two files into it in Sources/arx and clicked "Build" with ALL_BUILD as my target. Everything compiled fine with some warnings and the game is playable.
The conclusion is that either these files need to be included in the project or the project migrated to SDL 2 where there is no need for this "glue" code anymore. I was unable to compile from CMake because I didn't know how to add the two files to the project, I'm just randomly poking at things hoping it works. Note that SDL 2 for OS X now has separate runtima and development libraries as well, just like on Windows and Linux.
Once compilation works out of the box the next question is how to create a Mac-like package. Currently I just get the raw binaries, but on OS X applications come as one .app file that contains everything. You then drag & drop it into your applications folder and just double-click it, no isntalltion needed.
Really delete this comment?
We have no one really looking at the Mac port, so your help is definitely welcome. One contributor made some small changes for Mac a while ago... See https://github.com/arx/ArxLibertatis/commit/585d934137e2e28dce5bf976ae15189f941a9f55
That SDL.h include is not there anymore in the latest code, so I guess someone cleaned that up. SDL1 is doing nasty stuff (#define main SDL_main)... And I guess it might explain why it worked before and is broken now? Anyway, your solution might be cleaner, but I haven't done much research. We need to make sure that it works with CMake.
So this is just to say that you are more than welcome to help us with the Mac support
Thanks!
Guest user wrote:
Really delete this comment?
Really delete this comment?
It's now in Startup.cpp as main was moved there.
The worst part is that the way to link SDLmain differs between the various SDL distributions (offical framework, macports, ...) - see http://arx.vg/46d05d / Bug report 517 - problem finding libs to link wicth installed through MacPorts (Building on Mac OS X) for the last related change. It looks like FindSDL.cmake isn't able to figure it out for everyone, so we would have to bundle our own copy of SDLmain.m/.h and compile&link that - and I'd rather not bundle code from external projects if it can be avoided.
SDL 2 really is the only proper solution here, as that does away with this whole SDLmain mess. It's on my TODO list, but I'm currently on vacation, so won't get to it for a few weeks at least. If anyone else is keen to port AL to SDL 2: I think we should keep the SDL 1 backend for now to support non-bleeding-edge Linux distros, but can add a second SDL 2 backend (it's not a lot of code anyway). Once we move to require (parts of) C++11, we can also reevaluate the need for SDL 1 support.
Really delete this comment?
What should I do then? Should I upload my naked binaries unofficially where I had the Wine wrapper previously for the time being and wait until AL transitions to SDL 2? At that point AL should then be able to compile out of the box.
Really delete this comment?
"Should", yeah. But it turned out to be more complicated with SDL 1, let's hope that there aren't any more surprises with SDL 2...
Really delete this comment?
Really delete this comment?
For now I have replaced my old Wine wrapper with the package, containing a basic info.plist with the current version, icon and category (Game - Role Playing). A plist is essentially an XML file containing information for the OS about how to treat the bundle. If you want I can write a more detailed one for future releases. Also, we need a proper size icon (512 x 512), I was only able to find a small one and upscaled it. It doesn't look well, but it gets the job done. The icon itself looks nice, so if someone has still the vectors for it they can just export is at the right size.
Until the SDL 2 transition gets finished I'll try keeping up with official releases. If someone can get the makefile things done that would be great, otherwise I'll keep packaging manually. Someone should also change the "Wineskin wrapper" in the downloads section to "unofficial build" in order to not confuse people.
Really delete this comment?
Please open separate bug reports for any remaining issues.
The issue was updated with the following change(s):