Subversion Repositories gelsvn

Rev

Rev 107 | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 107 Rev 217
1
package VC7ProjectCreator;
1
package VC7ProjectCreator;
2
 
2
 
3
# ************************************************************
3
# ************************************************************
4
# Description   : A VC7 Project Creator
4
# Description   : A VC7 Project Creator
5
# Author        : Chad Elliott
5
# Author        : Chad Elliott
6
# Create Date   : 4/23/2002
6
# Create Date   : 4/23/2002
7
# ************************************************************
7
# ************************************************************
8
 
8
 
9
# ************************************************************
9
# ************************************************************
10
# Pragmas
10
# Pragmas
11
# ************************************************************
11
# ************************************************************
12
 
12
 
13
use strict;
13
use strict;
14
 
14
 
15
use GUID;
15
use GUID;
16
use ProjectCreator;
16
use ProjectCreator;
17
use VCProjectBase;
17
use VCProjectBase;
-
 
18
use XMLProjectBase;
18
 
19
 
19
use vars qw(@ISA);
20
use vars qw(@ISA);
20
@ISA = qw(VCProjectBase ProjectCreator);
21
@ISA = qw(XMLProjectBase VCProjectBase ProjectCreator);
21
 
22
 
22
# ************************************************************
23
# ************************************************************
23
# Data Section
24
# Data Section
24
# ************************************************************
25
# ************************************************************
25
 
26
 
26
my(%info) = ('cplusplus' => {'ext'      => '.vcproj',
27
my(%info) = ('cplusplus' => {'ext'      => '.vcproj',
27
                             'dllexe'   => 'vc7exe',
28
                             'dllexe'   => 'vc7exe',
28
                             'libexe'   => 'vc7libexe',
29
                             'libexe'   => 'vc7libexe',
29
                             'dll'      => 'vc7dll',
30
                             'dll'      => 'vc7dll',
30
                             'lib'      => 'vc7lib',
31
                             'lib'      => 'vc7lib',
31
                             'template' => 'vc7',
32
                             'template' => 'vc7',
32
                            },
33
                            },
33
             'csharp'    => {'ext'      => '.csproj',
34
             'csharp'    => {'ext'      => '.csproj',
34
                             'dllexe'   => 'vc7csharp',
35
                             'dllexe'   => 'vc7csharp',
35
                             'libexe'   => 'vc7csharp',
36
                             'libexe'   => 'vc7csharp',
36
                             'dll'      => 'vc7csharp',
37
                             'dll'      => 'vc7csharp',
37
                             'lib'      => 'vc7csharp',
38
                             'lib'      => 'vc7csharp',
38
                             'template' => 'vc7csharp',
39
                             'template' => 'vc7csharp',
39
                            },
40
                            },
40
             'vb'        => {'ext'      => '.vbproj',
41
             'vb'        => {'ext'      => '.vbproj',
41
                             'dllexe'   => 'vc7vb',
42
                             'dllexe'   => 'vc7vb',
42
                             'libexe'   => 'vc7vb',
43
                             'libexe'   => 'vc7vb',
43
                             'dll'      => 'vc7vb',
44
                             'dll'      => 'vc7vb',
44
                             'lib'      => 'vc7vb',
45
                             'lib'      => 'vc7vb',
45
                             'template' => 'vc7vb',
46
                             'template' => 'vc7vb',
46
                            },
47
                            },
47
            );
48
            );
48
 
49
 
-
 
50
my(%config) = ('vcversion'    => '7.00',
-
 
51
               'forloopscope' => 'TRUE',
-
 
52
              );
-
 
53
 
49
# ************************************************************
54
# ************************************************************
50
# Subroutine Section
55
# Subroutine Section
51
# ************************************************************
56
# ************************************************************
52
 
57
 
53
sub get_info_hash {
58
sub get_info_hash {
54
  my($self) = shift;
59
  my($self) = shift;
55
  my($key)  = shift;
60
  my($key)  = shift;
56
  return $info{$key};
61
  return $info{$key};
57
}
62
}
58
 
63
 
59
sub get_quote_symbol {
-
 
60
  #my($self) = shift;
-
 
61
  return '"';
-
 
62
}
-
 
63
 
-
 
64
 
-
 
65
sub get_gt_symbol {
-
 
66
  #my($self) = shift;
-
 
67
  return '>';
-
 
68
}
-
 
69
 
-
 
70
 
-
 
71
sub get_lt_symbol {
-
 
72
  #my($self) = shift;
-
 
73
  return '<';
-
 
74
}
-
 
75
 
-
 
76
 
-
 
77
sub get_and_symbol {
-
 
78
  #my($self) = shift;
-
 
79
  return '&&';
-
 
80
}
-
 
81
 
-
 
82
 
64
 
83
sub get_configurable {
65
sub get_configurable {
84
  my($self)   = shift;
66
  my($self) = shift;
85
  my($name)   = shift;
67
  my($name) = shift;
86
  my(%config) = ('vcversion'    => '7.00',
-
 
87
                 'forloopscope' => 'TRUE',
-
 
88
                );
-
 
89
  return $config{$name};
68
  return $config{$name};
90
}
69
}
91
 
70
 
92
 
71
 
93
sub fill_value {
72
sub fill_value {
94
  my($self)  = shift;
73
  my($self)  = shift;
95
  my($name)  = shift;
74
  my($name)  = shift;
96
  my($value) = undef;
75
  my($value) = undef;
97
 
76
 
98
  if ($name eq 'guid') {
77
  if ($name eq 'guid') {
99
    my($guid) = new GUID();
78
    my($guid) = new GUID();
100
    $value = $guid->generate($self->project_file_name(),
79
    $value = $guid->generate($self->project_file_name(),
101
                             $self->{'current_input'},
80
                             $self->{'current_input'},
102
                             $self->getcwd());
81
                             $self->getcwd());
103
  }
82
  }
-
 
83
  elsif ($name eq 'language') {
-
 
84
    $value = $self->get_language();
-
 
85
  }
104
  else {
86
  else {
105
    $value = $self->get_configurable($name);
87
    $value = $self->get_configurable($name);
106
  }
88
  }
107
  return $value;
89
  return $value;
108
}
90
}
109
 
91
 
110
 
92
 
111
sub project_file_extension {
93
sub project_file_extension {
112
  my($self) = shift;
94
  my($self) = shift;
113
  return $self->get_info_hash($self->get_language())->{'ext'};
95
  return $self->get_info_hash($self->get_language())->{'ext'};
114
}
96
}
115
 
97
 
116
 
98
 
117
sub get_dll_exe_template_input_file {
99
sub get_dll_exe_template_input_file {
118
  my($self) = shift;
100
  my($self) = shift;
119
  return $self->get_info_hash($self->get_language())->{'dllexe'};
101
  return $self->get_info_hash($self->get_language())->{'dllexe'};
120
}
102
}
121
 
103
 
122
 
104
 
123
sub get_lib_exe_template_input_file {
105
sub get_lib_exe_template_input_file {
124
  my($self) = shift;
106
  my($self) = shift;
125
  return $self->get_info_hash($self->get_language())->{'libexe'};
107
  return $self->get_info_hash($self->get_language())->{'libexe'};
126
}
108
}
127
 
109
 
128
 
110
 
129
sub get_dll_template_input_file {
111
sub get_dll_template_input_file {
130
  my($self) = shift;
112
  my($self) = shift;
131
  return $self->get_info_hash($self->get_language())->{'dll'};
113
  return $self->get_info_hash($self->get_language())->{'dll'};
132
}
114
}
133
 
115
 
134
 
116
 
135
sub get_lib_template_input_file {
117
sub get_lib_template_input_file {
136
  my($self) = shift;
118
  my($self) = shift;
137
  return $self->get_info_hash($self->get_language())->{'lib'};
119
  return $self->get_info_hash($self->get_language())->{'lib'};
138
}
120
}
139
 
121
 
140
 
122
 
141
sub get_template {
123
sub get_template {
142
  my($self) = shift;
124
  my($self) = shift;
143
  return $self->get_info_hash($self->get_language())->{'template'};
125
  return $self->get_info_hash($self->get_language())->{'template'};
144
}
126
}
145
 
127
 
146
 
128
 
147
1;
129
1;
148
 
130