macgap 0.0.6 → 0.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (4) hide show
  1. data/README.md +5 -1
  2. data/bin/macgap +7 -1
  3. data/macgap.gemspec +1 -1
  4. metadata +1 -1
data/README.md CHANGED
@@ -25,4 +25,8 @@ Or a more advanced example:
25
25
 
26
26
  macgap build --name MyApp --output ./build ./public
27
27
 
28
- The directory (`DIR`) you specify should contain a file called `index.html` which will be loaded when the application starts.
28
+ The directory (`DIR`) you specify should contain a file called `index.html` which will be loaded when the application starts.
29
+
30
+ # Icon
31
+
32
+ If the your application's root directory contains a file called `application.png`, that'll be used as the application's icon.
data/bin/macgap CHANGED
@@ -74,9 +74,15 @@ FileUtils.cd build_dir.join("Contents") do
74
74
  build_public_dir = build_dir.join("Resources", "public")
75
75
  FileUtils.rm_rf build_public_dir
76
76
  FileUtils.cp_r(public_dir, build_public_dir)
77
+
78
+ png_icon_path = public_dir.join("application.png")
79
+ icon_path = public_dir.join("application.icns")
80
+
81
+ if png_icon_path.exist?
82
+ `sips -s format icns #{png_icon_path} --out #{icon_path}`
83
+ end
77
84
 
78
85
  # Copy over icon
79
- icon_path = public_dir.join("application.icns")
80
86
  if icon_path.exist?
81
87
  FileUtils.cp_r(
82
88
  icon_path,
@@ -3,7 +3,7 @@ $:.push File.expand_path("../lib", __FILE__)
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "macgap"
6
- s.version = "0.0.6"
6
+ s.version = "0.0.7"
7
7
  s.authors = ["Alex MacCaw"]
8
8
  s.email = ["info@eribium.org"]
9
9
  s.homepage = "http://github.com/maccman/macgap-rb"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: macgap
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: