mirror of
https://github.com/zhigang1992/RubyMotion.git
synced 2026-04-11 11:39:09 +08:00
make sure to create a Resources directory for mac
Fix the following error:
$ motion create hello --template=osx
$ cd hello
$ rm -rf resources
$ rake
Build ./build/MacOSX-10.8-Development
Compile ./app/app_delegate.rb
Compile ./app/menu.rb
Create ./build/MacOSX-10.8-Development/hello.app/Contents
Create ./build/MacOSX-10.8-Development/hello.app/Contents/MacOS
Link ./build/MacOSX-10.8-Development/hello.app/Contents/MacOS/hello
Create ./build/MacOSX-10.8-Development/hello.app/Contents/Info.plist
Create ./build/MacOSX-10.8-Development/hello.app/Contents/PkgInfo
rake aborted!
No such file or directory - ./build/MacOSX-10.8-Development/hello.app/Contents/Resources
This commit is contained in:
@@ -348,6 +348,7 @@ EOS
|
||||
|
||||
# Copy resources, handle subdirectories.
|
||||
app_resources_dir = config.app_resources_dir(platform)
|
||||
FileUtils.mkdir_p(app_resources_dir)
|
||||
reserved_app_bundle_files = [
|
||||
'_CodeSignature/CodeResources', 'CodeResources', 'embedded.mobileprovision',
|
||||
'Info.plist', 'PkgInfo', 'ResourceRules.plist',
|
||||
@@ -369,7 +370,6 @@ EOS
|
||||
end
|
||||
dest_path = File.join(app_resources_dir, res)
|
||||
if !File.exist?(dest_path) or File.mtime(res_path) > File.mtime(dest_path)
|
||||
FileUtils.mkdir_p(File.dirname(dest_path))
|
||||
App.info 'Copy', res_path
|
||||
FileUtils.cp_r(res_path, dest_path)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user