Jump to content

Build environment and deployment on the Mac


Recommended Posts

Allright then. Indeed, it's more logical that way.

To do some "idiotic stuff", I've tried renaming the app bundle... Still works.

Atlas starts, but I get a wxWidgets error when I try to move around :"../src/osx/cocoa/combobox.mm(114): assert "item >= 0 && item < [m_comboBox numberOfItems]" failed in SetSelectedItem(): Inavlid item index."

Link to comment
Share on other sites

To do some "idiotic stuff", I've tried renaming the app bundle... Still works.

Excellent, it's good to test these things :)

Atlas starts, but I get a wxWidgets error when I try to move around :"../src/osx/cocoa/combobox.mm(114): assert "item >= 0 && item < [m_comboBox numberOfItems]" failed in SetSelectedItem(): Inavlid item index."

Oh, that's not good. What action causes the error? I tried opening different maps and using various tabs/controls but couldn't reproduce it. If you have gdb, can you try something like this to capture the call stack:


$ gdb 0ad.app/Contents/MacOS/pyrogenesis

(gdb) run -editor

*crash*

(gdb) bt full

Link to comment
Share on other sites

Atlas starts, but I get a wxWidgets error when I try to move around :"../src/osx/cocoa/combobox.mm(114): assert "item >= 0 && item < [m_comboBox numberOfItems]" failed in SetSelectedItem(): Inavlid item index."

OK this is reproducible even without an app bundle, I believe the cause has been found and will be fixed in SVN.

Link to comment
Share on other sites

@Ben, don't worry about Mountain Lion just yet. Save that for summer :P

I couldn't help it, I "peeked" and here's what I found out :P

  • Mountain Lion won't be including X11, if an app requires X11 to run, the user is prompted to visit Apple's website with instructions on how to install XQuartz
  • Apple is deprecating more unspecified parts of Carbon (C/C++ API for OS X, also primarily 32-bit), obviously pushing people into the Objective-C/C++ 64-bit Cocoa API
  • There's a new feature called Gatekeeper, it blocks apps from running if they don't have a special signature from Apple, you have to be an approved Mac developer to acquire one, assuming that means paying at least $99/yr. Modifying a trusted app makes it untrusted and the OS X firewall will block it.

:(

Link to comment
Share on other sites

I'm really not sure that the third feature is compulsory.

Apple promise that it is not:

http://www.apple.com/macosx/mountain-lion/security.html :

You control what you install.

<...>Gatekeeper brings you even more security options<...> Or you can install all apps from anywhere, just as you can today. You can even temporarily override your setting by Control-clicking, and install any app at any time.<...>

Link to comment
Share on other sites

Was doing a bit more digging and discovered this list of where App Store apps are allowed to write files. Note even ~/Documents is not listed, if we "manage" pictures we should use ~/Pictures, but we really don't so even that could be debated. Clearly saved games would have to go somewhere in ~/Library. It's very restrictive and I think it would be a good idea to follow those guidelines as general rules even if we don't plan to be on the App Store (for those curious, there are potential licensing conflicts between GPL and Apple's App Store policies).

------

Some people may have noticed you can't build 0 A.D. anymore even if you install Xcode and MacPorts. The reason is that GCC is no longer included with Xcode and the command line build tools have been removed by default from Xcode 4.3. If you installed an earlier version, as I did, it should work even if you upgraded. This annoyed a lot of people and caused some havoc among developers.

Just recently Apple has released a standalone package called "Command Line Tools for Xcode", which includes LLVM-GCC (it pretends to be GCC) and all the libraries needed. It's a free ~160MB download from the Apple Developer Downloads site. You need a free Apple ID to access it. Or if you have Xcode 4.3+, you can download the same package through Xcode Preferences.

I've tested, and it's possible to build the game and all its dependencies with only that package, in place of Xcode. However, because no SDKs are provided for backward compatibility, it's not possible to build a practical bundle without Xcode. Anyway I'm modifying the build scripts to handle either situation.

Link to comment
Share on other sites

Somebody made something similar for 10.6 (I read that "Command Line Tools for Xcode" is only for 10.7): http://kennethreitz.com/xcode-gcc-and-homebrew.html & the package itself https://github.com/kennethreitz/osx-gcc-installer/

Quite right and apparently that was the inspiration for Apple releasing their own package, but as 10.6 is older than 1-2 years, they obviously feel no need to support it :P Of course if someone is on 10.6, they can install an older Xcode and get the command line tools installed.

Link to comment
Share on other sites

Well yes, they've been updated. It's not easy to share though, since it involves moving and renaming things (maybe easier if I used Git?) Anyway that stuff will have to wait until after Alpha 9, I'll probably be helping review existing patches in the meantime. I would like to upload an official OS X bundle for Alpha 9 on LatestReleaseMac.

Link to comment
Share on other sites

I "upgraded" to Xcode 4.3, it's nice because unlike earlier versions (I was using 4.1) there's no need to install it, you just run the app bundle directly. Apparently updates are deltas now instead of requiring massive 2GB+ downloads. Want to uninstall? Drag the app to the trash. This means that all the Xcode required files are bundled, including SDKs. Unfortunately this causes problems if scripts are looking for SDKs in the old /Developer/SDKs location. Prime example: Boost build scripts. They try to be clever and provide a simple "macosx-version" option that automatically searches directories in /Developer/SDKs for a match. So it works great with Xcode 4.2 and earlier, but suddenly breaks on Xcode 4.3 with an unintuitive error:


error: "10.6" is not a known value of feature <macosx-version>
error: legal values:

See any mention of /Developer/SDKs or anything else remotely useful? :) I was shocked that a package like Boost misbehaved this way. Hope they've fixed it for 1.49, but either way my script has to set CFLAGS and LDFLAGS manually for Boost.

I also had to update my build scripts, SDKs are now located in... wait for it... /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs.

After that it works fine. Xcode detected that I had installed the "Command Line Tools for Xcode" package and didn't ask me to download them again. I did have to fix one Premake-related build error (11259) that only occurred with the new command line tools.

Link to comment
Share on other sites

OS X package for Alpha 9 is now available at http://trac.wildfire...atestReleaseMac (y)

Game works fine on my MBP 4,1 from 2008 with Snow Leopard 10.6.8 and 4Gb of RAM. 80% of CPU used during game execution.

Game runs fluently, no sound (normal i know developers are changing the sound system to put it right with OpenAL), no apuses and the games menu runs smoothly and right.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...