[Gpg4win-commits] r607 - in trunk: . src

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Mon Nov 26 17:16:22 CET 2007


Author: marcus
Date: 2007-11-26 17:16:22 +0100 (Mon, 26 Nov 2007)
New Revision: 607

Modified:
   trunk/ChangeLog
   trunk/src/inst-dirmngr.nsi
   trunk/src/inst-sections.nsi
   trunk/src/make-msi.bat
   trunk/src/make-msi.guids
   trunk/src/make-msi.pl
Log:
2007-11-26  Marcus Brinkmann  <marcus at g10code.de>

	* src/inst-dirmngr.nsi: No longer create the cache directory.
	* src/inst-sections.pl: Correct upper/lowercase of WinPT link (for
	the msi converter).
	* src/make-msi.pl: Improve handling of shortcuts.
	* src/make-msi.guids: Update.
	* src/make-msi.bat: Remove duplicate entries.


Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog	2007-11-26 14:53:39 UTC (rev 606)
+++ trunk/ChangeLog	2007-11-26 16:16:22 UTC (rev 607)
@@ -1,3 +1,12 @@
+2007-11-26  Marcus Brinkmann  <marcus at g10code.de>
+
+	* src/inst-dirmngr.nsi: No longer create the cache directory.
+	* src/inst-sections.pl: Correct upper/lowercase of WinPT link (for
+	the msi converter).
+	* src/make-msi.pl: Improve handling of shortcuts.
+	* src/make-msi.guids: Update.
+	* src/make-msi.bat: Remove duplicate entries.
+
 2007-11-26  Werner Koch  <wk at g10code.com>
 
 	* src/inst-kleopatra.nsi: Install libkmime.dll.  Take libkleo from
@@ -6,6 +15,10 @@
 
 2007-11-26  Marcus Brinkmann  <marcus at g10code.de>
 
+	* src/inst-dirmngr.nsi: No longer create the cache directory.
+
+	* src/make-msi.pl: 
+
 	* packages/packages.current: Fix entry for kdelibs source.
 
 	* src/make-msi.pl (dump_all): Start dirmngr service.

Modified: trunk/src/inst-dirmngr.nsi
===================================================================
--- trunk/src/inst-dirmngr.nsi	2007-11-26 14:53:39 UTC (rev 606)
+++ trunk/src/inst-dirmngr.nsi	2007-11-26 16:16:22 UTC (rev 607)
@@ -55,11 +55,6 @@
 
   SetOutPath "$INSTDIR"
 
-  # We need to create the cache directory, as this is not
-  # automatically created by dirmngr.  Actually, the default should be
-  # different.  FIXME.
-  CreateDirectory "$INSTDIR\cache"
-
   StrCmp $DirMngrStatus "MISSING" 0 dirmngr_created
     # Create the service.
     g4wihelp::service_create "DirMngr" "DirMngr" \

Modified: trunk/src/inst-sections.nsi
===================================================================
--- trunk/src/inst-sections.nsi	2007-11-26 14:53:39 UTC (rev 606)
+++ trunk/src/inst-sections.nsi	2007-11-26 16:16:22 UTC (rev 607)
@@ -882,8 +882,8 @@
     IntOp $R0 $R0 & ${SF_SELECTED} 
     IntCmp $R0 ${SF_SELECTED} 0 no_winpt_menu 
     CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\WinPT.lnk" \
-	"$INSTDIR\winpt.exe" \
-        "" "$INSTDIR\winpt.exe" "" SW_SHOWNORMAL "" $(DESC_Menu_winpt)
+	"$INSTDIR\WinPT.exe" \
+        "" "$INSTDIR\WinPT.exe" "" SW_SHOWNORMAL "" $(DESC_Menu_winpt)
    no_winpt_menu:
 !endif
 

Modified: trunk/src/make-msi.bat
===================================================================
--- trunk/src/make-msi.bat	2007-11-26 14:53:39 UTC (rev 606)
+++ trunk/src/make-msi.bat	2007-11-26 16:16:22 UTC (rev 607)
@@ -25,6 +25,3 @@
 
 %WIXPATH%\candle.exe %FILE%
 %WIXPATH%\light.exe -ext WixUIExtension -cultures:%LANG% %FILE%obj
-
-%WIXPATH%\candle.exe %FILE%
-%WIXPATH%\light.exe -ext WixUIExtension -cultures:%LANG% %FILE%obj

Modified: trunk/src/make-msi.guids
===================================================================
--- trunk/src/make-msi.guids	2007-11-26 14:53:39 UTC (rev 606)
+++ trunk/src/make-msi.guids	2007-11-26 16:16:22 UTC (rev 607)
@@ -2,6 +2,7 @@
 c98dadcc-b796-41cf-aff2-bfa1706a5a6f /PRODUCT/1.9.0.581
 06b9c50c-352a-4fe2-9f47-4f6348d9dda4 /PRODUCT/1.9.0.587
 b3ce3cd9-0436-4348-8c09-106163ad9170 /PRODUCT/1.9.0.595
+e34a3f68-c604-4029-99dc-5c4822556934 /PRODUCT/1.9.0.600
 fb54db39-2456-4fcc-9550-2790db663015 /REGISTRY/HKLM/Software\GNU\GnuPG/Install Directory
 ad23691b-1734-4dec-b91a-d4ff286190ea /REGISTRY/HKLM/Software\GNU\GnuPG/gpgProgram
 e0807a2f-4e70-48f8-b047-c5d3e219c3e7 /UPGRADE/1

Modified: trunk/src/make-msi.pl
===================================================================
--- trunk/src/make-msi.pl	2007-11-26 14:53:39 UTC (rev 606)
+++ trunk/src/make-msi.pl	2007-11-26 16:16:22 UTC (rev 607)
@@ -224,20 +224,29 @@
 {
     my ($parser, $file, $expr) = @_;
     my $val = $expr;
+    my $iter = 0;
 
-    # Resolve outer double quotes, if any.
-    if ($val =~ m/^\$\((.*)\)$/)
+    while ($val =~ m/\$\((.*)\)/)
     {
+	my $var = $1;
+
 	if (exists $parser->{po}->{$::lang}->{$1})
 	{
-	    $val = $parser->{po}->{$::lang}->{$1};
+	    my $subst = $parser->{po}->{$::lang}->{$1};
+	    $val =~ s/\$\($var\)/$subst/g;
 	}
 	else
 	{
 	    fail "$file:$.: no translation for $val to language $::lang";
 	}
+	$iter++;
+	if ($iter > 100)
+	{
+	    fail "$file:$.: too deep nesting of translations";
+	}
     }
 
+    # Resolve outer double quotes, if any.
     $val =~ s/^"(.*)"$/$1/;
     $val =~ s/\$\r/\r/g;
     $val =~ s/\$\n/\n/g;
@@ -806,11 +815,16 @@
 
 	    # Take the base name of the link.  */
 	    $link =~ s/^.*\\([^\\]*)\"$/$1/;
+	    $link =~ s/\.lnk$//;
 
 	    my $target = nsis_eval ($parser, $file, $args[1]);
 	    $target =~ s/^\$INSTDIR\\//;
 
-	    my $icon = nsis_eval ($parser, $file, $args[3]);
+	    my $icon = $args[3];
+	    $icon =~ s/^"(.*)"$/$1/;
+	    $icon =~ s/^\$INSTDIR\\/[INSTDIR]/;
+	    $icon = nsis_eval ($parser, $file, $icon);
+
 	    my $icon_idx = nsis_eval ($parser, $file, $args[4]);
 	    fail "$file:$.: not supported" if ($icon_idx ne '');
 
@@ -1085,13 +1099,47 @@
 	    # Create shortcuts.
 	    if (defined $parser->{shortcuts}->{$targetfull})
 	    {
-		# FIXME: Use shortcut info.
+		my $shortcut = $parser->{shortcuts}->{$targetfull};
+		my $extra = '';
+
+		if (exists $shortcut->{description})
+		{
+		    my $desc = nsis_translate ($parser, '',
+					       $shortcut->{description});
+		    $extra .= " Description='$desc'";
+		}
+# FIXME: WiX wants the icon to be known at compile time, so it needs a
+# source file, not a target file name.
+#		if ($shortcut->{icon} ne '')
+#		{
+#		    $extra .= " Icon='sm_$pkg->{name}_${fileidx}_icon'";
+#		}
+
+		# FIXME: Note that the link name should better not
+		# change, or it is not correctly replaced on updates.
+		my $link = nsis_translate ($parser, '', $shortcut->{link});
 		print ' ' x $::level
 		    . "    <Shortcut Id='sm_$pkg->{name}_$fileidx' "
-		    . "Directory='ProgramMenuDir' Name='$file->{target}'/>\n";
+		    . "Directory='ProgramMenuDir' Name='$link'"
+		    . $extra;
 
+#		if ($shortcut->{icon} eq '')
+#		{
+		    print "/>\n";
+#		}
+#		else
+#		{
+#		    print ">\n";
+#		    print ' ' x $::level
+#			. "      <Icon Id='sm_$pkg->{name}_${fileidx}_icon' "
+#			. "SourceFile='$shortcut->{icon}'/>\n";
+#		    print ' ' x $::level
+#			. "    </Shortcut>\n";
+#		}
+
+# Can't make these optional, so we don't do this.
 #		print ' ' x $::level
-#                   . "    <Shortcut Id='sm_$pkg->{name}_$fileidx' "
+#                   . "    <Shortcut Id='dt_$pkg->{name}_$fileidx' "
 #		    . "Directory='DesktopFolder' Name='$file->{target}'/>\n";
 	    }
 



More information about the Gpg4win-commits mailing list