Archive

Archive for December, 2008

OS X development resources?

December 31st, 2008 No comments

Here’s an interesting collection of online Objective C/Cocoa tutorials. Can anyone suggest other online resources? I don’t have a good record of reading dead-tree instructional materials :-/

Update: here is a free ebook on OS X development.  I just pre-ordered this (the first edition has great reviews)
Programming in Objective-C 2.0 (2nd Edition) (Developer’s Library)

Categories: development Tags: , ,

OS X + Eclipse + Mono Tutorial

December 31st, 2008 No comments

Here is an interesting tutorial for developing .Net apps in OS X using the Eclipse IDE. The XCode equivalent is CSharpPlugin. If a native IDE isn’t important to you, running Visual Studio via VMware works just fine too.

Update: from IBM: Migrate .NET applications from Visual Studio to Eclipse: The Emonic plug-in and NAnt give .NET and C# capability to Eclipse

Categories: Uncategorized Tags: ,

Why no Paint?

December 16th, 2008 No comments

macpaintWhy is there no basic paint application in OS X? Sure, there are dozens of free applications that do the same thing, but it seems like a useful thing to have for users who don’t need anything more complex.  After all, a drawing application was the first application created for the Macintosh, before even the operating system.  I’m sure there is a philosophical or marketing reason behind it, but I can’t think of any.

Most adult Windows users who use Microsoft’s Paint actually use it to save screen shots, which is easier in OS X with Preview’s “Grab” menu or keyboard shortcuts.

Categories: Uncategorized Tags:

Running you first .Net app on OS X

December 16th, 2008 1 comment

Installing Mono will allow you to run .Net applications in OS X – as long as they are 100% .Net and do not use any native Windows API’s. However, if you try to simply double-click on a .Net exe, OS X will not know what to do with it, or if you have VMware or wine installed, try to open that executable in another application.

To open a .Net exe with mono, you must open a terminal window, switch to the application directory, and type “mono Application.exe.” If you get an error stating something like “System.DllNotFoundException: gdiplus.dll” it’s probably because your application uses System.Windows.Forms, which must run under X11.  To test X11, install the latest version and run the app again from the X11 terminal.  Did it work? Great!

You probably don’t want to open X11 and type a command in terminal every time you want to run a .Net application, so you can make a script to do it for you.  Open ScriptEditor (/Applications/Utilities/AppleScript/) and create a new script.  Type something like:

do shell script "mono /Users/YOU/Downloads/YourApplication.exe"

Save the script as an Application and you’re done!  Now you can run it just like any native OS X app.  You can try it with SharpChess – just download the exe version.  I was able to download the source of SharpChess, compile it with MonoDevelop on OS X and ran the exe I made on both Mono/OS X and Microsoft .Net/Windows.  Unfortunately, Mono’s implementation of WinForms does not use the native Cocoa API, so it doesn’t look very good – I’ll work on that later.

Categories: tutorials Tags: , ,

Build .Net apps in OSX in one click with MonoMate

December 6th, 2008 No comments


MonoMate from Julius Eckert on Vimeo.
More.

I haven’t tried MonoMate yet, but I’ve been playing with Monobjc (used by MonoMate), which allows me to write and compile code in Visual Studio 2008, and then build native apps in OSX.

Categories: development Tags: ,

Customizing Terminal when compiling Mono apps

December 2nd, 2008 1 comment

Pkg-config is a helper tool used when compiling applications and libraries.  If you want to build Mono apps from source using configuration scripts, you will need to put the Mono.pc path in your PKG_CONFIG_PATH environment variable.  If it’s not set, you will get an error like “configure: error: missing the mono.pc file, usually found in the mono-devel package” or “Failed to initialize the ‘Mono 3.5 Profile’ (mono-3.5) target framework”

Here’s how to customize your terminal prompt.   To add the location of mono.pc, edit .profile or .bashrc in the root of your home folder, and add this line

export PKG_CONFIG_PATH=/Library/Frameworks/Mono.framework/Versions/Current/lib/pkgconfig/"

Here is my full .profile file:

export PATH=/Applications/Windows/Darwine/Wine.bundle/Contents/bin:/opt/local/bin:/opt/local/sbin:$PATH
export PKG_CONFIG_PATH=/Library/Frameworks/Mono.framework/Versions/Current/lib/pkgconfig/
export DISPLAY=:0.0

(When using MacPorts, the path is /opt/local/lib/pkgconfig/)

Categories: tutorials Tags: , , ,