[ooo-build-commit] Branch 'ooo/master' - 2 commits - crashrep/source setup_native/prj setup_native/source
Jan Holesovsky
kendy at kemper.freedesktop.org
Tue Jul 28 17:20:20 PDT 2009
crashrep/source/win32/soreport.cpp | 54 ++++
setup_native/prj/build.lst | 1
setup_native/source/packinfo/package_names_ext.txt | 4
setup_native/source/packinfo/packinfo_office.txt | 16 -
setup_native/source/packinfo/packinfo_office_lang.txt | 12
setup_native/source/packinfo/packinfo_ure.txt | 2
setup_native/source/packinfo/shellscripts_extensions.txt | 24 +
setup_native/source/win32/customactions/rebase/makefile.mk | 94 +++++++
setup_native/source/win32/customactions/rebase/rebase.cxx | 168 +++++++++++++
setup_native/source/win32/customactions/rebase/rebase.dxp | 1
10 files changed, 362 insertions(+), 14 deletions(-)
New commits:
commit 50563b7b4ac36950a6e803f4bfa1c4b05d9d235a
Author: Jens-Heiner Rechtien <hr at openoffice.org>
Date: Tue Jul 28 15:05:10 2009 +0000
CWS-TOOLING: integrate CWS so91s10u8_DEV300
2009-07-21 09:12:39 +0200 releng r274160 : #b6835838#
2009-07-21 09:10:03 +0200 releng r274158 : #b6836360#
2009-06-26 16:18:53 +0200 releng r273427 : #i10000# remove wrong elsif lines
2009-06-26 13:54:07 +0200 obo r273408 : #b6836339#,#b6835838#,#b6836573#,#b6836360#,#b6840384#,#b6836711#,#159633#,#159138#,#b6838895#,#b6836340#,#b6836712# initial changes
diff --git a/setup_native/source/packinfo/package_names_ext.txt b/setup_native/source/packinfo/package_names_ext.txt
index b10c2cb..18e1679 100644
--- a/setup_native/source/packinfo/package_names_ext.txt
+++ b/setup_native/source/packinfo/package_names_ext.txt
@@ -8,10 +8,14 @@ SUNWfreetype2 FreeType2 font library
SUNWgnome-base-libs GNOME base GUI libraries - platform dependent files, /usr filesystem
SUNWgnome-config GNOME configuration framework - platform dependent files, /usr filesystem
SUNWgnome-vfs GNOME Virtual File System Framework and application/MIME type registry - platform dependent files, /usr filesystem
+SUNWgzip The GNU Zip (gzip) compression utility
+SUNWmfrun Motif RunTime Kit
SUNWkvm Core Architecture, (Kvm)
SUNWlibC Sun Workshop Compilers Bundled libC
+SUNWPython The Python interpreter, libraries and utilities
SUNWxwplt X Window System platform software
SUNWxwrtl X Window System & Graphics Runtime Library Links in /usr/lib
+SUNWzlibr The Zip compression library (Root)
SUNWbtool CCS tools bundled with SunOS
SUNWxcu4 XCU4 Utilities
diff --git a/setup_native/source/packinfo/packinfo_office.txt b/setup_native/source/packinfo/packinfo_office.txt
index 0bea010..cd0885b 100755
--- a/setup_native/source/packinfo/packinfo_office.txt
+++ b/setup_native/source/packinfo/packinfo_office.txt
@@ -162,7 +162,7 @@ End
Start
module = "gid_Module_Optional_Binfilter"
solarispackagename = "%BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-binfilter"
-solarisrequires = "%BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core01"
+solarisrequires = "%BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core01,%BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core04,%BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core05"
packagename = "%BASISPACKAGEPREFIX%OOOBASEVERSION-binfilter"
freebsdrequires = "%BASISPACKAGEPREFIX%OOOBASEVERSION-core01"
requires = "%BASISPACKAGEPREFIX%OOOBASEVERSION-core01"
@@ -177,7 +177,7 @@ End
Start
module = "gid_Module_Optional_Grfflt"
solarispackagename = "%BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-graphicfilter"
-solarisrequires = "%BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core01"
+solarisrequires = "%BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core01,%BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core04,%BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core05"
packagename = "%BASISPACKAGEPREFIX%OOOBASEVERSION-graphicfilter"
freebsdrequires = "%BASISPACKAGEPREFIX%OOOBASEVERSION-core01"
requires = "%BASISPACKAGEPREFIX%OOOBASEVERSION-core01"
@@ -192,7 +192,7 @@ End
Start
module = "gid_Module_Oooimprovement"
solarispackagename = "%BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-oooimprovement"
-solarisrequires = "%BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core01"
+solarisrequires = "%BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core01,%BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core04,%BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core05,SUNWmfrun"
packagename = "%BASISPACKAGEPREFIX%OOOBASEVERSION-oooimprovement"
freebsdrequires = "%BASISPACKAGEPREFIX%OOOBASEVERSION-core01"
requires = "%BASISPACKAGEPREFIX%OOOBASEVERSION-core01"
@@ -207,7 +207,7 @@ End
Start
module = "gid_Module_Optional_Testtool"
solarispackagename = "%BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-testtool"
-solarisrequires = "%BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core01"
+solarisrequires = "%BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core01,%BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core04,%BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core05,SUNWmfrun"
packagename = "%BASISPACKAGEPREFIX%OOOBASEVERSION-testtool"
freebsdrequires = "%BASISPACKAGEPREFIX%OOOBASEVERSION-core01"
requires = "%BASISPACKAGEPREFIX%OOOBASEVERSION-core01"
@@ -282,7 +282,7 @@ End
Start
module = "gid_Module_Optional_Onlineupdate"
solarispackagename = "%BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-onlineupdate"
-solarisrequires = "%BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core01, SUNWlibC"
+solarisrequires = "%BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core01, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core05, SUNWlibC, SUNWgzip"
packagename = "%BASISPACKAGEPREFIX%OOOBASEVERSION-onlineupdate"
requires = "%BASISPACKAGEPREFIX%OOOBASEVERSION-core01"
copyright = "1999-2005 by Sun Microsystems"
@@ -296,7 +296,7 @@ End
Start
module = "gid_Module_Optional_Pyuno"
solarispackagename = "%BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-pyuno"
-solarisrequires = "%BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core01"
+solarisrequires = "%BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core01, SUNWPython"
packagename = "%BASISPACKAGEPREFIX%OOOBASEVERSION-pyuno"
freebsdrequires = "%BASISPACKAGEPREFIX%OOOBASEVERSION-core01"
requires = "%BASISPACKAGEPREFIX%OOOBASEVERSION-core01"
@@ -371,7 +371,7 @@ End
Start
module = "gid_Module_Oo_Linguistic"
solarispackagename = "%BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-ooolinguistic"
-solarisrequires = "%BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core01"
+solarisrequires = "%BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core01, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core04, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core05"
packagename = "%BASISPACKAGEPREFIX%OOOBASEVERSION-ooolinguistic"
freebsdrequires = "%BASISPACKAGEPREFIX%OOOBASEVERSION-core01"
requires = "%BASISPACKAGEPREFIX%OOOBASEVERSION-core01"
@@ -387,7 +387,7 @@ Start
module = "gid_Module_Root_Files_2"
script = "shellscripts_module.txt"
solarispackagename = "%BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core02"
-solarisrequires = "%BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core01, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core04, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core05, SUNWlibC"
+solarisrequires = "%BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core01, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core04, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core05, SUNWlibC, SUNWmfrun"
packagename = "%BASISPACKAGEPREFIX%OOOBASEVERSION-core02"
requires = "%BASISPACKAGEPREFIX%OOOBASEVERSION-core01"
freebsdrequires = ""
diff --git a/setup_native/source/packinfo/packinfo_office_lang.txt b/setup_native/source/packinfo/packinfo_office_lang.txt
index b3e1932..8f3f6dd 100755
--- a/setup_native/source/packinfo/packinfo_office_lang.txt
+++ b/setup_native/source/packinfo/packinfo_office_lang.txt
@@ -29,6 +29,7 @@ vendor = "OpenOffice.org"
description = "Language module for OpenOffice.org %OOOBASEVERSION, language %LANGUAGESTRING"
destpath = "/opt"
packageversion = "%OOOPACKAGEVERSION"
+pkg_list_entry = "%BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core01"
End
Start
@@ -44,6 +45,7 @@ vendor = "OpenOffice.org"
description = "Language fonts module for OpenOffice.org %OOOBASEVERSION, language %LANGUAGESTRING"
destpath = "/opt"
packageversion = "%OOOPACKAGEVERSION"
+pkg_list_entry = "%BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core01"
End
Start
@@ -59,6 +61,7 @@ vendor = "OpenOffice.org"
description = "Language resource module for OpenOffice.org %OOOBASEVERSION, language %LANGUAGESTRING"
destpath = "/opt"
packageversion = "%OOOPACKAGEVERSION"
+pkg_list_entry = "%BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core01"
End
Start
@@ -74,6 +77,7 @@ vendor = "OpenOffice.org"
description = "Language help module for OpenOffice.org %OOOBASEVERSION, language %LANGUAGESTRING"
destpath = "/opt"
packageversion = "%OOOPACKAGEVERSION"
+pkg_list_entry = "%BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core01"
End
Start
@@ -89,6 +93,7 @@ vendor = "OpenOffice.org"
description = "Writer language module for OpenOffice.org %OOOBASEVERSION, language %LANGUAGESTRING"
destpath = "/opt"
packageversion = "%OOOPACKAGEVERSION"
+pkg_list_entry = "%BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-writer"
End
Start
@@ -104,6 +109,7 @@ vendor = "OpenOffice.org"
description = "Calc language module for OpenOffice.org %OOOBASEVERSION, language %LANGUAGESTRING"
destpath = "/opt"
packageversion = "%OOOPACKAGEVERSION"
+pkg_list_entry = "%BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-calc"
End
Start
@@ -119,6 +125,7 @@ vendor = "OpenOffice.org"
description = "Impress language module for OpenOffice.org %OOOBASEVERSION, language %LANGUAGESTRING"
destpath = "/opt"
packageversion = "%OOOPACKAGEVERSION"
+pkg_list_entry = "%BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-impress"
End
Start
@@ -134,6 +141,7 @@ vendor = "OpenOffice.org"
description = "Draw language module for OpenOffice.org %OOOBASEVERSION, language %LANGUAGESTRING"
destpath = "/opt"
packageversion = "%OOOPACKAGEVERSION"
+pkg_list_entry = "%BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-draw"
End
Start
@@ -149,6 +157,7 @@ vendor = "OpenOffice.org"
description = "Math language module for OpenOffice.org %OOOBASEVERSION, language %LANGUAGESTRING"
destpath = "/opt"
packageversion = "%OOOPACKAGEVERSION"
+pkg_list_entry = "%BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-math"
End
Start
@@ -164,6 +173,7 @@ vendor = "OpenOffice.org"
description = "Base language module for OpenOffice.org %OOOBASEVERSION, language %LANGUAGESTRING"
destpath = "/opt"
packageversion = "%OOOPACKAGEVERSION"
+pkg_list_entry = "%BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-base"
End
Start
@@ -179,6 +189,7 @@ vendor = "OpenOffice.org"
description = "Legacy filters (e.g. StarOffice 5.2) for OpenOffice.org %OOOBASEVERSION, language %LANGUAGESTRING"
destpath = "/opt"
packageversion = "%OOOPACKAGEVERSION"
+pkg_list_entry = "%BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-binfilter"
End
Start
@@ -194,4 +205,5 @@ vendor = "OpenOffice.org"
description = "Online update language module for OpenOffice.org %OOOBASEVERSION, language %LANGUAGESTRING"
destpath = "/opt"
packageversion = "%OOOPACKAGEVERSION"
+pkg_list_entry = "%BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-onlineupdate"
End
diff --git a/setup_native/source/packinfo/packinfo_ure.txt b/setup_native/source/packinfo/packinfo_ure.txt
index 5f58017..425243e 100755
--- a/setup_native/source/packinfo/packinfo_ure.txt
+++ b/setup_native/source/packinfo/packinfo_ure.txt
@@ -32,6 +32,7 @@
Start
module = "gid_Module_Root"
solarispackagename = "%SOLSUREPACKAGEPREFIX-ure"
+solarisrequires = "SUNWzlibr"
packagename = "%UREPACKAGEPREFIX-ure"
copyright = "2005-2009 by OpenOffice.org"
solariscopyright = "solariscopyrightfile"
@@ -44,6 +45,7 @@ End
Start
module = "gid_Module_Root_Ure_Hidden"
solarispackagename = "%SOLSUREPACKAGEPREFIX-ure"
+solarisrequires = "SUNWzlibr"
packagename = "%UREPACKAGEPREFIX-ure"
copyright = "2005-2009 by OpenOffice.org"
solariscopyright = "solariscopyrightfile"
diff --git a/setup_native/source/packinfo/shellscripts_extensions.txt b/setup_native/source/packinfo/shellscripts_extensions.txt
index f756869..2d9056b 100755
--- a/setup_native/source/packinfo/shellscripts_extensions.txt
+++ b/setup_native/source/packinfo/shellscripts_extensions.txt
@@ -22,20 +22,32 @@ else
mkdir "$$INSTDIR"
fi
+#
+# Need to check diskless service install and make sure use the correct unpkg
+#
+DISKLESS_SRVC=`echo $$BASEDIR | /usr/bin/grep export/Solaris_[1-9][0-9]/usr_$${ARCH}.all`
+if [ "$$DISKLESS_SRVC" ]; then
+ UNOPKG=/export/Solaris_11/usr_`uname -p`.all/opt/staroffice9/program/unopkg
+ POSTRUN=$$PKG_INSTALL_ROOT/usr_`uname -p`.all/usr/lib/postrun
+ CLIENT_BASEDIR=$$PKG_INSTALL_ROOT/usr_$${ARCH}.all
+else
+ UNOPKG=$$BASEDIR/PRODUCTDIRECTORYNAME/program/unopkg
+ POSTRUN=$$PKG_INSTALL_ROOT/usr/lib/postrun
+fi
# Use postrun command on Solaris where available (OpenSolaris)
-if [ -x $$PKG_INSTALL_ROOT/usr/lib/postrun ]; then
+if [ -x $$POSTRUN ]; then
( echo "test -x \"$$CLIENT_BASEDIR/PRODUCTDIRECTORYNAME/program/unopkg\" || exit 0"
echo "umask 022"
echo "\"$$CLIENT_BASEDIR/PRODUCTDIRECTORYNAME/program/unopkg\" add --shared --bundled \"$$CLIENT_BASEDIR/PRODUCTDIRECTORYNAME/share/extension/install/${OXTFILENAME}\" \"-env:UserInstallation=file:////$$INSTDIR\" '-env:UNO_JAVA_JFW_INSTALL_DATA=\$$OOO_BASE_DIR/share/config/javasettingsunopkginstall.xml' '-env:JFW_PLUGIN_DO_NOT_CHECK_ACCESSIBILITY=1'"
-) | $$PKG_INSTALL_ROOT/usr/lib/postrun -b -c UNOPKG
+) | $$POSTRUN -b -c UNOPKG
if [ "$$?" != "0" ]; then
echo "\nERROR: Installation of UNO extension ${OXTFILENAME}"
- echo " through $$PKG_INSTALL_ROOT/usr/lib/postrun failed."
+ echo " through $$POSTRUN failed."
exit 1
fi
else
# No postrun available, try running unopkg directly
- "$$BASEDIR/PRODUCTDIRECTORYNAME/program/unopkg" add --shared --bundled "$$BASEDIR/PRODUCTDIRECTORYNAME/share/extension/install/${OXTFILENAME}" "-env:UserInstallation=file:////$$INSTDIR" '-env:UNO_JAVA_JFW_INSTALL_DATA=$$OOO_BASE_DIR/share/config/javasettingsunopkginstall.xml' '-env:JFW_PLUGIN_DO_NOT_CHECK_ACCESSIBILITY=1'
+ "$$UNOPKG" add --shared --bundled "$$BASEDIR/PRODUCTDIRECTORYNAME/share/extension/install/${OXTFILENAME}" "-env:UserInstallation=file:////$$INSTDIR" '-env:UNO_JAVA_JFW_INSTALL_DATA=$$OOO_BASE_DIR/share/config/javasettingsunopkginstall.xml' '-env:JFW_PLUGIN_DO_NOT_CHECK_ACCESSIBILITY=1'
if [ "$$?" != "0" ]; then
echo "\nERROR: Installation of UNO extension ${OXTFILENAME} failed."
test "$$BASEDIR" = "$$CLIENT_BASEDIR" || echo "ERROR: alternate root install requires SUNWpostrun package to be installed"
@@ -48,7 +60,7 @@ if [ -n "$$INSTDIR" ]; then
rm -rf "$$INSTDIR"
fi
-exit 0
+exit 0
END
%preremove << END
@@ -79,7 +91,7 @@ if [ -x $$PKG_INSTALL_ROOT/usr/lib/postrun ]; then
echo "umask 022"
echo "\"$$CLIENT_BASEDIR/PRODUCTDIRECTORYNAME/program/unopkg\" remove --shared --bundled \"${OXTFILENAME}\" \"-env:UserInstallation=file:////$$INSTDIR\" '-env:UNO_JAVA_JFW_INSTALL_DATA=\$$OOO_BASE_DIR/share/config/javasettingsunopkginstall.xml' '-env:JFW_PLUGIN_DO_NOT_CHECK_ACCESSIBILITY=1'"
echo "rm -rf \"$$INSTDIR\""
-) | $$PKG_INSTALL_ROOT/usr/lib/postrun -b -c UNOPKG
+) | $$PKG_INSTALL_ROOT/usr/lib/postrun -c UNOPKG
else
# No postrun available, try running unopkg directly
test -x $$BASEDIR/PRODUCTDIRECTORYNAME/program/unopkg || exit 0
commit 537318817dd0ee40f6ca4651d113faf2160783b4
Author: Jens-Heiner Rechtien <hr at openoffice.org>
Date: Tue Jul 28 09:21:19 2009 +0000
CWS-TOOLING: integrate CWS fwk112
2009-07-17 08:54:15 +0200 cd r274075 : #i102094# MinGW needs additional path info for linking
2009-07-13 15:09:07 +0200 cd r273938 : #i102094# Add special part for MinGW linking to imagehlp.lib
2009-07-10 08:05:14 +0200 cd r273871 : #i102094# Use size_t for constant values to fix warnings
2009-07-09 13:45:27 +0200 cd r273859 : #i102094# MinGW needs include malloc.h for function alloca
2009-07-09 12:37:39 +0200 cd r273856 : #i102094# Fix problem with signed/unsigned comparision warning
2009-06-19 11:34:40 +0200 cd r273154 : #i102094# Added comment for future maintenance
2009-06-19 11:34:11 +0200 cd r273153 : #i102094# Added comment for future maintenance
2009-06-16 17:25:03 +0200 cd r273032 : #i102094# Extend md5.cxx to detect Windows PE images and ignore PE header date+time/checksum to have the same MD5 checksum
2009-06-16 17:22:47 +0200 cd r273031 : #i102094# Added rebase custom action
2009-06-16 17:01:12 +0200 cd r273030 : #i102094# Use rebaseoo.exe instead of rebase.exe to prevent clash with build tool
2009-06-16 17:00:34 +0200 cd r273029 : #i102094# Execute rebase custom action for administrative installations
2009-06-16 16:59:11 +0200 cd r273028 : #i102094# Small changes for rebaseoo/rebasegui tools
2009-06-16 16:58:29 +0200 cd r273027 : i102094# Deliver rebase tool as rebaseoo.exe as build env already use a rebase.exe
2009-06-16 16:57:15 +0200 cd r273026 : i102094# Crash reporter should not use PE header date+time/checksum data for MD5 checksum
2009-05-29 17:03:26 +0200 cd r272474 : #i102094# Fix wrong deliver statement
2009-05-29 14:55:35 +0200 cd r272459 : #i102904# Make executables more robust. Add error message if installation cannot be found
2009-05-28 17:41:07 +0200 cd r272422 : CWS-TOOLING: rebase CWS fwk112 to trunk at 272291 (milestone: DEV300:m49)
2009-05-28 17:31:27 +0200 cd r272421 : #i10000# Resolve conflict on merge
2009-05-28 15:32:09 +0200 cd r272409 : #i102094# Added resource and localization files for rebasegui tool
2009-05-27 13:56:33 +0200 cd r272341 : #i102094# Added new command line tool to rebase libraries to a default virtual load address. Additional GUI tool to check the state of an installation
2009-05-26 10:49:20 +0200 cd r272285 : #i102094# New command line tool to rebase libraries to a default virtual load address
2009-05-26 10:40:02 +0200 cd r272282 : #i102094# New command line tool to rebase libraries to a default virtual load address
2009-05-26 08:57:24 +0200 cd r272280 : #i102094# Fixed wrong variable usage
2009-05-26 08:41:29 +0200 cd r272278 : #i102094# New command line tool to rebase libraries to a default virtual load address
2009-05-20 16:47:24 +0200 cd r272141 : #102094# Added missing include statement for debug build
2009-05-20 15:39:21 +0200 is r272136 : #102094# rebase to default value in installation
2009-05-20 15:38:38 +0200 is r272135 : #102094# rebase to default value in installation
2009-05-20 15:37:45 +0200 is r272134 : #102094# rebase to default value in installation
diff --git a/crashrep/source/win32/soreport.cpp b/crashrep/source/win32/soreport.cpp
index ffe7414..9cd7e18 100755
--- a/crashrep/source/win32/soreport.cpp
+++ b/crashrep/source/win32/soreport.cpp
@@ -1564,8 +1564,60 @@ static void repatch_soffice_exe( void *pBuffer, size_t nBufSize )
} while ( !bPatched && nBufSize );
}
+// Normalize executable/library images to prevent different MD5 checksums due
+// to a different PE header date/checksum (this doesn't affect the code/data
+// sections of a executable/library. Please see tools/source/bootstrp/md5.cxx
+// where the same method is also used. The tool so_checksum creates the MD5
+// checksums during build time. You have to make sure that both methods use the
+// same algorithm otherwise there could be problems with stack reports.
+static void normalize_pe_image(sal_uInt8* buffer, size_t nBufferSize)
+{
+ const int OFFSET_PE_OFFSET = 0x3c;
+ const int OFFSET_COFF_TIMEDATESTAMP = 4;
+ const int PE_SIGNATURE_SIZE = 4;
+ const int COFFHEADER_SIZE = 20;
+ const int OFFSET_PE_OPTIONALHEADER_CHECKSUM = 64;
+
+ // Check the header part of the file buffer
+ if (buffer[0] == 'M' && buffer[1] == 'Z')
+ {
+ unsigned long PEHeaderOffset = (long)buffer[OFFSET_PE_OFFSET];
+ if (PEHeaderOffset < nBufferSize-4)
+ {
+ if ( buffer[PEHeaderOffset] == 'P' &&
+ buffer[PEHeaderOffset+1] == 'E' &&
+ buffer[PEHeaderOffset+2] == 0 &&
+ buffer[PEHeaderOffset+3] == 0 )
+ {
+ PEHeaderOffset += PE_SIGNATURE_SIZE;
+ if (PEHeaderOffset+OFFSET_COFF_TIMEDATESTAMP < nBufferSize-4)
+ {
+ // Set timedatestamp and checksum fields to a normalized
+ // value to enforce the same MD5 checksum for identical
+ // Windows executables/libraries.
+ buffer[PEHeaderOffset+OFFSET_COFF_TIMEDATESTAMP] = 0;
+ buffer[PEHeaderOffset+OFFSET_COFF_TIMEDATESTAMP+1] = 0;
+ buffer[PEHeaderOffset+OFFSET_COFF_TIMEDATESTAMP+2] = 0;
+ buffer[PEHeaderOffset+OFFSET_COFF_TIMEDATESTAMP+3] = 0;
+ }
+
+ if (PEHeaderOffset+COFFHEADER_SIZE+OFFSET_PE_OPTIONALHEADER_CHECKSUM < nBufferSize-4)
+ {
+ // Set checksum to a normalized value
+ buffer[PEHeaderOffset+COFFHEADER_SIZE+OFFSET_PE_OPTIONALHEADER_CHECKSUM] = 0;
+ buffer[PEHeaderOffset+COFFHEADER_SIZE+OFFSET_PE_OPTIONALHEADER_CHECKSUM+1] = 0;
+ buffer[PEHeaderOffset+COFFHEADER_SIZE+OFFSET_PE_OPTIONALHEADER_CHECKSUM+2] = 0;
+ buffer[PEHeaderOffset+COFFHEADER_SIZE+OFFSET_PE_OPTIONALHEADER_CHECKSUM+3] = 0;
+ }
+ }
+ }
+ }
+}
+
static sal_uInt32 calc_md5_checksum( const char *filename, sal_uInt8 *pChecksum, sal_uInt32 nChecksumLen )
{
+ const int MINIMAL_FILESIZE = 512;
+
sal_uInt32 nBytesProcessed = 0;
FILE *fp = fopen( filename, "rb" );
@@ -1585,6 +1637,8 @@ static sal_uInt32 calc_md5_checksum( const char *filename, sal_uInt8 *pChecksum
{
if ( 0 == stricmp( GetFileName(filename).c_str(), "soffice.bin" ) )
repatch_soffice_exe( pBuffer, nBytesRead );
+ else if ( nFileSize > MINIMAL_FILESIZE )
+ normalize_pe_image( pBuffer, nBytesRead );
rtlDigestError error = rtl_digest_MD5 (
pBuffer, nBytesRead,
diff --git a/setup_native/prj/build.lst b/setup_native/prj/build.lst
index 7966d21..fcb2760 100644
--- a/setup_native/prj/build.lst
+++ b/setup_native/prj/build.lst
@@ -4,6 +4,7 @@ pk setup_native\scripts\source nmake - u sn_sour
pk setup_native\scripts nmake - u sn_scripts sn_source.u NULL
pk setup_native\source\win32\customactions\tools nmake - w sn_tools NULL
pk setup_native\source\win32\customactions\relnotes nmake - w sn_relnotes NULL
+pk setup_native\source\win32\customactions\rebase nmake - w sn_rebase NULL
pk setup_native\source\win32\customactions\regactivex nmake - w sn_regactivex NULL
pk setup_native\source\win32\customactions\regpatchactivex nmake - w sn_regpatchactivex NULL
pk setup_native\source\win32\customactions\reg4allmsdoc nmake - w sn_reg4allmsdoc NULL
diff --git a/setup_native/source/win32/customactions/rebase/makefile.mk b/setup_native/source/win32/customactions/rebase/makefile.mk
new file mode 100644
index 0000000..6694c8c
--- /dev/null
+++ b/setup_native/source/win32/customactions/rebase/makefile.mk
@@ -0,0 +1,94 @@
+#*************************************************************************
+#
+# 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
+#
+# $RCSfile: makefile.mk,v $
+#
+# $Revision: 1.7 $
+#
+# 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.
+#
+#*************************************************************************
+
+PRJ=..$/..$/..$/..
+PRJNAME=setup_native
+TARGET=rebase
+
+# --- Settings -----------------------------------------------------
+
+LIBTARGET=NO
+ENABLE_EXCEPTIONS=TRUE
+NO_DEFAULT_STL=TRUE
+DYNAMIC_CRT=
+USE_DEFFILE=TRUE
+MINGW_NODLL=YES
+
+.INCLUDE : settings.mk
+
+.IF "$(USE_SYSTEM_STL)" != "YES"
+CFLAGS+=-D_STLP_USE_STATIC_LIB
+.ENDIF
+
+UWINAPILIB=
+
+# --- Files --------------------------------------------------------
+
+.IF "$(GUI)"=="WNT"
+
+STDSHL += \
+ $(ADVAPI32LIB)\
+ $(SHELL32LIB)\
+ $(MSILIB)
+
+.IF "$(USE_SYSTEM_STL)" != "YES"
+STDSHL += $(LIBSTLPORTST)
+.ENDIF
+
+.IF "$(COM)"=="GCC"
+STDSHL+= \
+ $(KERNEL32LIB)\
+ -lmsvcrt \
+ $(PSDK_HOME)$/lib$/imagehlp.lib
+.ELSE
+STDSHL+= \
+ Imagehlp.lib
+.ENDIF
+
+SHL1OBJS = \
+ $(SLO)$/rebase.obj
+
+SHL1TARGET = $(TARGET)
+SHL1IMPLIB = i$(TARGET)
+
+SHL1DEF = $(MISC)$/$(SHL1TARGET).def
+SHL1BASE = 0x1c000000
+DEF1NAME=$(SHL1TARGET)
+SHL1DEPN=$(SHL1OBJS)
+DEF1EXPORTFILE=$(TARGET).dxp
+
+.ENDIF
+
+# --- Targets --------------------------------------------------------------
+
+.INCLUDE : target.mk
+
+# -------------------------------------------------------------------------
diff --git a/setup_native/source/win32/customactions/rebase/rebase.cxx b/setup_native/source/win32/customactions/rebase/rebase.cxx
new file mode 100644
index 0000000..c2630ed
--- /dev/null
+++ b/setup_native/source/win32/customactions/rebase/rebase.cxx
@@ -0,0 +1,168 @@
+#undef UNICODE
+#undef _UNICODE
+
+#pragma once
+
+#ifdef _MSC_VER
+#pragma warning(push, 1) /* disable warnings within system headers */
+#endif
+#define WIN32_LEAN_AND_MEAN
+#include <windows.h>
+#include <msiquery.h>
+#include <imagehlp.h>
+#include <tchar.h>
+#include <strsafe.h>
+#ifdef _MSC_VER
+#pragma warning(pop)
+#endif
+
+#include <malloc.h>
+#include <time.h>
+#include <string>
+
+const DWORD PE_Signature = 0x00004550;
+
+#ifdef DEBUG
+inline void OutputDebugStringFormat( LPCSTR pFormat, ... )
+{
+ CHAR buffer[1024];
+ va_list args;
+
+ va_start( args, pFormat );
+ StringCchVPrintfA( buffer, sizeof(buffer), pFormat, args );
+ OutputDebugStringA( buffer );
+}
+#else
+static inline void OutputDebugStringFormat( LPCSTR, ... )
+{
+}
+#endif
+
+static bool IsValidHandle( HANDLE handle )
+{
+ return NULL != handle && INVALID_HANDLE_VALUE != handle;
+}
+
+static std::string GetMsiProperty(MSIHANDLE handle, const std::string& sProperty)
+{
+ std::string result;
+ TCHAR szDummy[1] = TEXT("");
+ DWORD nChars = 0;
+
+ if (MsiGetProperty(handle, sProperty.c_str(), szDummy, &nChars) == ERROR_MORE_DATA)
+ {
+ DWORD nBytes = ++nChars * sizeof(TCHAR);
+ LPTSTR buffer = reinterpret_cast<LPTSTR>(_alloca(nBytes));
+ ZeroMemory( buffer, nBytes );
+ MsiGetProperty(handle, sProperty.c_str(), buffer, &nChars);
+ result = buffer;
+ }
+ return result;
+}
+
+static BOOL rebaseImage( const std::string& filePath, LPVOID address )
+{
+ ULONG ulOldImageSize;
+ ULONG_PTR lpOldImageBase;
+ ULONG ulNewImageSize;
+ ULONG_PTR lpNewImageBase = reinterpret_cast<ULONG_PTR>(address);
+
+ BOOL bResult = ReBaseImage(
+ filePath.c_str(),
+ "",
+ TRUE,
+ FALSE,
+ FALSE,
+ 0,
+ &ulOldImageSize,
+ &lpOldImageBase,
+ &ulNewImageSize,
+ &lpNewImageBase,
+ (ULONG)time(NULL) );
+
+ return bResult;
+}
+
+static BOOL rebaseImage( MSIHANDLE /*handle*/, const std::string& sFilePath, LPVOID address )
+{
+ std::string mystr;
+ mystr = "Full file: " + sFilePath;
+
+ BOOL bResult = rebaseImage( sFilePath, address );
+
+ if ( !bResult )
+ {
+ OutputDebugStringFormat( "Rebasing library %s failed", mystr.c_str() );
+ }
+
+ return bResult;
+}
+
+static BOOL rebaseImagesInFolder( MSIHANDLE handle, const std::string& sPath, LPVOID address )
+{
+ std::string sDir = sPath;
+ std::string sPattern = sPath + TEXT("*.dll");
+
+ WIN32_FIND_DATA aFindFileData;
+ HANDLE hFind = FindFirstFile( sPattern.c_str(), &aFindFileData );
+
+ if ( IsValidHandle(hFind) )
+ {
+ BOOL fSuccess = false;
+
+ do
+ {
+ std::string sLibFile = sDir + aFindFileData.cFileName;
+ rebaseImage( handle, sLibFile, address );
+ fSuccess = FindNextFile( hFind, &aFindFileData );
+ }
+ while ( fSuccess );
+
+ FindClose( hFind );
+ }
+
+ return ERROR_SUCCESS;
+}
+
+static BOOL rebaseImages( MSIHANDLE handle, LPVOID pAddress )
+{
+ std::string sOfficeInstallPath = GetMsiProperty(handle, TEXT("OFFICEINSTALLLOCATION"));
+ std::string sBasisInstallPath = GetMsiProperty(handle, TEXT("BASISINSTALLLOCATION"));
+ std::string sUreInstallPath = GetMsiProperty(handle, TEXT("UREINSTALLLOCATION"));
+
+ std::string sBasisDir = sBasisInstallPath + TEXT("program\\");
+ std::string sOfficeDir = sOfficeInstallPath + TEXT("program\\");
+ std::string sUreDir = sUreInstallPath + TEXT("bin\\");
+
+ BOOL bResult = rebaseImagesInFolder( handle, sBasisDir, pAddress );
+ bResult &= rebaseImagesInFolder( handle, sOfficeDir, pAddress );
+ bResult &= rebaseImagesInFolder( handle, sUreDir, pAddress );
+
+ return bResult;
+}
+
+static BOOL IsServerSystem( MSIHANDLE /*handle*/ )
+{
+ OSVERSIONINFOEX osVersionInfoEx;
+ osVersionInfoEx.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEX);
+ GetVersionEx(reinterpret_cast<LPOSVERSIONINFO>(&osVersionInfoEx));
+
+ if ( osVersionInfoEx.wProductType != VER_NT_WORKSTATION )
+ return TRUE;
+ else
+ return FALSE;
+}
+
+extern "C" BOOL __stdcall RebaseLibrariesOnProperties( MSIHANDLE handle )
+{
+ static LPVOID pDefault = reinterpret_cast<LPVOID>(0x10000000);
+
+ std::string sDontOptimizeLibs = GetMsiProperty(handle, TEXT("DONTOPTIMIZELIBS"));
+ if ( sDontOptimizeLibs.length() > 0 && sDontOptimizeLibs == "1" )
+ return TRUE;
+
+ if ( !IsServerSystem( handle ))
+ return rebaseImages( handle, pDefault );
+
+ return TRUE;
+}
diff --git a/setup_native/source/win32/customactions/rebase/rebase.dxp b/setup_native/source/win32/customactions/rebase/rebase.dxp
new file mode 100644
index 0000000..47ea239
--- /dev/null
+++ b/setup_native/source/win32/customactions/rebase/rebase.dxp
@@ -0,0 +1 @@
+RebaseLibrariesOnProperties
More information about the ooo-build-commit
mailing list