Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Mac bundling now working

  • Loading branch information...
commit c06d6271db97c3fc0f0ff56abc72e9ac02210bc2 1 parent 0f73eb5
@maccman authored
View
4 assets/osx/Info.plist.erb
@@ -5,7 +5,7 @@
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleExecutable</key>
- <string><%= config_path %></string>
+ <string><%= config_name %></string>
<key>CFBundleIconFile</key>
<string><%= config_icon %></string>
<key>CFBundleIdentifier</key>
@@ -20,8 +20,6 @@
<string>WRUN</string>
<key>CFBundleVersion</key>
<string>0.8.0</string>
- <key>NSPrincipalClass</key>
- <string>NSApplication</string>
<key>CFBundleDocumentTypes</key>
<array>
<dict>
View
BIN  assets/osx/bowline.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
27 lib/bowline/tasks/app.rake
@@ -2,12 +2,7 @@ require 'fileutils'
require 'erb'
require 'rbconfig'
-namespace :app do
- desc "Build app"
- task :build do
- Rake::Task["build:#{Bowline::Platform.type}"].invoke
- end
-
+namespace :app do
namespace :build do
task :osx => :environment do
if RUBY_VERSION == "1.9.1"
@@ -26,11 +21,11 @@ namespace :app do
config = Bowline.configuration
assets_path = File.join(Bowline.assets_path, "osx")
build_path = File.join(APP_ROOT, "build")
- app_path = File.join(build_path, "#{config.name}.app", "Contents")
+ app_path = File.join(build_path, "#{config.name}.app")
FileUtils.rm_rf(app_path)
- FileUtils.mkdir_p(app_path)
- FileUtils.cd(app_path) do
- config_path = config.name + " ../Resources"
+ contents_path = File.join(app_path, "Contents")
+ FileUtils.mkdir_p(contents_path)
+ FileUtils.cd(contents_path) do
config_name = config.name
config_id = config.id
config_icon = "#{config.name}.icns"
@@ -45,8 +40,9 @@ namespace :app do
# Make icon
makeicns = File.join(assets_path, "makeicns")
+ config.icon ||= File.join(assets_path, "bowline.png")
makeicns_in = File.join(APP_ROOT, config.icon)
- makeicns_out = File.join("English.lproj", config_icon)
+ makeicns_out = File.expand_path(File.join("English.lproj", config_icon))
`#{makeicns} -in #{makeicns_in} -out #{makeicns_out}`
# Copy App
@@ -67,7 +63,7 @@ namespace :app do
end
# Copy RB libs
- ruby_dir = File.join("vendor", "ruby", RUBY_VERSION)
+ ruby_dir = File.join("vendor", "ruby")
FileUtils.mkdir_p(ruby_dir)
FileUtils.cp_r(ruby_lib_dir, ruby_dir)
end
@@ -76,6 +72,8 @@ namespace :app do
FileUtils.mkdir("MacOS")
FileUtils.cp(File.expand_path("~/bowline-desktop/bowline-desktop"), File.join("MacOS", config.name))
end
+ FileUtils.chmod_R(0755, app_path)
+ FileUtils.chmod(0644, File.join(contents_path, "Info.plist"))
end
task :linux => :environment do
@@ -88,4 +86,9 @@ namespace :app do
raise "Unimplemented"
end
end
+
+ desc "Build app"
+ task :build do
+ Rake::Task["app:build:#{Bowline::Platform.type}"].invoke
+ end
end
Please sign in to comment.
Something went wrong with that request. Please try again.