mirror of
https://github.com/zhigang1992/RubyMotion.git
synced 2026-06-12 00:35:25 +08:00
[xcassets] Compile resources_dirs/*.xcassets into the app bundle.
This commit is contained in:
@@ -342,6 +342,20 @@ EOS
|
||||
end
|
||||
end
|
||||
|
||||
# Compile Asset Catalog bundles.
|
||||
xcassets = []
|
||||
config.resources_dirs.each do |dir|
|
||||
xcassets.concat(Dir.glob(File.join(dir, '*.xcassets'))) if File.exist?(dir)
|
||||
end
|
||||
unless xcassets.empty?
|
||||
xcassets.map! { |f| File.expand_path(f) }
|
||||
sh "\"#{config.xcode_dir}/usr/bin/actool\" --output-format human-readable-text " \
|
||||
"--notices --warnings --platform #{config.deploy_platform.downcase} " \
|
||||
"--minimum-deployment-target #{config.deployment_target} " \
|
||||
"#{Array(config.device_family).map { |d| "--target-device #{d}" }.join(' ')} " \
|
||||
"--compress-pngs --compile \"#{bundle_path}\" \"#{xcassets.join('" "')}\""
|
||||
end
|
||||
|
||||
# Compile CoreData Model resources and SpriteKit atlas files.
|
||||
config.resources_dirs.each do |dir|
|
||||
if File.exist?(dir)
|
||||
|
||||
Reference in New Issue
Block a user