Kaydet (Commit) c84a593f authored tarafından Ivo Hinkelmann's avatar Ivo Hinkelmann

INTEGRATION: CWS dmgarchive (1.6.140); FILE MERGED

2007/11/08 14:45:55 obr 1.6.140.1: #i83174#,#i72908# pkgformat archive mapps to dmg on Mac OS X
üst 9d60a510
...@@ -4,9 +4,9 @@ ...@@ -4,9 +4,9 @@
# #
# $RCSfile: simplepackage.pm,v $ # $RCSfile: simplepackage.pm,v $
# #
# $Revision: 1.7 $ # $Revision: 1.8 $
# #
# last change: $Author: rt $ $Date: 2007-11-06 14:19:22 $ # last change: $Author: ihi $ $Date: 2007-11-26 13:16:22 $
# #
# The Contents of this file are made available subject to # The Contents of this file are made available subject to
# the terms of GNU Lesser General Public License Version 2.1. # the terms of GNU Lesser General Public License Version 2.1.
...@@ -146,12 +146,13 @@ sub register_extensions ...@@ -146,12 +146,13 @@ sub register_extensions
############################################# #############################################
# Creating the "simple" package. # Creating the "simple" package.
# "zip" for Windows # "zip" for Windows
# "dmg" on Mac OS X
# "tar.gz" for all other platforms # "tar.gz" for all other platforms
############################################# #############################################
sub create_package sub create_package
{ {
my ( $installdir, $packagename, $includepatharrayref ) = @_; my ( $installdir, $packagename, $allvariables, $includepatharrayref ) = @_;
# moving dir into temporary directory # moving dir into temporary directory
my $pid = $$; # process id my $pid = $$; # process id
...@@ -164,24 +165,24 @@ sub create_package ...@@ -164,24 +165,24 @@ sub create_package
# creating new directory with original name # creating new directory with original name
installer::systemactions::create_directory($installdir); installer::systemactions::create_directory($installdir);
if ( $installer::globals::iswindowsbuild ) # Windows specific part my $archive = $installdir . $installer::globals::separator . $packagename . $installer::globals::archiveformat;
{
$fileextension = ".zip";
my $zipfilename = $packagename . $fileextension;
$zipfilename = $installdir . $installer::globals::separator . $zipfilename;
if ( $archive =~ /zip$/ )
{
$from = cwd(); $from = cwd();
$return_to_start = 1; $return_to_start = 1;
chdir($tempdir); chdir($tempdir);
$systemcall = "$installer::globals::zippath -qr $zipfilename ."; $systemcall = "$installer::globals::zippath -qr $archive .";
# $systemcall = "$installer::globals::zippath -r $zipfilename ."; # $systemcall = "$installer::globals::zippath -r $archive .";
} }
else # Non-Windows specific part elsif ( $archive =~ /dmg$/ )
{
installer::worker::put_scpactions_into_installset("$tempdir/$packagename");
my $folder = ( -l "$tempdir/$packagename/Applications" ) ? $packagename : "\.";
$systemcall = "cd $tempdir && hdiutil makehybrid -hfs -hfs-openfolder $folder $folder -hfs-volume-name $allvariables->{'PRODUCTNAME'} -ov -o $installdir/tmp && hdiutil convert -ov -format UDZO $installdir/tmp.dmg -o $archive && rm -f $installdir/tmp.dmg";
}
else
{ {
$fileextension = ".tar.gz";
my $targzname = $packagename . $fileextension;
$targzname = $installdir . $installer::globals::separator . $targzname;
# getting the path of the getuid.so (only required for Solaris and Linux) # getting the path of the getuid.so (only required for Solaris and Linux)
my $getuidlibrary = ""; my $getuidlibrary = "";
my $ldpreloadstring = ""; my $ldpreloadstring = "";
...@@ -191,7 +192,7 @@ sub create_package ...@@ -191,7 +192,7 @@ sub create_package
if ( $getuidlibrary ne "" ) { $ldpreloadstring = "LD_PRELOAD=" . $getuidlibrary; } if ( $getuidlibrary ne "" ) { $ldpreloadstring = "LD_PRELOAD=" . $getuidlibrary; }
} }
$systemcall = "cd $tempdir; $ldpreloadstring tar -cf - . | gzip > $targzname"; $systemcall = "cd $tempdir; $ldpreloadstring tar -cf - . | gzip > $archive";
} }
print "... $systemcall ...\n"; print "... $systemcall ...\n";
...@@ -387,7 +388,7 @@ sub create_simple_package ...@@ -387,7 +388,7 @@ sub create_simple_package
# -> tar.gz for all other platforms # -> tar.gz for all other platforms
installer::logger::print_message( "... creating archive file ...\n" ); installer::logger::print_message( "... creating archive file ...\n" );
installer::logger::include_header_into_logfile("Creating archive file:"); installer::logger::include_header_into_logfile("Creating archive file:");
create_package($installdir, $packagename, $includepatharrayref); create_package($installdir, $packagename, $allvariables, $includepatharrayref);
} }
} }
...@@ -400,4 +401,4 @@ sub create_simple_package ...@@ -400,4 +401,4 @@ sub create_simple_package
} }
} }
1; 1;
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment