glimmer-dsl-swt 4.20.15.5 → 4.21.0.0

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: 9f6821f06b97a6c28c25a3b1cc20e54e02b360aac68ef2aafb7c57e7e8fb8818
4
- data.tar.gz: 2c14c0ab6171e18fea43a53af15597e2dd936e47dfda9ab4954d8f7d7a1a5bbf
3
+ metadata.gz: 5cdb03595910fbb0a4e8a6e40262aea904904063f08e8cf6144bb5569408fc60
4
+ data.tar.gz: efe9220cb985da71aa1c27efc914cdd9d71d21a0466adad994d0e751c3063219
5
5
  SHA512:
6
- metadata.gz: 21bd62433c3ea4e6b6b2bb58ae26bf2db5ea06a8a74a56462120587ea5309a95444782a4eec0619a2b900bb2b76384f5099738d2ece518c6114b6bde6db064be
7
- data.tar.gz: 1db0ae532b03899d7350d547eea9b49703a9ca91e8768388a8ca6d6a30631bf2b6ace6114e09df343275c1520ad5c7841e8b78e523a1aa7f7b3a34828ee54fd4
6
+ metadata.gz: 516f678f951f896a4421f1dbb46bb6b7c5e2c53713892627e6c3d51f097f74f50328d82582a04c33db786cdf6c71a7de0afc89299f34262b8e5af99b18e2429c
7
+ data.tar.gz: 11ce0f19287bc04ff2f1824896400d8ed90061a738960d8495131245ebefdd9e1dfd04868f4a8ef4a9ada9a7c16654a5f035a6d92a88bbf8296c23f832bbb892
data/CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # Change Log
2
2
 
3
+ ### 4.21.0.0
4
+
5
+ - Upgrade to SWT 4.21
6
+ - Upgrade to JDK 16.0.2
7
+ - Upgrade to JRuby 9.3.0.0
8
+ - Update packaging to rely on JDK 16 `jpackage` (instead of older JDK 8 `javapackager`)
9
+ - Renamed `Glimmer::RakeTask::Package.javapackager_extra_args` to `Glimmer::RakeTask::Package.jpackage_extra_args` to match the name of `jpackage` in JDK 16
10
+ - Change `package/[os]` scaffolding placement for packaging icons into `icons/[os]` to accomodate Java 9 Module security for icon retrieval from within a JAR
11
+
3
12
  ### 4.20.15.5
4
13
 
5
14
  - Upgrade to glimmer 2.1.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.20.15.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.21.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)
@@ -15,7 +15,7 @@
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.20.15.5 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 (please report any issues you may encounter).
18
+ [Glimmer DSL for SWT](https://rubygems.org/gems/glimmer-dsl-swt) 4.21.0.0 includes [SWT 4.21](https://download.eclipse.org/eclipse/downloads/drops4/R-4.21-202109060500/), which was released on September 6, 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 (please 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 a beta, so default back to `bind` whenever needed).
21
21
 
@@ -290,10 +290,10 @@ https://www.eclipse.org/swt/faq.php
290
290
 
291
291
  ## Pre-requisites
292
292
 
293
- - 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)
293
+ - JDK 16 (16.0.2) (find at https://www.oracle.com/java/technologies/downloads/#java16 / On Windows, ensure PATH includes Java bin directory for jpackage to work during packaging Glimmer applications)
294
294
  - [RVM](http://rvm.io) on Mac & Linux (not available on Windows)
295
- - 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))
296
- - 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.
295
+ - JRuby 9.3.0.0 (supporting Ruby 2.6.x syntax) (get via [RVM](http://rvm.io) on Mac and Linux by running `rvm install jruby-9.3.0.0`; On Windows, find at [https://www.jruby.org/download](https://www.jruby.org/download) [you might have to dual-install JDK8 temporarily as it might be required by jruby installer and then switch JAVA_HOME to JDK16 once done installing and restart command prompt/git bash])
296
+ - SWT 4.21 (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.
297
297
  - Git (comes with Mac and Linux. Install on Windows: https://git-scm.com/download/win )
298
298
 
299
299
  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,7 +322,7 @@ jgem install glimmer-dsl-swt
322
322
 
323
323
  Or this command if you want a specific version:
324
324
  ```
325
- jgem install glimmer-dsl-swt -v 4.20.15.5
325
+ jgem install glimmer-dsl-swt -v 4.21.0.0
326
326
  ```
327
327
 
328
328
  `jgem` is JRuby's version of `gem` command.
@@ -337,7 +337,7 @@ On the Mac, you also have to run:
337
337
  glimmer-setup
338
338
  ```
339
339
 
340
- This ensures configuring extra required Mac options before using `glimmer` and `girb` commands.
340
+ This ensures configuring required Mac jruby options before using `glimmer` and `girb` commands (adding `export JRUBY_OPTS="$JRUBY_OPTS -J-XstartOnFirstThread"` to `~/.zprofile` and `~/.bash_profile`).
341
341
 
342
342
  If you are new to Glimmer and would like to continue learning the basics, you may continue to the [Glimmer Command](#glimmer-command) section.
343
343
 
@@ -350,7 +350,7 @@ Note: if you're using activerecord or activesupport, keep in mind that Glimmer u
350
350
 
351
351
  Add the following to `Gemfile`:
352
352
  ```
353
- gem 'glimmer-dsl-swt', '~> 4.20.15.5'
353
+ gem 'glimmer-dsl-swt', '~> 4.21.0.0'
354
354
  ```
355
355
 
356
356
  And, then run:
@@ -371,7 +371,7 @@ glimmer
371
371
  ```
372
372
 
373
373
  ```
374
- Glimmer (JRuby Desktop Development GUI Framework) - JRuby Gem: glimmer-dsl-swt v4.20.15.5
374
+ Glimmer (JRuby Desktop Development GUI Framework) - JRuby Gem: glimmer-dsl-swt v4.21.0.0
375
375
 
376
376
  Usage: glimmer [--bundler] [--pd] [--quiet] [--debug] [--log-level=VALUE] [[ENV_VAR=VALUE]...] [[-jruby-option]...] (application.rb or task[task_args]) [[application2.rb]...]
377
377
 
data/RUBY_VERSION CHANGED
@@ -1 +1 @@
1
- jruby-9.2.19.0
1
+ jruby-9.3.0.0
data/VERSION CHANGED
@@ -1 +1 @@
1
- 4.20.15.5
1
+ 4.21.0.0
@@ -1,8 +1,8 @@
1
1
  ## Glimmer Packaging and Distribution
2
2
 
3
- Note: this section mostly applies to Mac and Windows. On Linux, you can just run `glimmer package:gem` and after installing the gem, you get an executable matching the name of the app/custom-shell-gem you are building (e.g. `calculator` command becomes available after installing the [glimmer-cs-calculator](https://github.com/AndyObtiva/glimmer-cs-calculator) gem). On Windows, ensure system PATH includes Java bin directory like "C:\Program Files\Java\jdk1.8.0_241\bin" for javapackager command to work during packaging Glimmer applications.
3
+ Note: this section mostly applies to Mac and Windows. On Linux, you can just run `glimmer package:gem` and after installing the gem, you get an executable matching the name of the app/custom-shell-gem you are building (e.g. `calculator` command becomes available after installing the [glimmer-cs-calculator](https://github.com/AndyObtiva/glimmer-cs-calculator) gem). On Windows, ensure system PATH includes Java bin directory `"C:\Program Files\Java\jdk-16.0.2\bin"` at the top for `jpackage` command to work during packaging Glimmer applications.
4
4
 
5
- Note 2: Glimmer packaging has a strong dependency on JDK8 at the moment. JDK9 & JDK10 might work, but JDK11 and onward definitely won't since they dropped javapackager, which later came back as jpackage in JDK14, but it's not ready for prime time yet. Just stick to JDK8 for now, strongly supported by Oracle for the next 6 years at least.
5
+ Note 2: Glimmer packaging has a strong dependency on JDK16 since it includes the packaging tool `jpackage`.
6
6
 
7
7
  Glimmer simplifies the process of native-executable packaging and distribution on Mac and Windows via a single `glimmer package` command:
8
8
 
@@ -10,9 +10,7 @@ Glimmer simplifies the process of native-executable packaging and distribution o
10
10
  glimmer package
11
11
  ```
12
12
 
13
- It works out of the box for any application scaffolded by [Glimmer Scaffolding](#scaffolding), generating all available packaging types on the current platform (e.g. `DMG`, `PKG`, `APP` on the Mac) and displaying a message indicating what pre-requisite setup tools are needed if not installed already (e.g. [Wix Toolset](https://wixtoolset.org/) to generate MSI files on Windows). If you install Wix, make sure it is on the system PATH by adding for example "C:\Program Files (x86)\WiX Toolset v3.11\bin" to the Windows Environment Variables.
14
-
15
- (note: if you see this error on the Mac 'Error: Bundler "DMG Installer" (dmg) failed to produce a bundle.', ignore it as it should have produced a bundle anyways. It is a harmless issue in 3rd party dependency: javapackager.)
13
+ It works out of the box for any application scaffolded by [Glimmer Scaffolding](#scaffolding), generating default packaging type on the current platform if not specified (i.e. `app-image`) and displaying a message indicating what pre-requisite setup tools are needed if not installed already (e.g. [Wix Toolset](https://wixtoolset.org/) to generate MSI files on Windows). If you install Wix, make sure it is on the system PATH by adding for example "C:\Program Files (x86)\WiX Toolset v3.11\bin" to the Windows Environment Variables.
16
14
 
17
15
  You may choose to generate a specific type of packaging instead by addionally passing in the `[type]` option. For example, this generates an MSI setup file on Windows:
18
16
 
@@ -20,14 +18,21 @@ You may choose to generate a specific type of packaging instead by addionally pa
20
18
  glimmer package[msi]
21
19
  ```
22
20
 
21
+ This generates a DMG file on the Mac:
22
+
23
+ ```
24
+ glimmer package[dmg]
25
+ ```
26
+
23
27
  Make sure to surround with double-quotes when running from ZShell (zsh):
24
28
 
25
29
  ```
26
- glimmer "package[msi]"
30
+ glimmer "package[dmg]"
27
31
  ```
28
32
 
29
- - Available Mac packaging types are `dmg`, `pkg`, and `image` (image means a pure Mac `app` without a setup program). Keep in mind that the packages you produce are compatible with the same MacOS you are on or older.
30
- - Available Windows packaging types are `msi`, `exe`, and `image` (image means a Windows application directory without a setup program). Learn more about Windows packaging are [over here](#windows-application-packaging).
33
+ - Available Mac packaging types are `dmg`, `pkg`, and `app-image` (image means a pure Mac `app` without a setup program). Keep in mind that the packages you produce are compatible with the same MacOS you are on or older.
34
+ - Available Windows packaging types are `msi`, `exe`, and `app-image` (image means a Windows application directory without a setup program). Learn more about Windows packaging are [over here](#windows-application-packaging).
35
+ - Available Linux packaging types are `deb`, `rpm`, and `app-image` (Note: Linux native packaging has not been tested successfully, which is why `glimmer package:gem` is recommended on Linux instead. If you get it working, please contribute to this doc file with a Pull Request).
31
36
 
32
37
  Note: if you are using Glimmer manually, to make the `glimmer package` command available, you must add the following line to your application `Rakefile` (automatically done for you if you scaffold an app or gem with `glimmer scaffold[AppName]` or `glimmer scaffold:gem:customshell[GemName]`):
33
38
 
@@ -40,20 +45,20 @@ The Glimmer packaging process done in the `glimmer package` command consists of
40
45
  1. Lock JAR versions (`glimmer package:lock_jars`): This locks versions of JAR dependencies leveraged by the `jar-dependencies` JRuby gem, downloading them into the `./vendor` directory so they would get inside the top-level Glimmer app/gem JAR file.
41
46
  1. Generate [Warbler](https://github.com/jruby/warbler) config (`glimmer package:config`): Generates initial Warbler config file (under `./config/warble.rb`) to use for generating JAR file.
42
47
  1. Generate JAR file using [Warbler](https://github.com/jruby/warbler) (`glimmer package:jar`): Enables bundling a Glimmer app into a JAR file under the `./dist` directory
43
- 1. Generate native executable using [javapackager](https://docs.oracle.com/javase/8/docs/technotes/tools/unix/javapackager.html) (`glimmer package:native`): Enables packaging a JAR file as a DMG/PKG/APP file on Mac, MSI/EXE/APP on Windows, and DEB/RPM/APP on Linux (Glimmer does not officially support Linux with the `glimmer package` command yet, but it generates the JAR file successfully, and you could use `javapackager` manually afterwards if needed).
48
+ 1. Generate native executable using [jpackage](https://docs.oracle.com/en/java/javase/14/jpackage/packaging-tool-user-guide.pdf) (`glimmer package:native`): Enables packaging a JAR file as a DMG/PKG/APP file on Mac, MSI/EXE/APP on Windows, and DEB/RPM/APP on Linux (Glimmer does not officially support Linux with the `glimmer package` command yet, but it generates the JAR file successfully, and you could use `jpackage` manually afterwards if needed).
44
49
 
45
- Those steps automatically ensure generating a JAR file under the `./dist` directory using [Warbler](https://github.com/jruby/warbler), which is then used to automatically generate a DMG/MSI file (and other executables) under the `./packages/bundles` directory using `javapackager`.
50
+ Those steps automatically ensure generating a JAR file under the `./dist` directory using [Warbler](https://github.com/jruby/warbler), which is then used to automatically generate a DMG/MSI file (and other executables) under the `./packages/bundles` directory using `jpackage`.
46
51
  The JAR file name will match your application local directory name (e.g. `MathBowling.jar` for `~/code/MathBowling`)
47
52
  The DMG file name will match the humanized local directory name + dash + application version (e.g. `Math Bowling-1.0.dmg` for `~/code/MathBowling` with version 1.0 or unspecified)
48
53
 
49
54
  The `glimmer package` command will automatically set "mac.CFBundleIdentifier" to ="org.#{project_name}.application.#{project_name}".
50
- You may override by configuring as an extra argument for javapackger (e.g. Glimmer::RakeTask::Package.javapackager_extra_args = " -Bmac.CFBundleIdentifier=org.andymaleh.application.MathBowling")
55
+ You may override by configuring as an extra argument for javapackger (e.g. Glimmer::RakeTask::Package.jpackage_extra_args = " --mac-package-identifier org.andymaleh.application.MathBowling")
51
56
 
52
57
  ### Packaging Defaults
53
58
 
54
59
  Glimmer employs smart defaults in packaging.
55
60
 
56
- The package application name (shows up in top menu bar on the Mac) will be a human form of the app root directory name (e.g. "Math Bowling" for "MathBowling" or "math_bowling" app root directory name). However, application name and version may be specified explicitly via "-Bmac.CFBundleName" and "-Bmac.CFBundleVersion" options.
61
+ The package application name (shows up in top menu bar on the Mac) will be a human form of the app root directory name (e.g. "Math Bowling" for "MathBowling" or "math_bowling" app root directory name). However, application name and version may be specified explicitly via "--name", "--mac-package-name" and "--version" options.
57
62
 
58
63
  Also, the package will only include these directories: app, config, db, lib, script, bin, docs, fonts, images, sounds, videos
59
64
 
@@ -74,47 +79,41 @@ require_relative '../app/my_application.rb'
74
79
  - Include Icon (Optional): If you'd like to include an icon for your app (.icns format on the Mac), place it under `package/macosx` matching the humanized application local directory name (e.g. 'Math Bowling.icns' [containing space] for MathBowling or math_bowling). You may generate your Mac icon easily using tools like Image2Icon (http://www.img2icnsapp.com/) or manually using the Mac terminal command `iconutil` (iconutil guide: https://applehelpwriter.com/tag/iconutil/)
75
80
  - Include DMG Background Icon (Optional): Simply place a .png file under `package/macosx/{HumanAppName}-background.png`
76
81
  - Include Version (Optional): Create a `VERSION` file in your application and fill it your app version on one line (e.g. `1.1.0`)
77
- - Include License (Optional): Create a `LICENSE.txt` file in your application and fill it up with your license (e.g. MIT). It will show up to people when installing your app. Note that, you may optionally also specify license type, but you'd have to do so manually via `-BlicenseType=MIT` shown in an [example below](#javapackager-extra-arguments).
78
- - Extra args (Optional): You may optionally add the following to `Rakefile` to configure extra arguments for javapackager: `Glimmer::RakeTask::Package.javapackager_extra_args = "..."` (Useful to avoid re-entering extra arguments on every run of rake task.). Read about them in [their section below](#javapackager-extra-arguments).
82
+ - Include License (Optional): Create a `LICENSE.txt` file in your application and fill it up with your license (e.g. MIT). It will show up to people when installing your app. Note that, you may optionally also specify license type, but you'd have to do so manually via `--license-file LICENSE.txt` shown in an [example below](#jpackage-extra-arguments).
83
+ - Extra args (Optional): You may optionally add the following to `Rakefile` to configure extra arguments for jpackage: `Glimmer::RakeTask::Package.jpackage_extra_args = "..."` (Useful to avoid re-entering extra arguments on every run of rake task.). Read about them in [their section below](#jpackage-extra-arguments).
79
84
 
80
- ### javapackager Extra Arguments
85
+ ### jpackage Extra Arguments
81
86
 
82
- (note: currently `Glimmer::RakeTask::Package.javapackager_extra_args` is only honored when packaging from bash, not zsh)
87
+ (note: currently `Glimmer::RakeTask::Package.jpackage_extra_args` is only honored when packaging from bash, not zsh)
83
88
 
84
- In order to explicitly configure javapackager, Mac package attributes, or sign your Mac app to distribute on the App Store, you can follow more advanced instructions for `javapackager` here:
85
- - https://docs.oracle.com/javase/9/tools/javapackager.htm#JSWOR719
86
- - https://docs.oracle.com/javase/8/docs/technotes/tools/unix/javapackager.html
87
- - https://docs.oracle.com/javase/8/docs/technotes/guides/deploy/self-contained-packaging.html#BCGICFDB
88
- - https://docs.oracle.com/javase/8/docs/technotes/guides/deploy/self-contained-packaging.html
89
+ In order to explicitly configure jpackage, Mac package attributes, or sign your Mac app to distribute on the App Store, you can follow more advanced instructions for `jpackage` here:
90
+ - Run `jpackage --help` for more info
91
+ - https://docs.oracle.com/en/java/javase/14/jpackage/packaging-tool-user-guide.pdf
89
92
  - https://developer.apple.com/library/archive/releasenotes/General/SubmittingToMacAppStore/index.html#//apple_ref/doc/uid/TP40010572-CH16-SW8
90
93
 
91
- The Glimmer rake task allows passing extra options to javapackager via:
92
- - `Glimmer::RakeTask::Package.javapackager_extra_args="..."` in your application Rakefile
93
- - Environment variable: `JAVAPACKAGER_EXTRA_ARGS`
94
+ The Glimmer rake task allows passing extra options to jpackage via:
95
+ - `Glimmer::RakeTask::Package.jpackage_extra_args="..."` in your application Rakefile
96
+ - Environment variable: `JPACKAGE_EXTRA_ARGS`
94
97
 
95
98
  Example (Rakefile):
96
99
 
97
100
  ```ruby
98
101
  require 'glimmer/rake_task'
99
102
 
100
- Glimmer::RakeTask::Package.javapackager_extra_args = '-BlicenseType="MIT" -Bmac.category="public.app-category.business" -Bmac.signing-key-developer-id-app="Andy Maleh"'
103
+ Glimmer::RakeTask::Package.jpackage_extra_args = '--license-file LICENSE.txt --mac-sign --mac-signing-key-user-name "Andy Maleh"'
101
104
  ```
102
105
 
103
- Note that `mac.category` defaults to "public.app-category.business", but can be overridden with one of the category UTI values mentioned here:
104
-
105
- https://developer.apple.com/library/archive/releasenotes/General/SubmittingToMacAppStore/index.html#//apple_ref/doc/uid/TP40010572-CH16-SW8
106
-
107
106
  Example (env var):
108
107
 
109
108
  ```
110
- JAVAPACKAGER_EXTRA_ARGS='-Bmac.CFBundleName="Math Bowling Game"' glimmer package
109
+ JPACKAGE_EXTRA_ARGS='--mac-package-name "Math Bowling Game"' glimmer package
111
110
  ```
112
111
 
113
112
  That overrides the default application display name.
114
113
 
115
114
  ### Verbose Mode
116
115
 
117
- Pass `-v` to javapackager in `Glimmer::RakeTask::Package.javapackager_extra_args` or by running `glimmer package:native[type] -v` to learn more about further available customizations for the installer you are requesting to generate.
116
+ Pass `-v` to jpackage in `Glimmer::RakeTask::Package.jpackage_extra_args` or by running `glimmer package:native[type] -v` to learn more about further available customizations for the installer you are requesting to generate.
118
117
 
119
118
  ### Windows Application Packaging
120
119
 
@@ -128,83 +127,74 @@ If you just want to test out packaging into a native Windows app that is not pac
128
127
 
129
128
  Recent macOS versions (starting with Catalina) have very stringent security requirements requiring all applications to be signed before running (unless the user goes to System Preferences -> Privacy -> General tab and clicks "Open Anyway" after failing to open application the first time they run it). So, to release a desktop application on the Mac, it is recommended to enroll in the [Apple Developer Program](https://developer.apple.com/programs/) to distribute on the [Mac App Store](https://developer.apple.com/distribute/) or otherwise request [app notarization from Apple](https://developer.apple.com/documentation/xcode/notarizing_macos_software_before_distribution) to distribute independently.
130
129
 
131
- Afterwards, you may add developer-id/signing-key arguments to `javapackager` via `Glimmer::RakeTask::Package.javapackager_extra_args` or `JAVAPACKAGER_EXTRA_ARGS` according to this webpage: https://docs.oracle.com/javase/9/tools/javapackager.htm#JSWOR719
130
+ Afterwards, you may add signing arguments to `jpackage` via `Glimmer::RakeTask::Package.jpackage_extra_args` or `JPACKAGE_EXTRA_ARGS` according to this webpage: https://docs.oracle.com/en/java/javase/14/jpackage/packaging-tool-user-guide.pdf
132
131
 
133
- DMG signing key argument:
134
132
  ```
135
- -Bmac.signing-key-developer-id-app="..."
136
- ```
137
-
138
- PKG signing key argument:
139
- ```
140
- -Bmac.signing-key-developer-id-installer="..."
141
- ```
142
-
143
- Mac App Store signing key arguments:
144
- ```
145
- -Bmac.signing-key-app="..."
146
- -Bmac.signing-key-pkg="..."
147
- ```
148
-
149
- ### Self Signed Certificate
150
-
151
- You may still release a signed DMG file without enrolling into the Apple Developer Program with the caveat that users will always fail in opening the app the first time, and have to go to System Preferences -> Privacy -> General tab to "Open Anyway".
152
-
153
- To do so, you may follow these steps (abbreviated version from https://developer.apple.com/library/archive/documentation/Security/Conceptual/CodeSigningGuide/Procedures/Procedures.html#//apple_ref/doc/uid/TP40005929-CH4-SW2):
154
- - Open Keychain Access
155
- - Choose Keychain Access > Certificate Assistant > Create Certificate ...
156
- - Enter Name (referred to below as "CertificateName")
157
- - Set 'Certificate Type' to 'Code Signing'
158
- - Create (if you alternatively override defaults, make sure to enable all capabilities)
159
- - Add the following option to javapackager: `-Bmac.signing-key-developer-id-app="CertificateName"` via `Glimmer::RakeTask::Package.javapackager_extra_args` or `JAVAPACKAGER_EXTRA_ARGS`
160
-
161
- Example:
162
-
163
- ```ruby
164
- Glimmer::RakeTask::Package.javapackager_extra_args = '-Bmac.signing-key-developer-id-app="Andy Maleh"'
133
+ --mac-package-signing-prefix <prefix string>
134
+ When signing the application package, this value is prefixed
135
+ to all components that need to be signed that don't have
136
+ an existing package identifier.
137
+ --mac-sign
138
+ Request that the package be signed
139
+ --mac-signing-keychain <file path>
140
+ Path of the keychain to search for the signing identity
141
+ (absolute path or relative to the current directory).
142
+ If not specified, the standard keychains are used.
143
+ --mac-signing-key-user-name <team name>
144
+ Team name portion in Apple signing identities' names.
145
+ For example "Developer ID Application: "
165
146
  ```
166
147
 
167
- Now, when you run `glimmer package`, it builds a self-signed DMG file. When you make available online, and users download, upon launching application, they are presented with your certificate, which they have to sign if they trust you in order to use the application.
168
-
169
148
  ### Packaging Gotchas
170
149
 
171
- 1. Specifying License File
172
-
173
- The javapackager documentation states that a license file may be specified with "-BlicenseFile" javapackager option. However, in order for that to work, one must specify as a source file via "-srcfiles" javapackager option.
174
- Keep that in mind if you are not going to rely on the default `LICENSE.txt` support.
175
-
176
- Example:
177
-
178
- ```ruby
179
- Glimmer::RakeTask::Package.javapackager_extra_args = '-srcfiles "ACME.txt" -BlicenseFile="ACME.txt" -BlicenseType="ACME"'
180
- ```
150
+ 1. Zsh (Z Shell)
181
151
 
182
- 2. Mounted DMG Residue
152
+ Currently, `Glimmer::RakeTask::Package.jpackage_extra_args` is only honored when packaging from bash, not zsh.
183
153
 
184
- If you run `glimmer package` multiple times, sometimes it leaves a mounted DMG project in your finder. Unmount before you run the command again or it might fail with an error saying: "Error: Bundler "DMG Installer" (dmg) failed to produce a bundle."
185
-
186
- By the way, keep in mind that during normal operation, it does also indicate a false-negative while completing successfully similar to the following (please ignore):
154
+ You can get around that in zsh by running glimmer package commands with `bash -c` prefix:
187
155
 
188
156
  ```
189
- Exec failed with code 2 command [[/usr/bin/SetFile, -c, icnC, /var/folders/4_/g1sw__tx6mjdgyh3mky7vydc0000gp/T/fxbundler4076750801763032201/images/MathBowling/.VolumeIcon.icns] in unspecified directory
157
+ bash -c 'source ~/.glimmer_source; glimmer package'
190
158
  ```
191
159
 
192
- 3. Zsh (Z Shell)
193
-
194
- Currently, `Glimmer::RakeTask::Package.javapackager_extra_args` is only honored when packaging from bash, not zsh.
160
+ 2. unsupported Java version "16", defaulting to 1.7
195
161
 
196
- You can get around that in zsh by running glimmer package commands with `bash -c` prefix:
162
+ If you get this error while packaging:
197
163
 
198
164
  ```
199
- bash -c 'source ~/.glimmer_source; glimmer package'
165
+ unsupported Java version "16", defaulting to 1.7
166
+ [ERROR] Internal error: org.jruby.exceptions.RaiseException: (LoadError) library `java' could not be loaded: java.lang.reflect.InaccessibleObjectException: Unable to make protected native java.lang.Object java.lang.Object.clone() throws java.lang.CloneNotSupportedException accessible: module java.base does not "opens java.lang" to unnamed module @138caeca -> [Help 1]
167
+ org.apache.maven.InternalErrorException: Internal error: org.jruby.exceptions.RaiseException: (LoadError) library `java' could not be loaded: java.lang.reflect.InaccessibleObjectException: Unable to make protected native java.lang.Object java.lang.Object.clone() throws java.lang.CloneNotSupportedException accessible: module java.base does not "opens java.lang" to unnamed module @138caeca
168
+ at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:121)
169
+ at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
170
+ at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
171
+ at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
172
+ at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
173
+ at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78)
174
+ at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
175
+ at java.base/java.lang.reflect.Method.invoke(Method.java:567)
176
+ at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
177
+ at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
178
+ at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
179
+ at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
180
+ Caused by: org.jruby.exceptions.RaiseException: (LoadError) library `java' could not be loaded: java.lang.reflect.InaccessibleObjectException: Unable to make protected native java.lang.Object java.lang.Object.clone() throws java.lang.CloneNotSupportedException accessible: module java.base does not "opens java.lang" to unnamed module @138caeca
181
+ [ERROR]
182
+ [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
183
+ [ERROR] Re-run Maven using the -X switch to enable full debug logging.
184
+ [ERROR]
185
+ [ERROR] For more information about the errors and possible solutions, please read the following articles:
186
+ [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/InternalErrorException
200
187
  ```
201
188
 
202
- 4. Java on Windows System PATH
189
+ Please ignore. It should be harmless. If you get blocked by it for any reason, please open an Issue about it.
203
190
 
204
- If you get any errors running Java on Windows, keep in mind that you need to have the Java binaries on the Windows System PATH environment variable:
205
- c:\program files\java\jre1.8.0_241
191
+ 3. Java on Windows System PATH
192
+
193
+ If you get any errors running Java on Windows, keep in mind that you need to have the Java binaries "C:\Program Files\Java\jdk-16.0.2\bin" on the Windows System PATH environment variable.
206
194
 
207
195
  The problem is Oracle seems to be adding an indirect Java path junction in later versions of their installer:
208
- C:\Program Files (x86)\Common Files\Oracle\Java\javapath
196
+ `C:\Program Files (x86)\Common Files\Oracle\Java\javapath`
197
+
198
+ Simply replace it with the simple path mentioned above (`"C:\Program Files\Java\jdk-16.0.2\bin"` matching your correct version number)
209
199
 
210
- Simply replace with the simple one above (setting the correct version number) and then reinstall JRuby to have it use Java from the right path.
200
+ Lastly, reinstall JRuby to ensure it is using Java from the right path.
Binary file
@@ -26,8 +26,7 @@ module Glimmer
26
26
  module RakeTask
27
27
  module Package
28
28
  class << self
29
- attr_accessor :javapackager_extra_args
30
- alias jpackage_extra_args javapackager_extra_args
29
+ attr_accessor :jpackage_extra_args
31
30
 
32
31
  def clean
33
32
  require 'fileutils'
@@ -89,12 +88,12 @@ module Glimmer
89
88
  end
90
89
 
91
90
  def native(native_type=nil, native_extra_args)
92
- puts "Generating native executable with javapackager/jpackage..."
91
+ puts "Generating native executable with jpackage..."
93
92
  java_version = `jruby -v`
94
- if java_version.include?('1.8.0_241')
95
- puts "Java Version 1.8.0_241 Detected!"
93
+ if java_version.include?('16.0.2')
94
+ puts "Java Version 16.0.2 Detected!"
96
95
  else
97
- puts "WARNING! Glimmer Packaging Pre-Requisite Java Version 1.8.0_241 Is Not Found!"
96
+ puts "WARNING! Glimmer Packaging Pre-Requisite Java Version 16.0.2 Is Not Found!"
98
97
  end
99
98
  require 'facets/string/titlecase'
100
99
  require 'facets/string/underscore'
@@ -106,28 +105,27 @@ module Glimmer
106
105
  license = (File.read(license_file).strip if File.exists?(license_file) && File.file?(license_file)) rescue nil
107
106
  copyright = license.split("\n").first
108
107
  human_name = project_name.underscore.titlecase
109
- icon = "package/#{OS.mac? ? 'macosx' : 'windows'}/#{human_name}.#{OS.mac? ? 'icns' : 'ico'}"
110
- if (`javapackager`.to_s.include?('Usage: javapackager') rescue nil)
111
- command = "javapackager -deploy -native #{native_type} -outdir packages -outfile \"#{project_name}\" -srcfiles \"dist/#{project_name}.jar\" -appclass JarMain -name \"#{human_name}\" -title \"#{human_name}\" -Bmac.CFBundleName=\"#{human_name}\" -Bmac.CFBundleIdentifier=\"org.#{project_name}.application.#{project_name.camelcase(:upper)}\" -Bmac.category=\"public.app-category.business\" -BinstalldirChooser=true -Bvendor=\"#{human_name}\" -Bwin.menuGroup=\"#{human_name}\" "
112
- command += " -BsystemWide=false " if OS.windows?
113
- command += " -BjvmOptions=-XstartOnFirstThread " if OS.mac?
114
- command += " -BappVersion=#{version} -Bmac.CFBundleVersion=#{version} " if version
115
- command += " -srcfiles LICENSE.txt -BlicenseFile=LICENSE.txt " if license
116
- command += " -Bcopyright=\"#{copyright}\" " if copyright
117
- elsif (`jpackage`.to_s.include?('Usage: jpackage') rescue nil)
118
- command = "jpackage --type #{native_type} --dest 'packages/bundles' --input 'dist' --main-class JarMain --main-jar '#{project_name}.jar' --name '#{human_name}' --vendor '#{human_name}' --icon '#{icon}' "
119
- command += " --win-per-user-install --win-dir-chooser --win-menu --win-menu-group '#{human_name}' " if OS.windows?
108
+ icon = "icons/#{OS.mac? ? 'macosx' : (OS.linux? ? 'linux' : 'windows')}/#{human_name}.#{OS.mac? ? 'icns' : (OS.linux? ? 'png' : 'ico')}"
109
+ native_type = 'app-image' if native_type.to_s.strip.empty?
110
+ if (`jpackage`.to_s.include?('Usage: jpackage') rescue nil)
111
+ FileUtils.rm_rf("packages/bundles")
112
+ FileUtils.mkdir_p('packages/bundles')
113
+ command = "jpackage"
114
+ command += " --type #{native_type}"
115
+ command += " --dest 'packages/bundles' --input 'dist' --main-class JarMain --main-jar '#{project_name}.jar' --java-options '-Dproject_name=#{project_name}' --name '#{human_name}' --vendor '#{human_name}' --icon '#{icon}' "
116
+ command += " --win-per-user-install --win-dir-chooser --win-menu --win-menu-group '#{human_name}' " if OS.windows? && native_type != 'app-image'
117
+ command += " --linux-menu-group '#{human_name}' " if OS.linux? && native_type != 'app-image'
120
118
  command += " --java-options '-XstartOnFirstThread' --mac-package-name '#{human_name}' --mac-package-identifier 'org.#{project_name}.application.#{project_name}' " if OS.mac?
121
119
  command += " --app-version \"#{version}\" " if version
122
- command += " --license-file LICENSE.txt " if license
120
+ command += " --license-file LICENSE.txt " if license && native_type != 'app-image'
123
121
  command += " --copyright \"#{copyright}\" " if copyright
124
122
  else
125
- puts "Neither javapackager nor jpackage exist in your Java installation. Please ensure javapackager or jpackage is available in PATH environment variable."
123
+ puts "jpackage does not exist in your Java installation. Please ensure jpackage is available in PATH environment variable."
126
124
  return
127
125
  end
128
- Rake.application.load_rakefile # make sure to load potential javapackager_extra_args config in app Rakefile
129
- command += " #{javapackager_extra_args} " if javapackager_extra_args
130
- command += " #{ENV['JAVAPACKAGER_EXTRA_ARGS']} " if ENV['JAVAPACKAGER_EXTRA_ARGS']
126
+ Rake.application.load_rakefile # make sure to load potential jpackage_extra_args config in app Rakefile
127
+ command += " #{jpackage_extra_args} " if jpackage_extra_args
128
+ command += " #{ENV['JPACKAGE_EXTRA_ARGS']} " if ENV['JPACKAGE_EXTRA_ARGS']
131
129
  command += " #{native_extra_args} " if native_extra_args
132
130
  puts command
133
131
  system command
@@ -167,20 +167,25 @@ module Glimmer
167
167
  custom_shell('AppView', current_dir_name, shell_type)
168
168
  end
169
169
 
170
- mkdir_p 'package/windows'
171
- icon_file = "package/windows/#{human_name(app_name)}.ico"
170
+ mkdir_p 'icons/windows'
171
+ icon_file = "icons/windows/#{human_name(app_name)}.ico"
172
172
  cp File.expand_path('../../../../icons/scaffold_app.ico', __FILE__), icon_file
173
173
  puts "Created #{current_dir_name}/#{icon_file}"
174
174
 
175
- mkdir_p 'package/macosx'
176
- icon_file = "package/macosx/#{human_name(app_name)}.icns"
175
+ mkdir_p 'icons/macosx'
176
+ icon_file = "icons/macosx/#{human_name(app_name)}.icns"
177
177
  cp File.expand_path('../../../../icons/scaffold_app.icns', __FILE__), icon_file
178
178
  puts "Created #{current_dir_name}/#{icon_file}"
179
179
 
180
- mkdir_p 'package/linux'
181
- icon_file = "package/linux/#{human_name(app_name)}.png"
180
+ mkdir_p 'icons/linux'
181
+ icon_file = "icons/linux/#{human_name(app_name)}.png"
182
182
  cp File.expand_path('../../../../icons/scaffold_app.png', __FILE__), icon_file
183
183
  puts "Created #{current_dir_name}/#{icon_file}"
184
+
185
+ write "Resource.java", resource_java_file(app_name)
186
+ cd '..'
187
+ system "javac #{file_name(app_name)}/Resource.java"
188
+ cd gem_name
184
189
 
185
190
  mkdir_p "app/#{file_name(app_name)}"
186
191
  write "app/#{file_name(app_name)}/launch.rb", app_launch_file(app_name)
@@ -195,14 +200,14 @@ module Glimmer
195
200
  end
196
201
  write 'spec/spec_helper.rb', spec_helper_file
197
202
  if OS.windows?
198
- system "glimmer \"package[image]\"" # TODO handle Windows with batch file
203
+ system "glimmer package" # TODO handle Windows with batch file
199
204
  system "\"packages/bundles/#{human_name(app_name)}/#{human_name(app_name)}.exe\""
200
205
  else
201
206
  system "bash -c '#{RVM_FUNCTION}\n cd .\n glimmer package\n'"
202
207
  if OS.mac?
203
- system "open packages/bundles/#{human_name(app_name).gsub(' ', '\ ')}.app"
208
+ system "bash -c '#{RVM_FUNCTION}\n cd .\n JRUBY_OPTS=\"$JRUBY_OPTS -J-XstartOnFirstThread\" glimmer run\n'"
204
209
  else
205
- system "glimmer run"
210
+ system "bash -c '#{RVM_FUNCTION}\n cd .\n glimmer run\n'"
206
211
  end
207
212
  end
208
213
  end
@@ -278,30 +283,35 @@ module Glimmer
278
283
  end
279
284
  write 'spec/spec_helper.rb', spec_helper_file
280
285
 
281
- mkdir_p 'package/windows'
282
- icon_file = "package/windows/#{human_name(custom_shell_name)}.ico"
286
+ mkdir_p 'icons/windows'
287
+ icon_file = "icons/windows/#{human_name(custom_shell_name)}.ico"
283
288
  cp File.expand_path('../../../../icons/scaffold_app.ico', __FILE__), icon_file
284
289
  puts "Created #{current_dir_name}/#{icon_file}"
285
290
 
286
- mkdir_p 'package/macosx'
287
- icon_file = "package/macosx/#{human_name(custom_shell_name)}.icns"
291
+ mkdir_p 'icons/macosx'
292
+ icon_file = "icons/macosx/#{human_name(custom_shell_name)}.icns"
288
293
  cp File.expand_path('../../../../icons/scaffold_app.icns', __FILE__), icon_file
289
294
  puts "Created #{current_dir_name}/#{icon_file}"
290
295
 
291
- mkdir_p 'package/linux'
292
- icon_file = "package/linux/#{human_name(custom_shell_name)}.png"
296
+ mkdir_p 'icons/linux'
297
+ icon_file = "icons/linux/#{human_name(custom_shell_name)}.png"
293
298
  cp File.expand_path('../../../../icons/scaffold_app.png', __FILE__), icon_file
294
299
  puts "Created #{current_dir_name}/#{icon_file}"
295
300
 
301
+ write "Resource.java", resource_java_file(custom_shell_name)
302
+ cd '..'
303
+ system "javac #{file_name(custom_shell_name)}/Resource.java"
304
+ cd gem_name
305
+
296
306
  if OS.windows?
297
- system "glimmer package[image]" # TODO handle windows properly with batch file
307
+ system "glimmer package" # TODO handle windows properly with batch file
298
308
  system "\"packages/bundles/#{human_name(custom_shell_name)}/#{human_name(custom_shell_name)}.exe\""
299
309
  else
300
310
  system "bash -c '#{RVM_FUNCTION}\n cd .\n glimmer package\n'"
301
311
  if OS.mac?
302
- system "open packages/bundles/#{human_name(custom_shell_name).gsub(' ', '\ ')}.app"
312
+ system "bash -c '#{RVM_FUNCTION}\n cd .\n JRUBY_OPTS=\"$JRUBY_OPTS -J-XstartOnFirstThread\" glimmer run\n'"
303
313
  else
304
- system "glimmer run"
314
+ system "bash -c '#{RVM_FUNCTION}\n cd .\n glimmer run\n'"
305
315
  end
306
316
  end
307
317
  puts "Finished creating #{gem_name} Ruby gem."
@@ -485,6 +495,16 @@ module Glimmer
485
495
  #{class_name(app_name)}::View::AppView.launch
486
496
  MULTI_LINE_STRING
487
497
  end
498
+
499
+ def resource_java_file(app_name)
500
+ <<~MULTI_LINE_STRING
501
+ package #{file_name(app_name)};
502
+
503
+ /** The soul purpose of this class is to retrieve icons for uri:classloader paths used from JAR */
504
+ class Resource {
505
+ }
506
+ MULTI_LINE_STRING
507
+ end
488
508
 
489
509
  def app_bin_command_file(app_name_or_gem_name, custom_shell_name=nil, namespace=nil)
490
510
  if custom_shell_name.nil?
@@ -525,7 +545,7 @@ module Glimmer
525
545
  lines.insert(require_rake_line_index, "require 'glimmer/launcher'")
526
546
  gem_files_line_index = lines.index(lines.detect {|l| l.include?('# dependencies defined in Gemfile') })
527
547
  if custom_shell_name
528
- lines.insert(gem_files_line_index, " gem.files = Dir['VERSION', 'LICENSE.txt', 'app/**/*', 'bin/**/*', 'config/**/*', 'db/**/*', 'docs/**/*', 'fonts/**/*', 'icons/**/*', 'images/**/*', 'lib/**/*', 'package/**/*', 'script/**/*', 'sounds/**/*', 'vendor/**/*', 'videos/**/*']")
548
+ lines.insert(gem_files_line_index, " gem.files = Dir['Resource.class', 'VERSION', 'LICENSE.txt', 'app/**/*', 'bin/**/*', 'config/**/*', 'db/**/*', 'docs/**/*', 'fonts/**/*', 'icons/**/*', 'images/**/*', 'lib/**/*', 'script/**/*', 'sounds/**/*', 'vendor/**/*', 'videos/**/*']")
529
549
  # the second executable is needed for warbler as it matches the gem name, which is the default expected file (alternatively in the future, we could do away with it and configure warbler to use the other file)
530
550
  lines.insert(gem_files_line_index+1, " gem.require_paths = ['vendor', 'lib', 'app']")
531
551
  lines.insert(gem_files_line_index+2, " gem.executables = ['#{file_name(custom_shell_name)}']") if custom_shell_name
@@ -538,14 +558,10 @@ module Glimmer
538
558
  file_content = lines.join("\n")
539
559
  if custom_shell_name
540
560
  file_content << <<~MULTI_LINE_STRING
541
- Glimmer::RakeTask::Package.javapackager_extra_args =
542
- " -name '#{human_name(custom_shell_name)}'" +
543
- " -title '#{human_name(custom_shell_name)}'" +
544
- " -Bmac.CFBundleName='#{human_name(custom_shell_name)}'" +
545
- " -Bmac.CFBundleIdentifier='org.#{namespace ? compact_name(namespace) : compact_name(custom_shell_name)}.application.#{compact_name(custom_shell_name).camelcase(:upper)}'"
546
- # " -BlicenseType=" +
547
- # " -Bmac.category=" +
548
- # " -Bmac.signing-key-developer-id-app="
561
+ Glimmer::RakeTask::Package.jpackage_extra_args =
562
+ " --name '#{human_name(custom_shell_name)}'" +
563
+ " --description '#{human_name(custom_shell_name)}'"
564
+ # You can add more options from https://docs.oracle.com/en/java/javase/14/jpackage/packaging-tool-user-guide.pdf
549
565
  MULTI_LINE_STRING
550
566
  end
551
567
  file_content
@@ -643,7 +659,8 @@ module Glimmer
643
659
  shell#{'(:fill_screen)' if shell_type == :desktopify} {
644
660
  # Replace example content below with custom shell content
645
661
  minimum_size #{shell_type == :desktopify ? '768, 432' : '420, 240'}
646
- image File.join(APP_ROOT, 'package', 'windows', "#{human_name(shell_type == :gem ? custom_shell_name : current_dir_name)}.ico") if OS.windows?
662
+ image File.join(APP_ROOT, 'icons', 'windows', "#{human_name(shell_type == :gem ? custom_shell_name : current_dir_name)}.ico") if OS.windows?
663
+ image File.join(APP_ROOT, 'icons', 'linux', "#{human_name(shell_type == :gem ? custom_shell_name : current_dir_name)}.png") unless OS.windows?
647
664
  text "#{human_name(namespace)} - #{human_name(custom_shell_name)}"
648
665
 
649
666
  MULTI_LINE_STRING
@@ -122,9 +122,9 @@ module Glimmer
122
122
  def input_stream
123
123
  if @file_path.start_with?('uri:classloader')
124
124
  @jar_file_path = @file_path
125
- file_path = @jar_file_path.sub(/^uri\:classloader\:/, '').sub('//', '/') # the latter sub is needed for Mac
126
- object = java.lang.Object.new
127
- file_input_stream = object.java_class.resource_as_stream(file_path)
125
+ file_path = @jar_file_path.sub(/^uri\:classloader\:/, '').sub('//', '') # the latter sub is needed for Mac
126
+ project_name = java.lang.System.getProperty('project_name')
127
+ file_input_stream = java_import("#{project_name}.Resource").last.java_class.resource_as_stream(file_path)
128
128
  else
129
129
  file_input_stream = java.io.FileInputStream.new(@file_path)
130
130
  end
Binary file
Binary file
Binary file
Binary file
Binary file
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: glimmer-dsl-swt
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.20.15.5
4
+ version: 4.21.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andy Maleh
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-09-26 00:00:00.000000000 Z
11
+ date: 2021-09-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement
@@ -238,6 +238,20 @@ dependencies:
238
238
  - - "<"
239
239
  - !ruby/object:Gem::Version
240
240
  version: 4.0.0
241
+ - !ruby/object:Gem::Dependency
242
+ requirement: !ruby/object:Gem::Requirement
243
+ requirements:
244
+ - - '='
245
+ - !ruby/object:Gem::Version
246
+ version: 3.3.2
247
+ name: psych
248
+ prerelease: false
249
+ type: :runtime
250
+ version_requirements: !ruby/object:Gem::Requirement
251
+ requirements:
252
+ - - '='
253
+ - !ruby/object:Gem::Version
254
+ version: 3.3.2
241
255
  - !ruby/object:Gem::Dependency
242
256
  requirement: !ruby/object:Gem::Requirement
243
257
  requirements:
@@ -712,7 +726,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
712
726
  - !ruby/object:Gem::Version
713
727
  version: '0'
714
728
  requirements: []
715
- rubygems_version: 3.2.27
729
+ rubygems_version: 3.2.14
716
730
  signing_key:
717
731
  specification_version: 4
718
732
  summary: Glimmer DSL for SWT (JRuby Desktop Development GUI Framework)