Development

Create a popup from a shell script

Use a sh(1) function like:

function display_error (){
# Error message in dialog box
osascript <<-EOF
tell application "Finder"
activate
set dd to display dialog "\n$Error\n" buttons {"OK"} default button 1 with icon caution giving up after 30
set UserResponse to button returned of dd
end tell
EOF
}

CPAN

Install a CPAN module:

sudo -H cpan -i Module::Name

Build a Universal Binary app with Xcode

Let's start with the sources of an application already compiling for ppc with xcode.

  • Open the project with xcode (it's the *.xcodeproj or the *.pbproj file)
  • Double-click on the icon on the very top of the Groups and Files list
  • In the General tab, choose “Mac OS X 10.4 (Universal)” for the Cross Develop Using Target SDK item
  • Click the Build tab, and:
    • choose “Development” for the Configuration item and “Customized Settings” for the Collection item.
    • Add the custom items:
   MACOSX_DEPLOYMENT_TARGET_i386 -> 10.4
   MACOSX_DEPLOYMENT_TARGET_ppc -> 10.3
  • Change the Configuration dropdown to “Deployment/Release” and change the Architectures setting to “ppc i386”

Now when you compile in developement mode (Project → Set Active Build Configuration → Development) you'll produce only binaries for $(NATIVE_ARCH), when you move in Deployment mode you'll make Universal binaries.

Well, maybe. At least I hope. If else fails try to have a look to the page from where I've collected these notes.

apple/development.txt · Last modified: 2007/06/28 11:59 (external edit)
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Noncommercial-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki