Subversion Repositories gelsvn

Rev

Rev 107 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
107 bj 1
package VC71WorkspaceCreator;
2
 
3
# ************************************************************
4
# Description   : A VC7.1 Workspace Creator
5
# Author        : Chad Elliott
6
# Create Date   : 4/17/2003
7
# ************************************************************
8
 
9
# ************************************************************
10
# Pragmas
11
# ************************************************************
12
 
13
use strict;
14
 
15
use VC71ProjectCreator;
16
use VC7WorkspaceCreator;
17
 
18
use vars qw(@ISA);
19
@ISA = qw(VC7WorkspaceCreator);
20
 
21
# ************************************************************
22
# Subroutine Section
23
# ************************************************************
24
 
25
 
26
sub pre_workspace {
27
  my($self) = shift;
28
  my($fh)   = shift;
29
  my($crlf) = $self->crlf();
30
 
31
  print $fh 'Microsoft Visual Studio Solution File, Format Version 8.00', $crlf,
32
            '#', $crlf,
33
            '# $Id: VC71WorkspaceCreator.pm 107 2005-09-02 16:42:23Z bj $', $crlf,
34
            '#', $crlf,
35
            '# This file was generated by MPC.  Any changes made directly to', $crlf,
36
            '# this file will be lost the next time it is generated.', $crlf,
37
            '#', $crlf,
38
            '# MPC Command:', $crlf,
39
            "# $0 @ARGV", $crlf;
40
}
41
 
42
 
43
sub print_inner_project {
44
  my($self)  = shift;
45
  my($fh)    = shift;
46
  my($gen)   = shift;
47
  my($pguid) = shift;
48
  my($deps)  = shift;
49
  my($project_name) = shift;
50
  my($name_to_guid_map) = shift;
51
 
52
  if ($self->allow_empty_dependencies() || length($deps) > 0) {
53
    my($crlf) = $self->crlf();
54
    print $fh "\tProjectSection(ProjectDependencies) = postProject$crlf";
55
    my($darr) = $self->create_array($deps);
56
    foreach my $dep (@$darr) {
57
      ## Avoid cirular dependencies
58
      if ($project_name ne $dep) {
59
        my($guid) = $name_to_guid_map->{$dep};
60
        if (defined $guid) {
61
          print $fh "\t\t{$guid} = {$guid}$crlf";
62
        }
63
      }
64
    }
65
    print $fh "\tEndProjectSection$crlf";
66
  }
67
}
68
 
69
 
70
sub allow_empty_dependencies {
71
  #my($self) = shift;
72
  return 1;
73
}
74
 
75
 
76
sub print_configs {
77
  my($self)    = shift;
78
  my($fh)      = shift;
79
  my($configs) = shift;
80
  my($crlf)    = $self->crlf();
81
  foreach my $key (sort keys %$configs) {
82
    print $fh "\t\t$key = $key$crlf";
83
  }
84
}
85
 
86
 
87
sub print_dependencies {
88
  ## These are done in the print_inner_project method
89
}
90
 
91
 
92
1;