osx

What should I set JAVA_HOME to on OSX

Many java applications that use shell scripts to configure their environment use the JAVA_HOME environment variable to start the correct version of java, locate JRE jars, etc. On OSX 10.6, the following paths seem to be valid for this variable /Library/Java/Home /System/Library/Frameworks/JavaVM.framework/Home /System/Library/Framework...

cmake settings on snow leopard

I am trying to compile my project on Snow Leopard using the same CMakeLists.txt file that I had on Leopard, however the compilation fails with the following error message: Linking C executable cmTryCompileExec "/Applications/CMake 2.6-4.app/Contents/bin/cmake" -E cmake_link_script CMakeFiles/cmTryCompileExec.dir/link.txt --verbo...

List of libraries available on a stock installation of OS X?

I'm trying to compile a version of convert (one of the ImageMagick tools) for distribution with a Cocoa app I'm writing, and I've mistakenly bundled a version that relies on shared libraries my users don't have (twice, already). Thus, I'm trying to pare down the list. After stripping out everything I didn't need, running otool -L conve...

Determine a process's architecture

Is there a programmatic way to find out what architecture another process is running as on Mac OS X 10.5 and later? Examining the process's image file is not a solution, as the image is likely to contain multiple architectures, and between arch(1) and the “Open in Rosetta” and “Open in 32-bit mode” checkboxes, there's no way to tell fro...

Install ColdFusion 8 on Snow Leopard?

Has anyone found a way to install ColdFusion 8 on Snow Leopard? Is it possible? ...

How do I tell /usr/bin/indent on Mac OS X 10.5 to format my C code K&R style?

On Linux I am used to running indent -kr ... to indent C files. /usr/bin/indent on Mac OS X 10.5 does not support the -kr option. Does anyone have a ~/.indent.pro file that would produce results closest to K&R style? Thanks! ...

Why does Macports take FOREVER to build simple packages?

I guess the title says it all. Building from source outside of macports is a breeze. Building with macports takes forever and seems to freeze the os every so often. Is this typical behavior? Although it seems like a nice packaging tool for os x, if I have to go through this pain every time during every install I think I'll do without...

List values in AppleScript?

I have the following AppleScript so far: # List of possible options to control the development environment. set WhatDoUWantToDoList to {"1", "2", "3", "4"} set MySites to {"test1", "test2"} # task selected set selectedTask to {choose from list WhatDoUWantToDoList with prompt "Pick your task now!!!" without multiple selections allowed}...

Upgrading project to Xcode 3.2 under Snow Leopard won't debug

Hi all, I have an Xcode project that has been upgraded to Xcode 3.2, and whilst it builds fine (and produces an executable that runs fine), when I try to debug it the debugger doesn't start. When I look in the debugging window, it says that the build was fine. When I look in the console, I get a 'Session started ', but the application...

Problems with NSTask in OS X 10.6 Snow Leopard

Has anyone else seen or heard of any issues with NSTask in 10.6? This code worked fine yesterday, and is not working today. NSTask *task = [converter task]; [task waitUntilExit]; NSLog(@"Task did complete"); The task does what it's supposed to do (I checked the output and it's fine), but the program will wait indefinitely at the wait...

What does "s-[keyname]" refer to in Emacs, and how do I tell Emacs to ignore it?

Background information: I'm on a Mac, and I've just upgraded to Emacs 23.1 via http://emacsformacosx.com/. There are a few issues, notably the lack of full screen ability. I've attempted to get around this last issue by installing Megazoomer, which adds a global input manager bound to Cmd-return. This causes the currently forward appli...

Haskell, HDBC, ODBC, MySQL and Mac OS X

I'm trying to use Haskell (version 6.10.3) and HDBC to connect to a MySQL Database. I've chosen to do it with Haskell ODBC. I've used cabal to install HDBC (2.1.1) and HDBC-ODBC (2.1.0.0). I've downloaded and installed the MySQL ODBC driver (5.1.5). I used macports to install unixODBC (2.2.14_1). All of this on top of Mac OS X (10.5.8). ...

What are good database options to use for app dev on Mac OSX?

I'm looking to develop a small application on Mac OSX and it will need to use a database. Can anyone recommend one for the Mac? This will be my first Mac development so this is very much a newbie question. To help you I am interested in the following aspects: Is it suitable for small applications? (Important) Is it suitable for larger...

JFileChooser for directories on the Mac: how to make it not suck?

The JFileChooser in "directories only" mode on the Mac has two serious, crippling problems: 1) You cannot create directories with it 2) You cannot switch drives This is rather a huge problem for my installer app. As far as I can tell, Apple provides no way around this problem, you can't even activate the non-native directory chooser ....

Snow Leopard + Ruby 1.9.1 + MySQL Gem = Huge problems

I tried for about 3-4 hours trying to get the mysql gem to install for ruby 1.9.1 on snow leopard. The mysql gem used to work just fine on 1.9.1 before I upgraded to snow leopard. I uninstalled MySQL server and gem from my machine. I then downloaded and installed: mysql-5.1.37-osx10.5-x86_64.dmg. I have been able to assert that this ...

applescript title nowrap?

Is it possible to set a "nowrap" on a title of a display box? for example: set selectedSite to (choose from list MySites with prompt "Which site would you like to use:" with title AppTitle without multiple selections allowed) Since the sites listed in that box are rather small, the title of the box wraps, is there a way to prevent...

What is the correct way to set ANT_OPS in OS X?

I'm running into 'Error: Java heap space, java.lang.OutOfMemoryError: Java heap space' when compiling an existing project on OS X (Snow Leopard). I am using the default Java 1.6 64-bit SDK, and default install of Ant (both are provided as part of the OS). I have encountered this issue in other OS environments and normally solve it by...

Legality of Modifying OS x INstaller File (Distribution)

The program I would like to make is to modify one of the OS X Installer files, specifically the file "Distribution" which defines in the OS x Installer what packages are to be listed in the Custom dialog and some other variables in the installer, is this legal to modify and put an in application and can this be legally hosted in say Goog...

What does it mean when AuthorizationExecuteWithPrivileges() returns -1?

I have an uninstaller that calls AuthorizationExecuteWithPrivileges to run some tools that perform cleanup. On OS X 10.6 everything is fine. On 10.5 I'm getting -1 as the return value. The documentation doesn't cover what this means. Can anyone shed some light? ...

Proper way to make a fat binary prefer to be 32bit on 64bit OS X 10.6?

Suppose I ask the user "do you want to run in 32bit mode or 64bit mode" and they pick 32bit. How do I register this fact with the operating system? I've looked at the arch command, but I don't want to have to write a script that wraps the binary. I suspect there is a plist-y way to do this, but I can't find documentation (other than a...