2 # This file is part of the LibreOffice project.
4 # This Source Code Form is subject to the terms of the Mozilla Public
5 # License, v. 2.0. If a copy of the MPL was not distributed with this
6 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 # This file incorporates work covered by the following license notice:
10 # Licensed to the Apache Software Foundation (ASF) under one or more
11 # contributor license agreements. See the NOTICE file distributed
12 # with this work for additional information regarding copyright
13 # ownership. The ASF licenses this file to you under the Apache
14 # License, Version 2.0 (the "License"); you may not use this file
15 # except in compliance with the License. You may obtain a copy of
16 # the License at http://www.apache.org/licenses/LICENSE-2.0 .
19 package installer
::simplepackage
;
23 use installer
::download
;
24 use installer
::exiter
;
25 use installer
::globals
;
26 use installer
::logger
;
27 use installer
::strip
qw(strip_libraries);
28 use installer
::systemactions
;
29 use installer
::worker
;
31 ####################################################
32 # Checking if the simple packager is required.
33 # This can be achieved by setting the global
34 # variable SIMPLE_PACKAGE in *.lst file or by
35 # setting the environment variable SIMPLE_PACKAGE.
36 ####################################################
38 sub check_simple_packager_project
40 my ( $allvariables ) = @_;
42 if (( $installer::globals
::packageformat
eq "installed" ) ||
43 ( $installer::globals
::packageformat
eq "archive" ))
45 $installer::globals
::is_simple_packager_project
= 1;
46 $installer::globals
::patch_user_dir
= 1;
48 elsif( $installer::globals
::packageformat
eq "dmg" )
50 $installer::globals
::is_simple_packager_project
= 1;
54 ####################################################
55 # Detecting the directory with extensions
56 ####################################################
58 sub get_extensions_dir
60 my ( $subfolderdir ) = @_;
62 my $extensiondir = $subfolderdir . $installer::globals
::separator
;
63 if ( $installer::globals
::officedirhostname
ne "" ) { $extensiondir = $extensiondir . $installer::globals
::officedirhostname
. $installer::globals
::separator
; }
64 my $extensionsdir = $extensiondir . "share" . $installer::globals
::separator
. "extensions";
66 return $extensionsdir;
69 ##################################################################
70 # Collecting all identifier from ulf file
71 ##################################################################
75 my ( $translationfile ) = @_;
79 for ( my $i = 0; $i <= $#{$translationfile}; $i++ )
81 my $oneline = ${$translationfile}[$i];
83 if ( $oneline =~ /^\s*\[(.+)\]\s*$/ )
86 push(@identifier, $identifier);
93 ##############################################################
94 # Returning the complete block in all languages
95 # for a specified string
96 ##############################################################
98 sub get_language_block_from_language_file
100 my ($searchstring, $languagefile) = @_;
102 my @language_block = ();
104 for ( my $i = 0; $i <= $#{$languagefile}; $i++ )
106 if ( ${$languagefile}[$i] =~ /^\s*\[\s*$searchstring\s*\]\s*$/ )
110 push(@language_block, ${$languagefile}[$counter]);
113 while (( $counter <= $#{$languagefile} ) && (!( ${$languagefile}[$counter] =~ /^\s*\[/ )))
115 push(@language_block, ${$languagefile}[$counter]);
123 return \
@language_block;
126 ##############################################################
127 # Returning a specific language string from the block
128 # of all translations
129 ##############################################################
131 sub get_language_string_from_language_block
133 my ($language_block, $language) = @_;
137 for ( my $i = 0; $i <= $#{$language_block}; $i++ )
139 if ( ${$language_block}[$i] =~ /^\s*$language\s*\=\s*\"(.*)\"\s*$/ )
146 if ( $newstring eq "" )
148 $language = "en-US"; # defaulting to english
150 for ( my $i = 0; $i <= $#{$language_block}; $i++ )
152 if ( ${$language_block}[$i] =~ /^\s*$language\s*\=\s*\"(.*)\"\s*$/ )
163 ########################################################################
164 # Localizing the script for the Mac Language Pack installer
165 ########################################################################
167 sub localize_scriptfile
169 my ($scriptfile, $translationfile, $languagestringref) = @_;
171 my $onelanguage = $$languagestringref;
172 if ( $onelanguage =~ /^\s*(.*?)_/ ) { $onelanguage = $1; }
174 # Analyzing the ulf file, collecting all Identifier
175 my $allidentifier = get_identifier
($translationfile);
177 for ( my $i = 0; $i <= $#{$allidentifier}; $i++ )
179 my $identifier = ${$allidentifier}[$i];
180 my $language_block = get_language_block_from_language_file
($identifier, $translationfile);
181 my $newstring = get_language_string_from_language_block
($language_block, $onelanguage);
184 $newstring =~ s/\\\'/\'/g;
186 replace_one_variable_in_shellscript
($scriptfile, $newstring, $identifier);
190 #################################################################################
191 # Replacing one variable in Mac shell script
192 #################################################################################
194 sub replace_one_variable_in_shellscript
196 my ($scriptfile, $variable, $searchstring) = @_;
198 for ( my $i = 0; $i <= $#{$scriptfile}; $i++ )
200 ${$scriptfile}[$i] =~ s/\[$searchstring\]/$variable/g;
204 #############################################
205 # Replacing variables in Mac shell script
206 #############################################
208 sub replace_variables_in_scriptfile
210 my ($scriptfile, $volume_name, $volume_name_app, $allvariables) = @_;
212 replace_one_variable_in_shellscript
($scriptfile, $volume_name, "FULLPRODUCTNAME" );
213 replace_one_variable_in_shellscript
($scriptfile, $volume_name_app, "FULLAPPPRODUCTNAME" );
214 replace_one_variable_in_shellscript
($scriptfile, $allvariables->{'PRODUCTNAME'}, "PRODUCTNAME" );
215 replace_one_variable_in_shellscript
($scriptfile, $allvariables->{'PRODUCTVERSION'}, "PRODUCTVERSION" );
217 my $scriptname = $allvariables->{'BUNDLEIDENTIFIER'};
219 replace_one_variable_in_shellscript
($scriptfile, $scriptname, "SEARCHSCRIPTNAME" );
222 #############################################
223 # Creating the "simple" package.
225 # "tar.gz" for all other platforms
226 # additionally "dmg" on Mac OS X
227 #############################################
231 my ( $installdir, $archivedir, $packagename, $allvariables, $includepatharrayref, $languagestringref, $format ) = @_;
233 installer
::logger
::print_message
( "... creating $installer::globals::packageformat file ...\n" );
234 installer
::logger
::include_header_into_logfile
("Creating $installer::globals::packageformat file:");
236 # moving dir into temporary directory
237 my $pid = $$; # process id
238 my $tempdir = $installdir . "_temp" . "." . $pid;
241 my $makesystemcall = 1;
242 my $return_to_start = 0;
243 installer
::systemactions
::rename_directory
($installdir, $tempdir);
245 # creating new directory with original name
246 installer
::systemactions
::create_directory
($archivedir);
248 my $archive = $archivedir . $installer::globals
::separator
. $packagename . $format;
250 if ( $archive =~ /zip$/ )
253 $return_to_start = 1;
255 $systemcall = "$installer::globals::zippath -qr $archive .";
257 # Using Archive::Zip fails because of very long path names below "share/uno_packages/cache"
258 # my $packzip = Archive::Zip->new();
259 # $packzip->addTree("."); # after changing into $tempdir
260 # $packzip->writeToFileNamed($archive);
261 # $makesystemcall = 0;
263 elsif ( $archive =~ /dmg$/ )
265 my $folder = (( -l
"$tempdir/$packagename/Applications" ) or ( -l
"$tempdir/$packagename/opt" )) ?
$packagename : "\.";
267 if ( $allvariables->{'PACK_INSTALLED'} ) {
268 $folder = $packagename;
271 my $volume_name = $allvariables->{'PRODUCTNAME'};
272 my $volume_name_classic = $allvariables->{'PRODUCTNAME'} . ' ' . $allvariables->{'PRODUCTVERSION'};
273 my $volume_name_classic_app = $volume_name; # "app" should not contain version number
274 if ( $allvariables->{'DMG_VOLUMEEXTENSION'} ) {
275 $volume_name = $volume_name . ' ' . $allvariables->{'DMG_VOLUMEEXTENSION'};
276 $volume_name_classic = $volume_name_classic . ' ' . $allvariables->{'DMG_VOLUMEEXTENSION'};
277 $volume_name_classic_app = $volume_name_classic_app . ' ' . $allvariables->{'DMG_VOLUMEEXTENSION'};
283 if ( ! $allvariables->{'HIDELICENSEDIALOG'} )
285 installer
::scriptitems
::get_sourcepath_from_filename_and_includepath
( \
$sla, $includepatharrayref, 0);
288 my $localtempdir = $tempdir;
290 if (( $installer::globals
::languagepack
) || ( $installer::globals
::helppack
))
292 # LanguagePack and HelpPack files are collected in $srcfolder, packaged into
293 # tarball.tar.bz2 and finally the Language Pack.app is assembled in $appfolder
294 $localtempdir = "$tempdir/$packagename";
295 my $srcfolder = $localtempdir . "/" . $volume_name_classic_app . "\.app";
297 $volume_name .= " Language Pack";
298 $volume_name_classic .= " Language Pack";
299 $volume_name_classic_app .= " Language Pack";
301 my $appfolder = $localtempdir . "/" . $volume_name_classic_app . "\.app";
302 my $contentsfolder = $appfolder . "/Contents";
303 my $tarballname = "tarball.tar.bz2";
305 my $localfrom = cwd
();
308 $systemcall = "tar -cjf $tarballname Contents/";
310 print "... $systemcall ...\n";
311 my $localreturnvalue = system($systemcall);
312 $infoline = "Systemcall: $systemcall\n";
313 push( @installer::globals
::logfileinfo
, $infoline);
315 if ($localreturnvalue)
317 $infoline = "ERROR: Could not execute \"$systemcall\"!\n";
318 push( @installer::globals
::logfileinfo
, $infoline);
322 $infoline = "Success: Executed \"$systemcall\" successfully!\n";
323 push( @installer::globals
::logfileinfo
, $infoline);
326 my $sourcefile = $srcfolder . "/" . $tarballname;
327 my $destfile = $contentsfolder . "/" . $tarballname;
329 installer
::systemactions
::remove_complete_directory
($appfolder);
330 installer
::systemactions
::create_directory
($appfolder);
331 installer
::systemactions
::create_directory
($contentsfolder);
333 installer
::systemactions
::copy_one_file
($sourcefile, $destfile);
334 installer
::systemactions
::remove_complete_directory
($srcfolder);
336 # Copy two files into installation set next to the tar ball
337 # 1. "osx_install.applescript"
338 # 2 "OpenOffice.org Languagepack"
340 my $scriptrealfilename = "osx_install.applescript";
341 my $scriptfilename = "";
342 if ( $installer::globals
::languagepack
) { $scriptfilename = "osx_install_languagepack.applescript"; }
343 if ( $installer::globals
::helppack
) { $scriptfilename = "osx_install_helppack.applescript"; }
344 my $scripthelperfilename = $ENV{'SRCDIR'} . "/setup_native/scripts/mac_install.script";
345 # my $scripthelperrealfilename = $volume_name;
346 my $scripthelperrealfilename = $volume_name_classic_app;
348 # Finding both files in source tree
350 my $scriptref = $ENV{'SRCDIR'} . "/setup_native/scripts/" . $scriptfilename;
351 if (! -f
$scriptref) { installer
::exiter
::exit_program
("ERROR: Could not find Apple script $scriptfilename ($scriptref)!", "create_package"); }
352 if (! -f
$scripthelperfilename) { installer
::exiter
::exit_program
("ERROR: Could not find Apple script $scripthelperfilename!", "create_package"); }
354 $scriptfilename = $contentsfolder . "/" . $scriptrealfilename;
355 $scripthelperrealfilename = $contentsfolder . "/" . $scripthelperrealfilename;
357 installer
::systemactions
::copy_one_file
($scriptref, $scriptfilename);
358 installer
::systemactions
::copy_one_file
($scripthelperfilename, $scripthelperrealfilename);
360 # Replacing variables in script $scriptfilename
361 # Localizing script $scriptfilename
362 my $scriptfilecontent = installer
::files
::read_file
($scriptfilename);
363 my $translationfilecontent = installer
::files
::read_file
($installer::globals
::macinstallfilename
);
364 localize_scriptfile
($scriptfilecontent, $translationfilecontent, $languagestringref);
365 # replace_variables_in_scriptfile($scriptfilecontent, $volume_name, $allvariables);
366 replace_variables_in_scriptfile
($scriptfilecontent, $volume_name_classic, $volume_name_classic_app, $allvariables);
367 installer
::files
::save_file
($scriptfilename, $scriptfilecontent);
369 chmod 0775, $scriptfilename;
370 chmod 0775, $scripthelperrealfilename;
372 # Copy also Info.plist and icon file
373 # Finding both files in source tree
374 my $iconfile = "ooo3_installer.icns";
375 my $iconfileref = $ENV{'SRCDIR'} . "/setup_native/source/mac/" . $iconfile;
376 if (! -f
$iconfileref) { installer
::exiter
::exit_program
("ERROR: Could not find Apple script icon file $iconfile ($iconfileref)!", "create_package"); }
377 my $subdir = $contentsfolder . "/" . "Resources";
378 if ( ! -d
$subdir ) { installer
::systemactions
::create_directory
($subdir); }
379 $destfile = $subdir . "/" . $iconfile;
380 installer
::systemactions
::copy_one_file
($iconfileref, $destfile);
382 my $installname = "Info.plist";
383 my $infoplistfile = $ENV{'SRCDIR'} . "/setup_native/source/mac/Info.plist.langpack";
384 if (! -f
$infoplistfile) { installer
::exiter
::exit_program
("ERROR: Could not find Apple script Info.plist: $infoplistfile!", "create_package"); }
385 $destfile = $contentsfolder . "/" . $installname;
386 installer
::systemactions
::copy_one_file
($infoplistfile, $destfile);
388 # Replacing variables in Info.plist
389 $scriptfilecontent = installer
::files
::read_file
($destfile);
390 # replace_one_variable_in_shellscript($scriptfilecontent, $volume_name, "FULLPRODUCTNAME" );
391 replace_one_variable_in_shellscript
($scriptfilecontent, $volume_name_classic_app, "FULLAPPPRODUCTNAME" ); # OpenOffice.org Language Pack
392 installer
::files
::save_file
($destfile, $scriptfilecontent);
396 elsif ($volume_name_classic_app eq 'LibreOffice' || $volume_name_classic_app eq 'LibreOfficeDev')
398 my $subdir = "$tempdir/$packagename/$volume_name_classic_app.app/Contents/Resources";
399 if ( ! -d
$subdir ) { installer
::systemactions
::create_directory
($subdir); }
400 # iterate over OS X localizations
401 foreach $lang ("ca", "cs", "da", "de", "el", "en", "es", "fi", "fr", "hr", "hu", "id", "it", "ja", "ko", "ms", "nl", "no", "pl", "pt", "pt_PT", "ro", "ru", "sk", "sv", "th", "tr", "uk", "vi", "zh_CN", "zh_TW")
403 installer
::systemactions
::create_directory
($subdir . "/" . $lang . ".lproj");
405 if ( defined($ENV{'MACOSX_CODESIGNING_IDENTITY'}) && $ENV{'MACOSX_CODESIGNING_IDENTITY'} ne "" )
407 $systemcall = "$ENV{'SRCDIR'}/solenv/bin/macosx-codesign-app-bundle $localtempdir/$folder/$volume_name_classic_app.app";
408 print "... $systemcall ...\n";
409 my $returnvalue = system($systemcall);
410 $infoline = "Systemcall: $systemcall\n";
411 push( @installer::globals
::logfileinfo
, $infoline);
415 $infoline = "ERROR: Could not execute \"$systemcall\"!\n";
416 push( @installer::globals
::logfileinfo
, $infoline);
420 $infoline = "Success: Executed \"$systemcall\" successfully!\n";
421 push( @installer::globals
::logfileinfo
, $infoline);
426 $systemcall = "cd $localtempdir && hdiutil create -srcfolder $folder $archive -ov -fs HFS+ -volname \"$volume_name\" -format UDBZ";
427 if (( $ref ne "" ) && ( $$ref ne "" )) {
428 $systemcall .= " && hdiutil unflatten $archive && Rez -a $$ref -o $archive && hdiutil flatten $archive &&";
433 # getting the path of the getuid.so (only required for Solaris and Linux)
434 my $getuidlibrary = "";
435 my $ldpreloadstring = "";
436 if (( $installer::globals
::issolarisbuild
) || ( $installer::globals
::islinuxbuild
))
438 $getuidlibrary = installer
::download
::get_path_for_library
($includepatharrayref);
439 if ( $getuidlibrary ne "" ) { $ldpreloadstring = "LD_PRELOAD=" . $getuidlibrary; }
442 $systemcall = "cd $tempdir; $ldpreloadstring tar -cf - . | gzip > $archive";
445 if ( $makesystemcall )
447 print "... $systemcall ...\n";
448 my $returnvalue = system($systemcall);
449 my $infoline = "Systemcall: $systemcall\n";
450 push( @installer::globals
::logfileinfo
, $infoline);
454 $infoline = "ERROR: Could not execute \"$systemcall\"!\n";
455 push( @installer::globals
::logfileinfo
, $infoline);
459 $infoline = "Success: Executed \"$systemcall\" successfully!\n";
460 push( @installer::globals
::logfileinfo
, $infoline);
464 if ( $return_to_start ) { chdir($from); }
466 print "... removing $tempdir ...\n";
467 installer
::systemactions
::remove_complete_directory
($tempdir);
470 ####################################################
471 # Main method for creating the simple package
473 ####################################################
475 sub create_simple_package
477 my ( $filesref, $dirsref, $scpactionsref, $linksref, $unixlinksref, $loggingdir, $languagestringref, $shipinstalldir, $allsettingsarrayref, $allvariables, $includepatharrayref ) = @_;
479 # Creating directories
481 my $current_install_number = "";
484 installer
::logger
::print_message
( "... creating installation directory ...\n" );
485 installer
::logger
::include_header_into_logfile
("Creating installation directory");
487 $installer::globals
::csp_installdir
= installer
::worker
::create_installation_directory
($shipinstalldir, $languagestringref, \
$current_install_number);
488 $installer::globals
::csp_installlogdir
= installer
::systemactions
::create_directory_next_to_directory
($installer::globals
::csp_installdir
, "log");
490 my $installdir = $installer::globals
::csp_installdir
;
491 my $installlogdir = $installer::globals
::csp_installlogdir
;
493 # Setting package name (similar to the download name)
494 my $packagename = "";
496 if ( $installer::globals
::packageformat
eq "archive" ||
497 $installer::globals
::packageformat
eq "dmg" )
499 $installer::globals
::csp_languagestring
= $$languagestringref;
501 my $locallanguage = $installer::globals
::csp_languagestring
;
503 if ( $allvariables->{'OOODOWNLOADNAME'} )
505 $packagename = installer
::download
::set_download_filename
(\
$locallanguage, $allvariables);
509 $downloadname = installer
::ziplist
::getinfofromziplist
($allsettingsarrayref, "downloadname");
510 if ( $installer::globals
::languagepack
) { $downloadname = installer
::ziplist
::getinfofromziplist
($allsettingsarrayref, "langpackdownloadname"); }
511 if ( $installer::globals
::helppack
) { $downloadname = installer
::ziplist
::getinfofromziplist
($allsettingsarrayref, "helppackdownloadname"); }
512 $packagename = installer
::download
::resolve_variables_in_downloadname
($allvariables, $$downloadname, \
$locallanguage);
516 # Work around Windows problems with long pathnames (see issue 50885) by
517 # putting the to-be-archived installation tree into the temp directory
518 # instead of the module output tree (unless LOCALINSTALLDIR dictates
519 # otherwise, anyway); can be removed once issue 50885 is fixed:
520 my $tempinstalldir = $installdir;
521 if ( $installer::globals
::iswindowsbuild
&&
522 $installer::globals
::packageformat
eq "archive" &&
523 !$installer::globals
::localinstalldirset
)
525 $tempinstalldir = File
::Temp
::tempdir
;
528 # Creating subfolder in installdir, which shall become the root of package or zip file
529 my $subfolderdir = "";
530 if ( $packagename ne "" ) { $subfolderdir = $tempinstalldir . $installer::globals
::separator
. $packagename; }
531 else { $subfolderdir = $tempinstalldir; }
533 if ( ! -d
$subfolderdir ) { installer
::systemactions
::create_directory
($subfolderdir); }
535 # Create directories, copy files and ScpActions
537 installer
::logger
::print_message
( "... creating directories ...\n" );
538 installer
::logger
::include_header_into_logfile
("Creating directories:");
540 for ( my $i = 0; $i <= $#{$dirsref}; $i++ )
542 my $onedir = ${$dirsref}[$i];
544 if ( $onedir->{'HostName'} )
546 my $destdir = $subfolderdir . $installer::globals
::separator
. $onedir->{'HostName'};
550 if ( $^O
=~ /cygwin/i ) # Cygwin performance check
552 $infoline = "Try to create directory $destdir\n";
553 push(@installer::globals
::logfileinfo
, $infoline);
554 # Directories in $dirsref are sorted and all parents were added -> "mkdir" works without parent creation!
555 if ( ! ( -d
$destdir )) { mkdir($destdir, 0775); }
559 installer
::systemactions
::create_directory_structure
($destdir);
566 if (( $installer::globals
::strip
) && ( ! $installer::globals
::iswindowsbuild
)) { strip_libraries
($filesref, $languagestringref); }
569 installer
::logger
::print_message
( "... copying files ...\n" );
570 installer
::logger
::include_header_into_logfile
("Copying files:");
572 for ( my $i = 0; $i <= $#{$filesref}; $i++ )
574 my $onefile = ${$filesref}[$i];
576 if (( $onefile->{'Styles'} ) && ( $onefile->{'Styles'} =~ /\bBINARYTABLE_ONLY\b/ )) { next; }
578 my $source = $onefile->{'sourcepath'};
579 my $destination = $onefile->{'destination'};
580 $destination = $subfolderdir . $installer::globals
::separator
. $destination;
582 # Replacing $$ by $ is necessary to install files with $ in its name (back-masquerading)
583 # Otherwise, the following shell command does not work and the file list is not correct
584 $source =~ s/\$\$/\$/;
585 $destination =~ s/\$\$/\$/;
587 if ( $^O
=~ /cygwin/i ) # Cygwin performance, do not use copy_one_file. "chmod -R" at the end
589 my $copyreturn = copy
($source, $destination);
593 $infoline = "Copy: $source to $destination\n";
598 $infoline = "ERROR: Could not copy $source to $destination $!\n";
602 push(@installer::globals
::logfileinfo
, $infoline);
606 installer
::systemactions
::copy_one_file
($source, $destination);
608 if ( ! $installer::globals
::iswindowsbuild
)
611 if ( $onefile->{'UnixRights'} )
613 if ( ! -l
$destination ) # that would be rather pointless
615 chmod oct($onefile->{'UnixRights'}), $destination;
624 installer
::logger
::print_message
( "... creating links ...\n" );
625 installer
::logger
::include_header_into_logfile
("Creating links:");
627 for ( my $i = 0; $i <= $#{$linksref}; $i++ )
629 my $onelink = ${$linksref}[$i];
631 my $destination = $onelink->{'destination'};
632 $destination = $subfolderdir . $installer::globals
::separator
. $destination;
633 my $destinationfile = $onelink->{'destinationfile'};
635 my $localcall = "ln -sf \'$destinationfile\' \'$destination\' \>\/dev\/null 2\>\&1";
638 $infoline = "Creating link: \"ln -sf $destinationfile $destination\"\n";
639 push(@installer::globals
::logfileinfo
, $infoline);
642 for ( my $i = 0; $i <= $#{$unixlinksref}; $i++ )
644 my $onelink = ${$unixlinksref}[$i];
646 my $target = $onelink->{'Target'};
647 my $destination = $subfolderdir . $installer::globals
::separator
. $onelink->{'destination'};
649 my $localcall = "ln -sf \'$target\' \'$destination\' \>\/dev\/null 2\>\&1";
652 $infoline = "Creating Unix link: \"ln -sf $target $destination\"\n";
653 push(@installer::globals
::logfileinfo
, $infoline);
656 # Setting privileges for cygwin globally
658 if ( $^O
=~ /cygwin/i )
660 installer
::logger
::print_message
( "... changing privileges in $subfolderdir ...\n" );
661 installer
::logger
::include_header_into_logfile
("Changing privileges in $subfolderdir:");
663 my $localcall = "chmod -R 755 " . "\"" . $subfolderdir . "\"";
667 installer
::logger
::print_message
( "... removing superfluous directories ...\n" );
668 installer
::logger
::include_header_into_logfile
("Removing superfluous directories:");
670 my $extensionfolder = get_extensions_dir
($subfolderdir);
671 installer
::systemactions
::remove_empty_dirs_in_folder
($extensionfolder);
673 if ( $installer::globals
::platformid
eq 'macosx_x86_64' )
675 installer
::worker
::put_scpactions_into_installset
("$installdir/$packagename");
678 # Creating archive file
679 if ( $installer::globals
::packageformat
eq "archive" )
681 create_package
($tempinstalldir, $installdir, $packagename, $allvariables, $includepatharrayref, $languagestringref, $installer::globals
::archiveformat
);
683 elsif ( $installer::globals
::packageformat
eq "dmg" )
685 create_package
($installdir, $installdir, $packagename, $allvariables, $includepatharrayref, $languagestringref, ".dmg");
688 # Analyzing the log file
690 installer
::worker
::clean_output_tree
(); # removing directories created in the output tree
691 installer
::worker
::analyze_and_save_logfile
($loggingdir, $installdir, $installlogdir, $allsettingsarrayref, $languagestringref, $current_install_number);