Subversion Repositories gelsvn

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
107 bj 1
package VC6WorkspaceCreator;
2
 
3
# ************************************************************
4
# Description   : A VC6 Workspace Creator
5
# Author        : Chad Elliott
6
# Create Date   : 5/13/2002
7
# ************************************************************
8
 
9
# ************************************************************
10
# Pragmas
11
# ************************************************************
12
 
13
use strict;
14
 
15
use VC6ProjectCreator;
16
use WorkspaceCreator;
17
 
18
use vars qw(@ISA);
19
@ISA = qw(WorkspaceCreator);
20
 
21
# ************************************************************
22
# Subroutine Section
23
# ************************************************************
24
 
25
 
26
sub compare_output {
27
  #my($self) = shift;
28
  return 1;
29
}
30
 
31
 
32
sub crlf {
33
  my($self) = shift;
34
  return $self->windows_crlf();
35
}
36
 
37
 
38
sub workspace_file_name {
39
  my($self) = shift;
40
  return $self->get_modified_workspace_name($self->get_workspace_name(),
41
                                            '.dsw');
42
}
43
 
44
 
45
sub pre_workspace {
46
  my($self) = shift;
47
  my($fh)   = shift;
48
  my($crlf) = $self->crlf();
49
 
50
  print $fh 'Microsoft Developer Studio Workspace File, Format Version 6.00', $crlf,
51
            '#', $crlf,
52
            '# $Id: VC6WorkspaceCreator.pm 217 2006-05-05 09:35:48Z bj $', $crlf,
53
            '#', $crlf,
54
            '# This file was generated by MPC.  Any changes made directly to', $crlf,
55
            '# this file will be lost the next time it is generated.', $crlf,
56
            '#', $crlf,
57
            '# MPC Command:', $crlf,
58
            "# $0 @ARGV", $crlf,
59
            $crlf;
60
}
61
 
62
 
63
sub write_comps {
64
  my($self)     = shift;
65
  my($fh)       = shift;
217 bj 66
  my($gen)      = shift;
107 bj 67
  my($projects) = $self->get_projects();
68
  my($pjs)      = $self->get_project_info();
69
  my($crlf)     = $self->crlf();
70
 
217 bj 71
  foreach my $project (sort { $gen->file_sorter($a, $b) } @$projects) {
107 bj 72
    my($name) = $$pjs{$project}->[0];
73
    my($deps) = $self->get_validated_ordering($project);
74
 
75
    print $fh "###############################################################################$crlf" .
76
              $crlf .
77
              "Project: \"$name\"=" . $self->slash_to_backslash($project) .
78
              " - Package Owner=<4>$crlf" .
79
              $crlf .
80
              "Package=<5>$crlf" .
81
              "{{{$crlf" .
82
              "}}}$crlf" .
83
              $crlf .
84
              "Package=<4>$crlf" .
85
              "{{{$crlf";
86
 
217 bj 87
    if (defined $$deps[0]) {
88
      foreach my $dep (@$deps) {
89
        print $fh "    Begin Project Dependency$crlf" .
90
                  "    Project_Dep_Name $dep$crlf" .
91
                  "    End Project Dependency$crlf";
107 bj 92
      }
93
    }
94
 
95
    print $fh "}}}$crlf$crlf";
96
  }
97
}
98
 
99
 
100
sub post_workspace {
101
  my($self) = shift;
102
  my($fh)   = shift;
103
  my($crlf) = $self->crlf();
104
 
105
  print $fh "###############################################################################$crlf" .
106
            $crlf .
107
            "Global:$crlf" .
108
            $crlf .
109
            "Package=<5>$crlf" .
110
            "{{{$crlf" .
111
            "}}}$crlf" .
112
            $crlf .
113
            "Package=<3>$crlf" .
114
            "{{{$crlf" .
115
            "}}}$crlf" .
116
            $crlf .
117
            "###############################################################################$crlf" .
118
            $crlf;
119
}
120
 
121
 
122
1;