Re: [mythtv] Mythjobqueue (including commflag) packaged for MacOS X
Nigel Pearson <[EMAIL PROTECTED]> writes: >>> Well, I've got the backend finding those bundled executables, but now >>> when those executables run, they can't find any of the libraries >>> needed. > ... >>> OK, I see what the problem is. The paths to library dependencies that >>> are embedded in the auxilliary executables never get adjusted with >>> install_name_tool. > > I will try and fix that tonight, Dave. I have a fix. I should have posted before going to bed, but it was already past my bedtime. Hope you didn't waste too much effort on it. My current osx-packager.pl is enclosed. I'm sure you can easily distinguish which changes are relevant to this problem, but in reality there are a few other improvements in there you should consider stealing, like the RecursiveCopy function. Regards, Dave #!/usr/bin/perl ### osx-packager.pl ### Tool for automating frontend builds on Mac OS X. ### Run "osx-packager.pl -man" for full documentation. use strict; use Getopt::Long qw(:config auto_abbrev); use Pod::Usage (); use Cwd (); ### Configuration settings (stuff that might change more often) # We try to auto-locate the Subversion client binaries. # If they are not in your path, you should use the second line. # our $svn = `which svn`; chomp $svn; #our $svn = '/Volumes/Users/nigel/bin/svn'; # By default, don't use Jeremiah's accellent patch our $accel = 0; # This script used to always delete the installed include and lib dirs. # That probably ensures a safe build, but when rebuilding adds minutes to # the total build time, and prevents us skipping some parts of a full build # our $cleanLibs = 0; # By default, only the frontend is built (i.e. no backend or transcoding) # our $backend = 0; our $jobtools = 0; # For faster downloads, change this to a local mirror. # our $sourceforge = 'http://internap.dl.sf.net'; # At the moment, there is mythtv plus these two our @components = ( 'myththemes', 'mythplugins' ); # The OS X programs that we are likely to be interested in. our @targetsJT = ( 'MythCommFlag', 'MythJobQueue'); our @targetsBE = ( 'MythBackend', 'MythFillDatabase', 'MythTranscode', 'MythTV-Setup'); our %depend_order = ( 'mythtv' => [ 'freetype', 'lame', 'mysqlclient', 'qt-mt', 'dvdnav' ], 'mythplugins' => [ 'tiff', 'exif', 'dvdcss', 'dvdread', #'cdaudio' ], ); our %depend = ( 'freetype' => { 'url' => "$sourceforge/sourceforge/freetype/freetype-2.1.10.tar.gz", }, 'dvdnav' => { 'url' => "$sourceforge/sourceforge/dvd/libdvdnav-0.1.10.tar.gz", }, 'lame' => { 'url' => "$sourceforge/sourceforge/lame/lame-3.96.1.tar.gz", 'conf' => [ '--disable-frontend', ], }, # 'cdaudio' # => # { #'url' #=> "$sourceforge/sourceforge/libcdaudio/libcdaudio-0.99.12.tar.gz" # }, 'dvdcss' => { 'url' => 'ftp://ftp.fu-berlin.de/unix/linux/mirrors/gentoo/distfiles/libdvdcss-1.2.8.tar.bz2', }, 'dvdread' => { 'url' => 'http://www.dtek.chalmers.se/groups/dvd/dist/libdvdread-0.9.4.tar.gz', 'conf' => [ '--with-libdvdcss', ], }, 'mysqlclient' => { 'url' => 'http://ftp.snt.utwente.nl/pub/software/mysql/Downloads/MySQL-4.1/mysql-4.1.12.tar.gz', 'conf' => [ '--without-debug', '--without-docs', '--without-man', '--without-bench', '--without-server', '--without-geometry', '--without-extra-tools', ], }, 'qt-mt' => # { # 'url' # => 'http://ftp.iasi.roedu.net/mirrors/ftp.trolltech.com/qt/sources/qt-mac-opensource-src-4.0.1.tar.gz', # 'conf-cmd' # => 'echo yes | ./configure', # 'conf' # => [ # '-prefix', '"$PREFIX"', # '-system-zlib', # '-fast', # '-qt-sql-mysql', # '-qt-libpng', # '-qt-libjpeg', # '-qt-gif', # '-platform macx-g++', # '-no-tablet', # '-I"$PREFIX/include/mysql"', # '-L"$PREFIX/lib/mysql"', # ], # 'post-conf' # => 'echo "QMAKE_LFLAGS_SHLIB += -single_module" >> src/qt.pro', # 'make' # => [ # 'sub-src' # ], # }, { 'url' => 'ftp://ftp.iasi.roedu.net/mirrors/ftp.trolltech.com/qt/sources/qt-mac-free-3.3.5.tar.gz', 'conf-cmd' => 'echo yes | ./configure', 'conf' => [ '-prefix', '"$PREFIX"', '-thread', '-system-zlib', '-fast', '-qt-sql-mysql', '-no-style-cde', '-no-style-compact', '-no-style-mac', '-no-style-motif', '-no-style-motifplus', '-no-style-platinum', '-no-style-sgi', '-no-ipv6', '-qt-imgfmt-png', '-qt-imgfmt-jpeg', '-no-imgfmt-mng', '-qt-gif',
Re: [mythtv] Mythjobqueue (including commflag) packaged for MacOS X
>> Well, I've got the backend finding those bundled executables, but now >> when those executables run, they can't find any of the libraries >> needed. ... >> OK, I see what the problem is. The paths to library dependencies that >> are embedded in the auxilliary executables never get adjusted with >> install_name_tool. I will try and fix that tonight, Dave. > A simple workaround is to compile each app separately (ie change the > mythfrontend.app everywhere in the script to mythjobqueue.app or > mythcommflag.app etc) and then copy the resulting executables into > the package. I thought that with the newest version of the script, > this was done automagically For the standalone *.app, yes. For the binaries that I hacked into MythBackend.app, obviously not. -- Nigel Pearson, [EMAIL PROTECTED] | "In this city I confess Telstra Dev. Lab, Sydney, Australia | god is mammon, more is less Office: 9814 4803Fax: 9814 4897 | off like lemmings at the gun Mobile: 0408 664435 Home: 9792 6998 | I know better, still I run" ___ mythtv-dev mailing list mythtv-dev@mythtv.org http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev
Re: [mythtv] Mythjobqueue (including commflag) packaged for MacOS X
On Jan 29, 2006, at 11:16 PM, David Abrahams wrote: David Abrahams <[EMAIL PROTECTED]> writes: David Abrahams <[EMAIL PROTECTED]> writes: Nigel Pearson <[EMAIL PROTECTED]> writes: That all being said, I'd like to see 4 .apps packaged for mac by the packager script: 1)Frontend 2)backend --including jobqueue, commflag, and transcode all in the .app bundle 3)Jobqueue --including commflag and transcode so that we can run jobqueue without the backend 4)Commflag --sometimes we just need to commflag The latest SVN version tries to do this (if you use --enable-backend and --enable-jobtools) Now that they're packaged together, what will it take for them to be used that way? It seems as though the code used to find programs like commflag and transcode from the backend is completely unsuited to locating these executables. I'd like to fix it, but I need some information. Do Mac executables have some ability to report their own locations? Or if I invoke mythcommflag without directory qualification from inside mythbackend, will it be found by virtue of the fact that it's in the same directory (or package)? Well, I've got the backend finding those bundled executables, but now when those executables run, they can't find any of the libraries needed. dyld bars at me with "image not found." I'm working on what's needed to make this right, but I sure would appreciate any clues people have. I guess it's something missing in one of those plists we write into the bundle...? OK, I see what the problem is. The paths to library dependencies that are embedded in the auxilliary executables never get adjusted with install_name_tool. I'd try to fix that myself, but that business with the dephash in osx-packager.pl makes my head spin and last time I tried to hack packaging in that script I wasted several days to no avail. If the author of osx-packager.pl would care to take a stab at it, I'd appreciate it lots. Thanks, Dave A simple workaround is to compile each app separately (ie change the mythfrontend.app everywhere in the script to mythjobqueue.app or mythcommflag.app etc) and then copy the resulting executables into the package. I thought that with the newest version of the script, this was done automagically, however I haven't had a chance to test it since the changes went in. Geoff smime.p7s Description: S/MIME cryptographic signature ___ mythtv-dev mailing list mythtv-dev@mythtv.org http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev
Re: [mythtv] Mythjobqueue (including commflag) packaged for MacOS X
David Abrahams <[EMAIL PROTECTED]> writes: > David Abrahams <[EMAIL PROTECTED]> writes: > >> Nigel Pearson <[EMAIL PROTECTED]> writes: >> That all being said, I'd like to see 4 .apps packaged for mac by the packager script: 1)Frontend 2)backend --including jobqueue, commflag, and transcode all in the .app bundle 3)Jobqueue --including commflag and transcode so that we can run jobqueue without the backend 4)Commflag --sometimes we just need to commflag >>> >>> The latest SVN version tries to do this >>> (if you use --enable-backend and --enable-jobtools) >> >> Now that they're packaged together, what will it take for them to be >> used that way? It seems as though the code used to find programs like >> commflag and transcode from the backend is completely unsuited to >> locating these executables. >> >> I'd like to fix it, but I need some information. Do Mac executables >> have some ability to report their own locations? Or if I invoke >> mythcommflag without directory qualification from inside mythbackend, >> will it be found by virtue of the fact that it's in the same directory >> (or package)? > > Well, I've got the backend finding those bundled executables, but now > when those executables run, they can't find any of the libraries > needed. dyld bars at me with "image not found." I'm working on > what's needed to make this right, but I sure would appreciate any > clues people have. I guess it's something missing in one of those > plists we write into the bundle...? OK, I see what the problem is. The paths to library dependencies that are embedded in the auxilliary executables never get adjusted with install_name_tool. I'd try to fix that myself, but that business with the dephash in osx-packager.pl makes my head spin and last time I tried to hack packaging in that script I wasted several days to no avail. If the author of osx-packager.pl would care to take a stab at it, I'd appreciate it lots. Thanks, Dave -- Dave Abrahams Boost Consulting www.boost-consulting.com ___ mythtv-dev mailing list mythtv-dev@mythtv.org http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev
Re: [mythtv] Mythjobqueue (including commflag) packaged for MacOS X
David Abrahams <[EMAIL PROTECTED]> writes: > Nigel Pearson <[EMAIL PROTECTED]> writes: > >>> That all being said, I'd like to see 4 .apps packaged for mac by the >>> packager script: >>> >>> 1)Frontend >>> 2)backend --including jobqueue, commflag, and transcode all in the >>> .app bundle >>> 3)Jobqueue --including commflag and transcode so that we can run >>> jobqueue without the backend >>> 4)Commflag --sometimes we just need to commflag >> >> The latest SVN version tries to do this >> (if you use --enable-backend and --enable-jobtools) > > Now that they're packaged together, what will it take for them to be > used that way? It seems as though the code used to find programs like > commflag and transcode from the backend is completely unsuited to > locating these executables. > > I'd like to fix it, but I need some information. Do Mac executables > have some ability to report their own locations? Or if I invoke > mythcommflag without directory qualification from inside mythbackend, > will it be found by virtue of the fact that it's in the same directory > (or package)? Well, I've got the backend finding those bundled executables, but now when those executables run, they can't find any of the libraries needed. dyld bars at me with "image not found." I'm working on what's needed to make this right, but I sure would appreciate any clues people have. I guess it's something missing in one of those plists we write into the bundle...? Thanks, -- Dave Abrahams Boost Consulting www.boost-consulting.com ___ mythtv-dev mailing list mythtv-dev@mythtv.org http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev
Re: [mythtv] Mythjobqueue (including commflag) packaged for MacOS X
Nigel Pearson <[EMAIL PROTECTED]> writes: >> That all being said, I'd like to see 4 .apps packaged for mac by the >> packager script: >> >> 1)Frontend >> 2)backend --including jobqueue, commflag, and transcode all in the >> .app bundle >> 3)Jobqueue --including commflag and transcode so that we can run >> jobqueue without the backend >> 4)Commflag --sometimes we just need to commflag > > The latest SVN version tries to do this > (if you use --enable-backend and --enable-jobtools) Now that they're packaged together, what will it take for them to be used that way? It seems as though the code used to find programs like commflag and transcode from the backend is completely unsuited to locating these executables. I'd like to fix it, but I need some information. Do Mac executables have some ability to report their own locations? Or if I invoke mythcommflag without directory qualification from inside mythbackend, will it be found by virtue of the fact that it's in the same directory (or package)? TIA, Dave -- Dave Abrahams Boost Consulting www.boost-consulting.com ___ mythtv-dev mailing list mythtv-dev@mythtv.org http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev
Re: [mythtv] Mythjobqueue (including commflag) packaged for MacOS X
> That all being said, I'd like to see 4 .apps packaged for mac by the > packager script: > > 1)Frontend > 2)backend --including jobqueue, commflag, and transcode all in the > .app bundle > 3)Jobqueue --including commflag and transcode so that we can run > jobqueue without the backend > 4)Commflag --sometimes we just need to commflag The latest SVN version tries to do this (if you use --enable-backend and --enable-jobtools) -- Nigel Pearson, [EMAIL PROTECTED]|"Look at this! Telstra Dev. Lab, Sydney, Australia | Do you think I put this in Office:9814 4803 Fax: 9814 4897 | to get better reception?" Mobile: 0408 664435 Home: 9792 6998 | Batty - Fern Gully ___ mythtv-dev mailing list mythtv-dev@mythtv.org http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev
Re: [mythtv] Mythjobqueue (including commflag) packaged for MacOS X
> 5) it might also be helpful to have mythtv-setup packaged so we can > setup the backend This is probably a requirement for using mythjobqueue. The JobQueue is meant to be run inside mythbackend, so the setup screens for the JobQueue are inside mythtv-setup. I created the stand-alone mythjobqueue application because it was a trivial task and I figured people might want the JobQueue running on machines where they didn't have full-fledged backends, but I didn't move the JobQueue config out of mythtv-setup. -- Chris ___ mythtv-dev mailing list mythtv-dev@mythtv.org http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev
Re: [mythtv] Mythjobqueue (including commflag) packaged for MacOS X
> #!/bin/sh > PRG=$0 > PRG=`dirname $PRG` > export PATH=$PATH:$PRG > echo $PATH > `exec $mythjobqueue_exec` > > The original problem that this set out to solve is the jobqueue > expects the executables for commflag and transcode to be in the > path. When they are inside the bundle, this is just not going to With current SVN this is no longer the case, the JobQueue use gContext->GetInstallPrefix() to locate the binaries so your workaround might not be necessary anymore. -- Chris ___ mythtv-dev mailing list mythtv-dev@mythtv.org http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev
Re: [mythtv] Mythjobqueue (including commflag) packaged for MacOS X
On Dec 20, 2005, at 6:12 PM, Nigel Pearson wrote: Just thought I would let anyone interested know that I have made a self-contained mac application for the jobqueue. Geoff, I haven't have a chance to look at this, but I recently modified the osx-packager to build and package up several programs (MythJobQueue included). Would it be possible to incorporate your changes in the standard programs/mythjobqueue source? Of do you think it be better to leave it separate? -- Nigel Pearson, [EMAIL PROTECTED] | "People say I'm strange, does it Telstra Dev. Lab, Sydney, Australia |make me a stranger? Office: 9814 4803Fax: 9814 4897 | My best friend was born Mobile: 0408 664435 Home: 9792 6998 | in a manger"-DC Talk 5) it might also be helpful to have mythtv-setup packaged so we can setup the backend Geoff smime.p7s Description: S/MIME cryptographic signature ___ mythtv-dev mailing list mythtv-dev@mythtv.org http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev
Re: [mythtv] Mythjobqueue (including commflag) packaged for MacOS X
On Dec 20, 2005, at 6:12 PM, Nigel Pearson wrote: Just thought I would let anyone interested know that I have made a self-contained mac application for the jobqueue. Geoff, I haven't have a chance to look at this, but I recently modified the osx-packager to build and package up several programs (MythJobQueue included). Would it be possible to incorporate your changes in the standard programs/mythjobqueue source? Of do you think it be better to leave it separate? I didn't really change the source at all, I just cheated. I simply created 3 separate apps by changing the names in the packager script. Then I copied the transcode and commflag executables into the MacOS directory of the jobqueue.app bundle. Finally, I renamed the jobqueue executable to mythjobqueue_exec and replaced it with the following shell script: #!/bin/sh PRG=$0 PRG=`dirname $PRG` export PATH=$PATH:$PRG echo $PATH `exec $mythjobqueue_exec` The original problem that this set out to solve is the jobqueue expects the executables for commflag and transcode to be in the path. When they are inside the bundle, this is just not going to happen. The correct fix would probably be to define the path in the source when compiling on mac to be inside the bundle. This same fix should work for a packaged backend. Lastly, there is a setting we can add to the info.plist file in the bundle so that applications that should run in the background such as the backend and the jobqueue don't show up in the Dock. Below is the key to add: LSUIElement 1 Since we don't have a gui for these apps, the dock icon just bounces forever... That all being said, I'd like to see 4 .apps packaged for mac by the packager script: 1)Frontend 2)backend --including jobqueue, commflag, and transcode all in the .app bundle 3)Jobqueue --including commflag and transcode so that we can run jobqueue without the backend 4)Commflag --sometimes we just need to commflag Geoff smime.p7s Description: S/MIME cryptographic signature ___ mythtv-dev mailing list mythtv-dev@mythtv.org http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev
Re: [mythtv] Mythjobqueue (including commflag) packaged for MacOS X
Just thought I would let anyone interested know that I have made a self-contained mac application for the jobqueue. Geoff, I haven't have a chance to look at this, but I recently modified the osx-packager to build and package up several programs (MythJobQueue included). Would it be possible to incorporate your changes in the standard programs/mythjobqueue source? Of do you think it be better to leave it separate? -- Nigel Pearson, [EMAIL PROTECTED] | "People say I'm strange, does it Telstra Dev. Lab, Sydney, Australia |make me a stranger? Office: 9814 4803Fax: 9814 4897 | My best friend was born Mobile: 0408 664435 Home: 9792 6998 | in a manger"-DC Talk ___ mythtv-dev mailing list mythtv-dev@mythtv.org http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev