libui 0.0.13 → 0.0.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +16 -12
- data/lib/libui/libui_base.rb +1 -1
- data/lib/libui/version.rb +1 -1
- data/lib/libui.rb +1 -0
- data/vendor/README_DYLIB.md +45 -0
- data/vendor/libui.dylib +0 -0
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2fe04f1f03b5bc2cdc5596993230212f76b2582d05e943a1b0f67cfa8a26c1d5
|
4
|
+
data.tar.gz: 9fa47e55f1d5fd30191d7c48e546269fd72c727fea98850ab6a665beeeccd4ce
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 31a67b3239d6f80f3be0693b9a06be1903cba54157a790d5a3a008dc282470e8e6037716e0c3428ff461ab6207d1b64f1ae59d2d33aa7cdd4348d4e831e56929
|
7
|
+
data.tar.gz: f2a9feac43d98eca7d952f2c6970ceb90ab32c778b497fa09396a5cde7739bf00330529f53aa8c4a4896b71eeffb0dea93f5c5849cd29a22291a1ca2fdd52c1f
|
data/README.md
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
[](https://badge.fury.io/rb/libui)
|
5
5
|
<a href="https://github.com/AndyObtiva/glimmer-dsl-libui"><img alt="glimmer-dsl-libui" src="https://github.com/AndyObtiva/glimmer/blob/master/images/glimmer-logo-hi-res.svg" width="50" height="50" align="right"></a>
|
6
6
|
|
7
|
-
:radio_button: [libui](https://github.com/
|
7
|
+
:radio_button: [libui](https://github.com/libui-ng/libui-ng) - a portable GUI library - for Ruby
|
8
8
|
|
9
9
|
## Installation
|
10
10
|
|
@@ -13,7 +13,7 @@ gem install libui
|
|
13
13
|
```
|
14
14
|
|
15
15
|
* The gem package contains the [official release](https://github.com/andlabs/libui/releases/tag/alpha4.1) of the libui shared library versions 4.1 for Windows, Mac, and Linux.
|
16
|
-
* Namely `libui.dll`, `libui.dylib`, and `libui.so` (only 1.
|
16
|
+
* Namely `libui.dll`, `libui.dylib`, and `libui.so` (only 1.8MB in total).
|
17
17
|
* No dependency
|
18
18
|
* The libui gem uses the standard Ruby library [Fiddle](https://github.com/ruby/fiddle) to call C functions.
|
19
19
|
|
@@ -21,7 +21,9 @@ gem install libui
|
|
21
21
|
|---------|-----|-------|
|
22
22
|
|<img src="https://user-images.githubusercontent.com/5798442/103118046-900ea780-46b0-11eb-81fc-32626762e4df.png">|<img src="https://user-images.githubusercontent.com/5798442/103118059-99980f80-46b0-11eb-9d12-324ec4d297c9.png">|<img src="https://user-images.githubusercontent.com/5798442/103118068-a0bf1d80-46b0-11eb-8c5c-3bdcc3dcfb26.png">|
|
23
23
|
|
24
|
-
Note:
|
24
|
+
Note:
|
25
|
+
* If you are using the 32-bit (x86) version of Ruby, you need to download the 32-bit (x86) native dll. See [Development](#development).
|
26
|
+
* On Windows, libui may not work due to missing DLLs. In that case, you need to install [Visual C++ Redistributable](https://docs.microsoft.com/en-us/cpp/windows/latest-supported-vc-redist). See ([#48](https://github.com/kojix2/LibUI/issues/48))
|
25
27
|
|
26
28
|
## Usage
|
27
29
|
|
@@ -64,17 +66,15 @@ Compared to original libui written in C,
|
|
64
66
|
* If the last argument is nil, it can be omitted.
|
65
67
|
* You can pass a block as a callback.
|
66
68
|
* The block will be converted to a Proc object and added to the last argument.
|
67
|
-
* Even in that case, it is possible to omit the last argument nil.
|
69
|
+
* Even in that case, it is possible to omit the last argument when nil.
|
68
70
|
|
69
71
|
You can use [the documentation for libui's Go bindings](https://pkg.go.dev/github.com/andlabs/ui) as a reference.
|
70
72
|
|
71
|
-
###
|
73
|
+
### DSLs for LibUI
|
72
74
|
|
73
75
|
LibUI is not object-oriented, but provides high portability with minimal implementation.
|
74
76
|
If you want to write in an object-oriented way, please use the following DSLs built on top of LibUI.
|
75
77
|
|
76
|
-
### DSLs for LibUI
|
77
|
-
|
78
78
|
* [Glimmer DSL for LibUI](https://github.com/AndyObtiva/glimmer-dsl-libui)
|
79
79
|
* [libui_paradise](https://rubygems.org/gems/libui_paradise)
|
80
80
|
|
@@ -115,7 +115,7 @@ end
|
|
115
115
|
```
|
116
116
|
|
117
117
|
* Callbacks
|
118
|
-
* In Ruby/Fiddle, C callback function is written as an object of
|
118
|
+
* In Ruby/Fiddle, a C callback function is written as an object of
|
119
119
|
`Fiddle::Closure::BlockCaller` or `Fiddle::Closure`.
|
120
120
|
In this case, you need to be careful about Ruby's garbage collection.
|
121
121
|
If the function object is collected, memory will be freed
|
@@ -160,7 +160,7 @@ Add additional options below if necessary.
|
|
160
160
|
git clone https://github.com/kojix2/libui
|
161
161
|
cd libui
|
162
162
|
bundle install
|
163
|
-
bundle exec rake vendor:
|
163
|
+
bundle exec rake vendor:default # download shared libraries for all platforms
|
164
164
|
bundle exec rake test
|
165
165
|
```
|
166
166
|
|
@@ -169,9 +169,10 @@ You can use the following rake tasks to download the shared library required for
|
|
169
169
|
`rake -T`
|
170
170
|
|
171
171
|
```
|
172
|
-
rake vendor:
|
172
|
+
rake vendor:default # Downlaod [linux_x64, mac_arm, windows_x64] to vendor directory
|
173
173
|
rake vendor:linux_x64 # Download libui.so for Linux to vendor directory
|
174
174
|
rake vendor:linux_x86 # Download libui.so for Linux to vendor directory
|
175
|
+
rake vendor:mac_arm # Download libui.dylib for Mac to vendor directory (universal binary)
|
175
176
|
rake vendor:mac_x64 # Download libui.dylib for Mac to vendor directory
|
176
177
|
rake vendor:windows_x64 # Download libui.dll for Windows to vendor directory
|
177
178
|
rake vendor:windows_x86 # Download libui.dll for Windows to vendor directory
|
@@ -185,8 +186,11 @@ Or Set environment variable `LIBUIDIR` to specify the path to the shared library
|
|
185
186
|
|
186
187
|
Would you like to add your commits to libui?
|
187
188
|
* Please feel free to send us your [pull requests](https://github.com/kojix2/libui/pulls).
|
188
|
-
* Small corrections, such as
|
189
|
-
* Did you find any bugs?
|
189
|
+
* Small corrections, such as typo fixes, are appreciated.
|
190
|
+
* Did you find any bugs? Enter in the [issues](https://github.com/kojix2/LibUI/issues) section!
|
191
|
+
|
192
|
+
I have seen many OSS projects abandoned. The main reason is that no one has the right to commit to the original repository, except the founder.
|
193
|
+
Do you need commit rights to my repository? Do you want to get admin rights and take over the project? If so, please feel free to contact me @kojix2.
|
190
194
|
|
191
195
|
## Acknowledgement
|
192
196
|
|
data/lib/libui/libui_base.rb
CHANGED
data/lib/libui/version.rb
CHANGED
data/lib/libui.rb
CHANGED
@@ -0,0 +1,45 @@
|
|
1
|
+
# libui shared library for M1 Mac
|
2
|
+
|
3
|
+
libui.dylib for Mac has been replaced with a universal binary to make LibUI compatible with M1 Mac.
|
4
|
+
|
5
|
+
See https://github.com/kojix2/LibUI/issues/47
|
6
|
+
|
7
|
+
The LibUI gem also includes libui.so for Linux and libui.dll for Windows, which are identical to the official binaries distributed by andlabs.
|
8
|
+
|
9
|
+
## Target libui version
|
10
|
+
|
11
|
+
libui version alpha 4.1
|
12
|
+
https://github.com/andlabs/libui
|
13
|
+
|
14
|
+
## Universal binary
|
15
|
+
|
16
|
+
file command to show that it is a universal binary.
|
17
|
+
|
18
|
+
```
|
19
|
+
file libui.dylib
|
20
|
+
# libui.dylib: Mach-O universal binary with 2 architectures: [x86_64:Mach-O 64-bit dynamically linked shared library x86_64] [arm64:Mach-O 64-bit dynamically linked shared library arm64]
|
21
|
+
# libui.dylib (for architecture x86_64): Mach-O 64-bit dynamically linked shared library x86_64
|
22
|
+
# libui.dylib (for architecture arm64): Mach-O 64-bit dynamically linked shared library arm64
|
23
|
+
```
|
24
|
+
|
25
|
+
## sha256sum
|
26
|
+
|
27
|
+
```
|
28
|
+
6da2ff5acb6fba09b47eae0219b3aaefd002ace00003ab5d59689e396bcefff7 libui.dylib
|
29
|
+
```
|
30
|
+
|
31
|
+
## Build method
|
32
|
+
|
33
|
+
1. Get the libui version alpha 4.1 and create a shared library for arm64 on M1 mac.
|
34
|
+
2. Download the official shared library provided by [andlabs](https://github.com/andlabs/libui/releases/tag/alpha4.1).
|
35
|
+
3. Use the lipo command to merge the two files to create a universal binary.
|
36
|
+
|
37
|
+
## Contributing
|
38
|
+
|
39
|
+
libui-ng is looking for a way to create a binary file for the M1 Mac.
|
40
|
+
See https://github.com/libui-ng/libui-ng/issues/41
|
41
|
+
|
42
|
+
## License
|
43
|
+
|
44
|
+
MIT
|
45
|
+
|
data/vendor/libui.dylib
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: libui
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.15
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- kojix2
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-03-12 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description:
|
14
14
|
email:
|
@@ -27,6 +27,7 @@ files:
|
|
27
27
|
- lib/libui/version.rb
|
28
28
|
- vendor/LICENSE
|
29
29
|
- vendor/README.md
|
30
|
+
- vendor/README_DYLIB.md
|
30
31
|
- vendor/libui.dll
|
31
32
|
- vendor/libui.dylib
|
32
33
|
- vendor/libui.so
|
@@ -49,7 +50,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
49
50
|
- !ruby/object:Gem::Version
|
50
51
|
version: '0'
|
51
52
|
requirements: []
|
52
|
-
rubygems_version: 3.
|
53
|
+
rubygems_version: 3.3.7
|
53
54
|
signing_key:
|
54
55
|
specification_version: 4
|
55
56
|
summary: Ruby bindings to libui
|