glimmer-cw-browser-chromium 1.0.0 → 4.17.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 +10 -0
- data/README.md +37 -11
- data/VERSION +1 -1
- data/glimmer-cw-browser-chromium.gemspec +9 -5
- data/lib/glimmer-cw-browser-chromium.rb +1 -9
- data/lib/glimmer-cw-browser-chromium/ext/glimmer/swt/browser_proxy.rb +49 -0
- metadata +20 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c69be00e8153ad7cee70658db2325cc957a3ca7b4a0d1480cd26aa7082be8c72
|
4
|
+
data.tar.gz: a01ed72bda7a6fdd39c3967a016e269054bc8e69a02842cce56405fa9515e3d6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 76654ecc5eeade50432ade32451229c5ec36c8de79424fd451ace0d755ee7933b8b37edead4f49300267776ab91c3641fdf5dd28d720ed4ec540be4fd3f1d29f
|
7
|
+
data.tar.gz: de6830b4d76d6a554831dfa432fa59fb9eb0cd48abd5e89a540208d33f97556ae183224b3e52121ef0c053a27f7270ac004570185cc00b1e3ddd932f50a7bb99
|
data/CHANGELOG.md
ADDED
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Chromium Browser
|
1
|
+
# Chromium Browser 4.17.0.0
|
2
2
|
## [<img src="https://raw.githubusercontent.com/AndyObtiva/glimmer/master/images/glimmer-logo-hi-res.png" height=40 /> Glimmer Custom Widget](https://github.com/AndyObtiva/glimmer#custom-widget-gem)
|
3
3
|
[![Gem Version](https://badge.fury.io/rb/glimmer-cw-video.svg)](http://badge.fury.io/rb/glimmer-cw-video)
|
4
4
|
[![Join the chat at https://gitter.im/AndyObtiva/glimmer](https://badges.gitter.im/AndyObtiva/glimmer.svg)](https://gitter.im/AndyObtiva/glimmer?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
@@ -11,10 +11,12 @@ In order for it to work however, it needs the [SWT Chromium support libraries](h
|
|
11
11
|
|
12
12
|
The Chromium Browser [Glimmer Custom Widget](https://github.com/AndyObtiva/glimmer#custom-widget-gem) automates the inclusion of Chromium support libraries by relying on [bundler-download](https://github.com/AndyObtiva/bundler-download) gem (details under [setup](#setup))
|
13
13
|
|
14
|
+
Note: Gem version numbers are in sync with the SWT Chromium library versions. The first two numbers represent the SWT Chromium version number. The last two numbers represent the minor and patch versions of the Chromium Browser Glimmer Custom Widget.
|
15
|
+
|
14
16
|
## Content
|
15
17
|
|
16
|
-
- [SWT Chromium support libraries](https://download.eclipse.org/eclipse/downloads/drops4/R-4.17-202009021800/#SWTChromium): included in gem
|
17
|
-
- [CEF](https://bitbucket.org/chromiumembedded/cef/src/master/) Binaries via a bundler-download [Downloadfile](Downloadfile): downloaded via bundler-download Bundler plugin upon `bundle install`
|
18
|
+
- [SWT Chromium support libraries](https://download.eclipse.org/eclipse/downloads/drops4/R-4.17-202009021800/#SWTChromium) (v4.17-202009021800): included in gem
|
19
|
+
- [CEF](https://bitbucket.org/chromiumembedded/cef/src/master/) Binaries (v0.4.0.202005172227) via a bundler-download [Downloadfile](Downloadfile): downloaded via bundler-download Bundler plugin upon `bundle install`
|
18
20
|
|
19
21
|
## Platforms
|
20
22
|
|
@@ -30,16 +32,18 @@ The Chromium Browser [Glimmer Custom Widget](https://github.com/AndyObtiva/glimm
|
|
30
32
|
|
31
33
|
## Setup
|
32
34
|
|
33
|
-
The Chromium Browser gem includes downloads in a [Downloadfile](Downloadfile) and relies on the the [bundler-download](https://github.com/AndyObtiva/bundler-download) Bundler plugin to automatically download extra files
|
35
|
+
The Chromium Browser gem includes downloads in a [Downloadfile](Downloadfile) and relies on the the [bundler-download](https://github.com/AndyObtiva/bundler-download) Bundler plugin to automatically download extra files.
|
34
36
|
|
35
37
|
### Glimmer Application
|
36
38
|
|
39
|
+
#### Option 1: Pre-Download Binaries via Bundler Plugin
|
40
|
+
|
37
41
|
Add the following to a Glimmer application `Gemfile`:
|
38
42
|
|
39
43
|
```ruby
|
40
44
|
plugin 'bundler-download'
|
41
45
|
|
42
|
-
gem 'glimmer-cw-browser-chromium', '~>
|
46
|
+
gem 'glimmer-cw-browser-chromium', '~> 4.17.0.0'
|
43
47
|
```
|
44
48
|
|
45
49
|
Run this twice (the first time to install the `bundler-download` plugin and the second time to activate it and download extra files at the end):
|
@@ -50,18 +54,40 @@ jruby -S bundle
|
|
50
54
|
|
51
55
|
(or just `bundle` if using RVM)
|
52
56
|
|
57
|
+
#### Option 2: Download Binaries on First Use without Bundler Plugin
|
58
|
+
|
59
|
+
This option is useful if you want to include the Chromium Browser as a passive available option without forcing apps to download large binary files if they do not need the feature.
|
60
|
+
|
61
|
+
Add the following to a Glimmer application `Gemfile`:
|
62
|
+
|
63
|
+
```ruby
|
64
|
+
gem 'glimmer-cw-browser-chromium', '~> 4.17.0.0'
|
65
|
+
```
|
66
|
+
|
67
|
+
Run this:
|
68
|
+
|
69
|
+
```
|
70
|
+
jruby -S bundle
|
71
|
+
```
|
72
|
+
|
73
|
+
(or just `bundle` if using RVM)
|
74
|
+
|
75
|
+
The first time you use the `browser(:chromium)` widget, extra file downloads are initiated to obtain the [CEF](https://bitbucket.org/chromiumembedded/cef/src/master/) Binaries (if not downloaded already).
|
76
|
+
|
53
77
|
### Glimmer Custom Shell gem or Glimmer Custom Widget gem
|
54
78
|
|
55
|
-
|
79
|
+
Both options 1 and 2 from [Glimmer Application](#glimmer-application) instructions are available for [custom shells](https://github.com/AndyObtiva/glimmer-dsl-swt#custom-shells) and [custom widgets](https://github.com/AndyObtiva/glimmer-dsl-swt#custom-widget) too.
|
80
|
+
|
81
|
+
When reusing in a Glimmer custom shell only (not custom widget), start by installing the [bundler-download](https://github.com/AndyObtiva/bundler-download) Bundler plugin manually:
|
56
82
|
|
57
83
|
```
|
58
84
|
bundle plugin install bundler-download
|
59
85
|
```
|
60
86
|
|
61
|
-
Afterwards, add the following line to `Gemfile` (especially if you're using [Jeweler](https://github.com/technicalpickles/jeweler)/[Juwelier](https://github.com/flajann2/juwelier)):
|
87
|
+
Afterwards, for both custom shells and custom widgets, add the following line to `Gemfile` (especially if you're using [Jeweler](https://github.com/technicalpickles/jeweler)/[Juwelier](https://github.com/flajann2/juwelier)):
|
62
88
|
|
63
89
|
```ruby
|
64
|
-
gem 'glimmer-cw-browser-chromium', '~>
|
90
|
+
gem 'glimmer-cw-browser-chromium', '~> 4.17.0.0'
|
65
91
|
```
|
66
92
|
|
67
93
|
Run this to install gem and download extra files at the end via [bundler-download](https://github.com/AndyObtiva/bundler-download):
|
@@ -75,7 +101,7 @@ jruby -S bundle
|
|
75
101
|
If not using [Jeweler](https://github.com/technicalpickles/jeweler)/[Juwelier](https://github.com/flajann2/juwelier), add the following line to the gemspec:
|
76
102
|
|
77
103
|
```ruby
|
78
|
-
s.add_runtime_dependency(%q<glimmer-cw-browser-chromium>.freeze, [">=
|
104
|
+
s.add_runtime_dependency(%q<glimmer-cw-browser-chromium>.freeze, [">= 4.17.0.0", "< 5.0.0.0"])
|
79
105
|
```
|
80
106
|
|
81
107
|
Finally, just require the library in your code.
|
@@ -132,8 +158,8 @@ bundle download show
|
|
132
158
|
This should print something like:
|
133
159
|
|
134
160
|
```
|
135
|
-
Showing downloaded files for /Users/User/.rvm/gems/jruby-9.2.13.0@glimmer-cw-video/gems/glimmer-cw-browser-chromium-
|
136
|
-
54070695 /Users/User/.rvm/gems/jruby-9.2.13.0@glimmer-cw-video/gems/glimmer-cw-browser-chromium-
|
161
|
+
Showing downloaded files for /Users/User/.rvm/gems/jruby-9.2.13.0@glimmer-cw-video/gems/glimmer-cw-browser-chromium-4.17.0.0/Downloadfile
|
162
|
+
54070695 /Users/User/.rvm/gems/jruby-9.2.13.0@glimmer-cw-video/gems/glimmer-cw-browser-chromium-4.17.0.0/vendor/jars/mac/com.make.chromium.cef.cocoa.macosx.x86_64_0.4.0.202005172227.jar
|
137
163
|
```
|
138
164
|
|
139
165
|
To clear downloads, run:
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
4.17.0.0
|
@@ -2,16 +2,16 @@
|
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
3
3
|
# Instead, edit Juwelier::Tasks in Rakefile, and run 'rake gemspec'
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
|
-
# stub: glimmer-cw-browser-chromium
|
5
|
+
# stub: glimmer-cw-browser-chromium 4.17.0.0 ruby lib
|
6
6
|
|
7
7
|
Gem::Specification.new do |s|
|
8
8
|
s.name = "glimmer-cw-browser-chromium".freeze
|
9
|
-
s.version = "
|
9
|
+
s.version = "4.17.0.0"
|
10
10
|
|
11
11
|
s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
|
12
12
|
s.require_paths = ["lib".freeze]
|
13
13
|
s.authors = ["Andy Maleh".freeze]
|
14
|
-
s.date = "2020-09-
|
14
|
+
s.date = "2020-09-25"
|
15
15
|
s.description = "Chromium Browser - Glimmer Custom Widget".freeze
|
16
16
|
s.email = "andy.am@gmail.com".freeze
|
17
17
|
s.extra_rdoc_files = [
|
@@ -19,12 +19,14 @@ Gem::Specification.new do |s|
|
|
19
19
|
"README.md"
|
20
20
|
]
|
21
21
|
s.files = [
|
22
|
+
"CHANGELOG.md",
|
22
23
|
"Downloadfile",
|
23
24
|
"LICENSE.txt",
|
24
25
|
"README.md",
|
25
26
|
"VERSION",
|
26
27
|
"glimmer-cw-browser-chromium.gemspec",
|
27
28
|
"lib/glimmer-cw-browser-chromium.rb",
|
29
|
+
"lib/glimmer-cw-browser-chromium/ext/glimmer/swt/browser_proxy.rb",
|
28
30
|
"samples/browser-chromium/hello_browser_chromium.rb",
|
29
31
|
"vendor/jars/linux/swt-chromium.jar",
|
30
32
|
"vendor/jars/mac/swt-chromium.jar",
|
@@ -40,15 +42,17 @@ Gem::Specification.new do |s|
|
|
40
42
|
end
|
41
43
|
|
42
44
|
if s.respond_to? :add_runtime_dependency then
|
43
|
-
s.add_runtime_dependency(%q<glimmer-dsl-swt>.freeze, [">= 4.17.
|
45
|
+
s.add_runtime_dependency(%q<glimmer-dsl-swt>.freeze, [">= 4.17.2.0", "< 5.0.0.0"])
|
44
46
|
s.add_runtime_dependency(%q<bundler-download>.freeze, [">= 0"])
|
45
47
|
s.add_development_dependency(%q<rspec>.freeze, ["~> 3.5.0"])
|
48
|
+
s.add_development_dependency(%q<juwelier>.freeze, ["~> 2.4.9"])
|
46
49
|
s.add_development_dependency(%q<git-glimmer>.freeze, ["= 1.7.0"])
|
47
50
|
s.add_development_dependency(%q<simplecov>.freeze, [">= 0"])
|
48
51
|
else
|
49
|
-
s.add_dependency(%q<glimmer-dsl-swt>.freeze, [">= 4.17.
|
52
|
+
s.add_dependency(%q<glimmer-dsl-swt>.freeze, [">= 4.17.2.0", "< 5.0.0.0"])
|
50
53
|
s.add_dependency(%q<bundler-download>.freeze, [">= 0"])
|
51
54
|
s.add_dependency(%q<rspec>.freeze, ["~> 3.5.0"])
|
55
|
+
s.add_dependency(%q<juwelier>.freeze, ["~> 2.4.9"])
|
52
56
|
s.add_dependency(%q<git-glimmer>.freeze, ["= 1.7.0"])
|
53
57
|
s.add_dependency(%q<simplecov>.freeze, [">= 0"])
|
54
58
|
end
|
@@ -1,12 +1,4 @@
|
|
1
1
|
$LOAD_PATH.unshift(File.expand_path('..', __FILE__))
|
2
2
|
|
3
3
|
require 'glimmer-dsl-swt'
|
4
|
-
require 'glimmer/
|
5
|
-
|
6
|
-
jars = Dir.glob(File.expand_path("../../vendor/jars/#{Glimmer::Launcher.platform_os}/**/*.jar", __FILE__)).to_a
|
7
|
-
if jars.size < 2
|
8
|
-
puts 'Please be patient while downloading files for Chromium Browser support.'
|
9
|
-
require 'bundler-download'
|
10
|
-
Bundler::Download.new.exec('download', [])
|
11
|
-
end
|
12
|
-
jars.each {|f| require f}
|
4
|
+
require 'glimmer-cw-browser-chromium/ext/glimmer/swt/browser_proxy'
|
@@ -0,0 +1,49 @@
|
|
1
|
+
# Copyright (c) 2007-2020 Andy Maleh
|
2
|
+
#
|
3
|
+
# Permission is hereby granted, free of charge, to any person obtaining
|
4
|
+
# a copy of this software and associated documentation files (the
|
5
|
+
# "Software"), to deal in the Software without restriction, including
|
6
|
+
# without limitation the rights to use, copy, modify, merge, publish,
|
7
|
+
# distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
+
# permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
# the following conditions:
|
10
|
+
#
|
11
|
+
# The above copyright notice and this permission notice shall be
|
12
|
+
# included in all copies or substantial portions of the Software.
|
13
|
+
#
|
14
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
+
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
+
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
+
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
+
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
+
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
+
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
21
|
+
|
22
|
+
require 'glimmer/swt/widget_proxy'
|
23
|
+
require 'glimmer/swt/swt_proxy'
|
24
|
+
|
25
|
+
module Glimmer
|
26
|
+
module SWT
|
27
|
+
class BrowserProxy < Glimmer::SWT::WidgetProxy
|
28
|
+
def initialize(*init_args, swt_widget: nil)
|
29
|
+
underscored_widget_name, parent, args = init_args
|
30
|
+
styles, extra_options = extract_args(underscored_widget_name, args)
|
31
|
+
if styles.include?(:chromium) || styles.include?(SWTProxy[:chromium])
|
32
|
+
require_jars
|
33
|
+
end
|
34
|
+
super
|
35
|
+
end
|
36
|
+
|
37
|
+
def require_jars
|
38
|
+
require 'glimmer/launcher'
|
39
|
+
jars = Dir.glob(File.expand_path("../../../../../../vendor/jars/#{Glimmer::Launcher.platform_os}/**/*.jar", __FILE__)).to_a
|
40
|
+
if jars.size < 2
|
41
|
+
puts 'Please be patient while downloading files for Chromium Browser support.'
|
42
|
+
require 'bundler-download'
|
43
|
+
Bundler::Download.new.exec('download', [])
|
44
|
+
end
|
45
|
+
jars.each {|f| require f}
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
metadata
CHANGED
@@ -1,21 +1,21 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: glimmer-cw-browser-chromium
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 4.17.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: 2020-09-
|
11
|
+
date: 2020-09-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|
15
15
|
requirements:
|
16
16
|
- - ">="
|
17
17
|
- !ruby/object:Gem::Version
|
18
|
-
version: 4.17.
|
18
|
+
version: 4.17.2.0
|
19
19
|
- - "<"
|
20
20
|
- !ruby/object:Gem::Version
|
21
21
|
version: 5.0.0.0
|
@@ -26,7 +26,7 @@ dependencies:
|
|
26
26
|
requirements:
|
27
27
|
- - ">="
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version: 4.17.
|
29
|
+
version: 4.17.2.0
|
30
30
|
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
32
|
version: 5.0.0.0
|
@@ -58,6 +58,20 @@ dependencies:
|
|
58
58
|
- - "~>"
|
59
59
|
- !ruby/object:Gem::Version
|
60
60
|
version: 3.5.0
|
61
|
+
- !ruby/object:Gem::Dependency
|
62
|
+
requirement: !ruby/object:Gem::Requirement
|
63
|
+
requirements:
|
64
|
+
- - "~>"
|
65
|
+
- !ruby/object:Gem::Version
|
66
|
+
version: 2.4.9
|
67
|
+
name: juwelier
|
68
|
+
prerelease: false
|
69
|
+
type: :development
|
70
|
+
version_requirements: !ruby/object:Gem::Requirement
|
71
|
+
requirements:
|
72
|
+
- - "~>"
|
73
|
+
- !ruby/object:Gem::Version
|
74
|
+
version: 2.4.9
|
61
75
|
- !ruby/object:Gem::Dependency
|
62
76
|
requirement: !ruby/object:Gem::Requirement
|
63
77
|
requirements:
|
@@ -94,12 +108,14 @@ extra_rdoc_files:
|
|
94
108
|
- LICENSE.txt
|
95
109
|
- README.md
|
96
110
|
files:
|
111
|
+
- CHANGELOG.md
|
97
112
|
- Downloadfile
|
98
113
|
- LICENSE.txt
|
99
114
|
- README.md
|
100
115
|
- VERSION
|
101
116
|
- glimmer-cw-browser-chromium.gemspec
|
102
117
|
- lib/glimmer-cw-browser-chromium.rb
|
118
|
+
- lib/glimmer-cw-browser-chromium/ext/glimmer/swt/browser_proxy.rb
|
103
119
|
- samples/browser-chromium/hello_browser_chromium.rb
|
104
120
|
- vendor/jars/linux/swt-chromium.jar
|
105
121
|
- vendor/jars/mac/swt-chromium.jar
|