zui 0.0.8 → 0.0.9
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 +1 -1
- data/lib/zui/full_runtime.rb +12 -0
- data/lib/zui/generator.rb +20 -19
- data/lib/zui/generator_assets/ruby.icns +0 -0
- data/lib/zui/generator_assets/ruby.ico +0 -0
- data/lib/zui/generator_assets/ruby.png +0 -0
- data/lib/zui.rb +1 -1
- metadata +5 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 42bdb62a57c863cdc40283e45b894097dc811f23f3d8d081ae05bc1e6619aece
|
|
4
|
+
data.tar.gz: 7da4bafa4b0efa12cc5c2b89f88210044154dec373e5f0b419f900dae471727d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 5f8016e274b0cec1f2a8614327e7c7ab95762a836a7d55fe2a1e716d231fe6ef2c12a56f28de3df09b907471a6fe2156a42d25a897a80ab483f66337c3a47ad9
|
|
7
|
+
data.tar.gz: 033e22d2907f8c0fa66badd46eaec2f1636e1388c272c16210b0ede3dad7a561fc185b7372b2952ee14273c97e36ccbbe85b364b664481448175e438d13f1956
|
data/README.md
CHANGED
|
@@ -188,7 +188,7 @@ uses a system Qt installation, or downloads an asset for a different platform. S
|
|
|
188
188
|
|
|
189
189
|
## Component catalog
|
|
190
190
|
|
|
191
|
-
Zui 0.0.
|
|
191
|
+
Zui 0.0.9 registers **241 built-in components**. Every entry has a named Ruby builder method,
|
|
192
192
|
property and event schema, native QML renderer, reactive patch support, and contract tests.
|
|
193
193
|
|
|
194
194
|
| Category | Count | Representative components |
|
data/lib/zui/full_runtime.rb
CHANGED
|
@@ -62,6 +62,7 @@ module Zui
|
|
|
62
62
|
FileUtils.cp(@ruby, target)
|
|
63
63
|
FileUtils.chmod(0o755, target) unless platform.windows?
|
|
64
64
|
strip_binary(target)
|
|
65
|
+
sign_binary(target)
|
|
65
66
|
File.join("bin", name).tr(File::SEPARATOR, "/")
|
|
66
67
|
end
|
|
67
68
|
|
|
@@ -228,6 +229,17 @@ module Zui
|
|
|
228
229
|
system(*arguments, out: File::NULL, err: File::NULL)
|
|
229
230
|
end
|
|
230
231
|
|
|
232
|
+
def sign_binary(path)
|
|
233
|
+
return unless platform.macos?
|
|
234
|
+
|
|
235
|
+
codesign = find_command(%w[codesign])
|
|
236
|
+
raise ArgumentError, "codesign is required to build a macOS full runtime" unless codesign
|
|
237
|
+
|
|
238
|
+
signed = system(codesign, "--force", "--sign", "-", "--timestamp=none", path,
|
|
239
|
+
out: File::NULL, err: File::NULL)
|
|
240
|
+
raise ArgumentError, "failed to sign the bundled Ruby executable" unless signed
|
|
241
|
+
end
|
|
242
|
+
|
|
231
243
|
def find_command(names)
|
|
232
244
|
@environment.fetch("PATH", "").split(File::PATH_SEPARATOR).each do |directory|
|
|
233
245
|
names.each do |name|
|
data/lib/zui/generator.rb
CHANGED
|
@@ -4,9 +4,12 @@ require "fileutils"
|
|
|
4
4
|
|
|
5
5
|
module Zui
|
|
6
6
|
class Generator
|
|
7
|
+
DEFAULT_ASSETS = File.expand_path("generator_assets", __dir__)
|
|
8
|
+
RELEASE_ICONS = %w[ruby.png ruby.icns ruby.ico].freeze
|
|
9
|
+
|
|
7
10
|
def initialize(path:, name: nil)
|
|
8
11
|
@path = File.expand_path(path)
|
|
9
|
-
@name = name || File.basename(@path)
|
|
12
|
+
@name = display_name(name || File.basename(@path))
|
|
10
13
|
end
|
|
11
14
|
|
|
12
15
|
def create
|
|
@@ -17,8 +20,9 @@ module Zui
|
|
|
17
20
|
File.write(File.join(@path, "Gemfile"), gemfile)
|
|
18
21
|
File.write(File.join(@path, "components", "welcome.rb"), welcome_component)
|
|
19
22
|
File.write(File.join(@path, "config.rb"), distribution_config)
|
|
20
|
-
|
|
21
|
-
|
|
23
|
+
assets = File.join(@path, "assets")
|
|
24
|
+
FileUtils.mkdir_p(assets)
|
|
25
|
+
RELEASE_ICONS.each { |name| FileUtils.cp(File.join(DEFAULT_ASSETS, name), assets) }
|
|
22
26
|
File.write(File.join(@path, "README.md"), readme)
|
|
23
27
|
@path
|
|
24
28
|
rescue StandardError
|
|
@@ -86,7 +90,7 @@ module Zui
|
|
|
86
90
|
zui doctor --fix # once for each Zui version
|
|
87
91
|
zui run main.rb
|
|
88
92
|
zui bundle
|
|
89
|
-
zui bundle --dist
|
|
93
|
+
zui bundle --dist
|
|
90
94
|
```
|
|
91
95
|
MARKDOWN
|
|
92
96
|
end
|
|
@@ -97,27 +101,24 @@ module Zui
|
|
|
97
101
|
|
|
98
102
|
Zui::Dist.configure do
|
|
99
103
|
name #{@name.dump}
|
|
100
|
-
identifier #{"
|
|
104
|
+
identifier #{"dev.zui.#{slug_name}".dump}
|
|
101
105
|
version "0.1.0"
|
|
102
|
-
publisher "
|
|
106
|
+
publisher "Zui Project"
|
|
103
107
|
description #{"A native #{@name} desktop application.".dump}
|
|
104
|
-
license "
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
108
|
+
license "MIT"
|
|
109
|
+
homepage "https://github.com/AdamMusa/zui"
|
|
110
|
+
|
|
111
|
+
icon linux: "assets/ruby.png",
|
|
112
|
+
macos: "assets/ruby.icns",
|
|
113
|
+
windows: "assets/ruby.ico"
|
|
114
|
+
|
|
115
|
+
categories "Utility", "Development"
|
|
109
116
|
end
|
|
110
117
|
RUBY
|
|
111
118
|
end
|
|
112
119
|
|
|
113
|
-
def
|
|
114
|
-
|
|
115
|
-
Add the release icons referenced by `config.rb` here:
|
|
116
|
-
|
|
117
|
-
- `icon.png` for Linux
|
|
118
|
-
- `icon.icns` for macOS
|
|
119
|
-
- `icon.ico` for Windows
|
|
120
|
-
MARKDOWN
|
|
120
|
+
def display_name(value)
|
|
121
|
+
value.to_s.split(/[-_\s]+/).map { |part| part[0].upcase + part[1..].to_s }.join(" ")
|
|
121
122
|
end
|
|
122
123
|
|
|
123
124
|
def constant_name
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
data/lib/zui.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: zui
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.9
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Adam Moussa Ali
|
|
@@ -332,6 +332,9 @@ files:
|
|
|
332
332
|
- lib/zui/distribution.rb
|
|
333
333
|
- lib/zui/full_runtime.rb
|
|
334
334
|
- lib/zui/generator.rb
|
|
335
|
+
- lib/zui/generator_assets/ruby.icns
|
|
336
|
+
- lib/zui/generator_assets/ruby.ico
|
|
337
|
+
- lib/zui/generator_assets/ruby.png
|
|
335
338
|
- lib/zui/host.rb
|
|
336
339
|
- lib/zui/lite_entry.rb
|
|
337
340
|
- lib/zui/lite_runtime.rb
|
|
@@ -368,7 +371,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
368
371
|
- !ruby/object:Gem::Version
|
|
369
372
|
version: '0'
|
|
370
373
|
requirements: []
|
|
371
|
-
rubygems_version: 4.0.
|
|
374
|
+
rubygems_version: 4.0.11
|
|
372
375
|
specification_version: 4
|
|
373
376
|
summary: Build beautiful native desktop applications in pure Ruby
|
|
374
377
|
test_files: []
|