[maemo-commits] [maemo-commits] r8527 - in projects/haf/trunk/hildon-theme-tools: . scripts src

From: www-data at stage.maemo.org www-data at stage.maemo.org
Date: Fri Dec 1 13:30:40 EET 2006
Author: mdk
Date: 2006-12-01 13:30:38 +0200 (Fri, 01 Dec 2006)
New Revision: 8527

Added:
   projects/haf/trunk/hildon-theme-tools/scripts/hildon-theme-mk-bundle
   projects/haf/trunk/hildon-theme-tools/scripts/hildon-theme-rc-parser
   projects/haf/trunk/hildon-theme-tools/scripts/hildon-theme-subst
Removed:
   projects/haf/trunk/hildon-theme-tools/scripts/hildon-theme-install
   projects/haf/trunk/hildon-theme-tools/src/hildon-theme-mk-bundle
   projects/haf/trunk/hildon-theme-tools/src/hildon-theme-rc-parser
   projects/haf/trunk/hildon-theme-tools/src/hildon-theme-subst
Modified:
   projects/haf/trunk/hildon-theme-tools/ChangeLog
   projects/haf/trunk/hildon-theme-tools/scripts/Makefile.am
   projects/haf/trunk/hildon-theme-tools/src/Makefile.am
Log:
Moving scripts from /src to /scripts.


Modified: projects/haf/trunk/hildon-theme-tools/ChangeLog
===================================================================
--- projects/haf/trunk/hildon-theme-tools/ChangeLog	2006-12-01 11:22:31 UTC (rev 8526)
+++ projects/haf/trunk/hildon-theme-tools/ChangeLog	2006-12-01 11:30:38 UTC (rev 8527)
@@ -1,3 +1,13 @@
+2006-12-01  Michael Dominic Kostrzewa  <michael.kostrzewa at nokia.com> 
+
+	* scripts/Makefile.am:
+	* src/Makefile.am:
+	* src/hildon-theme-mk-bundle:
+	* src/hildon-theme-rc-parser:
+	* src/hildon-theme-subst: Moving scripts from /src to /scripts.
+
+	* scripts/hildon-theme-install: Removing.
+	
 2006-12-01  Michael Dominic K.  <mdk at mdk.am> 
 
 	* src/Makefile.am:

Modified: projects/haf/trunk/hildon-theme-tools/scripts/Makefile.am
===================================================================
--- projects/haf/trunk/hildon-theme-tools/scripts/Makefile.am	2006-12-01 11:22:31 UTC (rev 8526)
+++ projects/haf/trunk/hildon-theme-tools/scripts/Makefile.am	2006-12-01 11:30:38 UTC (rev 8527)
@@ -1,3 +1,5 @@
-dist_bin_SCRIPTS 		= hildon-theme-install
+dist_bin_SCRIPTS 		= hildon-theme-subst 		\
+				  hildon-theme-mk-bundle 	\
+				  hildon-theme-rc-parser
 
 MAINTAINERCLEANFILES 		= Makefile.in

Deleted: projects/haf/trunk/hildon-theme-tools/scripts/hildon-theme-install
===================================================================
--- projects/haf/trunk/hildon-theme-tools/scripts/hildon-theme-install	2006-12-01 11:22:31 UTC (rev 8526)
+++ projects/haf/trunk/hildon-theme-tools/scripts/hildon-theme-install	2006-12-01 11:30:38 UTC (rev 8527)
@@ -1,217 +0,0 @@
-#! /usr/bin/perl
-
-# This program installs a hildon theme into a directory.  The theme is
-# created based on a 'layout' and on a template image.
-#
-# The following options are accepted:
-#
-#   --layout DIR
-#
-#   The layout is defined by the files in DIR.  More details are below.
-#
-#   --theme DIR
-#
-#   The theme is installed into DIR, typically /usr/share/themes/<name>.
-#
-#   --destdir DIR
-#
-#   The additional destination directory prefix, for use during
-#   staged installs.  Defaults to empty.
-#
-#   --template FILE
-#
-#   The individual theme images are cut out from FILE.
-#
-#   --name STRING
-#
-#   The name of the theme for the UI.
-
-use Getopt::Long;
-use File::Basename;
-
-GetOptions ( "layout=s" => \$layoutdir,
-	     "theme=s" => \$themedir,
-	     "destdir=s" => \$destdir,
-             "template=s" => \$template,
-             "name=s" => \$name ) or die;
-
-if ($themedir eq "" or $layoutdir eq "" or $template eq "")
-{
-    die "usage: hildon-theme-install --layout DIR --theme DIR --template FILE\n";
-}
-
-if ($name eq "")
-{
-    $name = basename(dirname(($themedir . '/crap')));
-    # XXX See comment below
-}
-
-%substitutions = 
-    ( qw{@ThemeName@} => $name,
-      qw{@ThemeDir@} => $themedir,
-      qw{@ThemeDirBaseName@} => basename(dirname($themedir . '/crap')));
-      # XXX Broken perl? basename(/foo/bar/) returns NULL while basename(/foo/bar) returns bar
-
-sub do_substitutions
-{
-    my $line = $_[0];
-    foreach $pat (keys(%substitutions))
-    {
-	$subst = $substitutions{$pat};
-	$line =~ s/$pat/$subst/g;
-    }
-    return $line;
-}
-
-sub process_gtkrc
-{
-    my $source = "$layoutdir/$_[0]";
-    my $file;
-
-    open ($file, "< $source");
-    
-    while (<$file>)
-    {
-	if (/^include "(.*)"$/)
-	{
-	    process_gtkrc ($1);
-	}
-	else
-	{
-	    print TARGET do_substitutions ($_);
-	}
-    }
-    close ($file);
-}
-
-sub install_gtkrc
-{
-    my $name = $_[0];
-    my $target = "$destdir/$themedir/gtk-2.0/$name";
-
-    mkdir ("$destdir/$themedir/gtk-2.0/");
-
-    print STDERR "Installing $name\n";
-
-    open (TARGET, "> $target") or die;
-    process_gtkrc ($name);
-    close (TARGET);
-}
-
-sub install_file
-{
-    my $name = $_[0];
-    my $dir = $_[1];
-    my $source = "$layoutdir/$name";
-    my $target = "$destdir/$themedir/$dir/$name";
-
-    print STDERR "Installing $name\n";
-
-    open (TARGET, "> $target") or die;
-    open (SOURCE, "< $source") or die;
-
-    while (<SOURCE>)
-    {
-	print TARGET do_substitutions ($_);
-    }
-	
-    close (SOURCE);
-    close (TARGET);
-}
-
-sub cut_images
-{
-        print "Cutting...\n";
-        `hildon-theme-slicer $layoutdir/layout.txt $template $destdir/$themedir/images`;
-        print "Done!\n";
-}
-
-sub add_color_substitutions
-{
-    # Get some default values in
-
-    $substitutions{qw{@DefaultTextColor@}}        = "#303030";
-    $substitutions{qw{@EmpTextColor@}}            = "#003F93";
-    $substitutions{qw{@PaintedDefaultTextColor@}} = "#003F93";
-    $substitutions{qw{@DisabledTextColor@}}       = "#808080";
-    $substitutions{qw{@ProgressTextColor1@}}      = "#000000";
-    $substitutions{qw{@ProgressTextColor2@}}      = "#000000";
-    $substitutions{qw{@SecondaryTextColor@}}      = "#5A5A5A";
-    $substitutions{qw{@TitleTextColor@}}          = "#303030";
-    $substitutions{qw{@DialogTitleTextColor@}}    = "#303030";
-
-    $substitutions{qw{@ClearButtonTextColor@}}    = "#FF3200";
-    $substitutions{qw{@MemButtonTextColor@}}      = "#2B28AF";
-
-    $substitutions{qw{@HWRAlphaTextColor@}}       = "#303030";
-    $substitutions{qw{@HWRNumberTextColor@}}      = "#333399";
-    $substitutions{qw{@HWRDimmedTextColor@}}      = "#808080";
-    $substitutions{qw{@HWRIllegalTextColor@}}     = "#FF0033";
-
-    $substitutions{qw{@WebTextColor@}}            = "#303030";
-    $substitutions{qw{@DimWebTextColor@}}         = "#808080";
-    $substitutions{qw{@LinkTextColor@}}           = "#2B28AF";
-    $substitutions{qw{@VisitedLinkTextColor@}}    = "#FF3200";
-
-    $substitutions{qw{@DefaultBackgrdColor@}}     = "#FFFFFF";
-    $substitutions{qw{@PaintedBackgrdColor@}}     = "#E2E2E2";
-    $substitutions{qw{@ImageBackgrdColor@}}       = "#000000";
-
-    $substitutions{qw{@InputBackgrdColor@}}       = "#000000";
-    $substitutions{qw{@HWRAlphaBackgrdColor@}}    = "#F4F4F4";
-    $substitutions{qw{@HWRPunctBackgrdColor@}}    = "#FFFFFF";
-    $substitutions{qw{@HWRContBackgrdColor@}}     = "#F4F4F4";
-    $substitutions{qw{@HWRHyphBackgrdColor@}}     = "#D1D1D1";
-
-    $substitutions{qw{@WebBackgrdColor@}}         = "#FFFFFF";
-
-    $substitutions{qw{@ImageBorderColor@}}        = "#CDCDCD";
-    $substitutions{qw{@FocusColor@}}              = "#FFCC00";
-    $substitutions{qw{@SelectionColor@}}          = "#CCCCCC";
-
-    $substitutions{qw{@MapTopLeftColor@}}         = "#CDCDCD";
-    $substitutions{qw{@MapBottomRightColor@}}     = "#CDCDCD";
-    $substitutions{qw{@ClockHandColor@}}          = "#000000";
-
-    $substitutions{qw{@HWRBaselineColor@}}        = "#C2C2C2";
-    $substitutions{qw{@HWRRecogColor@}}           = "#303030";
-    $substitutions{qw{@HWRUserColor@}}            = "#151C53";
-    $substitutions{qw{@HWRUserBackgrdColor@}}     = "#DEE8F3";
-    $substitutions{qw{@HWRHintColor@}}            = "#78B1D2";
-
-    $substitutions{qw{@ChatUserNameColor@}}       = "#000000";
-    $substitutions{qw{@ChatParticipantNameColor@}}= "#003399";
-    $substitutions{qw{@ChatEventColor@}}          = "#33CC00";
-
-    $substitutions{qw{@CallHeaderBlockBgColor@}}  = "#FFFFFF";
-    $substitutions{qw{@CallHeaderOnHoldBlockBgColor@}} = "#FFFFFF";
-	
-    $substitutions{qw{@HomeFrameNormal@}}         = "#00FF00";
-    $substitutions{qw{@HomeFrameResize@}}         = "#0000FF";
-    $substitutions{qw{@HomeFrameReject@}}         = "#FF0033";
-
-    $substitutions{qw{@MenuInfoTextColor@}}       = "#303030";
-
-    $substitutions{qw{@LowLightColor@}}           = "#d4e6fd80";
-    $substitutions{qw{@VKBButtonTextColor@}}      = "#000000";
-
-    # Override with real colors
-   
-    print "Fetching colors...\n";
-    $eval_value =`hildon-theme-colourizer $layoutdir/layout.txt $template`;
-    print $eval_value . "\n";
-    eval $eval_value;
-    print "Done!\n";
-}
-
-cut_images;
-add_color_substitutions;
-
-install_gtkrc ("gtkrc");
-install_gtkrc ("gtkrc.maemo_af_desktop");
-
-mkdir ("$destdir/$themedir/matchbox");
-
-install_file ("theme.xml", "matchbox");
-install_file ("index.theme");
-

Copied: projects/haf/trunk/hildon-theme-tools/scripts/hildon-theme-mk-bundle (from rev 8525, projects/haf/trunk/hildon-theme-tools/src/hildon-theme-mk-bundle)

Copied: projects/haf/trunk/hildon-theme-tools/scripts/hildon-theme-rc-parser (from rev 8492, projects/haf/trunk/hildon-theme-tools/src/hildon-theme-rc-parser)

Copied: projects/haf/trunk/hildon-theme-tools/scripts/hildon-theme-subst (from rev 8492, projects/haf/trunk/hildon-theme-tools/src/hildon-theme-subst)

Modified: projects/haf/trunk/hildon-theme-tools/src/Makefile.am
===================================================================
--- projects/haf/trunk/hildon-theme-tools/src/Makefile.am	2006-12-01 11:22:31 UTC (rev 8526)
+++ projects/haf/trunk/hildon-theme-tools/src/Makefile.am	2006-12-01 11:30:38 UTC (rev 8527)
@@ -3,10 +3,6 @@
 					  hildon-theme-regenerator 	\
 					  hildon-theme-outliner		
 
-dist_bin_SCRIPTS			= hildon-theme-rc-parser	\
-					  hildon-theme-subst		\
-					  hildon-theme-mk-bundle
-
 # Slicer
 hildon_theme_slicer_CFLAGS 		= $(GTK_CFLAGS)
 hildon_theme_slicer_LDADD 		= $(GTK_LIBS)

Deleted: projects/haf/trunk/hildon-theme-tools/src/hildon-theme-mk-bundle
===================================================================
--- projects/haf/trunk/hildon-theme-tools/src/hildon-theme-mk-bundle	2006-12-01 11:22:31 UTC (rev 8526)
+++ projects/haf/trunk/hildon-theme-tools/src/hildon-theme-mk-bundle	2006-12-01 11:30:38 UTC (rev 8527)
@@ -1,63 +0,0 @@
-#! /usr/bin/perl
-
-# GPL license, Copyright (c) 2006 by Nokia Corporation                       
-#                                                                            
-# Authors:                                                                   
-#      Michael Dominic K. <michael.kostrzewa at nokia.com>
-#                                                                            
-# This program is free software; you can redistribute it and/or modify it    
-# under the terms of the GNU General Public License as published by the      
-# Free Software Foundation, version 2.                                                                   
-#                                                                            
-# This program is distributed in the hope that it will be useful, but        
-# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 
-# or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License   
-# for more details.                                                          
-#                                                                            
-# You should have received a copy of the GNU General Public License along    
-# with this program; if not, write to the Free Software Foundation, Inc., 59 
-# Temple Place - Suite 330, Boston, MA 02111-1307, USA.                      
-
-use File::Basename;
-
-sub show_banner 
-{
-        print "Theme bundle tool by Michael Dominic K.\n";
-        print "Copyright 2006 by Nokia Corporation.\n\n";
-}
-
-sub show_usage 
-{
-        my $program_name = basename($0);
-        print "Usage: $program_name <layout name>\n\n";
-        print "This tool will bundle an installed theme layout into\n";
-        print "a portable zip file.\n\n";
-}
-
-# Check if we have enough arguments
-if ($#ARGV + 1 < 1) {
-        show_banner;
-        show_usage ();
-        print STDERR "ERROR: Not enough arguments specified.\n";
-        exit 128;
-}
-
-$layoutdir = `pkg-config --variable=pkgdatadir $ARGV[0]`;
-if ($? != 0) {
-        print STDERR "ERROR: $ARGV[0] layout was not found in pkgconfig.\n";
-        exit 128;
-}
-
-# Try removing the end of lne char
-$layoutdir =~ s/\n//g;
-
-# Remember current directory
-$currentdir = `pwd`;
-$currentdir =~ s/\n//g;
-
-print "Bundling $ARGV[0] to $ARGV[0].tar.gz\n";
-chdir ($layoutdir);
-`tar czf $currentdir/$ARGV[0].tar.gz *`;
-print "Done!\n\n";
-
-exit 0;

Deleted: projects/haf/trunk/hildon-theme-tools/src/hildon-theme-rc-parser
===================================================================
--- projects/haf/trunk/hildon-theme-tools/src/hildon-theme-rc-parser	2006-12-01 11:22:31 UTC (rev 8526)
+++ projects/haf/trunk/hildon-theme-tools/src/hildon-theme-rc-parser	2006-12-01 11:30:38 UTC (rev 8527)
@@ -1,83 +0,0 @@
-#! /usr/bin/perl
-
-# GPL license, Copyright (c) 2006 by Nokia Corporation                       
-#                                                                            
-# Authors:                                                                   
-#      Michael Dominic K. <michael.kostrzewa at nokia.com>
-#      Marius Vollmer <marius.vollmer at nokia.com>
-#                                                                            
-# This program is free software; you can redistribute it and/or modify it    
-# under the terms of the GNU General Public License as published by the      
-# Free Software Foundation, version 2.                                                                   
-#                                                                            
-# This program is distributed in the hope that it will be useful, but        
-# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 
-# or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License   
-# for more details.                                                          
-#                                                                            
-# You should have received a copy of the GNU General Public License along    
-# with this program; if not, write to the Free Software Foundation, Inc., 59 
-# Temple Place - Suite 330, Boston, MA 02111-1307, USA.                      
-
-use File::Basename;
-
-sub show_banner 
-{
-        print "RC processor tool by Michael Dominic K. and Marius Vollmer\n";
-        print "Copyright 2006 by Nokia Corporation.\n\n";
-}
-
-sub show_usage 
-{
-        my $program_name = basename($0);
-        print "Usage: $program_name <input rc file> <output rc file>\n\n";
-        print "This tool will process the supplied input rc file and include all\n";
-        print "the sub-rc files referrenced from it - producing a flat gtkrc.\n\n";
-}
-
-sub process_gtkrc
-{
-        my $file_name = "$_[0]";
-        my $file;
-
-        if (not open ($file, "< $file_name")) {
-                print STDERR "ERROR: Failed to open \"$file_name\" rc file.\n";
-                return 0;
-        }
-    
-        while (<$file>)
-        {
-                if (/^include "(.*)"$/) {
-                        if (not process_gtkrc ($1)) {
-                                print STDERR ("ERROR: Failed to include \"$1\" in \"$file_name\"\n");
-                                return 0;
-                        }
-                } else {
-                        print TARGET $_;
-                }
-        }
-
-        close ($file);
-        return 1;
-}
-
-# Check if we have enough arguments
-if ($#ARGV + 1 < 2) {
-        show_banner;
-        show_usage ();
-        print STDERR "ERROR: Not enough arguments specified.\n";
-        exit 128;
-}
-
-# Open the output file
-if (not open (TARGET, "> $ARGV[1]")) {
-        print STDERR "ERROR: Could not open the output file \"$ARGV[1]\"\n";
-        exit 128;
-}
-
-# Recursively process the rc file
-if (not process_gtkrc ($ARGV[0])) {
-        exit 128;
-} else {
-        exit 0;
-}

Deleted: projects/haf/trunk/hildon-theme-tools/src/hildon-theme-subst
===================================================================
--- projects/haf/trunk/hildon-theme-tools/src/hildon-theme-subst	2006-12-01 11:22:31 UTC (rev 8526)
+++ projects/haf/trunk/hildon-theme-tools/src/hildon-theme-subst	2006-12-01 11:30:38 UTC (rev 8527)
@@ -1,100 +0,0 @@
-#! /usr/bin/perl
-
-# GPL license, Copyright (c) 2006 by Nokia Corporation                       
-#                                                                            
-# Authors:                                                                   
-#      Michael Dominic K. <michael.kostrzewa at nokia.com>
-#                                                                            
-# This program is free software; you can redistribute it and/or modify it    
-# under the terms of the GNU General Public License as published by the      
-# Free Software Foundation, version 2.                                                                   
-#                                                                            
-# This program is distributed in the hope that it will be useful, but        
-# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 
-# or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License   
-# for more details.                                                          
-#                                                                            
-# You should have received a copy of the GNU General Public License along    
-# with this program; if not, write to the Free Software Foundation, Inc., 59 
-# Temple Place - Suite 330, Boston, MA 02111-1307, USA.                      
-
-use File::Basename;
-
-sub show_banner 
-{
-        print "Substitution tool by Michael Dominic K.\n";
-        print "Copyright 2006 by Nokia Corporation.\n\n";
-}
-
-sub show_usage 
-{
-        my $program_name = basename($0);
-        print "Usage: $program_name <layout> <template> <input file> <output file>\n\n";
-        print "This tool will process the supplied input file and substitute\n";
-        print "the color values with real colors fetched from the layout.\n\n";
-}
-
-sub do_substitutions
-{
-        my $line = $_[0];
-        foreach $pat (keys(%substitutions))
-        {
-                $subst = $substitutions{$pat};
-                $line =~ s/$pat/$subst/g;
-        }
-        return $line;
-}
-
-sub process_file
-{
-        my $file_name = "$_[0]";
-        my $file;
-
-        if (not open ($file, "< $file_name")) {
-                print STDERR "ERROR: Failed to open \"$file_name\" rc file.\n";
-                return 0;
-        }
-    
-        while (<$file>)
-        {
-                print TARGET do_substitutions ($_);
-        }
-
-        close ($file);
-        return 1;
-}
-
-# Check if we have enough arguments
-if ($#ARGV + 1 < 4) {
-        show_banner;
-        show_usage ();
-        print STDERR "ERROR: Not enough arguments specified.\n";
-        exit 128;
-}
-
-%substitutions = 
-    ( qw{@ThemeName@} => "ThemeName" );
-
-# Get the colors
-print "Fetching colors...\n";
-$eval_value =`hildon-theme-colourizer $ARGV[0] $ARGV[1]`;
-if ($? != 0) {
-        print STDERR "ERROR: Could not fetch colors\n";
-        exit 128;
-}
-
-eval $eval_value;
-
-# Open the output file
-if (not open (TARGET, "> $ARGV[3]")) {
-        print STDERR "ERROR: Could not open the output file \"$ARGV[3]\"\n";
-        exit 128;
-}
-
-# Process the file
-print "Processing $ARGV[2]...\n";
-if (not process_file ($ARGV[2])) {
-        exit 128;
-} else {
-        exit 0;
-}


More information about the maemo-commits mailing list