r261@gwythaint (orig r801): fugalh | 2006-08-12 15:55:04 -0600
[ardour.git] / tools / osx_packaging / app_build.rb
1 #!/usr/bin/ruby
2
3 # Ruby script for pulling together a MacOSX app bundle.
4
5 if File.exist?("lib") then
6     Dir.foreach("lib") {|x| unless x[0] == 46 then File.delete("lib/"+x) end}
7 else
8     Dir.mkdir "lib"
9 end
10
11 result = `otool -L ../../gtk2_ardour/ardour.bin`
12 results = result.split("\n")
13 results.delete_at(0)
14 results.each do |s|
15     s = s.split[0]
16     # exclude frameworks, system libraries, X11 libraries, and libjack.
17     unless s =~ /System|\/usr\/lib|\/usr\/X11R6|libjack/ then
18         `cp #{s} lib`
19     end
20 end
21
22 `/usr/local/bin/platypus -a 'Ardour2' -t 'Shell' -o 'None' -u 'Paul Davis' -i '/bin/sh' -V '1.0' -s 'ArDr' -I 'org.ardour.Ardour2' -f 'bin' -f 'lib' -f 'Ardour2.icns' -f 'MenuBar.nib' -f 'ProgressWindow.nib' -f 'init' -f 'openDoc' 'script' 'Ardour2.app'`