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 ## NOTE: We call the constant as a function to support Perl 5.6.
28 my %info = (Creator
::cplusplus
() => {'ext' => '.vcproj',
30 'libexe' => 'vc7libexe',
35 Creator
::csharp
() => {'ext' => '.csproj',
36 'dllexe' => 'vc7csharp',
37 'libexe' => 'vc7csharp',
40 'template' => 'vc7csharp',
42 Creator
::java
() => {'ext' => '.vjsproj',
43 'dllexe' => 'vc7java',
44 'libexe' => 'vc7java',
47 'template' => 'vc7java',
49 Creator
::vb
() => {'ext' => '.vbproj',
54 'template' => 'vc7vb',
58 my %config = ('vcversion' => '7.00',
59 'forloopscope' => 'TRUE',
62 # ************************************************************
64 # ************************************************************
66 sub languageSupported
{
67 return defined $info{$_[0]->get_language()};
72 #my($self, $key) = @_;
77 sub get_configurable
{
78 #my($self, $name) = @_;
79 return $config{$_[1]};
84 my($self, $name) = @_;
86 if ($name eq 'guid') {
87 ## Return a repeatable GUID for use within the template. The values
88 ## provided will be hashed and returned in a format expected by
90 return GUID
::generate
($self->project_file_name(),
91 $self->{'current_input'},
92 File
::Spec
->abs2rel($self->getcwd(),
93 $self->getstartdir()));
95 elsif ($name eq 'language') {
96 ## If this project is a Web Application, the language is website.
97 ## Since Visual Studio 2003 doesn't support Web Applications, this
98 ## will never happen. However, this code is shared by the vc8
99 ## project type, so it can happen then.
100 return Creator
::website
if ($self->get_assignment('webapp'));
102 ## Also for the vc8 project type, the language is stored in the
103 ## project file as a comment when external C# references need to be
104 ## added to the resulting project. Since a C++ project can mix with
105 ## C#, the particular project language can not be determined by the
106 ## workspace language.
107 return $self->get_language();
110 ## Consult another method for this template name. This method is
111 ## overridden by the other project creators that inherit from this
113 return $self->get_configurable($name);
117 sub project_file_extension
{
118 return $_[0]->get_info_hash($_[0]->get_language())->{'ext'};
122 sub get_dll_exe_template_input_file
{
123 return $_[0]->get_info_hash($_[0]->get_language())->{'dllexe'};
127 sub get_lib_exe_template_input_file
{
128 return $_[0]->get_info_hash($_[0]->get_language())->{'libexe'};
132 sub get_dll_template_input_file
{
133 return $_[0]->get_info_hash($_[0]->get_language())->{'dll'};
137 sub get_lib_template_input_file
{
138 return $_[0]->get_info_hash($_[0]->get_language())->{'lib'};
143 return $_[0]->get_info_hash($_[0]->get_language())->{'template'};
147 sub get_cmdsep_symbol
{