Light Style© by Fisana

Jump to content


Photo

precompiled mac version done


  • Please log in to reply
102 replies to this topic

#41 Yves

Yves

    Primus Pilus

  • WFG Programming Team
  • 1,028 posts

Posted 25 September 2011 - 02:28 PM

ok thanks! links mostly now, except for a boost issue. will continue sunday or monday.

What's wrong with the xcode projects generated by premake?
  • 0

#42 cc_julian

cc_julian

    Discens

  • Community Members
  • Pip
  • 20 posts

Posted 25 September 2011 - 07:54 PM

if generating deployable binaries from premake would work, you'd already have those.
  • 0

#43 historic_bruno

historic_bruno

    Primus Pilus

  • WFG Programming Team
  • 2,491 posts

Posted 25 September 2011 - 09:50 PM

I don't think any of our developers are familiar enough with Xcode and OS X development to do that. I personally only have a virtual Mac and have only spent a small amount of time on build issues. Then there are questions of which versions of OS X and architectures do we want to support. I don't see any reason why it can't work, the Xcode projects are just text files and we need to make sure the right bits get thrown in.

Thinking more about the dependencies, I believe we can bundle pre-built libraries for OS X, like we do already for Windows.
  • 0
Ben Brian [ aka historic_bruno ]

Wildfire Games Programmer
Contact me: ben [at] wildfiregames [dot] com

#44 cc_julian

cc_julian

    Discens

  • Community Members
  • Pip
  • 20 posts

Posted 26 September 2011 - 11:48 AM

i got atlas *running* but i don't think it is working as intended. i get this on most things:

source/tools/atlas/AtlasUI/ScenarioEditor/Tools/Common/Tools.cpp(78): assert "tool" failed in SetCurrentTool().
  • 0

#45 cc_julian

cc_julian

    Discens

  • Community Members
  • Pip
  • 20 posts

Posted 26 September 2011 - 11:58 AM

ok i have:

changed the linked mac patch to be generated from "svn diff" to be easier apply-able
added a patch needed for compiling atlas to my initial post
uploaded a new xcode project folder that also can build atlas and is improved in some other ways.

please commit these to SVN trunk.
  • 0

#46 historic_bruno

historic_bruno

    Primus Pilus

  • WFG Programming Team
  • 2,491 posts

Posted 26 September 2011 - 06:58 PM

Some questions/comments about the patches (haven't tested the build yet, and won't be able to for a week or so):

http://dl.dropbox.com/u/7221986/0ad_mac_patch.diff

Why do you include ps/Pyrogenesis.h in several source files?

Why the #undef _T in UniDoubler.h? (_T is a macro for wxStrings and shouldn't be mixed with engine definitions in any case, Atlas doesn't know about CStr, which I believe is intentional. Any strings shared between Atlas and the engine use std::string or std::wstring instead).

As a general question, does your build support precompiled headers?

http://dl.dropbox.com/u/7221986/atlas_mac_patch.diff

In Memory.h, it's conventional to name the macro guard after the file, so MEMORY_H.

In AtlasUI, I notice several files have changed <> includes to "", any particular reason for that?

Why is RGBColor renamed to RGBColorVector? (The engine seems to build fine in my tests and Atlas shouldn't conflict with engine code).
  • 0
Ben Brian [ aka historic_bruno ]

Wildfire Games Programmer
Contact me: ben [at] wildfiregames [dot] com

#47 cc_julian

cc_julian

    Discens

  • Community Members
  • Pip
  • 20 posts

Posted 26 September 2011 - 07:18 PM

>Why do you include ps/Pyrogenesis.h in several source files?



i've included pyrogenesis.h in all files that use psLogDir(), which is declared in this header, so i don't know how it could ever compile without it being included


>Why the #undef _T in UniDoubler.h?


i got an warning for an double definition there, and there already were some undefs there so i added it. you can just skip that part because it's just a warning.


>As a general question, does your build support precompiled headers?



yes xcode supports a single precompiled header. i've created the xcode/Sources/_ad_Prefix.pch as the precompiled header


>In Memory.h, it's conventional to name the macro guard after the file, so MEMORY_H.



oh yes sorry, i meant to do that but the namespace name confused me ;-)


>In AtlasUI, I notice several files have changed <> includes to "", any particular reason for that?



consistency. 95% of the WX includes use the local header "" notation, and just very few the system header includes <>. i could just add the wx header directory as a user header directory AND as a system header directory, but that would be kinda ... wrong ... just because a few includes deviate from the others. actually using <> everywhere would be even more "right"


>Why is RGBColor renamed to RGBColorVector?


it conflicts with RGBColor as defined somewhere deep in the headers of the mac version of WX. i bet one could work around this with some namespace things, but i am not that fluent in c++ things.
  • 0

#48 Ykkrosh

Ykkrosh

    Primus Pilus

  • WFG Programming Team
  • 4,921 posts

Posted 27 September 2011 - 09:02 PM

i've included pyrogenesis.h in all files that use psLogDir(), which is declared in this header, so i don't know how it could ever compile without it being included

It's included by source/pch/engine/precompiled.h which is included by those source files when building with the correct include paths.

(That's probably a good reason to build with Premake on all platforms, so we don't get unexpected problems due to subtly incorrect build configurations :))
  • 0
Philip Taylor [aka Ykkrosh]

Wildfire Games Programmer
Contact me: philip@wildfiregames.com

#49 General Octavian

General Octavian

    Discens

  • Community Members
  • Pip
  • 67 posts

Posted 28 September 2011 - 02:23 AM

There is no build folder I have found. IDK where to put xcode project in able to run atlas.

Edited by General Octavian, 28 September 2011 - 02:25 AM.

  • 0

#50 Echelon9

Echelon9

    Discens

  • Donator
  • 88 posts

Posted 24 December 2011 - 07:35 AM

I've taken cc_julian's provided Xcode project file and patch diff file, updating each for the r10808 of trunk (i.e. essentially the Alpha 8 release).

xcode.zip
clean-build-mac.diff

Current status (24/12/2011) is:
  • Compiles cleanly on Xcode 3.2.6
  • Linking produces one error that I would like others' thoughts on resolving
ld: duplicate symbol CCmpPathfinder::HandleMessage(CMessage const&, bool)in /Users/..../Documents/Coding/0ad/trunk/build/xcode/build/0ad.build/Debug/0ad.build/Objects-normal/x86_64/CCmpPathfinder-F1D5D520713D9E44.o 
and /Users/..../Documents/Coding/0ad/trunk/build/xcode/build/0ad.build/Debug/0ad.build/Objects-normal/x86_64/CCmpPathfinder-F1D5D520713D9E44.o
collect2: ld returned 1 exit status
Command /Xcode3/usr/bin/g++-4.2 failed with exit code 1

  • 0

#51 wraitii

wraitii

    Primus Pilus

  • WFG Programming Team
  • 1,666 posts

Posted 24 December 2011 - 10:05 PM

I've got a version of the Alpha 8 that should be deployable for Mac os X. It works on 10.6 and 10.7 on the two computers I tried at home, and it should have no particular dependencies other than OpenAl, OpenGL and the basic libraries that come with OSX. If anybody can report, download it here. It should work, but I can't guarantee it 100%. At least it worked on the computer where I went through the whole "compiling", and on another computer which is basically "vanilla".

Btw, I encountered few compilation problems, mainly linking problems. In fact, using dynamic libraries on OSX is a real pain, there needs to be copying and script running. I have not included the source in this file, but I can tell you how to fix the Xcode Project for the most part. It's basically allright, but there are a few things to fix here and there, and libraries are a -real- pain.

Thing is, a shell script that downloads every library necessary and puts them in the right folders could really straighten out the installing process on Mac OS X, but I think my knowledge is a bit lacking on the matter.

Edited by wraitii, 24 December 2011 - 10:18 PM.

  • 0
Lancelot de Ferrière le Vayer [ aka Wraitii ]
Wildfire Games Programmer, AI developer, auxiliary map designer, dealing with anything water.
Contact me: wraitii@wildfiregames.com

Also the world's only three-dimensional poodle.

#52 quantumstate

quantumstate

    Primus Pilus

  • WFG Retired
  • 1,150 posts

Posted 24 December 2011 - 10:15 PM

I've got a version of the Alpha 9 that should be deployable for Mac os X. It works on 10.6 and 10.7 on the two computers I tried at home, and it should have no particular dependencies other than OpenAl, OpenGL and the basic libraries that come with OSX. If anybody can report, download it here. It should work, but I can't guarantee it 100%. At least it worked on the computer where I went through the whole "compiling", and on another computer which is basically "vanilla".

Btw, I encountered few compilation problems, mainly linking problems. In fact, using dynamic libraries on OSX is a real pain, there needs to be copying and script running. I have not included the source in this file, but I can tell you how to fix the Xcode Project for the most part. It's basically allright, but there are a few things to fix here and there, and libraries are a -real- pain.

Thing is, a shell script that downloads every library necessary and puts them in the right folders could really straighten out the installing process on Mac OS X, but I think my knowledge is a bit lacking on the matter.


I don't have a OS X so I can't test but if it works that would be great. Good work.
  • 0

Jonathan Waller [ aka quantumstate ]

Wildfire Games Programmer
Contact me: jonathanmarkwaller at gmail dot com


Support Wildfire Games!


#53 wraitii

wraitii

    Primus Pilus

  • WFG Programming Team
  • 1,666 posts

Posted 24 December 2011 - 10:20 PM

Darn, I wrote Alpha 9, I'm getting a bit carried away.

I didn't really troubleshoot this, so it's likely fairly buggy even if it starts but i uploaded it to see... I'm going to release my source code tomorrow, which will hopefully be more useful.

edit: apparently the Collada problem that was encountered with the former version still happens on Lion... I'd like to know if anybody can confirm or infirm.

Edited by wraitii, 24 December 2011 - 10:24 PM.

  • 0
Lancelot de Ferrière le Vayer [ aka Wraitii ]
Wildfire Games Programmer, AI developer, auxiliary map designer, dealing with anything water.
Contact me: wraitii@wildfiregames.com

Also the world's only three-dimensional poodle.

#54 Echelon9

Echelon9

    Discens

  • Donator
  • 88 posts

Posted 25 December 2011 - 12:00 AM

I'm going to release my source code tomorrow, which will hopefully be more useful.


When you upload the Xcode project file I'll take a look. Thanks.
  • 0

#55 wraitii

wraitii

    Primus Pilus

  • WFG Programming Team
  • 1,666 posts

Posted 25 December 2011 - 07:26 AM

I'm straightening it out and then uploading. I think I won't upload the data to save space, nor the compiled app, so you'll have to put it in the right folder, I'll indicate which.

Edit: Okay... Still trying to get the raw minimum, but at the very least I fixed the Collada issue. In fact, because it's loaded at runtime, the game couldn't find the dylib. I've added a little fix in "DLLloader.cpp" which should not conflict ( I used a "IFDEF mac os X") which solves the issue, you'll see when I'm over.

Edited by wraitii, 25 December 2011 - 09:06 AM.

  • 0
Lancelot de Ferrière le Vayer [ aka Wraitii ]
Wildfire Games Programmer, AI developer, auxiliary map designer, dealing with anything water.
Contact me: wraitii@wildfiregames.com

Also the world's only three-dimensional poodle.

#56 wraitii

wraitii

    Primus Pilus

  • WFG Programming Team
  • 1,666 posts

Posted 25 December 2011 - 10:23 AM

Okay, so this is the basic core of my Xcode project. It's not brand new, it's only an improved version of the workspaces that the game creates when following the instructions on the wiki.
You'll need two things, I think: the data (downloadable here) and the "libraries" folder, with compiled libraries. I have included the basic one, but I don't think it'll work with it... So you might have to go though the "normal" installation process as described on the wiki once, and then replace the files with mine (but the "libraries" folder). (Note that I have included a "Libraries" folder in /system , this one is not the one I'm talking about. I'm talking about the one in the root folder.)
Download link,
If you're having any trouble, please report.
This includes the fixed Collada thing, but Atlas doesn't work. I'm compressing a new "precompiled" executable and am going to upload it later today, this one should actually be deployable.

Edited by wraitii, 25 December 2011 - 10:24 AM.

  • 0
Lancelot de Ferrière le Vayer [ aka Wraitii ]
Wildfire Games Programmer, AI developer, auxiliary map designer, dealing with anything water.
Contact me: wraitii@wildfiregames.com

Also the world's only three-dimensional poodle.

#57 JuliusColtranePille

JuliusColtranePille

    Sesquiplicarius

  • Donator
  • 129 posts

Posted 25 December 2011 - 11:08 AM

somehow i cant find a open GL Version... i think it should be open GL 2.1. for Snow Leopard?

do i have to unzip the data.zip in the which is in the mods/public/... folder?


... and it crashes till now:

Process: 0A.D. [553]
Path: /Users/xxxxxxxxx/Downloads/0 A.D./data/0A.D..app/Contents/MacOS/0A.D.
Identifier: 0A.D.
Version: ??? (???)
Code Type: X86-64 (Native)
Parent Process: launchd [96]

Date/Time: 2011-12-25 12:06:17.966 +0100
OS Version: Mac OS X 10.6.8 (10K549)
Report Version: 6

Interval Since Last Report: 768089 sec
Crashes Since Last Report: 15
Per-App Crashes Since Last Report: 4
Anonymous UUID: 8DC3718B-399A-4E24-84E3-54B17EFB45E1

Exception Type: EXC_BREAKPOINT (SIGTRAP)
Exception Codes: 0x0000000000000002, 0x0000000000000000
Crashed Thread: 0

Dyld Error Message:
Library not loaded: /usr/X11/lib/libpng12.0.dylib
Referenced from: /Users/xxxxxxxxxxx/Downloads/0 A.D./data/0A.D..app/Contents/MacOS/../Frameworks/libnvimage.dylib
Reason: Incompatible library version: libnvimage.dylib requires version 47.0.0 or later, but libpng12.0.dylib provides version 45.0.0

Binary Images:
0x7fff5fc00000 - 0x7fff5fc3be0f dyld 132.1 (???) <29DECB19-0193-2575-D838-CF743F0400B2> /usr/lib/dyld




do you have any idea???

but nevertheless... cool that you uploaded a version... great!

warm regards!
  • 0
"Jazz means Freedom."

Miles Davis

#58 wraitii

wraitii

    Primus Pilus

  • WFG Programming Team
  • 1,666 posts

Posted 25 December 2011 - 11:17 AM

No, afaik the Data should be kept zipped (but the developers will answer that better)...
That's a weird problem, it looks like you have an outdated version of libpng in your X11 folder... I suggest you download the latest version of X11 and retry.

OpenGL should already be in your HD/Library/Frameworks.

You're likely trying to use the former version of my precompiled 0A.D. , which has bugs with Collada and some libraries, I'm uploading a newer one which should work independently.

edit: Okay, try replacing the application (only the application) by this one. Normally, you don't even have to update X11 as this version should rely on the one bundled with it (which means that it should simply work).

Edited by wraitii, 25 December 2011 - 11:24 AM.

  • 0
Lancelot de Ferrière le Vayer [ aka Wraitii ]
Wildfire Games Programmer, AI developer, auxiliary map designer, dealing with anything water.
Contact me: wraitii@wildfiregames.com

Also the world's only three-dimensional poodle.

#59 JuliusColtranePille

JuliusColtranePille

    Sesquiplicarius

  • Donator
  • 129 posts

Posted 25 December 2011 - 11:32 AM

No, afaik the Data should be kept zipped (but the developers will answer that better)...
That's a weird problem, it looks like you have an outdated version of libpng in your X11 folder... I suggest you download the latest version of X11 and retry.

OpenGL should already be in your HD/Library/Frameworks.

You're likely trying to use the former version of my precompiled 0A.D. , which has bugs with Collada and some libraries, I'm uploading a newer one which should work independently.

edit: Okay, try replacing the application (only the application) by this one. Normally, you don't even have to update X11 as this version should rely on the one bundled with it (which means that it should simply work).


ok... cool, thankyou so much for the fast answer.

downloading...

will report immediately...

merry christmas by the way ... if you're belonging to that cultural hemisphere ;)
  • 0
"Jazz means Freedom."

Miles Davis

#60 JuliusColtranePille

JuliusColtranePille

    Sesquiplicarius

  • Donator
  • 129 posts

Posted 25 December 2011 - 11:35 AM

Process: 0A.D. [603]
Path: /Users/xxxxxxx/Downloads/0 A.D./data/0A.D..app/Contents/MacOS/0A.D.
Identifier: 0A.D.
Version: ??? (???)
Code Type: X86-64 (Native)
Parent Process: launchd [96]

Date/Time: 2011-12-25 12:33:18.406 +0100
OS Version: Mac OS X 10.6.8 (10K549)
Report Version: 6

Interval Since Last Report: 769708 sec
Crashes Since Last Report: 16
Per-App Crashes Since Last Report: 5
Anonymous UUID: 8DC3718B-399A-4E24-84E3-54B17EFB45E1

Exception Type: EXC_BREAKPOINT (SIGTRAP)
Exception Codes: 0x0000000000000002, 0x0000000000000000
Crashed Thread: 0

Dyld Error Message:
Library not loaded: /opt/local/lib/libjpeg.8.dylib
Referenced from: /Users/xxxxxx/Downloads/0 A.D./data/0A.D..app/Contents/MacOS/0A.D.
Reason: image not found

Binary Images:
0x7fff5fc00000 - 0x7fff5fc3be0f dyld 132.1 (???) <29DECB19-0193-2575-D838-CF743F0400B2> /usr/lib/dyld



hmmmm... any idea? where can i find a x11 version... couldn't find one, as well as i dont see an open GL version in my frameworks-folder

i am using snow leopard on a 2011 iMac...
  • 0
"Jazz means Freedom."

Miles Davis