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,
55 # '<!-- MPC Command -->', $crlf,
56 # '<!-- ', $self->create_command_line_string($0, @ARGV), ' -->',
63 my $crlf = $self->crlf();
64 my $project_info = $self->get_project_info();
65 my @projects = $self->sort_dependencies($self->get_projects(), 0);
67 ## Print GUID and personality information
68 print $fh ' <PropertyGroup>', $crlf,
69 ' <ProjectGuid>{1946f85e-487f-46b6-8e41-159cd446db35}</ProjectGuid>', $crlf,
70 ' </PropertyGroup>', $crlf,
71 ' <ItemGroup />', $crlf,
72 ' <ItemGroup />', $crlf,
73 ' <ProjectExtensions>', $crlf,
74 ' <Borland.Personality>Default.Personality</Borland.Personality>', $crlf,
75 ' <Borland.ProjectType />', $crlf,
76 ' <BorlandProject>', $crlf,
77 ' <BorlandProject xmlns=""> <Default.Personality> </Default.Personality> </BorlandProject></BorlandProject>', $crlf,
78 ' </ProjectExtensions>', $crlf;
80 ## Print the project targets
81 foreach my $project (@projects) {
82 my $name = $$project_info{$project}->[ProjectCreator
::PROJECT_NAME
];
83 print $fh ' <Target Name="', $name, '">', $crlf,
84 ' <MSBuild Projects="', $self->mpc_basename($project), '" Targets="" />', $crlf,
86 ' <Target Name="', $name, ':Make">', $crlf,
87 ' <MSBuild Projects="', $self->mpc_basename($project), '" Targets="Make" />', $crlf,
89 ' <Target Name="', $name, ':Clean">', $crlf,
90 ' <MSBuild Projects="', $self->mpc_basename($project), '" Targets="Clean" />', $crlf,
94 ## Print the target build order
95 print $fh ' <Target Name="Build">', $crlf,
96 ' <CallTarget Targets="';
97 foreach my $project (@projects) {
98 print $fh $$project_info{$project}->[ProjectCreator
::PROJECT_NAME
], ';';
101 ## Print the target make order
102 print $fh '" />', $crlf,
104 ' <Target Name="Make">', $crlf,
105 ' <CallTarget Targets="';
106 foreach my $project (@projects) {
107 print $fh $$project_info{$project}->[ProjectCreator
::PROJECT_NAME
],
111 ## Print the target clean order
112 print $fh '" />', $crlf,
114 ' <Target Name="Clean">', $crlf,
115 ' <CallTarget Targets="';
116 foreach my $project (@projects) {
117 print $fh $$project_info{$project}->[ProjectCreator
::PROJECT_NAME
],
120 print $fh '" />', $crlf,