summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRelease Engineers <releng@openoffice.org>2009-08-26 06:41:14 +0000
committerRelease Engineers <releng@openoffice.org>2009-08-26 06:41:14 +0000
commit491476018b252440a477cff272a52993d9a5c4cf (patch)
treebb247d8026aebaa2300152113fed5b47a821f6ed
parentf09524dfff4e7cbdc2422ea3290b3de7a0e0811c (diff)
CWS-TOOLING: integrate CWS native262
2009-08-18 16:35:06 +0200 is r275118 : #i102939# differ between ok-label and install-label 2009-08-13 17:24:47 +0200 is r274960 : #i102939# mac languagepacks 2009-08-13 17:22:22 +0200 is r274959 : #i102939# mac languagepacks 2009-08-13 17:15:01 +0200 is r274958 : #i102939# mac languagepacks 2009-08-13 17:13:36 +0200 is r274957 : #i102939# mac languagepacks 2009-08-13 17:12:57 +0200 is r274956 : #i102939# mac languagepacks 2009-08-13 17:12:20 +0200 is r274955 : #i102939# mac languagepacks 2009-08-13 17:11:41 +0200 is r274954 : #i102939# mac languagepacks 2009-08-13 17:10:52 +0200 is r274953 : #i102939# mac languagepacks
-rw-r--r--instsetoo_native/res/DS_Store_Langpackbin0 -> 12292 bytes
-rw-r--r--instsetoo_native/util/makefile.mk6
-rwxr-xr-xinstsetoo_native/util/pack.lst4
-rwxr-xr-xscp2/source/ooo/directory_ooo_macosx.scp2
-rw-r--r--scp2/source/ooo/scpaction_ooo.scp4
-rw-r--r--solenv/bin/make_installer.pl14
-rw-r--r--solenv/bin/modules/installer/globals.pm2
-rw-r--r--solenv/bin/modules/installer/parameter.pm11
-rw-r--r--solenv/bin/modules/installer/scriptitems.pm60
-rw-r--r--solenv/bin/modules/installer/simplepackage.pm299
10 files changed, 388 insertions, 14 deletions
diff --git a/instsetoo_native/res/DS_Store_Langpack b/instsetoo_native/res/DS_Store_Langpack
new file mode 100644
index 000000000000..1b53eba75b74
--- /dev/null
+++ b/instsetoo_native/res/DS_Store_Langpack
Binary files differ
diff --git a/instsetoo_native/util/makefile.mk b/instsetoo_native/util/makefile.mk
index 99ca8b140d51..fa9e97e5516e 100644
--- a/instsetoo_native/util/makefile.mk
+++ b/instsetoo_native/util/makefile.mk
@@ -217,8 +217,8 @@ $(MAKETARGETS) : $(ADDDEPS)
.ENDIF # "$(BUILD_SPECIAL)"!=""
.IF "$(OS)" == "MACOSX"
-DMGDEPS=$(BIN)$/{osxdndinstall.png DS_Store}
-$(foreach,i,$(alllangiso) {openoffice openofficedev openofficewithjre broffice brofficedev brofficewithjre}_$i) : $(DMGDEPS)
+DMGDEPS=$(BIN)$/{osxdndinstall.png DS_Store DS_Store_Langpack}
+$(foreach,i,$(alllangiso) {openoffice openofficedev openofficewithjre ooolanguagepack broffice brofficedev brofficewithjre}_$i) : $(DMGDEPS)
.ENDIF # "$(OS)" == "MACOSX"
.IF "$(PKGFORMAT)"!=""
@@ -384,7 +384,7 @@ $(BIN)$/broffice$/intro.zip : $(SOLARCOMMONPCKDIR)$/broffice_nologo$/intro.zip
@-$(MKDIR) $(@:d)
$(COPY) $< $@
-$(BIN)$/{osxdndinstall.png DS_Store} : $(PRJ)$/res$/$$(@:f)
+$(BIN)$/{osxdndinstall.png DS_Store DS_Store_Langpack} : $(PRJ)$/res$/$$(@:f)
@$(COPY) $< $@
hack_msitemplates .PHONY:
diff --git a/instsetoo_native/util/pack.lst b/instsetoo_native/util/pack.lst
index 4b7f1954f084..200bf3708f5a 100755
--- a/instsetoo_native/util/pack.lst
+++ b/instsetoo_native/util/pack.lst
@@ -17,8 +17,8 @@ OpenOffice_Dev unxlngi6.pro,unxsoli4.pro,unxsols4.pro,wntmsci12.pro,unxmacxi.pr
#OpenOffice_SDK unxlngi6.pro,unxmacxi.pro,unxsoli4.pro,unxsols4.pro,wntmsci12.pro,unxlngx6.pro,unxlngi6,unxmacxi,unxsoli4,unxsols4,wntmsci12 en-US sdkoo
OpenOffice_Dev_SDK unxlngi6.pro,unxmacxi.pro,unxsoli4.pro,unxsols4.pro,wntmsci12.pro,unxlngx6.pro,unxlngi6,unxmacxi,unxsoli4,unxsols4,wntmsci12 en-US sdkoodev
#URE unxlngi6.pro,unxsoli4.pro,unxsols4.pro,wntmsci12.pro,unxlngi6,unxsoli4,unxsols4,wntmsci12 en-US ure
-OpenOfficeLanguagepack unxlngi6.pro,unxsoli4.pro,unxsols4.pro,wntmsci12.pro,unxlngx6.pro de ooolanguagepack
-OpenOfficeLanguagepack unxlngi6,unxsoli4,unxsols4,wntmsci12 de ooolanguagepack
+OpenOfficeLanguagepack unxlngi6.pro,unxsoli4.pro,unxsols4.pro,wntmsci12.pro,unxlngx6.pro,unxmacxi.pro de ooolanguagepack
+OpenOfficeLanguagepack unxlngi6,unxsoli4,unxsols4,wntmsci12,unxmacxi de ooolanguagepack
OpenOfficeDevLanguagepack unxlngi6.pro,unxsoli4.pro,unxsols4.pro,wntmsci12.pro,unxlngx6.pro de|fr|ja|ar ooodevlanguagepack
#BrOfficeLanguagepack unxlngi6.pro,unxsoli4.pro,unxsols4.pro,wntmsci12.pro,unxlngx6.pro pt-BR broolanguagepack
diff --git a/scp2/source/ooo/directory_ooo_macosx.scp b/scp2/source/ooo/directory_ooo_macosx.scp
index 409afc0797f2..6bff77e6f355 100755
--- a/scp2/source/ooo/directory_ooo_macosx.scp
+++ b/scp2/source/ooo/directory_ooo_macosx.scp
@@ -34,6 +34,8 @@
Directory gid_Dir_Bundle
ParentID = PD_PROGDIR;
HostName = "%PRODUCTNAME.app";
+ LangPackHostName = "%PRODUCTNAME %PRODUCTVERSION Language Pack.app";
+ PatchHostName = "%PRODUCTNAME %PRODUCTVERSION Patch.app";
End
#endif
diff --git a/scp2/source/ooo/scpaction_ooo.scp b/scp2/source/ooo/scpaction_ooo.scp
index 76ea41ed06bb..f88737451a5f 100644
--- a/scp2/source/ooo/scpaction_ooo.scp
+++ b/scp2/source/ooo/scpaction_ooo.scp
@@ -370,8 +370,10 @@ End
ScpAction scp_Copy_Ds_Store
Copy = "DS_Store";
+ LangPackCopy = "DS_Store_Langpack";
+ PatchCopy = "DS_Store_Patch";
Name = ".DS_Store";
UnixRights = 444;
- Styles = ();
+ Styles = (FORCELANGUAGEPACK);
End
#endif
diff --git a/solenv/bin/make_installer.pl b/solenv/bin/make_installer.pl
index 13052fa1a116..6458fbfdc5cb 100644
--- a/solenv/bin/make_installer.pl
+++ b/solenv/bin/make_installer.pl
@@ -408,8 +408,12 @@ installer::logger::print_message( "... analyzing directories ... \n" );
my $dirsinproductarrayref = installer::setupscript::get_all_items_from_script($setupscriptref, "Directory");
if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "productdirectories1.log", $dirsinproductarrayref); }
-if ( $allvariableshashref->{'SHIFT_BASIS_INTO_BRAND_LAYER'} ) { $dirsinproductarrayref = installer::scriptitems::shift_basis_directory_parents($dirsinproductarrayref); }
+if ( $installer::globals::languagepack ) { installer::scriptitems::use_langpack_hostname($dirsinproductarrayref); }
+if ( $installer::globals::patch ) { installer::scriptitems::use_patch_hostname($dirsinproductarrayref); }
if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "productdirectories1a.log", $dirsinproductarrayref); }
+
+if ( $allvariableshashref->{'SHIFT_BASIS_INTO_BRAND_LAYER'} ) { $dirsinproductarrayref = installer::scriptitems::shift_basis_directory_parents($dirsinproductarrayref); }
+if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "productdirectories1b.log", $dirsinproductarrayref); }
if ( $allvariableshashref->{'OFFICEDIRECTORYNAME'} ) { installer::scriptitems::set_officedirectory_name($dirsinproductarrayref, $allvariableshashref->{'OFFICEDIRECTORYNAME'}); }
if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "productdirectories1b.log", $dirsinproductarrayref); }
@@ -472,6 +476,10 @@ if (( ! $allvariableshashref->{'XPDINSTALLER'} ) || ( ! $installer::globals::isx
if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "productscpactions1a.log", $scpactionsinproductarrayref); }
}
+if ( $installer::globals::languagepack ) { installer::scriptitems::use_langpack_copy_scpaction($scpactionsinproductarrayref); }
+if ( $installer::globals::patch ) { installer::scriptitems::use_patch_copy_scpaction($scpactionsinproductarrayref); }
+if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "productscpactions1b.log", $scpactionsinproductarrayref); }
+
# $scpactionsinproductarrayref = installer::scriptitems::remove_scpactions_without_name($scpactionsinproductarrayref);
# if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "productscpactions2.log", $scpactionsinproductarrayref); }
@@ -1008,7 +1016,7 @@ for ( my $n = 0; $n <= $#installer::globals::languageproducts; $n++ )
my $profilesinproductlanguageresolvedarrayref;
my $profileitemsinproductlanguageresolvedarrayref;
- if ((!($installer::globals::is_copy_only_project)) && (!($installer::globals::product =~ /ada/i )))
+ if ((!($installer::globals::is_copy_only_project)) && (!($installer::globals::product =~ /ada/i )) && (!($installer::globals::languagepack)))
{
installer::logger::print_message( "... creating profiles ...\n" );
@@ -1363,7 +1371,7 @@ for ( my $n = 0; $n <= $#installer::globals::languageproducts; $n++ )
# try it again later.
####################################################
- if (( $installer::globals::patch ) || ( $installer::globals::languagepack ) || ( $installer::globals::packageformat eq "native" )) { $allvariableshashref->{'POOLPRODUCT'} = 0; }
+ if (( $installer::globals::patch ) || ( $installer::globals::languagepack ) || ( $installer::globals::packageformat eq "native" ) || ( $installer::globals::packageformat eq "osx" )) { $allvariableshashref->{'POOLPRODUCT'} = 0; }
if ( $allvariableshashref->{'POOLPRODUCT'} )
{
diff --git a/solenv/bin/modules/installer/globals.pm b/solenv/bin/modules/installer/globals.pm
index d9799069e539..8b5f13c7ae5b 100644
--- a/solenv/bin/modules/installer/globals.pm
+++ b/solenv/bin/modules/installer/globals.pm
@@ -134,6 +134,7 @@ BEGIN
$issolarissparcbuild = 0;
$issolarisx86build = 0;
$isfreebsdpkgbuild = 0;
+ $ismacdmgbuild = 0;
$unpackpath = "";
$idttemplatepath = "";
$idtlanguagepath = "";
@@ -448,6 +449,7 @@ BEGIN
@featurecollector =();
$msiassemblyfiles = "";
$nsisfilename = "Nsis";
+ $macinstallfilename = "macinstall.ulf";
$nsis204 = 0;
$nsis231 = 0;
$unicodensis = 0;
diff --git a/solenv/bin/modules/installer/parameter.pm b/solenv/bin/modules/installer/parameter.pm
index bc797d257d14..e4fb19f0c537 100644
--- a/solenv/bin/modules/installer/parameter.pm
+++ b/solenv/bin/modules/installer/parameter.pm
@@ -293,6 +293,15 @@ sub setglobalvariables
$installer::globals::isxpdplatform = 1;
}
}
+
+ if ( $installer::globals::compiler =~ /unxmacxi/ )
+ {
+ if ( $installer::globals::packageformat eq "dmg" )
+ {
+ $installer::globals::ismacdmgbuild = 1;
+ }
+ }
+
if ( $installer::globals::compiler =~ /unxfbsd/ )
{
if ( $installer::globals::packageformat eq "bsd" )
@@ -537,7 +546,7 @@ sub control_required_parameter
# for Solaris packages and Linux
#######################################
- if (( $installer::globals::patch ) && ( ! $installer::globals::issolarispkgbuild ) && ( ! $installer::globals::islinuxrpmbuild ) && ( ! $installer::globals::islinuxdebbuild ) && ( ! $installer::globals::iswindowsbuild ))
+ if (( $installer::globals::patch ) && ( ! $installer::globals::issolarispkgbuild ) && ( ! $installer::globals::islinuxrpmbuild ) && ( ! $installer::globals::islinuxdebbuild ) && ( ! $installer::globals::iswindowsbuild ) && ( ! $installer::globals::ismacdmgbuild ))
{
installer::logger::print_error( "Sorry, Patch flag currently only available for Solaris pkg, Linux RPM and Windows builds!" );
usage();
diff --git a/solenv/bin/modules/installer/scriptitems.pm b/solenv/bin/modules/installer/scriptitems.pm
index 0ef8283705b6..204c009141c6 100644
--- a/solenv/bin/modules/installer/scriptitems.pm
+++ b/solenv/bin/modules/installer/scriptitems.pm
@@ -591,6 +591,66 @@ sub get_children
}
################################################################################
+# Using different HostName for language packs
+################################################################################
+
+sub use_langpack_hostname
+{
+ my ($dirsref) = @_;
+
+ for ( my $i = 0; $i <= $#{$dirsref}; $i++ )
+ {
+ my $onedir = ${$dirsref}[$i];
+ if (( $onedir->{'LangPackHostName'} ) && ( $onedir->{'LangPackHostName'} ne "" )) { $onedir->{'HostName'} = $onedir->{'LangPackHostName'}; }
+ }
+}
+
+################################################################################
+# Using different HostName for language packs
+################################################################################
+
+sub use_patch_hostname
+{
+ my ($dirsref) = @_;
+
+ for ( my $i = 0; $i <= $#{$dirsref}; $i++ )
+ {
+ my $onedir = ${$dirsref}[$i];
+ if (( $onedir->{'PatchHostName'} ) && ( $onedir->{'PatchHostName'} ne "" )) { $onedir->{'HostName'} = $onedir->{'PatchHostName'}; }
+ }
+}
+
+################################################################################
+# Using different HostName for language packs
+################################################################################
+
+sub use_langpack_copy_scpaction
+{
+ my ($scpactionsref) = @_;
+
+ for ( my $i = 0; $i <= $#{$scpactionsref}; $i++ )
+ {
+ my $onescpaction = ${$scpactionsref}[$i];
+ if (( $onescpaction->{'LangPackCopy'} ) && ( $onescpaction->{'LangPackCopy'} ne "" )) { $onescpaction->{'Copy'} = $onescpaction->{'LangPackCopy'}; }
+ }
+}
+
+################################################################################
+# Using different HostName for language packs
+################################################################################
+
+sub use_patch_copy_scpaction
+{
+ my ($scpactionsref) = @_;
+
+ for ( my $i = 0; $i <= $#{$scpactionsref}; $i++ )
+ {
+ my $onescpaction = ${$scpactionsref}[$i];
+ if (( $onescpaction->{'PatchCopy'} ) && ( $onescpaction->{'PatchCopy'} ne "" )) { $onescpaction->{'Copy'} = $onescpaction->{'PatchCopy'}; }
+ }
+}
+
+################################################################################
# Shifting parent directories of URE and Basis layer, so that
# these directories are located below the Brand layer.
# Style: SHIFT_BASIS_INTO_BRAND_LAYER
diff --git a/solenv/bin/modules/installer/simplepackage.pm b/solenv/bin/modules/installer/simplepackage.pm
index 771e0980c2f5..a543c32c048a 100644
--- a/solenv/bin/modules/installer/simplepackage.pm
+++ b/solenv/bin/modules/installer/simplepackage.pm
@@ -181,6 +181,180 @@ sub register_extensions
chdir($from);
}
+########################################################################
+# Getting the translation file for the Mac Language Pack installer
+########################################################################
+
+sub get_mac_translation_file
+{
+ my $translationfilename = $installer::globals::maclangpackfilename;
+ # my $translationfilename = $installer::globals::idtlanguagepath . $installer::globals::separator . $installer::globals::maclangpackfilename;
+ # if ( $installer::globals::unicodensis ) { $translationfilename = $translationfilename . ".uulf"; }
+ # else { $translationfilename = $translationfilename . ".mlf"; }
+ if ( ! -f $translationfilename ) { installer::exiter::exit_program("ERROR: Could not find language file $translationfilename!", "get_mac_translation_file"); }
+ my $translationfile = installer::files::read_file($translationfilename);
+
+ my $infoline = "Reading translation file: $translationfilename\n";
+ push( @installer::globals::logfileinfo, $infoline);
+
+ return $translationfile;
+}
+
+##################################################################
+# Collecting all identifier from ulf file
+##################################################################
+
+sub get_identifier
+{
+ my ( $translationfile ) = @_;
+
+ my @identifier = ();
+
+ for ( my $i = 0; $i <= $#{$translationfile}; $i++ )
+ {
+ my $oneline = ${$translationfile}[$i];
+
+ if ( $oneline =~ /^\s*\[(.+)\]\s*$/ )
+ {
+ my $identifier = $1;
+ push(@identifier, $identifier);
+ }
+ }
+
+ return \@identifier;
+}
+
+##############################################################
+# Returning the complete block in all languages
+# for a specified string
+##############################################################
+
+sub get_language_block_from_language_file
+{
+ my ($searchstring, $languagefile) = @_;
+
+ my @language_block = ();
+
+ for ( my $i = 0; $i <= $#{$languagefile}; $i++ )
+ {
+ if ( ${$languagefile}[$i] =~ /^\s*\[\s*$searchstring\s*\]\s*$/ )
+ {
+ my $counter = $i;
+
+ push(@language_block, ${$languagefile}[$counter]);
+ $counter++;
+
+ while (( $counter <= $#{$languagefile} ) && (!( ${$languagefile}[$counter] =~ /^\s*\[/ )))
+ {
+ push(@language_block, ${$languagefile}[$counter]);
+ $counter++;
+ }
+
+ last;
+ }
+ }
+
+ return \@language_block;
+}
+
+##############################################################
+# Returning a specific language string from the block
+# of all translations
+##############################################################
+
+sub get_language_string_from_language_block
+{
+ my ($language_block, $language) = @_;
+
+ my $newstring = "";
+
+ for ( my $i = 0; $i <= $#{$language_block}; $i++ )
+ {
+ if ( ${$language_block}[$i] =~ /^\s*$language\s*\=\s*\"(.*)\"\s*$/ )
+ {
+ $newstring = $1;
+ last;
+ }
+ }
+
+ if ( $newstring eq "" )
+ {
+ $language = "en-US"; # defaulting to english
+
+ for ( my $i = 0; $i <= $#{$language_block}; $i++ )
+ {
+ if ( ${$language_block}[$i] =~ /^\s*$language\s*\=\s*\"(.*)\"\s*$/ )
+ {
+ $newstring = $1;
+ last;
+ }
+ }
+ }
+
+ return $newstring;
+}
+
+########################################################################
+# Localizing the script for the Mac Language Pack installer
+########################################################################
+
+sub localize_scriptfile
+{
+ my ($scriptfile, $translationfile, $languagestringref) = @_;
+
+ # my $translationfile = get_mac_translation_file();
+
+ my $onelanguage = $$languagestringref;
+ if ( $onelanguage =~ /^\s*(.*?)_/ ) { $onelanguage = $1; }
+
+ # Analyzing the ulf file, collecting all Identifier
+ my $allidentifier = get_identifier($translationfile);
+
+ for ( my $i = 0; $i <= $#{$allidentifier}; $i++ )
+ {
+ my $identifier = ${$allidentifier}[$i];
+ my $language_block = get_language_block_from_language_file($identifier, $translationfile);
+ my $newstring = get_language_string_from_language_block($language_block, $onelanguage);
+
+ # removing mask
+ $newstring =~ s/\\\'/\'/g;
+
+ replace_one_variable_in_shellscript($scriptfile, $newstring, $identifier);
+ }
+}
+
+#################################################################################
+# Replacing one variable in Mac shell script
+#################################################################################
+
+sub replace_one_variable_in_shellscript
+{
+ my ($scriptfile, $variable, $searchstring) = @_;
+
+ for ( my $i = 0; $i <= $#{$scriptfile}; $i++ )
+ {
+ ${$scriptfile}[$i] =~ s/\[$searchstring\]/$variable/g;
+ }
+}
+
+#############################################
+# Replacing variables in Mac shell script
+#############################################
+
+sub replace_variables_in_scriptfile
+{
+ my ($scriptfile, $volume_name, $allvariables) = @_;
+
+ replace_one_variable_in_shellscript($scriptfile, $volume_name, "FULLPRODUCTNAME" );
+ replace_one_variable_in_shellscript($scriptfile, $allvariables->{'PRODUCTNAME'}, "PRODUCTNAME" );
+ replace_one_variable_in_shellscript($scriptfile, $allvariables->{'PRODUCTVERSION'}, "PRODUCTVERSION" );
+
+ my $scriptname = lc($allvariables->{'PRODUCTNAME'}) . "\.script";
+ if ( $allvariables->{'PRODUCTNAME'} eq "OpenOffice.org" ) { $scriptname = "org.openoffice.script"; }
+
+ replace_one_variable_in_shellscript($scriptfile, $scriptname, "SEARCHSCRIPTNAME" );
+}
+
#############################################
# Creating the "simple" package.
# "zip" for Windows
@@ -190,7 +364,7 @@ sub register_extensions
sub create_package
{
- my ( $installdir, $packagename, $allvariables, $includepatharrayref ) = @_;
+ my ( $installdir, $packagename, $allvariables, $includepatharrayref, $languagestringref ) = @_;
# moving dir into temporary directory
my $pid = $$; # process id
@@ -237,8 +411,116 @@ sub create_package
my $sla = 'sla.r';
my $ref = installer::scriptitems::get_sourcepath_from_filename_and_includepath( \$sla, $includepatharrayref, 0);
- $systemcall = "cd $tempdir && hdiutil makehybrid -hfs -hfs-openfolder $folder $folder -hfs-volume-name \"$volume_name\" -ov -o $installdir/tmp && hdiutil convert -ov -format UDZO $installdir/tmp.dmg -o $archive && ";
- if ($$ref ne "") {
+ my $localtempdir = $tempdir;
+
+ if (( $installer::globals::languagepack ) || ( $installer::globals::patch ))
+ {
+ $localtempdir = "$tempdir/$packagename";
+ if ( $installer::globals::languagepack ) { $volume_name = "$volume_name Language Pack"; }
+ if ( $installer::globals::patch ) { $volume_name = "$volume_name Patch"; }
+
+ # Create tar ball named tarball.tar.bz2
+ my $appfolder = $localtempdir . "/" . $volume_name . "\.app";
+ my $contentsfolder = $appfolder . "/Contents";
+ my $tarballname = "tarball.tar.bz2";
+
+ my $localfrom = cwd();
+ chdir $appfolder;
+
+ $systemcall = "tar -cjf $tarballname Contents/";
+
+ print "... $systemcall ...\n";
+ my $localreturnvalue = system($systemcall);
+ $infoline = "Systemcall: $systemcall\n";
+ push( @installer::globals::logfileinfo, $infoline);
+
+ if ($localreturnvalue)
+ {
+ $infoline = "ERROR: Could not execute \"$systemcall\"!\n";
+ push( @installer::globals::logfileinfo, $infoline);
+ }
+ else
+ {
+ $infoline = "Success: Executed \"$systemcall\" successfully!\n";
+ push( @installer::globals::logfileinfo, $infoline);
+ }
+
+ my $sourcefile = $appfolder . "/" . $tarballname;
+ my $destfile = $contentsfolder . "/" . $tarballname;
+
+ installer::systemactions::remove_complete_directory($contentsfolder);
+ installer::systemactions::create_directory($contentsfolder);
+
+ installer::systemactions::copy_one_file($sourcefile, $destfile);
+ unlink($sourcefile);
+
+ # Copy two files into installation set next to the tar ball
+ # 1. "osx_install.applescript"
+ # 2 "OpenOffice.org Languagepack"
+
+ my $scriptrealfilename = "osx_install.applescript";
+ my $scriptfilename = "";
+ if ( $installer::globals::languagepack ) { $scriptfilename = "osx_install_languagepack.applescript"; }
+ if ( $installer::globals::patch ) { $scriptfilename = "osx_install_patch.applescript"; }
+ my $scripthelpersolverfilename = "mac_install.script";
+ my $scripthelperrealfilename = $volume_name;
+ my $translationfilename = $installer::globals::macinstallfilename;
+
+ # Finding both files in solver
+
+ my $scriptref = installer::scriptitems::get_sourcepath_from_filename_and_includepath( \$scriptfilename, $includepatharrayref, 0);
+ if ($$scriptref eq "") { installer::exiter::exit_program("ERROR: Could not find Apple script $scriptfilename!", "create_package"); }
+ my $scripthelperref = installer::scriptitems::get_sourcepath_from_filename_and_includepath( \$scripthelpersolverfilename, $includepatharrayref, 0);
+ if ($$scripthelperref eq "") { installer::exiter::exit_program("ERROR: Could not find Apple script $scripthelpersolverfilename!", "create_package"); }
+ my $translationfileref = installer::scriptitems::get_sourcepath_from_filename_and_includepath( \$translationfilename, $includepatharrayref, 0);
+ if ($$translationfileref eq "") { installer::exiter::exit_program("ERROR: Could not find Apple script translation file $translationfilename!", "create_package"); }
+
+ $scriptfilename = $contentsfolder . "/" . $scriptrealfilename;
+ $scripthelperrealfilename = $contentsfolder . "/" . $scripthelperrealfilename;
+
+ installer::systemactions::copy_one_file($$scriptref, $scriptfilename);
+ installer::systemactions::copy_one_file($$scripthelperref, $scripthelperrealfilename);
+
+ # Replacing variables in script $scriptfilename
+ # Localizing script $scriptfilename
+ my $scriptfilecontent = installer::files::read_file($scriptfilename);
+ my $translationfilecontent = installer::files::read_file($$translationfileref);
+ localize_scriptfile($scriptfilecontent, $translationfilecontent, $languagestringref);
+ replace_variables_in_scriptfile($scriptfilecontent, $volume_name, $allvariables);
+ installer::files::save_file($scriptfilename, $scriptfilecontent);
+
+ $systemcall = "chmod 775 " . "\"" . $scriptfilename . "\"";
+ system($systemcall);
+ $systemcall = "chmod 775 " . "\"" . $scripthelperrealfilename . "\"";
+ system($systemcall);
+
+ # Copy also Info.plist and icon file
+ # Finding both files in solver
+ my $iconfile = "ooo3_installer.icns";
+ my $iconfileref = installer::scriptitems::get_sourcepath_from_filename_and_includepath( \$iconfile, $includepatharrayref, 0);
+ if ($$iconfileref eq "") { installer::exiter::exit_program("ERROR: Could not find Apple script icon file $iconfile!", "create_package"); }
+ my $subdir = $contentsfolder . "/" . "Resources";
+ if ( ! -d $subdir ) { installer::systemactions::create_directory($subdir); }
+ $destfile = $subdir . "/" . $iconfile;
+ installer::systemactions::copy_one_file($$iconfileref, $destfile);
+
+ my $infoplistfile = "Info.plist.langpack";
+ my $installname = "Info.plist";
+ my $infoplistfileref = installer::scriptitems::get_sourcepath_from_filename_and_includepath( \$infoplistfile, $includepatharrayref, 0);
+ if ($$infoplistfileref eq "") { installer::exiter::exit_program("ERROR: Could not find Apple script Info.plist: $infoplistfile!", "create_package"); }
+ $destfile = $contentsfolder . "/" . $installname;
+ installer::systemactions::copy_one_file($$infoplistfileref, $destfile);
+
+ # Replacing variables in Info.plist
+ $scriptfilecontent = installer::files::read_file($destfile);
+ replace_one_variable_in_shellscript($scriptfilecontent, $volume_name, "FULLPRODUCTNAME" );
+ installer::files::save_file($destfile, $scriptfilecontent);
+
+ chdir $localfrom;
+ }
+
+ $systemcall = "cd $localtempdir && hdiutil makehybrid -hfs -hfs-openfolder $folder $folder -hfs-volume-name \"$volume_name\" -ov -o $installdir/tmp && hdiutil convert -ov -format UDZO $installdir/tmp.dmg -o $archive && ";
+ if ($$ref ne "") {
$systemcall .= "hdiutil unflatten $archive && Rez -a $$ref -o $archive && hdiutil flatten $archive &&";
}
$systemcall .= "rm -f $installdir/tmp.dmg";
@@ -322,6 +604,8 @@ sub create_simple_package
else
{
$downloadname = installer::ziplist::getinfofromziplist($allsettingsarrayref, "downloadname");
+ if ( $installer::globals::languagepack ) { $downloadname = installer::ziplist::getinfofromziplist($allsettingsarrayref, "langpackdownloadname"); }
+ if ( $installer::globals::patch ) { $downloadname = installer::ziplist::getinfofromziplist($allsettingsarrayref, "patchdownloadname"); }
$packagename = installer::download::resolve_variables_in_downloadname($allvariables, $$downloadname, \$locallanguage);
}
}
@@ -374,6 +658,7 @@ sub create_simple_package
my $onefile = ${$filesref}[$i];
if (( $onefile->{'Styles'} ) && ( $onefile->{'Styles'} =~ /\bBINARYTABLE_ONLY\b/ )) { next; }
+ if (( $installer::globals::patch ) && ( $onefile->{'Styles'} ) && ( ! ( $onefile->{'Styles'} =~ /\bPATCH\b/ ))) { next; }
my $source = $onefile->{'sourcepath'};
my $destination = $onefile->{'destination'};
@@ -428,6 +713,9 @@ sub create_simple_package
for ( my $i = 0; $i <= $#{$linksref}; $i++ )
{
my $onelink = ${$linksref}[$i];
+
+ if (( $installer::globals::patch ) && ( $onelink->{'Styles'} ) && ( ! ( $onelink->{'Styles'} =~ /\bPATCH\b/ ))) { next; }
+
my $destination = $onelink->{'destination'};
$destination = $subfolderdir . $installer::globals::separator . $destination;
my $destinationfile = $onelink->{'destinationfile'};
@@ -442,6 +730,9 @@ sub create_simple_package
for ( my $i = 0; $i <= $#{$unixlinksref}; $i++ )
{
my $onelink = ${$unixlinksref}[$i];
+
+ if (( $installer::globals::patch ) && ( $onelink->{'Styles'} ) && ( ! ( $onelink->{'Styles'} =~ /\bPATCH\b/ ))) { next; }
+
my $target = $onelink->{'Target'};
my $destination = $subfolderdir . $installer::globals::separator . $onelink->{'destination'};
@@ -485,7 +776,7 @@ sub create_simple_package
# -> tar.gz for all other platforms
installer::logger::print_message( "... creating $installer::globals::packageformat file ...\n" );
installer::logger::include_header_into_logfile("Creating $installer::globals::packageformat file:");
- create_package($installdir, $packagename, $allvariables, $includepatharrayref);
+ create_package($installdir, $packagename, $allvariables, $includepatharrayref, $languagestringref);
}
# Analyzing the log file