macgap 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +5 -1
- data/bin/macgap +7 -1
- data/macgap.gemspec +1 -1
- 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,
|
data/macgap.gemspec
CHANGED