This commit is contained in:
sfraser%netscape.com 1999-04-21 00:37:37 +00:00
Родитель d08c62f52c
Коммит e38f8eaed8
1 изменённых файлов: 40 добавлений и 1 удалений

Просмотреть файл

@ -36,7 +36,7 @@ use Mac::Events;
use Mac::Processes;
@ISA = qw(Exporter);
@EXPORT = qw(BuildProject BuildProjectClean OpenErrorLog MakeAlias StopForErrors DontStopForErrors InstallFromManifest SetBuildNumber SetAgentString SetTimeBomb Delay ActivateApplication);
@EXPORT = qw(BuildProject BuildProjectClean OpenErrorLog MakeAlias StopForErrors DontStopForErrors InstallFromManifest InstallResources SetBuildNumber SetAgentString SetTimeBomb Delay ActivateApplication);
@EXPORT_OK = qw(CloseErrorLog UseCodeWarriorLib QUIET);
use Cwd;
@ -366,6 +366,45 @@ sub InstallFromManifest($;$)
}
}
=pod
C<InstallResources()>
=cut
# parameters are path to MANIFEST file, destination dir, true (to make copies) or false (to make aliases)
sub InstallResources($;$;$)
{
my ($manifest_file, $dest_dir, $copy_files) = @_;
$dest_dir ||= ":";
$manifest_file =~ m/(.+):/;
my $source_dir = $1;
chop($dest_dir) if $dest_dir =~ m/:$/;
WaitNextEvent();
print "Installing resources from \"$manifest_file\"\n" unless $QUIET;
my $read = maniread(full_path_to($manifest_file));
foreach $file (keys %$read)
{
next unless $file;
if ($copy_files)
{
print "Implement this if you need it";
}
else
{
MakeAlias("$source_dir:$file", "$dest_dir:$file");
}
}
}
sub SetBuildNumber
{