1 package VC10ProjectCreator
;
3 # ************************************************************
4 # Description : A VC10 Project Creator
5 # Author : Johnny Willemsen
6 # Create Date : 11/10/2008
7 # ************************************************************
9 # ************************************************************
11 # ************************************************************
15 use VC9ProjectCreator
;
18 @ISA = qw(VC9ProjectCreator);
20 # ************************************************************
22 # ************************************************************
24 ## NOTE: We call the constant as a function to support Perl 5.6.
25 my %info = (Creator
::cplusplus
() => {'ext' => '.vcxproj',
26 'dllexe' => 'vc10exe',
27 'libexe' => 'vc10libexe',
30 'template' => [ 'vc10', 'vc10filters' ],
34 my %config = ('vcversion' => '10.00',
35 'prversion' => '10.0.30319.1',
36 'toolsversion' => '4.0',
37 'targetframeworkversion' => '4.0',
41 # ************************************************************
43 # ************************************************************
48 ## If we have the setting in our information map, the use it.
49 return $info{$key} if (defined $info{$key});
51 ## Otherwise, see if our parent type can take care of it.
52 return $self->SUPER::get_info_hash
($key);
55 sub get_configurable
{
56 my($self, $name) = @_;
57 return $config{$name};
60 ## Because VC10 puts file filters in a different file
61 ## that starts with the project file name, and ends
62 ## with .filters extension. So we need to return two
66 my $templates = $self->SUPER::get_template
();
68 return (UNIVERSAL
::isa
($templates, 'ARRAY') ? @
$templates : $templates);
72 my($self, $template) = @_;
73 my $templates = $self->SUPER::get_template
();
75 if (UNIVERSAL
::isa
($templates, 'ARRAY')) {
76 return ($template eq $$templates[0]);
82 ## If the template is one of the additional templates,
83 ## we need to append the proper extension to the file name.
84 sub project_file_name
{
85 my($self, $name, $template) = @_;
87 my $project_file_name = $self->SUPER::project_file_name
($name, $template);
88 if (!$self->file_visible($template)) {
89 $project_file_name .= '.filters';
92 return $project_file_name;
95 sub pre_write_output_file
{
96 my($self, $webapp) = @_;
97 return $self->combine_custom_types();