Sha256: e4477e6a62bcac4e6df0f8cc54f7e5460ae384a6753fa36791d87dd674b1a4d0

Contents?: true

Size: 1.75 KB

Versions: 1

Compression:

Stored size: 1.75 KB

Contents

Motion::Project::App.setup do |app|

  # Extracted from Teacup: https://github.com/rubymotion/teacup
  # Thanks Colin! (@colinta)
  platform = app.respond_to?(:template) ? app.template : :ios
  
  platform_joybox = File.expand_path(File.join(File.dirname(__FILE__), "../../motion/joybox-#{platform}"))
  platform_vendor = File.expand_path(File.join(File.dirname(__FILE__), "../../vendor/vendor-#{platform}"))


  app.frameworks += ["QuartzCore", 
                     "CoreGraphics", 
                     "Foundation", 
                     "ApplicationServices", 
                     "OpenAL", 
                     "AVFoundation", 
                     "AudioToolbox", 
                     "QuartzCore"]

  app.libs << "/usr/lib/libz.dylib"
  

  cocos2d_vendor = File.expand_path(File.join(platform_vendor, "cocos_2d"))
  box2d_vendor = File.expand_path(File.join(platform_vendor, "Box2D.framework"))

  app.vendor_project(cocos2d_vendor,
                     :static,
                     :products => ["libcocos2d.a"],
                     :headers_dir => "include",
                     :bridgesupport_cflags => "-D__CC_PLATFORM_IOS -ISupport -IPlatforms -IPlatforms/iOS",
                     :bridgesupport_exceptions => ["cocos_2d_exceptions.bridgesupport"])

  app.vendor_project(box2d_vendor,
                     :static,
                     :products => ['Box2D'],
                     :headers_dir => "Headers")


  # Scans app.files until it finds app/ (the default)
  # if found, it inserts just before those files, otherwise it will insert to
  # the end of the list
  insert_point = app.files.find_index { |file| file =~ /^(?:\.\/)?app\// } || 0

  Dir.glob(File.join(platform_joybox, '**/*.rb')).reverse.each do |file|
    app.files.insert(insert_point, file)
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
joybox-0.0.6 lib/joybox/joybox-ios.rb