wxruby3 0.9.7 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (184) hide show
  1. checksums.yaml +4 -4
  2. data/INSTALL.md +183 -42
  3. data/README.md +40 -48
  4. data/ext/mkrf_conf_ext.rb +72 -0
  5. data/lib/wx/core/app.rb +16 -0
  6. data/lib/wx/core/colour.rb +36 -28
  7. data/lib/wx/core/const.rb +19 -0
  8. data/lib/wx/core/enum.rb +17 -1
  9. data/lib/wx/core/geometry.rb +121 -0
  10. data/lib/wx/core/graphics_pen_info.rb +18 -0
  11. data/lib/wx/core/image.rb +49 -0
  12. data/lib/wx/core/menu_bar.rb +11 -0
  13. data/lib/wx/core/paintdc.rb +9 -3
  14. data/lib/wx/core/secret_store.rb +38 -0
  15. data/lib/wx/doc/app.rb +97 -41
  16. data/lib/wx/doc/bitmap.rb +4 -0
  17. data/lib/wx/doc/client_dc.rb +2 -2
  18. data/lib/wx/doc/clipboard.rb +1 -1
  19. data/lib/wx/doc/colour.rb +12 -0
  20. data/lib/wx/doc/const.rb +16 -0
  21. data/lib/wx/doc/cursor.rb +4 -0
  22. data/lib/wx/doc/dc_overlay.rb +34 -0
  23. data/lib/wx/doc/enum.rb +7 -1
  24. data/lib/wx/doc/event_blocker.rb +1 -1
  25. data/lib/wx/doc/evthandler.rb +25 -3
  26. data/lib/wx/doc/functions.rb +3 -6
  27. data/lib/wx/doc/gc_dc.rb +13 -4
  28. data/lib/wx/doc/geometry.rb +136 -0
  29. data/lib/wx/doc/graphics_context.rb +25 -7
  30. data/lib/wx/doc/icon.rb +4 -0
  31. data/lib/wx/doc/image.rb +56 -0
  32. data/lib/wx/doc/list_ctrl.rb +6 -6
  33. data/lib/wx/doc/memory_dc.rb +2 -11
  34. data/lib/wx/doc/mirror_dc.rb +1 -1
  35. data/lib/wx/doc/pen.rb +26 -0
  36. data/lib/wx/doc/persistence_manager.rb +1 -1
  37. data/lib/wx/doc/persistent_object.rb +1 -1
  38. data/lib/wx/doc/pg/property_grid_interface.rb +3 -3
  39. data/lib/wx/doc/prt/printer_dc.rb +2 -2
  40. data/lib/wx/doc/region_iterator.rb +1 -1
  41. data/lib/wx/doc/scaled_dc.rb +1 -1
  42. data/lib/wx/doc/screen_dc.rb +1 -1
  43. data/lib/wx/doc/secret_store.rb +55 -0
  44. data/lib/wx/doc/svg_file_dc.rb +1 -1
  45. data/lib/wx/doc/textctrl.rb +1 -1
  46. data/lib/wx/doc/tree_ctrl.rb +2 -2
  47. data/lib/wx/doc/validator.rb +6 -6
  48. data/lib/wx/doc/variant.rb +2 -2
  49. data/lib/wx/doc/window.rb +5 -4
  50. data/lib/wx/grid/keyword_defs.rb +1 -1
  51. data/lib/wx/html/keyword_defs.rb +3 -3
  52. data/lib/wx/keyword_defs.rb +76 -71
  53. data/lib/wx/pg/keyword_defs.rb +2 -2
  54. data/lib/wx/pg/pg_property.rb +12 -0
  55. data/lib/wx/rbn/keyword_defs.rb +1 -1
  56. data/lib/wx/rtc/keyword_defs.rb +1 -1
  57. data/lib/wx/stc/keyword_defs.rb +1 -1
  58. data/lib/wx/version.rb +1 -1
  59. data/lib/wx/wxruby/base.rb +3 -5
  60. data/lib/wx/wxruby/cmd/check.rb +182 -0
  61. data/lib/wx/wxruby/cmd/sampler.rb +1 -1
  62. data/lib/wx/wxruby/cmd/setup.rb +9 -3
  63. data/lib/wx/wxruby/cmd/test.rb +1 -1
  64. data/rakelib/configure.rb +67 -52
  65. data/rakelib/gem.rake +97 -66
  66. data/rakelib/gem.rb +294 -41
  67. data/rakelib/install.rb +3 -3
  68. data/rakelib/lib/config/{cygwin.rb → freebsd.rb} +1 -1
  69. data/rakelib/lib/config/linux.rb +4 -2
  70. data/rakelib/lib/config/macosx.rb +42 -11
  71. data/rakelib/lib/config/mingw.rb +2 -2
  72. data/rakelib/lib/config/pkgman/{base.rb → linux.rb} +36 -61
  73. data/rakelib/lib/config/pkgman/macosx.rb +17 -78
  74. data/rakelib/lib/config/unixish.rb +17 -8
  75. data/rakelib/lib/config/{netbsd.rb → unknown.rb} +3 -2
  76. data/rakelib/lib/config.rb +74 -33
  77. data/rakelib/lib/core/include/enum.inc +31 -1
  78. data/rakelib/lib/director/affine_matrix.rb +51 -0
  79. data/rakelib/lib/director/app.rb +29 -13
  80. data/rakelib/lib/director/art_provider.rb +4 -0
  81. data/rakelib/lib/director/aui_manager.rb +1 -1
  82. data/rakelib/lib/director/cursor.rb +6 -2
  83. data/rakelib/lib/director/dc.rb +1 -6
  84. data/rakelib/lib/director/derived_dc.rb +88 -31
  85. data/rakelib/lib/director/geometry.rb +142 -0
  86. data/rakelib/lib/director/graphics_context.rb +3 -2
  87. data/rakelib/lib/director/graphics_object.rb +18 -25
  88. data/rakelib/lib/director/grid_ctrl.rb +2 -2
  89. data/rakelib/lib/director/image.rb +59 -0
  90. data/rakelib/lib/director/menu.rb +2 -3
  91. data/rakelib/lib/director/menu_bar.rb +0 -3
  92. data/rakelib/lib/director/pen.rb +1 -1
  93. data/rakelib/lib/director/richtext_composite_object.rb +2 -4
  94. data/rakelib/lib/director/richtext_ctrl.rb +1 -1
  95. data/rakelib/lib/director/secret_store.rb +117 -0
  96. data/rakelib/lib/director/system_settings.rb +1 -1
  97. data/rakelib/lib/director/tree_event.rb +2 -2
  98. data/rakelib/lib/director/window.rb +4 -3
  99. data/rakelib/lib/extractor/function.rb +1 -1
  100. data/rakelib/lib/generate/doc/animation_ctrl.yaml +10 -0
  101. data/rakelib/lib/generate/doc/banner_window.yaml +35 -0
  102. data/rakelib/lib/generate/doc/graphics_context.yaml +12 -0
  103. data/rakelib/lib/generate/doc/graphics_object.yaml +12 -0
  104. data/rakelib/lib/generate/doc/grid_ctrl.yaml +25 -0
  105. data/rakelib/lib/generate/doc/header_ctrl.yaml +91 -0
  106. data/rakelib/lib/generate/doc/icon.yaml +10 -0
  107. data/rakelib/lib/generate/doc/info_bar.yaml +27 -0
  108. data/rakelib/lib/generate/doc/log.yaml +1 -1
  109. data/rakelib/lib/generate/doc/media_ctrl.yaml +27 -0
  110. data/rakelib/lib/generate/doc/persistent_window.yaml +22 -0
  111. data/rakelib/lib/generate/doc/pg_editor.yaml +1 -1
  112. data/rakelib/lib/generate/doc/pg_property.yaml +4 -4
  113. data/rakelib/lib/generate/doc/rearrange_list.yaml +14 -0
  114. data/rakelib/lib/generate/doc/ribbon_panel.yaml +15 -0
  115. data/rakelib/lib/generate/doc/rich_text_formatting_dialog.yaml +26 -0
  116. data/rakelib/lib/generate/doc/secret_store.yaml +55 -0
  117. data/rakelib/lib/generate/doc/text_ctrl.yaml +1 -1
  118. data/rakelib/lib/generate/doc/wizard.yaml +27 -0
  119. data/rakelib/lib/generate/doc.rb +5 -5
  120. data/rakelib/lib/generate/interface.rb +1 -1
  121. data/rakelib/lib/specs/interfaces.rb +4 -0
  122. data/rakelib/lib/swig_runner.rb +24 -3
  123. data/rakelib/lib/typemap/common.rb +10 -0
  124. data/rakelib/lib/typemap/points_list.rb +8 -2
  125. data/rakelib/lib/typemap/richtext.rb +17 -0
  126. data/rakelib/prepost.rake +8 -1
  127. data/rakelib/yard/templates/default/fulldoc/html/css/wxruby3.css +4 -0
  128. data/rakelib/yard/templates/default/fulldoc/html/setup.rb +3 -3
  129. data/samples/dialogs/wizard.rb +20 -19
  130. data/samples/drawing/art/drawing/image.bmp +0 -0
  131. data/samples/drawing/art/drawing/mask.bmp +0 -0
  132. data/samples/drawing/art/drawing/pat35.bmp +0 -0
  133. data/samples/drawing/art/drawing/pat36.bmp +0 -0
  134. data/samples/drawing/art/drawing/pat4.bmp +0 -0
  135. data/samples/drawing/art/drawing/smile.xpm +42 -0
  136. data/samples/drawing/drawing.rb +2276 -0
  137. data/samples/drawing/tn_drawing.png +0 -0
  138. data/samples/html/html.rb +1 -1
  139. data/samples/propgrid/propgrid.rb +1 -1
  140. data/samples/propgrid/propgrid_minimal.rb +1 -1
  141. data/samples/propgrid/sample_props.rb +1 -1
  142. data/samples/sampler/editor.rb +13 -11
  143. data/samples/sampler/sample.rb +2 -0
  144. data/samples/sampler.rb +14 -10
  145. data/samples/text/richtext.rb +53 -0
  146. data/samples/text/scintilla.rb +1 -1
  147. data/samples/text/unicode.rb +4 -4
  148. data/tests/lib/wxapp_runner.rb +1 -1
  149. data/tests/test_config.rb +7 -4
  150. data/tests/test_ext_controls.rb +12 -5
  151. data/tests/test_secret_store.rb +83 -0
  152. data/tests/test_std_controls.rb +12 -12
  153. metadata +66 -47
  154. data/lib/wx/doc/extra/00_starting.md +0 -154
  155. data/lib/wx/doc/extra/01_packages.md +0 -180
  156. data/lib/wx/doc/extra/02_lifecycles.md +0 -166
  157. data/lib/wx/doc/extra/03_dialogs.md +0 -57
  158. data/lib/wx/doc/extra/04_enums.md +0 -143
  159. data/lib/wx/doc/extra/05_event-handling.md +0 -191
  160. data/lib/wx/doc/extra/06_geometry.md +0 -62
  161. data/lib/wx/doc/extra/07_colour_and_font.md +0 -52
  162. data/lib/wx/doc/extra/08_extensions.md +0 -144
  163. data/lib/wx/doc/extra/09_exceptions.md +0 -54
  164. data/lib/wx/doc/extra/10_art.md +0 -111
  165. data/lib/wx/doc/extra/11_drawing_and_dc.md +0 -62
  166. data/lib/wx/doc/extra/12_client_data.md +0 -89
  167. data/lib/wx/doc/extra/13_validators.md +0 -139
  168. data/lib/wx/doc/extra/14_config.md +0 -101
  169. data/lib/wx/doc/extra/15_persistence.md +0 -148
  170. data/rakefile +0 -14
  171. data/rakelib/lib/config/pkgman/arch.rb +0 -53
  172. data/rakelib/lib/config/pkgman/debian.rb +0 -66
  173. data/rakelib/lib/config/pkgman/rhel.rb +0 -54
  174. data/rakelib/lib/config/pkgman/suse.rb +0 -54
  175. data/samples/sampler/back.xpm +0 -21
  176. data/samples/sampler/copy.xpm +0 -44
  177. data/samples/sampler/cut.xpm +0 -46
  178. data/samples/sampler/filesave.xpm +0 -42
  179. data/samples/sampler/find.xpm +0 -62
  180. data/samples/sampler/findrepl.xpm +0 -63
  181. data/samples/sampler/forward.xpm +0 -21
  182. data/samples/sampler/paste.xpm +0 -46
  183. data/samples/sampler/redo.xpm +0 -58
  184. data/samples/sampler/undo.xpm +0 -58
@@ -1,101 +0,0 @@
1
- <!--
2
- # @markup markdown
3
- # @title 14. Configuration support
4
- -->
5
-
6
- # 14. Configuration support
7
-
8
- ## Introduction
9
-
10
- wxRuby3 fully supports the wxWidgets config classes providing a Ruby-fied interface.
11
-
12
- The config classes provide a way to store some application configuration information providing features
13
- that make them very useful for storing all kinds of small to medium volumes of hierarchically-organized,
14
- heterogeneous data.
15
- In wxWidgets these were especially designed for storing application configuration information and intended to be
16
- mostly limited to that. That meant the information to be stored was intended to be:
17
-
18
- * Typed, i.e. strings, booleans or numbers for the moment. You cannot store binary data, for example.
19
- * Small. For instance, it is not recommended to use the Windows registry (which is the default storage medium on
20
- that platform) for amounts of data more than a couple of kilobytes.
21
- * Not performance critical, neither from speed nor from a memory consumption point of view.
22
-
23
- As you will see wxRuby3 extends the support in this area and provides means to forego a lot of these restrictions.
24
-
25
- The config classes also are intended to abstract away a lot of platform differences. In this area wxRuby3 extends the
26
- support also.
27
-
28
- ## Default configuration support
29
-
30
- When the default, global, config instance is used (by using {Wx::ConfigBase.get} with default argument) this will be
31
- a platform specific instance. On Windows platforms a Windows registry based implementation is used and on other
32
- platforms a text format configuration file.
33
-
34
- wxRuby3 provides a single wrapper class for these with {Wx::ConfigWx}. This is an abstract class that cannot be
35
- instantiated in Ruby which provides a common, Ruby-fied interface supported by all config classes in wxRuby3.
36
-
37
- While wxWidgets does a decent job of abstracting platform differences it is in no way perfect in this area. With the
38
- text format configuration files for example the stored values loose all type information since everything is stored
39
- as strings. This also differs from the registry based implementation where some type information is not lost but some
40
- (like boolean types) is.
41
- This is not a problem when accessing information for which the structure and types are exactly known as the config
42
- classes offer type specific readers (as well as writers) which coerce values to their expected types but may offer
43
- nasty surprises when more reflectively accessing data of which the exact typing and structure is not known.
44
-
45
- In Ruby where we more or less expect to have common API-s that can return or accept any type of object needing to be
46
- type specific is awkward. wxRuby3 works around this as much as possible for the {Wx::ConfigWx} wrapper class but also
47
- provides an alternative config class integrated with the wxWidgets framework that does not suffer from these restrictions.
48
-
49
- ## Enhanced Ruby configuration support
50
-
51
- Instead of the default, platform specific, config classes it is also possible to use a custom wxRuby3 extension providing
52
- a config class which is implemented in pure Ruby and integrated in the wxWidgets configuration framework.
53
- To use an instance of this class as the global config instance the {Wx::ConfigBase.create} should be called at application
54
- initialization time with it's `:use_hash_config` keyword argument set to `true` (and possibly, to be sure, it's
55
- `forced_create` argument set to `true` also). This would create an instance of {Wx::Config} and install that as the global config instance (if no other instance was
56
- yet installed or, overruling that condition, if `forced_create` was set to `true`).<br>
57
- Alternatively a {Wx::Config} (or derivative) instance could be explicitly instantiated in code and assigned as global
58
- instance with {Wx::ConfigBase.set}.
59
-
60
- As the keyword argument indicates {Wx::Config} is a Ruby `Hash` based config class implementation.
61
-
62
- Value objects are stored Ruby-style as-is into it's internal hash table (maintaining full type information) and are also
63
- retrieved as-is by default (to maintain compatibility with the {Wx::ConfigWx} wrapper type coercion options are provided).
64
- Grouping is based of nested `Hash` instances.
65
-
66
- Because of the `Hash` based implementation and lack of (the need for) type coercion the {Wx::Config} class does have **any**
67
- restrictions of the type of data stored. The only possible type restrictions to enforce may come from usage contexts:
68
-
69
- * In case of value entries shared with wxWidgets framework code (like for example entries save by the persistence
70
- framework; see [here](15_persistence.md)) value types should be restricted to those supported by the wxWidget platform
71
- specific classes and correspond to what the framework code expects.
72
- * In case of the need to save/restore the configuration data to/from persistent storage which imposes type restrictions these
73
- should be applied.
74
-
75
- With {Wx::Config} it would be perfectly alright to store arrays or any kind of arbitrary object (only be aware that `Hash`
76
- instances will always be expected to provide configuration structure by default) as long as these do not conflict with
77
- expectations of framework code or storage mechanisms.
78
-
79
- With the standard Ruby YAML and JSON serialization support this also provides improved platform independent configuration
80
- persistence options with full type information maintainability.
81
-
82
- ## Differences between default and enhanced configuration support
83
-
84
- The major difference is, as described above, the absence of type restrictions in the enhanced Ruby config class {Wx::Config}.
85
-
86
- Another difference is that {Wx::Config} will not automatically create missing groups or entries on reading. This will only
87
- happen when writing configuration values.
88
-
89
- A last difference is that the default support is by default backed up by persistent storage (windows registry or file) and
90
- the wxRuby enhanced support only provides in-memory storage (`Hash` instance) by default. +
91
- Persisting configuration data from {Wx::Config} will require coding customized storage and retrieval operations (which is
92
- trivial using standard YAML or JSON support).
93
-
94
- ## Differences between wxWidgets config interface and wxRuby
95
-
96
- In wxRuby there is no option to provide a default value argument when reading values. The reasoning is that Ruby itself
97
- provides more than enough options to elegantly provide for defaults with statement options like `var ||= default` or
98
- `var = get('something') || default`.
99
-
100
- As a consequence wxRuby also does not support recording defaults on read operations (and also does not provide the
101
- corresponding option setter/getter in the interface).
@@ -1,148 +0,0 @@
1
- <!--
2
- # @markup markdown
3
- # @title 15. Persistence support
4
- -->
5
-
6
- # 15. Persistence support
7
-
8
- ## Introduction
9
-
10
- wxRuby3 fully supports the wxWidgets persistence framework.
11
-
12
- This framework provides the means to persist window (and other object) states which can than be restored when
13
- re-creating these objects.
14
-
15
- The persistence framework depends on the configuration framework (see [here](14_config.md)).
16
-
17
- The persistence framework includes the following components:
18
-
19
- * {Wx::PersistenceManager} which all persistent objects register themselves with. This class handles actual saving
20
- and restoring of persistent data.
21
- * Persistent object adapters for persistent objects. These adapters provide a bridge between the associated class –
22
- which has no special persistence support – and {Wx::PersistenceManager}. All Persistent object adapters need to derive
23
- from {Wx::PersistentObject} (like {Wx::PersistentWindowBase} and it's derivatives).
24
- * The {Wx.create_persistent_object} and {Wx.persistent_register_and_restore} methods (mainly convenience methods for
25
- wxWidgets compatibility).
26
-
27
- ## Persistence manager
28
-
29
- By default a global singleton manager instance is available through {Wx::PersistenceManager.get} which will be used
30
- by all available persistent object adapters for saving/restoring state values.
31
-
32
- An alternate (possibly customized) manager instance can be installed through {Wx::PersistenceManager.set}.
33
-
34
- ## Persistent object adapters
35
-
36
- All persistent object adapters must be derived from {Wx::PersistentObject}. This class provides common methods for
37
- saving and restoring state values connecting to the persistence manager for actual writing and reading.
38
-
39
- All windows/objects to be persisted need to be registered with the persistence manager. Creating the correct persistent
40
- object adapter instance for an object to persist is abstracted away in wxWidgets by using template methods allowing
41
- to simply only provide the object to persist instead of having to explicitly instantiate an adapter instance and provide
42
- both to the persistence manager (which is however still possible).
43
-
44
- wxRuby3 replaces this convenience interface (incompatible with Ruby) by a Ruby-fied approach which relies on Rubies
45
- trusted *duck typing*.<br>
46
- In wxRuby3 any class supported by a specific persistent object adapter class should implement the method
47
- `#create_persistent_object` which should return a unique adapter instance for the object instance to be persisted
48
- like this:
49
-
50
- ```ruby
51
- class MyPersistentObject < Wx::PersistentObject
52
-
53
- # Save the object properties.
54
- # The implementation of this method should use {Wx::PersistentObject#save_value}.
55
- # @return [void]
56
- def save
57
- # ...
58
- end
59
-
60
- # Restore the object properties.
61
- # The implementation of this method should use {Wx::PersistentObject#restore_value}.
62
- # @return [Boolean]
63
- def restore
64
- # ...
65
- end
66
-
67
- # Returns the string uniquely identifying the objects supported by this adapter.
68
- # This method has default implementations in any of the built-in derived adapter classes.
69
- # @return [String]
70
- def get_kind
71
- 'MyObject'
72
- end
73
-
74
- # Returns the string uniquely identifying the object we're associated with among all the other objects of the same type.
75
- # This method has a default implementation in Wx::PersistentWindowBase returning the window name.
76
- # @return [String]
77
- def get_name
78
- 'object_1'
79
- end
80
-
81
- end
82
-
83
- class MyObject
84
-
85
- # ...
86
-
87
- def create_persistent_object
88
- MyPersistentObject.new(self)
89
- end
90
-
91
- # ...
92
-
93
- end
94
- ```
95
-
96
- ## Persistent windows
97
-
98
- A number of classes provide built-in support for persistence of a number of windows or controls:
99
-
100
- * {Wx::PersistentTLW} supports top level windows (including {Wx::Frame} and {Wx::Dialog}).
101
- * {Wx::PersistentBookCtrl} supports the book controls {Wx::Notebook}, {Wx::Listbook}, {Wx::Toolbook} and {Wx::Choicebook}.
102
- * {Wx::PersistentTreeBookCtrl} supports {Wx::Treebook}
103
-
104
- All persistent window adapters are derived from {Wx::PersistentWindowBase}. This class makes sure that any window
105
- registered for persisting gets automatically saved when the window is destroyed. Intermittently explicit saving still
106
- remains possible of course.
107
-
108
- User defined persistent window adapters can be derived from this class or any of the built-in derivatives to support
109
- otherwise unsupported or custom windows/controls like this:
110
-
111
- ```ruby
112
- class PersistentButton < Wx::PersistentWindowBase
113
-
114
- def get_kind
115
- 'Button'
116
- end
117
-
118
- def save
119
- save_value('w', get.size.width)
120
- save_value('h', get.size.height)
121
- save_value('label', get.label)
122
- save_value('my_custom_value', get.my_custom_value)
123
- end
124
-
125
- def restore
126
- get.size = [Integer(restore_value('w')), Integer(restore_value('h'))]
127
- get.label = restore_value('label')
128
- get.my_custom_value = Float(restore_value('my_custom_value'))
129
- true
130
- end
131
-
132
- end
133
-
134
- class MyButton < Wx::Button
135
-
136
- def initialize(parent=nil, name)
137
- super(parent, label: '', name: name)
138
- @my_custom_value = ''
139
- end
140
-
141
- attr_accessor :my_custom_value
142
-
143
- def create_persistent_object
144
- PersistentButton.new(self)
145
- end
146
-
147
- end
148
- ```
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
@@ -1,21 +0,0 @@
1
- /* XPM */
2
- static const char *const back_xpm[] = {
3
- "16 15 3 1",
4
- " c None",
5
- ". c Black",
6
- "X c Gray100",
7
- " ",
8
- " ",
9
- " . ",
10
- " .. ",
11
- " .X. ",
12
- " .XX........ ",
13
- " .XXXXXXXXXX. ",
14
- " .XXXXXXXXXXX. ",
15
- " .XXXXXXXXXXX. ",
16
- " .XXXXXXXXXX. ",
17
- " .XX........ ",
18
- " .X. ",
19
- " .. ",
20
- " . ",
21
- " "};
@@ -1,44 +0,0 @@
1
- /* XPM */
2
- static const char *const copy_xpm[] = {
3
- /* columns rows colors chars-per-pixel */
4
- "16 15 23 1",
5
- "o c #97C4E7",
6
- "* c #FFFFFF",
7
- "@ c #60A9DA",
8
- "= c #D1E5F5",
9
- "& c #C3DDF1",
10
- ". c #7EA6C0",
11
- " c None",
12
- "X c #2F93CD",
13
- "O c #85BBE2",
14
- ", c #EFF6FC",
15
- "; c #DEEDF8",
16
- "+ c #72B2DD",
17
- "3 c #F7FBFD",
18
- "4 c #FAFCFE",
19
- ": c #DAEAF7",
20
- "< c #E9F3FA",
21
- "1 c #E2EFF8",
22
- "- c #FDFDFE",
23
- "% c #B6D5EE",
24
- "$ c #A5CCEA",
25
- "> c #E5F0F9",
26
- "# c #AFD1EC",
27
- "2 c #F4F9FD",
28
- /* pixels */
29
- " .....XX ",
30
- " .oO+@X#X ",
31
- " .$oO+X##X ",
32
- " .%$o........ ",
33
- " .&%$.*=&#o.-. ",
34
- " .=&%.*;=&#.--. ",
35
- " .:=&.*>;=&.... ",
36
- " .>:=.*,>;=&#o. ",
37
- " .<1:.*2,>:=&#. ",
38
- " .2<1.*32,>:=&. ",
39
- " .32<.*432,>:=. ",
40
- " .32<.*-432,>:. ",
41
- " .....**-432,>. ",
42
- " .***-432,. ",
43
- " .......... "
44
- };
@@ -1,46 +0,0 @@
1
- /* XPM */
2
- static const char *const cut_xpm[] = {
3
- /* columns rows colors chars-per-pixel */
4
- "16 15 25 1",
5
- "6 c #D8BDC0",
6
- ": c #C3C3C4",
7
- "- c #FFFFFF",
8
- ". c #6C6D70",
9
- "2 c #AD3A45",
10
- "o c #DBDBDB",
11
- "# c #939495",
12
- "< c #E42234",
13
- "& c #C3C5C8",
14
- "; c #C6CCD3",
15
- "% c #B7B7B8",
16
- " c None",
17
- "* c #DFE0E2",
18
- "5 c #B69596",
19
- "3 c #9C2A35",
20
- "1 c #CFCFD0",
21
- ", c #AB5C64",
22
- "+ c #D2D3D4",
23
- "$ c #BCBDBE",
24
- "@ c #C6C8CA",
25
- "> c #CDC0C1",
26
- "O c #826F72",
27
- "X c #979BA0",
28
- "4 c #9B8687",
29
- "= c #9FA0A0",
30
- /* pixels */
31
- " .X .o ",
32
- " O.+ @. ",
33
- " O. .. ",
34
- " O#$ %.& ",
35
- " O.*.. ",
36
- " #%#.. ",
37
- " O=-.. ",
38
- " #%#;. ",
39
- " OO:=O ",
40
- " >,,<, ,<,,1 ",
41
- " ><23<1 1<32<1 ",
42
- " ,2 4< <5 2, ",
43
- " <, ,2 2, ,< ",
44
- " 23,<5 5<,32 ",
45
- " 6225 522> "
46
- };
@@ -1,42 +0,0 @@
1
- /* XPM */
2
- static const char *const filesave_xpm[] = {
3
- /* columns rows colors chars-per-pixel */
4
- "16 15 21 1",
5
- "O c #FFFFFF",
6
- "> c #D5D6D8",
7
- "; c #446A8C",
8
- "1 c #CAD2DC",
9
- ": c #C0C7D1",
10
- " c #5F666D",
11
- "% c #A5B0BA",
12
- "o c #65839D",
13
- ", c #DCE2EA",
14
- "< c #C3C5C8",
15
- "- c #E1E6EE",
16
- "* c #C6CCD3",
17
- ". c None",
18
- "$ c #305F81",
19
- "2 c #D6DFE7",
20
- "= c #D2D9E0",
21
- "& c #B7BFC7",
22
- "X c #1B4467",
23
- "# c #BCBDBE",
24
- "@ c #7A90AC",
25
- "+ c #5D7C93",
26
- /* pixels */
27
- " .",
28
- " XoOOOOOOOOO+X .",
29
- " @oO#######O+@ .",
30
- " @oOOOOOOOOO+@ .",
31
- " @oO#######O+@ .",
32
- " @oOOOOOOOOO+@ .",
33
- " @@+++++++++@@ .",
34
- " @@@@@@@@@@@@@ .",
35
- " @@@$$$$$$$$@@ .",
36
- " @@$%%%&*=-O$@ .",
37
- " @@$%X;;*=-O$@ .",
38
- " @@$%X;;:>,O$@ .",
39
- " @@$%X;;<12O$@ .",
40
- " @@$<<2OOOOO$@ .",
41
- ". .."
42
- };