wxruby3 0.9.7 → 0.9.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/INSTALL.md +161 -42
- data/README.md +28 -22
- data/ext/mkrf_conf_ext.rb +68 -0
- data/lib/wx/core/secret_store.rb +38 -0
- data/lib/wx/doc/extra/02_lifecycles.md +4 -4
- data/lib/wx/doc/extra/14_config.md +1 -1
- data/lib/wx/doc/secret_store.rb +55 -0
- data/lib/wx/version.rb +1 -1
- data/lib/wx/wxruby/base.rb +3 -5
- data/lib/wx/wxruby/cmd/check.rb +182 -0
- data/lib/wx/wxruby/cmd/sampler.rb +1 -1
- data/lib/wx/wxruby/cmd/setup.rb +6 -3
- data/lib/wx/wxruby/cmd/test.rb +1 -1
- data/rakelib/configure.rb +60 -52
- data/rakelib/gem.rake +97 -67
- data/rakelib/gem.rb +293 -41
- data/rakelib/install.rb +3 -3
- data/rakelib/lib/config/{cygwin.rb → freebsd.rb} +1 -1
- data/rakelib/lib/config/linux.rb +3 -1
- data/rakelib/lib/config/macosx.rb +42 -11
- data/rakelib/lib/config/mingw.rb +2 -2
- data/rakelib/lib/config/pkgman/{base.rb → linux.rb} +36 -61
- data/rakelib/lib/config/pkgman/macosx.rb +17 -78
- data/rakelib/lib/config/unixish.rb +11 -1
- data/rakelib/lib/config/{netbsd.rb → unknown.rb} +3 -2
- data/rakelib/lib/config.rb +49 -29
- data/rakelib/lib/director/aui_manager.rb +1 -1
- data/rakelib/lib/director/dialog.rb +8 -0
- data/rakelib/lib/director/grid_ctrl.rb +2 -2
- data/rakelib/lib/director/richtext_composite_object.rb +2 -4
- data/rakelib/lib/director/secret_store.rb +117 -0
- data/rakelib/lib/director/tree_event.rb +2 -2
- data/rakelib/lib/generate/doc/secret_store.yaml +55 -0
- data/rakelib/lib/generate/doc.rb +1 -1
- data/rakelib/lib/specs/interfaces.rb +1 -0
- data/rakelib/lib/typemap/common.rb +10 -0
- data/rakelib/prepost.rake +8 -1
- data/rakelib/yard/templates/default/fulldoc/html/css/wxruby3.css +4 -0
- data/samples/sampler/sample.rb +2 -0
- data/tests/lib/wxapp_runner.rb +1 -1
- data/tests/test_config.rb +7 -4
- data/tests/test_secret_store.rb +83 -0
- metadata +41 -22
- data/rakefile +0 -14
- data/rakelib/lib/config/pkgman/arch.rb +0 -53
- data/rakelib/lib/config/pkgman/debian.rb +0 -66
- data/rakelib/lib/config/pkgman/rhel.rb +0 -54
- data/rakelib/lib/config/pkgman/suse.rb +0 -54
data/rakelib/prepost.rake
CHANGED
@@ -29,14 +29,21 @@ namespace 'wxruby' do
|
|
29
29
|
$stdout.puts 'done!' if WXRuby3.config.run_silent?
|
30
30
|
# cleanup
|
31
31
|
rm_rf('rakelib', verbose: !WXRuby3.config.run_silent?)
|
32
|
+
rm_f('Rakefile', verbose: !WXRuby3.config.run_silent?)
|
33
|
+
rm_f('ext/mkrf_conf_ext.rb', verbose: !WXRuby3.config.run_silent?)
|
32
34
|
rm_rf('ext/wxruby3', verbose: !WXRuby3.config.run_silent?)
|
33
35
|
WXRuby3.config.cleanup_bootstrap
|
34
36
|
File.open(File.join(WXRuby3::Config.wxruby_root, 'ext', 'wxruby.setup.done'), 'w') { |f| f << '1' }
|
35
37
|
end
|
36
38
|
|
37
|
-
task :
|
39
|
+
task :binpkg => 'gem:install' do
|
38
40
|
# cleanup
|
39
41
|
rm_rf('rakelib')
|
42
|
+
rm_f('Rakefile')
|
43
|
+
rm_f('ext/mkrf_conf_ext.rb')
|
44
|
+
rm_rf('ext/wxruby3')
|
45
|
+
rm_f('*.pkg')
|
46
|
+
rm_f('*.sha')
|
40
47
|
File.open(File.join(WXRuby3::Config.wxruby_root, 'ext', 'wxruby.setup.done'), 'w') { |f| f << '1' }
|
41
48
|
end
|
42
49
|
|
data/samples/sampler/sample.rb
CHANGED
data/tests/lib/wxapp_runner.rb
CHANGED
data/tests/test_config.rb
CHANGED
@@ -203,13 +203,16 @@ class TestConfig < Test::Unit::TestCase
|
|
203
203
|
def run_env_var_tests(cfg)
|
204
204
|
# by default expansion is on
|
205
205
|
|
206
|
+
# Cirrus CI Linux builds run in privileged container without proper user env
|
207
|
+
has_user = Wx::PLATFORM == 'WXMSW' || ENV['USER']
|
208
|
+
|
206
209
|
# add a number of entries for env var in new group 'Environment'
|
207
210
|
cfg['/Environment/HOME'] = '$HOME'
|
208
|
-
cfg['Environment'].USER = Wx::PLATFORM == 'WXMSW' ? '%USERNAME%' : '${USER}'
|
211
|
+
cfg['Environment'].USER = Wx::PLATFORM == 'WXMSW' ? '%USERNAME%' : '${USER}' if has_user
|
209
212
|
cfg['/Environment/PATH'] = '$(PATH)'
|
210
213
|
|
211
214
|
assert_equal(ENV['HOME'], cfg.Environment['HOME'])
|
212
|
-
assert_equal(ENV[Wx::PLATFORM == 'WXMSW' ? 'USERNAME' : 'USER'], cfg['/Environment/USER'])
|
215
|
+
assert_equal(ENV[Wx::PLATFORM == 'WXMSW' ? 'USERNAME' : 'USER'], cfg['/Environment/USER']) if has_user
|
213
216
|
assert_equal(ENV['PATH'], cfg.Environment.PATH)
|
214
217
|
|
215
218
|
# test escaping
|
@@ -225,9 +228,9 @@ class TestConfig < Test::Unit::TestCase
|
|
225
228
|
|
226
229
|
assert_equal('${NonExistingLongNonsenseVariable}', cfg.Environment['NONSENSE'])
|
227
230
|
|
228
|
-
cfg['/Environment/MULTIPLE'] = "$HOME / #{Wx::PLATFORM == 'WXMSW' ? '%USERNAME%' : '${USER}'}"
|
231
|
+
cfg['/Environment/MULTIPLE'] = "$HOME / #{Wx::PLATFORM == 'WXMSW' ? '%USERNAME%' : '${USER}'}" if has_user
|
229
232
|
|
230
|
-
assert_equal("#{ENV['HOME']} / #{Wx::PLATFORM == 'WXMSW' ? ENV['USERNAME'] : ENV['USER']}", cfg.Environment['MULTIPLE'])
|
233
|
+
assert_equal("#{ENV['HOME']} / #{Wx::PLATFORM == 'WXMSW' ? ENV['USERNAME'] : ENV['USER']}", cfg.Environment['MULTIPLE']) if has_user
|
231
234
|
|
232
235
|
# disable env var expansion
|
233
236
|
cfg.expand_env_vars = false
|
@@ -0,0 +1,83 @@
|
|
1
|
+
# Copyright (c) 2023 M.J.N. Corino, The Netherlands
|
2
|
+
#
|
3
|
+
# This software is released under the MIT license.
|
4
|
+
|
5
|
+
require_relative './lib/wxapp_runner'
|
6
|
+
|
7
|
+
require 'digest'
|
8
|
+
|
9
|
+
class TestSecretStore < Test::Unit::TestCase
|
10
|
+
|
11
|
+
unless is_ci_build?
|
12
|
+
|
13
|
+
def test_store
|
14
|
+
if Wx.has_feature?(:USE_SECRETSTORE)
|
15
|
+
state, err = Wx::SecretStore.get_default.ok?
|
16
|
+
if state
|
17
|
+
puts "SecretStore OK"
|
18
|
+
|
19
|
+
if Wx::WXWIDGETS_VERSION > '3.2.4'
|
20
|
+
password = Digest::SHA256.digest('My Secret Password!')
|
21
|
+
else
|
22
|
+
password = Digest::SHA256.hexdigest('My Secret Password!') # binary secrets does not work
|
23
|
+
end
|
24
|
+
secret_val = Wx::SecretValue.new(password)
|
25
|
+
assert_true(Wx::SecretStore.get_default.save('My/Service', 'a_user', secret_val))
|
26
|
+
|
27
|
+
secret_val2 = Wx::SecretValue.new
|
28
|
+
rc, user = Wx::SecretStore.get_default.load('My/Service', secret_val2)
|
29
|
+
assert_true(rc)
|
30
|
+
assert_equal('a_user', user)
|
31
|
+
assert_equal(secret_val, secret_val2)
|
32
|
+
assert_equal(password, secret_val2.get_data)
|
33
|
+
|
34
|
+
password = 'My Secret Password!'
|
35
|
+
secret_val = Wx::SecretValue.new(password)
|
36
|
+
assert_true(Wx::SecretStore.get_default.save('My/Service', 'a_user', secret_val))
|
37
|
+
|
38
|
+
secret_val2 = Wx::SecretValue.new
|
39
|
+
rc, user = Wx::SecretStore.get_default.load('My/Service', secret_val2)
|
40
|
+
assert_true(rc)
|
41
|
+
assert_equal('a_user', user)
|
42
|
+
assert_equal(secret_val, secret_val2)
|
43
|
+
assert_equal(password, secret_val2.get_as_string)
|
44
|
+
|
45
|
+
password = 'My Secret Password!'.encode('UTF-16')
|
46
|
+
secret_val = Wx::SecretValue.new(password)
|
47
|
+
assert_true(Wx::SecretStore.get_default.save('My/Service', 'a_user', secret_val))
|
48
|
+
|
49
|
+
secret_val2 = Wx::SecretValue.new
|
50
|
+
rc, user = Wx::SecretStore.get_default.load('My/Service', secret_val2)
|
51
|
+
assert_true(rc)
|
52
|
+
assert_equal('a_user', user)
|
53
|
+
assert_equal(secret_val, secret_val2)
|
54
|
+
assert_equal(password, secret_val2.get_as_string)
|
55
|
+
assert_not_equal('My Secret Password!'.encode('UTF-16'), secret_val2.get_as_string)
|
56
|
+
assert_equal('My Secret Password!'.encode('UTF-16'), secret_val2.get_as_string.encode('UTF-16'))
|
57
|
+
|
58
|
+
password = 'My Secret Password!'.encode('UTF-32')
|
59
|
+
secret_val = Wx::SecretValue.new(password)
|
60
|
+
assert_true(Wx::SecretStore.get_default.save('My/Service', 'a_user', secret_val))
|
61
|
+
|
62
|
+
secret_val2 = Wx::SecretValue.new
|
63
|
+
rc, user = Wx::SecretStore.get_default.load('My/Service', secret_val2)
|
64
|
+
assert_true(rc)
|
65
|
+
assert_equal('a_user', user)
|
66
|
+
assert_equal(secret_val, secret_val2)
|
67
|
+
assert_equal(password, secret_val2.get_as_string)
|
68
|
+
assert_not_equal('My Secret Password!'.encode('UTF-32'), secret_val2.get_as_string)
|
69
|
+
assert_equal('My Secret Password!'.encode('UTF-32'), secret_val2.get_as_string.encode('UTF-32'))
|
70
|
+
|
71
|
+
assert_true(Wx::SecretStore.get_default.delete('My/Service'))
|
72
|
+
|
73
|
+
else
|
74
|
+
puts "Default SecretStore not usable : #{err}"
|
75
|
+
end
|
76
|
+
else
|
77
|
+
puts 'Wx::SecretStore not available'
|
78
|
+
end
|
79
|
+
end
|
80
|
+
|
81
|
+
end
|
82
|
+
|
83
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: wxruby3
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Martin Corino
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-03-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nokogiri
|
@@ -66,12 +66,27 @@ dependencies:
|
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '3.5'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: plat4m
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '1.0'
|
76
|
+
type: :runtime
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '1.0'
|
69
83
|
description: wxRuby3 is a Ruby library providing an extension for the wxWidgets C++
|
70
84
|
UI framework
|
71
85
|
email: mcorino@m2c-software.nl
|
72
86
|
executables:
|
73
87
|
- wxruby
|
74
|
-
extensions:
|
88
|
+
extensions:
|
89
|
+
- ext/mkrf_conf_ext.rb
|
75
90
|
extra_rdoc_files: []
|
76
91
|
files:
|
77
92
|
- ".yardopts"
|
@@ -95,6 +110,7 @@ files:
|
|
95
110
|
- assets/logo.xcf
|
96
111
|
- assets/repo-social-preview.png
|
97
112
|
- bin/wxruby
|
113
|
+
- ext/mkrf_conf_ext.rb
|
98
114
|
- ext/wxruby3/include/wxRubyApp.h
|
99
115
|
- ext/wxruby3/include/wxruby-ClientData.h
|
100
116
|
- ext/wxruby3/include/wxruby-ComboPopup.h
|
@@ -199,6 +215,7 @@ files:
|
|
199
215
|
- lib/wx/core/real_point.rb
|
200
216
|
- lib/wx/core/rect.rb
|
201
217
|
- lib/wx/core/region_iterator.rb
|
218
|
+
- lib/wx/core/secret_store.rb
|
202
219
|
- lib/wx/core/simplehelpprovider.rb
|
203
220
|
- lib/wx/core/size.rb
|
204
221
|
- lib/wx/core/sizer.rb
|
@@ -318,6 +335,7 @@ files:
|
|
318
335
|
- lib/wx/doc/rtc/richtext_style_sheet.rb
|
319
336
|
- lib/wx/doc/scaled_dc.rb
|
320
337
|
- lib/wx/doc/screen_dc.rb
|
338
|
+
- lib/wx/doc/secret_store.rb
|
321
339
|
- lib/wx/doc/sizer.rb
|
322
340
|
- lib/wx/doc/static_bitmap.rb
|
323
341
|
- lib/wx/doc/stc/styled_text_ctrl.rb
|
@@ -395,10 +413,10 @@ files:
|
|
395
413
|
- lib/wx/stc/styled_text_ctrl.rb
|
396
414
|
- lib/wx/version.rb
|
397
415
|
- lib/wx/wxruby/base.rb
|
416
|
+
- lib/wx/wxruby/cmd/check.rb
|
398
417
|
- lib/wx/wxruby/cmd/sampler.rb
|
399
418
|
- lib/wx/wxruby/cmd/setup.rb
|
400
419
|
- lib/wx/wxruby/cmd/test.rb
|
401
|
-
- rakefile
|
402
420
|
- rakelib/bin.rake
|
403
421
|
- rakelib/bin.rb
|
404
422
|
- rakelib/build.rake
|
@@ -412,18 +430,14 @@ files:
|
|
412
430
|
- rakelib/install.rake
|
413
431
|
- rakelib/install.rb
|
414
432
|
- rakelib/lib/config.rb
|
415
|
-
- rakelib/lib/config/
|
433
|
+
- rakelib/lib/config/freebsd.rb
|
416
434
|
- rakelib/lib/config/linux.rb
|
417
435
|
- rakelib/lib/config/macosx.rb
|
418
436
|
- rakelib/lib/config/mingw.rb
|
419
|
-
- rakelib/lib/config/
|
420
|
-
- rakelib/lib/config/pkgman/arch.rb
|
421
|
-
- rakelib/lib/config/pkgman/base.rb
|
422
|
-
- rakelib/lib/config/pkgman/debian.rb
|
437
|
+
- rakelib/lib/config/pkgman/linux.rb
|
423
438
|
- rakelib/lib/config/pkgman/macosx.rb
|
424
|
-
- rakelib/lib/config/pkgman/rhel.rb
|
425
|
-
- rakelib/lib/config/pkgman/suse.rb
|
426
439
|
- rakelib/lib/config/unixish.rb
|
440
|
+
- rakelib/lib/config/unknown.rb
|
427
441
|
- rakelib/lib/core/include/client_data.inc
|
428
442
|
- rakelib/lib/core/include/enum.inc
|
429
443
|
- rakelib/lib/core/include/funcall.inc
|
@@ -633,6 +647,7 @@ files:
|
|
633
647
|
- rakelib/lib/director/scroll_bar.rb
|
634
648
|
- rakelib/lib/director/scrolled_t.rb
|
635
649
|
- rakelib/lib/director/searchctrl.rb
|
650
|
+
- rakelib/lib/director/secret_store.rb
|
636
651
|
- rakelib/lib/director/sizer.rb
|
637
652
|
- rakelib/lib/director/sizer_item.rb
|
638
653
|
- rakelib/lib/director/slider.rb
|
@@ -753,6 +768,7 @@ files:
|
|
753
768
|
- rakelib/lib/generate/doc/scrolled_canvas.yaml
|
754
769
|
- rakelib/lib/generate/doc/scrolled_control.yaml
|
755
770
|
- rakelib/lib/generate/doc/scrolled_window.yaml
|
771
|
+
- rakelib/lib/generate/doc/secret_store.yaml
|
756
772
|
- rakelib/lib/generate/doc/sizer.yaml
|
757
773
|
- rakelib/lib/generate/doc/splash_screen.yaml
|
758
774
|
- rakelib/lib/generate/doc/static_box.yaml
|
@@ -1126,6 +1142,7 @@ files:
|
|
1126
1142
|
- tests/test_pg.rb
|
1127
1143
|
- tests/test_proof_check.rb
|
1128
1144
|
- tests/test_richtext.rb
|
1145
|
+
- tests/test_secret_store.rb
|
1129
1146
|
- tests/test_sizer.rb
|
1130
1147
|
- tests/test_std_controls.rb
|
1131
1148
|
- tests/test_styled_text_ctrl.rb
|
@@ -1141,17 +1158,19 @@ licenses:
|
|
1141
1158
|
- MIT
|
1142
1159
|
metadata:
|
1143
1160
|
bug_tracker_uri: https://github.com/mcorino/wxRuby3/issues
|
1144
|
-
source_code_uri: https://github.com/mcorino/wxRuby3
|
1145
|
-
documentation_uri: https://mcorino.github.io/wxRuby3
|
1146
1161
|
homepage_uri: https://github.com/mcorino/wxRuby3
|
1147
|
-
|
1148
|
-
|
1149
|
-
|
1150
|
-
|
1151
|
-
|
1152
|
-
|
1153
|
-
|
1154
|
-
|
1162
|
+
documentation_uri: https://mcorino.github.io/wxRuby3
|
1163
|
+
github_repo: https://github.com/mcorino/wxRuby3
|
1164
|
+
post_install_message: "\nThe wxRuby3 Gem has been successfully installed including
|
1165
|
+
the 'wxruby' utility.\n\nIn case no suitable binary release package was available
|
1166
|
+
for your platform you \nwill need to run the post-install setup process by executing:\n\n$
|
1167
|
+
wxruby setup\n\nTo check whether wxRuby3 is ready to run or not you can at any time
|
1168
|
+
execute the \nfollowing command:\n\n$ wxruby check\n\nRun 'wxruby check -h' for
|
1169
|
+
more information.\n\nWhen the wxRuby3 setup has been fully completed you can start
|
1170
|
+
using wxRuby3.\n\nYou can run the regression tests to verify the installation by
|
1171
|
+
executing:\n\n$ wxruby test\n\nThe wxRuby3 sample explorer can be run by executing:\n\n$
|
1172
|
+
wxruby sampler\n\nHave fun using wxRuby3.\n\nRun 'wxruby -h' to see information
|
1173
|
+
on the available commands.\n\n"
|
1155
1174
|
rdoc_options:
|
1156
1175
|
- "--exclude=\\.dll"
|
1157
1176
|
- "--exclude=\\.so"
|
@@ -1171,7 +1190,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
1171
1190
|
- !ruby/object:Gem::Version
|
1172
1191
|
version: '0'
|
1173
1192
|
requirements: []
|
1174
|
-
rubygems_version: 3.
|
1193
|
+
rubygems_version: 3.5.3
|
1175
1194
|
signing_key:
|
1176
1195
|
specification_version: 4
|
1177
1196
|
summary: wxWidgets extension for Ruby
|
data/rakefile
DELETED
@@ -1,14 +0,0 @@
|
|
1
|
-
###
|
2
|
-
# wxRuby3 rake file
|
3
|
-
# Copyright (c) M.J.N. Corino, The Netherlands
|
4
|
-
###
|
5
|
-
|
6
|
-
# Influential environment variables
|
7
|
-
# WXRUBY_VERBOSE : define verbosity for (rake) build scripts
|
8
|
-
# WXRUBY_VERSION : define the version info (x.x.x) for this tree
|
9
|
-
# WXRUBY_EXCLUDED : exclude certain classes from being compiled, even if present
|
10
|
-
#
|
11
|
-
# WXWIN : install folder of wxWidgets library if not system default
|
12
|
-
# WXXML : folder containing doxygen generated wxWidgets XML interface specs if not using wxRuby bootstrap
|
13
|
-
|
14
|
-
task :default => 'wxruby:help'
|
@@ -1,53 +0,0 @@
|
|
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 Arch Linux type systems
|
7
|
-
###
|
8
|
-
|
9
|
-
module WXRuby3
|
10
|
-
|
11
|
-
module Config
|
12
|
-
|
13
|
-
module Platform
|
14
|
-
|
15
|
-
module PkgManager
|
16
|
-
|
17
|
-
PLATFORM_DEPS = %w[pkg-config gtk3 webkit2gtk gspell libunwind gstreamer curl libsecret libnotify libpng12]
|
18
|
-
|
19
|
-
class << self
|
20
|
-
|
21
|
-
private
|
22
|
-
|
23
|
-
def do_install(distro, pkgs)
|
24
|
-
run_pacman(make_install_cmd(pkgs))
|
25
|
-
end
|
26
|
-
|
27
|
-
def add_platform_pkgs(pkgs)
|
28
|
-
if pkgs.include?('g++')
|
29
|
-
pkgs.delete('g++')
|
30
|
-
pkgs << 'gcc'
|
31
|
-
end
|
32
|
-
# find pkgs we need
|
33
|
-
PLATFORM_DEPS.inject(pkgs) { |list, pkg| list << pkg unless system("pacman -Qq #{pkg} >/dev/null 2>&1"); list }
|
34
|
-
end
|
35
|
-
|
36
|
-
def run_pacman(cmd)
|
37
|
-
run("pacman -q --noconfirm #{cmd}")
|
38
|
-
end
|
39
|
-
|
40
|
-
def make_install_cmd(pkgs)
|
41
|
-
# create install command
|
42
|
-
"-S --needed #{ pkgs.join(' ') }"
|
43
|
-
end
|
44
|
-
|
45
|
-
end
|
46
|
-
|
47
|
-
end
|
48
|
-
|
49
|
-
end
|
50
|
-
|
51
|
-
end
|
52
|
-
|
53
|
-
end
|
@@ -1,66 +0,0 @@
|
|
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
|
@@ -1,54 +0,0 @@
|
|
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
|
@@ -1,54 +0,0 @@
|
|
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
|