Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

per isaac, add agent support (no dock icon)

  • Loading branch information...
commit 157b025d328b27c7b55fd24453b1625dc6db1b9b 1 parent 415c9b9
@richkilmer authored
Showing with 6 additions and 2 deletions.
  1. +6 −2 lib/hotcocoa/application_builder.rb
View
8 lib/hotcocoa/application_builder.rb
@@ -8,7 +8,7 @@ class ApplicationBuilder
class Configuration
- attr_reader :name, :identifier, :version, :icon, :resources, :sources, :info_string, :load
+ attr_reader :name, :identifier, :version, :icon, :resources, :sources, :info_string, :load, :agent
def initialize(file)
require 'yaml'
@@ -22,6 +22,7 @@ def initialize(file)
@sources = yml["sources"] || []
@resources = yml["resources"] || []
@overwrite = yml["overwrite"] == true ? true : false
+ @agent = yml["agent"] == true ? "1" : "0"
end
def overwrite?
@@ -36,7 +37,7 @@ def icon_exist?
ApplicationBundlePackage = "APPL????"
- attr_accessor :name, :identifier, :load_file, :sources, :overwrite, :icon, :version, :info_string, :resources, :deploy
+ attr_accessor :name, :identifier, :load_file, :sources, :overwrite, :icon, :version, :info_string, :resources, :deploy, :agent
def self.build(config, options={:deploy => false})
if !config.kind_of?(Configuration) || !$LOADED_FEATURES.detect {|f| f.include?("standard_rake_tasks")}
@@ -54,6 +55,7 @@ def self.build(config, options={:deploy => false})
builder.version = config.version
builder.info_string = config.info_string
builder.overwrite = config.overwrite?
+ builder.agent = config.agent
config.sources.each do |source|
builder.add_source_path source
end
@@ -197,6 +199,8 @@ def write_info_plist_file
f.puts %{ <string>#{version}</string>}
f.puts %{ <key>NSPrincipalClass</key>}
f.puts %{ <string>NSApplication</string>}
+ f.puts %{ <key>LSUIElement</key>}
+ f.puts %{ <string>#{agent}</string>}
f.puts %{</dict>}
f.puts %{</plist>}
end
Please sign in to comment.
Something went wrong with that request. Please try again.