wxruby3 0.9.5 → 0.9.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (42) hide show
  1. checksums.yaml +4 -4
  2. data/INSTALL.md +315 -78
  3. data/README.md +31 -20
  4. data/lib/wx/core/ext.rb +22 -3
  5. data/lib/wx/version.rb +1 -1
  6. data/lib/wx/wxruby/base.rb +6 -4
  7. data/lib/wx/wxruby/cmd/sampler.rb +39 -29
  8. data/lib/wx/wxruby/cmd/setup.rb +122 -0
  9. data/lib/wx/wxruby/cmd/test.rb +56 -6
  10. data/rakefile +14 -0
  11. data/rakelib/bin.rake +48 -0
  12. data/rakelib/bin.rb +62 -0
  13. data/rakelib/build.rb +11 -7
  14. data/rakelib/config.rake +3 -1
  15. data/rakelib/configure.rb +28 -8
  16. data/rakelib/doc.rake +3 -1
  17. data/rakelib/gem.rake +169 -0
  18. data/rakelib/gem.rb +82 -0
  19. data/rakelib/install.rb +2 -0
  20. data/rakelib/lib/config/linux.rb +24 -2
  21. data/rakelib/lib/config/macosx.rb +16 -0
  22. data/rakelib/lib/config/mingw.rb +133 -9
  23. data/rakelib/lib/config/pkgman/arch.rb +53 -0
  24. data/rakelib/lib/config/pkgman/base.rb +169 -0
  25. data/rakelib/lib/config/pkgman/debian.rb +66 -0
  26. data/rakelib/lib/config/pkgman/macosx.rb +183 -0
  27. data/rakelib/lib/config/pkgman/rhel.rb +54 -0
  28. data/rakelib/lib/config/pkgman/suse.rb +54 -0
  29. data/rakelib/lib/config/unixish.rb +36 -19
  30. data/rakelib/lib/config.rb +254 -61
  31. data/rakelib/lib/core/package.rb +47 -49
  32. data/rakelib/lib/director/gdicommon.rb +1 -2
  33. data/rakelib/lib/generate/doc.rb +29 -14
  34. data/rakelib/lib/generate/interface.rb +4 -2
  35. data/rakelib/lib/swig_runner.rb +11 -11
  36. data/rakelib/prepost.rake +9 -4
  37. data/rakelib/yard/templates/default/fulldoc/html/css/wxruby3.css +14 -0
  38. data/rakelib/yard/templates/default/fulldoc/html/setup.rb +5 -5
  39. data/rakelib/yard/yard/relative_markdown_links.rb +7 -1
  40. metadata +21 -17
  41. data/ext/mkrf_conf_srcgem.rb +0 -67
  42. data/rakelib/run.rake +0 -52
@@ -0,0 +1,169 @@
1
+ # Copyright (c) 2023 M.J.N. Corino, The Netherlands
2
+ #
3
+ # This software is released under the MIT license.
4
+
5
+ ###
6
+ # wxRuby3 buildtools platform pkg manager base
7
+ ###
8
+
9
+ module WXRuby3
10
+
11
+ module Config
12
+
13
+ module Platform
14
+
15
+ module PkgManager
16
+
17
+ MIN_GENERIC_PKGS = %w[gtk3-devel patchelf g++ make git webkit2gtk3-devel gspell-devel gstreamer-devel gstreamer-plugins-base-devel libcurl-devel libsecret-devel libnotify-devel libSDL-devel zlib-devel]
18
+
19
+ class << self
20
+
21
+ def install(pkgs)
22
+ # do we need to install anything?
23
+ if !pkgs.empty? || builds_wxwidgets?
24
+ # determine the linux distro specs
25
+ distro = get_distro
26
+ begin
27
+ # load distro installation support
28
+ require_relative "./#{distro[:type]}"
29
+ rescue LoadError
30
+ # do we need to build wxWidgets?
31
+ pkgs.concat(MIN_GENERIC_PKGS) if builds_wxwidgets?
32
+ $stderr.puts <<~__ERROR_TXT
33
+ ERROR: Do not know how to install required packages for distro type '#{distro[:type]}'.
34
+
35
+ Make sure the following packages (or equivalent) are installed and than try again with `WXRUBY_NO_AUTOINSTALL=1`:
36
+ #{pkgs.join(', ')}
37
+ __ERROR_TXT
38
+ exit(1)
39
+ end
40
+ # can we install?
41
+ unless no_autoinstall? || has_sudo? || is_root?
42
+ $stderr.puts 'ERROR: Cannot check for or install required packages. Please install sudo or run as root and try again.'
43
+ exit(1)
44
+ end
45
+ # do we need to build wxWidgets?
46
+ if builds_wxwidgets?
47
+ # add platform specific packages for wxWidgets
48
+ add_platform_pkgs(pkgs)
49
+ end
50
+ # do we actually have any packages to install?
51
+ unless pkgs.empty?
52
+ # autoinstall or not?
53
+ unless wants_autoinstall?
54
+ $stderr.puts <<~__ERROR_TXT
55
+ ERROR: This system may lack installed versions of the following required software packages:
56
+ #{pkgs.join(', ')}
57
+
58
+ Install these packages and try again.
59
+ __ERROR_TXT
60
+ exit(1)
61
+ end
62
+ # do the actual install
63
+ unless do_install(distro, pkgs)
64
+ $stderr.puts <<~__ERROR_TXT
65
+ ERROR: Failed to install all or some of the following required software packages:
66
+ #{pkgs.join(', ')}
67
+
68
+ Fix any problems or install these packages yourself and try again.
69
+ __ERROR_TXT
70
+ if WXRuby3.config.run_silent?
71
+ $stderr.puts "For error details check #{WXRuby3.config.silent_log_name}"
72
+ end
73
+ exit(1)
74
+ end
75
+ end
76
+ end
77
+ end
78
+
79
+ private
80
+
81
+ def builds_wxwidgets?
82
+ Config.get_config('with-wxwin') && Config.get_cfg_string('wxwin').empty?
83
+ end
84
+
85
+ def no_autoinstall?
86
+ Config.get_config('autoinstall') == false
87
+ end
88
+
89
+ def wants_autoinstall?
90
+ WXRuby3.config.wants_autoinstall?
91
+ end
92
+
93
+ def has_sudo?
94
+ system('command -v sudo > /dev/null')
95
+ end
96
+
97
+ def is_root?
98
+ `id -u 2>/dev/null`.chomp == '0'
99
+ end
100
+
101
+ def run(cmd)
102
+ $stdout.print "Running #{cmd}..."
103
+ rc = WXRuby3.config.sh("#{is_root? ? '' : 'sudo '}#{cmd}")
104
+ $stderr.puts (rc ? 'done!' : 'FAILED!')
105
+ rc
106
+ end
107
+
108
+ def expand(cmd)
109
+ `#{is_root? ? '' : 'sudo '}#{cmd}`
110
+ end
111
+
112
+ def get_distro
113
+ if File.file?('/etc/os-release') # works with most (if not all) recent distro releases
114
+ data = File.readlines('/etc/os-release').reduce({}) do |hash, line|
115
+ val, var = line.split('=')
116
+ hash[val] = var.strip.gsub(/(\A")|("\Z)/, '')
117
+ hash
118
+ end
119
+ {
120
+ type: if data['ID_LIKE']
121
+ data['ID_LIKE'].split.first.to_sym
122
+ elsif File.file?('/etc/redhat-release')
123
+ :rhel
124
+ elsif File.file?('/etc/SUSE-brand') || File.file?('/etc/SuSE-release')
125
+ :suse
126
+ elsif File.file?('/etc/debian_version')
127
+ :debian
128
+ else
129
+ data['ID'].to_sym
130
+ end,
131
+ distro: data['ID'].downcase,
132
+ release: data['VERSION_ID']
133
+ }
134
+ elsif File.file?('/etc/redhat-release')
135
+ data = File.read('/etc/redhat-release').strip
136
+ {
137
+ type: :rhel,
138
+ distro: data.split.shift.downcase,
139
+ release: data =~ /\d+(\.\d+)*/ ? $~[0] : ''
140
+ }
141
+ elsif File.file?('/etc/SUSE-brand') || File.file?('/etc/SuSE-release')
142
+ data = File.readlines(File.file?('/etc/SUSE-brand') ? '/etc/SUSE-brand' : '/etc/SuSE-release')
143
+ {
144
+ type: :suse,
145
+ distro: data.shift.split.shift.downcase,
146
+ release: (data.find { |s| s.strip =~ /\AVERSION\s*=/ } || '').split('=').last || ''
147
+ }
148
+ elsif File.file?('/etc/debian_version')
149
+ {
150
+ type: :debian,
151
+ distro: 'generic',
152
+ release: File.read('/etc/debian_version').strip
153
+ }
154
+ else
155
+ {
156
+ type: :unknown
157
+ }
158
+ end
159
+ end
160
+
161
+ end
162
+
163
+ end
164
+
165
+ end
166
+
167
+ end
168
+
169
+ end
@@ -0,0 +1,66 @@
1
+ # Copyright (c) 2023 M.J.N. Corino, The Netherlands
2
+ #
3
+ # This software is released under the MIT license.
4
+
5
+ ###
6
+ # wxRuby3 buildtools platform pkg manager for Debian type systems
7
+ ###
8
+
9
+ module WXRuby3
10
+
11
+ module Config
12
+
13
+ module Platform
14
+
15
+ module PkgManager
16
+
17
+ PLATFORM_DEPS = %w[libgtk-3-dev libwebkit2gtk-4.0-dev libgspell-1-dev libunwind-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libcurl4-openssl-dev libsecret-1-dev libnotify-dev]
18
+
19
+ class << self
20
+
21
+ private
22
+
23
+ def do_install(distro, pkgs)
24
+ run_apt(make_install_cmd(pkgs))
25
+ end
26
+
27
+ def add_platform_pkgs(pkgs)
28
+ # get architecture
29
+ arch = expand('dpkg --print-architecture').strip
30
+ # find pkgs we need
31
+ PLATFORM_DEPS.inject(pkgs) do |list, pkg|
32
+ list << pkg unless (system("dpkg-query -s \"#{pkg}:#{arch}\" >/dev/null 2>&1") ||
33
+ system("dpkg-query -s \"#{pkg}:all\" >/dev/null 2>&1") ||
34
+ (expand("dpkg-query -s \"#{pkg}\" 2>/dev/null").strip =~ /Architecture: (#{arch}|all)/))
35
+ list
36
+ end
37
+ end
38
+
39
+ def run_apt(cmd)
40
+ run("DEBIAN_FRONTEND=noninteractive apt-get -q -o=Dpkg::Use-Pty=0 #{cmd}")
41
+ end
42
+
43
+ def update_pkgs
44
+ run_apt('update')
45
+ end
46
+
47
+ def make_install_cmd(pkgs)
48
+ # update cache
49
+ update_pkgs
50
+ # get list of available packages
51
+ apt_cache = `apt-cache pkgnames`.chomp.split("\n").collect { |s| s.strip }
52
+ # remove un-installables
53
+ pkgs = pkgs.select { |pkg| apt_cache.include?(pkg) }
54
+ # create install command
55
+ "install -y #{ pkgs.join(' ') }"
56
+ end
57
+
58
+ end
59
+
60
+ end
61
+
62
+ end
63
+
64
+ end
65
+
66
+ end
@@ -0,0 +1,183 @@
1
+ # Copyright (c) 2023 M.J.N. Corino, The Netherlands
2
+ #
3
+ # This software is released under the MIT license.
4
+
5
+ ###
6
+ # wxRuby3 buildtools MacOSX pkg manager
7
+ ###
8
+
9
+ module WXRuby3
10
+
11
+ module Config
12
+
13
+ module Platform
14
+
15
+ module PkgManager
16
+
17
+ class << self
18
+
19
+ def install(pkgs)
20
+ # do we need to install anything?
21
+ if !pkgs.empty?
22
+ # can we install XCode commandline tools?
23
+ unless no_autoinstall? || !pkgs.include?('xcode') || has_sudo? || is_root?
24
+ STDERR.puts 'ERROR: Cannot check for or install required packages. Please install sudo or run as root and try again.'
25
+ exit(1)
26
+ end
27
+
28
+ # autoinstall or not?
29
+ unless pkgs.empty? || wants_autoinstall?
30
+ $stderr.puts <<~__ERROR_TXT
31
+ ERROR: This system may lack installed versions of the following required software packages:
32
+ #{pkgs.join(', ')}
33
+
34
+ Install these packages and try again.
35
+ __ERROR_TXT
36
+ exit(1)
37
+ end
38
+ # do the actual install (or nothing)
39
+ unless do_install(pkgs)
40
+ $stderr.puts <<~__ERROR_TXT
41
+ ERROR: Failed to install all or some of the following required software packages:
42
+ #{pkgs.join(', ')}
43
+
44
+ Fix any problems or install these packages yourself and try again.
45
+ __ERROR_TXT
46
+ exit(1)
47
+ end
48
+ end
49
+ end
50
+
51
+ private
52
+
53
+ def do_install(pkgs)
54
+ rc = true
55
+ # first see if we need to install XCode commandline tools
56
+ if pkgs.include?('xcode')
57
+ pkgs.delete('xcode')
58
+ rc = run('xcode-select --install')
59
+ end
60
+ # now check if we need any other packages (which need Homebrew or MacPorts)
61
+ if rc && !pkgs.empty?
62
+ # Has Ruby been installed through MacPorts?
63
+ if has_macports? &&
64
+ (ruby_info = expand('port -q installed installed').strip.split("\n").find { |ln| ln.strip =~ /\Aruby\d+\s/ })
65
+
66
+ # this is really crap; with MacPorts we need to install swig-ruby instead of simply swig
67
+ # which for whatever nonsensical reason will pull in another (older) Ruby version (probably 2.3 or such)
68
+ # although SWIG's Ruby support is version agnostic and has no binary bindings
69
+ if pkgs.include?('swig')
70
+ pkgs.delete('swig')
71
+ pkgs << 'swig-ruby'
72
+ end
73
+ # in case MacPorts was installed with root privileges this install would also have to be run
74
+ # with root privileges (otherwise it would fail early on with access problems) so we can
75
+ # just run without sudo as we either have root privileges for root-installed MacPorts or
76
+ # we're running without root privileges for user-installed MacPorts
77
+ pkgs.each { |pkg| rc &&= sh("port install #{pkg}") }
78
+
79
+ # or are we running without root privileges and have Homebrew installed?
80
+ # (Ruby may be installed using Homebrew itself or using a Ruby version manager like RVM)
81
+ elsif !is_root? && has_homebrew?
82
+
83
+ pkgs.each { |pkg| rc &&= sh("brew install #{pkg}") }
84
+
85
+ # or do we have MacPorts (running either privileged or not) and
86
+ # a Ruby installed using a Ruby version manager.
87
+ elsif has_macports?
88
+
89
+ # same crap as above
90
+ if pkgs.include?('swig')
91
+ pkgs.delete('swig')
92
+ pkgs << 'swig-ruby'
93
+ end
94
+ # in case MacPorts was installed with root privileges this install would also have to be run
95
+ # with root privileges (otherwise it would fail early on with access problems) so we can
96
+ # just run without sudo as we either have root privileges for root-installed MacPorts or
97
+ # we're running without root privileges for user-installed MacPorts
98
+ pkgs.each { |pkg| rc &&= sh("port install #{pkg}") }
99
+
100
+ else
101
+ if has_homebrew? || is_root?
102
+ $stderr.puts <<~__ERROR_TXT
103
+ ERROR: Unsupported Ruby installation. wxRuby3 can only be installed for Ruby with root privileges
104
+ in case Ruby was installed with MacPorts. Homebrew should not be run with root privileges.
105
+
106
+ Re-install a supported Ruby setup and try again.
107
+ __ERROR_TXT
108
+ else
109
+ $stderr.puts <<~__ERROR_TXT
110
+ ERROR: Unsupported Ruby installation. wxRuby3 requires either a MacPorts installed Ruby version
111
+ or a non-privileged Ruby installation and have Homebrew installed.
112
+
113
+ Install either Homebrew or MacPorts and try again.
114
+ __ERROR_TXT
115
+ end
116
+ exit(1)
117
+ end
118
+ end
119
+ rc
120
+ end
121
+
122
+ def builds_wxwidgets?
123
+ Config.get_config('with-wxwin') && Config.get_cfg_string('wxwin').empty?
124
+ end
125
+
126
+ def no_autoinstall?
127
+ Config.get_config('autoinstall') == false
128
+ end
129
+
130
+ def wants_autoinstall?
131
+ WXRuby3.config.wants_autoinstall?
132
+ end
133
+
134
+ def has_sudo?
135
+ system('command -v sudo > /dev/null')
136
+ end
137
+
138
+ def is_root?
139
+ if @is_root.nil?
140
+ @is_root = (`id -u 2>/dev/null`.chomp == '0')
141
+ end
142
+ @is_root
143
+ end
144
+
145
+ def has_macports?
146
+ if @has_macports.nil?
147
+ @has_macports = system('command -v port>/dev/null')
148
+ end
149
+ end
150
+
151
+ def has_homebrew?
152
+ if @has_homebrew.nil?
153
+ @has_homebrew = system('command -v brew>/dev/null')
154
+ end
155
+ end
156
+
157
+ def run(cmd)
158
+ $stdout.print "Running #{cmd}..."
159
+ rc = WXRuby3.config.sh("#{is_root? ? '' : 'sudo '}#{cmd}")
160
+ $stderr.puts (rc ? 'done!' : 'FAILED!')
161
+ rc
162
+ end
163
+
164
+ def sh(*cmd, title: nil)
165
+ $stdout.print(title ? title : "Running #{cmd}...")
166
+ rc = WXRuby3.config.sh(*cmd)
167
+ $stderr.puts (rc ? 'done!' : 'FAILED!')
168
+ rc
169
+ end
170
+
171
+ def expand(cmd)
172
+ WXRuby3.config.expand(cmd)
173
+ end
174
+
175
+ end
176
+
177
+ end
178
+
179
+ end
180
+
181
+ end
182
+
183
+ end
@@ -0,0 +1,54 @@
1
+ # Copyright (c) 2023 M.J.N. Corino, The Netherlands
2
+ #
3
+ # This software is released under the MIT license.
4
+
5
+ ###
6
+ # wxRuby3 buildtools platform pkg manager for RHEL type systems
7
+ ###
8
+
9
+ module WXRuby3
10
+
11
+ module Config
12
+
13
+ module Platform
14
+
15
+ module PkgManager
16
+
17
+ PLATFORM_DEPS = %w[expat-devel findutils gspell-devel gstreamer1-plugins-base-devel gtk3-devel libcurl-devel libjpeg-devel libnotify-devel libpng-devel libSM-devel libsecret-devel libtiff-devel SDL-devel webkit2gtk4.1-devel zlib-devel]
18
+
19
+ class << self
20
+
21
+ private
22
+
23
+ def do_install(distro, pkgs)
24
+ run_dnf(make_install_cmd(pkgs))
25
+ end
26
+
27
+ def add_platform_pkgs(pkgs)
28
+ # add build tools
29
+ if pkgs.include?('git')
30
+ pkgs.delete('git')
31
+ pkgs << 'git-core'
32
+ end
33
+ # find pkgs we need
34
+ PLATFORM_DEPS.inject(pkgs) { |list, pkg| list << pkg unless system("dnf list installed #{pkg} >/dev/null 2>&1"); list }
35
+ end
36
+
37
+ def run_dnf(cmd)
38
+ run("dnf #{cmd}")
39
+ end
40
+
41
+ def make_install_cmd(pkgs)
42
+ # create install command
43
+ "install -y #{ pkgs.join(' ') }"
44
+ end
45
+
46
+ end
47
+
48
+ end
49
+
50
+ end
51
+
52
+ end
53
+
54
+ end
@@ -0,0 +1,54 @@
1
+ # Copyright (c) 2023 M.J.N. Corino, The Netherlands
2
+ #
3
+ # This software is released under the MIT license.
4
+
5
+ ###
6
+ # wxRuby3 buildtools platform pkg manager for SuSE type systems
7
+ ###
8
+
9
+ module WXRuby3
10
+
11
+ module Config
12
+
13
+ module Platform
14
+
15
+ module PkgManager
16
+
17
+ PLATFORM_DEPS = %w[gtk3-devel webkit2gtk3-devel gspell-devel gstreamer-devel gstreamer-plugins-base-devel libcurl-devel libsecret-devel libnotify-devel libSDL-devel zlib-devel libjpeg-devel libpng-devel]
18
+
19
+ class << self
20
+
21
+ private
22
+
23
+ def do_install(distro, pkgs)
24
+ run_zypper(make_install_cmd(pkgs))
25
+ end
26
+
27
+ def add_platform_pkgs(pkgs)
28
+ # add build tools
29
+ if pkgs.include?('g++')
30
+ pkgs.delete('g++')
31
+ pkgs << 'gcc-c++'
32
+ end
33
+ # find pkgs we need
34
+ PLATFORM_DEPS.inject(pkgs) { |list, pkg| list << pkg unless system("rpm -q --whatprovides #{pkg} >/dev/null 2>&1"); list }
35
+ end
36
+
37
+ def run_zypper(cmd)
38
+ run("zypper -t -i #{cmd}")
39
+ end
40
+
41
+ def make_install_cmd(pkgs)
42
+ # create install command
43
+ "install -y #{ pkgs.join(' ') }"
44
+ end
45
+
46
+ end
47
+
48
+ end
49
+
50
+ end
51
+
52
+ end
53
+
54
+ end
@@ -52,32 +52,49 @@ module WXRuby3
52
52
  objs = pkg.all_obj_files.collect { |o| File.join('..', o) }.join(' ') + ' '
53
53
  depsh = pkg.dep_libnames.collect { |dl| "#{dl}.#{dll_ext}" }.join(' ')
54
54
  sh "cd lib && #{WXRuby3.config.ld} #{WXRuby3.config.ldflags(pkg.lib_target)} #{objs} #{depsh} " +
55
- "#{WXRuby3.config.libs} #{WXRuby3.config.link_output_flag}#{pkg.lib_target}"
55
+ "#{WXRuby3.config.libs} #{WXRuby3.config.link_output_flag}#{pkg.lib_target}",
56
+ fail_on_error: true
57
+ end
58
+
59
+ def check_tool_pkgs
60
+ pkg_deps = super
61
+ pkg_deps << 'doxygen' unless system('command -v doxygen>/dev/null')
62
+ pkg_deps << 'swig' unless system('command -v swig>/dev/null')
63
+ pkg_deps
56
64
  end
57
65
 
58
66
  def get_rpath_origin
59
67
  "$ORIGIN"
60
68
  end
61
69
 
70
+ def expand(cmd)
71
+ STDERR.puts "> sh: #{cmd}" if verbose?
72
+ s = super
73
+ STDERR.puts "< #{s}" if verbose?
74
+ s
75
+ end
76
+
62
77
  private
63
78
 
64
79
  def wx_checkout
65
- check_git
80
+ $stdout.print 'Checking out wxWidgets...' if run_silent?
66
81
  # clone wxWidgets GIT repository under ext_path
67
82
  chdir(ext_path) do
68
- if (rc = sh("git clone https://github.com/wxWidgets/wxWidgets.git"))
83
+ if (rc = sh("#{get_cfg_string('git')} clone https://github.com/wxWidgets/wxWidgets.git"))
69
84
  chdir('wxWidgets') do
70
85
  tag = if @wx_version
71
86
  "v#{@wx_version}"
72
87
  else
73
- expand('git tag').split("\n").select { |t| (/\Av3\.(\d+)/ =~ t) && $1.to_i >= 2 }.max
88
+ expand("#{get_cfg_string('git')} tag").split("\n").select { |t| (/\Av3\.(\d+)/ =~ t) && $1.to_i >= 2 }.max
74
89
  end
75
90
  # checkout the version we are building against
76
- rc = sh("git checkout #{tag}")
91
+ rc = sh("#{get_cfg_string('git')} checkout #{tag}")
77
92
  end
78
93
  end
79
- unless rc
80
- STDERR.puts "ERROR: Failed to checkout wxWidgets."
94
+ if rc
95
+ $stdout.puts 'done!' if run_silent?
96
+ else
97
+ $stderr.puts "ERROR: Failed to checkout wxWidgets."
81
98
  exit(1)
82
99
  end
83
100
  end
@@ -92,36 +109,36 @@ module WXRuby3
92
109
  end
93
110
 
94
111
  def wx_build
112
+ $stdout.print 'Configuring wxWidgets...' if run_silent?
95
113
  # initialize submodules
96
- unless sh('git submodule update --init')
97
- STDERR.puts "ERROR: Failed to update wxWidgets submodules."
114
+ unless sh("#{get_cfg_string('git')} submodule update --init")
115
+ $stderr.puts "ERROR: Failed to update wxWidgets submodules."
98
116
  exit(1)
99
117
  end
100
118
  # configure wxWidgets
101
119
  unless wx_configure
102
- STDERR.puts "ERROR: Failed to configure wxWidgets."
120
+ $stderr.puts "ERROR: Failed to configure wxWidgets."
103
121
  exit(1)
104
122
  end
123
+ $stdout.puts 'done!' if run_silent?
124
+ $stdout.print 'Building wxWidgets...' if run_silent?
105
125
  # make and install wxWidgets
106
126
  unless wx_make
107
- STDERR.puts "ERROR: Failed to build wxWidgets libraries."
127
+ $stderr.puts "ERROR: Failed to build wxWidgets libraries."
108
128
  exit(1)
109
129
  end
130
+ $stdout.puts 'done!' if run_silent?
110
131
  end
111
132
 
112
133
  def wx_generate_xml
113
134
  chdir(File.join(ext_path, 'wxWidgets', 'docs', 'doxygen')) do
114
- sh({ 'WX_SKIP_DOXYGEN_VERSION_CHECK' => '1' }, './regen.sh xml')
135
+ unless sh({ 'DOXYGEN' => get_cfg_string("doxygen"), 'WX_SKIP_DOXYGEN_VERSION_CHECK' => '1' }, './regen.sh xml')
136
+ $stderr.puts 'ERROR: Failed to generate wxWidgets XML API specifications for parsing by wxRuby3.'
137
+ exit(1)
138
+ end
115
139
  end
116
140
  end
117
141
 
118
- def expand(cmd)
119
- STDERR.puts "> sh: #{cmd}" if verbose?
120
- s = super
121
- STDERR.puts "< #{s}" if verbose?
122
- s
123
- end
124
-
125
142
  # Allow specification of custom wxWidgets build (mostly useful for
126
143
  # static wxRuby3 builds)
127
144
  def get_wx_path