From f030ac21740487451ecf7a45c7f46fb9aa637eca Mon Sep 17 00:00:00 2001 From: Jakub Steiner Date: Tue, 25 Aug 2009 23:49:30 +0200 Subject: this isnt gonna work --- build/index.theme.in | 305 --------------------------------------------------- create-icon-theme.rb | 22 +++- 2 files changed, 21 insertions(+), 306 deletions(-) delete mode 100644 build/index.theme.in diff --git a/build/index.theme.in b/build/index.theme.in deleted file mode 100644 index 18d501935..000000000 --- a/build/index.theme.in +++ /dev/null @@ -1,305 +0,0 @@ -[Icon Theme] -_Name=Mango -_Comment=Default GNOME theme. -Inherits=Tango,oxygen - -Directories=256x256/actions,256x256/apps,256x256/categories,256x256/devices,256x256/mimetypes,256x256/places,256x256/status,48x48/actions,48x48/animations,48x48/apps,48x48/categories,48x48/devices,48x48/emblems,48x48/emotes,48x48/mimetypes,48x48/places,48x48/status,32x32/actions,32x32/animations,32x32/apps/,32x32/categories,32x32/devices,32x32/emblems,32x32/emotes,32x32/mimetypes,32x32/places,32x32/status,24x24/actions,24x24/animations,24x24/apps,24x24/categories,24x24/devices,24x24/emblems,24x24/emotes,24x24/mimetypes,24x24/places,24x24/status,22x22/actions,22x22/animations,22x22/apps,22x22/categories,22x22/devices,22x22/emblems,22x22/emotes,22x22/mimetypes,22x22/places,22x22/status,16x16/actions,16x16/animations,16x16/apps,16x16/categories,16x16/devices,16x16/emblems,16x16/emotes,16x16/mimetypes,16x16/places,16x16/status - -[256x256/actions] -Size=256 -Context=Actions -Type=Scalable -MinSize=49 -MaxSize=256 - -[256x256/apps] -Size=256 -Context=Applications -Type=Scalable -MinSize=49 -MaxSize=256 - -[256x256/categories] -Size=256 -Context=Categories -Type=Scalable -MinSize=49 -MaxSize=256 - -[256x256/devices] -Size=256 -Context=Devices -Type=Scalable -MinSize=49 -MaxSize=256 - -[256x256/mimetypes] -Size=256 -Context=MimeTypes -Type=Scalable -MinSize=49 -MaxSize=256 - -[256x256/places] -Size=256 -Context=Places -Type=Scalable -MinSize=49 -MaxSize=256 - -[256x256/status] -Size=256 -Context=Status -Type=Scalable -MinSize=49 -MaxSize=256 - -[48x48/actions] -Size=48 -Context=Actions -Type=Fixed - -[48x48/animations] -Size=48 -Context=Animations -Type=Fixed - -[48x48/apps] -Size=48 -Context=Applications -Type=Fixed - -[48x48/categories] -Size=48 -Context=Categories -Type=Fixed - -[48x48/devices] -Size=48 -Context=Devices -Type=Fixed - -[48x48/emblems] -Size=48 -Context=Emblems -Type=Fixed - -[48x48/emotes] -Size=48 -Context=Emotes -Type=Fixed - -[48x48/mimetypes] -Size=48 -Context=MimeTypes -Type=Fixed - -[48x48/places] -Size=48 -Context=Places -Type=Fixed - -[48x48/status] -Size=48 -Context=Status -Type=Fixed - -[32x32/actions] -Size=32 -Context=Actions -Type=Fixed - -[32x32/animations] -Size=32 -Context=Animations -Type=Fixed - -[32x32/apps] -Size=32 -Context=Applications -Type=Fixed - -[32x32/categories] -Size=32 -Context=Categories -Type=Fixed - -[32x32/devices] -Size=32 -Context=Devices -Type=Fixed - -[32x32/emblems] -Size=32 -Context=Emblems -Type=Fixed - -[32x32/emotes] -Size=32 -Context=Emotes -Type=Fixed - -[32x32/mimetypes] -Size=32 -Context=MimeTypes -Type=Fixed - -[32x32/places] -Size=32 -Context=Places -Type=Fixed - -[32x32/status] -Size=32 -Context=Status -Type=Fixed - -[24x24/actions] -Size=24 -Context=Actions -Type=Fixed - -[24x24/animations] -Size=24 -Context=Animations -Type=Fixed - -[24x24/apps] -Size=24 -Context=Applications -Type=Fixed - -[24x24/categories] -Size=24 -Context=Categories -Type=Fixed - -[24x24/devices] -Size=24 -Context=Devices -Type=Fixed - -[24x24/emblems] -Size=24 -Context=Emblems -Type=Fixed - -[24x24/emotes] -Size=24 -Context=Emotes -Type=Fixed - -[24x24/mimetypes] -Size=24 -Context=MimeTypes -Type=Fixed - -[24x24/places] -Size=24 -Context=Places -Type=Fixed - -[24x24/status] -Size=24 -Context=Status -Type=Fixed - -[22x22/actions] -Size=22 -Context=Actions -Type=Fixed - -[22x22/animations] -Size=22 -Context=Animations -Type=Fixed - -[22x22/apps] -Size=22 -Context=Applications -Type=Fixed - -[22x22/categories] -Size=22 -Context=Categories -Type=Fixed - -[22x22/devices] -Size=22 -Context=Devices -Type=Fixed - -[22x22/emblems] -Size=22 -Context=Emblems -Type=Fixed - -[22x22/emotes] -Size=22 -Context=Emotes -Type=Fixed - -[22x22/mimetypes] -Size=22 -Context=MimeTypes -Type=Fixed - -[22x22/places] -Size=22 -Context=Places -Type=Fixed - -[22x22/status] -Size=22 -Context=Status -Type=Fixed - -[16x16/actions] -Size=16 -Context=Actions -Type=Fixed - -[16x16/animations] -Size=16 -Context=Animations -Type=Fixed - -[16x16/apps] -Size=16 -Context=Applications -Type=Fixed - -[16x16/categories] -Size=16 -Context=Categories -Type=Fixed - -[16x16/devices] -Size=16 -Context=Devices -Type=Fixed - -[16x16/emblems] -Size=16 -Context=Emblems -Type=Fixed - -[16x16/emotes] -Size=16 -Context=Emotes -Type=Fixed - -[16x16/mimetypes] -Size=16 -Context=MimeTypes -Type=Fixed - -[16x16/places] -Size=16 -Context=Places -Type=Fixed - -[16x16/status] -Size=16 -Context=Status -Type=Fixed diff --git a/create-icon-theme.rb b/create-icon-theme.rb index 70382af99..7e8881028 100755 --- a/create-icon-theme.rb +++ b/create-icon-theme.rb @@ -1,5 +1,6 @@ #!/usr/bin/env ruby require "fileutils" +require "find" if (ARGV[0].nil?) #render all SVGs puts "Usage: #{$0} [icon theme directory]" @@ -8,7 +9,8 @@ end THEME_NAME=ARGV[0] THEME_COMMENT="#{THEME_NAME} Icon Theme" -OUTPUT="#{Dir.pwd}/output/#{THEME_NAME}" +CWD=Dir.pwd +OUTPUT="#{CWD}/output/#{THEME_NAME}" FileUtils.rm_rf OUTPUT FileUtils.mkdir_p OUTPUT @@ -16,3 +18,21 @@ FileUtils.mkdir_p OUTPUT puts "Creating icon theme in #{OUTPUT}" puts "Copying build files.." FileUtils.cp_r Dir.glob("build/*"), OUTPUT + +#echo -e "[Icon Theme]\nName=$THEME_NAME\nComment=$THEME_COMMENT\n" > index.theme + +meta = File.new("#{OUTPUT}/index.theme.in","w+") +meta.puts "[Icon Theme]\n_Name=#{THEME_NAME}\n_Comment=#{THEME_COMMENT}" +meta.puts "Inherits=Tango,Oxygen" +meta.print "Directories=" +#Dir.open(THEME_NAME).each do |path| + +Dir.chdir(THEME_NAME) +Find.find(".") do |path| + if (File.directory?(path)) + dir = path.gsub(/^\.\//,'') + meta.print "#{dir}," unless !dir.match('/') + end +end + +meta.close -- cgit v1.2.1