Page 1 of 7

DEPRECATED ... install MegaTunix on OS-X

Posted: Fri Feb 09, 2007 4:16 pm
by djandruczyk
This is a replacement for my previous HOWTO for installing MegaTunix on OS-X using Fink. Fink has several major problems, it's biggest being that it's stagnant and packages are way behind. This howto will use darwinports which is MUCH easier..

Goal: To get the latest version of megatunix installed with minimal fuss.

Prorequisites:
- OS-X box (Only Tested on PPC 10.4 (Tiger) on a G4 mini) but should work on Intel Macs as of 10.4 as darwinports has a universal binary)
- Xcode 2.4 (free download from apple) http://developer.apple.com/tools/xcode/
- Apple's X11 (it's on your OS-X install DVD, MAKE SURE YOU INSTALL IT)

Download darwinports from http://svn.macosforge.org/repository/ma ... 1-10.4.dmg and install it.

Open a Terminal (Mac HD -> Applications->Utilities ->Terminal. Drag that to the dock as you'll need it later)

Run:

Code: Select all

sudo port -d selfupdate
sudo port install gtkglext libglade2
Go to bed, go out, have a party, go work on your MS'd vehicle and leave this running till it finishes. (can take anywhere from an hour to 6 hours or more depending on the speed of your system)

Now, download the megatunix from http://sourceforge.net/project/showfile ... _id=128471 and save it to your home directory.
Open a terminal
run:

Code: Select all

tar xvzf megatunix-<TAB>
cd megatunix-<TAB>
./configure --prefix=/opt/local
make
sudo make install
Startup X11. (This is stored in Macintosh HD->Applications->Utilities) I drag this to the Dock, the same with terminal.

In the Xterm that pops up, run:
"megatunix", "gaugedesigner" or "dashdesigner", and enjoy them in full anti-aliased goodness...

Posted: Wed Mar 14, 2007 7:47 am
by krwright
There's a couple of updates and corrections you might want to make.
DarwinPorts has been renamed to MacPorts, adn is now located at http://www.macports.org/
Current version (1.3.2) is still called DarwinPorts, but there is a release candidate for MacPorts 1.4.1.
Also, my downloaded Megatunix .tar file didn't want to un-tar via the command line, so I just double-clicked it to expand.
The downloaded file and the folder it expanded to also had the version number appended to the "megatunix", so that had to be added to the command line to build the makefile.
BTW, current version of the XCode Tools is 2.4.1, but the web link is still the same.

It would be nice, but not absolutely necessary, if you could describe exactly what's happening for each of the steps/commands. I pretty much know what's going on, but *nix newbs probably have no idea. nothing wrong with the "type this" approach, but some commentary might help with understanding and troubleshooting. :)

All in all, I found this *very* useful, as it's been a *long* time since I built apps on UNIX.
Thanks!

Posted: Wed Mar 14, 2007 7:54 am
by djandruczyk
krwright wrote:There's a couple of updates and corrections you might want to make.
DarwinPorts has been renamed to MacPorts, adn is now located at http://www.macports.org/
Current version (1.3.2) is still called DarwinPorts, but there is a release candidate for MacPorts 1.4.1.
Also, my downloaded Megatunix .tar file didn't want to un-tar via the command line, so I just double-clicked it to expand.
The downloaded file and the folder it expanded to also had the version number appended to the "megatunix", so that had to be added to the command line to build the makefile.
BTW, current version of the XCode Tools is 2.4.1, but the web link is still the same.

It would be nice, but not absolutely necessary, if you could describe exactly what's happening for each of the steps/commands. I pretty much know what's going on, but *nix newbs probably have no idea. nothing wrong with the "type this" approach, but some commentary might help with understanding and troubleshooting. :)

All in all, I found this *very* useful, as it's been a *long* time since I built apps on UNIX.
Thanks!
At the time i wrote the howto, darwinports was still darwinports, and if you check the instructions, and followed them hitting TAB when the instructions say "<TAB>" will use the shell's tabkey completion and FILL IN the rest of the filename for you, thus making it essentially version independant.

I'll have to wipe my mac and retest with the current version and update the docs as necessary

Posted: Wed Mar 14, 2007 8:01 am
by krwright
One other thing: I was unable to run the apps from the X11 terminal command line for some reason, even after cd /opt/local/bin, but simply navigating there in the Finder and double-clicking on the app worked! I put shortcuts to the three Megatunix apps in a quick access folder on my Dock, and that works beautifully.

Posted: Wed Mar 14, 2007 8:06 am
by djandruczyk
krwright wrote:One other thing: I was unable to run the apps from the X11 terminal command line for some reason, even after cd /opt/local/bin, but simply navigating there in the Finder and double-clicking on the app worked! I put shortcuts to the three Megatunix apps in a quick access folder on my Dock, and that works beautifully.

What happened when you ran them from the Xterm ?
i.e. /opt/local/bin/megatunix responded with what??

Posted: Wed Mar 14, 2007 8:09 am
by krwright
djandruczyk wrote:
krwright wrote:There's a couple of updates and corrections you might want to make.
DarwinPorts has been renamed to MacPorts, adn is now located at http://www.macports.org/
Current version (1.3.2) is still called DarwinPorts, but there is a release candidate for MacPorts 1.4.1.
Also, my downloaded Megatunix .tar file didn't want to un-tar via the command line, so I just double-clicked it to expand.
The downloaded file and the folder it expanded to also had the version number appended to the "megatunix", so that had to be added to the command line to build the makefile.
BTW, current version of the XCode Tools is 2.4.1, but the web link is still the same.

It would be nice, but not absolutely necessary, if you could describe exactly what's happening for each of the steps/commands. I pretty much know what's going on, but *nix newbs probably have no idea. nothing wrong with the "type this" approach, but some commentary might help with understanding and troubleshooting. :)

All in all, I found this *very* useful, as it's been a *long* time since I built apps on UNIX.
Thanks!
At the time i wrote the howto, darwinports was still darwinports, and if you check the instructions, and followed them hitting TAB when the instructions say "<TAB>" will use the shell's tabkey completion and FILL IN the rest of the filename for you, thus making it essentially version independant.

I'll have to wipe my mac and retest with the current version and update the docs as necessary
Ah, *that's* what the <TAB> bit meant. I was being thick, and didn't even think of that...

Posted: Wed Mar 14, 2007 8:11 am
by krwright
djandruczyk wrote:
krwright wrote:One other thing: I was unable to run the apps from the X11 terminal command line for some reason, even after cd /opt/local/bin, but simply navigating there in the Finder and double-clicking on the app worked! I put shortcuts to the three Megatunix apps in a quick access folder on my Dock, and that works beautifully.

What happened when you ran them from the Xterm ?
i.e. /opt/local/bin/megatunix responded with what??

Code: Select all

Kevin-Wrights-PowerBook:~ kevin$ megatunix
bash: megatunix: command not found
Kevin-Wrights-PowerBook:~ kevin$ cd /opt/local/bin
Kevin-Wrights-PowerBook:/opt/local/bin kevin$ megatunix
bash: megatunix: command not found
Kevin-Wrights-PowerBook:/opt/local/bin kevin$

Posted: Wed Mar 14, 2007 8:39 am
by djandruczyk
krwright wrote:
djandruczyk wrote:
krwright wrote:One other thing: I was unable to run the apps from the X11 terminal command line for some reason, even after cd /opt/local/bin, but simply navigating there in the Finder and double-clicking on the app worked! I put shortcuts to the three Megatunix apps in a quick access folder on my Dock, and that works beautifully.

What happened when you ran them from the Xterm ?
i.e. /opt/local/bin/megatunix responded with what??

Code: Select all

Kevin-Wrights-PowerBook:~ kevin$ megatunix
bash: megatunix: command not found
Kevin-Wrights-PowerBook:~ kevin$ cd /opt/local/bin
Kevin-Wrights-PowerBook:/opt/local/bin kevin$ megatunix
bash: megatunix: command not found
Kevin-Wrights-PowerBook:/opt/local/bin kevin$

You are failing to understand how the PATH is setup in unix environments. By default the CWD (Current Working Directory or "." as it's known) is NOT in the path, historically for security reasosn, hence if you want to run something in the current dir and your current dir is NOT in the path, you run "./<PROGNAME>", i.e. ./megatunix from within the /opt/local/bin directory

so you can run:
/opt/local/bin/megatunix
cd /opt/local/bin ; ./megatunix

run "echo $PATH" to see what your default path is.

It's typically set in a small hidden text file in your home directory. (typically called, either .profile, .bashrc, or ,bash_profile)

try editing that file and noting the current syntax, and adding in /opt/local/bin, and then logging out and in and noting that you can now run "megatunix" from any path and it'll start and run.

Posted: Wed Mar 14, 2007 10:24 am
by krwright
djandruczyk wrote: You are failing to understand how the PATH is setup in unix environments. By default the CWD (Current Working Directory or "." as it's known) is NOT in the path, historically for security reasosn, hence if you want to run something in the current dir and your current dir is NOT in the path, you run "./<PROGNAME>", i.e. ./megatunix from within the /opt/local/bin directory

so you can run:
/opt/local/bin/megatunix
cd /opt/local/bin ; ./megatunix

run "echo $PATH" to see what your default path is.

It's typically set in a small hidden text file in your home directory. (typically called, either .profile, .bashrc, or ,bash_profile)

try editing that file and noting the current syntax, and adding in /opt/local/bin, and then logging out and in and noting that you can now run "megatunix" from any path and it'll start and run.
Well, in my defense, that bit wasn't in the step-by-step. I thought it might have something to do with the path, but it worked via Finder, so I wasn't terribly concerned. Remember, OS X user != *nix user necessarily. I happen to have a little experience with UNIX (very little, and long ago) so it doesn't scare me, but most Mac users fear and loathe the command line... :)

Posted: Wed Mar 14, 2007 1:08 pm
by djandruczyk
krwright wrote:
djandruczyk wrote: You are failing to understand how the PATH is setup in unix environments. By default the CWD (Current Working Directory or "." as it's known) is NOT in the path, historically for security reasosn, hence if you want to run something in the current dir and your current dir is NOT in the path, you run "./<PROGNAME>", i.e. ./megatunix from within the /opt/local/bin directory

so you can run:
/opt/local/bin/megatunix
cd /opt/local/bin ; ./megatunix

run "echo $PATH" to see what your default path is.

It's typically set in a small hidden text file in your home directory. (typically called, either .profile, .bashrc, or ,bash_profile)

try editing that file and noting the current syntax, and adding in /opt/local/bin, and then logging out and in and noting that you can now run "megatunix" from any path and it'll start and run.
Well, in my defense, that bit wasn't in the step-by-step. I thought it might have something to do with the path, but it worked via Finder, so I wasn't terribly concerned. Remember, OS X user != *nix user necessarily. I happen to have a little experience with UNIX (very little, and long ago) so it doesn't scare me, but most Mac users fear and loathe the command line... :)

IF you had installed the darwinports version as described in the howto, it sets your path accordingly.

<EDIT>
NOTE: for now I'm sticking with darwinports as macports DOES NOT have the nice friendly gui installer (i.e. for those afraid of command line stuff), and the darwinports method WORKS very nicely. Going to macports would make it FAR more difficult for the end user like the former Fink method.

Posted: Wed Mar 14, 2007 2:45 pm
by krwright
I did note the lake of a binary for Macports (and for Darwinports 1.3.2, for that matter.) I did install it the way you suggested above. Here's the weird thing - the path is OK in Terminal, but it's wrong in XTerm. Perhaps I need to log out/in. At any rate, the apps themselves work fine. I even added Megatunix to X11's Apps menu, using the absolute path. Works for me.
Again, thanks for the write up, and the conversation. Now to see about getting a serial adapter working... :)

Posted: Wed Mar 14, 2007 2:58 pm
by djandruczyk
krwright wrote:I did note the lake of a binary for Macports (and for Darwinports 1.3.2, for that matter.) I did install it the way you suggested above. Here's the weird thing - the path is OK in Terminal, but it's wrong in XTerm. Perhaps I need to log out/in. At any rate, the apps themselves work fine. I even added Megatunix to X11's Apps menu, using the absolute path. Works for me.
Again, thanks for the write up, and the conversation. Now to see about getting a serial adapter working... :)
I used to have docs on usb to serial but here's a quick method..

Take your mac, WITHOUT the adapter plugged in
Open a terminal and run
run "ls -1 /dev >before"
Plug in the device, wait 10 seconds
run "ls -1 /dev >after"

run "diff before after"
diff should have been installed when you installed xcode.

The output should list the names of the new devices that showed up after plugging it in, typical names should contain either /dev/tty* or /dev/cua* in them.. try them each in turn in megatunix, make sure to hit ENTER to commit the new name in megatunix.

Posted: Wed Mar 14, 2007 8:20 pm
by krwright
djandruczyk wrote: I used to have docs on usb to serial but here's a quick method..

Take your mac, WITHOUT the adapter plugged in
Open a terminal and run
run "ls -1 /dev >before"
Plug in the device, wait 10 seconds
run "ls -1 /dev >after"

run "diff before after"
diff should have been installed when you installed xcode.

The output should list the names of the new devices that showed up after plugging it in, typical names should contain either /dev/tty* or /dev/cua* in them.. try them each in turn in megatunix, make sure to hit ENTER to commit the new name in megatunix.
Hoo-rah!
That worked nicely, once I downloaded and installed an updated version of the Prolific USB-serial driver. The one I had was from OS X 10.2 or so.
Thanks!

Posted: Wed May 02, 2007 9:06 pm
by cjernigan
Hey thanks for the great writeup. I've gone through the process, but I installed Macports instead before doing so. Now I'm having trouble getting Megatunix to come up in X11. What path or commands should I be entering in X11 to get this to come up and did I screw up getting macports instead?
Thanks for you help.

Edit: I removed Macports and will do it Exactly how you described doing so with darwinports of the correct version for 10.4. I'll let you know how it goes. Thanks

Posted: Thu May 03, 2007 9:46 am
by djandruczyk
cjernigan wrote:Hey thanks for the great writeup. I've gone through the process, but I installed Macports instead before doing so. Now I'm having trouble getting Megatunix to come up in X11. What path or commands should I be entering in X11 to get this to come up and did I screw up getting macports instead?
Thanks for you help.

Edit: I removed Macports and will do it Exactly how you described doing so with darwinports of the correct version for 10.4. I'll let you know how it goes. Thanks

Typically what I do. is startup X11, which gives you an Xterm, then run "/opt/local/bin/megatunix"

Posted: Fri May 04, 2007 1:38 pm
by krwright
That's what I do myself. In fact, I added to the "Applications" menu in X11 with exactly that path. Do the same for gaugedesigner, except substituting gaugedesigner for megatunix as the executable.

Posted: Wed May 09, 2007 4:04 pm
by cscm094
Anyone care to shine some light on this subject?

Code: Select all

checking for GTK... configure: error: Package requirements (gtk+-2.0 >= 2.4.0 gthread-2.0) were not met:

Package gobject-2.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `gobject-2.0.pc'
to the PKG_CONFIG_PATH environment variable
Package 'gobject-2.0', required by 'GdkPixbuf', not found

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables GTK_CFLAGS
and GTK_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
Any help is appriciated! Thanks,

Chris

Posted: Thu May 10, 2007 6:39 am
by djandruczyk
cscm094 wrote:Anyone care to shine some light on this subject?

Code: Select all

checking for GTK... configure: error: Package requirements (gtk+-2.0 >= 2.4.0 gthread-2.0) were not met:

Package gobject-2.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `gobject-2.0.pc'
to the PKG_CONFIG_PATH environment variable
Package 'gobject-2.0', required by 'GdkPixbuf', not found

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables GTK_CFLAGS
and GTK_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
Any help is appriciated! Thanks,

Chris
Go back to the top and start from the beginning. You evidently missed the part about installing the GTK+ packages

Code: Select all

sudo port -d selfupdate 
sudo port install gtkglext libglade2

Posted: Thu May 10, 2007 12:12 pm
by cscm094
Hmm I've tried that about 7 times now. :( My mac hates me!

Posted: Fri May 11, 2007 7:18 am
by djandruczyk
cscm094 wrote:Hmm I've tried that about 7 times now. :( My mac hates me!

Did you DEVIATE AT ALL from the original howto? numerous others have followed it with no issue, which indicates you either deviated, used a different version of something, or had pre-existing things setup on your box that is causing the problem (i..e manually set environment variables).