glimmer-cw-browser-chromium 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 5eabb5e2ce3873c2a1b160a357e1dd2b86acf8bf6ad66a20d02fe82854b3023f
4
+ data.tar.gz: 4f1e4cf67a97358a1fd2568adab98d3ce72b8d7136462b04da08eb4b32ca6212
5
+ SHA512:
6
+ metadata.gz: 2fe570bd66c773f9b72216543d246bf6926355480fad59926f4a296de2eaeffe71bf695b52607b22d0ef6a267095420a926d85a988c6cb66cd4f44e6efb4fbef
7
+ data.tar.gz: 69c2427d9c96961ce91ebc4e4ca6e544292cdd9a1d2f0485012a60dd82fc8496db535c7b48f0f0d83f10c13b565dcff9880c80147afa004834e8167419a789e1
@@ -0,0 +1,6 @@
1
+ download 'http://dl.maketechnology.io/chromium-cef/rls/repository/plugins/com.make.chromium.cef.gtk.linux.x86_64_0.4.0.202005172227.jar',
2
+ to: 'vendor/jars/linux', os: 'linux'
3
+ download 'http://dl.maketechnology.io/chromium-cef/rls/repository/plugins/com.make.chromium.cef.cocoa.macosx.x86_64_0.4.0.202005172227.jar',
4
+ to: 'vendor/jars/mac', os: 'mac'
5
+ download 'http://dl.maketechnology.io/chromium-cef/rls/repository/plugins/com.make.chromium.cef.win32.win32.x86_64_0.4.0.202005172227.jar',
6
+ to: 'vendor/jars/windows', os: 'windows'
@@ -0,0 +1,20 @@
1
+ Copyright (c) 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.
@@ -0,0 +1,169 @@
1
+ # Chromium Browser 1.0.0
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
+ [![Gem Version](https://badge.fury.io/rb/glimmer-cw-video.svg)](http://badge.fury.io/rb/glimmer-cw-video)
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)
5
+
6
+ Chromium Browser is a [Glimmer Custom Widget](https://github.com/AndyObtiva/glimmer#custom-widget-gem) that brings Chromium support into the [Glimmer DSL for SWT](https://github.com/AndyObtiva/glimmer-dsl-swt)
7
+
8
+ [SWT (Standard Widget Toolkit)](https://www.eclipse.org/swt/) started supporting the Chromium Browser in version 4.17 via the `SWT.CHROMIUM` SWT style.
9
+
10
+ In order for it to work however, it needs the [SWT Chromium support libraries](https://download.eclipse.org/eclipse/downloads/drops4/R-4.17-202009021800/#SWTChromium) and the [CEF](https://bitbucket.org/chromiumembedded/cef/src/master/) Binaries as outlined in the [SWT FAQ](https://www.eclipse.org/swt/faq.php#howusechromium).
11
+
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
+
14
+ ## Content
15
+
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
+
19
+ ## Platforms
20
+
21
+ - Mac
22
+ - Windows
23
+ - Linux
24
+
25
+ ## Pre-requisites
26
+
27
+ - [Glimmer DSL for SWT](https://github.com/AndyObtiva/glimmer-dsl-swt) application, [Glimmer](https://github.com/AndyObtiva/glimmer-dsl-swt) custom shell, or another [Glimmer](https://github.com/AndyObtiva/glimmer-dsl-swt) custom widget
28
+ - [JRuby](https://github.com/AndyObtiva/glimmer-dsl-swt#pre-requisites) version required by [Glimmer](https://github.com/AndyObtiva/glimmer-dsl-swt)
29
+ - [Java](https://github.com/AndyObtiva/glimmer-dsl-swt#pre-requisites) version required by [Glimmer](https://github.com/AndyObtiva/glimmer-dsl-swt)
30
+
31
+ ## Setup
32
+
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 at the end of `bundle install`
34
+
35
+ ### Glimmer Application
36
+
37
+ Add the following to a Glimmer application `Gemfile`:
38
+
39
+ ```ruby
40
+ plugin 'bundler-download'
41
+
42
+ gem 'glimmer-cw-browser-chromium', '~> 1.0.0'
43
+ ```
44
+
45
+ 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):
46
+
47
+ ```
48
+ jruby -S bundle
49
+ ```
50
+
51
+ (or just `bundle` if using RVM)
52
+
53
+ ### Glimmer Custom Shell gem or Glimmer Custom Widget gem
54
+
55
+ When reusing in a Glimmer custom shell or custom widget, start by installing the [bundler-download](https://github.com/AndyObtiva/bundler-download) Bundler plugin manually:
56
+
57
+ ```
58
+ bundle plugin install bundler-download
59
+ ```
60
+
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)):
62
+
63
+ ```ruby
64
+ gem 'glimmer-cw-browser-chromium', '~> 1.0.0'
65
+ ```
66
+
67
+ Run this to install gem and download extra files at the end via [bundler-download](https://github.com/AndyObtiva/bundler-download):
68
+
69
+ ```
70
+ jruby -S bundle
71
+ ```
72
+
73
+ (or just `bundle` if using [RVM](https://rvm.io))
74
+
75
+ If not using [Jeweler](https://github.com/technicalpickles/jeweler)/[Juwelier](https://github.com/flajann2/juwelier), add the following line to the gemspec:
76
+
77
+ ```ruby
78
+ s.add_runtime_dependency(%q<glimmer-cw-browser-chromium>.freeze, [">= 1.0.0", "< 2.0.0"])
79
+ ```
80
+
81
+ Finally, just require the library in your code.
82
+
83
+ ```ruby
84
+ require 'glimmer-cw-browser-chromium'
85
+ ```
86
+
87
+ ## Instructions
88
+
89
+ `browser(:chromium)` is the [Glimmer GUI DSL](https://github.com/AndyObtiva/glimmer-dsl-swt#glimmer-gui-dsl-syntax) keyword to use.
90
+
91
+ It is the same as the standard `browser` widget but with the `:chromium` [SWT style](https://github.com/AndyObtiva/glimmer-dsl-swt#widget-styles).
92
+
93
+ ## Sample
94
+
95
+ ### Hello, Browser Chromium!
96
+
97
+ Glimmer code (from [samples/browser-chromium/hello_browser_chromium.rb](samples/browser-chromium/hello_browser_chromium.rb)):
98
+
99
+ ```ruby
100
+ require_relative '../../lib/glimmer-cw-browser-chromium'
101
+
102
+ include Glimmer
103
+
104
+ shell {
105
+ minimum_size 1024, 860
106
+ browser(:chromium) {
107
+ url 'https://brightonresort.com/about'
108
+ }
109
+ }.open
110
+ ```
111
+
112
+ Run:
113
+
114
+ ```
115
+ glimmer sample:run[hello_browser_chromium]
116
+ ```
117
+
118
+ Glimmer app:
119
+
120
+ ![Chromium Browser](https://raw.githubusercontent.com/AndyObtiva/glimmer-dsl-swt/master/images/glimmer-hello-browser.png)
121
+
122
+ ## Troubleshooting
123
+
124
+ If the Chromium Browser widget does not work for whatever reason due to missing or corrupt [CEF](https://bitbucket.org/chromiumembedded/cef/src/master/) Binaries, you may clear and redownload manually via `bundle download` commands (from [bundler-download](https://github.com/AndyObtiva/bundler-download)).
125
+
126
+ To show downloaded files, run:
127
+
128
+ ```
129
+ bundle download show
130
+ ```
131
+
132
+ This should print something like:
133
+
134
+ ```
135
+ Showing downloaded files for /Users/User/.rvm/gems/jruby-9.2.13.0@glimmer-cw-video/gems/glimmer-cw-browser-chromium-1.0.0/Downloadfile
136
+ 54070695 /Users/User/.rvm/gems/jruby-9.2.13.0@glimmer-cw-video/gems/glimmer-cw-browser-chromium-1.0.0/vendor/jars/mac/com.make.chromium.cef.cocoa.macosx.x86_64_0.4.0.202005172227.jar
137
+ ```
138
+
139
+ To clear downloads, run:
140
+
141
+ ```
142
+ bundle download clear
143
+ ```
144
+
145
+ To redownload, run:
146
+
147
+ ```
148
+ bundle download
149
+ ```
150
+
151
+ ## Contributing to glimmer-cw-browser-chromium
152
+
153
+ - Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet.
154
+ - Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it.
155
+ - Fork the project.
156
+ - Start a feature/bugfix branch.
157
+ - Commit and push until you are happy with your contribution.
158
+ - Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
159
+ - Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
160
+
161
+ ## License
162
+
163
+ [MIT](LICENSE.txt)
164
+
165
+ Copyright (c) 2020 - Andy Maleh.
166
+
167
+ --
168
+
169
+ [<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) (Ruby Desktop Development GUI Library).
data/VERSION ADDED
@@ -0,0 +1 @@
1
+ 1.0.0
@@ -0,0 +1,56 @@
1
+ # Generated by juwelier
2
+ # DO NOT EDIT THIS FILE DIRECTLY
3
+ # Instead, edit Juwelier::Tasks in Rakefile, and run 'rake gemspec'
4
+ # -*- encoding: utf-8 -*-
5
+ # stub: glimmer-cw-browser-chromium 1.0.0 ruby lib
6
+
7
+ Gem::Specification.new do |s|
8
+ s.name = "glimmer-cw-browser-chromium".freeze
9
+ s.version = "1.0.0"
10
+
11
+ s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
12
+ s.require_paths = ["lib".freeze]
13
+ s.authors = ["Andy Maleh".freeze]
14
+ s.date = "2020-09-24"
15
+ s.description = "Chromium Browser - Glimmer Custom Widget".freeze
16
+ s.email = "andy.am@gmail.com".freeze
17
+ s.extra_rdoc_files = [
18
+ "LICENSE.txt",
19
+ "README.md"
20
+ ]
21
+ s.files = [
22
+ "Downloadfile",
23
+ "LICENSE.txt",
24
+ "README.md",
25
+ "VERSION",
26
+ "glimmer-cw-browser-chromium.gemspec",
27
+ "lib/glimmer-cw-browser-chromium.rb",
28
+ "samples/browser-chromium/hello_browser_chromium.rb",
29
+ "vendor/jars/linux/swt-chromium.jar",
30
+ "vendor/jars/mac/swt-chromium.jar",
31
+ "vendor/jars/windows/swt-chromium.jar"
32
+ ]
33
+ s.homepage = "http://github.com/AndyObtiva/glimmer-cw-browser-chromium".freeze
34
+ s.licenses = ["MIT".freeze]
35
+ s.rubygems_version = "3.1.4".freeze
36
+ s.summary = "Chromium Browser - Glimmer Custom Widget".freeze
37
+
38
+ if s.respond_to? :specification_version then
39
+ s.specification_version = 4
40
+ end
41
+
42
+ if s.respond_to? :add_runtime_dependency then
43
+ s.add_runtime_dependency(%q<glimmer-dsl-swt>.freeze, [">= 4.17.1.1", "< 5.0.0.0"])
44
+ s.add_runtime_dependency(%q<bundler-download>.freeze, [">= 0"])
45
+ s.add_development_dependency(%q<rspec>.freeze, ["~> 3.5.0"])
46
+ s.add_development_dependency(%q<git-glimmer>.freeze, ["= 1.7.0"])
47
+ s.add_development_dependency(%q<simplecov>.freeze, [">= 0"])
48
+ else
49
+ s.add_dependency(%q<glimmer-dsl-swt>.freeze, [">= 4.17.1.1", "< 5.0.0.0"])
50
+ s.add_dependency(%q<bundler-download>.freeze, [">= 0"])
51
+ s.add_dependency(%q<rspec>.freeze, ["~> 3.5.0"])
52
+ s.add_dependency(%q<git-glimmer>.freeze, ["= 1.7.0"])
53
+ s.add_dependency(%q<simplecov>.freeze, [">= 0"])
54
+ end
55
+ end
56
+
@@ -0,0 +1,12 @@
1
+ $LOAD_PATH.unshift(File.expand_path('..', __FILE__))
2
+
3
+ require 'glimmer-dsl-swt'
4
+ require 'glimmer/launcher'
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}
@@ -0,0 +1,31 @@
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_relative '../../lib/glimmer-cw-browser-chromium'
23
+
24
+ include Glimmer
25
+
26
+ shell {
27
+ minimum_size 1024, 860
28
+ browser(:chromium) {
29
+ url 'https://brightonresort.com/about'
30
+ }
31
+ }.open
metadata ADDED
@@ -0,0 +1,130 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: glimmer-cw-browser-chromium
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0
5
+ platform: ruby
6
+ authors:
7
+ - Andy Maleh
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2020-09-24 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ requirement: !ruby/object:Gem::Requirement
15
+ requirements:
16
+ - - ">="
17
+ - !ruby/object:Gem::Version
18
+ version: 4.17.1.1
19
+ - - "<"
20
+ - !ruby/object:Gem::Version
21
+ version: 5.0.0.0
22
+ name: glimmer-dsl-swt
23
+ prerelease: false
24
+ type: :runtime
25
+ version_requirements: !ruby/object:Gem::Requirement
26
+ requirements:
27
+ - - ">="
28
+ - !ruby/object:Gem::Version
29
+ version: 4.17.1.1
30
+ - - "<"
31
+ - !ruby/object:Gem::Version
32
+ version: 5.0.0.0
33
+ - !ruby/object:Gem::Dependency
34
+ requirement: !ruby/object:Gem::Requirement
35
+ requirements:
36
+ - - ">="
37
+ - !ruby/object:Gem::Version
38
+ version: '0'
39
+ name: bundler-download
40
+ prerelease: false
41
+ type: :runtime
42
+ version_requirements: !ruby/object:Gem::Requirement
43
+ requirements:
44
+ - - ">="
45
+ - !ruby/object:Gem::Version
46
+ version: '0'
47
+ - !ruby/object:Gem::Dependency
48
+ requirement: !ruby/object:Gem::Requirement
49
+ requirements:
50
+ - - "~>"
51
+ - !ruby/object:Gem::Version
52
+ version: 3.5.0
53
+ name: rspec
54
+ prerelease: false
55
+ type: :development
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ requirements:
58
+ - - "~>"
59
+ - !ruby/object:Gem::Version
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: 1.7.0
67
+ name: git-glimmer
68
+ prerelease: false
69
+ type: :development
70
+ version_requirements: !ruby/object:Gem::Requirement
71
+ requirements:
72
+ - - '='
73
+ - !ruby/object:Gem::Version
74
+ version: 1.7.0
75
+ - !ruby/object:Gem::Dependency
76
+ requirement: !ruby/object:Gem::Requirement
77
+ requirements:
78
+ - - ">="
79
+ - !ruby/object:Gem::Version
80
+ version: '0'
81
+ name: simplecov
82
+ prerelease: false
83
+ type: :development
84
+ version_requirements: !ruby/object:Gem::Requirement
85
+ requirements:
86
+ - - ">="
87
+ - !ruby/object:Gem::Version
88
+ version: '0'
89
+ description: Chromium Browser - Glimmer Custom Widget
90
+ email: andy.am@gmail.com
91
+ executables: []
92
+ extensions: []
93
+ extra_rdoc_files:
94
+ - LICENSE.txt
95
+ - README.md
96
+ files:
97
+ - Downloadfile
98
+ - LICENSE.txt
99
+ - README.md
100
+ - VERSION
101
+ - glimmer-cw-browser-chromium.gemspec
102
+ - lib/glimmer-cw-browser-chromium.rb
103
+ - samples/browser-chromium/hello_browser_chromium.rb
104
+ - vendor/jars/linux/swt-chromium.jar
105
+ - vendor/jars/mac/swt-chromium.jar
106
+ - vendor/jars/windows/swt-chromium.jar
107
+ homepage: http://github.com/AndyObtiva/glimmer-cw-browser-chromium
108
+ licenses:
109
+ - MIT
110
+ metadata: {}
111
+ post_install_message:
112
+ rdoc_options: []
113
+ require_paths:
114
+ - lib
115
+ required_ruby_version: !ruby/object:Gem::Requirement
116
+ requirements:
117
+ - - ">="
118
+ - !ruby/object:Gem::Version
119
+ version: '0'
120
+ required_rubygems_version: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - ">="
123
+ - !ruby/object:Gem::Version
124
+ version: '0'
125
+ requirements: []
126
+ rubygems_version: 3.1.4
127
+ signing_key:
128
+ specification_version: 4
129
+ summary: Chromium Browser - Glimmer Custom Widget
130
+ test_files: []