Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > Porting UNIX apps --> where to start ?

Porting UNIX apps --> where to start ?
Thread Tools
Junior Member
Join Date: Feb 2001
Location: Montreal, Canada
Status: Offline
Reply With Quote
Mar 11, 2001, 08:59 AM
 
I use a lot of CLI UNIX apps at my research lab, and I was hoping to port some of these tools to OS X. I'm not much of a programmer, althought I have followed some computer programming courses.

Can somebody point me to useful litterature to port UNIX CLI apps ?

Oh yeah, there's also 1 or 2 X-Window apps too, but I guess that would be too hard...

Thanks !
General Surgery Resident @ Université de Montréal
Former Apple Campus Marketing Rep
     
Senior User
Join Date: Feb 2001
Location: Rochester, uk
Status: Offline
Reply With Quote
Mar 11, 2001, 07:29 PM
 
If you have the source code to these tools, and they just use plain C or similar, then porting them should be extremely simple. Pull up a terminal and compile them in the same way you would in any other unix, except for a few annoying changes - for example, gcc has become cc, etc. On occasion, you may need to fiddle with makefiles to get it to work.

If you haven't yet tried to compile them under unix, then learn how to do that on the ideal environment before playing around with all the subtle changes in OS X.

As with all sorts of things both under and above the hood, this is likly to change in two weeks (bites nails), so if you run into any trouble leave it on the bench and try again with X.0

As for windows apps, there will be such a thing as Virtual PC.

All words are lies. Including these ones.
     
Fresh-Faced Recruit
Join Date: Feb 2001
Location: Tokyo, Japan
Status: Offline
Reply With Quote
Mar 11, 2001, 07:59 PM
 
As for windows apps, there will be such a thing as Virtual PC.
I think he (she?) was referring to X-Windows not MS-Windows...

coconut wrote:
Oh yeah, there's also 1 or 2 X-Window apps too, but I guess that would be too hard...
Look at this page http://mrcla.com/XonX/ and judge yourself if it works for you.

But, as sadie mentioned, I think you should wait until "Real Thing (TM)" comes out as things will drastically, if not completely, change from the beta to the released.

[This message has been edited by tea4u (edited 03-11-2001).]
     
coconut  (op)
Junior Member
Join Date: Feb 2001
Location: Montreal, Canada
Status: Offline
Reply With Quote
Mar 11, 2001, 09:50 PM
 
Yes, I was referring to an X-Window app. I know how to compile UNIX source, but I was asking myself if some complicated stuff had to be done to the source code, especially if apps make use of features like accessing databases over the Internet or the local Intranet.

When I take a look at places like the GUN-darwin page at sourceforge.net, plenty of people are posting binaries, so I guess that it isn't that easy if people are getting some recognition for porting apps.

And i also heard that porting GIMP was a pain in the ass, so I guess my DNA sequence assembly progs won't be that easy neither.
General Surgery Resident @ Université de Montréal
Former Apple Campus Marketing Rep
     
tie
Professional Poster
Join Date: Feb 2001
Status: Offline
Reply With Quote
Mar 16, 2001, 12:04 AM
 
I think the difficulty of porting is highly dependent on the program. It is definitely worth trying because it could be very easy. I didn't think there was any difference between networking code (sockets, etc) but I could be wrong.
The 4 o'clock train will be a bus.
It will depart at 20 minutes to 5.
     
Junior Member
Join Date: Mar 2001
Status: Offline
Reply With Quote
Mar 16, 2001, 12:26 AM
 
I've compiled several Unix apps...mySQL, PHP4, Apache, ProFTP. I've had to make some minimal changes to the source code for ProFTP and mySQL. The others ones compiled without any problems.

A neat way to give a GUI to a Unix CLI app on Mac OS X is to use the NSPipe Foundation class in Cocoa. I haven't tried it yet myself, but I imagine it would be a very simple, easy way of getting a GUI for a CLI app.

-Peter
     
Fresh-Faced Recruit
Join Date: Oct 2000
Status: Offline
Reply With Quote
Mar 16, 2001, 03:59 AM
 
I've found that most programs are easy to port e.g. Nedit (including LessTif for XTools) and science stuff like Scilab (Matlab clone, didn't get graphics to work properly). Still, my advice would be to wait for the tools released with OS X v1.0 since there will be big differences (in a positive way) compared to PB Tools.
/P
     
Fresh-Faced Recruit
Join Date: Mar 2001
Status: Offline
Reply With Quote
Mar 16, 2001, 11:34 AM
 
Have a look at O'Reilly's "Porting UNIX Software". There's nothing in there for OSX, I'm sure, but a lot of points are valid here too. http://www.oreilly.com/catalog/port/

cu
Lars

     
Mac Elite
Join Date: Oct 2000
Location: Seattle
Status: Offline
Reply With Quote
Mar 20, 2001, 01:15 AM
 
Originally posted by Wixar:

A neat way to give a GUI to a Unix CLI app on Mac OS X is to use the NSPipe Foundation class in Cocoa. I haven't tried it yet myself, but I imagine it would be a very simple, easy way of getting a GUI for a CLI app.

-Peter
I did just that for apachectl, it was pretty easy:

here's the source

http://miltonshole.thespacemonkey.co...hecontrol.html
You can take the dude out of So Cal, but you can't take the dude outta the dude, dude!
     
Addicted to MacNN
Join Date: Aug 2000
Location: Retired
Status: Offline
Reply With Quote
Mar 25, 2001, 10:24 AM
 
I am trying to get the Gimp to work on Mac OS X Final. I have Tenon's latest X Tools and I must say its a big pain in the you-know-where. Anybody have any suggestions?
Power Macintosh Dual G4
SGI Indigo2 6.5.21f
     
Addicted to MacNN
Join Date: Mar 2000
Location: London, UK
Status: Offline
Reply With Quote
Mar 25, 2001, 02:09 PM
 
See this thread, scroll down and read my post about porting apps. The easiest thing for you is to just install fink.
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 09:53 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2