simplepackage.pm (998b778a) | simplepackage.pm (dfa12748) |
---|---|
1#************************************************************** 2# 3# Licensed to the Apache Software Foundation (ASF) under one 4# or more contributor license agreements. See the NOTICE file 5# distributed with this work for additional information 6# regarding copyright ownership. The ASF licenses this file 7# to you under the Apache License, Version 2.0 (the 8# "License"); you may not use this file except in compliance --- 357 unchanged lines hidden (view full) --- 366 367 my $archive = $archivedir . $installer::globals::separator . $packagename . $format; 368 369 if ( $archive =~ /zip$/ ) 370 { 371 $from = cwd(); 372 $return_to_start = 1; 373 chdir($tempdir); | 1#************************************************************** 2# 3# Licensed to the Apache Software Foundation (ASF) under one 4# or more contributor license agreements. See the NOTICE file 5# distributed with this work for additional information 6# regarding copyright ownership. The ASF licenses this file 7# to you under the Apache License, Version 2.0 (the 8# "License"); you may not use this file except in compliance --- 357 unchanged lines hidden (view full) --- 366 367 my $archive = $archivedir . $installer::globals::separator . $packagename . $format; 368 369 if ( $archive =~ /zip$/ ) 370 { 371 $from = cwd(); 372 $return_to_start = 1; 373 chdir($tempdir); |
374 $systemcall = "$installer::globals::zippath -qr $archive ."; | 374 if ( $^O =~ /os2/i ) 375 { 376 my $zip = Cwd::realpath($archive); 377 $systemcall = "$installer::globals::zippath -qr $zip ."; 378 } 379 else 380 { 381 $systemcall = "$installer::globals::zippath -qr $archive ."; 382 } |
375 376 # Using Archive::Zip fails because of very long path names below "share/uno_packages/cache" 377 # my $packzip = Archive::Zip->new(); 378 # $packzip->addTree("."); # after changing into $tempdir 379 # $packzip->writeToFileNamed($archive); 380 # $makesystemcall = 0; 381 } 382 elsif ( $archive =~ /dmg$/ ) --- 267 unchanged lines hidden (view full) --- 650 my $onedir = ${$dirsref}[$i]; 651 652 if ( $onedir->{'HostName'} ) 653 { 654 my $destdir = $subfolderdir . $installer::globals::separator . $onedir->{'HostName'}; 655 656 if ( ! -d $destdir ) 657 { | 383 384 # Using Archive::Zip fails because of very long path names below "share/uno_packages/cache" 385 # my $packzip = Archive::Zip->new(); 386 # $packzip->addTree("."); # after changing into $tempdir 387 # $packzip->writeToFileNamed($archive); 388 # $makesystemcall = 0; 389 } 390 elsif ( $archive =~ /dmg$/ ) --- 267 unchanged lines hidden (view full) --- 658 my $onedir = ${$dirsref}[$i]; 659 660 if ( $onedir->{'HostName'} ) 661 { 662 my $destdir = $subfolderdir . $installer::globals::separator . $onedir->{'HostName'}; 663 664 if ( ! -d $destdir ) 665 { |
658 if ( $^O =~ /cygwin/i ) # Cygwin performance check | 666 if ( $^O =~ /cygwin/i || $^O =~ /os2/i ) # Cygwin performance check |
659 { 660 $infoline = "Try to create directory $destdir\n"; 661 push(@installer::globals::logfileinfo, $infoline); 662 # Directories in $dirsref are sorted and all parents were added -> "mkdir" works without parent creation! 663 if ( ! ( -d $destdir )) { mkdir($destdir, 0775); } 664 } 665 else 666 { 667 installer::systemactions::create_directory_structure($destdir); 668 } 669 } 670 } 671 } 672 673 # stripping files ?! | 667 { 668 $infoline = "Try to create directory $destdir\n"; 669 push(@installer::globals::logfileinfo, $infoline); 670 # Directories in $dirsref are sorted and all parents were added -> "mkdir" works without parent creation! 671 if ( ! ( -d $destdir )) { mkdir($destdir, 0775); } 672 } 673 else 674 { 675 installer::systemactions::create_directory_structure($destdir); 676 } 677 } 678 } 679 } 680 681 # stripping files ?! |
674 if (( $installer::globals::strip ) && ( ! $installer::globals::iswindowsbuild )) { installer::strip::strip_libraries($filesref, $languagestringref); } | 682 if (( $installer::globals::strip ) && ( ! $installer::globals::iswindowsbuild ) && ( ! $installer::globals::isos2 )) { installer::strip::strip_libraries($filesref, $languagestringref); } |
675 676 # copy Files 677 installer::logger::print_message( "... copying files ...\n" ); 678 installer::logger::include_header_into_logfile("Copying files:"); 679 680 for ( my $i = 0; $i <= $#{$filesref}; $i++ ) 681 { 682 my $onefile = ${$filesref}[$i]; --- 6 unchanged lines hidden (view full) --- 689 my $destination = $onefile->{'destination'}; 690 $destination = $subfolderdir . $installer::globals::separator . $destination; 691 692 # Replacing $$ by $ is necessary to install files with $ in its name (back-masquerading) 693 # Otherwise, the following shell command does not work and the file list is not correct 694 $source =~ s/\$\$/\$/; 695 $destination =~ s/\$\$/\$/; 696 | 683 684 # copy Files 685 installer::logger::print_message( "... copying files ...\n" ); 686 installer::logger::include_header_into_logfile("Copying files:"); 687 688 for ( my $i = 0; $i <= $#{$filesref}; $i++ ) 689 { 690 my $onefile = ${$filesref}[$i]; --- 6 unchanged lines hidden (view full) --- 697 my $destination = $onefile->{'destination'}; 698 $destination = $subfolderdir . $installer::globals::separator . $destination; 699 700 # Replacing $$ by $ is necessary to install files with $ in its name (back-masquerading) 701 # Otherwise, the following shell command does not work and the file list is not correct 702 $source =~ s/\$\$/\$/; 703 $destination =~ s/\$\$/\$/; 704 |
697 if ( $^O =~ /cygwin/i ) # Cygwin performance, do not use copy_one_file. "chmod -R" at the end | 705 if ( $^O =~ /cygwin/i || $^O =~ /os2/i ) # Cygwin performance, do not use copy_one_file. "chmod -R" at the end |
698 { 699 my $copyreturn = copy($source, $destination); 700 701 if ($copyreturn) 702 { 703 $infoline = "Copy: $source to $destination\n"; 704 $returnvalue = 1; 705 } --- 110 unchanged lines hidden --- | 706 { 707 my $copyreturn = copy($source, $destination); 708 709 if ($copyreturn) 710 { 711 $infoline = "Copy: $source to $destination\n"; 712 $returnvalue = 1; 713 } --- 110 unchanged lines hidden --- |