mirror of
https://github.com/zhigang1992/RubyMotion.git
synced 2026-04-29 05:05:37 +08:00
[OSX] optional #eval support (experimental)
This commit is contained in:
@@ -454,6 +454,14 @@ EOS
|
||||
copy_resource(res_path, File.join(app_resources_dir, res))
|
||||
end
|
||||
|
||||
# Optional support for #eval (OSX-only).
|
||||
if config.respond_to?(:eval_support) and config.eval_support
|
||||
repl_dylib_path = File.join(datadir, platform, 'libmacruby-repl.dylib')
|
||||
dest_path = File.join(app_resources_dir, File.basename(repl_dylib_path))
|
||||
copy_resource(repl_dylib_path, dest_path)
|
||||
preserve_resources << File.basename(repl_dylib_path)
|
||||
end
|
||||
|
||||
# Delete old resource files.
|
||||
resources_files = resources_paths.map { |x| path_on_resources_dirs(config.resources_dirs, x) }
|
||||
Dir.chdir(app_resources_dir) do
|
||||
|
||||
@@ -30,7 +30,7 @@ module Motion; module Project;
|
||||
register :osx
|
||||
|
||||
variable :icon, :copyright, :category, :embedded_frameworks,
|
||||
:codesign_for_development
|
||||
:codesign_for_development, :eval_support
|
||||
|
||||
def initialize(project_dir, build_mode)
|
||||
super
|
||||
@@ -40,6 +40,7 @@ module Motion; module Project;
|
||||
@frameworks = ['AppKit', 'Foundation', 'CoreGraphics']
|
||||
@embedded_frameworks = []
|
||||
@codesign_for_development = false
|
||||
@eval_support = false
|
||||
end
|
||||
|
||||
def platforms; ['MacOSX']; end
|
||||
|
||||
Reference in New Issue
Block a user