glimmer 0.5.5 → 0.5.6

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: f7348e7c25e89b1300de7540833ad43ac060ecf94b8b97b897d8e946390851a5
4
- data.tar.gz: a4e964bacc785ed789fe25c97c3811b39952d315428ec38e43082d5ba2bd1967
3
+ metadata.gz: 51b44dbf8715a8b5137fc9d25920195cfbc3371c64bc4f9f08382b58b90f9f05
4
+ data.tar.gz: e4cf7037a049c640bd073df65e6053f82cabba4afbdb74a2ea4d7ac040ff62a5
5
5
  SHA512:
6
- metadata.gz: 5348edf829a109f758e8a098d19b33dbdb6ddd27add80a5ab37afed35e426d1805742ce065ffb09f9451202ea3974312222bdd16390a47014a97dfc3cf92d399
7
- data.tar.gz: dc24d11c4522f9c96d8d2fae5178a7053d9599fe5e3e0054db34e047dc519fdb1cbbb928eb8a5b16527db1ac2973224dc802802c9654096fd609e20533eba94d
6
+ metadata.gz: 64cb07faee671c1497ed8ce958f79bcf790740263e8d6a317df0295da98d2c99062134f47bc8ebbb8496828aa68db4795b8bad3f2ed01bd08bce7b9a40eb5513
7
+ data.tar.gz: 84d6fe12fceadf0904421caba2e20e840aa67b7cdfd7820da8f3a0373643a086fc2b82f5ba7bf719ff4fc3cde5298b8de64f64a11ad90451f3e3458f88aae830
@@ -1,4 +1,4 @@
1
- # Glimmer 0.5.5 Beta (JRuby Desktop UI DSL + Data-Binding)
1
+ # Glimmer 0.5.6 Beta (JRuby Desktop UI DSL + Data-Binding)
2
2
  [![Coverage Status](https://coveralls.io/repos/github/AndyObtiva/glimmer/badge.svg?branch=master)](https://coveralls.io/github/AndyObtiva/glimmer?branch=master)
3
3
 
4
4
  Glimmer is a native-UI cross-platform desktop development library written in Ruby. Glimmer's main innovation is a JRuby DSL that enables productive and efficient authoring of desktop application user-interfaces while relying on the robust platform-native Eclipse SWT library. Glimmer additionally innovates by having built-in data-binding support to greatly facilitate synchronizing the UI with domain models. As a result, that achieves true decoupling of object oriented components, enabling developers to solve business problems without worrying about UI concerns, or alternatively drive development UI-first, and then write clean business components test-first afterwards.
@@ -111,14 +111,14 @@ Please follow these instructions to make the `glimmer` command available on your
111
111
 
112
112
  Run this command to install directly:
113
113
  ```
114
- jgem install glimmer -v 0.5.5
114
+ jgem install glimmer -v 0.5.6
115
115
  ```
116
116
 
117
117
  ### Option 2: Bundler
118
118
 
119
119
  Add the following to `Gemfile`:
120
120
  ```
121
- gem 'glimmer', '~> 0.5.5'
121
+ gem 'glimmer', '~> 0.5.6'
122
122
  ```
123
123
 
124
124
  And, then run:
@@ -1675,29 +1675,48 @@ Glimmer apps may be packaged and distributed on the Mac, Windows, and Linux via
1675
1675
  - Warbler (https://github.com/jruby/warbler): Enables bundling a Glimmer app into a JAR file
1676
1676
  - javapackager (https://docs.oracle.com/javase/8/docs/technotes/tools/unix/javapackager.html): Enables packaging a JAR file as a DMG file on Mac, EXE on Windows, and multiple Linux supported formats on Linux.
1677
1677
 
1678
- Glimmer simplifies the process for general packaging on the Mac by providing a rake task.
1678
+ Glimmer simplifies the process for Mac packaging by providing a rake task.
1679
1679
 
1680
+ To use:
1680
1681
  - Create `Rakefile` in your app root directory
1681
1682
  - Add the following line to it: `require 'glimmer/rake_task'`
1682
1683
  - Create a Ruby script under bin (e.g. `bin/math_bowling`) to require the application file that uses Glimmer (e.g. `'../app/my_application.rb'`):
1683
1684
  ```ruby
1684
1685
  require_relative '../app/my_application.rb'
1685
1686
  ```
1687
+ - (Optional) If you'd like to include an icon for your app (.icns format on the Mac), place it under `package/macosx` matching your application local directory name (e.g. 'MathBowling.icns' for MathBowling). 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/)
1686
1688
 
1687
- Now, you can run the following command to package your app into a Mac DMG file (using both Warbler and javapackager):
1689
+ Now, you can run the following rake command to package your app into a Mac DMG file (using both Warbler and javapackager):
1688
1690
  ```
1689
1691
  rake glimmer:package
1690
1692
  ```
1691
1693
 
1692
- This will generate a JAR file under `./dist` directory and DMG file under `./packages/bundles`. Both will match your application local directory name (e.g. `MathBowling.jar` and `MathBowling-1.0.dmg` for `~/code/MathBowling`)
1694
+ This will generate a JAR file under `./dist` directory, which is then used to generate a DMG file (and pkg/app) under `./packages/bundles`. Both will match your application local directory name (e.g. `MathBowling.jar` and `MathBowling-1.0.dmg` for `~/code/MathBowling`)
1693
1695
 
1694
1696
  By default, the package only includes these directories: app, config, db, lib, script, bin, images, sounds, videos
1695
1697
 
1696
- After running once, you will find a `config/warble.rb` file. It has the JAR packaging configuration. You may adjust included directories in it if needed, and then rerun `rake glimmer:package` and it will pick up your custom configuration.
1698
+ After running once, you will find a `config/warble.rb` file. It has the JAR packaging configuration. You may adjust included directories in it if needed, and then rerun `rake glimmer:package` and it will pick up your custom configuration. Alternatively, if you'd like to customize the included directories to begin with, don't run `rake glimmer:package` right away. Run this command first:
1697
1699
 
1698
- Otherwise, you may find more advanced instructions for javapackager (https://docs.oracle.com/javase/8/docs/technotes/guides/deploy/self-contained-packaging.html#BCGICFDB) and (https://docs.oracle.com/javase/8/docs/technotes/guides/deploy/self-contained-packaging.html) in order to sign your Mac app and distribute on the App Store.
1700
+ ```
1701
+ rake glimmer:package:config
1702
+ ```
1703
+
1704
+ This will generate `config/warble.rb`, which you may configure and then run `rake glimmer:package` afterwards.
1705
+
1706
+ In any case, you may find more advanced instructions for `javapackager` (https://docs.oracle.com/javase/8/docs/technotes/tools/unix/javapackager.html), (https://docs.oracle.com/javase/8/docs/technotes/guides/deploy/self-contained-packaging.html#BCGICFDB) and (https://docs.oracle.com/javase/8/docs/technotes/guides/deploy/self-contained-packaging.html) in order to pass extra options and sign your Mac app to distribute on the App Store.
1707
+
1708
+ Glimmer allows passing extra options to the rake task via environment variable `JAVAPACKAGER_EXTRA_ARGS`
1709
+
1710
+ ```
1711
+ JAVAPACKAGER_EXTRA_ARGS='-Bicon="package/macosx/MathBowling.icns"' rake glimmer:package
1712
+ ```
1713
+
1714
+ ### Gotcha
1715
+
1716
+ If you run `rake glimmer:config` 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."
1717
+
1718
+ BTW, keep in mind that during normal operation, it does indicate a false-negative failure while completing successfully regardless: "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"
1699
1719
 
1700
- Additionally, read their documentation on how to set an icon/assets for the application: https://docs.oracle.com/javase/8/docs/technotes/tools/unix/javapackager.html
1701
1720
 
1702
1721
  ## Resources
1703
1722
 
@@ -1,23 +1,33 @@
1
1
  namespace :glimmer do
2
- desc 'Package app for distribution'
3
- task :package do
4
- project_name = File.basename(File.expand_path('.'))
5
- if !File.exists?('config/warble.rb')
6
- system('mkdir -p config')
7
- system('warble config')
8
- new_config = File.read('config/warble.rb').split("\n").inject('') do |output, line|
9
- if line.include?('config.dirs =')
10
- line = line.sub('# ', '').sub(/=[^=\n]+$/, '= %w(app config db lib script bin images sounds videos)')
11
- end
12
- if line.include?('config.autodeploy_dir =')
13
- line = line.sub('# ', '')
2
+ namespace :package do
3
+ desc 'Generate JAR config file'
4
+ task :config do
5
+ project_name = File.basename(File.expand_path('.'))
6
+ if !File.exists?('config/warble.rb')
7
+ system('mkdir -p config')
8
+ system('warble config')
9
+ new_config = File.read('config/warble.rb').split("\n").inject('') do |output, line|
10
+ if line.include?('config.dirs =')
11
+ line = line.sub('# ', '').sub(/=[^=\n]+$/, '= %w(app config db lib script bin images sounds videos)')
12
+ end
13
+ if line.include?('config.autodeploy_dir =')
14
+ line = line.sub('# ', '')
15
+ end
16
+ output + "\n" + line
14
17
  end
15
- output + "\n" + line
18
+ File.write('config/warble.rb', new_config)
16
19
  end
17
- File.write('config/warble.rb', new_config)
18
20
  end
21
+ end
22
+
23
+ desc 'Package app for distribution'
24
+ task :package => 'package:config' do
25
+ project_name = File.basename(File.expand_path('.'))
19
26
  system('mkdir -p dist')
20
27
  system('warble')
21
- system("javapackager -deploy -native -outdir packages -outfile #{project_name} -srcdir dist -srcfiles #{project_name}.jar -appclass JarMain -name \"#{project_name}\" -title \"#{project_name}\" -BjvmOptions=-XstartOnFirstThread")
28
+ command = "javapackager -deploy -native -outdir packages -outfile #{project_name} -srcdir dist -srcfiles #{project_name}.jar -appclass JarMain -name \"#{project_name}\" -title \"#{project_name}\" -BjvmOptions=-XstartOnFirstThread"
29
+ command += " #{ENV['JAVAPACKAGER_EXTRA_ARGS']}" if ENV['JAVAPACKAGER_EXTRA_ARGS']
30
+ puts command
31
+ system command
22
32
  end
23
33
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: glimmer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.5
4
+ version: 0.5.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - AndyMaleh
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-04-17 00:00:00.000000000 Z
11
+ date: 2020-04-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement