summaryrefslogtreecommitdiff
path: root/modules/VC7ProjectCreator.pm
diff options
context:
space:
mode:
authorelliott_c <ocielliottc@users.noreply.github.com>2008-07-18 16:05:54 +0000
committerelliott_c <ocielliottc@users.noreply.github.com>2008-07-18 16:05:54 +0000
commit6fd3ad3f828f394c6f668cc6b43981a22e1f6317 (patch)
tree61c90e72b7bf915d9d80c8e5e1837abbbaaadb0d /modules/VC7ProjectCreator.pm
parent97fa1ff1e6cf30fa55cb9c32081ea3ef9055fbd2 (diff)
downloadMPC-6fd3ad3f828f394c6f668cc6b43981a22e1f6317.tar.gz
ChangeLogTag: Fri Jul 18 16:03:52 UTC 2008 Chad Elliott <elliott_c@ociweb.com>
Diffstat (limited to 'modules/VC7ProjectCreator.pm')
-rw-r--r--modules/VC7ProjectCreator.pm135
1 files changed, 67 insertions, 68 deletions
diff --git a/modules/VC7ProjectCreator.pm b/modules/VC7ProjectCreator.pm
index 440a0957..52ee8ffa 100644
--- a/modules/VC7ProjectCreator.pm
+++ b/modules/VC7ProjectCreator.pm
@@ -24,121 +24,120 @@ use vars qw(@ISA);
# Data Section
# ************************************************************
-my(%info) = ('cplusplus' => {'ext' => '.vcproj',
- 'dllexe' => 'vc7exe',
- 'libexe' => 'vc7libexe',
- 'dll' => 'vc7dll',
- 'lib' => 'vc7lib',
- 'template' => 'vc7',
- },
- 'csharp' => {'ext' => '.csproj',
- 'dllexe' => 'vc7csharp',
- 'libexe' => 'vc7csharp',
- 'dll' => 'vc7csharp',
- 'lib' => 'vc7csharp',
- 'template' => 'vc7csharp',
- },
- 'java' => {'ext' => '.vjsproj',
- 'dllexe' => 'vc7java',
- 'libexe' => 'vc7java',
- 'dll' => 'vc7java',
- 'lib' => 'vc7java',
- 'template' => 'vc7java',
- },
- 'vb' => {'ext' => '.vbproj',
- 'dllexe' => 'vc7vb',
- 'libexe' => 'vc7vb',
- 'dll' => 'vc7vb',
- 'lib' => 'vc7vb',
- 'template' => 'vc7vb',
- },
- );
-
-my(%config) = ('vcversion' => '7.00',
- 'forloopscope' => 'TRUE',
- );
+my %info = ('cplusplus' => {'ext' => '.vcproj',
+ 'dllexe' => 'vc7exe',
+ 'libexe' => 'vc7libexe',
+ 'dll' => 'vc7dll',
+ 'lib' => 'vc7lib',
+ 'template' => 'vc7',
+ },
+ 'csharp' => {'ext' => '.csproj',
+ 'dllexe' => 'vc7csharp',
+ 'libexe' => 'vc7csharp',
+ 'dll' => 'vc7csharp',
+ 'lib' => 'vc7csharp',
+ 'template' => 'vc7csharp',
+ },
+ 'java' => {'ext' => '.vjsproj',
+ 'dllexe' => 'vc7java',
+ 'libexe' => 'vc7java',
+ 'dll' => 'vc7java',
+ 'lib' => 'vc7java',
+ 'template' => 'vc7java',
+ },
+ 'vb' => {'ext' => '.vbproj',
+ 'dllexe' => 'vc7vb',
+ 'libexe' => 'vc7vb',
+ 'dll' => 'vc7vb',
+ 'lib' => 'vc7vb',
+ 'template' => 'vc7vb',
+ },
+ );
+
+my %config = ('vcversion' => '7.00',
+ 'forloopscope' => 'TRUE',
+ );
# ************************************************************
# Subroutine Section
# ************************************************************
sub get_info_hash {
- my($self) = shift;
- my($key) = shift;
- return $info{$key};
+ #my($self, $key) = @_;
+ return $info{$_[1]};
}
sub get_configurable {
- my($self) = shift;
- my($name) = shift;
- return $config{$name};
+ #my($self, $name) = @_;
+ return $config{$_[1]};
}
sub fill_value {
- my($self) = shift;
- my($name) = shift;
- my($value) = undef;
+ my($self, $name) = @_;
if ($name eq 'guid') {
- $value = GUID::generate($self->project_file_name(),
- $self->{'current_input'},
- $self->getcwd());
+ ## Return a repeatable GUID for use within the template. The values
+ ## provided will be hashed and returned in a format expected by
+ ## Visual Studio.
+ return GUID::generate($self->project_file_name(),
+ $self->{'current_input'}, $self->getcwd());
}
elsif ($name eq 'language') {
- if ($self->get_assignment('webapp')) {
- $value = 'website';
- }
- else {
- $value = $self->get_language();
- }
+ ## If this project is a Web Application, the language is website.
+ ## Since Visual Studio 2003 doesn't support Web Applications, this
+ ## will never happen. However, this code is shared by the vc8
+ ## project type, so it can happen then.
+ return 'website' if ($self->get_assignment('webapp'));
+
+ ## Also for the vc8 project type, the language is stored in the
+ ## project file as a comment when external C# references need to be
+ ## added to the resulting project. Since a C++ project can mix with
+ ## C#, the particular project language can not be determined by the
+ ## workspace language.
+ return $self->get_language();
}
- else {
- $value = $self->get_configurable($name);
- }
- return $value;
+
+ ## Consult another method for this template name. This method is
+ ## overrridden by the other project creators that inherit from this
+ ## one.
+ return $self->get_configurable($name);
}
sub project_file_extension {
- my($self) = shift;
- return $self->get_info_hash($self->get_language())->{'ext'};
+ return $_[0]->get_info_hash($_[0]->get_language())->{'ext'};
}
sub get_dll_exe_template_input_file {
- my($self) = shift;
- return $self->get_info_hash($self->get_language())->{'dllexe'};
+ return $_[0]->get_info_hash($_[0]->get_language())->{'dllexe'};
}
sub get_lib_exe_template_input_file {
- my($self) = shift;
- return $self->get_info_hash($self->get_language())->{'libexe'};
+ return $_[0]->get_info_hash($_[0]->get_language())->{'libexe'};
}
sub get_dll_template_input_file {
- my($self) = shift;
- return $self->get_info_hash($self->get_language())->{'dll'};
+ return $_[0]->get_info_hash($_[0]->get_language())->{'dll'};
}
sub get_lib_template_input_file {
- my($self) = shift;
- return $self->get_info_hash($self->get_language())->{'lib'};
+ return $_[0]->get_info_hash($_[0]->get_language())->{'lib'};
}
sub get_template {
- my($self) = shift;
- return $self->get_info_hash($self->get_language())->{'template'};
+ return $_[0]->get_info_hash($_[0]->get_language())->{'template'};
}
sub get_cmdsep_symbol {
- #my($self) = shift;
+ #my $self = shift;
return '&amp;';
}