Anonymous avatar Anonymous committed 1d014c5

#i10000# build fix

Comments (0)

Files changed (3)

smoketestoo_native/config.pl

 #*************************************************************************
 #
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-# 
+#
 # Copyright 2008 by Sun Microsystems, Inc.
 #
 # OpenOffice.org - a multi-platform office productivity suite
 $cygwin = "cygwin";
 
 if ($^O =~ /cygwin/) {
-	$gui = $cygwin;	
+	$gui = $cygwin;
 }
 
 if (($gui eq "UNX") or ($gui eq $cygwin)) {
 # \user\registry\data\org\openoffice\
 
 $User_Path = "user" . $pathslash  . "registry" . $pathslash . "data" . $pathslash . "org" . $pathslash . "openoffice" . $pathslash;
- 
+
 # \user\registry\data\org\openoffice\Office\
 
 $User_Office_Path = $User_Path . "Office" . $pathslash;
 $setup_XML = "Setup.xcu";
 $oooimprovement_XML = "Settings.xcu";
 
+# $(INPATH)\misc\Common.xcu
+$inpath_Common_XCU = $ENV{INPATH} . $pathslash  . "misc" . $pathslash  .  $common_XML;
+
 ### main ###
 
 $idStr = ' $Revision: 1.5 $ ';
 	chop($ARGV[3]);
 }
 
-if ( ! ( ($#ARGV >= 3) && $ARGV[0] && $ARGV[1] && $ARGV[2] && $ARGV[3] && (-d $ARGV[3]) ) ) {
-    print "Usage: config <basispath> <brandpath> <userinstallpath> <datapath>\n" ;
+if ( ! ( ($#ARGV >= 4) && $ARGV[0] && $ARGV[1] && $ARGV[2] && $ARGV[3] && (-d $ARGV[3]) && $ARGV[4] ) ) {
+    print "Usage: config <basispath> <brandpath> <userinstallpath> <datapath> <buildid>\n" ;
     exit(1);
 }
 
 $branddir = $ARGV[1];
 $userinstalldir = $ARGV[2];
 $datapath = $ARGV[3];
+$buildid  = $ARGV[4];
 
 $fullquickstart_path = $branddir . "program" . $pathslash . "quickstart.exe";
 
 }
 
 # copy Common.xcu
-
-print "cp $datapath$common_XML $userinstalldir$User_Office_Path$common_XML\n" if $is_debug;
-copy ("$datapath$common_XML", "$userinstalldir$User_Office_Path$common_XML");
+print "Patching Common.xcu\n" if $is_debug;
+PatchCommonXcu($buildid);
+print "cp $inpath_Common_XCU $userinstalldir$User_Office_Path$common_XML\n" if $is_debug;
+copy ("$inpath_Common_XCU", "$userinstalldir$User_Office_Path$common_XML");
 
 # copy OOoImprovement/Settings.xcu
 
 
 exit(0);
 
+############################################################################
+sub PatchCommonXcu      #17.04.2009 10:37
+############################################################################
+ {
+    my $buildid = shift;
+    open(INFILE, "< $datapath$common_XML") || die "Can't open $datapath$common_XML (read)\n";
+    open(OUTFILE, "> $inpath_Common_XCU") || die "Can't open $inpath_Common_XCU (write)\n";
+    my $patch_next_line = 0;
+    my $value = "<value>Patch" . $buildid . "</value>\n";
+    while ( $line = <INFILE> ) {
+        if ( $patch_next_line ) {
+            print OUTFILE "      $value";
+            $patch_next_line = 0;
+        } else
+        {
+            print OUTFILE $line;
+        }
+        if ( $line =~ /ReminderDate/ ) {
+            $patch_next_line = 1;
+        }
+    }
+    close(INFILE);
+    close(OUTFILE);
+}   ##PatchCommonXcu

smoketestoo_native/makefile.mk

 
 make_test:
 .IF $(NOREMOVE)
-	@$(PERL) smoketest.pl -nr $(LAST_MINOR)
+	@$(PERL) smoketest.pl -nr $(LAST_MINOR) $(BUILD)
 .ELSE
-	@$(PERL) smoketest.pl $(LAST_MINOR)
+	@$(PERL) smoketest.pl $(LAST_MINOR) $(BUILD)
 .ENDIF
 
 noremove:
-	@$(PERL) smoketest.pl -nr $(LAST_MINOR)
+	@$(PERL) smoketest.pl -nr $(LAST_MINOR) $(BUILD)
 

smoketestoo_native/smoketest.pl

 #*************************************************************************
 #
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-# 
+#
 # Copyright 2008 by Sun Microsystems, Inc.
 #
 # OpenOffice.org - a multi-platform office productivity suite
 $FileURLPrefix = "file:///";
 $userinstalldir = "UserInstallation";
 $cygwin = "cygwin";
-$prefered_lang = "en-US"; 
+$prefered_lang = "en-US";
 $global_instset_mask = "";
 $smoketest_install = $ENV{SMOKETESTINSTALLSET};
 
 if ( $ARGV[0] ) {
     $milestone = $ARGV[0];
 }
+if ( $ARGV[1] ) {
+    $buildid = $ARGV[1];
+}
     
  
 #### script id #####
 
 	# patch config (error 3)
 
-	$Command = "$PERL config.pl \"$basisdir \" \"$branddir \" \"$userinstallpath \" \"$DATA \"";
+	$Command = "$PERL config.pl \"$basisdir \" \"$branddir \" \"$userinstallpath \" \"$DATA \" \"$buildid\"";
 	execute_Command ($Command, $error_patchConfig, $show_Message, $command_normal );
 
 	# copy basicscripts (error 9)
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.