1 package BCB2007WorkspaceCreator
;
3 # ************************************************************
4 # Description : A BCB2007 Workspace Creator
5 # Author : Johnny Willemsen
6 # Create Date : 14/12/2005
7 # ************************************************************
9 # ************************************************************
11 # ************************************************************
15 use BCB2007ProjectCreator
;
16 use BorlandPropertyBase
;
21 @ISA = qw(BorlandPropertyBase WinWorkspaceBase WorkspaceCreator);
23 # ************************************************************
25 # ************************************************************
39 sub workspace_file_extension
{
47 my $crlf = $self->crlf();
49 ## This identifies it as a Borland C++Builder 2007 file
50 print $fh '<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">', $crlf;
52 ## Optionally print the workspace comment
53 # $self->print_workspace_comment($fh,
54 # '<!-- MPC Command -->', $crlf,
55 # '<!-- ', $self->create_command_line_string($0, @ARGV), ' -->',
62 my $crlf = $self->crlf();
63 my $project_info = $self->get_project_info();
64 my @projects = $self->sort_dependencies($self->get_projects(), 0);
66 ## Print GUID and personality information
67 print $fh ' <PropertyGroup>', $crlf,
68 ' <ProjectGuid>{1946f85e-487f-46b6-8e41-159cd446db35}</ProjectGuid>', $crlf,
69 ' </PropertyGroup>', $crlf,
70 ' <ItemGroup />', $crlf,
71 ' <ItemGroup />', $crlf,
72 ' <ProjectExtensions>', $crlf,
73 ' <Borland.Personality>Default.Personality</Borland.Personality>', $crlf,
74 ' <Borland.ProjectType />', $crlf,
75 ' <BorlandProject>', $crlf,
76 ' <BorlandProject xmlns=""> <Default.Personality> </Default.Personality> </BorlandProject></BorlandProject>', $crlf,
77 ' </ProjectExtensions>', $crlf;
79 ## Print the project targets
80 foreach my $project (@projects) {
81 my $name = $$project_info{$project}->[ProjectCreator
::PROJECT_NAME
];
82 print $fh ' <Target Name="', $name, '">', $crlf,
83 ' <MSBuild Projects="', $self->mpc_basename($project), '" Targets="" />', $crlf,
85 ' <Target Name="', $name, ':Make">', $crlf,
86 ' <MSBuild Projects="', $self->mpc_basename($project), '" Targets="Make" />', $crlf,
88 ' <Target Name="', $name, ':Clean">', $crlf,
89 ' <MSBuild Projects="', $self->mpc_basename($project), '" Targets="Clean" />', $crlf,
93 ## Print the target build order
94 print $fh ' <Target Name="Build">', $crlf,
95 ' <CallTarget Targets="';
96 foreach my $project (@projects) {
97 print $fh $$project_info{$project}->[ProjectCreator
::PROJECT_NAME
], ';';
100 ## Print the target make order
101 print $fh '" />', $crlf,
103 ' <Target Name="Make">', $crlf,
104 ' <CallTarget Targets="';
105 foreach my $project (@projects) {
106 print $fh $$project_info{$project}->[ProjectCreator
::PROJECT_NAME
],
110 ## Print the target clean order
111 print $fh '" />', $crlf,
113 ' <Target Name="Clean">', $crlf,
114 ' <CallTarget Targets="';
115 foreach my $project (@projects) {
116 print $fh $$project_info{$project}->[ProjectCreator
::PROJECT_NAME
],
119 print $fh '" />', $crlf,