Hydrogen Forum > Hydrogen on Mac OS X > PPC Mac build with Jack works

Josh24
Member
6 posts

09:21 GMT
10 October 2009
 PPC Mac build with Jack works
In case anyone cares, the latest SVN compiles on a PPC with Jack enabled. Transport sync with Ardour works great!

One question though, in hydrogen.conf, what should the <jack_port_name_1>??</jack_port_name_1> be for CoreAudio?
The default is alsa_pcm:playback_1 and that doesn't cut it obviously, right now Jack has to be running first for Hydro to use it, and that's if Jack is already selected as the driver at load time.

By the way, scons doesn't build an app bundle worth a damn, you have to make your own.

Also, midi in works too, but although I can hear the keyboard I can't figure out how to record the input.
Thanks for fixing the pixmap values that didn't used to load. ---Josh
reply
mauser
Member
544 posts

20:28 GMT
11 October 2009
Hi Josh,

i did some work on the osx side since i'm owning a mac now.
I can't say what the default should be, but i can put it on my todo list :)

No, scons doesn't build an app bundle. I think i'll fix it soon, the problem is that i don't know how to get the library paths which have to be included in the Resources directory. Tried otool so far, but it gave me more libs then necessary. Well, i'm developing on a mac since 10 days or so. Hope i'll find a way to fix this :)
reply
Josh24
Member
6 posts

16:39 GMT
12 October 2009
Hi,
Glad to hear you got a Mac. It looks like you've got two challenges, You have users who just want a stand-alone Hydrogen.app, with all it's non-Apple sys libs (hydrogens dependent libs) embedded in the bundle contents/Frameworks directory. Then, those who build from source, who may want to customize (like with or without Jack or lapsda support), and may want to link to the dependents in /usr/local/lib where they already are anyway. Like me. Both need a app bundle that contains the rest of the resources. Right now, scons builds a locally linked unix executable that sort of half way knows it's on a Mac, for instance, it writes it's preferences (hydrogen.conf) to ~lib/appsupport/hydro but gets confused about where to find everything it needs to load, as if it thinks it's in an app.bundle and searchs for ../resource etc. Usually a binary like that will search right there in the build directory for its deps but oh well. So I put my hydro.exe in the /contents/macos dir of an existing app bundle (actually a hydrogen app someone had posted that didn't work, thus it had the icn and info.plist already) and then had to figure out where to put the rest of the newly built resources (songs,img,docs,etc) relative to the binary.

Otool -L <binary> lists the :install_name and the deps of the binary. The paths in front of the dependent libs are where it expects to find them. So then install_name_tool -id and/or -change <binary> can adjust them to behave. See manpage. The important thing is, for the dylibs that are compiled with a id_name of `/usr/local/lib/'(*.dylib), to change its id to be `@executable_path/../Frameworks/'(*.dylib), it has to have been originally compiled with the -headerpad_max_install_names ld flag because the string is longer. The fixlibs script in your source has the right idea.
Check out the Clam Audio project Network Editor. It builds 2 QT Mac apps properly bundled with scons, although their use of Qt4.py to install the libs doesn't work either, I have to run the binary directly.

Currently,the main window of hydrogen has no titlebar and is not relocatable, althought the resize corner in lower right allows some hor-vert change. The mixer window oddly is normal,movable,w/title and buttons.

I can't figure out where Hydrogen is looking for Ladspa plugins. I've tried putting them in the search paths the Linnux versions use, and declared export LADSPA_PATH=~/Library/Audio/Plug-Ins/LADSPA env var but no luck. That would be a standard Mac location,
/usr/lib/share would be a no-no. It's hard to tell from the source what the install or search path is. Any idea?

Thanks,JK
reply
mauser
Member
544 posts

18:28 GMT
12 October 2009
Hi Josh!

I'm not sure why someone who wants to link hydrogen against other (custom) libraries wants an app bundle at all. I've added a "bundle" option here ( in my local working copy) to scons which takes care of the paths. If you compile with 'scons bundle=0' hydrogen works behaves as it does an linux, so it looks for the data directory in its current directory, not in the ressources dir.

Hm yeah the clam av guys seems to have some nice osx support with scons, i've read some of their comments in the scons wiki. I'll have a look at their when i'm going to do more work on the bundle stuff.

No idea why your hydrogen can't find the ladspa plugins.. have you started it from a terminal? Then hydrogen should throw some log messages concerning the ladspa search directories. Setting the environment variable should work, at least it works on linux and i can't see why that should differ on osx.
reply
Josh24
Member
6 posts

20:29 GMT
12 October 2009
I think I was unclear, not other custom libraries, the bundle need not duplicate existing local libs for local, non portable use of the app.

>>I'm not sure why someone who wants to link hydrogen against other (custom) libraries wants an app bundle at all.

It's nice to have a clickable icon package of the build results that's self contained and can be moved out of the build dir. It keeps the experiments separate.

How did you add the bundle option ? "scons bundle " alone does nothing, no rules for target. I know its an available tool and such, but I've compared so many SConstructs and scripts in various projects I get a scons headache.

I usually start from terminal, as I need to see the Jack initialization as I'm still playing with that, but hydrogen writes nothing at launch time except the copyright and warranty message. I've seen posting of Linnux startup logs, which is what I could use here.

Any idea's about the main window? It's pinned at TL (0,0) on the screen. All the child windows one can call to open are legitimate NSWindow types.

Anyway, thanks, Josh
reply
lt.daN
Member
3 posts

15:18 GMT
18 October 2009
Hi guys. I'm new to the forums. I'm a drummer (for 8 years now), and I've been increasingly interested in electronic music (in specific, drum&bass).

I own an iMac G5 (PPC). I'm trying to get Hydrogen working, but I can't find a PPC build online anywhere, so I'm confused as to which build you guys are referring. Can anyone help me get Hydrogen working?
reply
mauser
Member
544 posts

17:28 GMT
18 October 2009
Hi!

We don't have a recent dmg for PPC at the moment. You can install the program "macports" and XCode to compile hydrogen and the dependencies on your own.

Look here for more details: http://trac.assembla.com/hydrogen/wiki/development%3AcompileOSX
reply
lt.daN
Member
3 posts

19:39 GMT
18 October 2009
I've tried macports already, but unfortunately it needs xcode 3.1 or later, and my computer only has 3.0. I need to give apple personal info to get xcode 3.1, and I'm not doing that.
reply
lt.daN
Member
3 posts

19:39 GMT
18 October 2009
I've tried macports already, but unfortunately it needs xcode 3.1 or later, and my computer only has 3.0. I need to give apple personal info to get xcode 3.1, and I'm not doing that.
reply
mauser
Member
544 posts

20:43 GMT
25 October 2009
@Josh:

Sorry for the soooo late reply.. Just a quick reply for the window-decoration problem: Here on Snow Leopard the title bar has no decoration on startup, but when you click in the main window it gets an decoratoin. Its strange, i can't explain it at the moment :(
reply
joostjodel
Member
85 posts

15:23 GMT
26 November 2009
@Josh24 & mauser:

To create a self-contained app and/or dmg bundle you have to do the following after having built H2 with scons:
(this could very easily be automated after the build by making a simple script)

1) Build with scons:
$ scons alsa=0 coreaudio=1 coremidi=1 flac=1 jack=1 lash=0 libarchive=0 lrdf=0 oss=0 portaudio=0 portmidi=0 bundle=1

2) Create *.app directory structure
$ mkdir Hydrogen.app ; mkdir Hydrogen.app/Contents ; mkdir Hydrogen.app/Contents/MacOS ; mkdir Hydrogen.app/Contents/Resources

3) Copy necessary files into the application bundle
$ cp -R ./data ./Hydrogen.app/Contents/MacOS/ ; cp -R ./plugins ./Hydrogen.app/Contents/Resources/ ; cp ./macos/Hydrogen.icns ./Hydrogen.app/Contents/Resources/ ; cp ./macos/Info.plist ./Hydrogen.app/Contents/

or in case of bundle=1

$ cp -R ./data ./plugins ./Hydrogen.app/Contents/Resources/ ; cp ./macos/Hydrogen.icns ./Hydrogen.app/Contents/Resources/ ; cp ./macos/Info.plist ./Hydrogen.app/Contents/

4) Copy binary into bundle
$ cp hydrogen Hydrogen.app/Contents/MacOS/Hydrogen

5) Build a self-contained *.app bundle
$ macdeployqt Hydrogen.app

6) Rename binary and copy launch script, and make executable
$ mv Hydrogen.app/Contents/MacOS/Hydrogen Hydrogen.app/Contents/MacOS/Hydrogen-bin ; cp macos/hydrogen.sh Hydrogen.app/Contents/MacOS/Hydrogen ; chmod 770 ./Hydrogen.app/Contents/MacOS/Hydrogen

7) Throw away the previous dmg package and run again:
$ rm Hydrogen.dmg ; macdeployqt Hydrogen.app -dmg


You may check whether the dependencies of the executable have been built-in
$ otool -L Hydrogen.app/Contents/MacOS/Hydrogen-bin
reply
jump to:
Generated in 0.088 s
Powered by Pheng 0.14.0 VBB software
[c] 2003-2005 Artemio