diff options
Diffstat (limited to 'setup_native')
56 files changed, 730 insertions, 996 deletions
diff --git a/setup_native/prj/build.lst b/setup_native/prj/build.lst index 4793f6b1e013..76bec6050f7a 100644 --- a/setup_native/prj/build.lst +++ b/setup_native/prj/build.lst @@ -1,15 +1,15 @@ -pk setup_native : l10n l10ntools soltools sal xml2cmp NULL +pk setup_native : TRANSLATIONS:translations l10ntools soltools sal xml2cmp NULL pk setup_native usr1 - all sn_mkout NULL pk setup_native\scripts\source nmake - u sn_source NULL pk setup_native\scripts nmake - u sn_scripts sn_source.u NULL pk setup_native\source\mac nmake - u sn_mac 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 pk setup_native\source\win32\customactions\sellang nmake - w sn_sellang NULL +pk setup_native\source\win32\customactions\thesaurus nmake - w sn_thesaurus NULL pk setup_native\source\win32\customactions\reg64 nmake - w sn_reg64 NULL pk setup_native\source\win32\customactions\javafilter nmake - w sn_javafilter NULL pk setup_native\source\win32\customactions\quickstarter nmake - w sn_quickstarter NULL diff --git a/setup_native/scripts/admin.pl b/setup_native/scripts/admin.pl index ea186f5a8ba4..1aed8214cb30 100644 --- a/setup_native/scripts/admin.pl +++ b/setup_native/scripts/admin.pl @@ -1127,7 +1127,7 @@ sub register_extensions_sync $preregdir =~ s/\/\s*$//g; - my $systemcall = $executable . " sync --verbose -env:BUNDLED_EXTENSIONS_USER=\"file:///" . $preregdir . "\"" . " -env:UserInstallation=file:///" . $localtemppath . " 2\>\&1 |"; + my $systemcall = $executable . " sync --verbose 2\>\&1 |"; print "... $systemcall\n"; diff --git a/setup_native/scripts/install_solaris.sh b/setup_native/scripts/install_solaris.sh index 624999f44f37..bb792bcf2618 100644 --- a/setup_native/scripts/install_solaris.sh +++ b/setup_native/scripts/install_solaris.sh @@ -244,7 +244,7 @@ else CMD=/tmp/userinstall.$$; echo "" > $CMD fi -sed -e 's|"/|"${PKG_INSTALL_ROOT}/|g' > $CMD +sed -e 's|/opt/|${PKG_INSTALL_ROOT}/opt/|g' > $CMD /bin/sh -e $CMD rm -f $CMD EOF diff --git a/setup_native/scripts/osx_install_languagepack.applescript b/setup_native/scripts/osx_install_languagepack.applescript index f889d09bcbf2..e2e23b2d4688 100644 --- a/setup_native/scripts/osx_install_languagepack.applescript +++ b/setup_native/scripts/osx_install_languagepack.applescript @@ -46,13 +46,38 @@ if (button returned of result) is AbortLabel then return 2 end if -set the found_ooos to (do shell script "mdfind \"kMDItemContentType == 'com.apple.application-bundle' && kMDItemDisplayName == '[PRODUCTNAME]*' && kMDItemDisplayName != '[FULLPRODUCTNAME].app'\"") & " +set the found_ooos_all to (do shell script "mdfind \"kMDItemContentType == 'com.apple.application-bundle' && kMDItemDisplayName == '[PRODUCTNAME]*' && kMDItemDisplayName != '[FULLAPPPRODUCTNAME].app'\"") & " " & chooseMyOwn +set found_ooos_all_paragraphs to paragraphs in found_ooos_all + +set found_ooos to {} +repeat with currentApp in found_ooos_all_paragraphs + if currentApp does not start with "/Volumes" then + copy currentApp to the end of found_ooos + end if +end repeat + +-- repeat with oneApp in found_ooos +-- display dialog oneApp +-- end repeat + -- the choice returned is of type "list" -- Show selection dialog only if more than one or no product was found -if (get first paragraph of found_ooos) is "" then - set the choice to (choose from list of paragraphs in found_ooos default items (get last paragraph of found_ooos) with prompt listPrompt OK button name listOKLabel cancel button name listCancelLabel) +-- The first item is an empty string, if no app was found and no app started with "/Volumes" +-- The first item is chooseMyOwn, if no app was found and at least one app started with "/Volumes" +if (get first item of found_ooos as string) is "" then + set the choice to (choose from list found_ooos default items (get second item of found_ooos) with prompt listPrompt OK button name listOKLabel cancel button name listCancelLabel) + if choice is false then + -- do nothing, the user cancelled the installation + return 2 --aborted by user + else if (choice as string) is chooseMyOwn then + -- yeah, one needs to use "choose file", otherwise + -- the user would not be able to select the .app + set the choice to POSIX path of (choose file with prompt chooseManual of type "com.apple.application-bundle" without showing package contents and invisibles) + end if +else if (get first item of found_ooos as string) is chooseMyOwn then + set the choice to (choose from list found_ooos default items (get first item of found_ooos) with prompt listPrompt OK button name listOKLabel cancel button name listCancelLabel) if choice is false then -- do nothing, the user cancelled the installation return 2 --aborted by user @@ -61,11 +86,12 @@ if (get first paragraph of found_ooos) is "" then -- the user would not be able to select the .app set the choice to POSIX path of (choose file with prompt chooseManual of type "com.apple.application-bundle" without showing package contents and invisibles) end if -else if (get second paragraph of found_ooos) is chooseMyOwn then +else if (get second item of found_ooos as string) is chooseMyOwn then -- set choice to found installation - set the choice to (get first paragraph of found_ooos) + -- set the choice to (get first paragraph of found_ooos) + set the choice to (get first item of found_ooos) else - set the choice to (choose from list of paragraphs in found_ooos default items (get first paragraph of found_ooos) with prompt listPrompt OK button name listOKLabel cancel button name listCancelLabel) + set the choice to (choose from list found_ooos default items (get first item of found_ooos) with prompt listPrompt OK button name listOKLabel cancel button name listCancelLabel) if choice is false then -- do nothing, the user cancelled the installation return 2 --aborted by user diff --git a/setup_native/scripts/osx_install_patch.applescript b/setup_native/scripts/osx_install_patch.applescript index 33a9d4126339..fc12f20108a6 100644 --- a/setup_native/scripts/osx_install_patch.applescript +++ b/setup_native/scripts/osx_install_patch.applescript @@ -43,13 +43,38 @@ if (button returned of result) is AbortLabel then return 2 end if -set the found_ooos to (do shell script "mdfind \"kMDItemContentType == 'com.apple.application-bundle' && kMDItemDisplayName == '[PRODUCTNAME]*' && kMDItemDisplayName != '[FULLPRODUCTNAME].app'\"") & " +set the found_ooos_all to (do shell script "mdfind \"kMDItemContentType == 'com.apple.application-bundle' && kMDItemDisplayName == '[PRODUCTNAME]*' && kMDItemDisplayName != '[FULLAPPPRODUCTNAME].app'\"") & " " & chooseMyOwn +set found_ooos_all_paragraphs to paragraphs in found_ooos_all + +set found_ooos to {} +repeat with currentApp in found_ooos_all_paragraphs + if currentApp does not start with "/Volumes" then + copy currentApp to the end of found_ooos + end if +end repeat + +-- repeat with oneApp in found_ooos +-- display dialog oneApp +-- end repeat + -- the choice returned is of type "list" -- Show selection dialog only if more than one or no product was found -if (get first paragraph of found_ooos) is "" then - set the choice to (choose from list of paragraphs in found_ooos default items (get last paragraph of found_ooos) with prompt listPrompt OK button name listOKLabel cancel button name listCancelLabel) +-- The first item is an empty string, if no app was found and no app started with "/Volumes" +-- The first item is chooseMyOwn, if no app was found and at least one app started with "/Volumes" +if (get first item of found_ooos as string) is "" then + set the choice to (choose from list found_ooos default items (get second item of found_ooos) with prompt listPrompt OK button name listOKLabel cancel button name listCancelLabel) + if choice is false then + -- do nothing, the user cancelled the installation + return 2 --aborted by user + else if (choice as string) is chooseMyOwn then + -- yeah, one needs to use "choose file", otherwise + -- the user would not be able to select the .app + set the choice to POSIX path of (choose file with prompt chooseManual of type "com.apple.application-bundle" without showing package contents and invisibles) + end if +else if (get first item of found_ooos as string) is chooseMyOwn then + set the choice to (choose from list found_ooos default items (get first item of found_ooos) with prompt listPrompt OK button name listOKLabel cancel button name listCancelLabel) if choice is false then -- do nothing, the user cancelled the installation return 2 --aborted by user @@ -58,11 +83,12 @@ if (get first paragraph of found_ooos) is "" then -- the user would not be able to select the .app set the choice to POSIX path of (choose file with prompt chooseManual of type "com.apple.application-bundle" without showing package contents and invisibles) end if -else if (get second paragraph of found_ooos) is chooseMyOwn then +else if (get second item of found_ooos as string) is chooseMyOwn then -- set choice to found installation - set the choice to (get first paragraph of found_ooos) + -- set the choice to (get first paragraph of found_ooos) + set the choice to (get first item of found_ooos) else - set the choice to (choose from list of paragraphs in found_ooos default items (get first paragraph of found_ooos) with prompt listPrompt OK button name listOKLabel cancel button name listCancelLabel) + set the choice to (choose from list found_ooos default items (get first item of found_ooos) with prompt listPrompt OK button name listOKLabel cancel button name listCancelLabel) if choice is false then -- do nothing, the user cancelled the installation return 2 --aborted by user diff --git a/setup_native/source/mac/Info.plist.langpack b/setup_native/source/mac/Info.plist.langpack index 92933205ff4b..2b16559eaddf 100644 --- a/setup_native/source/mac/Info.plist.langpack +++ b/setup_native/source/mac/Info.plist.langpack @@ -10,9 +10,9 @@ <key>UTImportedTypeDeclarations</key> <key>CFBundleExecutable</key> - <string>[FULLPRODUCTNAME]</string> + <string>[FULLAPPPRODUCTNAME]</string> <key>CFBundleGetInfoString</key> - <string>[FULLPRODUCTNAME]</string> + <string>[FULLAPPPRODUCTNAME]</string> <key>CFBundleIconFile</key> <string>ooo3_installer.icns</string> <key>CFBundleShortVersionString</key> @@ -22,7 +22,7 @@ <key>CFBundleInfoDictionaryVersion</key> <string>6.0</string> <key>CFBundleName</key> - <string>[FULLPRODUCTNAME]</string> + <string>[FULLAPPPRODUCTNAME]</string> <key>CFBundlePackageType</key> <string>APPL</string> <key>CFBundleSignature</key> diff --git a/setup_native/source/mac/broffice/DS_Store b/setup_native/source/mac/broffice/DS_Store Binary files differindex b0407ef50452..a534e3bedbf8 100644 --- a/setup_native/source/mac/broffice/DS_Store +++ b/setup_native/source/mac/broffice/DS_Store diff --git a/setup_native/source/mac/ooo/DS_Store b/setup_native/source/mac/ooo/DS_Store Binary files differindex 4f65b8132b00..af137c0e6c41 100644 --- a/setup_native/source/mac/ooo/DS_Store +++ b/setup_native/source/mac/ooo/DS_Store diff --git a/setup_native/source/mac/ooo/DS_Store_Langpack b/setup_native/source/mac/ooo/DS_Store_Langpack Binary files differindex 3a8ad71a5660..21b08ffb18cc 100644 --- a/setup_native/source/mac/ooo/DS_Store_Langpack +++ b/setup_native/source/mac/ooo/DS_Store_Langpack diff --git a/setup_native/source/mac/ooo3_installer.icns b/setup_native/source/mac/ooo3_installer.icns Binary files differindex e064ad70479d..bacdd17d8470 100644 --- a/setup_native/source/mac/ooo3_installer.icns +++ b/setup_native/source/mac/ooo3_installer.icns diff --git a/setup_native/source/packinfo/packinfo_extensions.txt b/setup_native/source/packinfo/packinfo_extensions.txt index 38c2f9c3214a..7d76ef7f95f6 100644 --- a/setup_native/source/packinfo/packinfo_extensions.txt +++ b/setup_native/source/packinfo/packinfo_extensions.txt @@ -301,3 +301,48 @@ description = "oooblogger extension for %PRODUCTNAME %PRODUCTVERSION" destpath = "/opt" packageversion = "%PACKAGEVERSION" End + +Start +module = "gid_Module_Optional_Extensions_Script_Provider_For_Beanshell" +solarispackagename = "%BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-extension-beanshell-script-provider" +solarisrequires = "%BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core01 (Name="Core module for %PRODUCTNAME %PRODUCTVERSION"), %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core02 (Name="Core module for %PRODUCTNAME %PRODUCTVERSION"), %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core03 (Name="Core module for %PRODUCTNAME %PRODUCTVERSION"), %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core04 (Name="Core module for %PRODUCTNAME %PRODUCTVERSION"), %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core05 (Name="Core module for %PRODUCTNAME %PRODUCTVERSION"), %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core06 (Name="Core module for %PRODUCTNAME %PRODUCTVERSION"), %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core07 (Name="Core module for %PRODUCTNAME %PRODUCTVERSION")" +packagename = "%BASISPACKAGEPREFIX%OOOBASEVERSION-extension-beanshell-script-provider" +requires = "%BASISPACKAGEPREFIX%OOOBASEVERSION-core01,%BASISPACKAGEPREFIX%OOOBASEVERSION-core02,%BASISPACKAGEPREFIX%OOOBASEVERSION-core03,%BASISPACKAGEPREFIX%OOOBASEVERSION-core04,%BASISPACKAGEPREFIX%OOOBASEVERSION-core05,%BASISPACKAGEPREFIX%OOOBASEVERSION-core06,%BASISPACKAGEPREFIX%OOOBASEVERSION-core07" +linuxpatchrequires = "" +copyright = "1999-2008 by OpenOffice.org" +solariscopyright = "solariscopyrightfile" +vendor = "OpenOffice.org" +description = "Script provider for BeanShell extension for %PRODUCTNAME %PRODUCTVERSION" +destpath = "/opt" +packageversion = "%PACKAGEVERSION" +End + +Start +module = "gid_Module_Optional_Extensions_Script_Provider_For_Javascript" +solarispackagename = "%BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-extension-javascript-script-provider" +solarisrequires = "%BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core01 (Name="Core module for %PRODUCTNAME %PRODUCTVERSION"), %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core02 (Name="Core module for %PRODUCTNAME %PRODUCTVERSION"), %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core03 (Name="Core module for %PRODUCTNAME %PRODUCTVERSION"), %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core04 (Name="Core module for %PRODUCTNAME %PRODUCTVERSION"), %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core05 (Name="Core module for %PRODUCTNAME %PRODUCTVERSION"), %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core06 (Name="Core module for %PRODUCTNAME %PRODUCTVERSION"), %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core07 (Name="Core module for %PRODUCTNAME %PRODUCTVERSION")" +packagename = "%BASISPACKAGEPREFIX%OOOBASEVERSION-extension-javascript-script-provider" +requires = "%BASISPACKAGEPREFIX%OOOBASEVERSION-core01,%BASISPACKAGEPREFIX%OOOBASEVERSION-core02,%BASISPACKAGEPREFIX%OOOBASEVERSION-core03,%BASISPACKAGEPREFIX%OOOBASEVERSION-core04,%BASISPACKAGEPREFIX%OOOBASEVERSION-core05,%BASISPACKAGEPREFIX%OOOBASEVERSION-core06,%BASISPACKAGEPREFIX%OOOBASEVERSION-core07" +linuxpatchrequires = "" +copyright = "1999-2008 by OpenOffice.org" +solariscopyright = "solariscopyrightfile" +vendor = "OpenOffice.org" +description = "Script provider for JavaScript extension for %PRODUCTNAME %PRODUCTVERSION" +destpath = "/opt" +packageversion = "%PACKAGEVERSION" +End + +Start +module = "gid_Module_Optional_Extensions_Script_Provider_For_Python" +solarispackagename = "%BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-extension-python-script-provider" +solarisrequires = "%BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core01 (Name="Core module for %PRODUCTNAME %PRODUCTVERSION"), %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core02 (Name="Core module for %PRODUCTNAME %PRODUCTVERSION"), %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core03 (Name="Core module for %PRODUCTNAME %PRODUCTVERSION"), %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core04 (Name="Core module for %PRODUCTNAME %PRODUCTVERSION"), %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core05 (Name="Core module for %PRODUCTNAME %PRODUCTVERSION"), %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core06 (Name="Core module for %PRODUCTNAME %PRODUCTVERSION"), %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core07 (Name="Core module for %PRODUCTNAME %PRODUCTVERSION")" +packagename = "%BASISPACKAGEPREFIX%OOOBASEVERSION-extension-python-script-provider" +requires = "%BASISPACKAGEPREFIX%OOOBASEVERSION-core01,%BASISPACKAGEPREFIX%OOOBASEVERSION-core02,%BASISPACKAGEPREFIX%OOOBASEVERSION-core03,%BASISPACKAGEPREFIX%OOOBASEVERSION-core04,%BASISPACKAGEPREFIX%OOOBASEVERSION-core05,%BASISPACKAGEPREFIX%OOOBASEVERSION-core06,%BASISPACKAGEPREFIX%OOOBASEVERSION-core07" +linuxpatchrequires = "" +copyright = "1999-2008 by OpenOffice.org" +solariscopyright = "solariscopyrightfile" +vendor = "OpenOffice.org" +description = "Script provider for Python extension for %PRODUCTNAME %PRODUCTVERSION" +destpath = "/opt" +packageversion = "%PACKAGEVERSION" +End diff --git a/setup_native/source/packinfo/packinfo_office.txt b/setup_native/source/packinfo/packinfo_office.txt index 988d60f75ab0..588487ee41d0 100755 --- a/setup_native/source/packinfo/packinfo_office.txt +++ b/setup_native/source/packinfo/packinfo_office.txt @@ -582,7 +582,7 @@ linuxpatchrequires = "" copyright = "1999-2010 by Oracle" solariscopyright = "solariscopyrightfile" vendor = "Oracle" -description = "De-AT dictionary for %PACKAGENAME %PRODUCTVERSION" +description = "De-AT dictionary for %PRODUCTNAME %PRODUCTVERSION" destpath = "/opt" packageversion = "%PACKAGEVERSION" End @@ -598,7 +598,7 @@ linuxpatchrequires = "" copyright = "1999-2010 by Oracle" solariscopyright = "solariscopyrightfile" vendor = "Oracle" -description = "De-CH dictionary for %PACKAGENAME %PRODUCTVERSION" +description = "De-CH dictionary for %PRODUCTNAME %PRODUCTVERSION" destpath = "/opt" packageversion = "%PACKAGEVERSION" End @@ -614,7 +614,7 @@ linuxpatchrequires = "" copyright = "1999-2010 by Oracle" solariscopyright = "solariscopyrightfile" vendor = "Oracle" -description = "De-DE dictionary for %PACKAGENAME %PRODUCTVERSION" +description = "De-DE dictionary for %PRODUCTNAME %PRODUCTVERSION" destpath = "/opt" packageversion = "%PACKAGEVERSION" End diff --git a/setup_native/source/packinfo/packinfo_sdkoo.txt b/setup_native/source/packinfo/packinfo_sdkoo.txt index 2855a1467de8..3e3e1d579fad 100755 --- a/setup_native/source/packinfo/packinfo_sdkoo.txt +++ b/setup_native/source/packinfo/packinfo_sdkoo.txt @@ -26,7 +26,7 @@ #************************************************************************* Start -module = "gid_Module_Root" +module = "gid_Module_Root_SDK" solarispackagename = "%BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-sdk" solarisrequires = "%BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core01, SUNWbtool (Name="CCS tools bundled with SunOS"), SUNWxcu4 (Name="XCU4 Utilities")" packagename = "%BASISPACKAGEPREFIX%OOOBASEVERSION-sdk" diff --git a/setup_native/source/packinfo/shellscripts_extensions.txt b/setup_native/source/packinfo/shellscripts_extensions.txt index c73e7fae5838..0be870990b71 100755 --- a/setup_native/source/packinfo/shellscripts_extensions.txt +++ b/setup_native/source/packinfo/shellscripts_extensions.txt @@ -2,26 +2,6 @@ %postinstall << END -if [ -n "$$TMPDIR" ]; then - UNOPKGTMP="$$TMPDIR" -elif [ -n "$$TMP" ]; then - UNOPKGTMP="$$TMP" -elif [ -d "/tmp" ]; then - UNOPKGTMP="/tmp" -else - echo "No tmp directory found!" - exit 1 -fi - -#Create the command which creates a temporary directory -if [ -x "/usr/bin/mktemp" ] -then - INSTDIR=`/usr/bin/mktemp -d "$${UNOPKGTMP}/userinstall.XXXXXX"` -else - INSTDIR="$${UNOPKGTMP}/userinstall.$$$$" - mkdir "$$INSTDIR" -fi - # # Need to check diskless service install and make sure use the correct unpkg # @@ -38,7 +18,7 @@ fi if [ -x $$POSTRUN ]; then ( echo "test -x \"$$CLIENT_BASEDIR/PRODUCTDIRECTORYNAME/program/unopkg\" || exit 0" echo "umask 022" - echo "\"$$CLIENT_BASEDIR/PRODUCTDIRECTORYNAME/program/unopkg\" sync \"-env:BUNDLED_EXTENSIONS_USER=file:////$$CLIENT_BASEDIR/PRODUCTDIRECTORYNAME/share/prereg/bundled\" \"-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 "\"$$CLIENT_BASEDIR/PRODUCTDIRECTORYNAME/program/unopkg\" sync" echo "find \"$$CLIENT_BASEDIR/PRODUCTDIRECTORYNAME/share/prereg/bundled\" -type f -exec chmod 644 {} \\;" ) | $$POSTRUN -b -c UNOPKG if [ "$$?" != "0" ]; then @@ -48,7 +28,7 @@ if [ -x $$POSTRUN ]; then fi else # No postrun available, try running unopkg directly - "$$UNOPKG" sync "-env:BUNDLED_EXTENSIONS_USER=file:////////$$BASEDIR/PRODUCTDIRECTORYNAME/share/prereg/bundled" "-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" sync find "$$BASEDIR/PRODUCTDIRECTORYNAME/share/prereg/bundled" -type f -exec chmod 644 {} \; if [ "$$?" != "0" ]; then echo "\nERROR: Installation of UNO extensions failed." @@ -58,48 +38,23 @@ else fi fi -if [ -n "$$INSTDIR" ]; then - rm -rf "$$INSTDIR" -fi - exit 0 END %postremove << END -if [ -n "$$TMPDIR" ]; then - UNOPKGTMP="$$TMPDIR" -elif [ -n "$$TMP" ]; then - UNOPKGTMP="$$TMP" -elif [ -d "/tmp" ]; then - UNOPKGTMP="/tmp" -else - echo "No tmp directory found!" - exit 1 -fi - -#Create the command which creates a temporary directory -if [ -x "/usr/bin/mktemp" ] -then - INSTDIR=`/usr/bin/mktemp -d "$${UNOPKGTMP}/userinstall.XXXXXX"` -else - INSTDIR="$${UNOPKGTMP}/userinstall.$$$$" - mkdir "$$INSTDIR" -fi - # Use postrun command on Solaris where available (OpenSolaris) if [ -x $$PKG_INSTALL_ROOT/usr/lib/postrun ]; then ( echo "test -x \"$$CLIENT_BASEDIR/PRODUCTDIRECTORYNAME/program/unopkg\" || exit 0" echo "cd \"$$CLIENT_BASEDIR/PRODUCTDIRECTORYNAME/program\"" echo "umask 022" - echo "\"$$CLIENT_BASEDIR/PRODUCTDIRECTORYNAME/program/unopkg\" sync \"-env:BUNDLED_EXTENSIONS_USER=file:////$$CLIENT_BASEDIR/PRODUCTDIRECTORYNAME/share/prereg/bundled\" \"-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 "\"$$CLIENT_BASEDIR/PRODUCTDIRECTORYNAME/program/unopkg\" sync" echo "find \"$$CLIENT_BASEDIR/PRODUCTDIRECTORYNAME/share/prereg/bundled\" -type f -exec chmod 644 {} \\;" - echo "rm -rf \"$$INSTDIR\"" ) | $$PKG_INSTALL_ROOT/usr/lib/postrun -c UNOPKG else # No postrun available, try running unopkg directly test -x $$BASEDIR/PRODUCTDIRECTORYNAME/program/unopkg || exit 0 - "$$BASEDIR/PRODUCTDIRECTORYNAME/program/unopkg" sync "-env:BUNDLED_EXTENSIONS_USER=file:////////$$BASEDIR/PRODUCTDIRECTORYNAME/share/prereg/bundled" "-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' + "$$BASEDIR/PRODUCTDIRECTORYNAME/program/unopkg" sync echo "find \"$$BASEDIR/PRODUCTDIRECTORYNAME/share/prereg/bundled\" -type f -exec chmod 644 {} \\;" if [ "$$?" != "0" ]; then echo "\nERROR: Removal of UNO extension failed." @@ -109,9 +64,6 @@ else fi fi -if [ -n "$$INSTDIR" ]; then - rm -rf "$$INSTDIR" -fi exit 0 END @@ -121,151 +73,47 @@ END %format rpm %postinstall << END -#Find the temp dir -if [ -n "$$TMPDIR" ]; then - UNOPKGTMP="$$TMPDIR" -elif [ -n "$$TMP" ]; then - UNOPKGTMP="$$TMP" -elif [ -d "/tmp" ]; then - UNOPKGTMP="/tmp" -else - echo "No tmp directory found!" - exit 1 -fi - -#Create the command which creates a temporary directory -if [ -x "/bin/mktemp" ] -then - INSTDIR=`/bin/mktemp -d "$${UNOPKGTMP}/userinstall.XXXXXX"` -else - INSTDIR="$${UNOPKGTMP}/userinstall.$$$$" - mkdir "$$INSTDIR" -fi if [ -x "$$RPM_INSTALL_PREFIX/PRODUCTDIRECTORYNAME/program/unopkg" ]; then - "$$RPM_INSTALL_PREFIX/PRODUCTDIRECTORYNAME/program/unopkg" sync "-env:BUNDLED_EXTENSIONS_USER=file:////$$RPM_INSTALL_PREFIX/PRODUCTDIRECTORYNAME/share/prereg/bundled" "-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' + "$$RPM_INSTALL_PREFIX/PRODUCTDIRECTORYNAME/program/unopkg" sync find "$$RPM_INSTALL_PREFIX/PRODUCTDIRECTORYNAME/share/prereg/bundled" -type f -exec chmod 644 {} \; fi -if [ -n "$$INSTDIR" ]; then - rm -rf "$$INSTDIR" -fi - exit 0 END %postremove << END -#Find the temp dir -if [ -n "$$TMPDIR" ]; then - UNOPKGTMP="$$TMPDIR" -elif [ -n "$$TMP" ]; then - UNOPKGTMP="$$TMP" -elif [ -d "/tmp" ]; then - UNOPKGTMP="/tmp" -else - echo "No tmp directory found!" - exit 1 -fi - -#Create the command which creates a temporary directory -if [ -x "/bin/mktemp" ] -then - INSTDIR=`/bin/mktemp -d "$${UNOPKGTMP}/userinstall.XXXXXX"` -else - INSTDIR="$${UNOPKGTMP}/userinstall.$$$$" - mkdir "$$INSTDIR" -fi if [ -x "$$RPM_INSTALL_PREFIX/PRODUCTDIRECTORYNAME/program/unopkg" ]; then - "$$RPM_INSTALL_PREFIX/PRODUCTDIRECTORYNAME/program/unopkg" sync "-env:BUNDLED_EXTENSIONS_USER=file:////$$RPM_INSTALL_PREFIX/PRODUCTDIRECTORYNAME/share/prereg/bundled" "-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' + "$$RPM_INSTALL_PREFIX/PRODUCTDIRECTORYNAME/program/unopkg" sync find "$$RPM_INSTALL_PREFIX/PRODUCTDIRECTORYNAME/share/prereg/bundled" -type f -exec chmod 644 {} \; fi -if [ -n "$$INSTDIR" ]; then - rm -rf "$$INSTDIR" -fi - exit 0 END %format deb %postinstall << END -#Find the temp dir -if [ -n "$$TMPDIR" ] -then - UNOPKGTMP="$$TMPDIR" -elif [ -n "$$TMP" ] -then - UNOPKGTMP="$$TMP" -elif [ -d "/tmp" ] -then - UNOPKGTMP="/tmp" -else - echo "No tmp directory found!" - exit 1 -fi - -#Create the command which creates a temporary directory -if [ -x "/bin/mktemp" ] -then - INSTDIR=`/bin/mktemp -d "$${UNOPKGTMP}/userinstall.XXXXXX"` -else - INSTDIR="$${UNOPKGTMP}/userinstall.$$$$" - mkdir "$$INSTDIR" -fi if [ -x "PRODUCTDIRECTORYNAME/program/unopkg" ]; then - "PRODUCTDIRECTORYNAME/program/unopkg" sync "-env:BUNDLED_EXTENSIONS_USER=file://////PRODUCTDIRECTORYNAME/share/prereg/bundled" "-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' + "PRODUCTDIRECTORYNAME/program/unopkg" sync find "PRODUCTDIRECTORYNAME/share/prereg/bundled" -type f -exec chmod 644 {} \; fi -if [ -n "$$INSTDIR" ] -then - rm -rf "$$INSTDIR" -fi - exit 0 END %postremove << END -# Find the temp dir -if [ -n "$$TMPDIR" ] -then - UNOPKGTMP="$$TMPDIR" -elif [ -n "$$TMP" ] -then - UNOPKGTMP="$$TMP" -elif [ -d "/tmp" ] -then - UNOPKGTMP="/tmp" -else - echo "No tmp directory found!" - exit 1 -fi - -#Create the command which creates a temporary directory -if [ -x "/bin/mktemp" ] -then - INSTDIR=`/bin/mktemp -d "$${UNOPKGTMP}/userinstall.XXXXXX"` -else - INSTDIR="$${UNOPKGTMP}/userinstall.$$$$" - mkdir "$$INSTDIR" -fi if [ -x "PRODUCTDIRECTORYNAME/program/unopkg" ] then - "PRODUCTDIRECTORYNAME/program/unopkg" sync "-env:BUNDLED_EXTENSIONS_USER=file://////PRODUCTDIRECTORYNAME/share/prereg/bundled" "-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' + "PRODUCTDIRECTORYNAME/program/unopkg" sync find "PRODUCTDIRECTORYNAME/share/prereg/bundled" -type f -exec chmod 644 {} \; fi -if [ -n "$$INSTDIR" ] -then - rm -rf "$$INSTDIR" -fi - exit 0 END diff --git a/setup_native/source/ulfconv/ulfconv.cxx b/setup_native/source/ulfconv/ulfconv.cxx index bdcc98595f5c..1643b330d776 100644 --- a/setup_native/source/ulfconv/ulfconv.cxx +++ b/setup_native/source/ulfconv/ulfconv.cxx @@ -34,6 +34,7 @@ #include <unistd.h> #include <ctype.h> #include <sal/alloca.h> +#include <sal/macros.h> #include <rtl/ustring.hxx> @@ -189,7 +190,7 @@ void read_encoding_table(char * file, EncodingMap& aEncodingMap) *cp = '\0'; // find the correct mapping for codepage - const unsigned int members = sizeof( _ms_encoding_list ) / sizeof( _pair ); + const unsigned int members = SAL_N_ELEMENTS( _ms_encoding_list ); const _pair *encoding = _pair_search( codepage, _ms_encoding_list, members ); if ( encoding != NULL ) { diff --git a/setup_native/source/win32/customactions/languagepacks/lngpckinsthelper.cxx b/setup_native/source/win32/customactions/languagepacks/lngpckinsthelper.cxx index f6f6a4c0c3b9..bcf874699a77 100644 --- a/setup_native/source/win32/customactions/languagepacks/lngpckinsthelper.cxx +++ b/setup_native/source/win32/customactions/languagepacks/lngpckinsthelper.cxx @@ -153,9 +153,8 @@ extern "C" UINT __stdcall SetProductInstallationPath(MSIHANDLE handle) MsiSetProperty(handle, TEXT("INSTALLLOCATION"), path.c_str()); } } - catch(std::runtime_error& ex) + catch(std::runtime_error&) { - ex = ex; // no warnings } return ERROR_SUCCESS; } diff --git a/setup_native/source/win32/customactions/languagepacks/makefile.mk b/setup_native/source/win32/customactions/languagepacks/makefile.mk index 8da47ab1cc4f..365772ca8cd3 100644 --- a/setup_native/source/win32/customactions/languagepacks/makefile.mk +++ b/setup_native/source/win32/customactions/languagepacks/makefile.mk @@ -39,10 +39,6 @@ USE_DEFFILE=TRUE .INCLUDE : settings.mk -.IF "$(USE_SYSTEM_STL)" != "YES" -CFLAGS+=-D_STLP_USE_STATIC_LIB -.ENDIF - #Disable precompiled header CDEFS+=-Dnot_used_define_to_disable_pch @@ -61,10 +57,6 @@ STDSHL+= \ $(MSILIB) \ $(SHELL32LIB) -.IF "$(USE_SYSTEM_STL)" != "YES" -STDSHL+=$(LIBSTLPORTST) -.ENDIF - SHL1OBJS = $(SLOFILES) \ $(SLO)$/seterror.obj @@ -74,7 +66,6 @@ STDSHL+= \ -lmsvcrt .ENDIF -#SHL1LIBS = $(SLB)$/$(TARGET).lib SHL1OBJS = $(SLOFILES) \ $(SLO)$/registerextensions.obj \ @@ -94,7 +85,3 @@ DEF1EXPORTFILE=exports.dxp # --- Targets -------------------------------------------------------------- .INCLUDE : target.mk - -# ------------------------------------------------------------------------- - - diff --git a/setup_native/source/win32/customactions/patch/makefile.mk b/setup_native/source/win32/customactions/patch/makefile.mk index 57705389248f..77cd11e0322c 100755 --- a/setup_native/source/win32/customactions/patch/makefile.mk +++ b/setup_native/source/win32/customactions/patch/makefile.mk @@ -38,10 +38,6 @@ USE_DEFFILE=TRUE .INCLUDE : settings.mk -.IF "$(USE_SYSTEM_STL)" != "YES" -CFLAGS+=-D_STLP_USE_STATIC_LIB -.ENDIF - #Disable precompiled header CDEFS+=-Dnot_used_define_to_disable_pch @@ -59,17 +55,12 @@ STDSHL += \ $(MSILIB)\ $(SHELL32LIB) -.IF "$(USE_SYSTEM_STL)" != "YES" -STDSHL += $(LIBSTLPORTST) -.ENDIF - .IF "$(COM)"=="GCC" STDSHL+= \ $(KERNEL32LIB)\ -lmsvcrt .ENDIF -#SHL1LIBS = $(SLB)$/$(TARGET).lib SHL1OBJS = $(SLOFILES) \ $(SLO)$/respintest.obj \ diff --git a/setup_native/source/win32/customactions/patch/swappatchfiles.cxx b/setup_native/source/win32/customactions/patch/swappatchfiles.cxx index 2ef10553e239..db7fbeb3e5fc 100644 --- a/setup_native/source/win32/customactions/patch/swappatchfiles.cxx +++ b/setup_native/source/win32/customactions/patch/swappatchfiles.cxx @@ -285,18 +285,6 @@ static bool SwapFiles( const std::_tstring& sFileName1, const std::_tstring& sFi if (hdl == INVALID_HANDLE_VALUE) { fSuccess = MoveFileExImpl( sFileName2.c_str(), sFileName1.c_str(), MOVEFILE_REPLACE_EXISTING ); - - // if ( fSuccess ) - // { - // mystr = "Success"; - // MessageBox( NULL, mystr.c_str(), "Titel", MB_OK ); - // } - // else - // { - // char buff[256]; - // wsprintf(buff, "Failure %d", GetLastError()); - // MessageBox( NULL, buff, "Titel", MB_OK ); - // } } else { @@ -554,17 +542,11 @@ extern "C" UINT __stdcall InstallPatchedFiles( MSIHANDLE handle ) OutputDebugStringA( "Starting Custom Action" ); - // std::_tstring mystr; - // mystr = "Patchfile: " + sPatchFile; - // MessageBox( NULL, mystr.c_str(), "Patchfile", MB_OK ); - aSectionNames = getProfileSections( sPatchFile ); while ( !aSectionNames.empty() ) { std::_tstring sSectionName = aSectionNames.front(); if ( std::_tstring(TEXT("_root")) == sSectionName ) { sSectionName = TEXT(""); } - // mystr = "Section: " + sSectionName; - // MessageBox( NULL, mystr.c_str(), "Titel", MB_OK ); aKeyNames = getProfileKeys( sPatchFile, sSectionName ); while ( !aKeyNames.empty() ) @@ -584,9 +566,6 @@ extern "C" UINT __stdcall InstallPatchedFiles( MSIHANDLE handle ) sFileName1 = sInstDir + sSectionName + sFileName1; sFileName2 = sFileName1 + sExtension; - // mystr = "Convert: " + sFileName1 + " to " + sFileName2; - // MessageBox( NULL, mystr.c_str(), "Titel", MB_OK ); - SwapFiles( sFileName1, sFileName2 ); } @@ -634,17 +613,11 @@ extern "C" UINT __stdcall UninstallPatchedFiles( MSIHANDLE handle ) std::queue< std::_tstring > aSectionNames; std::queue< std::_tstring > aKeyNames; - // std::_tstring mystr; - // mystr = "Patchfile: " + sPatchFile; - // MessageBox( NULL, mystr.c_str(), "Titel", MB_OK ); - aSectionNames = getProfileSections( sPatchFile ); while ( !aSectionNames.empty() ) { std::_tstring sSectionName = aSectionNames.front(); if ( std::_tstring(TEXT("_root")) == sSectionName ) { sSectionName = TEXT(""); } - // mystr = "Section: " + sSectionName; - // MessageBox( NULL, mystr.c_str(), "Titel", MB_OK ); aKeyNames = getProfileKeys( sPatchFile, sSectionName ); while( !aKeyNames.empty() ) @@ -664,9 +637,6 @@ extern "C" UINT __stdcall UninstallPatchedFiles( MSIHANDLE handle ) sFileName1 = sInstDir + sSectionName + sFileName1; sFileName2 = sFileName1 + sExtension; - // mystr = "Convert: " + sFileName1 + " to " + sFileName2; - // MessageBox( NULL, mystr.c_str(), "Titel", MB_OK ); - SwapFiles( sFileName2, sFileName1 ); } @@ -726,7 +696,6 @@ extern "C" UINT __stdcall SetFeatureState( MSIHANDLE handle ) // 1. Reading Product Code from setup.ini of installed Office std::_tstring sInstallPath = GetMsiProperty(handle, TEXT("INSTALLLOCATION")); - // MessageBox(NULL, sInstallPath.c_str(), "INSTALLLOCATION", MB_OK); std::_tstring sSetupiniPath = sInstallPath + TEXT("program\\setup.ini"); TCHAR szProductCode[32767]; @@ -743,7 +712,6 @@ extern "C" UINT __stdcall SetFeatureState( MSIHANDLE handle ) if ( !_tcsicmp( szProductCode, TEXT("NOTFOUND") ) ) { // No setup.ini or no "ProductCode" in setup.ini. This is an invalid directory. - // MessageBox(NULL, "NOTFOUND set", "DEBUG", MB_OK); return ERROR_SUCCESS; } @@ -752,7 +720,6 @@ extern "C" UINT __stdcall SetFeatureState( MSIHANDLE handle ) std::_tstring productCode = TEXT(szProductCode); productCode = ConvertGuid(std::_tstring(productCode.c_str() + 1, productCode.length() - 2)); mystr = TEXT("Changed product code: ") + productCode; - // MessageBox(NULL, mystr.c_str(), "ProductCode", MB_OK); // 3. Setting path in the Windows registry to find installed features @@ -764,14 +731,12 @@ extern "C" UINT __stdcall SetFeatureState( MSIHANDLE handle ) registryRoot = HKEY_LOCAL_MACHINE; registryKey = TEXT("Software\\Classes\\Installer\\Features\\") + productCode; mystr = registryKey; - // MessageBox( NULL, mystr.c_str(), "ALLUSERS", MB_OK ); } else { registryRoot = HKEY_CURRENT_USER; registryKey = TEXT("Software\\Microsoft\\Installer\\Features\\") + productCode; mystr = registryKey; - // MessageBox( NULL, mystr.c_str(), "ALLUSERS", MB_OK ); } // 4. Collecting all installed features from Windows registry @@ -780,7 +745,6 @@ extern "C" UINT __stdcall SetFeatureState( MSIHANDLE handle ) if (RegOpenKey(registryRoot, registryKey.c_str(), &hKey) == ERROR_SUCCESS) { int counter = 0; - // DWORD counter = 0; LONG lEnumResult; do @@ -798,11 +762,6 @@ extern "C" UINT __stdcall SetFeatureState( MSIHANDLE handle ) std::_tstring sValueName = szValueName; std::_tstring sValueData = szValueData; - // mystr = sValueName; - // MessageBox( NULL, mystr.c_str(), "ValueName", MB_OK ); - // mystr = sValueData; - // MessageBox( NULL, mystr.c_str(), "ValueData", MB_OK ); - // Does this feature exist in this patch? if ( IsSetMsiProperty(handle, sValueName) ) { @@ -810,14 +769,10 @@ extern "C" UINT __stdcall SetFeatureState( MSIHANDLE handle ) if ( 6 == szValueData[0] ) { MsiSetFeatureState(handle,sValueName.c_str(),INSTALLSTATE_ABSENT); // do not install this feature - // mystr = TEXT("Do NOT install: ") + sValueName; - // MessageBox( NULL, mystr.c_str(), "ValueName", MB_OK ); } else { MsiSetFeatureState(handle,sValueName.c_str(),INSTALLSTATE_LOCAL); // do install this feature - // mystr = TEXT("Do install: ") + sValueName; - // MessageBox( NULL, mystr.c_str(), "ValueName", MB_OK ); } } } @@ -842,14 +797,10 @@ extern "C" UINT __stdcall SetNewFeatureState( MSIHANDLE handle ) if (IsSetMsiProperty(handle, TEXT("SELECT_OU_FEATURE"))) { MsiSetFeatureState(handle,sValueName.c_str(),INSTALLSTATE_LOCAL); // do install this feature - // mystr = TEXT("OnlineUpdate wird installiert!"); - // MessageBox(NULL, mystr.c_str(), "INSTALLSTATE_LOCAL", MB_OK); } else { MsiSetFeatureState(handle,sValueName.c_str(),INSTALLSTATE_ABSENT); // do not install this feature - // mystr = TEXT("OnlineUpdate wird NICHT installiert!"); - // MessageBox(NULL, mystr.c_str(), "INSTALLSTATE_ABSENT", MB_OK); } return ERROR_SUCCESS; @@ -869,10 +820,6 @@ extern "C" UINT __stdcall ShowOnlineUpdateDialog( MSIHANDLE handle ) HANDLE hdl = FindFirstFile(sSearchFile.c_str(), &data); if (hdl != INVALID_HANDLE_VALUE) // the file exists { - // std::_tstring mystr; - // mystr = "Found file: " + sSearchFile; - // MessageBox( NULL, mystr.c_str(), "Found file", MB_OK ); - // And finally setting property SHOW_ONLINEUPDATE_DIALOG // to hide this dialog UnsetMsiProperty(handle, TEXT("SHOW_ONLINEUPDATE_DIALOG")); @@ -886,10 +833,6 @@ extern "C" UINT __stdcall ShowOnlineUpdateDialog( MSIHANDLE handle ) } else { - // std::_tstring mystr; - // mystr = "Did not find file: " + sSearchFile; - // MessageBox( NULL, mystr.c_str(), "File not found", MB_OK ); - // If the file does not exist, the Online Update dialog // has to be shown. SetMsiProperty(handle, TEXT("SHOW_ONLINEUPDATE_DIALOG")); diff --git a/setup_native/source/win32/customactions/quickstarter/makefile.mk b/setup_native/source/win32/customactions/quickstarter/makefile.mk index 0861c20efed8..870571578697 100644 --- a/setup_native/source/win32/customactions/quickstarter/makefile.mk +++ b/setup_native/source/win32/customactions/quickstarter/makefile.mk @@ -41,10 +41,6 @@ USE_DEFFILE=TRUE .INCLUDE : settings.mk -.IF "$(USE_SYSTEM_STL)" != "YES" -CFLAGS+=-D_STLP_USE_STATIC_LIB -.ENDIF - UWINAPILIB= # --- Files -------------------------------------------------------- @@ -56,10 +52,6 @@ STDSHL += \ $(SHELL32LIB)\ $(MSILIB) -.IF "$(USE_SYSTEM_STL)" != "YES" -STDSHL += $(LIBSTLPORTST) -.ENDIF - .IF "$(COM)"=="GCC" STDSHL+= \ $(KERNEL32LIB)\ diff --git a/setup_native/source/win32/customactions/rebase/makefile.mk b/setup_native/source/win32/customactions/rebase/makefile.mk index 47cd8fd59c87..cb9e29db1e60 100644 --- a/setup_native/source/win32/customactions/rebase/makefile.mk +++ b/setup_native/source/win32/customactions/rebase/makefile.mk @@ -40,10 +40,6 @@ MINGW_NODLL=YES .INCLUDE : settings.mk -.IF "$(USE_SYSTEM_STL)" != "YES" -CFLAGS+=-D_STLP_USE_STATIC_LIB -.ENDIF - UWINAPILIB= # --- Files -------------------------------------------------------- @@ -55,10 +51,6 @@ STDSHL += \ $(SHELL32LIB)\ $(MSILIB) -.IF "$(USE_SYSTEM_STL)" != "YES" -STDSHL += $(LIBSTLPORTST) -.ENDIF - .IF "$(COM)"=="GCC" STDSHL+= \ $(KERNEL32LIB)\ diff --git a/setup_native/source/win32/customactions/reg4allmsdoc/exports.dxp b/setup_native/source/win32/customactions/reg4allmsdoc/exports.dxp index 566981ba569e..54ebb2f675f4 100644 --- a/setup_native/source/win32/customactions/reg4allmsdoc/exports.dxp +++ b/setup_native/source/win32/customactions/reg4allmsdoc/exports.dxp @@ -1,3 +1,4 @@ FindRegisteredExtensions LookForRegisteredExtensions -RegisterSomeExtensions
\ No newline at end of file +RegisterSomeExtensions +RestoreRegAllMSDoc diff --git a/setup_native/source/win32/customactions/reg4allmsdoc/makefile.mk b/setup_native/source/win32/customactions/reg4allmsdoc/makefile.mk index d58291966ef2..24037f0c0c5b 100644 --- a/setup_native/source/win32/customactions/reg4allmsdoc/makefile.mk +++ b/setup_native/source/win32/customactions/reg4allmsdoc/makefile.mk @@ -39,9 +39,6 @@ USE_DEFFILE=TRUE .INCLUDE : settings.mk CFLAGS+=-DUNICODE -D_UNICODE -.IF "$(USE_SYSTEM_STL)" != "YES" -CFLAGS+=-D_STLP_USE_STATIC_LIB -.ENDIF # --- Files -------------------------------------------------------- @@ -58,10 +55,6 @@ SHL1STDLIBS= $(KERNEL32LIB)\ $(MSILIB)\ $(SHLWAPILIB) -.IF "$(USE_SYSTEM_STL)" != "YES" -SHL1STDLIBS+=$(LIBSTLPORTST) -.ENDIF - SHL1LIBS = $(SLB)$/$(TARGET).lib SHL1TARGET = $(TARGET) diff --git a/setup_native/source/win32/customactions/reg4allmsdoc/reg4allmsi.cxx b/setup_native/source/win32/customactions/reg4allmsdoc/reg4allmsi.cxx index 54a471acf095..7b9cfc992245 100644 --- a/setup_native/source/win32/customactions/reg4allmsdoc/reg4allmsi.cxx +++ b/setup_native/source/win32/customactions/reg4allmsdoc/reg4allmsi.cxx @@ -117,14 +117,43 @@ static BOOL CheckExtensionInRegistry( LPCSTR lpSubKey ) { // We will replace registration for word pad bRet = true; } - if ( strncmp( szBuffer, "OpenOffice.org.", 15 ) == 0 ) + else if ( strncmp( szBuffer, "OpenOffice.org.", 15 ) == 0 ) { // We will replace registration for our own types, too bRet = true; } - if ( strncmp( szBuffer, "ooostub.", 8 ) == 0 ) + else if ( strncmp( szBuffer, "ooostub.", 8 ) == 0 ) { // We will replace registration for ooostub, too bRet = true; } + else + { + OutputDebugStringFormat( " Checking OpenWithList of [%s].\n", lpSubKey ); + HKEY hSubKey; + lResult = RegOpenKeyExA( hKey, "OpenWithList", 0, KEY_ENUMERATE_SUB_KEYS, &hSubKey ); + if ( ERROR_SUCCESS == lResult ) + { + DWORD nIndex = 0; + while ( ERROR_SUCCESS == lResult ) + { + nSize = sizeof( szBuffer ); + lResult = RegEnumKeyExA( hSubKey, nIndex++, szBuffer, &nSize, NULL, NULL, NULL, NULL ); + if ( ERROR_SUCCESS == lResult ) + { + OutputDebugStringFormat( " Found value [%s] in OpenWithList of [%s].\n", szBuffer, lpSubKey ); + if ( strncmp( szBuffer, "WordPad.exe", 11 ) == 0 ) + { // We will replace registration for word pad + bRet = true; + } + else if ( nSize > 0 ) + bRet = false; + } + } + } + else + { + OutputDebugStringFormat( " No OpenWithList found!\n" ); + } + } } else // no default value found -> return TRUE to register for that key bRet = true; @@ -184,6 +213,9 @@ static LONG DeleteSubKeyTree( HKEY RootKey, LPCSTR lpKey ) return rc; } +// Unused +#if 0 + //---------------------------------------------------------- static BOOL RemoveExtensionInRegistry( LPCSTR lpSubKey ) { @@ -234,6 +266,8 @@ static BOOL RemoveExtensionInRegistry( LPCSTR lpSubKey ) return ( ERROR_SUCCESS == lResult ); } +#endif + //---------------------------------------------------------- bool GetMsiProp( MSIHANDLE handle, LPCSTR name, /*out*/std::string& value ) { @@ -278,11 +312,59 @@ static void registerForExtension( MSIHANDLE handle, const int nIndex, bool bRegi } //---------------------------------------------------------- +static void saveOldRegistration( LPCSTR lpSubKey ) +{ + BOOL bRet = false; + HKEY hKey = NULL; + LONG lResult = RegOpenKeyExA( HKEY_CLASSES_ROOT, lpSubKey, 0, + KEY_QUERY_VALUE|KEY_SET_VALUE, &hKey ); + + if ( ERROR_SUCCESS == lResult ) + { + CHAR szBuffer[1024]; + DWORD nSize = sizeof( szBuffer ); + + lResult = RegQueryValueExA( hKey, "", NULL, NULL, (LPBYTE)szBuffer, &nSize ); + if ( ERROR_SUCCESS == lResult ) + { + szBuffer[nSize] = '\0'; + + // No need to save assocations for our own types + if ( strncmp( szBuffer, "OpenOffice.org.", 15 ) != 0 ) + { + // Save the old association + RegSetValueExA( hKey, "OOoBackupAssociation", 0, + REG_SZ, (LPBYTE)szBuffer, nSize ); + // Also save what the old association means, just so we can try to verify + // if/when restoring it that the old application still exists + HKEY hKey2 = NULL; + lResult = RegOpenKeyExA( HKEY_CLASSES_ROOT, szBuffer, 0, + KEY_QUERY_VALUE, &hKey2 ); + if ( ERROR_SUCCESS == lResult ) + { + nSize = sizeof( szBuffer ); + lResult = RegQueryValueExA( hKey2, "", NULL, NULL, (LPBYTE)szBuffer, &nSize ); + if ( ERROR_SUCCESS == lResult ) + { + RegSetValueExA( hKey, "OOoBackupAssociationDeref", 0, + REG_SZ, (LPBYTE)szBuffer, nSize ); + } + RegCloseKey( hKey2 ); + } + } + } + RegCloseKey( hKey ); + } +} + +//---------------------------------------------------------- static void registerForExtensions( MSIHANDLE handle, BOOL bRegisterAll ) { // Check all file extensions int nIndex = 0; while ( g_Extensions[nIndex] != 0 ) { + saveOldRegistration( g_Extensions[nIndex] ); + BOOL bRegister = bRegisterAll || CheckExtensionInRegistry( g_Extensions[nIndex] ); if ( bRegister ) registerForExtension( handle, nIndex, true ); @@ -449,6 +531,10 @@ extern "C" UINT __stdcall RegisterSomeExtensions( MSIHANDLE handle ) } //---------------------------------------------------------- +// +// This is the (slightly misleadinly named) entry point for the +// custom action called Regallmsdocdll. +// extern "C" UINT __stdcall FindRegisteredExtensions( MSIHANDLE handle ) { if ( IsSetMsiProp( handle, "FILETYPEDIALOGUSED" ) ) @@ -485,7 +571,12 @@ extern "C" UINT __stdcall FindRegisteredExtensions( MSIHANDLE handle ) return ERROR_SUCCESS; } +#if 0 + //---------------------------------------------------------- +// +// This entry is not called for any custom action. +// extern "C" UINT __stdcall DeleteRegisteredExtensions( MSIHANDLE /*handle*/ ) { OutputDebugStringFormat( "DeleteRegisteredExtensions\n" ); @@ -501,4 +592,78 @@ extern "C" UINT __stdcall DeleteRegisteredExtensions( MSIHANDLE /*handle*/ ) return ERROR_SUCCESS; } +#endif + +//---------------------------------------------------------- +static void restoreOldRegistration( LPCSTR lpSubKey ) +{ + BOOL bRet = false; + HKEY hKey = NULL; + LONG lResult = RegOpenKeyExA( HKEY_CLASSES_ROOT, lpSubKey, 0, + KEY_QUERY_VALUE|KEY_SET_VALUE, &hKey ); + + if ( ERROR_SUCCESS == lResult ) + { + CHAR szBuffer[1024]; + DWORD nSize = sizeof( szBuffer ); + + lResult = RegQueryValueExA( hKey, "OOoBackupAssociation", NULL, NULL, + (LPBYTE)szBuffer, &nSize ); + if ( ERROR_SUCCESS == lResult ) + { + HKEY hKey2 = NULL; + lResult = RegOpenKeyExA( HKEY_CLASSES_ROOT, szBuffer, 0, + KEY_QUERY_VALUE, &hKey2 ); + if ( ERROR_SUCCESS == lResult ) + { + CHAR szBuffer2[1024]; + DWORD nSize2 = sizeof( szBuffer2 ); + + lResult = RegQueryValueExA( hKey2, "", NULL, NULL, (LPBYTE)szBuffer2, &nSize2 ); + if ( ERROR_SUCCESS == lResult ) + { + CHAR szBuffer3[1024]; + DWORD nSize3 = sizeof( szBuffer3 ); + + // Try to verify that the old association is OK to restore + lResult = RegQueryValueExA( hKey, "OOoBackupAssociationDeref", NULL, NULL, + (LPBYTE)szBuffer3, &nSize3 ); + if ( ERROR_SUCCESS == lResult ) + { + if ( nSize2 == nSize3 && strcmp (szBuffer2, szBuffer3) == 0) + { + // Yep. So restore it + RegSetValueExA( hKey, "", 0, REG_SZ, (LPBYTE)szBuffer, nSize ); + } + } + } + RegCloseKey( hKey2 ); + } + RegDeleteValueA( hKey, "OOoBackupAssociation" ); + } + RegDeleteValueA( hKey, "OOoBackupAssociationDeref" ); + RegCloseKey( hKey ); + } +} + +//---------------------------------------------------------- +// +// This function is not in OO.o. We call this from the +// Restoreregallmsdocdll custom action. +// +extern "C" UINT __stdcall RestoreRegAllMSDoc( MSIHANDLE /*handle*/ ) +{ + OutputDebugStringFormat( "RestoreRegAllMSDoc\n" ); + + int nIndex = 0; + while ( g_Extensions[nIndex] != 0 ) + { + restoreOldRegistration( g_Extensions[nIndex] ); + ++nIndex; + } + + + return ERROR_SUCCESS; +} + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/setup_native/source/win32/customactions/reg4msdoc/makefile.mk b/setup_native/source/win32/customactions/reg4msdoc/makefile.mk index fe2bf60949be..47239713ec1e 100644 --- a/setup_native/source/win32/customactions/reg4msdoc/makefile.mk +++ b/setup_native/source/win32/customactions/reg4msdoc/makefile.mk @@ -40,9 +40,6 @@ MINGW_NODLL=YES .INCLUDE : settings.mk CFLAGS+=-DUNICODE -D_UNICODE -.IF "$(USE_SYSTEM_STL)" != "YES" -CFLAGS+=-D_STLP_USE_STATIC_LIB -.ENDIF # --- Files -------------------------------------------------------- @@ -71,10 +68,6 @@ SHL1STDLIBS= $(KERNEL32LIB)\ $(MSILIB)\ $(SHLWAPILIB) -.IF "$(USE_SYSTEM_STL)" != "YES" -SHL1STDLIBS+=$(LIBSTLPORTST) -.ENDIF - SHL1LIBS = $(SLB)$/$(TARGET).lib SHL1TARGET = $(TARGET) diff --git a/setup_native/source/win32/customactions/reg4msdoc/registrationcontextinformation.cxx b/setup_native/source/win32/customactions/reg4msdoc/registrationcontextinformation.cxx index 189b7e3074ae..f07c35a4d988 100644 --- a/setup_native/source/win32/customactions/reg4msdoc/registrationcontextinformation.cxx +++ b/setup_native/source/win32/customactions/reg4msdoc/registrationcontextinformation.cxx @@ -1,7 +1,6 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ //Implementierung der Klasse RegistrationContextInformation. -#include <assert.h> #include "registrationcontextinformation.hxx" #include "msihelper.hxx" diff --git a/setup_native/source/win32/customactions/reg4msdoc/registry.hxx b/setup_native/source/win32/customactions/reg4msdoc/registry.hxx index fe0014b6a191..d993060ae560 100644 --- a/setup_native/source/win32/customactions/reg4msdoc/registry.hxx +++ b/setup_native/source/win32/customactions/reg4msdoc/registry.hxx @@ -57,10 +57,6 @@ typedef std::auto_ptr<RegistryKeyImpl> RegistryKey; typedef std::vector<std::wstring> StringList; typedef std::auto_ptr<StringList> StringListPtr; -//--------------------------------------- -// -//--------------------------------------- - class RegistryKeyImpl { public: diff --git a/setup_native/source/win32/customactions/reg4msdoc/registryexception.cxx b/setup_native/source/win32/customactions/reg4msdoc/registryexception.cxx index cebbe67c6798..e7e66825ed4b 100644 --- a/setup_native/source/win32/customactions/reg4msdoc/registryexception.cxx +++ b/setup_native/source/win32/customactions/reg4msdoc/registryexception.cxx @@ -23,16 +23,12 @@ RegistryException::RegistryException(long ErrorCode) : { } -/** -*/ RegistryException::~RegistryException() throw() { if (m_ErrorMsg) LocalFree(m_ErrorMsg); } -/** -*/ const char* RegistryException::what() const throw() { FormatMessage( @@ -49,8 +45,6 @@ const char* RegistryException::what() const throw() return reinterpret_cast<char*>(m_ErrorMsg); } -/** -*/ long RegistryException::GetErrorCode() const { return m_ErrorCode; @@ -66,46 +60,26 @@ RegistryIOException::RegistryIOException(long ErrorCode) : { }; -//####################################### -// -//####################################### - RegistryNoWriteAccessException::RegistryNoWriteAccessException(long ErrorCode) : RegistryException(ErrorCode) { }; -//####################################### -// -//####################################### - RegistryAccessDeniedException::RegistryAccessDeniedException(long ErrorCode) : RegistryException(ErrorCode) { }; -//####################################### -// -//####################################### - RegistryValueNotFoundException::RegistryValueNotFoundException(long ErrorCode) : RegistryException(ErrorCode) { }; -//####################################### -// -//####################################### - RegistryKeyNotFoundException::RegistryKeyNotFoundException(long ErrorCode) : RegistryException(ErrorCode) { }; -//####################################### -// -//####################################### - RegistryInvalidOperationException::RegistryInvalidOperationException(long ErrorCode) : RegistryException(ErrorCode) { diff --git a/setup_native/source/win32/customactions/reg4msdoc/registryw9x.cxx b/setup_native/source/win32/customactions/reg4msdoc/registryw9x.cxx index 47cc8ce70ec5..30e1cf07c5b5 100644 --- a/setup_native/source/win32/customactions/reg4msdoc/registryw9x.cxx +++ b/setup_native/source/win32/customactions/reg4msdoc/registryw9x.cxx @@ -26,10 +26,6 @@ * ************************************************************************/ -//--------------------------------------- -// -//--------------------------------------- - #include "registryw9x.hxx" #include <windows.h> @@ -44,10 +40,6 @@ #pragma warning(disable : 4786 4350) #endif -//--------------------------------------- -// -//--------------------------------------- - const size_t MAX_TMP_BUFF_SIZE = 1024 * sizeof(wchar_t); @@ -138,9 +130,6 @@ size_t RegistryKeyImplWin9x::GetSubKeyCount() const return nSubKeys; } -//----------------------------------------------------- -/** -*/ StringListPtr RegistryKeyImplWin9x::GetSubKeyNames() const { assert(IsOpen()); @@ -176,9 +165,6 @@ StringListPtr RegistryKeyImplWin9x::GetSubKeyNames() const return (StringListPtr) key_names; } -//----------------------------------------------------- -/** -*/ StringListPtr RegistryKeyImplWin9x::GetSubValueNames() const { assert(IsOpen()); diff --git a/setup_native/source/win32/customactions/reg4msdoc/registryw9x.hxx b/setup_native/source/win32/customactions/reg4msdoc/registryw9x.hxx index 46c25cb898cf..8921d15330f4 100644 --- a/setup_native/source/win32/customactions/reg4msdoc/registryw9x.hxx +++ b/setup_native/source/win32/customactions/reg4msdoc/registryw9x.hxx @@ -30,7 +30,6 @@ #define _REGISTRYW9X_HXX_ #include "registry.hxx" -#include "registry.hxx" //--------------------------------------- // constants diff --git a/setup_native/source/win32/customactions/reg4msdoc/registrywnt.cxx b/setup_native/source/win32/customactions/reg4msdoc/registrywnt.cxx index 4f60d0cae32a..8776e0edd0e0 100644 --- a/setup_native/source/win32/customactions/reg4msdoc/registrywnt.cxx +++ b/setup_native/source/win32/customactions/reg4msdoc/registrywnt.cxx @@ -26,10 +26,6 @@ * ************************************************************************/ -//--------------------------------------- -// -//--------------------------------------- - #ifdef _MSC_VER #pragma warning(push, 1) /* disable warnings within system headers */ #endif @@ -49,10 +45,6 @@ #pragma warning(disable : 4786 4350) #endif -//--------------------------------------- -// -//--------------------------------------- - const size_t MAX_TMP_BUFF_SIZE = 1024 * sizeof(wchar_t); @@ -143,9 +135,6 @@ size_t RegistryKeyImplWinNT::GetSubKeyCount() const return nSubKeys; } -//----------------------------------------------------- -/** -*/ StringListPtr RegistryKeyImplWinNT::GetSubKeyNames() const { assert(IsOpen()); @@ -185,9 +174,6 @@ StringListPtr RegistryKeyImplWinNT::GetSubKeyNames() const #endif } -//----------------------------------------------------- -/** -*/ StringListPtr RegistryKeyImplWinNT::GetSubValueNames() const { assert(IsOpen()); diff --git a/setup_native/source/win32/customactions/reg4msdoc/windowsregistry.cxx b/setup_native/source/win32/customactions/reg4msdoc/windowsregistry.cxx index 1e97f779bc39..e06f1e51bd51 100644 --- a/setup_native/source/win32/customactions/reg4msdoc/windowsregistry.cxx +++ b/setup_native/source/win32/customactions/reg4msdoc/windowsregistry.cxx @@ -11,10 +11,6 @@ #pragma warning(disable : 4350) #endif -//------------------------------ -// -//------------------------------ - WindowsRegistry::WindowsRegistry() { OSVERSIONINFOA osverinfo; @@ -25,46 +21,26 @@ WindowsRegistry::WindowsRegistry() m_IsWinNT = (osverinfo.dwPlatformId == VER_PLATFORM_WIN32_NT); } -//------------------------------ -// -//------------------------------ - RegistryKey WindowsRegistry::GetClassesRootKey(bool Writeable) const { return GetRegistryKey(HKEY_CLASSES_ROOT, Writeable); } -//------------------------------ -// -//------------------------------ - RegistryKey WindowsRegistry::GetCurrentUserKey(bool Writeable) const { return GetRegistryKey(HKEY_CURRENT_USER, Writeable); } -//------------------------------ -// -//------------------------------ - RegistryKey WindowsRegistry::GetLocalMachineKey(bool Writeable) const { return GetRegistryKey(HKEY_LOCAL_MACHINE, Writeable); } -//------------------------------ -// -//------------------------------ - RegistryKey WindowsRegistry::GetUserKey(bool Writeable) const { return GetRegistryKey(HKEY_USERS, Writeable); } -//------------------------------ -// -//------------------------------ - RegistryKey WindowsRegistry::GetRegistryKey(HKEY RootKey, bool Writeable) const { RegistryKey regkey; diff --git a/setup_native/source/win32/customactions/reg64/makefile.mk b/setup_native/source/win32/customactions/reg64/makefile.mk index 04117c10365d..4cb5a5ca20d0 100644 --- a/setup_native/source/win32/customactions/reg64/makefile.mk +++ b/setup_native/source/win32/customactions/reg64/makefile.mk @@ -39,10 +39,6 @@ EXTERNAL_WARNINGS_NOT_ERRORS := TRUE .INCLUDE : settings.mk -.IF "$(USE_SYSTEM_STL)" != "YES" -CFLAGS+=-D_STLP_USE_STATIC_LIB -.ENDIF - #Disable precompiled header CDEFS+=-Dnot_used_define_to_disable_pch @@ -63,8 +59,6 @@ STDSHL += \ $(MSILIB)\ $(SHLWAPILIB)\ -# msvcprt.lib - SHL1TARGET = $(TARGET) SHL1IMPLIB = i$(TARGET) @@ -76,33 +70,8 @@ DEF1EXPORTFILE=exports.dxp .ENDIF - -# --- mapimailer -------------------------------------------------------- - -#TARGETTYPE=CUI - -#OBJFILES= $(OBJ)$/reg64.obj - -#APP1TARGET=reg64 -#APP1OBJS=$(OBJFILES) -#APP1STDLIBS=$(KERNEL32LIB)\ -# $(ADVAPI32LIB)\ -# $(MSILIB)\ -# $(SHELL32LIB)\ -# msvcprt.lib\ -# $(OLE32LIB)\ -# $(COMCTL32LIB)\ -# $(UUIDLIB) - - -#APP1DEF=$(MISC)$/$(APP1TARGET).def - # --- Targets -------------------------------------------------------------- .INCLUDE : target.mk INCLUDE!:=$(subst,/stl, $(INCLUDE)) .EXPORT : INCLUDE - -# ------------------------------------------------------------------------- - - diff --git a/setup_native/source/win32/customactions/reg64/reg64.cxx b/setup_native/source/win32/customactions/reg64/reg64.cxx index fe22ed86b829..7490a153fac4 100644 --- a/setup_native/source/win32/customactions/reg64/reg64.cxx +++ b/setup_native/source/win32/customactions/reg64/reg64.cxx @@ -41,12 +41,12 @@ #include <malloc.h> #include <strsafe.h> -// 10.11.2009 tkr: MinGW doesn't know anything about RegDeleteKeyExW if WINVER < 0x0502. +// MinGW doesn't know anything about RegDeleteKeyExW if WINVER < 0x0502. extern "C" { WINADVAPI LONG WINAPI RegDeleteKeyExW(HKEY,LPCWSTR,REGSAM,DWORD); } -// 06.11.2009 tkr: to provide windows xp as build systems for mingw we need to define KEY_WOW64_64KEY +// to provide windows xp as build systems for mingw we need to define KEY_WOW64_64KEY // in mingw 3.13 KEY_WOW64_64KEY isn't available < Win2003 systems. // Also defined in setup_native\source\win32\customactions\reg64\reg64.cxx,source\win32\customactions\shellextensions\shellextensions.cxx and // extensions\source\activex\main\so_activex.cpp @@ -207,7 +207,6 @@ bool IsInstallForAllUsers( MSIHANDLE hMSI ) wchar_t* GetBasisInstallLocation( MSIHANDLE hMSI ) { OutputDebugStringFormat(L"GetBasisInstallLocation - START\n" ); - bool bResult = FALSE; wchar_t* pVal = NULL; GetMsiProp( hMSI, L"INSTALLLOCATION", &pVal); @@ -254,13 +253,6 @@ bool DeleteRegistryKey(HKEY RootKey, const wchar_t* KeyName) return (ERROR_SUCCESS == rc); } - - - -//--------------------------------------- -// -//--------------------------------------- - bool SetRegistryKey(HKEY RootKey, const wchar_t* KeyName, const wchar_t* ValueName, const wchar_t* Value) { HKEY hSubKey; diff --git a/setup_native/source/win32/customactions/regactivex/regactivex.cxx b/setup_native/source/win32/customactions/regactivex/regactivex.cxx index 0cf89eca1ebc..8e1ca28892bf 100644 --- a/setup_native/source/win32/customactions/regactivex/regactivex.cxx +++ b/setup_native/source/win32/customactions/regactivex/regactivex.cxx @@ -47,8 +47,6 @@ #define WRITER_COMPONENT 16 #define MATH_COMPONENT 32 -// #define OWN_DEBUG_PRINT - typedef int ( __stdcall * DllNativeRegProc ) ( int, BOOL, BOOL, const char* ); typedef int ( __stdcall * DllNativeUnregProc ) ( int, BOOL, BOOL ); @@ -79,22 +77,9 @@ char* UnicodeToAnsiString( wchar_t* pUniString ) return buff; } -#ifdef OWN_DEBUG_PRINT -void WarningMessageInt( wchar_t* pWarning, unsigned int nValue ) -{ - wchar_t pStr[5] = { nValue%10000/1000 + 48, nValue%1000/100 + 48, nValue%100/10 + 48, nValue%10 + 48, 0 }; - MessageBox(NULL, pStr, pWarning, MB_OK | MB_ICONINFORMATION); -} -#endif - //---------------------------------------------------------- void RegisterActiveXNative( const char* pActiveXPath, int nMode, BOOL InstallForAllUser, BOOL InstallFor64Bit ) { -#ifdef OWN_DEBUG_PRINT - MessageBoxW(NULL, L"RegisterActiveXNative", L"Information", MB_OK | MB_ICONINFORMATION); - MessageBoxA(NULL, pActiveXPath, "Library Path", MB_OK | MB_ICONINFORMATION); -#endif - // For Win98/WinME the values should be written to the local machine OSVERSIONINFO aVerInfo; aVerInfo.dwOSVersionInfoSize = sizeof( aVerInfo ); @@ -107,9 +92,6 @@ void RegisterActiveXNative( const char* pActiveXPath, int nMode, BOOL InstallFor DllNativeRegProc pNativeProc = ( DllNativeRegProc )GetProcAddress( hModule, "DllRegisterServerNative" ); if( pNativeProc!=NULL ) { -#ifdef OWN_DEBUG_PRINT - MessageBoxA(NULL, pActiveXPath, "Library Path", MB_OK | MB_ICONINFORMATION); -#endif int nLen = strlen( pActiveXPath ); int nRemoveLen = strlen( "\\so_activex.dll" ); if ( nLen > nRemoveLen ) @@ -174,10 +156,6 @@ BOOL GetActiveXControlPath( MSIHANDLE hMSI, char** ppActiveXPath ) if ( GetMsiProp( hMSI, L"INSTALLLOCATION", &pProgPath ) && pProgPath ) { char* pCharProgPath = UnicodeToAnsiString( pProgPath ); -#ifdef OWN_DEBUG_PRINT - MessageBox(NULL, pProgPath, L"Basis Installation Path", MB_OK | MB_ICONINFORMATION); - MessageBoxA(NULL, pCharProgPath, "Basis Installation Path( char )", MB_OK | MB_ICONINFORMATION); -#endif if ( pCharProgPath ) { @@ -211,11 +189,6 @@ BOOL GetDelta( MSIHANDLE hMSI, int& nOldInstallMode, int& nInstallMode, int& nDe if ( ERROR_SUCCESS == MsiGetFeatureState( hMSI, L"gm_p_Wrt_Bin", ¤t_state, &future_state ) ) { -#ifdef OWN_DEBUG_PRINT - WarningMessageInt( L"writer current_state = ", current_state ); - WarningMessageInt( L"writer future_state = ", future_state ); -#endif - // analyze writer installation mode if ( current_state == INSTALLSTATE_LOCAL ) nOldInstallMode |= WRITER_COMPONENT; @@ -233,11 +206,6 @@ BOOL GetDelta( MSIHANDLE hMSI, int& nOldInstallMode, int& nInstallMode, int& nDe if ( ERROR_SUCCESS == MsiGetFeatureState( hMSI, L"gm_p_Calc_Bin", ¤t_state, &future_state ) ) { -#ifdef OWN_DEBUG_PRINT - WarningMessageInt( L"calc current_state = ", current_state ); - WarningMessageInt( L"calc future_state = ", future_state ); -#endif - // analyze calc installation mode if ( current_state == INSTALLSTATE_LOCAL ) nOldInstallMode |= CALC_COMPONENT; @@ -341,19 +309,11 @@ extern "C" UINT __stdcall InstallActiveXControl( MSIHANDLE hMSI ) int nInstallMode = 0; int nDeinstallMode = 0; -#ifdef OWN_DEBUG_PRINT - MessageBox(NULL, L"InstallActiveXControl", L"Information", MB_OK | MB_ICONINFORMATION); -#endif - INSTALLSTATE current_state; INSTALLSTATE future_state; if ( ERROR_SUCCESS == MsiGetFeatureState( hMSI, L"gm_o_Activexcontrol", ¤t_state, &future_state ) ) { -#ifdef OWN_DEBUG_PRINT - MessageBox(NULL, L"InstallActiveXControl Step2", L"Information", MB_OK | MB_ICONINFORMATION); -#endif - BOOL bInstallForAllUser = MakeInstallForAllUsers( hMSI ); BOOL bInstallFor64Bit = MakeInstallFor64Bit( hMSI ); @@ -361,17 +321,9 @@ extern "C" UINT __stdcall InstallActiveXControl( MSIHANDLE hMSI ) if ( GetActiveXControlPath( hMSI, &pActiveXPath ) && pActiveXPath && GetDelta( hMSI, nOldInstallMode, nInstallMode, nDeinstallMode ) ) { -#ifdef OWN_DEBUG_PRINT - MessageBox(NULL, L"InstallActiveXControl Step3", L"Information", MB_OK | MB_ICONINFORMATION); -#endif - if ( future_state == INSTALLSTATE_LOCAL || ( current_state == INSTALLSTATE_LOCAL && future_state == INSTALLSTATE_UNKNOWN ) ) { -#ifdef OWN_DEBUG_PRINT - MessageBox(NULL, L"InstallActiveXControl, adjusting", L"Information", MB_OK | MB_ICONINFORMATION); - WarningMessageInt( L"nInstallMode = ", nInstallMode ); -#endif // the control is installed in the new selected configuration if ( current_state == INSTALLSTATE_LOCAL && nDeinstallMode ) @@ -382,9 +334,6 @@ extern "C" UINT __stdcall InstallActiveXControl( MSIHANDLE hMSI ) } else if ( current_state == INSTALLSTATE_LOCAL && future_state == INSTALLSTATE_ABSENT ) { -#ifdef OWN_DEBUG_PRINT - MessageBox(NULL, L"InstallActiveXControl, removing", L"Information", MB_OK | MB_ICONINFORMATION); -#endif if ( nOldInstallMode ) UnregisterActiveXNative( pActiveXPath, nOldInstallMode, bInstallForAllUser, bInstallFor64Bit ); } @@ -407,10 +356,6 @@ extern "C" UINT __stdcall DeinstallActiveXControl( MSIHANDLE hMSI ) INSTALLSTATE current_state; INSTALLSTATE future_state; -#ifdef OWN_DEBUG_PRINT - MessageBox(NULL, L"DeinstallActiveXControl", L"Information", MB_OK | MB_ICONINFORMATION); -#endif - if ( ERROR_SUCCESS == MsiGetFeatureState( hMSI, L"gm_o_Activexcontrol", ¤t_state, &future_state ) ) { char* pActiveXPath = NULL; diff --git a/setup_native/source/win32/customactions/regpatchactivex/makefile.mk b/setup_native/source/win32/customactions/regpatchactivex/makefile.mk index d79593abcc69..4c6668db268c 100644 --- a/setup_native/source/win32/customactions/regpatchactivex/makefile.mk +++ b/setup_native/source/win32/customactions/regpatchactivex/makefile.mk @@ -34,19 +34,16 @@ USE_DEFFILE=TRUE # --- Settings ----------------------------------------------------- -# NO_DEFAULT_STL=TRUE ENABLE_EXCEPTIONS=TRUE .INCLUDE : settings.mk STDSHL= -# SOLARINC!:=$(SOLARINC:s/stl//) # --- Files -------------------------------------------------------- INCPRE+=.\Include .DIRCACHE=NO -# CFLAGS+=-E SLOFILES = $(SLO)$/regpatchactivex.obj @@ -72,7 +69,6 @@ SHL1STDLIBS+= libcmt.lib SHL1LIBS = $(SLB)$/$(TARGET).lib -#SHL1TARGET = $(TARGET)$(DLLPOSTFIX) SHL1TARGET = $(TARGET) SHL1IMPLIB = i$(TARGET) diff --git a/setup_native/source/win32/customactions/relnotes/exports.dxp b/setup_native/source/win32/customactions/relnotes/exports.dxp deleted file mode 100644 index 55a454d3d58f..000000000000 --- a/setup_native/source/win32/customactions/relnotes/exports.dxp +++ /dev/null @@ -1,3 +0,0 @@ -ShowReleaseNotesBefore -ShowReleaseNotesAfter -ShowSurveyAfter diff --git a/setup_native/source/win32/customactions/relnotes/makefile.mk b/setup_native/source/win32/customactions/relnotes/makefile.mk deleted file mode 100644 index 4c29ead8bd6c..000000000000 --- a/setup_native/source/win32/customactions/relnotes/makefile.mk +++ /dev/null @@ -1,83 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# 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. -# -#************************************************************************* - -PRJ=..$/..$/..$/.. -PRJNAME=setup_native -TARGET=relnotes - - -# --- Settings ----------------------------------------------------- - -ENABLE_EXCEPTIONS=TRUE -NO_DEFAULT_STL=TRUE -DYNAMIC_CRT= -USE_DEFFILE=TRUE - -.INCLUDE : settings.mk - -CDEFS+=-DUNICODE -.IF "$(USE_SYSTEM_STL)" != "YES" -CDEFS+=-D_STLP_USE_STATIC_LIB -.ENDIF - -UWINAPILIB= - -# --- Files -------------------------------------------------------- - -.IF "$(GUI)"=="WNT" - -SLOFILES = $(SLO)$/relnotes.obj - -STDSHL+= \ - $(ADVAPI32LIB)\ - $(SHELL32LIB)\ - $(MSILIB) - -.IF "$(USE_SYSTEM_STL)" != "YES" -STDSHL+=$(LIBSTLPORTST) -.ENDIF - -SHL1LIBS = $(SLB)$/$(TARGET).lib - -SHL1TARGET = $(TARGET) -SHL1IMPLIB = i$(TARGET) - -SHL1DEF = $(MISC)$/$(SHL1TARGET).def -SHL1DEPN = $(SLB)$/$(TARGET).lib -SHL1BASE = 0x1c000000 -DEF1NAME=$(SHL1TARGET) -DEF1EXPORTFILE=exports.dxp - -.ENDIF - -# --- Targets -------------------------------------------------------------- - -.INCLUDE : target.mk - -# ------------------------------------------------------------------------- - - diff --git a/setup_native/source/win32/customactions/relnotes/relnotes.cxx b/setup_native/source/win32/customactions/relnotes/relnotes.cxx deleted file mode 100644 index 48aaf9b417bd..000000000000 --- a/setup_native/source/win32/customactions/relnotes/relnotes.cxx +++ /dev/null @@ -1,188 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * 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. - * - ************************************************************************/ - -#ifdef _MSC_VER -#pragma warning(push,1) // disable warnings within system headers -#pragma warning(disable: 4917) -#endif -#include <windows.h> -#include <msiquery.h> -#include <shlobj.h> -#ifdef _MSC_VER -#pragma warning(pop) -#endif - -#include <string.h> -#include <malloc.h> -#include <stdio.h> -#include <strsafe.h> -#include <string> - -//---------------------------------------------------------- -#ifdef DEBUG -inline void OutputDebugStringFormat( LPCTSTR pFormat, ... ) -{ - TCHAR buffer[1024]; - va_list args; - - va_start( args, pFormat ); - StringCchVPrintf( buffer, sizeof(buffer), pFormat, args ); - OutputDebugString( buffer ); -} -#else -static inline void OutputDebugStringFormat( LPCTSTR, ... ) -{ -} -#endif - -//---------------------------------------------------------- -inline bool IsValidHandle( HANDLE handle ) -{ - return (NULL != handle) && (INVALID_HANDLE_VALUE != handle); -} - -//---------------------------------------------------------- -static bool GetMsiProp(MSIHANDLE handle, LPCTSTR name, /*out*/std::wstring& value) -{ - DWORD sz = 0; - LPTSTR dummy = TEXT(""); - if (MsiGetProperty(handle, name, dummy, &sz) == ERROR_MORE_DATA) - { - sz++; - DWORD nbytes = sz * sizeof(TCHAR); - LPTSTR buff = reinterpret_cast<LPTSTR>(_alloca(nbytes)); - ZeroMemory(buff, nbytes); - MsiGetProperty(handle, name, buff, &sz); - value = buff; - return true; - } - return false; -} - -//---------------------------------------------------------- -//---------------------------------------------------------- -//---------------------------------------------------------- -UINT ShowReleaseNotes( TCHAR* pFileName, TCHAR* pFilePath ) -{ - TCHAR sFullPath[ MAX_PATH ]; - - if ( FAILED( StringCchCopy( sFullPath, MAX_PATH, pFilePath ) ) ) - { - OutputDebugStringFormat( TEXT("DEBUG: ShowReleaseNotes: Could not copy path [%s]"), pFilePath ); - return ERROR_SUCCESS; - } - - if ( FAILED( StringCchCat( sFullPath, MAX_PATH, pFileName ) ) ) - { - OutputDebugStringFormat( TEXT("DEBUG: ShowReleaseNotes: Could not append filename [%s]"), pFileName ); - return ERROR_SUCCESS; - } - - HANDLE hFile = CreateFile( sFullPath, 0, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); - - if ( IsValidHandle(hFile) ) - { - CloseHandle( hFile ); - OutputDebugStringFormat( TEXT("DEBUG: ShowReleaseNotes: Found file [%s]"), sFullPath ); - - SHELLEXECUTEINFOW aExecInf; - ZeroMemory( &aExecInf, sizeof( aExecInf ) ); - - aExecInf.cbSize = sizeof( aExecInf ); - aExecInf.fMask = SEE_MASK_FLAG_DDEWAIT | SEE_MASK_FLAG_NO_UI; - aExecInf.lpVerb = TEXT("open"); - aExecInf.lpFile = sFullPath; - aExecInf.lpDirectory = NULL; - aExecInf.nShow = SW_SHOWNORMAL; - - SetLastError( 0 ); - ShellExecuteEx( &aExecInf ); - } - else - { - OutputDebugStringFormat( TEXT("DEBUG: ShowReleaseNotes: File not found [%s]"), sFullPath ); - } - - return ERROR_SUCCESS; -} - -//---------------------------------------------------------- -extern "C" UINT __stdcall ShowReleaseNotesBefore( MSIHANDLE ) -{ - TCHAR szPath[MAX_PATH]; - - if( FAILED( SHGetSpecialFolderPath( NULL, szPath, CSIDL_COMMON_DOCUMENTS, true ) ) ) - return ERROR_SUCCESS; - - OutputDebugString( TEXT("DEBUG: ShowReleaseNotesBefore called") ); - - return ShowReleaseNotes( TEXT("\\sun\\releasenote1.url"), szPath ); -} - -//---------------------------------------------------------- -extern "C" UINT __stdcall ShowReleaseNotesAfter( MSIHANDLE ) -{ - TCHAR szPath[MAX_PATH]; - - if( FAILED( SHGetSpecialFolderPath( NULL, szPath, CSIDL_COMMON_DOCUMENTS, true ) ) ) - return ERROR_SUCCESS; - - OutputDebugString( TEXT("DEBUG: ShowReleaseNotesAfter called") ); - - return ShowReleaseNotes( TEXT("\\sun\\releasenote2.url"), szPath ); -} - -//---------------------------------------------------------- -extern "C" UINT __stdcall ShowSurveyAfter( MSIHANDLE handle ) -{ - std::wstring prodname; - - GetMsiProp( handle, TEXT("ProductName"), prodname ); - std::wstring::size_type nIndex = prodname.find( TEXT( "OpenOffice.org" ) ); - if( std::wstring::npos == nIndex ) - return ERROR_SUCCESS; - - OutputDebugString( TEXT("DEBUG: ShowSurveyAfter called") ); - - SHELLEXECUTEINFOW aExecInf; - ZeroMemory( &aExecInf, sizeof( aExecInf ) ); - - aExecInf.cbSize = sizeof( aExecInf ); - aExecInf.fMask = SEE_MASK_FLAG_DDEWAIT | SEE_MASK_FLAG_NO_UI; - aExecInf.lpVerb = TEXT("open"); - aExecInf.lpFile = TEXT("http://surveys.libreoffice.org/deinstall"); - aExecInf.lpDirectory = NULL; - aExecInf.nShow = SW_SHOWNORMAL; - - SetLastError( 0 ); - ShellExecuteEx( &aExecInf ); - - return ERROR_SUCCESS; -} - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/setup_native/source/win32/customactions/sellang/makefile.mk b/setup_native/source/win32/customactions/sellang/makefile.mk index e2110ce708c9..a75c994fffc4 100644 --- a/setup_native/source/win32/customactions/sellang/makefile.mk +++ b/setup_native/source/win32/customactions/sellang/makefile.mk @@ -55,8 +55,7 @@ SHL1STDLIBS= kernel32.lib\ user32.lib\ advapi32.lib\ shell32.lib\ - msi.lib\ - $(LIBSTLPORTST) + msi.lib SHL1LIBS = $(SLB)$/$(TARGET).lib diff --git a/setup_native/source/win32/customactions/sellang/sellang.cxx b/setup_native/source/win32/customactions/sellang/sellang.cxx index 5d3678744514..e0a775af1bcd 100644 --- a/setup_native/source/win32/customactions/sellang/sellang.cxx +++ b/setup_native/source/win32/customactions/sellang/sellang.cxx @@ -49,8 +49,6 @@ #include <sal/macros.h> #include <systools/win32/uwinapi.h> -/* #define VERBOSE_DEBUG_OUTPUT 1 */ - static const char * langid_to_string( LANGID langid, int *have_default_lang ) { @@ -195,9 +193,6 @@ present_in_ui_langs(const char *lang) extern "C" UINT __stdcall SelectLanguage( MSIHANDLE handle ) { -#ifdef VERBOSE_DEBUG_OUTPUT - char tem[2000]; -#endif char feature[100]; MSIHANDLE database, view, record; DWORD length; @@ -211,20 +206,12 @@ extern "C" UINT __stdcall SelectLanguage( MSIHANDLE handle ) return ERROR_SUCCESS; } -#ifdef VERBOSE_DEBUG_OUTPUT - MessageBoxA(NULL, "MsiDatabaseOpenViewA success!", "SelectLanguage", MB_OK); -#endif - if (MsiViewExecute(view, NULL) != ERROR_SUCCESS) { MsiCloseHandle(view); MsiCloseHandle(database); return ERROR_SUCCESS; } -#ifdef VERBOSE_DEBUG_OUTPUT - MessageBoxA(NULL, "MsiViewExecute success!", "SelectLanguage", MB_OK); -#endif - while (nlangs < MAX_LANGUAGES && MsiViewFetch(view, &record) == ERROR_SUCCESS) { length = sizeof(feature); @@ -256,24 +243,8 @@ extern "C" UINT __stdcall SelectLanguage( MSIHANDLE handle ) const char *system_default_lang = langid_to_string(GetSystemDefaultUILanguage(), &have_system_default_lang); const char *user_locale_lang = langid_to_string(LANGIDFROMLCID(GetThreadLocale()), NULL); -#ifdef VERBOSE_DEBUG_OUTPUT - sprintf(tem, "GetSystemDefaultUILanguage(): %#x = %s", GetSystemDefaultUILanguage(), system_default_lang); - MessageBoxA(NULL, tem, "SelectLanguage", MB_OK); -#endif - EnumUILanguagesA(enum_ui_lang_proc, 0, 0); -#ifdef VERBOSE_DEBUG_OUTPUT - sprintf(tem, "Have %d UI languages: ", num_ui_langs); - for (i = 0; i < num_ui_langs; i++) { - char *p = tem + strlen(tem); - sprintf(p, "%s%s", - ui_langs[i], - (i + 1 < num_ui_langs) ? ", " : ""); - } - MessageBoxA(NULL, tem, "SelectLanguage", MB_OK); -#endif - /* If one of the alternative languages in a multi-language installer * is the system default UI language, deselect those languages that * aren't among the UI languages available on the system. @@ -293,20 +264,12 @@ extern "C" UINT __stdcall SelectLanguage( MSIHANDLE handle ) if (system_default_lang[0]) { for (i = 0; i < nlangs; i++) { if (memcmp (system_default_lang, langs[i], 2) == 0) { -#ifdef VERBOSE_DEBUG_OUTPUT - sprintf(tem, "We have the system default language %s in the installer", system_default_lang); - MessageBoxA(NULL, tem, "SelectLanguage", MB_OK); -#endif have_system_default_lang = 1; } } } if (!have_system_default_lang) { -#ifdef VERBOSE_DEBUG_OUTPUT - sprintf(tem, "We don't have the system default language %s in the installer, so pretend that English is the system default, sigh.", system_default_lang); - MessageBoxA(NULL, tem, "SelectLanguage", MB_OK); -#endif system_default_lang = "en"; have_system_default_lang = 1; } @@ -318,17 +281,6 @@ extern "C" UINT __stdcall SelectLanguage( MSIHANDLE handle ) UINT rc; sprintf(feature, "gm_Langpack_r_%s", langs[i]); rc = MsiSetFeatureStateA(handle, feature, INSTALLSTATE_ABSENT); - if (rc != ERROR_SUCCESS) { -#ifdef VERBOSE_DEBUG_OUTPUT - sprintf(tem, "MsiSetFeatureStateA %s failed: %d", feature, rc); - MessageBoxA(NULL, tem, "SelectLanguage", MB_OK); -#endif - } else { -#ifdef VERBOSE_DEBUG_OUTPUT - sprintf(tem, "MsiSetFeatureStateA %s OK!", feature); - MessageBoxA(NULL, tem, "SelectLanguage", MB_OK); -#endif - } } } } diff --git a/setup_native/source/win32/customactions/shellextensions/layerlinks.cxx b/setup_native/source/win32/customactions/shellextensions/layerlinks.cxx index 11c9757ff921..56885d408b77 100644 --- a/setup_native/source/win32/customactions/shellextensions/layerlinks.cxx +++ b/setup_native/source/win32/customactions/shellextensions/layerlinks.cxx @@ -117,11 +117,6 @@ extern "C" UINT __stdcall CreateLayerLinks(MSIHANDLE handle) stripFinalBackslash(&sBasisInstallPath); stripFinalBackslash(&sUreInstallPath); - // string myText1 = TEXT("Creating Basis-Link: ") + sBasisLinkPath; - // string myText2 = TEXT("Creating Ure-Link: ") + sUreLinkPath; - // MessageBox(NULL, myText1.c_str(), "DEBUG", MB_OK); - // MessageBox(NULL, myText2.c_str(), "DEBUG", MB_OK); - // creating basis-link in brand layer HANDLE h1file = CreateFile( @@ -151,7 +146,6 @@ extern "C" UINT __stdcall CreateLayerLinks(MSIHANDLE handle) LPSTR lpPathUTF8 = new CHAR[nCharsRequired]; WideCharToMultiByte( CP_UTF8, 0, lpPathW, -1, lpPathUTF8, nCharsRequired, NULL, NULL ); - // WriteFile( h1file, sBasisInstallPath.c_str(), sBasisInstallPath.size() ,&dummy, 0 ); WriteFile( h1file, lpPathUTF8, strlen(lpPathUTF8) ,&dummy, 0 ); delete lpPathUTF8; @@ -193,7 +187,6 @@ extern "C" UINT __stdcall CreateLayerLinks(MSIHANDLE handle) LPSTR lpPathUTF8 = new CHAR[nCharsRequired]; WideCharToMultiByte( CP_UTF8, 0, lpPathW, -1, lpPathUTF8, nCharsRequired, NULL, NULL ); - // WriteFile( h2file, sUreInstallPath.c_str(), sUreInstallPath.size() ,&dummy, 0 ); WriteFile( h2file, lpPathUTF8, strlen(lpPathUTF8) ,&dummy, 0 ); delete lpPathUTF8; @@ -221,12 +214,7 @@ extern "C" UINT __stdcall RemoveLayerLinks(MSIHANDLE handle) string sUreLinkPath = sBasisInstallPath + TEXT("ure-link"); string sUreDirName = sUreInstallPath + TEXT("bin"); - // string myText2 = TEXT("Deleting Ure-Link: ") + sUreLinkPath; - // MessageBox(NULL, myText2.c_str(), "DEBUG", MB_OK); - // Deleting link to basis layer - // string myText1 = TEXT("Deleting Basis-Link: ") + sBasisLinkPath; - // MessageBox(NULL, myText1.c_str(), "DEBUG", MB_OK); DeleteFile(sBasisLinkPath.c_str()); // Check, if URE is still installed @@ -236,22 +224,10 @@ extern "C" UINT __stdcall RemoveLayerLinks(MSIHANDLE handle) if ( hFindContent == INVALID_HANDLE_VALUE ) { ureDirExists = false; } FindClose( hFindContent ); - // if ( ureDirExists ) - // { - // string myText3 = TEXT("URE directory still exists: ") + sUreDirName; - // MessageBox(NULL, myText3.c_str(), "DEBUG", MB_OK); - // string myText4 = TEXT("URE link NOT removed: ") + sUreLinkPath; - // MessageBox(NULL, myText4.c_str(), "DEBUG", MB_OK); - // } - // Deleting link to URE layer, if URE dir no longer exists if ( ! ureDirExists ) { - // string myText5 = TEXT("URE directory does not exist: ") + sUreDirName; - // MessageBox(NULL, myText5.c_str(), "DEBUG", MB_OK); DeleteFile(sUreLinkPath.c_str()); - // string myText6 = TEXT("URE link removed: ") + sUreLinkPath; - // MessageBox(NULL, myText6.c_str(), "DEBUG", MB_OK); } return ERROR_SUCCESS; diff --git a/setup_native/source/win32/customactions/shellextensions/makefile.mk b/setup_native/source/win32/customactions/shellextensions/makefile.mk index 23fe24bb6ceb..de8f943320f0 100644 --- a/setup_native/source/win32/customactions/shellextensions/makefile.mk +++ b/setup_native/source/win32/customactions/shellextensions/makefile.mk @@ -38,10 +38,6 @@ USE_DEFFILE=TRUE .INCLUDE : settings.mk -.IF "$(USE_SYSTEM_STL)" != "YES" -CFLAGS+=-D_STLP_USE_STATIC_LIB -.ENDIF - #Disable precompiled header CDEFS+=-Dnot_used_define_to_disable_pch @@ -75,10 +71,6 @@ STDSHL += \ $(MSILIB)\ $(SHELL32LIB) -.IF "$(USE_SYSTEM_STL)" != "YES" -STDSHL += $(LIBSTLPORTST) -.ENDIF - .IF "$(COM)"=="GCC" STDSHL+= \ $(KERNEL32LIB)\ diff --git a/setup_native/source/win32/customactions/shellextensions/registerextensions.cxx b/setup_native/source/win32/customactions/shellextensions/registerextensions.cxx index 9075436e0412..6b32b33cc881 100644 --- a/setup_native/source/win32/customactions/shellextensions/registerextensions.cxx +++ b/setup_native/source/win32/customactions/shellextensions/registerextensions.cxx @@ -59,112 +59,112 @@ The returned string is a file URL. */ -static std::_tstring createTempFolder() -{ - BOOL bExist = FALSE; - TCHAR szTempName[MAX_PATH]; - do - { - bExist = FALSE; - // Get the temp path. - TCHAR lpPathBuffer[MAX_PATH]; - DWORD dwRetVal = GetTempPath(MAX_PATH, lpPathBuffer); - if (dwRetVal > MAX_PATH || (dwRetVal == 0)) - { - //fprintf (stderr, "GetTempPath failed with error %d.\n", GetLastError()); - return TEXT(""); - } - // Create a temporary file. - UINT uRetVal = GetTempFileName(lpPathBuffer, // directory for tmp files - "upg", // temp file name prefix - 0, // create unique name - szTempName); // buffer for name - if (uRetVal == 0) - { - //fprintf (stderr, "GetTempFileName failed with error %d.\n", GetLastError()); - return TEXT(""); - } - //Delete the file - BOOL bDel = DeleteFile(szTempName); - if (FALSE == bDel) - { - //fprintf(stderr, "Could not delete temp file. Error %d.\n", GetLastError()); - return TEXT(""); - } - // Create the directory - BOOL bDir = CreateDirectory(szTempName, NULL); - if (FALSE == bDir) - { - DWORD error =GetLastError(); - if (ERROR_ALREADY_EXISTS == error) - { - bExist = TRUE; - } - else - { - //fprintf(stderr, "CreateDirectory failed with error %d.\n", error); - return TEXT(""); - } - } - } while(bExist); +// static std::_tstring createTempFolder() +// { +// BOOL bExist = FALSE; +// TCHAR szTempName[MAX_PATH]; +// do +// { +// bExist = FALSE; +// // Get the temp path. +// TCHAR lpPathBuffer[MAX_PATH]; +// DWORD dwRetVal = GetTempPath(MAX_PATH, lpPathBuffer); +// if (dwRetVal > MAX_PATH || (dwRetVal == 0)) +// { +// //fprintf (stderr, "GetTempPath failed with error %d.\n", GetLastError()); +// return TEXT(""); +// } +// // Create a temporary file. +// UINT uRetVal = GetTempFileName(lpPathBuffer, // directory for tmp files +// "upg", // temp file name prefix +// 0, // create unique name +// szTempName); // buffer for name +// if (uRetVal == 0) +// { +// //fprintf (stderr, "GetTempFileName failed with error %d.\n", GetLastError()); +// return TEXT(""); +// } +// //Delete the file +// BOOL bDel = DeleteFile(szTempName); +// if (FALSE == bDel) +// { +// //fprintf(stderr, "Could not delete temp file. Error %d.\n", GetLastError()); +// return TEXT(""); +// } +// // Create the directory +// BOOL bDir = CreateDirectory(szTempName, NULL); +// if (FALSE == bDir) +// { +// DWORD error =GetLastError(); +// if (ERROR_ALREADY_EXISTS == error) +// { +// bExist = TRUE; +// } +// else +// { +// //fprintf(stderr, "CreateDirectory failed with error %d.\n", error); +// return TEXT(""); +// } +// } +// } while(bExist); - std::_tstring cur(szTempName); - //make a file URL from the path - std::_tstring ret(TEXT("file:///")); - for (std::_tstring::iterator i = cur.begin(); i != cur.end(); i++) - { - if (*i == '\\') - ret.append(TEXT("/")); - else - ret.push_back(*i); - } -// MessageBox(NULL, ret.c_str(), "createTempFolder", MB_OK); - return ret.c_str(); -} +// std::_tstring cur(szTempName); +// //make a file URL from the path +// std::_tstring ret(TEXT("file:///")); +// for (std::_tstring::iterator i = cur.begin(); i != cur.end(); i++) +// { +// if (*i == '\\') +// ret.append(TEXT("/")); +// else +// ret.push_back(*i); +// } +// // MessageBox(NULL, ret.c_str(), "createTempFolder", MB_OK); +// return ret.c_str(); +// } /** deletes the temporary folder. The argument must be a file URL. */ -static void deleteTempFolder(const std::_tstring& sTempFolder) -{ - if (sTempFolder.size() == 0) - return; - //convert the file URL to a path - const std::_tstring path(sTempFolder.substr(8)); - std::_tstring path2; -// MessageBox(NULL, path.c_str(), "del1", MB_OK); - for (std::_tstring::const_iterator i = path.begin(); i != path.end(); i++) - { - if (*i == '/') - path2.append(TEXT("\\")); - else - path2.push_back(*i); - } +// static void deleteTempFolder(const std::_tstring& sTempFolder) +// { +// if (sTempFolder.size() == 0) +// return; +// //convert the file URL to a path +// const std::_tstring path(sTempFolder.substr(8)); +// std::_tstring path2; +// // MessageBox(NULL, path.c_str(), "del1", MB_OK); +// for (std::_tstring::const_iterator i = path.begin(); i != path.end(); i++) +// { +// if (*i == '/') +// path2.append(TEXT("\\")); +// else +// path2.push_back(*i); +// } - //We need a null terminated string with two nulls in the end - //for the SHFILEOPSTRUCT - const TCHAR * szTemp = path2.c_str(); - size_t size = path2.size(); - TCHAR * szTemp2 = new TCHAR[size + 2]; - ZeroMemory(szTemp2, (size + 2) * sizeof(TCHAR)); - memcpy(szTemp2, szTemp, size * sizeof(TCHAR)); +// //We need a null terminated string with two nulls in the end +// //for the SHFILEOPSTRUCT +// const TCHAR * szTemp = path2.c_str(); +// size_t size = path2.size(); +// TCHAR * szTemp2 = new TCHAR[size + 2]; +// ZeroMemory(szTemp2, (size + 2) * sizeof(TCHAR)); +// memcpy(szTemp2, szTemp, size * sizeof(TCHAR)); -// MessageBox(NULL, szTemp2, "del3", MB_OK); - SHFILEOPSTRUCT operation = - { - NULL, - FO_DELETE, - szTemp2, - NULL, - FOF_SILENT | FOF_NOCONFIRMATION | FOF_NOERRORUI | FOF_NOCONFIRMMKDIR, - FALSE, - NULL, - NULL - }; - - SHFileOperation( &operation); - delete [] szTemp2; -} +// // MessageBox(NULL, szTemp2, "del3", MB_OK); +// SHFILEOPSTRUCT operation = +// { +// NULL, +// FO_DELETE, +// szTemp2, +// NULL, +// FOF_SILENT | FOF_NOCONFIRMATION | FOF_NOERRORUI | FOF_NOCONFIRMMKDIR, +// FALSE, +// NULL, +// NULL +// }; + +// SHFileOperation( &operation); +// delete [] szTemp2; +// } @@ -268,7 +268,7 @@ static BOOL RemoveCompleteDirectory( std::_tstring sPath ) } else { - mystr = "An error occured during removing content of " + sCompleteFileName; + mystr = "An error occurred during removing content of " + sCompleteFileName; // MessageBox(NULL, mystr.c_str(), "Error removing directory", MB_OK); } } @@ -282,7 +282,7 @@ static BOOL RemoveCompleteDirectory( std::_tstring sPath ) } else { - mystr = "An error occured during removal of file " + sCompleteFileName; + mystr = "An error occurred during removal of file " + sCompleteFileName; // MessageBox(NULL, mystr.c_str(), "Error removing file", MB_OK); } } @@ -307,7 +307,7 @@ static BOOL RemoveCompleteDirectory( std::_tstring sPath ) } else { - mystr = "An error occured during removal of empty directory " + sPath; + mystr = "An error occurred during removal of empty directory " + sPath; // MessageBox(NULL, mystr.c_str(), "Error removing directory", MB_OK); bDirectoryRemoved = false; } @@ -333,21 +333,13 @@ extern "C" UINT __stdcall RegisterExtensions(MSIHANDLE handle) if ( hFindUnopkg != INVALID_HANDLE_VALUE ) { // unopkg.exe exists in program directory - - const std::_tstring sTempFolder(createTempFolder()); - std::_tstring sCommandPart1 = sUnoPkgFile + " sync"; - std::_tstring sCommand = sCommandPart1 - + TEXT(" -env:BUNDLED_EXTENSIONS_USER=$BRAND_BASE_DIR/share/prereg/bundled") - + TEXT(" -env:UNO_JAVA_JFW_INSTALL_DATA=$OOO_BASE_DIR/share/config/javasettingsunopkginstall.xml") - + TEXT(" -env:UserInstallation=") + sTempFolder; + std::_tstring sCommand = sUnoPkgFile + " sync"; mystr = "Command: " + sCommand; //MessageBox(NULL, mystr.c_str(), "Command", MB_OK); DWORD exitCode = 0; bool fSuccess = ExecuteCommand( sCommand.c_str(), & exitCode); - deleteTempFolder(sTempFolder); - // if ( fSuccess ) // { // mystr = "Executed successfully!"; @@ -355,7 +347,7 @@ extern "C" UINT __stdcall RegisterExtensions(MSIHANDLE handle) // } // else // { -// mystr = "An error occured during execution!"; +// mystr = "An error occurred during execution!"; // MessageBox(NULL, mystr.c_str(), "Command", MB_OK); // } @@ -420,7 +412,7 @@ extern "C" UINT __stdcall RemoveExtensions(MSIHANDLE handle) // } // else // { -// mystr = "An error occured during execution!"; +// mystr = "An error occurred during execution!"; // MessageBox(NULL, mystr.c_str(), "Main methode", MB_OK); // } diff --git a/setup_native/source/win32/customactions/shellextensions/shellextensions.cxx b/setup_native/source/win32/customactions/shellextensions/shellextensions.cxx index c26b0ca0d0c2..01f0b306b3b4 100644 --- a/setup_native/source/win32/customactions/shellextensions/shellextensions.cxx +++ b/setup_native/source/win32/customactions/shellextensions/shellextensions.cxx @@ -144,7 +144,7 @@ extern "C" UINT __stdcall InstallExecSequenceEntry(MSIHANDLE hMSI) HKEY hKey; -// 06.11.2009 tkr: to provide windows xp as build systems for mingw we need to define KEY_WOW64_64KEY +// to provide windows xp as build systems for mingw we need to define KEY_WOW64_64KEY // in mingw 3.13 KEY_WOW64_64KEY isn't available < Win2003 systems. // Also defined in setup_native\source\win32\customactions\reg64\reg64.cxx,source\win32\customactions\shellextensions\shellextensions.cxx and // extensions\source\activex\main\so_activex.cpp diff --git a/setup_native/source/win32/customactions/shellextensions/startmenuicon.cxx b/setup_native/source/win32/customactions/shellextensions/startmenuicon.cxx index 9c5e6d4eb416..6b8a85eb163f 100644 --- a/setup_native/source/win32/customactions/shellextensions/startmenuicon.cxx +++ b/setup_native/source/win32/customactions/shellextensions/startmenuicon.cxx @@ -76,9 +76,6 @@ extern "C" UINT __stdcall InstallStartmenuFolderIcon( MSIHANDLE handle ) { std::_tstring sOfficeMenuFolder = GetMsiProperty( handle, TEXT("OfficeMenuFolder") ); std::_tstring sDesktopFile = sOfficeMenuFolder + TEXT("Desktop.ini"); - - // MessageBox(NULL, sDesktopFile.c_str(), TEXT("OfficeMenuFolder"), MB_OK | MB_ICONINFORMATION); - std::_tstring sIconFile = GetMsiProperty( handle, TEXT("INSTALLLOCATION") ) + TEXT("program\\soffice.exe"); OSVERSIONINFO osverinfo; @@ -114,14 +111,6 @@ extern "C" UINT __stdcall InstallStartmenuFolderIcon( MSIHANDLE handle ) TEXT("0"), sDesktopFile.c_str() ); - /* - WritePrivateProfileString( - TEXT(".ShellClassInfo"), - TEXT("InfoTip"), - TEXT("StarOffice Productivity Suite"), - sDesktopFile.c_str() ); - */ - SetFileAttributes( sDesktopFile.c_str(), FILE_ATTRIBUTE_HIDDEN ); SetFileAttributes( sOfficeMenuFolder.c_str(), FILE_ATTRIBUTE_SYSTEM ); diff --git a/setup_native/source/win32/customactions/shellextensions/vistaspecial.cxx b/setup_native/source/win32/customactions/shellextensions/vistaspecial.cxx index badd20ae241e..aede073d68d7 100644 --- a/setup_native/source/win32/customactions/shellextensions/vistaspecial.cxx +++ b/setup_native/source/win32/customactions/shellextensions/vistaspecial.cxx @@ -132,7 +132,7 @@ static BOOL RemoveCompleteDirectory( std::_tstring sPath ) } else { - mystr = "An error occured during removing content of " + sCompleteFileName; + mystr = "An error occurred during removing content of " + sCompleteFileName; // MessageBox(NULL, mystr.c_str(), "Error removing directory", MB_OK); } } @@ -146,7 +146,7 @@ static BOOL RemoveCompleteDirectory( std::_tstring sPath ) } else { - mystr = "An error occured during removal of file " + sCompleteFileName; + mystr = "An error occurred during removal of file " + sCompleteFileName; // MessageBox(NULL, mystr.c_str(), "Error removing file", MB_OK); } } @@ -171,7 +171,7 @@ static BOOL RemoveCompleteDirectory( std::_tstring sPath ) } else { - mystr = "An error occured during removal of empty directory " + sPath; + mystr = "An error occurred during removal of empty directory " + sPath; // MessageBox(NULL, mystr.c_str(), "Error removing directory", MB_OK); bDirectoryRemoved = false; } diff --git a/setup_native/source/win32/customactions/thesaurus/exports.dxp b/setup_native/source/win32/customactions/thesaurus/exports.dxp new file mode 100755 index 000000000000..830adddb3166 --- /dev/null +++ b/setup_native/source/win32/customactions/thesaurus/exports.dxp @@ -0,0 +1 @@ +CreateIndexes diff --git a/setup_native/source/win32/customactions/thesaurus/makefile.mk b/setup_native/source/win32/customactions/thesaurus/makefile.mk new file mode 100755 index 000000000000..c353341bf353 --- /dev/null +++ b/setup_native/source/win32/customactions/thesaurus/makefile.mk @@ -0,0 +1,78 @@ +#************************************************************************* +# +# OpenOffice.org - a multi-platform office productivity suite +# +# The Contents of this file are made available subject to +# the terms of GNU Lesser General Public License Version 3. +# +# +# GNU Lesser General Public License Version 3 +# ============================================= +# Copyright 2005 by Sun Microsystems, Inc. +# 901 San Antonio Road, Palo Alto, CA 94303, USA +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License version 2.1, as published by the Free Software Foundation. +# +# This library 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 for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, +# MA 02111-1307 USA +# +#************************************************************************* + +PRJ=..$/..$/..$/.. +PRJNAME=setup_native +TARGET=thidxmsi + +.IF "$(GUI)"=="WNT" + +# --- Settings ----------------------------------------------------- + +ENABLE_EXCEPTIONS=TRUE +NO_DEFAULT_STL=TRUE +DYNAMIC_CRT= +USE_DEFFILE=TRUE + +.INCLUDE : settings.mk + +CFLAGS+=-D_STLP_USE_STATIC_LIB + +# --- Files -------------------------------------------------------- + +UWINAPILIB= + +SLOFILES = \ + $(SLO)$/thesaurus.obj + +SHL1STDLIBS= kernel32.lib\ + user32.lib\ + advapi32.lib\ + shell32.lib\ + msi.lib + +SHL1LIBS = $(SLB)$/$(TARGET).lib + +SHL1TARGET = $(TARGET) +SHL1IMPLIB = i$(TARGET) + +SHL1DEF = $(MISC)$/$(SHL1TARGET).def +SHL1DEPN = $(SLB)$/$(TARGET).lib +SHL1BASE = 0x1c000000 +DEF1NAME=$(SHL1TARGET) +DEF1EXPORTFILE=exports.dxp + +# --- Targets -------------------------------------------------------------- + +.INCLUDE : target.mk + +# ------------------------------------------------------------------------- + + +.ENDIF diff --git a/setup_native/source/win32/customactions/thesaurus/thesaurus.cxx b/setup_native/source/win32/customactions/thesaurus/thesaurus.cxx new file mode 100644 index 000000000000..07bd605cb964 --- /dev/null +++ b/setup_native/source/win32/customactions/thesaurus/thesaurus.cxx @@ -0,0 +1,214 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/************************************************************************* + * + * OpenOffice.org - a multi-platform office productivity suite + * + * The Contents of this file are made available subject to + * the terms of GNU Lesser General Public License Version 3. + * + * + * GNU Lesser General Public License Version 3 + * ============================================= + * Copyright 2005 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library 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 for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + ************************************************************************/ + + + +#define WIN32_LEAN_AND_MEAN +#define _WIN32_WINNT 0x0500 +#undef WINVER +#define WINVER 0x0500 + +#include <windows.h> +#include <msiquery.h> +#include <malloc.h> + +#include <stdio.h> +#include <stdlib.h> +#include <string.h> + +#include <systools/win32/uwinapi.h> +#include <io.h> +#include <iostream> +#include <fstream> +#include <string> +#include <map> +#include <vector> +#include <stdlib.h> +#include <string.h> +using namespace std; +namespace +{ + + string GetMsiProperty(MSIHANDLE handle, const string& sProperty) + { + 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; + } + + inline bool IsSetMsiProperty(MSIHANDLE handle, const string& sProperty) + { + return (GetMsiProperty(handle, sProperty).length() > 0); + } + + inline void UnsetMsiProperty(MSIHANDLE handle, const string& sProperty) + { + MsiSetProperty(handle, sProperty.c_str(), NULL); + } + + inline void SetMsiProperty(MSIHANDLE handle, const string& sProperty, const string&) + { + MsiSetProperty(handle, sProperty.c_str(), TEXT("1")); + } + + static const int MAXLINE = 1024*64; + + + void generateIndex(const char *inputFile, const char *outputFile) + { + + ifstream in(inputFile); + char inputBuffer[MAXLINE]; + map<string, size_t> entries; + map<string,size_t>::iterator ret(entries.begin()); + + int line(1); + in.getline(inputBuffer, MAXLINE); + const string encoding(inputBuffer); + size_t currentOffset(encoding.size()+1); + while (true) + { + // Extract the next word, but not the entry count + in.getline(inputBuffer, MAXLINE, '|'); + + if (in.eof()) break; + + string word(inputBuffer); + ret = entries.insert(ret, pair<string, size_t>(word, currentOffset)); + currentOffset += word.size() + 1; + // Next is the entry count + in.getline(inputBuffer, MAXLINE); + if (!in.good()) + { + return; + + } + currentOffset += strlen(inputBuffer)+1; + int entryCount(strtol(inputBuffer, NULL, 10)); + for (int i(0); i < entryCount; ++i) + { + in.getline(inputBuffer, MAXLINE); + currentOffset += strlen(inputBuffer)+1; + ++line; + } + } + + // Use binary mode to prevent any translation of LF to CRLF on Windows + ofstream outputStream(outputFile, ios_base::binary| ios_base::trunc|ios_base::out); + if (!outputStream.is_open()) + { + //cerr << "Unable to open output file " << outputFile << endl; + return; + } + + cerr << "Doing it now" << outputFile << endl; + outputStream << encoding << '\n' << entries.size() << '\n'; + + for (map<string, size_t>::const_iterator ii(entries.begin()); + ii != entries.end(); + ++ii + ) + { + outputStream << ii->first << '|' << ii->second << '\n'; + } + outputStream.close(); + } + + void generateIndex(const string &datFile) + { + string idxFile(datFile.substr(0, datFile.size()-3)+"idx"); + generateIndex(datFile.c_str(), idxFile.c_str()); + } + void createIndexesForThesaurusFiles(const string & sOfficeInstallPath) + { + vector<string> thesaurusPaths; + + string sExtensionsPath = sOfficeInstallPath + "\\share\\extensions\\"; + + string dictionariesWildcard = sExtensionsPath + "dict-*"; + + struct _finddatai64_t dictFind; + long h = _findfirsti64(dictionariesWildcard.c_str(),&dictFind); + if (h > 0) + { + do + { + if (dictFind.attrib & _A_SUBDIR) + { + struct _finddatai64_t datFind; + // Find any .dat files in the subdirectory + string dictPath = sExtensionsPath + dictFind.name + "\\"; + string datWildCard = dictPath + "*.dat"; + long h2 = _findfirsti64(datWildCard.c_str(), &datFind); + if (h2 > 0) + { + do + { + thesaurusPaths.push_back(dictPath + datFind.name); + + } while (_findnexti64(h2,&datFind) == 0); + } + } + + } while (_findnexti64(h,&dictFind) == 0); + } + for (vector<string>::const_iterator ii(thesaurusPaths.begin()); + ii != thesaurusPaths.end(); + ++ii + ) + { + generateIndex(*ii); + } + } + +} // namespace + + +// Creates the thesaurus .idx files for all installed .dat +// thesaurus files +extern "C" UINT __stdcall CreateIndexes( MSIHANDLE handle ) +{ + + string sOfficeInstallPath = GetMsiProperty(handle, TEXT("INSTALLLOCATION")); + createIndexesForThesaurusFiles(sOfficeInstallPath); + return ERROR_SUCCESS; +} + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/setup_native/source/win32/customactions/tools/makefile.mk b/setup_native/source/win32/customactions/tools/makefile.mk index 4e8d791eff15..24e14861b968 100644 --- a/setup_native/source/win32/customactions/tools/makefile.mk +++ b/setup_native/source/win32/customactions/tools/makefile.mk @@ -39,10 +39,6 @@ USE_DEFFILE=TRUE .INCLUDE : settings.mk -.IF "$(USE_SYSTEM_STL)" != "YES" -CFLAGS+=-D_STLP_USE_STATIC_LIB -.ENDIF - # --- Files -------------------------------------------------------- .IF "$(GUI)"=="WNT" @@ -58,12 +54,6 @@ STDSHL+= \ $(ADVAPI32LIB)\ $(MSILIB) -.IF "$(USE_SYSTEM_STL)" != "YES" -STDSHL+=$(LIBSTLPORTST) -.ENDIF - -#SHL1LIBS = $(SLB)$/$(TARGET).lib - SHL1TARGET = $(TARGET) SHL1IMPLIB = i$(TARGET) diff --git a/setup_native/source/win32/msi-encodinglist.txt b/setup_native/source/win32/msi-encodinglist.txt index efa0f57b87ae..123339c3d9c5 100644 --- a/setup_native/source/win32/msi-encodinglist.txt +++ b/setup_native/source/win32/msi-encodinglist.txt @@ -3,19 +3,21 @@ af 1252 1078 # Afrikaans ar 1256 1025 ar-SA 1256 1025 -as-IN 0 1101 # Assamese as 0 1101 # Assamese +as-IN 0 1101 # Assamese ast 1252 1610 -be-BY 1251 1059 # Belarusian +be 1251 1059 # Belarusian +be-BY 1251 1059 bg 1251 1026 # Bulgarian bn 0 2117 # Bengali bn-BD 0 2117 # Bengali Bangladesh bn-IN 0 1093 # Bengali India +bo 0 2121 br 1252 1150 # Breton brx 0 1603 # Bodo (India) bs 0 5146 # bosnian -bo 0 2121 ca 1252 1027 # Catalan +ca-XV 1252 32771 # Catalan Valencian cs 1250 1029 # Czech cy 1252 1106 # Welsh da 1252 1030 @@ -35,21 +37,27 @@ fi 1252 1035 fo 1252 1080 # Faroese fr 1252 1036 fr-CA 1252 3084 +fur 0 1585 ga 0 2108 # Irish gd 0 1084 # Gaelic (Scotland) gl 1252 1110 # Galician -gu 0 1095 # Gujarati +gu 0 1095 # Gujarati gu-IN 0 1095 # Gujarati he 1255 1037 hi 0 1081 hr 1250 1050 # Croatian +ht 1252 1626 # Haitian hu 1250 1038 hy 0 1067 # Armenian id 1252 1057 # Indonesian is 1252 1039 # Icelandic it 1252 1040 ja 932 1041 +jbo 0 1624 ka 0 1079 # Georgian +kab 0 1625 +kid 1252 1033 # key id pseudo language +kk 0 1087 km 0 1107 # Khmer kn 0 1099 # Kannada kn-IN 0 1099 # Kannada @@ -57,15 +65,14 @@ ko 949 1042 kok 0 1111 # Konkani ks 0 1120 # Kashmiri ku 0 1574 -kid 1252 1033 # key id pseudo language ky 0 2100 lo 0 1108 # Lao lt 1257 1063 # Lithuanian lv 1257 1062 # Latvian mai 0 1605 # Maithili (India) mk 1251 1071 # Macedonian -ml-IN 0 1100 ml 0 1100 +ml-IN 0 1100 mn 0 1104 # Mongolian mni 0 1112 # Manipuri mn-TR 0 2128 # Mongolian Classical/traditional @@ -81,18 +88,19 @@ nn 1252 2068 no 1252 1044 nr 0 1580 # Ndebele South ns 0 1132 # Northern Sotho (Sepedi) -or 0 1096 # Oriya +nso 0 1132 +ny 0 1598 oc 1252 1154 # Occitan-lengadocian +om 0 2162 +or 0 1096 # Oriya or-IN 0 1096 pa-IN 0 1094 # Punjabi pap 0 2171 -om 0 2162 pl 1250 1045 +ps 0 2171 pt 1252 2070 pt-BR 1252 1046 pt-PT 1252 2070 -ps 0 2171 -ca-XV 1252 32771 # Catalan Valencian rm 0 1047 # Raeto-Romance ro 1250 1048 # Romanian ru 1251 1049 @@ -103,6 +111,7 @@ sb 0 1070 # Sorbian sc 0 3047 sd 0 1113 # Sindhi sh 1250 2074 # Serbian Latin +si 0 2133 sk 1250 1051 # Slovak sl 1250 1060 # Slovenian sq 1250 1052 # Albanian @@ -113,11 +122,11 @@ st 0 1072 # Southern Sotho, Sutu sv 1252 1053 sw 1252 1089 # Swahili sw-TZ 1252 1089 # Swahili -si 0 2133 +so 0 1143 ta 0 1097 # Tamil ta-IN 0 1097 # Tamil -te-IN 0 1098 te 0 1098 +te-IN 0 1098 tg 0 1064 # Tajik th 874 1054 ti 0 1139 # Tigrinya @@ -126,11 +135,11 @@ tn 0 1074 # Setsuana tr 1254 1055 # Turkish ts 0 1073 # Tsonga tt 1251 1092 # Tatar +ug 0 2200 uk 1251 1058 # Ukrainian ur 1256 1056 # Urdu ur-IN 0 2080 uz 0 1091 # Uzbek (Latin) -ug 0 2200 ve 0 1075 # Venda vi 1258 1066 # Vietnamese xh 0 1076 # Xhosa @@ -138,4 +147,3 @@ yi 0 1085 # Yiddish zh-CN 936 2052 zh-TW 950 1028 zu 0 1077 # Zulu -kk 0 1087 diff --git a/setup_native/source/win32/nsis/downloadtemplate.nsi b/setup_native/source/win32/nsis/downloadtemplate.nsi index 226c3cacf5ba..6484ef901e50 100644 --- a/setup_native/source/win32/nsis/downloadtemplate.nsi +++ b/setup_native/source/win32/nsis/downloadtemplate.nsi @@ -3,8 +3,9 @@ !define PRODUCT_PUBLISHER "PUBLISHERPLACEHOLDER" !define PRODUCT_WEB_SITE "WEBSITEPLACEHOLDER" -SetCompressor lzma -; SetCompressor zlib +SetCompressor zlib +SetDatablockOptimize On + ; Helpful for debugging, disable for products ; RequestExecutionLevel user diff --git a/setup_native/source/win32/nsis/urebitmap.bmp b/setup_native/source/win32/nsis/urebitmap.bmp Binary files differindex 25b5b11bed20..25b5b11bed20 100755..100644 --- a/setup_native/source/win32/nsis/urebitmap.bmp +++ b/setup_native/source/win32/nsis/urebitmap.bmp diff --git a/setup_native/source/win32/stwrapper/makefile.mk b/setup_native/source/win32/stwrapper/makefile.mk index ca035b4a9ad0..f81d86dc2f19 100644 --- a/setup_native/source/win32/stwrapper/makefile.mk +++ b/setup_native/source/win32/stwrapper/makefile.mk @@ -6,7 +6,6 @@ LIBTARGET=NO ENABLE_EXCEPTIONS=TRUE TARGETTYPE=GUI USE_DEFFILE=TRUE -#DYNAMIC_CRT:= NO_DEFAULT_STL=TRUE # --- Settings ----------------------------------------------------- @@ -46,5 +45,3 @@ DLLPRE = .INCLUDE : target.mk $(OBJ)$/stwrapper.obj: $(INCCOM)$/_version.h - -#$(RCFILES) : resource.rc diff --git a/setup_native/source/win32/stwrapper/stwrapper.cxx b/setup_native/source/win32/stwrapper/stwrapper.cxx index b4e22cf7afca..2376c94bf952 100644 --- a/setup_native/source/win32/stwrapper/stwrapper.cxx +++ b/setup_native/source/win32/stwrapper/stwrapper.cxx @@ -390,7 +390,6 @@ int WINAPI _tWinMain( HINSTANCE /*hInstance*/, HINSTANCE, LPTSTR, int ) if ( dwSTClientExitCode == ERR_NO_RECORDS_FOUND ) { - // output=`${STCLIENT} -a [-i "${INSTANCE_URN}"] -p "${PRODUCT_NAME}" -e "${PRODUCT_VERSION}" -t "${TARGET_URN}" -S "${PRODUCT_SOURCE}" -P "${PARENT_PRODUCT_NAME}" -m "Sun Microsystems, Inc." -A ${uname} -z global` lpCommandLine = new TCHAR[MAXCMDLINELEN]; _tcscpy( lpCommandLine, TEXT( "\"" )); |