1 package VC7ProjectCreator
;
3 # ************************************************************
4 # Description : A VC7 Project Creator
5 # Author : Chad Elliott
6 # Create Date : 4/23/2002
7 # ************************************************************
9 # ************************************************************
11 # ************************************************************
21 @ISA = qw(XMLProjectBase VCProjectBase ProjectCreator);
23 # ************************************************************
25 # ************************************************************
27 my %info = (Creator
::cplusplus
=> {'ext' => '.vcproj',
29 'libexe' => 'vc7libexe',
34 Creator
::csharp
=> {'ext' => '.csproj',
35 'dllexe' => 'vc7csharp',
36 'libexe' => 'vc7csharp',
39 'template' => 'vc7csharp',
41 Creator
::java
=> {'ext' => '.vjsproj',
42 'dllexe' => 'vc7java',
43 'libexe' => 'vc7java',
46 'template' => 'vc7java',
48 Creator
::vb
=> {'ext' => '.vbproj',
53 'template' => 'vc7vb',
57 my %config = ('vcversion' => '7.00',
58 'forloopscope' => 'TRUE',
61 # ************************************************************
63 # ************************************************************
65 sub languageSupported
{
66 return defined $info{$_[0]->get_language()};
71 #my($self, $key) = @_;
76 sub get_configurable
{
77 #my($self, $name) = @_;
78 return $config{$_[1]};
83 my($self, $name) = @_;
85 if ($name eq 'guid') {
86 ## Return a repeatable GUID for use within the template. The values
87 ## provided will be hashed and returned in a format expected by
89 return GUID
::generate
($self->project_file_name(),
90 $self->{'current_input'}, $self->getcwd());
92 elsif ($name eq 'language') {
93 ## If this project is a Web Application, the language is website.
94 ## Since Visual Studio 2003 doesn't support Web Applications, this
95 ## will never happen. However, this code is shared by the vc8
96 ## project type, so it can happen then.
97 return Creator
::website
if ($self->get_assignment('webapp'));
99 ## Also for the vc8 project type, the language is stored in the
100 ## project file as a comment when external C# references need to be
101 ## added to the resulting project. Since a C++ project can mix with
102 ## C#, the particular project language can not be determined by the
103 ## workspace language.
104 return $self->get_language();
107 ## Consult another method for this template name. This method is
108 ## overrridden by the other project creators that inherit from this
110 return $self->get_configurable($name);
114 sub project_file_extension
{
115 return $_[0]->get_info_hash($_[0]->get_language())->{'ext'};
119 sub get_dll_exe_template_input_file
{
120 return $_[0]->get_info_hash($_[0]->get_language())->{'dllexe'};
124 sub get_lib_exe_template_input_file
{
125 return $_[0]->get_info_hash($_[0]->get_language())->{'libexe'};
129 sub get_dll_template_input_file
{
130 return $_[0]->get_info_hash($_[0]->get_language())->{'dll'};
134 sub get_lib_template_input_file
{
135 return $_[0]->get_info_hash($_[0]->get_language())->{'lib'};
140 return $_[0]->get_info_hash($_[0]->get_language())->{'template'};
144 sub get_cmdsep_symbol
{