Wed Oct 20 09:18:05 UTC 2010 Johnny Willemsen <jwillemsen@remedy.nl>
[MPC.git] / modules / BDS4WorkspaceCreator.pm
blobc0c10f7b1508c2e819ce1e6b0931f2154b077338
1 package BDS4WorkspaceCreator;
3 # ************************************************************
4 # Description : A BDS 4 Workspace Creator
5 # Author : Johnny Willemsen
6 # Create Date : 14/12/2005
7 # ************************************************************
9 # ************************************************************
10 # Pragmas
11 # ************************************************************
13 use strict;
15 use BDS4ProjectCreator;
16 use WinWorkspaceBase;
17 use WorkspaceCreator;
18 use BorlandPropertyBase;
20 use vars qw(@ISA);
21 @ISA = qw(BorlandPropertyBase WinWorkspaceBase WorkspaceCreator);
23 # ************************************************************
24 # Subroutine Section
25 # ************************************************************
27 sub crlf {
28 #my $self = shift;
29 return "\n";
33 sub compare_output {
34 #my $self = shift;
35 return 1;
39 sub workspace_file_extension {
40 #my $self = shift;
41 return '.bdsgroup';
45 sub pre_workspace {
46 my($self, $fh) = @_;
47 my $crlf = $self->crlf();
49 ## This identifies it as a Borland Developer Studio 2006 file
50 print $fh '<?xml version="1.0" encoding="utf-8"?>', $crlf;
52 ## Optionally print the workspace comment
53 $self->print_workspace_comment($fh,
54 '<!-- $Id$ -->', $crlf,
55 '<!-- MPC Command -->', $crlf,
56 '<!-- ', $self->create_command_line_string($0, @ARGV), ' -->',
57 $crlf);
61 sub write_comps {
62 my($self, $fh) = @_;
63 my $crlf = $self->crlf();
65 ## Print out the guid and the personality information
66 print $fh '<BorlandProject>', $crlf,
67 ' <PersonalityInfo>', $crlf,
68 ' <Option>', $crlf,
69 ' <Option Name="Personality">Default.Personality</Option>', $crlf,
70 ' <Option Name="ProjectType"></Option>', $crlf,
71 ' <Option Name="Version">1.0</Option>', $crlf,
72 ' <Option Name="GUID">{93D77FAD-C603-4FB1-95AB-34E0B6FBF615}</Option>', $crlf,
73 ' </Option>', $crlf,
74 ' </PersonalityInfo>', $crlf,
75 ' <Default.Personality>', $crlf,
76 ' <Projects>', $crlf;
78 ## Print out the projects in the correct build order
79 foreach my $project ($self->sort_dependencies($self->get_projects(), 0)) {
80 print $fh ' <Projects Name="$project">$project</Projects>', $crlf;
83 print $fh ' </Projects>', $crlf,
84 ' <Dependencies/>', $crlf,
85 ' </Default.Personality>', $crlf,
86 '</BorlandProject>', $crlf;