osx

How to insert a LC_LOAD_DYLIB command into a Mach-O binary (OSX)

I'm looking to patch a piece of abandonware with some code. The software is carbon based, so I can not use an InputManager (at least, I do not think I can). My idea was to add a dylib reference to the mach-o header, and launch a new thread when the initialization routine is called. I have mucked around with the mach-o header using a he...

Is there anything like Winsplit Revolution for Mac OS X?

Is there anything like Winsplit Revolution for Mac OS X? ...

How do I collect key input in a video-game style Cocoa app?

I'm hacking on a simple Cocoa app to make blocks move around the screen like a video game. I need to detect key presses, but I'm not going to have text entry fields like a dialog box would have. How do I get key presses without text controls? In particular, I need to get arrow keys. ...

How to programmatically generate a PDF from any document on OSX?

I'm working on a project for OSX where the user can pick a collection of documents (from any application) which I need to generate PDF's from. The standard Macintosh Print dialog has a PDF button which has a number of PDF-related commands including "Save as PDF...". However, I need to generate the PDF file without requiring user interac...

Mysterious Mongrel Rails crash

Running Mongrel 1.1.5 on Rails 2.1.2 using PostgreSQL 8.3 via ruby-pg 0.7.9 on OS X 10.4 server... Added restful_authentication and exception_notification, the latter of which appears to be doing me no good when Mongrel simply dies with "Illegal instruction" every time I select /RESOURCE_NAME/new. Doesn't matter what resource. In deve...

Mac OS X under VMware on Ubuntu on a Macbook Pro

Duplicate of http://stackoverflow.com/questions/39159/is-it-possible-to-run-osx-in-a-virtual-machine I'm looking to install Ubuntu as the main OS on my Macbook Pro. However, I'd like to still access OS X without rebooting. I know it's possible to have OS X be the host OS and run Ubuntu inside it. However, is the opposite possible? Can I...

OpenGL include directives on OS X

I am a bit confused why this code compiles. I leave out the "necessary" #include <OpenGL/gl.h> and still the program can compile. How is this possible when my program is calling functions from the GL library, without including them. int main(int argc, char** argv) { glClearColor(1.0,1.0,1.0,1.0); return 0; } I use this comp...

Java applet/Firefox incompatibility problem

I've written a Java applet. A user reports that he tried to run it in Firefox 3.0.3 on OS X 10.5.5 but no go. It wants him to download a plug-in, but when he tells it to install missing plug-ins it can't find the appropriate installer... What is going wrong here? ...

Eclipse: Add Command-Line Args to an OS X .app Directory

Is it possible to add custom command-line arguments to an Eclipse .app folder? In my particular case, I'm working with ZendStudio. I'm assuming the base Eclipse release would behave the same way. I've found what looks like two different places that could work, but neither yield any results: ZendStudio.app\Contents\info.plist ZendStudio...

Controlling the mouse from Python in OS X

What would be the easiest way to move the mouse around (and possibly click) using python on OS X? This is just for rapid prototyping, it doesn't have to be elegant. Thanks! ...

Executing Shell Scripts from the OS X Dock?

I'm sure the answer is ridiculously obvious, but so far Google hasn't been very helpful. How do I set up a shell script to execute from the dock? It seems that simply creating a shortcut will open the file in my editor. Is there a flag I need to set somewhere to tell it to run instead of opening it for editing? ...

Can I override loginwindow on Tiger?

My software authorizes the user prior to booting Mac OS X (Tiger and Leopard.) I want to use SFAuthorizationPluginView to create a plugin to attempt to use our pre-boot authorization (cached securely) for user login to Mac OS X for single-sign-on capability. I have not yet validated if that will even work for Leopard, but am assuming I...

How to build native Mac OS X installer (on a non-Mac platform)?

How can I build a native Mac OS X installer for my application, on a non-Mac platform? For example, I have a windows pc and a Java application. I want the windows pc to build an installer (possibly inside a .dmg archive) that works with Apple installer. ...

Problem with applet loading on Mac OS x 10.4

Hello, I have been working on web application which includes java applet. My app is working fine on PC with different browsers like IE and Firefox. The web application hosted on Linux (Ubuntu). I had problem on Mac with Firefox. I was unable to load the applet. This is the error i found in java console. Java.lang.classNotFoundException...

How to build a dmg Mac OS X file (on a non-Mac platform)?

Is it possible to build a .dmg file (for distributing apps) from a non-Mac platform? And if yes, how? ...

SSH hangs on Mac Book Pro; AFS and Network Preferences?

I am having an issue with SSH hanging on my Mac Book Pro. This only happens to me once I get home from work after I have used SSH while at work. The three factors I have narrowed the issue down to are SSH, our work AFS network drive and the method of network connectivity. At work we use an AFS drive with Kerberos Authentication to do al...

Xcode regions

Does Xcode support anything akin to Visual Studio style #region directives for arbitrary code folding? ...

Getting the current stack trace on Mac OS X

I'm trying to work out how to store and then print the current stack in my C++ apps on Mac OS X. The main problem seems to be getting dladdr to return the right symbol when given an address inside the main executable. I suspect that the issue is actually a compile option, but I'm not sure. I have tried the backtrace code from Darwin/Leo...

How do I get sendmail to work reliably on a Mac OS 10.5?

I need to use sendmail from Macs in an office. At the moment, I can get it to work on the two development Macs (which I think is due to MAMP being installed and working), but getting it to go on the others seems to be a problem... I assume it's down to some config issue, and hope there's someway to fix it (without resorting to installin...

Changing font tracking in Cocoa

I'm doing some text rendering in Cocoa using NSAttributedString, and setting the font and underline properties and all that jazz. However, I can't figure out how I can change the text's tracking. Any suggestions? ...