diff options
author | elliott_c <ocielliottc@users.noreply.github.com> | 2002-07-09 12:30:46 +0000 |
---|---|---|
committer | elliott_c <ocielliottc@users.noreply.github.com> | 2002-07-09 12:30:46 +0000 |
commit | c952551333647f0412a4817a3b627362789f2ae1 (patch) | |
tree | 17c7ecd01392d50d657d8416113aa072a9941971 /modules/VC6WorkspaceCreator.pm | |
download | MPC-c952551333647f0412a4817a3b627362789f2ae1.tar.gz |
ChangeLogTag: Tue Jul 9 07:24:06 2002 Chad Elliott <elliott_c@ociweb.com>
Diffstat (limited to 'modules/VC6WorkspaceCreator.pm')
-rw-r--r-- | modules/VC6WorkspaceCreator.pm | 114 |
1 files changed, 114 insertions, 0 deletions
diff --git a/modules/VC6WorkspaceCreator.pm b/modules/VC6WorkspaceCreator.pm new file mode 100644 index 00000000..b69ee028 --- /dev/null +++ b/modules/VC6WorkspaceCreator.pm @@ -0,0 +1,114 @@ +package VC6WorkspaceCreator; + +# ************************************************************ +# Description : A VC6 Workspace Creator +# Author : Chad Elliott +# Create Date : 5/13/2002 +# ************************************************************ + +# ************************************************************ +# Pragmas +# ************************************************************ + +use strict; + +use VC6ProjectCreator; +use WorkspaceCreator; + +use vars qw(@ISA); +@ISA = qw(WorkspaceCreator); + +# ************************************************************ +# Subroutine Section +# ************************************************************ + + +sub crlf { + my($self) = shift; + return $self->windows_crlf(); +} + + +sub workspace_file_name { + my($self) = shift; + return $self->get_workspace_name() . ".dsw"; +} + + +sub pre_workspace { + my($self) = shift; + my($fh) = shift; + my($crlf) = $self->crlf(); + + print $fh "Microsoft Developer Studio Workspace File, Format Version 6.00$crlf" . + "# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!$crlf" . + "$crlf"; +} + + +sub write_comps { + my($self) = shift; + my($fh) = shift; + my($projects) = $self->get_projects(); + my($pjs) = $self->get_project_info(); + my($crlf) = $self->crlf(); + + foreach my $project (@$projects) { + my($pi) = $$pjs{$project}; + my($name, $deps) = @$pi; + + ## Convert all /'s to \ + $project =~ s/\//\\/g; + + print $fh "###############################################################################$crlf" . + "$crlf" . + "Project: \"$name\"=$project - Package Owner=<4>$crlf" . + "$crlf" . + "Package=<5>$crlf" . + "{{{$crlf" . + "}}}$crlf" . + "$crlf" . + "Package=<4>$crlf" . + "{{{$crlf"; + + if (defined $deps && $deps ne "") { + my($darr) = $self->create_array($deps); + foreach my $dep (@$darr) { + ## Avoid cirular dependencies + if ($name ne $dep) { + print $fh " Begin Project Dependency$crlf" . + " Project_Dep_Name $dep$crlf" . + " End Project Dependency$crlf"; + } + } + } + + print $fh "}}}$crlf" . + "$crlf"; + } +} + + +sub post_workspace { + my($self) = shift; + my($fh) = shift; + my($crlf) = $self->crlf(); + + print $fh "###############################################################################$crlf" . + "$crlf" . + "Global:$crlf" . + "$crlf" . + "Package=<5>$crlf" . + "{{{$crlf" . + "}}}$crlf" . + "$crlf" . + "Package=<3>$crlf" . + "{{{$crlf" . + "}}}$crlf" . + "$crlf" . + "###############################################################################$crlf" . + "$crlf"; +} + + +1; |