1 package VC6WorkspaceCreator
;
3 # ************************************************************
4 # Description : A VC6 Workspace Creator
5 # Author : Chad Elliott
6 # Create Date : 5/13/2002
7 # ************************************************************
9 # ************************************************************
11 # ************************************************************
15 use VC6ProjectCreator
;
21 @ISA = qw(VCPropertyBase WinWorkspaceBase WorkspaceCreator);
23 # ************************************************************
25 # ************************************************************
34 sub workspace_file_extension
{
42 my $crlf = $self->crlf();
44 ## This identifies it as a Visual C++ file
45 print $fh 'Microsoft Developer Studio Workspace File, Format Version 6.00', $crlf;
47 ## Optionally print the workspace comment
48 $self->print_workspace_comment($fh,
50 '# This file was generated by MPC. Any changes made directly to', $crlf,
51 '# this file will be lost the next time it is generated.', $crlf,
53 '# MPC Command:', $crlf,
54 '# ', $self->create_command_line_string($0, @ARGV), $crlf, $crlf);
59 my($self, $fh, $gen) = @_;
60 my $projects = $self->get_projects();
61 my $pjs = $self->get_project_info();
62 my $crlf = $self->crlf();
64 ## Sort the project so that they resulting file can be exactly
65 ## reproduced given the same list of projects.
66 foreach my $project (sort { $gen->file_sorter($a, $b) } @
$projects) {
68 ## Add the project name and project file information
69 print $fh "###############################################################################$crlf$crlf",
70 'Project: "', $$pjs{$project}->[ProjectCreator
::PROJECT_NAME
],
71 '"=', $self->slash_to_backslash($project),
72 " - Package Owner=<4>$crlf$crlf",
73 "Package=<5>$crlf", '{{{', $crlf, "}}}$crlf$crlf",
74 "Package=<4>$crlf", '{{{', $crlf;
76 my $deps = $self->get_validated_ordering($project);
77 if (defined $$deps[0]) {
78 ## Add in the project dependencies
79 foreach my $dep (@
$deps) {
80 print $fh " Begin Project Dependency$crlf",
81 " Project_Dep_Name $dep$crlf",
82 " End Project Dependency$crlf";
86 ## End the project section
87 print $fh "}}}$crlf$crlf";
94 my $crlf = $self->crlf();
96 ## This text is always the same
97 print $fh "###############################################################################$crlf$crlf",
99 "Package=<5>$crlf", '{{{', "$crlf}}}$crlf$crlf",
100 "Package=<3>$crlf", '{{{', "$crlf}}}$crlf$crlf",
101 "###############################################################################$crlf$crlf";