218 |
bj |
1 |
package BDSWorkspaceCreator;
|
|
|
2 |
|
|
|
3 |
# ************************************************************
|
|
|
4 |
# Description : A BDS Workspace Creator
|
|
|
5 |
# Author : Johnny Willemsen
|
|
|
6 |
# Create Date : 14/12/2005
|
|
|
7 |
# ************************************************************
|
|
|
8 |
|
|
|
9 |
# ************************************************************
|
|
|
10 |
# Pragmas
|
|
|
11 |
# ************************************************************
|
|
|
12 |
|
|
|
13 |
use strict;
|
|
|
14 |
|
|
|
15 |
use BDSProjectCreator;
|
|
|
16 |
use WorkspaceCreator;
|
|
|
17 |
|
|
|
18 |
use vars qw(@ISA);
|
|
|
19 |
@ISA = qw(WorkspaceCreator);
|
|
|
20 |
|
|
|
21 |
# ************************************************************
|
|
|
22 |
# Subroutine Section
|
|
|
23 |
# ************************************************************
|
|
|
24 |
|
|
|
25 |
|
|
|
26 |
sub compare_output {
|
|
|
27 |
#my($self) = shift;
|
|
|
28 |
return 1;
|
|
|
29 |
}
|
|
|
30 |
|
|
|
31 |
|
|
|
32 |
sub workspace_file_name {
|
|
|
33 |
my($self) = shift;
|
|
|
34 |
return $self->get_modified_workspace_name($self->get_workspace_name(),
|
|
|
35 |
'.bdsgroup');
|
|
|
36 |
}
|
|
|
37 |
|
|
|
38 |
|
|
|
39 |
sub pre_workspace {
|
|
|
40 |
my($self) = shift;
|
|
|
41 |
my($fh) = shift;
|
|
|
42 |
my($crlf) = $self->crlf();
|
|
|
43 |
|
|
|
44 |
print $fh '<?xml version="1.0" encoding="utf-8"?>', $crlf,
|
|
|
45 |
'<!-- $Id: BDSWorkspaceCreator.pm,v 1.2 2006/01/30 18:08:44 elliott_c Exp $ -->', $crlf,
|
|
|
46 |
'<!-- MPC Command -->', $crlf,
|
|
|
47 |
"<!-- $0 @ARGV -->", $crlf;
|
|
|
48 |
}
|
|
|
49 |
|
|
|
50 |
|
|
|
51 |
sub write_comps {
|
|
|
52 |
my($self) = shift;
|
|
|
53 |
my($fh) = shift;
|
|
|
54 |
my($crlf) = $self->crlf();
|
|
|
55 |
|
|
|
56 |
print $fh '<BorlandProject>', $crlf;
|
|
|
57 |
print $fh ' <PersonalityInfo>', $crlf;
|
|
|
58 |
print $fh ' <Option>', $crlf;
|
|
|
59 |
print $fh ' <Option Name="Personality">Default.Personality</Option>', $crlf;
|
|
|
60 |
print $fh ' <Option Name="ProjectType"></Option>', $crlf;
|
|
|
61 |
print $fh ' <Option Name="Version">1.0</Option>', $crlf;
|
|
|
62 |
print $fh ' <Option Name="GUID">{93D77FAD-C603-4FB1-95AB-34E0B6FBF615}</Option>', $crlf;
|
|
|
63 |
print $fh ' </Option>', $crlf;
|
|
|
64 |
print $fh ' </PersonalityInfo>', $crlf;
|
|
|
65 |
print $fh '<Default.Personality>', $crlf;
|
|
|
66 |
print $fh ' ', $crlf;
|
|
|
67 |
print $fh ' <Projects>', $crlf;
|
|
|
68 |
|
|
|
69 |
foreach my $project ($self->sort_dependencies($self->get_projects(), 0)) {
|
|
|
70 |
print $fh ' <Projects Name="$project">$project</Projects>', $crlf,
|
|
|
71 |
}
|
|
|
72 |
|
|
|
73 |
print $fh ' </Projects>', $crlf;
|
|
|
74 |
print $fh ' <Dependencies/>', $crlf;
|
|
|
75 |
print $fh ' </Default.Personality>', $crlf;
|
|
|
76 |
}
|
|
|
77 |
|
|
|
78 |
|
|
|
79 |
1;
|