ooo-build r14210 - in branches/ooo-build-3-0: . patches/dev300



Author: thorstenb
Date: Sun Oct  5 20:24:01 2008
New Revision: 14210
URL: http://svn.gnome.org/viewvc/ooo-build?rev=14210&view=rev

Log:
    * patches/dev300/apply:
    * patches/dev300/instset-macos-langpacks.diff: patch from CWS
    cloph10, makes langpacks for MacOSX actually work



Added:
   branches/ooo-build-3-0/patches/dev300/instset-macos-langpacks.diff
Modified:
   branches/ooo-build-3-0/ChangeLog
   branches/ooo-build-3-0/patches/dev300/apply

Modified: branches/ooo-build-3-0/patches/dev300/apply
==============================================================================
--- branches/ooo-build-3-0/patches/dev300/apply	(original)
+++ branches/ooo-build-3-0/patches/dev300/apply	Sun Oct  5 20:24:01 2008
@@ -2668,6 +2668,7 @@
 timely-canvas-disposing.diff, i#94007, thorsten
 jurt-jnilib-deliver.diff, i#93516, thorsten
 solenv-silent-mac-build.diff, thorsten
+instset-macos-langpacks.diff, i#64937, cloph
 
 [ Fixes < dev300-m30 < ooo300-m3 ]
 pdfimport-system-poppler-m29.diff, i#92920, cmc

Added: branches/ooo-build-3-0/patches/dev300/instset-macos-langpacks.diff
==============================================================================
--- (empty file)
+++ branches/ooo-build-3-0/patches/dev300/instset-macos-langpacks.diff	Sun Oct  5 20:24:01 2008
@@ -0,0 +1,153 @@
+--- /dev/null	1 Jan 1970 00:00:00 -0000
++++ instsetoo_native/res/osx_langpackinstall.applescript	19 Jan 2008 21:58:12 -0000	1.1.2.3
+@@ -0,0 +1,92 @@
++(*
++This script is meant to
++	1) Identify installed instances of OOo
++	2) check whether the user has write-access (and if not
++	ask for authentification)
++	3) install the shipped tarball
++*)
++
++-- strings for localisations - to be meant to be replaced
++-- by a makefile or similar
++set OKLabel to "OK"
++set AbortLabel to "Abort"
++set intro to "Welcome to the OpenOffice.org Languagepack Installer
++
++The next step will try to detect installed versions of OpenOffice.org
++This might take a moment"
++set chooseMyOwn to "not listed (choose location in an extra step)"
++set listPrompt to "Choose the installation for which you want to install the languagepack"
++set chooseManual to "Point the dialog to your OOo installation"
++set listOKLabel to "Continue"
++set listCancelLabel to "Abort installation"
++set appInvalid to " doesn't look like an OpenOffice.org installation
++If the chosen application really is OpenOffice.org, please contact the developers. Otherwise just run the installer again and choose a valid OpenOffice.org installation" -- string will begin with the chosen application's name
++set startInstall to "Click " & OKLabel & " to start the installation
++
++(installation might take a minute...)"
++set IdentifyQ to "Installation failed, most likely your account doesn't have the necessary privileges. Do you want to identify as administrator and try again?"
++set IdentifyYES to "Yes, identify"
++set IdentifyNO to "No, abort installation"
++set installFailed to "Installation failed"
++set installComplete to "Installation is completed - you should now be able to switch the UI language"
++
++set sourcedir to (do shell script "dirname " & quoted form of POSIX path of (path to of me))
++
++display dialog intro buttons {AbortLabel, OKLabel} default button 2
++
++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 == 'OpenOffice.org*' && kMDItemDisplayName != 'OpenOffice.org Languagepack.app'\"") & "
++" & chooseMyOwn
++
++-- the choice returned is of type "list"
++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)
++
++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
++
++-- now only check whether the path is really from OOo
++
++try
++	do shell script "grep '<string>org.openoffice.script</string>'   " & quoted form of (choice as string) & "/Contents/Info.plist"
++on error
++	display dialog (choice as string) & appInvalid buttons {OKLabel} default button 1 with icon 0
++	return 3 --wrong target-directory
++end try
++
++display dialog startInstall buttons {AbortLabel, OKLabel} default button 2
++
++if (button returned of result) is AbortLabel then
++	return 2
++end if
++
++set tarCommand to "/usr/bin/tar -C " & quoted form of (choice as string) & " -xjf " & quoted form of sourcedir & "/tarball.tar.bz2"
++try
++	do shell script tarCommand
++	
++on error errMSG number errNUM
++	display dialog IdentifyQ buttons {IdentifyYES, IdentifyNO} with icon 2
++	if (button returned of result) is IdentifyYES then
++		try
++			do shell script tarCommand with administrator privileges
++		on error errMSG number errNUM
++			display dialog installFailed buttons {OKLabel} default button 1 with icon 0
++			-- -60005 username/password wrong
++			-- -128   aborted by user
++			-- 2 error from tar - tarball not found (easy to test)
++			return errNUM
++		end try
++	else
++		return 2 -- aborted by user
++	end if
++end try
++
++display dialog installComplete buttons {OKLabel} default button 1
+--- /dev/null	1 Jan 1970 00:00:00 -0000
++++ instsetoo_native/res/osx_langpackinstall.sh	14 Sep 2007 18:13:05 -0000	1.1.2.1
+@@ -0,0 +1,10 @@
++#!/bin/bash
++
++# shell script as a workaraound since it is hard to impossible to store compiled
++# applescript in CVS and running osacompile would require a GUI session while
++# building (or root privileges)
++# using osascript only works when the shell script is camouflaged as application
++
++MY_DIR=$(dirname "$0")
++
++osascript "$MY_DIR/osx_langpackinstall.applescript"
+--- instsetoo_native/util/makefile.mk	30 Jul 2008 12:49:51 -0000	1.91
++++ instsetoo_native/util/makefile.mk	1 Oct 2008 01:12:17 -0000	1.72.2.10
+@@ -47,7 +47,7 @@ PYTHONPATH:=$(PWD)$/$(BIN):$(SOLARLIBDIR
+ .ENDIF			# "$(GUI)"=="WNT"
+ .EXPORT: PYTHONPATH
+ 
+-.IF "$(CWS_WORK_STAMP)"=="" || "$(UPDATER)"!=""
++.IF ("$(CWS_WORK_STAMP)"=="" || "$(UPDATER)"!="") && "$(OS)"!="MACOSX"
+ ENABLE_DOWNLOADSETS*=TRUE
+ .ENDIF			# "$(CWS_WORK_STAMP)"=="" || "$(UPDATER)"!=""
+ .IF "$(FORCE_DOWNLOADSETS)"!=""
+@@ -214,7 +214,11 @@ $(MAKETARGETS) : $(ADDDEPS)
+ .IF "$(OS)" == "MACOSX"
+ DMGDEPS=$(BIN)$/{osxdndinstall.png DS_Store}
+ $(foreach,i,$(alllangiso) {openoffice openofficedev openofficewithjre broffice brofficedev brofficewithjre}_$i) : $(DMGDEPS)
+-.ENDIF # "$(OS)" == "MACOSX"
++
++BUILDROOT_LANGPACK=$(subst,$(@:s/_/ /:1)_,$(OUT)$/OpenOffice_languagepack$/install$/ $(@:b))
++OOO_PKG_VERSION:=$(shell sed -n '/^OpenOffice$$/,/^}$$/ s/^[[:space:]]*PACKAGEVERSION //p' openoffice.lst)
++MAC_APPDIR:=$(shell sed -n '/^OpenOffice$$/,/^}$$/ s/.*PRODUCTNAME //p' openoffice.lst).app
++.ENDIF # "$(OS)"=="MACOSX"
+ 
+ .IF "$(PKGFORMAT)"!=""
+ $(foreach,i,$(alllangiso) openoffice_$i) : $$ {$(PKGFORMAT:^".")}
+@@ -254,7 +258,20 @@ ooolanguagepack_%{$(PKGFORMAT:^".")} :
+ .ELSE			# "$(PKGFORMAT)"!=""
+ ooolanguagepack_% :
+ .ENDIF			# "$(PKGFORMAT)"!=""
++.IF "$(OS)"!="MACOSX" 
+ 	$(PERL) -w $(SOLARENV)$/bin$/make_installer.pl -f $(PRJ)$/util$/openoffice.lst -l $(subst,$(@:s/_/ /:1)_, $(@:b)) -p OpenOffice -u $(OUT) -buildid $(BUILD) -msitemplate $(MSILANGPACKTEMPLATEDIR) -msilanguage $(COMMONMISC)$/win_ulffiles -languagepack $(subst,xxx,$(@:e:s/.//) $(PKGFORMATSWITCH) $(VERBOSESWITCH))
++.ELSE # "$(OS)"!="MACOSX"
++	$(PERL) -w $(SOLARENV)$/bin$/make_installer.pl -f $(PRJ)$/util$/openoffice.lst -l $(subst,$(@:s/_/ /:1)_, $(@:b)) -p OpenOffice -u $(OUT) -buildid $(BUILD) -languagepack -destdir $(BUILDROOT_LANGPACK)_inprogress$/ -simple staging
++	$(MKDIRHIER) $(BUILDROOT_LANGPACK)$/staging$/"OpenOffice.org Languagepack.app"$/Contents
++	$(COPY) $(PRJ)$/res$/osx_langpackinstall.sh $(BUILDROOT_LANGPACK)$/staging$/"OpenOffice.org Languagepack.app"$/Contents$/"OpenOffice.org Languagepack"
++	$(COPY) $(PRJ)$/res$/osx_langpackinstall.applescript $(BUILDROOT_LANGPACK)$/staging$/"OpenOffice.org Languagepack.app"$/Contents$/
++	tar -cjf $(BUILDROOT_LANGPACK)$/staging$/"OpenOffice.org Languagepack.app"$/Contents$/tarball.tar.bz2 -C $(BUILDROOT_LANGPACK)$/staging$/"$(MAC_APPDIR)" Contents
++	$(RM) -r $(BUILDROOT_LANGPACK)$/staging$/"$(MAC_APPDIR)"
++	cd $(BUILDROOT_LANGPACK) && hdiutil makehybrid -hfs -hfs-openfolder staging staging \
++    -hfs-volume-name "OpenOffice.org Languagepack" -ov -o tmp && hdiutil convert -ov -format UDZO tmp.dmg \
++    -o $(subst,$(@:s/_/ /:1),OpenOffice.org-langpack-$(OOO_PKG_VERSION) $(@:b)) && $(RM) tmp.dmg
++	$(RM) -r $(BUILDROOT_LANGPACK)$/staging
++.ENDIF # "$(OS)"!="MACOSX"
+ 
+ .IF "$(PKGFORMAT)"!=""
+ $(foreach,i,$(alllangiso) ooodevlanguagepack_$i) : $$ {$(PKGFORMAT:^".")}



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]