Whitespace fixes in gtk2_ardour/ardour_ui.cc
[ardour.git] / tools / osx_packaging / app_build.rb
index c81225024b52757c90e83133f28061856af30d1a..48d3837368089f6eff253f1a077466bf94469d29 100755 (executable)
@@ -3,7 +3,7 @@
 # Ruby script for pulling together a MacOSX app bundle.
 
 # it will be either powerpc or i386
-versionline = `grep -m 1 '^version =' ../../SConstruct`
+versionline = `grep -m 1 '^ardour_version =' ../../SConstruct`
 version = versionline.split(" = ")[1].chomp().slice(1..-2)
 $stdout.printf("Version is %s\n", version)
 
@@ -57,7 +57,7 @@ end
 odir = Dir.getwd
 Dir.chdir("../..")
 
-result = `otool -L gtk2_ardour/ardour.bin`
+result = `otool -L gtk2_ardour/ardour-#{version}`
 results = result.split("\n")
 results.delete_at(0)
 
@@ -101,15 +101,17 @@ end
 
 Dir.chdir(odir)
 
-# copy ardour.bin to bindir/ardour
-$stdout.print("Copying bin to #{bindir} ...\n");
+# copy ardour binary to bindir/ardour
 
-if File.exist?("../../gtk2_ardour/ardour.bin") then
-   `cp ../../gtk2_ardour/ardour.bin #{bindir}/ardour`
+
+if File.exist?("../../gtk2_ardour/ardour-#{version}") then
+   $stdout.print("Copying bin to #{bindir} ...\n");
+   `cp ../../gtk2_ardour/ardour-#{version} #{bindir}/ardour`
 end
 
 `cp ../../libs/surfaces/*/*.dylib #{libdir}/surfaces`
 # remove the basenames from libdir that are in surfaces (copied earlier)
+`rm -f #{libdir}/surfaces/libardour_cp.dylib`
 begin
   Dir.foreach(libdir+"/surfaces") {|x| unless ( x[0] == 46 or x.include?("libardour_cp")) then File.delete(libdir + "/" +x) end}
 rescue
@@ -174,6 +176,7 @@ end
 if File.exist?(ppc_libdir) and File.exist?(i386_libdir) then
   $stdout.print("\nBoth platforms in place, lipo'ing...\n");
   `rm -rf lib/*`
+  `rm -f bin/ardour`
   lipo_platforms_recurse(ppc_libdir, i386_libdir, "lib")
   lipo_platforms_recurse(i386_libdir, ppc_libdir, "lib")
   lipo_platforms_recurse(i386_bindir+'/ardour', ppc_bindir+'/ardour', "bin/ardour")