-
Notifications
You must be signed in to change notification settings - Fork 19
Merge Packaging on OSX
You'll need a Macintosh running Shoes. You also need the hdiutil
and possibly some more esoteric osx programs. You may need to install xCode which requires a free (cost) Apple Developer membership. I don't make the rules.
You also need a license file, some .icns or two and a background image. See the options section below.
Sadly, to run the command line packaging you need a system Ruby or a Ruby from rvm. You can't use the Ruby inside of shoes for that.
The osx-merge.rb script differs a little from the Windows and Linux variations. It needs the 'shoes_at' option to point to where you installed Shoes and it needs the ruby version and arch settings. Get them Cobbler->Info. You also have to use a system (or rvm) ruby to run the script - ./cshoes --ruby doesn't work. Setting the ruby constant DIR is required.
# run this with ruby osx-merge.rb file.yaml
require 'fileutils'
include FileUtils
require 'yaml'
opts = YAML.load_file(ARGV[0])
opts['shoes_at'] = '/Users/ccoupe/build/yosemite/Shoes.app/Contents/MacOS'
opts['target_ruby'] = '2.3.6'
opts['target_ruby_arch'] = 'x86_64-darwin-14' # yosemite 10.10
if opts['shoes_at']
DIR = opts['shoes_at']
else
DIR = "/Applications/Shoes.app/Contents/MacOS" # EXPECT A FAIL
end
opts['packdir'] = Dir.getwd
home = ENV['HOME']
GEMS_DIR = File.join(home, '.shoes','+gem')
puts "DIR = #{DIR}"
puts "GEMS_DIR = #{GEMS_DIR}"
require "#{DIR}/lib/package/merge-osx"
PackShoes::merge_osx(opts) {|t| $stderr.puts t}
Shoes uses and includes the Yoursway-create-dmg scripts which has options and defaults that Shoes doesn't exploit. To fully exploit those options, Shoes creates a dmg.sh bash script in your package directory which you can modify and run to play with. You could modify the lib/package/merge-osx.rb file but the changes would be lost in the next Shoes upgrade - so create a new issue at the wiki to report your enhancement or bug.