libui 0.0.15.pre → 0.0.15

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5e282cdaee29c0b7cd5b7bd11dc0bcb8c546ef927127c7564b79d890ec35e35f
4
- data.tar.gz: 321d554f02a4f618590d2fc3652463e928136d1008b8836f15814a1f45c95072
3
+ metadata.gz: 2fe04f1f03b5bc2cdc5596993230212f76b2582d05e943a1b0f67cfa8a26c1d5
4
+ data.tar.gz: 9fa47e55f1d5fd30191d7c48e546269fd72c727fea98850ab6a665beeeccd4ce
5
5
  SHA512:
6
- metadata.gz: 05af08c9952f4107fd21a3db10aca8c6c37e1396076b8eebefe11efbe1b7d3b94e985eae313867b1a92b668cd916811711b60da4e83aaeea646f8809bcf0457b
7
- data.tar.gz: 0e3e330daefd9483f0e885dbd1aeea1dbf9a4fa9843f83e30b529cdcb7fad99887916a3a9bb44d95e39a75537eb5297f7e55e75e0d2df1cc7542373eeeeabef6
6
+ metadata.gz: 31a67b3239d6f80f3be0693b9a06be1903cba54157a790d5a3a008dc282470e8e6037716e0c3428ff461ab6207d1b64f1ae59d2d33aa7cdd4348d4e831e56929
7
+ data.tar.gz: f2a9feac43d98eca7d952f2c6970ceb90ab32c778b497fa09396a5cde7739bf00330529f53aa8c4a4896b71eeffb0dea93f5c5849cd29a22291a1ca2fdd52c1f
data/README.md CHANGED
@@ -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.4MB in total).
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
 
@@ -23,7 +23,6 @@ gem install libui
23
23
 
24
24
  Note:
25
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
- * ARM64/AARCH64 Support is limited. See ([#47](https://github.com/kojix2/LibUI/issues/47))
27
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))
28
27
 
29
28
  ## Usage
@@ -67,17 +66,15 @@ Compared to original libui written in C,
67
66
  * If the last argument is nil, it can be omitted.
68
67
  * You can pass a block as a callback.
69
68
  * The block will be converted to a Proc object and added to the last argument.
70
- * 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.
71
70
 
72
71
  You can use [the documentation for libui's Go bindings](https://pkg.go.dev/github.com/andlabs/ui) as a reference.
73
72
 
74
- ### Not object oriented?
73
+ ### DSLs for LibUI
75
74
 
76
75
  LibUI is not object-oriented, but provides high portability with minimal implementation.
77
76
  If you want to write in an object-oriented way, please use the following DSLs built on top of LibUI.
78
77
 
79
- ### DSLs for LibUI
80
-
81
78
  * [Glimmer DSL for LibUI](https://github.com/AndyObtiva/glimmer-dsl-libui)
82
79
  * [libui_paradise](https://rubygems.org/gems/libui_paradise)
83
80
 
@@ -118,7 +115,7 @@ end
118
115
  ```
119
116
 
120
117
  * Callbacks
121
- * 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
122
119
  `Fiddle::Closure::BlockCaller` or `Fiddle::Closure`.
123
120
  In this case, you need to be careful about Ruby's garbage collection.
124
121
  If the function object is collected, memory will be freed
@@ -163,7 +160,7 @@ Add additional options below if necessary.
163
160
  git clone https://github.com/kojix2/libui
164
161
  cd libui
165
162
  bundle install
166
- bundle exec rake vendor:all_x64 # download shared libraries for all platforms
163
+ bundle exec rake vendor:default # download shared libraries for all platforms
167
164
  bundle exec rake test
168
165
  ```
169
166
 
@@ -172,9 +169,10 @@ You can use the following rake tasks to download the shared library required for
172
169
  `rake -T`
173
170
 
174
171
  ```
175
- rake vendor:all_x64 # Download libui.so, libui.dylib, and libui.dll to...
172
+ rake vendor:default # Downlaod [linux_x64, mac_arm, windows_x64] to vendor directory
176
173
  rake vendor:linux_x64 # Download libui.so for Linux to vendor directory
177
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)
178
176
  rake vendor:mac_x64 # Download libui.dylib for Mac to vendor directory
179
177
  rake vendor:windows_x64 # Download libui.dll for Windows to vendor directory
180
178
  rake vendor:windows_x86 # Download libui.dll for Windows to vendor directory
@@ -188,14 +186,11 @@ Or Set environment variable `LIBUIDIR` to specify the path to the shared library
188
186
 
189
187
  Would you like to add your commits to libui?
190
188
  * Please feel free to send us your [pull requests](https://github.com/kojix2/libui/pulls).
191
- * Small corrections, such as typofixes, are appreciated.
192
- * Did you find any bugs? Write it in the [issues](https://github.com/kojix2/LibUI/issue) section!
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!
193
191
 
194
- ```
195
- Do you need commit rights to my repository?
196
- Do you want to get admin rights and take over the project?
197
- If so, please feel free to contact me @kojix2.
198
- ```
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.
199
194
 
200
195
  ## Acknowledgement
201
196
 
data/lib/libui/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module LibUI
2
- VERSION = '0.0.15.pre'
2
+ VERSION = '0.0.15'
3
3
  end
@@ -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
+
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.15.pre
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: 2022-03-06 00:00:00.000000000 Z
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
@@ -45,9 +46,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
45
46
  version: '2.5'
46
47
  required_rubygems_version: !ruby/object:Gem::Requirement
47
48
  requirements:
48
- - - ">"
49
+ - - ">="
49
50
  - !ruby/object:Gem::Version
50
- version: 1.3.1
51
+ version: '0'
51
52
  requirements: []
52
53
  rubygems_version: 3.3.7
53
54
  signing_key: