Commits

Anonymous committed e4612d5

CWS-TOOLING: integrate CWS qadev34
2008-11-24 12:04:37 +0100 cn r264220 : #i96037 bugfix: remove superfluous exclamation mark
2008-11-20 20:52:21 +0100 cn r264100 : #i95964 fixes for cygwin
2008-11-20 12:10:41 +0100 cn r264040 : #i95964 replacesment for cwsquery modules
2008-11-10 10:29:48 +0100 cn r263511 : #i96037 register installoffice.oxt
2008-11-07 15:44:58 +0100 cn r263423 : #i95964# changes for 'cwstouched' wihch is a replacemant for 'cwsquery modules'
2008-10-31 14:04:47 +0100 cn r262866 : #i95303# add XDEBUG variable
2008-10-31 14:03:39 +0100 cn r262865 : #i95610# update lists
2008-10-31 09:47:27 +0100 cn r262855 : #i95303# bugfix
2008-10-31 09:47:06 +0100 cn r262854 : #i95303# bugfix
2008-10-30 21:42:14 +0100 cn r262837 : #i95204 remove -OOO_EnvSet parameter
2008-10-30 21:33:18 +0100 cn r262836 : #i95304 add -enableautomation as soffice parameter
2008-10-30 10:20:24 +0100 cn r262822 : #i95610 update lists
2008-10-27 22:00:00 +0100 cn r262691 : #i95513#: add support for -runnerini as aditional ini file
2008-10-27 21:35:17 +0100 cn r262690 : #i95513# use -runnerini instead of -ini
2008-10-23 13:41:32 +0200 cn r262621 : #i95303# changes to run cwscheckapi in cygwin environment
2008-10-22 10:18:36 +0200 cn r262581 : #i95304# disable QuckStarter while trying to dispose the office
2008-10-22 09:59:39 +0200 cn r262580 : #i95303# add cygwin related stuff
2008-10-22 09:59:10 +0200 cn r262579 : #i95303# add cygwin related stuff
2008-10-22 09:57:40 +0200 cn r262578 : #i95303# add property CYGWIN

Comments (0)

Files changed (20)

dbaccess/qa/unoapi/dbaccess.sce

 -o dbaccess.ORowSet
 -o dbaccess.OSQLMessageDialog
 -o dbaccess.OSingleSelectQueryComposer
--o dbaccess.SbaXGridControl
+#i95611 -o dbaccess.SbaXGridControl
 #i84128 -o dbaccess.TableWindowAccessibility

dbaccess/qa/unoapi/knownissues.xcl

 dbaccess.SbaXGridControl::com::sun::star::awt::XView
 
 ### i90359 ###
-dbaccess.ODatabaseSource::com::sun::star::sdb::DataSource
+dbaccess.ODatabaseSource::com::sun::star::sdb::DataSource
+
+### i95611 ###
+dbaccess.SbaXGridControl
+# -> disabled in dbaccess.sce
+
+### i95691 ###
+dbaccess.ORowSet::com::sun::star::sdbc::XRowUpdate
+dbaccess.ORowSet::com::sun::star::sdbc::XRow

qadevOOo/runner/helper/BuildEnvTools.java

     private final boolean mDebug;
     private final String mPlatform;
     private final String mShell;
+    private boolean mCygwin;
 
     /**
      * This constructor creates an instance of BuildEncTools. It is verifying for all neccesarry
             error = true;
         }
 
+        mCygwin = (param.getBool(PropertyName.CYGWIN));
+        
         if (error) {
             throw new ParameterNotFoundException(msg);
         }
      * @return the processHandler of the commands
      * @see helper.ProcessHandler
      */
-    public ProcessHandler runCommandsInEnvironmentShell(String[] commands, File workDir, boolean shortWait) {
+    public ProcessHandler runCommandsInEnvironmentShell(String[] commands, File workDir, int shortWait) {
 
         final String[] cmdLines = getCmdLinesWithCommand(commands);
         final ProcessHandler pHdl = new ProcessHandler(cmdLines, (PrintWriter) log, workDir, shortWait, param);
 
         if (sSrcRoot == null) {
             String[] cmdLines = null;
-
-            if (mPlatform.equals(PropertyName.WNTMSCI)) {
+            if (mPlatform.equals(PropertyName.WNTMSCI) && ! mCygwin) {
                 cmdLines = new String[]{mShell, "/C", "echo SRC_ROOT=%SRC_ROOT"};
             } else {
-                cmdLines = new String[]{mShell, "-c ", "echo \"SRC_ROOT=$SRC_ROOT\""};
+                cmdLines = new String[]{mShell, "--login ", "-c ", "echo \"SRC_ROOT=$SRC_ROOT\""};
             }
 
-            final ProcessHandler procHdl = new ProcessHandler(cmdLines, (PrintWriter) log, null, true, param);
+            final ProcessHandler procHdl = new ProcessHandler(cmdLines, (PrintWriter) log, null, 5000, param);
             procHdl.runCommand();
 
             if (mDebug) {
 
         String seperator = "";
         if (mPlatform.equals(PropertyName.WNTMSCI)) {
-            seperator = "^";
+            seperator = mCygwin ? ";" : "^";
         } else {
             seperator = ";";
         }
             command += commands[i];
         }
 
-        if (mPlatform.equals(PropertyName.WNTMSCI)) {
+        if (mPlatform.equals(PropertyName.WNTMSCI)){
+            if (mCygwin){
+                String srcRoot = (String) param.get(PropertyName.SRC_ROOT);
+                String envSet = "export cyg_src_root=`cygpath '" + srcRoot.replaceAll("\\\\", "\\\\\\\\")+ "'`; source $cyg_src_root/winenv.set.sh;";
+                command = envSet + command;
+                cmdLines = new String[]{mShell, "--login", "-c", "\"" + command + "\""};
+            } else {
             cmdLines = new String[]{mShell, "/C", "\"" + command + "\""};
+            }
         } else {
-            cmdLines = new String[]{mShell, "-c ", command};
+            cmdLines = new String[]{mShell, "-c", command};
         }
         return cmdLines;
     }

qadevOOo/runner/helper/ClParser.java

         for (int i = 0; i < args.length; i++) {
             if (args[i].equals("-ini")) {
                 iniFile = args[i + 1];
+                break;
+            }
+        }
+
+        return iniFile;
+    }
+
+    /*
+     * This method returns the path to a Configuration file <br>
+     * if defined as command line parameter, an empty String elsewhere
+     */
+    public String getRunnerIniPath(String[] args) {
+        String iniFile = "";
+
+        for (int i = 0; i < args.length; i++) {
+            if (args[i].equals("-runnerini")) {
+                iniFile = args[i + 1];
+                break;
             }
         }
 

qadevOOo/runner/helper/CwsDataExchangeImpl.java

     }
 
     public ArrayList getModules() {
-        // the cwsquery command send its version information to StdErr.
+        // the cwstouched command send its version information to StdErr.
         // A piping from StdErr to SdtOut the tcsh does not support.
         // To find the output easily the echo command is used
-        final String[] commands = {"echo cwsquery starts here", "cwsquery modules", "echo cwsquery ends here"};
+        final String[] commands = {"echo cwstouched starts here", "cwstouched", "echo cwstouched ends here"};
 
-        final ProcessHandler procHdl = bet.runCommandsInEnvironmentShell(commands, null, true);
+        final ProcessHandler procHdl = bet.runCommandsInEnvironmentShell(commands, null, 20000);
 
         if (mDebug) {
             log.println("---> Output of getModules:");
         boolean start = false;
         for (int i = 0; i < outs.length; i++) {
             final String line = outs[i];
-            if (line.startsWith("cwsquery ends here")) {
+            if (line.startsWith("cwstouched ends here")) {
                 start = false;
             }
             if (start && !line.equals("")) {
                 moduleNames.add(line);
             }
-            if (line.startsWith("cwsquery starts here")) {
+            if (line.startsWith("cwstouched starts here")) {
                 start = true;
             }
         }
 
             final String[] commands = {"cwsattach " + statusFile};
 
-            bet.runCommandsInEnvironmentShell(commands, null, true);
+            bet.runCommandsInEnvironmentShell(commands, null, 5000);
 
         } catch (IOException ex) {
             System.out.println("ERROR: could not attach file '" + statusFile + "' to cws\n" + ex.toString());

qadevOOo/runner/helper/OfficeProvider.java

 package helper;
 
 //import com.sun.star.bridge.UnoUrlResolver;
+import com.sun.star.beans.XFastPropertySet;
 import com.sun.star.bridge.XUnoUrlResolver;
 import com.sun.star.container.XEnumeration;
 import com.sun.star.container.XEnumerationAccess;
         boolean result = true;
 
         if (msf != null) {
+            
+            // disable QuickStarter
+            try {
+                Object quickStarter = msf.createInstance("com.sun.star.office.Quickstart");
+                XFastPropertySet fps = (XFastPropertySet) UnoRuntime.queryInterface(XFastPropertySet.class, quickStarter);
+                fps.setFastPropertyValue(0, false);
+            } catch (com.sun.star.uno.Exception ex) {
+                dbg("ERROR: Could not disable QuickStarter: " + ex.toString());
+            }
+            
             try {
                 desk = (XDesktop) UnoRuntime.queryInterface(XDesktop.class,
                     msf.createInstance(

qadevOOo/runner/helper/ProcessHandler.java

      * @param commands
      * @param log
      * @param workDir
-     * @param shortWait If this parameter is ture the <CODE>mTimeOut</CODE> is set to 3000 ms, else it is set to 
+     * @param shortWait If this parameter is ture the <CODE>mTimeOut</CODE> is set to 5000 ms, else it is set to
      *        half of time out from parameter timeout.
      * @param param the TestParameters
      * @see lib.TestParameters
      * @see helper.OfficeWatcher
      */
-    public ProcessHandler(String[] commands, PrintWriter log, File workDir, boolean shortWait, TestParameters param) {
+    public ProcessHandler(String[] commands, PrintWriter log, File workDir, int shortWait, TestParameters param) {
         this(null, log, workDir, null, 0);
         this.cmdLineArray = commands;
         this.param = param;
-        if (shortWait) {
-            this.mTimeOut = 5000;
+        if (shortWait != 0) {
+            this.mTimeOut = shortWait;
         } else {
             this.mTimeOut = (long) (param.getInt(PropertyName.TIME_OUT) / 1.3);
         }

qadevOOo/runner/org/openoffice/Runner.java

         
         ClParser cli = new ClParser();        
         
-        //parse the commandline arguments if an ini-parameter is given        
+        //parse the commandline arguments if an ini-parameter is given
         String iniFile = cli.getIniPath(args);
-        
+
         //initialize cfgParser with ini-path
         CfgParser ini = new CfgParser(iniFile);
-                
+
         //parse ConfigFile
-        ini.getIniParameters(param);                
-        
+        ini.getIniParameters(param);
+
+
+        //parse the commandline arguments if an runnerprops-parameter is given
+        String runnerIniFile = cli.getRunnerIniPath(args);
+
+        //initialize cfgParser with ini-path
+        CfgParser runnerIni = new CfgParser(runnerIniFile);
+
+        //parse ConfigFile
+        runnerIni.getIniParameters(param);
+
         //parse the commandline arguments
         // TODO: no right error message, if no parameter given!
         cli.getCommandLineParameter(param,args);

qadevOOo/runner/org/openoffice/RunnerService.java

         //parse ConfigFile
         ini.getIniParameters(param);
 
+
+        //parse the commandline arguments if an runnerprops-parameter is given
+        String runnerIniFile = cli.getRunnerIniPath(arguments);
+
+        //initialize cfgParser with ini-path
+        CfgParser runnerIni = new CfgParser(runnerIniFile);
+
+        //parse ConfigFile
+        runnerIni.getIniParameters(param);
+
         //parse the commandline arguments
         cli.getCommandLineParameter(param,arguments);
         

qadevOOo/runner/util/PropertyName.java

      */
     final public static String SHELL = "Shell";
     /**
+     * parameter name "Cygwin"<p>
+     * If Cygwin is set to TRUE it indicates if the runner runs in a Cygwin 
+     * environment
+     */
+    final public static String CYGWIN = "Cygwin";
+    /**
      * parameter name: "NoCwsAttach"<p>
      * If this paraeter is set to "true" , a status of CWS-UnoAPI-Tests was not attached to EIS<p>
      * @see tests.complex.unoapi.CheckModuleAPI

qadevOOo/tests/java/complex/unoapi/CheckModuleAPI.java

 
         final String[] commands = getCommands(sUnoapi);
 
-        final ProcessHandler procHdl = bet.runCommandsInEnvironmentShell(commands, fUnoapi, false);
+        final ProcessHandler procHdl = bet.runCommandsInEnvironmentShell(commands, fUnoapi, 0);
         log.println("exit code of dmake: " + procHdl.getExitCode());
         String test = procHdl.getOutputText();
         test = procHdl.getErrorText();
         String[] cmdLines = null;
         final String platform = (String) param.get(PropertyName.OPERATING_SYSTEM);
         log.println("prepare command for platform " + platform);
-        if (platform.equals(PropertyName.WNTMSCI)) {
+
+        if (platform.equals(PropertyName.WNTMSCI)){
+            if (param.getBool(PropertyName.CYGWIN)){
+                cmdLines = new String[]{"cd `cygpath '" + sUnoapi.replaceAll("\\\\", "\\\\\\\\")+ "'`", "dmake"};
+            } else{
             cmdLines = new String[]{"cdd " + sUnoapi, "dmake"};
-//            cmdLines = new String[]{shell, "/C ", "\"echo Test ^ " + envcmd + " ^ cdd " + sUnoapi + "^ pwd ^ dmake\""};
+            }
         } else {
                 cmdLines = new String[]{"cd " + sUnoapi, "dmake"};
             }

solenv/bin/checkapi

 #!/bin/sh
+PS=":"
+# cygwin:
+if [ "$GUI" = "WNT" ]; then
+    PS=";"
+fi
 
 JARFOLDER=$SOLARVERSION/$INPATH/bin$UPDMINOREXT
 SOLVER_LIB=$SOLARVERSION/$INPATH/lib$UPDMINOREXT
-myCLASSPATH=$JARFOLDER/OOoRunner.jar:$JARFOLDER/ridl.jar:$JARFOLDER/unoil.jar:$JARFOLDER/jurt.jar:$JARFOLDER/juh.jar:$JARFOLDER/java_uno.jar
-myCLASSPATH=$myCLASSPATH:$SOLVER_LIB:/net/unoapi/export/unoapi/bin/mysql.jar
+myCLASSPATH=${PS}${JARFOLDER}/ridl.jar${PS}${JARFOLDER}/unoil.jar${PS}${JARFOLDER}/jurt.jar${PS}${JARFOLDER}/juh.jar${PS}${JARFOLDER}/java_uno.jar
+myCLASSPATH=$myCLASSPATH${PS}${JARFOLDER}/OOoRunner.jar
+myCLASSPATH=$myCLASSPATH${PS}/net/unoapi/export/unoapi/bin/mysql.jar${PS}$SOLVER_LIB
 
 if [ -n "$JAVAI" ]; then
 	JAVABIN=$JAVAI
 PARAM="-cs pipe,name=$USER -SRC_ROOT $SRC_ROOT"
 
 if [ -n "$RUNNERPROPS" ]; then
-    PARAM="$PARAM -ini $RUNNERPROPS"
+    PARAM="$PARAM -runnerini $RUNNERPROPS"
 fi
 
-COMMAND="$JAVABIN -Xmx120m -cp $myCLASSPATH org.openoffice.Runner $PARAM $*"
+MYXDEBUG=""
+if [ -n "$XDEBUG" ]; then
+    # export XDEBUG="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,address=8001" 
+    MYXDEBUG=$XDEBUG
+fi
+
+COMMAND="$JAVABIN -Xmx120m $MYXDEBUG -cp $myCLASSPATH org.openoffice.Runner $PARAM $*"
 echo $COMMAND
 $COMMAND

solenv/bin/checkapi.btm

 SET PARAM=-cs pipe,name=%USERNAME% -SRC_ROOT %SRC_ROOT%
 
 IFF "%RUNNERPROPS%" != "" THEN
-    SET PARAM=%PARAM% -ini %RUNNERPROPS%
+    SET PARAM=%PARAM% -runnerini %RUNNERPROPS%
 ENDIFF
 
-set COMMAND=%JAVABIN% -Xmx120m -cp %APICLASSPATH% org.openoffice.Runner %PARAM% %&
+SET MYXDEBUG=""
+IFF "%XDEBUG%" != "" THEN
+    REM SET XDEBUG=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,address=8001 
+    SET MYXDEBUG=%XDEBUG
+ENDIFF
+
+set COMMAND=%JAVABIN% -Xmx120m %MYXDEBUG -cp %APICLASSPATH% org.openoffice.Runner %PARAM% %&
 
 
 echo %COMMAND

solenv/bin/cwscheckapi

 	echo "`date` installation successfull, start testing...." 
 fi
 
-if [ $DEBUG_T = true ]; then
-    echo find $LOCALINSTALLDIR -name soffice
+SOFFICE="soffice"
+PS=":"
+CYGWIN=""
+
+SHELL="/bin/bash"
+# cygwin:
+if [ "$GUI" = "WNT" ]; then
+    SOFFICE="soffice.exe"
+    PS=";"
+    CYGWIN="-Cygwin true"
+    SHELL=`which bash`
+    SHELL=`cygpath -w $SHELL`
+    if [ ! -f $SHELL ]; then
+        echo "could not determine bash shell" 
+        exit 1
+    fi
 fi
 
-OFFICEBIN=`find $LOCALINSTALLDIR -name soffice`
+if [ $DEBUG_T = true ]; then
+    echo find $LOCALINSTALLDIR -name $SOFFICE
+fi
+
+OFFICEBIN=`find $LOCALINSTALLDIR -name $SOFFICE`
 
 if [ ! -f "$OFFICEBIN" ]; then
-    echo "could not find 'soffice' in subfolders of $LOCALINSTALLDIR";
+    echo "could not find 'soffice' in subfolders of $LOCALINSTALLDIR"
     exit 1
 fi
 
+if [ "$GUI" = "WNT" ]; then
+    # transform /tmp/... -> c:\tmp\...
+    OFFICEBIN=`cygpath -w $OFFICEBIN`
+fi
+
 JARFOLDER=$SOLARVERSION/$INPATH/bin$UPDMINOREXT
 SOLVER_LIB=$SOLARVERSION/$INPATH/lib$UPDMINOREXT
-myCLASSPATH=$JARFOLDER/OOoRunner.jar:$JARFOLDER/ridl.jar:$JARFOLDER/unoil.jar:$JARFOLDER/jurt.jar:$JARFOLDER/juh.jar:$JARFOLDER/java_uno.jar
-myCLASSPATH=$myCLASSPATH:$JARFOLDER/ridl.jar:$JARFOLDER/unoil.jar:$JARFOLDER/jurt.jar:$JARFOLDER/juh.jar:$JARFOLDER/java_uno.jar
-myCLASSPATH=$myCLASSPATH:/net/unoapi/export/unoapi/bin/mysql.jar:$SOLVER_LIB
+myCLASSPATH=${PS}${JARFOLDER}/ridl.jar${PS}${JARFOLDER}/unoil.jar${PS}${JARFOLDER}/jurt.jar${PS}${JARFOLDER}/juh.jar${PS}${JARFOLDER}/java_uno.jar
+myCLASSPATH=$myCLASSPATH${PS}${JARFOLDER}/OOoRunner.jar
+myCLASSPATH=$myCLASSPATH${PS}/net/unoapi/export/unoapi/bin/mysql.jar${PS}$SOLVER_LIB
 PARAM=""
 if [ -n "$JAVAI" ]; then
         JAVABIN=$JAVAI
 	fi
 fi
 
-PARAM="$PARAM -cmd '$OFFICEBIN  -nofirststartwizard -norestore -nocrashreport -nolockcheck -accept=pipe,name=$USER;urp;'"
+PARAM="$PARAM -cmd '$OFFICEBIN -nofirststartwizard -accept=pipe,name=$USER;urp; -norestore -nocrashreport -nolockcheck -enableautomation'"
 PARAM="$PARAM -cs pipe,name=$USER"
 PARAM="$PARAM -NoOffice true"
-PARAM="$PARAM -OOO_EnvSet setsolar"
 PARAM="$PARAM -SRC_ROOT $SRC_ROOT"
 PARAM="$PARAM -COMP_ENV $OUTPATH"
-PARAM="$PARAM -Shell /bin/tcsh"
+PARAM="$PARAM -Shell $SHELL"
+PARAM="$PARAM $CYGWIN"
 PARAM="$PARAM -tb java_complex"
 PARAM="$PARAM -TimeOut 90000"
 PARAM="$PARAM -o complex.unoapi.CheckModuleAPI::module($MODULES)"

solenv/bin/cwscheckapi.btm

 
 SET KILLCOMMAND="%SOLARVERSION%\%INPATH%\bin%UPDMINOREXT%\kill.exe -9 soffice.bin^%SOLARVERSION%\%INPATH%\bin%UPDMINOREXT%\kill.exe -9 soffice.exe"
 
-SET PARAM=%PARAM% -cmd '\"%OFFICEBIN%\"  -nofirststartwizard -norestore -nocrashreport -nolockcheck -accept=pipe,name=%USERNAME%;urp;'
+SET PARAM=%PARAM% -cmd '\"%OFFICEBIN%\"  -nofirststartwizard -norestore -nocrashreport -nolockcheck -enableautomation -accept=pipe,name=%USERNAME%;urp;'
 SET PARAM=%PARAM% -cs pipe,name=%USERNAME%
 SET PARAM=%PARAM% -NoOffice true
-SET PARAM=%PARAM% -OOO_EnvSet setsolar
 SET PARAM=%PARAM% -SRC_ROOT %SRC_ROOT%
 SET PARAM=%PARAM% -COMP_ENV %OUTPATH%
 SET PARAM=%PARAM% -Shell %COMSPEC%

solenv/bin/cwstouched

+#!/bin/bash
+PYTHONPATH=${SOLARVERSION}/${OUTPATH}${PROEXT}/lib${UPDMINOREXT}/python
+
+if [ x${CWSCHECKAPI_LD_LIBRARY_PATH}x != xx ]; then
+    export LD_LIBRARY_PATH=$CWSCHECKAPI_LD_LIBRARY_PATH
+fi
+export PYTHONPATH
+
+${SOLARVERSION}/${OUTPATH}${PROEXT}/bin${UPDMINOREXT}/python -x $SOLARENV/bin/cwstouched.py

solenv/bin/cwstouched.btm

+@echo off
+set PYTHONPATH=%SOLARVERSION%\%OUTPATH%%PROEXT%\lib.%UPDMINOR%\python
+python %SOLARENV%\bin\cwstouched.py

solenv/bin/cwstouched.py

+#!/usr/bin/python
+
+#*************************************************************************
+# 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
+#
+# This file is part of OpenOffice.org.
+#
+# OpenOffice.org is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License version 3
+# only, as published by the Free Software Foundation.
+#
+# OpenOffice.org 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 Lesser General Public License version 3 for more details
+# (a copy is included in the LICENSE file that accompanied this code).
+#
+# You should have received a copy of the GNU Lesser General Public License
+# version 3 along with OpenOffice.org.  If not, see
+# <http://www.openoffice.org/license.html>
+# for a copy of the LGPLv3 License.
+#***********************************************************************/
+
+import os
+import sys
+import string
+from os import path
+
+def getCurrPath():
+    currPath = sys.path[0] or os.getcwd()
+    currPath = path.abspath(currPath)
+    return currPath
+    
+def getCwsWorkStamp():
+    cwsWorkStamp=os.getenv('CWS_WORK_STAMP')
+    
+    if not cwsWorkStamp:
+        currPath=getCurrPath()
+        
+        os.chdir(os.getenv('SOLARENV'))
+        
+        (input, output) = os.popen4("svn info")
+        
+        for outline in output.readlines():
+            if outline.startswith("URL:"):
+                cwsWorkStamp = outline[outline.index("svn.services"):outline.index("solenv")-1]
+                cwsWorkStamp = cwsWorkStamp[cwsWorkStamp.rfind("/")+1:len(cwsWorkStamp)]
+                break
+                
+        os.putenv("CWS_WORK_STAMP",cwsWorkStamp);
+        os.chdir(currPath)
+    
+    return string.strip(cwsWorkStamp)
+    
+def getMinor(cwsWorkStamp):
+    minor = os.getenv('UPDMINOR')
+    
+    if not minor:
+        if (os.getenv('OSTYPE') == "cygwin"):
+            bash=os.getenv("SHELL")
+            (input, output) = os.popen4("cygpath -w "+bash)
+            winbash=string.strip(output.readlines()[0])
+            cws=winbash+" -c 'cws  query -c "+cwsWorkStamp+" current'"
+        else:
+            cws="cws query -c "+cwsWorkStamp+" current"
+
+        (input, output) = os.popen4(cws)
+        
+        found=0
+        for outline in output.readlines():
+            if found:
+                minor=outline
+                break
+            elif outline.find("Current milestone:") != -1:
+                found=1
+    
+    return string.strip(minor)
+    
+    
+workstamp = os.getenv('WORK_STAMP')
+solenv= os.getenv('SOLARENV')
+cwsWorkStamp=getCwsWorkStamp()
+minor = getMinor(cwsWorkStamp)
+
+oldWorkStamp = workstamp + "_" + minor
+
+diff="svn diff --summarize --old=svn://svn.services.openoffice.org/ooo/tags/"+oldWorkStamp+" --new=svn://svn.services.openoffice.org/ooo/cws/"+cwsWorkStamp
+
+modules=[]
+(input, output) = os.popen4(diff)
+
+for outline in output.readlines():
+    if outline.find("svn://svn.services.openoffice.org"):
+        index = outline.index(oldWorkStamp)+len(oldWorkStamp)+1
+        newModule=outline[index:outline.index("/",index)]
+        if not modules.count(newModule): 
+            modules.append(newModule)
+
+for module in modules:
+    print module

solenv/bin/installoffice.oxt

Binary file added.

solenv/bin/installoffice.pl

 #
 # $RCSfile: installoffice.pl,v $
 #
-# $Revision: 1.3 $
+# $Revision: 1.2.24.1 $
 #
 # This file is part of OpenOffice.org.
 #
     $SVERSION_INI = $ENV{USERPROFILE} . $PS . "Anwendungsdaten" . $PS . "sversion.ini";
     $SOFFICEBIN = "soffice";
     $bootstrapini = "bootstrap.ini";
-    $UNOPKGBIN="unopkg.exe";
     $bootstrapiniTemp = $bootstrapini . "_";
     $CygwinLineends = $/;
     $WinLineends = "\r\n";
 }
 
 sub makeAutoRun(){
-
+    
     my $destinationPath = shift;
-
+    
     patchBootstraprc($destinationPath);
+    
 
     if (patchXCU ($destinationPath) != 0) {
         print_error("could not patch XCU files", "1");
     open OUTFILE, ">$bootstraprc" or return errorFromOpen (" for writing " . $bootstraprc);
     print OUTFILE @newContent;
     close OUTFILE;
-    #writeFile($bootstraprc, @newContent);
     
 }
 
 sub patchXCU(){
     my $destinationPath = shift;
-    my $bootstraprc;
+    my $unopkg="";
     
-    find sub { $bootstraprc=$File::Find::name if -e _ && /$bootstrapini$/ }, $destinationPath;
+    find sub { $unopkg=$File::Find::name if -e _ && /$UNOPKGBIN$/ }, $destinationPath;
     
-    print_error("could not find $bootstrapini", "1") if ( !-e $bootstraprc );
-    print "bootstraprc: '$bootstraprc'\n" if $debug;
-
-    $bootstraprc =~ /(.*)\/(program|MacOS)\/$bootstrapini/
-        or print_error("could not determine basedir", 1);
-
-    my $basedir = $1;
+    print_error("could not find $UNOPKGBIN", "1") if ( !-e $unopkg );
+    print "unopkg: '$unopkg'\n" if $debug;
     
-    print "basedir: $basedir\n" if $debug;
+    if ($gui eq "WNT") {
+        $unopkg = "\"$unopkg\"";
+    }
     
-    my $userPath = $basedir.$PS."UserInstallation".$PS."user".$PS."registry".$PS."data".$PS."org".$PS."openoffice".$PS;
- 
-    # ..\user\registry\data\org\openoffice\Office\
-    my $userOfficePath = $userPath . "Office" . $PS;
-    
-    my $commonXcuPath=$userOfficePath;
-    my $setupXcuPath = $userPath;
-    
-    my $success = patchCommonXcu($commonXcuPath);
-
-    $success &= patchSetupXcu($setupXcuPath);
+    my $unopkgCommand = "$unopkg add $script_path".$script_name.".oxt";
+    print "patch xcu files for automatic office start...\n" if $debug;
+    print "call $unopkgCommand\n" if $debug;
+    my $success=0;
+    $success = system($unopkgCommand);
     
     return $success;
 }
 
-sub patchSetupXcu(){
-    my $commonXcuPath=shift;
-    my $setupXcu = $commonXcuPath."Setup.xcu";
-    print "patching $setupXcu\n" if $debug;
-    mkdirs($commonXcuPath);
-    my @content=(
-        "<?xml version=\"1.0\" encoding=\"UTF-8\"?>",
-        "<oor:component-data xmlns:oor=\"http://openoffice.org/2001/registry\" xmlns:xs=\"http://www.w3.org/2001/XMLSchema\" oor:name=\"Setup\" oor:package=\"org.openoffice\">",
-        " <node oor:name=\"Office\">",
-        "  <prop oor:name=\"LicenseAcceptDate\" oor:type=\"xs:string\">",
-        "   <value>2100-01-01T00:00:00</value>",
-        "  </prop>",
-        "  <prop oor:name=\"FirstStartWizardCompleted\" oor:type=\"xs:boolean\">",
-        "   <value>true</value>",
-        "  </prop>",
-        # "  <prop oor:name=\"ooSetupInstCompleted\" oor:type=\"xs:boolean\">",
-        # "   <value>true</value>",
-        # "  </prop>",
-        " </node>",
-        "</oor:component-data>");
-    return writeFile($setupXcu, @content);
-}
-
-sub patchCommonXcu(){
-    my $commonXcuPath = shift;
-    my $commonXcu = $commonXcuPath."Common.xcu";
-    print "patching $commonXcu\n" if $debug;
-    mkdirs($commonXcuPath);
-    my @content=(
-        "<?xml version=\"1.0\" encoding=\"UTF-8\"?>",
-        "<oor:component-data xmlns:oor=\"http://openoffice.org/2001/registry\" xmlns:xs=\"http://www.w3.org/2001/XMLSchema\" oor:package=\"org.openoffice.Office\" oor:name=\"Common\">",
-        " <node oor:name=\"Misc\">",
-        "  <prop oor:name=\"FirstRun\" oor:type=\"xs:boolean\">",
-        "   <value>false</value>",
-        "  </prop>",
-        " </node>",
-        " <node oor:name=\"Security\">",
-        "  <node oor:name=\"Scripting\">",
-        "   <prop oor:name=\"OfficeBasic\" oor:type=\"xs:int\">",
-        "    <value>2</value>",
-        "   </prop>",
-        "   <prop oor:name=\"MacroSecurityLevel\" oor:type=\"xs:int\">",
-        "    <value>0</value>",
-        "   </prop>",
-        "  </node>",
-        " </node>",
-        " <node oor:name=\"Help\">",
-        "  <node oor:name=\"Registration\">",
-        "   <prop oor:name=\"ReminderDate\">",
-        "    <value/>",
-        "   </prop>",
-        "  </node>",
-        " </node>",        
-        "</oor:component-data>");
-    
-    return writeFile($commonXcu, @content);
-}
-
 sub writeFile(){
     my $fileName = shift;
     my @content = @_;
     if ( $PS eq "\\" ){
        $splitter="\\\\";
     }
-    my @aFolder=split($splitter,$directory);!
+    my @aFolder=split($splitter,$directory);
     
     my $dir;
     my $folder;