Skip to content
Snippets Groups Projects
Commit e38f8eae authored by sfraser%netscape.com's avatar sfraser%netscape.com
Browse files

Implement InstallResources().

parent d08c62f5
No related branches found
No related tags found
No related merge requests found
......@@ -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
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment