glimmer-dsl-swt 4.18.7.5 → 4.19.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (55) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +42 -0
  3. data/README.md +29 -11
  4. data/RUBY_VERSION +1 -1
  5. data/VERSION +1 -1
  6. data/bin/girb +10 -9
  7. data/bin/girb_runner.rb +8 -3
  8. data/bin/glimmer +10 -1
  9. data/bin/glimmer-setup +58 -0
  10. data/bin/glimmer_runner.rb +4 -0
  11. data/docs/reference/GLIMMER_COMMAND.md +21 -31
  12. data/docs/reference/GLIMMER_GUI_DSL_SYNTAX.md +6 -2
  13. data/docs/reference/GLIMMER_PACKAGING_AND_DISTRIBUTION.md +7 -1
  14. data/docs/reference/GLIMMER_SAMPLES.md +27 -0
  15. data/glimmer-dsl-swt.gemspec +0 -0
  16. data/lib/glimmer-dsl-swt.rb +8 -0
  17. data/lib/glimmer/data_binding/widget_binding.rb +1 -1
  18. data/lib/glimmer/dsl/swt/c_tab_item_expression.rb +58 -0
  19. data/lib/glimmer/dsl/swt/combo_selection_data_binding_expression.rb +2 -1
  20. data/lib/glimmer/dsl/swt/tab_item_expression.rb +7 -3
  21. data/lib/glimmer/dsl/swt/widget_expression.rb +1 -1
  22. data/lib/glimmer/launcher.rb +27 -51
  23. data/lib/glimmer/rake_task.rb +1 -1
  24. data/lib/glimmer/rake_task/package.rb +7 -2
  25. data/lib/glimmer/rake_task/scaffold.rb +227 -254
  26. data/lib/glimmer/swt/c_tab_item_proxy.rb +53 -0
  27. data/lib/glimmer/swt/custom/code_text.rb +19 -3
  28. data/lib/glimmer/swt/custom/shape.rb +15 -1
  29. data/lib/glimmer/swt/sash_form_proxy.rb +6 -0
  30. data/lib/glimmer/swt/shell_proxy.rb +3 -1
  31. data/lib/glimmer/swt/tab_folder_proxy.rb +1 -0
  32. data/lib/glimmer/swt/tab_item_proxy.rb +17 -18
  33. data/lib/glimmer/swt/widget_proxy.rb +9 -0
  34. data/samples/elaborate/mandelbrot_fractal.rb +11 -6
  35. data/samples/elaborate/meta_sample.rb +4 -2
  36. data/samples/elaborate/metronome.rb +1 -1
  37. data/samples/elaborate/stock_ticker.rb +2 -2
  38. data/samples/hello/hello_c_combo.rb +68 -0
  39. data/samples/hello/hello_c_tab.rb +173 -0
  40. data/samples/hello/hello_c_tab/denmark.png +0 -0
  41. data/samples/hello/hello_c_tab/finland.png +0 -0
  42. data/samples/hello/hello_c_tab/france.png +0 -0
  43. data/samples/hello/hello_c_tab/germany.png +0 -0
  44. data/samples/hello/hello_c_tab/italy.png +0 -0
  45. data/samples/hello/hello_c_tab/mexico.png +0 -0
  46. data/samples/hello/hello_c_tab/netherlands.png +0 -0
  47. data/samples/hello/hello_c_tab/norway.png +0 -0
  48. data/samples/hello/hello_c_tab/usa.png +0 -0
  49. data/samples/hello/hello_code_text.rb +141 -73
  50. data/samples/hello/hello_shape.rb +1 -0
  51. data/samples/hello/hello_tab.rb +2 -0
  52. data/vendor/swt/linux/swt.jar +0 -0
  53. data/vendor/swt/mac/swt.jar +0 -0
  54. data/vendor/swt/windows/swt.jar +0 -0
  55. metadata +75 -34
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 624d10930b3ed1e17b60131a6e42825b58c8b997e04ec3169099bc10f994e3e4
4
- data.tar.gz: d05163b01c26b519866d831cd54d849632367270582c25e8237455cb18e2ed69
3
+ metadata.gz: 93ec7af6cbc39ea5df42b33602473d8f8577cd1f1370e794f684ce059dab41ee
4
+ data.tar.gz: 0ade71e71e6c2255b3583737ef65264a3f1518de9e135abcca354b648b66e045
5
5
  SHA512:
6
- metadata.gz: 424f2c3aeecef6728ea5b2cfe1c00c6afda10b11f04bd14fa59150bc6e2fb07f4738c3deb681882431f13a2b0a8d6cbf292ef1f00ac2b5732f253830e13f00df
7
- data.tar.gz: b0e44958872f55f23301191105dce94b4b59ecd60a4349a07caf0b4191bd37ba075d0f9dc1ff988598cfb922ebf5e133c589a3c693368e6d656c5ecf37691d57
6
+ metadata.gz: 523b11fe2143376f5fe395c2b3eb3ca440fcf16851176874d0ea87c7f533d5f87251acab138ab81fa6c5c75f535de43c4fe5cb315c8a4f945e5d58b470a7ed3c
7
+ data.tar.gz: f16f441f4e2861de3b899d3992c83f99b4ec7da30a3f077f0191708ba8a7797c01bc3b68ee5a6b430b0e972d55005715277a0c445c323fff4bd99f44dcf9ae13
data/CHANGELOG.md CHANGED
@@ -1,5 +1,47 @@
1
1
  # Change Log
2
2
 
3
+ ### 4.19.0.2
4
+
5
+ - Fixed issue with Meta-Sample code editing not showing changes properly (although recording them)
6
+ - Stop Mandelbrot Fractal sample background calculation when its custom shell is closed
7
+
8
+ ### 4.19.0.1
9
+
10
+ - Upgrade to JRuby 9.2.17.0
11
+ - Fix Hello, C Tab! sample not showing flags on Windows
12
+ - Fix Stock Ticker elaborate sample non-scrolling and clipped stock names on Windows
13
+
14
+ ### 4.19.0.0
15
+
16
+ - Upgrade to SWT 4.19
17
+ - Upgrade to JRuby 9.2.16.0
18
+ - 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)
19
+ - glimmer-setup command configures `glimmer` and `girb` for the Mac with `-X-JstartOnFirstThread` in a `JRUBY_OPTS` environment variable
20
+ - 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)
21
+ - Make sure that scaffolded shell/app uses new custom shell built-in `.launch` method instead of custom written `.open` method
22
+ - Make `scaffold:desktopify` generated app window shell fill the screen by default
23
+ - Support `c_tab_folder` and `c_tab_item`
24
+ - Support `c_combo` (`org.eclipse.swt.custom.CCombo` SWT widget) data-binding
25
+ - Hello, CCombo!
26
+ - Hello, C Tab!
27
+ - Shape#clear_shapes just like that of Drawable in WidgetProxy
28
+ - Set default background of `rgb(230, 230, 230)` on sash_form to make it more spottable to resize the sash
29
+ - Fix issue with processing arguments for the `glimmer package` command.
30
+ - Fix mandelbrot fractal sample on Windows (added missing `jruby-win32ole` gem for use with `concurrent-ruby` gem)
31
+ - 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!`
32
+
33
+ ### 4.18.7.7
34
+
35
+ - Upgrade to glimmer v1.3.0
36
+ - Handle `code_text` encountering errors in adding observation request
37
+ - Always notify widget binding observer on `async_exec: true` data-bindings
38
+
39
+ ### 4.18.7.6
40
+
41
+ - Update the Hello, Code Text! sample to use data-binding
42
+ - Upgrade `puts_debuggerer` gem dependency to version 0.12.0
43
+ - Fix issue with `code_text` data-binding
44
+
3
45
  ### 4.18.7.5
4
46
 
5
47
  - Update `ImageProxy` with missing methods `#size`, `#parent_proxy`, and `#parent`, needed for a better "Shapes in an Image" support.
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.18.7.5
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.19.0.2
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,12 +10,12 @@
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) 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 its creator [Andy Maleh](https://andymaleh.blogspot.com/), an EclipseCon/EclipseWorld/RubyConf speaker and expert. [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/).
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 its 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.7.5 includes [SWT 4.18](https://download.eclipse.org/eclipse/downloads/drops4/R-4.18-202012021800/), which was released on December 2, 2020. 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.
18
+ [Glimmer DSL for SWT](https://rubygems.org/gems/glimmer-dsl-swt) 4.19.0.2 includes [SWT 4.19](https://download.eclipse.org/eclipse/downloads/drops4/R-4.19-202103031800/), which was released on March 3, 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.
19
19
 
20
20
  [Glimmer DSL for SWT receives two updates per month](https://rubygems.org/gems/glimmer-dsl-swt/versions). You can trust [Glimmer DSL for SWT](https://rubygems.org/gems/glimmer-dsl-swt) with your Ruby desktop GUI development needs! [Glimmer DSL for SWT](https://rubygems.org/gems/glimmer-dsl-swt) brings great ideas to the table, such as declarative programming via domain specific languages, currently under-utilized in the GUI domain. That said, it may not be feature complete enough for everybody's needs, so please help make [Glimmer DSL for SWT](https://rubygems.org/gems/glimmer-dsl-swt) even better by providing feedback and [contributing](#contributing) when possible. The project is very active, so any feature suggestions that are accepted could be implemented within weeks if not days. Also, you are welcome to [hire me](#hire-me) full-time if you want long-term development of [Glimmer DSL for SWT](https://rubygems.org/gems/glimmer-dsl-swt) for your project needs.
21
21
 
@@ -308,14 +308,14 @@ https://www.eclipse.org/swt/faq.php
308
308
  ## Pre-requisites
309
309
 
310
310
  - 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
- - JRuby 9.2.14.0 (supporting Ruby 2.5.x syntax) (get via [RVM](http://rvm.io) on Mac and Linux or find at [https://www.jruby.org/download](https://www.jruby.org/download) for Windows)
312
- - SWT 4.18 (already included in the [glimmer-dsl-swt](https://rubygems.org/gems/glimmer-dsl-swt) gem)
311
+ - JRuby 9.2.17.0 (supporting Ruby 2.5.x syntax) (get via [RVM](http://rvm.io) on Mac and Linux or find at [https://www.jruby.org/download](https://www.jruby.org/download) for Windows)
312
+ - SWT 4.19 (already included in the [glimmer-dsl-swt](https://rubygems.org/gems/glimmer-dsl-swt) gem)
313
313
  - Git (comes with Mac and Linux. Install on Windows: https://git-scm.com/download/win )
314
314
 
315
315
  To obtain JRuby through [RVM](http://rvm.io), you may run:
316
316
 
317
317
  ```bash
318
- rvm install jruby-9.2.14.0
318
+ rvm install jruby-9.2.17.0
319
319
  ```
320
320
 
321
321
  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.
@@ -342,13 +342,23 @@ jgem install glimmer-dsl-swt
342
342
 
343
343
  Or this command if you want a specific version:
344
344
  ```
345
- jgem install glimmer-dsl-swt -v 4.18.7.5
345
+ jgem install glimmer-dsl-swt -v 4.19.0.2
346
346
  ```
347
347
 
348
348
  `jgem` is JRuby's version of `gem` command.
349
349
  RVM allows running `gem install` directly as an alias.
350
350
  Otherwise, you may also run `jruby -S gem install ...`
351
351
 
352
+ Afterwards, you can use `glimmer` and `girb` commands.
353
+
354
+ On the Mac, you also have to run:
355
+
356
+ ```
357
+ glimmer-setup
358
+ ```
359
+
360
+ This ensures configuring extra required Mac options before using `glimmer` and `girb` commands.
361
+
352
362
  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
363
 
354
364
  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 +370,7 @@ Note: if you're using activerecord or activesupport, keep in mind that Glimmer u
360
370
 
361
371
  Add the following to `Gemfile`:
362
372
  ```
363
- gem 'glimmer-dsl-swt', '~> 4.18.7.5'
373
+ gem 'glimmer-dsl-swt', '~> 4.19.0.2'
364
374
  ```
365
375
 
366
376
  And, then run:
@@ -381,7 +391,7 @@ glimmer
381
391
  ```
382
392
 
383
393
  ```
384
- Glimmer (JRuby Desktop Development GUI Framework) - JRuby Gem: glimmer-dsl-swt v4.18.7.5
394
+ Glimmer (JRuby Desktop Development GUI Framework) - JRuby Gem: glimmer-dsl-swt v4.19.0.2
385
395
 
386
396
  Usage: glimmer [--bundler] [--pd] [--quiet] [--debug] [--log-level=VALUE] [[ENV_VAR=VALUE]...] [[-jruby-option]...] (application.rb or task[task_args]) [[application2.rb]...]
387
397
 
@@ -478,6 +488,8 @@ table(:multi) {
478
488
  }
479
489
  ```
480
490
 
491
+ If you need more widgets, you can check out the [Nebula Project](https://github.com/AndyObtiva/glimmer-cw-nebula) (50+ enterprise-grade custom widgets)
492
+
481
493
  Learn more at: [docs/reference/GLIMMER_GUI_DSL_SYNTAX.md](docs/reference/GLIMMER_GUI_DSL_SYNTAX.md)
482
494
 
483
495
  ## Glimmer Configuration
@@ -492,7 +504,7 @@ Learn more at: [docs/reference/GLIMMER_CONFIGURATION.md](docs/reference/GLIMMER_
492
504
 
493
505
  ## Samples
494
506
 
495
- Check the [samples](samples) 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:
507
+ 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
508
  ```
497
509
  glimmer samples
498
510
  ```
@@ -501,7 +513,7 @@ glimmer samples
501
513
 
502
514
  ![Glimmer Meta-Sample](/images/glimmer-meta-sample.png)
503
515
 
504
- See a listing of samples including screenshots and explanations at: [docs/reference/GLIMMER_SAMPLES.md](docs/reference/GLIMMER_SAMPLES.md)
516
+ See a listing of samples including screenshots and explanations at: [docs/reference/GLIMMER_SAMPLES.md](/docs/reference/GLIMMER_SAMPLES.md)
505
517
 
506
518
  ## In Production
507
519
 
@@ -529,6 +541,10 @@ If you have a Glimmer app you would like referenced here, please mention in a Pu
529
541
 
530
542
  [<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
543
 
544
+ ### The DCR Programming Language
545
+
546
+ [<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
547
+
532
548
  ## Packaging & Distribution
533
549
 
534
550
  Glimmer simplifies the process of native-executable packaging and distribution on Mac and Windows via a single command:
@@ -679,3 +695,5 @@ Copyright (c) 2007-2021 - Andy Maleh.
679
695
  --
680
696
 
681
697
  [<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).
698
+
699
+ 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.14.0
1
+ jruby-9.2.17.0
data/VERSION CHANGED
@@ -1 +1 @@
1
- 4.18.7.5
1
+ 4.19.0.2
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
- trap "SIGINT" do
25
- # No Op for irb
26
- end
24
+ # This script was written for Windows and Linux only
27
25
 
28
- require_relative '../lib/glimmer/launcher'
26
+ ENV['JRUBY_OPTS'] = ARGV.select {|arg| arg.start_with?('-')}.join(' ')
29
27
 
30
- girb_runner = File.expand_path('../girb_runner.rb', __FILE__)
31
- Glimmer::Launcher.new(["irb -r #{girb_runner}"] + ARGV).launch
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::Launcher.new(ARGV).launch
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
@@ -0,0 +1,4 @@
1
+ require_relative '../lib/glimmer-dsl-swt'
2
+ require_relative '../lib/glimmer/launcher'
3
+
4
+ Glimmer::Launcher.new(ARGV).launch
@@ -166,15 +166,12 @@ $ glimmer scaffold[greeter]
166
166
  create Rakefile
167
167
  create Gemfile
168
168
  create LICENSE.txt
169
- create README.rdoc
169
+ create README.markdown
170
170
  create .document
171
171
  create lib
172
- create lib/greeter.rb
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 ./greeter
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/views/greeter/app_view.rb
187
- Created greeter/package/windows/Greeter.ico
188
- Created greeter/package/macosx/Greeter.icns
189
- Created greeter/package/linux/Greeter.png
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/views/snowboard_utah/app_view.rb
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)
@@ -569,10 +556,11 @@ Output:
569
556
  ```
570
557
 
571
558
  Glimmer Custom Shape Gems at rubygems.org:
572
-
573
- Name Gem Version Author Description
574
-
575
- Bevel glimmer-cp-bevel 0.1.0 Andy Maleh Bevel - Glimmer Custom Shape
559
+
560
+ Name Gem Version Author Description
561
+
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
576
564
 
577
565
  ```
578
566
 
@@ -630,6 +618,8 @@ Or, the following on Mac:
630
618
  jruby -J-XstartOnFirstThread -r glimmer-dsl-swt -S application.rb
631
619
  ```
632
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
+
633
623
  If you want to use a specific custom version of SWT, run the following on Windows/Linux:
634
624
 
635
625
  ```