[OSX] optional #eval support (experimental)

This commit is contained in:
Laurent Sansonetti
2013-10-21 02:12:49 +02:00
parent 86055cac09
commit b192251af0
2 changed files with 10 additions and 1 deletions

View File

@@ -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

View File

@@ -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