Subversion Repositories gelsvn

Rev

Rev 68 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 68 Rev 71
Line 55... Line 55...
55
  my($fh)   = shift;
55
  my($fh)   = shift;
56
  my($crlf) = $self->crlf();
56
  my($crlf) = $self->crlf();
57
 
57
 
58
  print $fh 'Microsoft Visual Studio Solution File, Format Version 7.00', $crlf,
58
  print $fh 'Microsoft Visual Studio Solution File, Format Version 7.00', $crlf,
59
            '#', $crlf,
59
            '#', $crlf,
60
            '# $Id: VC7WorkspaceCreator.pm 68 2005-08-24 13:26:10Z bj $', $crlf,
60
            '# $Id: VC7WorkspaceCreator.pm 71 2005-08-25 08:41:49Z bj $', $crlf,
61
            '#', $crlf,
61
            '#', $crlf,
62
            '# This file was generated by MPC.  Any changes made directly to', $crlf,
62
            '# This file was generated by MPC.  Any changes made directly to', $crlf,
63
            '# this file will be lost the next time it is generated.', $crlf,
63
            '# this file will be lost the next time it is generated.', $crlf,
64
            '#', $crlf,
64
            '#', $crlf,
65
            '# MPC Command:', $crlf,
65
            '# MPC Command:', $crlf,
Line 161... Line 161...
161
        ($language eq 'csharp' || $language eq 'vb')) {
161
        ($language eq 'csharp' || $language eq 'vb')) {
162
      $self->add_references($project, $vc7guid, $deps, \%name_to_guid_map);
162
      $self->add_references($project, $vc7guid, $deps, \%name_to_guid_map);
163
    }
163
    }
164
  }
164
  }
165
 
165
 
166
  ## Project Configurations
166
  print $fh "Global$crlf",
167
  print $fh "Global$crlf" .
167
            "\tGlobalSection(",
168
            "\tGlobalSection(SolutionConfiguration) = preSolution$crlf";
168
            $self->get_solution_config_section_name(),
-
 
169
            ") = preSolution$crlf";
169
 
170
 
170
  my(%configs) = ();
171
  my(%configs) = ();
171
  foreach my $project (@list) {
172
  foreach my $project (@list) {
172
    my($name, $deps, $pguid, @cfgs) = @{$$pjs{$project}};
173
    my($name, $deps, $pguid, @cfgs) = @{$$pjs{$project}};
173
    foreach my $cfg (@cfgs) {
174
    foreach my $cfg (@cfgs) {
174
      $cfg =~ s/\|.*//;
175
      $cfg = $self->get_short_config_name($cfg);
175
      $configs{$cfg} = 1;
176
      $configs{$cfg} = 1;
176
    }
177
    }
177
  }
178
  }
178
  $self->print_configs($fh, \%configs);
179
  $self->print_configs($fh, \%configs);
179
  print $fh "\tEndGlobalSection$crlf";
180
  print $fh "\tEndGlobalSection$crlf";
180
 
181
 
181
  ## Print dependencies if there are any
182
  ## Print dependencies if there are any
182
  $self->print_dependencies($fh, $gen, \@list, $pjs);
183
  $self->print_dependencies($fh, $gen, \@list, $pjs);
183
 
184
 
184
  ## Project Configuration Names
185
  ## Project Configuration Names
185
  print $fh "\tGlobalSection(ProjectConfiguration) = postSolution$crlf";
186
  print $fh "\tGlobalSection(",
-
 
187
            $self->get_project_config_section_name(),
-
 
188
            ") = postSolution$crlf";
-
 
189
 
186
  foreach my $project (@list) {
190
  foreach my $project (@list) {
187
    my($name, $deps, $pguid, @cfgs) = @{$$pjs{$project}};
191
    my($name, $deps, $pguid, @cfgs) = @{$$pjs{$project}};
188
    foreach my $cfg (sort @cfgs) {
192
    foreach my $cfg (sort @cfgs) {
189
      my($c) = $cfg;
193
      my($c) = $self->get_short_config_name($cfg);
190
      $c =~ s/\|.*//;
-
 
191
      print $fh "\t\t{$pguid}.$c.ActiveCfg = $cfg$crlf" .
194
      print $fh "\t\t{$pguid}.$c.ActiveCfg = $cfg$crlf" .
192
                "\t\t{$pguid}.$c.Build.0 = $cfg$crlf";
195
                "\t\t{$pguid}.$c.Build.0 = $cfg$crlf";
193
    }
196
    }
194
  }
197
  }
195
  print $fh "\tEndGlobalSection$crlf" .
198
  print $fh "\tEndGlobalSection$crlf";
-
 
199
 
-
 
200
  $self->print_additional_sections($fh);
-
 
201
 
-
 
202
  print $fh "EndGlobal$crlf";
-
 
203
}
-
 
204
 
-
 
205
 
-
 
206
sub get_short_config_name {
-
 
207
  my($self) = shift;
-
 
208
  my($cfg)  = shift;
-
 
209
  $cfg =~ s/\|.*//;
-
 
210
  return $cfg;
-
 
211
}
-
 
212
 
-
 
213
 
-
 
214
sub get_solution_config_section_name {
-
 
215
  #my($self) = shift;
-
 
216
  return 'SolutionConfiguration';
-
 
217
}
-
 
218
 
-
 
219
 
-
 
220
sub get_project_config_section_name {
-
 
221
  #my($self) = shift;
-
 
222
  return 'ProjectConfiguration';
-
 
223
}
-
 
224
 
-
 
225
 
-
 
226
sub print_additional_sections {
-
 
227
  my($self) = shift;
-
 
228
  my($fh)   = shift;
-
 
229
  my($crlf) = $self->crlf();
-
 
230
 
196
            "\tGlobalSection(ExtensibilityGlobals) = postSolution$crlf" .
231
  print $fh "\tGlobalSection(ExtensibilityGlobals) = postSolution$crlf",
197
            "\tEndGlobalSection$crlf" .
232
            "\tEndGlobalSection$crlf",
198
            "\tGlobalSection(ExtensibilityAddIns) = postSolution$crlf" .
233
            "\tGlobalSection(ExtensibilityAddIns) = postSolution$crlf",
199
            "\tEndGlobalSection$crlf" .
234
            "\tEndGlobalSection$crlf";
200
            "EndGlobal$crlf";
-
 
201
}
235
}
202
 
236
 
203
 
237
 
204
sub add_references {
238
sub add_references {
205
  my($self)   = shift;
239
  my($self)   = shift;