Module: Shoes::SelectedBackend

Defined in:
shoes-swt/lib/shoes/swt/generate_backend.rb

Class Method Summary collapse

Class Method Details

.generate(path) ⇒ Object



31
32
33
34
35
# File 'shoes-swt/lib/shoes/swt/generate_backend.rb', line 31

def generate(path)
  options = "-J-XstartOnFirstThread" if RbConfig::CONFIG["host_os"] =~ /darwin/

  "jruby #{options} #{path}/shoes-swt"
end

.validateObject



8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# File 'shoes-swt/lib/shoes/swt/generate_backend.rb', line 8

def validate
  return if RUBY_ENGINE == "jruby"

  puts "\n*******************************************************************************\nThe shoes-swt backend requires a 9.X version of JRuby.\n\nYou are running the following Ruby instead:\n\n  \#{RUBY_DESCRIPTION}\n\nPlease download JRuby from http://jruby.org (or your favorite Ruby version\nmanager), then check our https://github.com/shoes/shoes4#installing-shoes-4 to\nget Shoes installed.\n\nSorry for the inconvenience!\n*******************************************************************************\n\n"
  exit 1
end