• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
RE : How are we supposed to retrieve the generic bundle icon?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE : How are we supposed to retrieve the generic bundle icon?


  • Subject: RE : How are we supposed to retrieve the generic bundle icon?
  • From: John Joyce <email@hidden>
  • Date: Tue, 11 Nov 2008 22:07:17 -0600


On Nov 11, 2008, at 4:29 PM, email@hidden wrote:

Subject: Re: RE : How are we supposed to retrieve the generic bundle
	icon?
To: Iceberg-Dev <email@hidden>
Cc: email@hidden
Message-ID:
	<email@hidden>
Content-Type: text/plain; charset=ISO-8859-1

On Tue, Nov 11, 2008 at 2:50 PM, Iceberg-Dev <email@hidden> wrote:
Standard Apple Plugins that use this icon. Yes, I'm sure.

Are you attempting to use this icon for your own purposes, like plugins for your own app? If so, Apple used to provide a set of icon templates in Photoshop format that you can customize and associate with your app's own plugin bundle UTI. You can find a copy of it at http://www.cocoadev.com/index.pl?AquaIconKit . It only contains templates up to 128x128, but you can scale up the 128x128 template to 512x512 to get the layout right, then apply your customizations on top of the 512x512 image from the standard bundle icns file.

--Kyle Sluder


Better than that, every OS X system has all the icons you'll need to get started.
Here's a bit of Ruby that will help you get all the icons you need to adjust...
(it's not clean or pretty, but it worked for me for what I needed. You may need to escape spaces in file/dir names...
CoreServices is the source of a large number of icons...
sips is an osx command line tool with an undocumented ability to convert icns files to image formats...)


# script to get icon files from mac os x apps!
# by John Joyce
# you can modify and toy with it as needed...

puts "enter the source directory:"
source_dir = gets.chomp
source_dir = File.expand_path source_dir
# Check for source_dir existence?
puts "Source,"
if File.exists? source_dir
  puts "...exists"
  if File.directory? source_dir
    puts "...is a directory"
  end
  puts "#{source_dir} is valid..."
else
  puts "#{source_dir} does not exist. Check the spelling...?"
  exit
end
# source_dir.gsub!(' ','\ ')


Dir.chdir(source_dir) file_array = Dir.glob('*') icns_array = []

if file_array.length > 0
  puts "files here: #{file_array.length}"
  file_array.each do |e|
    if File.extname( e ) == '.icns'
      puts "#{e} is an icon"
      icns_array << e
    end
  end
  puts "icns files: #{icns_array.length}"
  puts icns_array.inspect
else
  puts "nothing in #{source_dir}"
  exit
end

if icns_array.length > 0

puts "enter the destination directory:"
destination_dir = gets.chomp
destination_dir = File.expand_path destination_dir
# Check for destination_dir existence?
puts "Destination,"
if File.exists? destination_dir and File.directory? destination_dir
# Check for ending '/' or not
if destination_dir[destination_dir.length - 1, destination_dir.length] != '/'
destination_dir += '/'
end
puts "#{destination_dir} is valid..."
puts "directory named Images-from-icons will be created..."
new_dir = "Images-from-icons-" + Time.now.strftime("%Y-%m-%d-%H%M %S") + "/"
new_dir = destination_dir + new_dir
Dir.mkdir(new_dir)
else
puts "#{destination_dir} does not exist. Check the spelling...?"
exit
end



icns_array.each do |e| if File.extname( e ) == '.icns' e_name = e.gsub('.icns','') `sips -s format png #{e} --out #{new_dir}#{e_name}.png` end #if end #.each

else
  puts "no .icns files in #{source_dir}"
end
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: RE : How are we supposed to retrieve the generic bundle icon?
      • From: "Kyle Sluder" <email@hidden>
  • Prev by Date: Re: Async alert
  • Next by Date: Cocoaheads Lake Forest (92630) meeting 11/12/2008 at 7 pm on "Using and optimizing Core Data in a commercial application"
  • Previous by thread: Re: tableView:objectValueForTableColumn:row not being called
  • Next by thread: Re: RE : How are we supposed to retrieve the generic bundle icon?
  • Index(es):
    • Date
    • Thread