Hey everyone! I'm new to The Luggage, but have managed to learn quite a bit with the help of the wiki, Graham Gilbert, and Gary Larizza's tutorials.
One thing I'm having difficulty with: app2luggage isn't fully working for me, but I'm having trouble figuring out why. I'm trying to package up Pages, in my Applications folder. Using a modified version of Gary's example, I try this command:
sudo app2luggage.rb -a /Applications/Pages.app -i /Users/mike/Documents/Packages/Pages_5.0.1/ -l /usr/local/share/luggage/luggage.make -r edu,sju -p Pages_5.0.1
However, I get this error:
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require': cannot load such file -- ftools (LoadError)
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require'
from /usr/local/bin/app2luggage.rb:30:in `<main>'
After some searching, I came across this possible explanation:
http://stackoverflow.com/questions/11552524/ruby-cannot-load-such-file-ftools-load-errorThe suggestion is to use fileutils instead of ftools. Okay. So now, I have my own modified app2luggage.rb, where I've changed line 30 to say require 'fileutils'. Here's my same command, but pointing to my app2luggage2.rb (and the accompanying error):
sudo app2luggage2.rb -a /Applications/Pages.app -i /Users/mike/Documents/Packages/Pages_5.0.1/ -l /usr/local/share/luggage/luggage.make -r edu,sju -p Pages_5.0.1
Error: argument --reverse-domain must specify a reversed domain.
I changed to this command instead, changing some of the options to the alternatives (--luggage-path instead of -l, for example):
sudo app2luggage2.rb --application /Applications/Pages.app --directory-name /Users/mike/Documents/Packages/Pages_5.0.1/ --luggage-path /usr/local/share/luggage/luggage.make --reverse-domain edu.sju --package-id Pages_5.0.1 --make-pkg
I don't know if it makes a difference, but I also specified at the end that I wanted a pkg, but not a dmg.
This fails because it ends up trying to use /usr/local/bin/packagemaker, which doesn't exist on 10.9. To fix this, I duplicated and modified my luggage.make file (named luggage2.make) to insert this at line 58:
USE_PKGBUILD=1
My current command is this:
sudo app2luggage2.rb --application /Applications/Pages.app --directory-name /Users/mike/Documents/Packages/Pages_5.0.1/ --luggage-path /usr/local/share/luggage/luggage2.make --reverse-domain edu.sju --package-id Pages_5.0.1 --make-pkg
The whole thing runs through successfully - and still makes a pkg and dmg for some reason. That's okay, I only really need the pkg.
However - installing Pages from that pkg (either the standalone pkg or the one wrapped in the dmg) is problematic. The installation finishes successfully, but Pages.app won't launch - it says that it's damaged. The permissions for Pages.app are wonky, too:
drwx------ 3 root admin 102 Dec 19 15:12 Pages.app
Fixing the permissions doesn't allow the application to launch properly, though.
Any ideas? Does anyone else have this working on 10.9? How many things did I do wrong in this post?
Mike