glimmer-dsl-swt 4.18.7.6 → 4.20.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +44 -0
- data/README.md +34 -21
- data/RUBY_VERSION +1 -1
- data/VERSION +1 -1
- data/bin/girb +10 -9
- data/bin/girb_runner.rb +8 -3
- data/bin/glimmer +10 -1
- data/bin/glimmer-setup +58 -0
- data/bin/glimmer_runner.rb +4 -0
- data/docs/reference/GLIMMER_COMMAND.md +19 -30
- data/docs/reference/GLIMMER_GUI_DSL_SYNTAX.md +39 -10
- data/docs/reference/GLIMMER_PACKAGING_AND_DISTRIBUTION.md +7 -1
- data/docs/reference/GLIMMER_SAMPLES.md +27 -0
- data/glimmer-dsl-swt.gemspec +0 -0
- data/lib/glimmer-dsl-swt.rb +8 -0
- data/lib/glimmer/data_binding/shine.rb +41 -26
- data/lib/glimmer/data_binding/widget_binding.rb +1 -1
- data/lib/glimmer/dsl/swt/c_tab_item_expression.rb +58 -0
- data/lib/glimmer/dsl/swt/combo_selection_data_binding_expression.rb +2 -1
- data/lib/glimmer/dsl/swt/dsl.rb +2 -1
- data/lib/glimmer/dsl/swt/shine_data_binding_expression.rb +49 -0
- data/lib/glimmer/dsl/swt/tab_item_expression.rb +7 -3
- data/lib/glimmer/dsl/swt/widget_expression.rb +1 -1
- data/lib/glimmer/launcher.rb +33 -51
- data/lib/glimmer/rake_task.rb +1 -1
- data/lib/glimmer/rake_task/package.rb +7 -2
- data/lib/glimmer/rake_task/scaffold.rb +227 -254
- data/lib/glimmer/swt/c_tab_item_proxy.rb +53 -0
- data/lib/glimmer/swt/custom/code_text.rb +17 -9
- data/lib/glimmer/swt/custom/shape.rb +15 -1
- data/lib/glimmer/swt/sash_form_proxy.rb +6 -0
- data/lib/glimmer/swt/shell_proxy.rb +3 -1
- data/lib/glimmer/swt/tab_folder_proxy.rb +1 -0
- data/lib/glimmer/swt/tab_item_proxy.rb +17 -18
- data/lib/glimmer/swt/widget_proxy.rb +9 -0
- data/samples/elaborate/contact_manager.rb +7 -5
- data/samples/elaborate/login.rb +7 -7
- data/samples/elaborate/mandelbrot_fractal.rb +13 -8
- data/samples/elaborate/meta_sample.rb +4 -2
- data/samples/elaborate/metronome.rb +4 -4
- data/samples/elaborate/stock_ticker.rb +2 -2
- data/samples/elaborate/tic_tac_toe.rb +2 -2
- data/samples/hello/hello_button.rb +1 -1
- data/samples/hello/hello_c_combo.rb +69 -0
- data/samples/hello/hello_c_tab.rb +174 -0
- data/samples/hello/hello_c_tab/denmark.png +0 -0
- data/samples/hello/hello_c_tab/finland.png +0 -0
- data/samples/hello/hello_c_tab/france.png +0 -0
- data/samples/hello/hello_c_tab/germany.png +0 -0
- data/samples/hello/hello_c_tab/italy.png +0 -0
- data/samples/hello/hello_c_tab/mexico.png +0 -0
- data/samples/hello/hello_c_tab/netherlands.png +0 -0
- data/samples/hello/hello_c_tab/norway.png +0 -0
- data/samples/hello/hello_c_tab/usa.png +0 -0
- data/samples/hello/hello_canvas.rb +5 -5
- data/samples/hello/hello_canvas_animation_data_binding.rb +1 -1
- data/samples/hello/hello_canvas_data_binding.rb +16 -16
- data/samples/hello/hello_checkbox.rb +4 -4
- data/samples/hello/hello_code_text.rb +3 -57
- data/samples/hello/hello_color_dialog.rb +1 -1
- data/samples/hello/hello_combo.rb +1 -1
- data/samples/hello/hello_computed.rb +5 -5
- data/samples/hello/hello_custom_widget.rb +1 -1
- data/samples/hello/hello_date_time.rb +4 -4
- data/samples/hello/hello_dialog.rb +3 -2
- data/samples/hello/hello_drag_and_drop.rb +1 -1
- data/samples/hello/hello_file_dialog.rb +1 -1
- data/samples/hello/hello_font_dialog.rb +3 -3
- data/samples/hello/hello_group.rb +6 -6
- data/samples/hello/hello_link.rb +56 -50
- data/samples/hello/hello_list_multi_selection.rb +1 -1
- data/samples/hello/hello_list_single_selection.rb +1 -1
- data/samples/hello/hello_progress_bar.rb +10 -10
- data/samples/hello/hello_radio.rb +6 -6
- data/samples/hello/hello_sash_form.rb +4 -4
- data/samples/hello/hello_shape.rb +1 -0
- data/samples/hello/hello_spinner.rb +6 -2
- data/samples/hello/hello_styled_text.rb +11 -11
- data/samples/hello/hello_tab.rb +2 -0
- data/vendor/swt/linux/swt.jar +0 -0
- data/vendor/swt/linux_aarch64/swt.jar +0 -0
- data/vendor/swt/mac/swt.jar +0 -0
- data/vendor/swt/mac_aarch64/swt.jar +0 -0
- data/vendor/swt/windows/swt.jar +0 -0
- metadata +76 -32
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 21989f606fc509c36ef0be6f2429ef43082f60a0aa800ad42fbe956e39168333
|
4
|
+
data.tar.gz: 3307a4cc805b6e72eefa059c984584464ac9f759f4e0c3c0968b0e151fb7bbd0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bb070bb78b470ba5be916cd0c58917b91d757b0174ddd37992dc92d6b9238e5697e144292c13b48de70b6e2f8bc77206786a6c7ddfe9b7ad47f83ed03fbbe4c7
|
7
|
+
data.tar.gz: 0fe369459de55d705acb992c40345e4f0ff12b4931ad32af7e103c0c850ca4b3c7cdfd465899246ecb998b694a23c1a4356afc173296bc45e47abb10571d4db9
|
data/CHANGELOG.md
CHANGED
@@ -1,8 +1,52 @@
|
|
1
1
|
# Change Log
|
2
2
|
|
3
|
+
### 4.20.0.0
|
4
|
+
|
5
|
+
- Upgrade to SWT 4.20, supporting AARCH64 experimentally
|
6
|
+
- Upgrade to JRuby 9.2.19.0
|
7
|
+
- Shine syntax for data-binding
|
8
|
+
- Tweak/Fix Samples
|
9
|
+
|
10
|
+
### 4.19.0.2
|
11
|
+
|
12
|
+
- Fixed issue with Meta-Sample code editing not showing changes properly (although recording them)
|
13
|
+
- Stop Mandelbrot Fractal sample background calculation when its custom shell is closed
|
14
|
+
|
15
|
+
### 4.19.0.1
|
16
|
+
|
17
|
+
- Upgrade to JRuby 9.2.17.0
|
18
|
+
- Fix Hello, C Tab! sample not showing flags on Windows
|
19
|
+
- Fix Stock Ticker elaborate sample non-scrolling and clipped stock names on Windows
|
20
|
+
|
21
|
+
### 4.19.0.0
|
22
|
+
|
23
|
+
- Upgrade to SWT 4.19
|
24
|
+
- Upgrade to JRuby 9.2.16.0
|
25
|
+
- Speed up glimmer command startup time by not spawning a jruby a second time for handling Mac-specific options (cutting down glimmer app startup time to half)
|
26
|
+
- glimmer-setup command configures `glimmer` and `girb` for the Mac with `-X-JstartOnFirstThread` in a `JRUBY_OPTS` environment variable
|
27
|
+
- Switch all scaffolded models/views to `Model::` and `View::` namespacing instead of the namespaceless 'models' and 'views' directories (new scheme was originally introduced in the Tetris sample)
|
28
|
+
- Make sure that scaffolded shell/app uses new custom shell built-in `.launch` method instead of custom written `.open` method
|
29
|
+
- Make `scaffold:desktopify` generated app window shell fill the screen by default
|
30
|
+
- Support `c_tab_folder` and `c_tab_item`
|
31
|
+
- Support `c_combo` (`org.eclipse.swt.custom.CCombo` SWT widget) data-binding
|
32
|
+
- Hello, CCombo!
|
33
|
+
- Hello, C Tab!
|
34
|
+
- Shape#clear_shapes just like that of Drawable in WidgetProxy
|
35
|
+
- Set default background of `rgb(230, 230, 230)` on sash_form to make it more spottable to resize the sash
|
36
|
+
- Fix issue with processing arguments for the `glimmer package` command.
|
37
|
+
- Fix mandelbrot fractal sample on Windows (added missing `jruby-win32ole` gem for use with `concurrent-ruby` gem)
|
38
|
+
- Fix this `glimmer package` message, which comes out even with the right Java version: `WARNING! Glimmer Packaging Pre-Requisite Java Version 1.8.0_241 Is Not Found!`
|
39
|
+
|
40
|
+
### 4.18.7.7
|
41
|
+
|
42
|
+
- Upgrade to glimmer v1.3.0
|
43
|
+
- Handle `code_text` encountering errors in adding observation request
|
44
|
+
- Always notify widget binding observer on `async_exec: true` data-bindings
|
45
|
+
|
3
46
|
### 4.18.7.6
|
4
47
|
|
5
48
|
- Update the Hello, Code Text! sample to use data-binding
|
49
|
+
- Upgrade `puts_debuggerer` gem dependency to version 0.12.0
|
6
50
|
- Fix issue with `code_text` data-binding
|
7
51
|
|
8
52
|
### 4.18.7.5
|
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# [<img src="https://raw.githubusercontent.com/AndyObtiva/glimmer/master/images/glimmer-logo-hi-res.png" height=85 />](https://github.com/AndyObtiva/glimmer) Glimmer DSL for SWT 4.
|
1
|
+
# [<img src="https://raw.githubusercontent.com/AndyObtiva/glimmer/master/images/glimmer-logo-hi-res.png" height=85 />](https://github.com/AndyObtiva/glimmer) Glimmer DSL for SWT 4.20.0.0
|
2
2
|
## JRuby Desktop Development GUI Framework
|
3
3
|
[![Gem Version](https://badge.fury.io/rb/glimmer-dsl-swt.svg)](http://badge.fury.io/rb/glimmer-dsl-swt)
|
4
4
|
[![Travis CI](https://travis-ci.com/AndyObtiva/glimmer-dsl-swt.svg?branch=master)](https://travis-ci.com/github/AndyObtiva/glimmer-dsl-swt)
|
@@ -10,14 +10,16 @@
|
|
10
10
|
|
11
11
|
**(The Original Glimmer Library Handling the World’s Ruby GUI Needs Since 2007. Beware of Imitators!)**
|
12
12
|
|
13
|
-
[Glimmer](https://github.com/AndyObtiva/glimmer) DSL for SWT is a native-GUI cross-platform desktop development library written in [JRuby](https://www.jruby.org/), an OS-threaded faster JVM version of [Ruby](https://www.ruby-lang.org/en/). [Glimmer](https://github.com/AndyObtiva/glimmer)
|
13
|
+
[Glimmer](https://github.com/AndyObtiva/glimmer) DSL for SWT is a native-GUI cross-platform desktop development library written in [JRuby](https://www.jruby.org/), an OS-threaded faster JVM version of [Ruby](https://www.ruby-lang.org/en/). [Glimmer](https://github.com/AndyObtiva/glimmer)'s main innovation is a declarative [Ruby DSL](docs/reference/GLIMMER_GUI_DSL_SYNTAX.md#glimmer-dsl-syntax) that enables productive and efficient authoring of desktop application user-interfaces by relying on the robust [Eclipse SWT library](https://www.eclipse.org/swt/). [Glimmer](https://rubygems.org/gems/glimmer) additionally innovates by having built-in [data-binding](docs/reference/GLIMMER_GUI_DSL_SYNTAX.md#data-binding) support, which greatly facilitates synchronizing the GUI with domain models, thus achieving true decoupling of object oriented components and enabling developers to solve business problems (test-first) without worrying about GUI concerns, or alternatively drive development GUI-first, and then write clean business models (test-first) afterwards. Not only does Glimmer provide a large set of GUI [widgets](docs/reference/GLIMMER_GUI_DSL_SYNTAX.md#widgets), but it also supports drawing Canvas Graphics like [Shapes](docs/reference/GLIMMER_GUI_DSL_SYNTAX.md#canvas-shape-dsl) and [Animations](docs/reference/GLIMMER_GUI_DSL_SYNTAX.md#canvas-animation-dsl). To get started quickly, [Glimmer](https://rubygems.org/gems/glimmer) offers [scaffolding](docs/reference/GLIMMER_COMMAND.md#scaffolding) options for [Apps](#in-production), [Gems](docs/reference/GLIMMER_COMMAND.md#custom-shell-gem), and [Custom Widgets](docs/reference/GLIMMER_GUI_DSL_SYNTAX.md#custom-widgets). [Glimmer](https://rubygems.org/gems/glimmer) also includes native-executable [packaging](docs/reference/GLIMMER_PACKAGING_AND_DISTRIBUTION.md) support, sorely lacking in other libraries, thus enabling the delivery of desktop apps written in [Ruby](https://www.ruby-lang.org/en/) as truly native DMG/PKG/APP files on the [Mac](https://www.apple.com/ca/macos) + [App Store](https://developer.apple.com/macos/distribution/), MSI/EXE files on [Windows](https://www.microsoft.com/en-ca/windows), and [Gem Packaged Shell Scripts](docs/reference/GLIMMER_COMMAND.md#packaging) on [Linux](https://www.linux.org/). [Glimmer](https://github.com/AndyObtiva/glimmer) was the [first Ruby gem](https://rubygems.org/gems/glimmer) to bring [SWT](https://www.eclipse.org/swt/) (Standard Widget Toolkit) to [Ruby](https://www.ruby-lang.org/en/), thanks to creator [Andy Maleh](https://andymaleh.blogspot.com/), an EclipseCon/EclipseWorld/RubyConf speaker and expert.
|
14
14
|
|
15
15
|
[<img src="https://covers.oreillystatic.com/images/9780596519650/lrg.jpg" width=105 /><br />
|
16
16
|
Featured in JRuby Cookbook](http://shop.oreilly.com/product/9780596519650.do) and [Chalmers/Gothenburg University Software Engineering Master's Lecture Material](http://www.cse.chalmers.se/~bergert/slides/guest_lecture_DSLs.pdf)
|
17
17
|
|
18
|
-
[Glimmer DSL for SWT](https://rubygems.org/gems/glimmer-dsl-swt) 4.
|
18
|
+
[Glimmer DSL for SWT](https://rubygems.org/gems/glimmer-dsl-swt) 4.20.0.0 includes [SWT 4.20](https://download.eclipse.org/eclipse/downloads/drops4/R-4.20-202106111600/), which was released on June 11, 2021. Gem version numbers are in sync with the SWT library versions. The first two digits represent the SWT version number. The last two digits represent the minor and patch versions of Glimmer DSL for SWT. Note that SWT now supports AARCH64 on Mac and Linux, but it is not fully tested in Glimmer DSL for SWT yet, so deem its support experimental for the time being without guarantees for functionality until declared otherwise (report any issues you may encounter).
|
19
19
|
|
20
|
-
|
20
|
+
**Starting in version 4.20.0.0, [Glimmer DSL for SWT](https://rubygems.org/gems/glimmer-dsl-swt) comes with the new [***Shine***](/docs/reference/GLIMMER_GUI_DSL_SYNTAX.md#shine) syntax** for highly intuitive and visually expressive View/Model Attribute Mapping, relying on `<=>` for bidirectional (two-way) data-binding and `<=` for unidirectional (one-way) data-binding, providing an alternative to the `bind` keyword (keep in mind that it is still an early alpha, so default back to `bind` whenever needed).
|
21
|
+
|
22
|
+
Please help make [Glimmer DSL for SWT](https://rubygems.org/gems/glimmer-dsl-swt) better by providing feedback and [contributing](#contributing) whenever possible. Any feature suggestions that are accepted could be implemented within weeks if not days.
|
21
23
|
|
22
24
|
Glimmer DSL gems:
|
23
25
|
- [glimmer-dsl-swt](https://github.com/AndyObtiva/glimmer-dsl-swt): Glimmer DSL for SWT (JRuby Desktop Development GUI Framework)
|
@@ -308,18 +310,15 @@ https://www.eclipse.org/swt/faq.php
|
|
308
310
|
## Pre-requisites
|
309
311
|
|
310
312
|
- JDK 8u241 (1.8.0_241) (find at https://www.oracle.com/java/technologies/javase/javase8u211-later-archive-downloads.html / On Windows, ensure PATH includes Java bin directory like C:\Program Files\Java\jdk1.8.0_241\bin for javapackager to work during packaging Glimmer applications)
|
311
|
-
-
|
312
|
-
-
|
313
|
+
- [RVM](http://rvm.io) on Mac & Linux (not available on Windows)
|
314
|
+
- JRuby 9.2.19.0 (supporting Ruby 2.5.x syntax) (get via [RVM](http://rvm.io) on Mac and Linux by running `rvm install jruby-9.2.19.0`; On Windows, find at [https://www.jruby.org/download](https://www.jruby.org/download))
|
315
|
+
- SWT 4.20 (already included in the [glimmer-dsl-swt](https://rubygems.org/gems/glimmer-dsl-swt) gem). Note that SWT now supports AARCH64 on Mac and Linux, but it is not fully tested with Glimmer DSL for SWT yet, so it is considered experimental until declared otherwise.
|
313
316
|
- Git (comes with Mac and Linux. Install on Windows: https://git-scm.com/download/win )
|
314
317
|
|
315
|
-
To obtain JRuby through [RVM](http://rvm.io), you may run:
|
316
|
-
|
317
|
-
```bash
|
318
|
-
rvm install jruby-9.2.14.0
|
319
|
-
```
|
320
|
-
|
321
318
|
Glimmer might still work on other versions of Java, JRuby and SWT, but there are no guarantees, so it is best to stick to the pre-requisites outlined above.
|
322
319
|
|
320
|
+
To change the SWT version to a custom `swt.jar` version that you have, simply set the 'SWT_JAR_FILE_PATH' env var.
|
321
|
+
|
323
322
|
## Setup
|
324
323
|
|
325
324
|
Please follow these instructions to make the `glimmer` command available on your system via the [`glimmer-dsl-swt`](https://github.com/AndyObtiva/glimmer-dsl-swt) gem.
|
@@ -342,13 +341,23 @@ jgem install glimmer-dsl-swt
|
|
342
341
|
|
343
342
|
Or this command if you want a specific version:
|
344
343
|
```
|
345
|
-
jgem install glimmer-dsl-swt -v 4.
|
344
|
+
jgem install glimmer-dsl-swt -v 4.20.0.0
|
346
345
|
```
|
347
346
|
|
348
347
|
`jgem` is JRuby's version of `gem` command.
|
349
348
|
RVM allows running `gem install` directly as an alias.
|
350
349
|
Otherwise, you may also run `jruby -S gem install ...`
|
351
350
|
|
351
|
+
Afterwards, you can use `glimmer` and `girb` commands.
|
352
|
+
|
353
|
+
On the Mac, you also have to run:
|
354
|
+
|
355
|
+
```
|
356
|
+
glimmer-setup
|
357
|
+
```
|
358
|
+
|
359
|
+
This ensures configuring extra required Mac options before using `glimmer` and `girb` commands.
|
360
|
+
|
352
361
|
If you are new to Glimmer and would like to continue learning the basics, you may continue to the [Glimmer Command](https://github.com/AndyObtiva/glimmer#glimmer-command) section.
|
353
362
|
|
354
363
|
Otherwise, if you are ready to build a Glimmer app, you can jump to the [Glimmer Scaffolding](https://github.com/AndyObtiva/glimmer-dsl-swt/blob/master/docs/reference/GLIMMER_COMMAND.md#scaffolding) section next.
|
@@ -360,7 +369,7 @@ Note: if you're using activerecord or activesupport, keep in mind that Glimmer u
|
|
360
369
|
|
361
370
|
Add the following to `Gemfile`:
|
362
371
|
```
|
363
|
-
gem 'glimmer-dsl-swt', '~> 4.
|
372
|
+
gem 'glimmer-dsl-swt', '~> 4.20.0.0'
|
364
373
|
```
|
365
374
|
|
366
375
|
And, then run:
|
@@ -381,7 +390,7 @@ glimmer
|
|
381
390
|
```
|
382
391
|
|
383
392
|
```
|
384
|
-
Glimmer (JRuby Desktop Development GUI Framework) - JRuby Gem: glimmer-dsl-swt v4.
|
393
|
+
Glimmer (JRuby Desktop Development GUI Framework) - JRuby Gem: glimmer-dsl-swt v4.20.0.0
|
385
394
|
|
386
395
|
Usage: glimmer [--bundler] [--pd] [--quiet] [--debug] [--log-level=VALUE] [[ENV_VAR=VALUE]...] [[-jruby-option]...] (application.rb or task[task_args]) [[application2.rb]...]
|
387
396
|
|
@@ -478,6 +487,8 @@ table(:multi) {
|
|
478
487
|
}
|
479
488
|
```
|
480
489
|
|
490
|
+
If you need more widgets, you can check out the [Nebula Project](https://github.com/AndyObtiva/glimmer-cw-nebula) (50+ enterprise-grade custom widgets)
|
491
|
+
|
481
492
|
Learn more at: [docs/reference/GLIMMER_GUI_DSL_SYNTAX.md](docs/reference/GLIMMER_GUI_DSL_SYNTAX.md)
|
482
493
|
|
483
494
|
## Glimmer Configuration
|
@@ -492,7 +503,7 @@ Learn more at: [docs/reference/GLIMMER_CONFIGURATION.md](docs/reference/GLIMMER_
|
|
492
503
|
|
493
504
|
## Samples
|
494
505
|
|
495
|
-
Check the [samples](
|
506
|
+
Check the [samples](/docs/reference/GLIMMER_SAMPLES.md) directory in [glimmer-dsl-swt](https://github.com/AndyObtiva/glimmer-dsl-swt) for examples on how to write Glimmer applications. To run a sample, make sure to install the `glimmer-dsl-swt` gem first and then run:
|
496
507
|
```
|
497
508
|
glimmer samples
|
498
509
|
```
|
@@ -501,7 +512,7 @@ glimmer samples
|
|
501
512
|
|
502
513
|
![Glimmer Meta-Sample](/images/glimmer-meta-sample.png)
|
503
514
|
|
504
|
-
See a listing of samples including screenshots and explanations at: [docs/reference/GLIMMER_SAMPLES.md](docs/reference/GLIMMER_SAMPLES.md)
|
515
|
+
See a listing of samples including screenshots and explanations at: [docs/reference/GLIMMER_SAMPLES.md](/docs/reference/GLIMMER_SAMPLES.md)
|
505
516
|
|
506
517
|
## In Production
|
507
518
|
|
@@ -529,6 +540,10 @@ If you have a Glimmer app you would like referenced here, please mention in a Pu
|
|
529
540
|
|
530
541
|
[<img alt="Connector Logo" src="https://raw.githubusercontent.com/AndyObtiva/connector/master/package/linux/Connector.png" height=40 /> Connector](https://github.com/AndyObtiva/connector): A minimalist open-source multi-engine web browser
|
531
542
|
|
543
|
+
### The DCR Programming Language
|
544
|
+
|
545
|
+
[<img alt="Connector Logo" src="https://raw.githubusercontent.com/AndyObtiva/dcr/f31cd45a8503051e899ed8e831fd03654d38e418/package/linux/Draw%20Color%20Repeat.png" height=40 /> Draw Color Repeat](https://github.com/AndyObtiva/dcr): A young boy programming language for Drawing and Coloring with Repetition
|
546
|
+
|
532
547
|
## Packaging & Distribution
|
533
548
|
|
534
549
|
Glimmer simplifies the process of native-executable packaging and distribution on Mac and Windows via a single command:
|
@@ -666,10 +681,6 @@ You may apply for contributing to any of these Glimmer DSL gems whether you pref
|
|
666
681
|
|
667
682
|
[Click here to view contributor commits.](https://github.com/AndyObtiva/glimmer-dsl-swt/graphs/contributors)
|
668
683
|
|
669
|
-
## Hire Me
|
670
|
-
|
671
|
-
If your company would like to invest fulltime in further development of the Glimmer open-source project, [hire me](https://www.linkedin.com/in/andymaleh/).
|
672
|
-
|
673
684
|
## License
|
674
685
|
|
675
686
|
[MIT](LICENSE.txt)
|
@@ -679,3 +690,5 @@ Copyright (c) 2007-2021 - Andy Maleh.
|
|
679
690
|
--
|
680
691
|
|
681
692
|
[<img src="https://raw.githubusercontent.com/AndyObtiva/glimmer/master/images/glimmer-logo-hi-res.png" height=40 />](https://github.com/AndyObtiva/glimmer) Built for [Glimmer](https://github.com/AndyObtiva/glimmer) (DSL Framework).
|
693
|
+
|
694
|
+
Glimmer logo was made by [Freepik](https://www.flaticon.com/authors/freepik) from [www.flaticon.com](http://www.flaticon.com)
|
data/RUBY_VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
jruby-9.2.
|
1
|
+
jruby-9.2.19.0
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
4.
|
1
|
+
4.20.0.0
|
data/bin/girb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
#!/usr/bin/env jruby
|
2
2
|
|
3
3
|
# Copyright (c) 2007-2021 Andy Maleh
|
4
|
-
#
|
4
|
+
#
|
5
5
|
# Permission is hereby granted, free of charge, to any person obtaining
|
6
6
|
# a copy of this software and associated documentation files (the
|
7
7
|
# "Software"), to deal in the Software without restriction, including
|
@@ -9,10 +9,10 @@
|
|
9
9
|
# distribute, sublicense, and/or sell copies of the Software, and to
|
10
10
|
# permit persons to whom the Software is furnished to do so, subject to
|
11
11
|
# the following conditions:
|
12
|
-
#
|
12
|
+
#
|
13
13
|
# The above copyright notice and this permission notice shall be
|
14
14
|
# included in all copies or substantial portions of the Software.
|
15
|
-
#
|
15
|
+
#
|
16
16
|
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
17
|
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
18
|
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
@@ -21,11 +21,12 @@
|
|
21
21
|
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
22
|
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
23
23
|
|
24
|
-
|
25
|
-
# No Op for irb
|
26
|
-
end
|
24
|
+
# This script was written for Windows and Linux only
|
27
25
|
|
28
|
-
|
26
|
+
ENV['JRUBY_OPTS'] = ARGV.select {|arg| arg.start_with?('-')}.join(' ')
|
29
27
|
|
30
|
-
|
31
|
-
|
28
|
+
require_relative 'girb_runner'
|
29
|
+
|
30
|
+
require 'irb'
|
31
|
+
|
32
|
+
IRB.start('.')
|
data/bin/girb_runner.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
# Copyright (c) 2007-2021 Andy Maleh
|
2
|
-
#
|
2
|
+
#
|
3
3
|
# Permission is hereby granted, free of charge, to any person obtaining
|
4
4
|
# a copy of this software and associated documentation files (the
|
5
5
|
# "Software"), to deal in the Software without restriction, including
|
@@ -7,10 +7,10 @@
|
|
7
7
|
# distribute, sublicense, and/or sell copies of the Software, and to
|
8
8
|
# permit persons to whom the Software is furnished to do so, subject to
|
9
9
|
# the following conditions:
|
10
|
-
#
|
10
|
+
#
|
11
11
|
# The above copyright notice and this permission notice shall be
|
12
12
|
# included in all copies or substantial portions of the Software.
|
13
|
-
#
|
13
|
+
#
|
14
14
|
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
15
|
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
16
|
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
@@ -20,6 +20,11 @@
|
|
20
20
|
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
21
21
|
|
22
22
|
require 'puts_debuggerer'
|
23
|
+
require_relative '../lib/glimmer-dsl-swt'
|
24
|
+
|
25
|
+
trap "SIGINT" do
|
26
|
+
# No Op for irb
|
27
|
+
end
|
23
28
|
|
24
29
|
include Glimmer
|
25
30
|
|
data/bin/glimmer
CHANGED
@@ -21,6 +21,15 @@
|
|
21
21
|
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
22
|
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
23
23
|
|
24
|
+
# This script was written for Windows and Linux only
|
25
|
+
|
26
|
+
require_relative '../lib/glimmer-dsl-swt'
|
24
27
|
require_relative '../lib/glimmer/launcher'
|
25
28
|
|
26
|
-
Glimmer
|
29
|
+
# Initialize launcher, consuming ARGV args that are for Glimmer only
|
30
|
+
launcher = Glimmer::Launcher.new(ARGV)
|
31
|
+
|
32
|
+
# Set remaining ARGV args (starting with `-`) as JRuby options
|
33
|
+
ENV['JRUBY_OPTS'] = ARGV.select {|arg| arg.start_with?('-')}.join(' ')
|
34
|
+
|
35
|
+
launcher.launch
|
data/bin/glimmer-setup
ADDED
@@ -0,0 +1,58 @@
|
|
1
|
+
#!/usr/bin/env jruby
|
2
|
+
|
3
|
+
# Copyright (c) 2020-2021 Andy Maleh
|
4
|
+
#
|
5
|
+
# Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
# a copy of this software and associated documentation files (the
|
7
|
+
# "Software"), to deal in the Software without restriction, including
|
8
|
+
# without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
# distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
# permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
# the following conditions:
|
12
|
+
#
|
13
|
+
# The above copyright notice and this permission notice shall be
|
14
|
+
# included in all copies or substantial portions of the Software.
|
15
|
+
#
|
16
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
23
|
+
|
24
|
+
require 'os'
|
25
|
+
|
26
|
+
if OS.mac?
|
27
|
+
require 'fileutils'
|
28
|
+
home_dir = `echo ~`.strip
|
29
|
+
|
30
|
+
[
|
31
|
+
['.bash_profile', '.bashrc'],
|
32
|
+
['.zprofile', '.zshrc']
|
33
|
+
].each do |profile_and_fallback|
|
34
|
+
shell_profile_file_name = profile_and_fallback.first
|
35
|
+
shell_profile_file_name = profile_and_fallback.last if !File.exist?("#{home_dir}/#{shell_profile_file_name}")
|
36
|
+
shell_profile_file = "#{home_dir}/#{shell_profile_file_name}"
|
37
|
+
FileUtils.touch(shell_profile_file)
|
38
|
+
shell_profile = File.read(shell_profile_file)
|
39
|
+
glimmer_source_statement = 'export JRUBY_OPTS="$JRUBY_OPTS -J-XstartOnFirstThread"'
|
40
|
+
unless shell_profile.split("\n").detect {|line| line.include?(glimmer_source_statement) }
|
41
|
+
File.write(shell_profile_file, "#{shell_profile}\n#{glimmer_source_statement}")
|
42
|
+
end
|
43
|
+
puts "~/#{shell_profile_file_name} has been modified"
|
44
|
+
end
|
45
|
+
|
46
|
+
puts <<~OUTPUT
|
47
|
+
|
48
|
+
Before using `glimmer` or `girb`, start a new shell session in the same directory (open a new terminal tab and go to the same directory) or run the following command:
|
49
|
+
|
50
|
+
export JRUBY_OPTS="$JRUBY_OPTS -J-XstartOnFirstThread"
|
51
|
+
|
52
|
+
Afterwards, you may run the following commands:
|
53
|
+
|
54
|
+
glimmer
|
55
|
+
girb
|
56
|
+
|
57
|
+
OUTPUT
|
58
|
+
end
|
@@ -166,15 +166,12 @@ $ glimmer scaffold[greeter]
|
|
166
166
|
create Rakefile
|
167
167
|
create Gemfile
|
168
168
|
create LICENSE.txt
|
169
|
-
create README.
|
169
|
+
create README.markdown
|
170
170
|
create .document
|
171
171
|
create lib
|
172
|
-
create lib/
|
173
|
-
create spec
|
174
|
-
create spec/spec_helper.rb
|
175
|
-
create spec/greeter_spec.rb
|
172
|
+
create lib/snowboard_utah.rb
|
176
173
|
create .rspec
|
177
|
-
Juwelier has prepared your gem in ./
|
174
|
+
Juwelier has prepared your gem in ./snowboard_utah
|
178
175
|
Created greeter/.gitignore
|
179
176
|
Created greeter/.ruby-version
|
180
177
|
Created greeter/.ruby-gemset
|
@@ -183,17 +180,19 @@ Created greeter/LICENSE.txt
|
|
183
180
|
Created greeter/Gemfile
|
184
181
|
Created greeter/Rakefile
|
185
182
|
Created greeter/app/greeter.rb
|
186
|
-
Created greeter/app/
|
187
|
-
Created greeter/package/windows/
|
188
|
-
Created greeter/package/macosx/
|
189
|
-
Created greeter/package/linux/
|
183
|
+
Created greeter/app/greeter/view/app_view.rb
|
184
|
+
Created greeter/package/windows/Snowboard Utah.ico
|
185
|
+
Created greeter/package/macosx/Snowboard Utah.icns
|
186
|
+
Created greeter/package/linux/Snowboard Utah.png
|
187
|
+
Created greeter/app/greeter/launch.rb
|
190
188
|
Created greeter/bin/greeter
|
191
|
-
Created greeter/spec/spec_helper.rb
|
192
189
|
...
|
193
190
|
```
|
194
191
|
|
195
192
|
Eventually, it will launch an advanced "Hello, World!" app window having the title of your application ("Greeter").
|
196
193
|
|
194
|
+
(note: javapackager might claim at the end "Error: Bundler "DMG Installer" (dmg) failed to produce a bundle.", but it's a false negative since it works fully anyways)
|
195
|
+
|
197
196
|
![Glimmer Scaffold App](/images/glimmer-scaffolding-app.png)
|
198
197
|
|
199
198
|
It also comes with a boilerplate Preferences dialog.
|
@@ -256,21 +255,6 @@ You should see output like the following:
|
|
256
255
|
|
257
256
|
```
|
258
257
|
$ glimmer scaffold:desktopify[snowboard_utah,https://www.brightonresort.com]
|
259
|
-
Fetching kamelcase-0.0.2.gem
|
260
|
-
Fetching github_api-0.19.0.gem
|
261
|
-
Fetching highline-2.0.3.gem
|
262
|
-
Fetching juwelier-2.4.9.gem
|
263
|
-
Fetching hashie-3.6.0.gem
|
264
|
-
Fetching nokogiri-1.10.10-java.gem
|
265
|
-
Fetching semver2-3.4.2.gem
|
266
|
-
Successfully installed semver2-3.4.2
|
267
|
-
Successfully installed kamelcase-0.0.2
|
268
|
-
Successfully installed highline-2.0.3
|
269
|
-
Successfully installed hashie-3.6.0
|
270
|
-
Successfully installed github_api-0.19.0
|
271
|
-
Successfully installed nokogiri-1.10.10-java
|
272
|
-
Successfully installed juwelier-2.4.9
|
273
|
-
7 gems installed
|
274
258
|
create .gitignore
|
275
259
|
create Rakefile
|
276
260
|
create Gemfile
|
@@ -289,16 +273,19 @@ Created snowboard_utah/LICENSE.txt
|
|
289
273
|
Created snowboard_utah/Gemfile
|
290
274
|
Created snowboard_utah/Rakefile
|
291
275
|
Created snowboard_utah/app/snowboard_utah.rb
|
292
|
-
Created snowboard_utah/app/
|
276
|
+
Created snowboard_utah/app/snowboard_utah/view/app_view.rb
|
293
277
|
Created snowboard_utah/package/windows/Snowboard Utah.ico
|
294
278
|
Created snowboard_utah/package/macosx/Snowboard Utah.icns
|
295
279
|
Created snowboard_utah/package/linux/Snowboard Utah.png
|
280
|
+
Created snowboard_utah/app/snowboard_utah/launch.rb
|
296
281
|
Created snowboard_utah/bin/snowboard_utah
|
297
282
|
...
|
298
283
|
```
|
299
284
|
|
300
285
|
Eventually, it will launch a desktopified version of "https://www.brightonresort.com" having the title of ("Snowboard Utah").
|
301
286
|
|
287
|
+
(note: javapackager might claim at the end "Error: Bundler "DMG Installer" (dmg) failed to produce a bundle.", but it's a false negative since it works fully anyways)
|
288
|
+
|
302
289
|
Desktopified App on Mac
|
303
290
|
|
304
291
|
![Glimmer Scaffold App](/images/glimmer-scaffolding-desktopify.png)
|
@@ -570,10 +557,10 @@ Output:
|
|
570
557
|
|
571
558
|
Glimmer Custom Shape Gems at rubygems.org:
|
572
559
|
|
573
|
-
Name Gem Version Author Description
|
560
|
+
Name Gem Version Author Description
|
574
561
|
|
575
|
-
Bevel glimmer-cp-bevel 0.1.1 Andy Maleh Bevel - Glimmer Custom Shape
|
576
|
-
Stickfigure glimmer-cp-stickfigure 0.1.1 Andy Maleh Stick Figure - Glimmer Custom Shape
|
562
|
+
Bevel glimmer-cp-bevel 0.1.1 Andy Maleh Bevel - Glimmer Custom Shape
|
563
|
+
Stickfigure glimmer-cp-stickfigure 0.1.1 Andy Maleh Stick Figure - Glimmer Custom Shape
|
577
564
|
|
578
565
|
```
|
579
566
|
|
@@ -631,6 +618,8 @@ Or, the following on Mac:
|
|
631
618
|
jruby -J-XstartOnFirstThread -r glimmer-dsl-swt -S application.rb
|
632
619
|
```
|
633
620
|
|
621
|
+
Unless you ran `glimmer-setup`, which adds `JRUBY_OPTS` environment variable that includes the `-J-XstartOnFirstThread` option automatically so you would not have to specify manually.
|
622
|
+
|
634
623
|
If you want to use a specific custom version of SWT, run the following on Windows/Linux:
|
635
624
|
|
636
625
|
```
|