Clarion and MSBuild
When Microsoft released Visual Studio.NET
there were lots of complaints that the only way to build a project was from
within the VS IDE. With the release of
.NET 2.0 this flaw was answered with an XML based build platform. See http://msdn2.microsoft.com/en-us/library/0k6kkbsd
for the full details on MSBuild.
One very useful feature of MSBuild is that
it is extendable. Using the .NET 2.0 and
any .NET compiler (like Clarion.NET) you can write your own add-on that can
then be used in MSBuild scripts.
As part of Clarion 7 we have created an
MSBuild add-on that allows you to use MSBuild to build any Clarion for Windows
project file using any version of Clarion for Windows all the way back to version
1.5.
In the new IDE every time you do a make,
MSBuild is invoked. This gives us some
great new functionality. When you create
a new Project or Application, a Solution is automatically created for you, and
the Application or Project is added to it.
A Solution can contain any number of Applications and/or Projects, and
when you press the Build button everything in the solution is built, so
essentially you get a built-in Batch compiler.
So your mega-DLL application can be built
from one Solution. And since the Build
runs on a separate thread you can keep right on working.
If you’re wondering what the insides of a
project looks like here is a very simple example that will compile MyTest.clw and
main.clw to mainExe.exe using Clarion for Windows 6.0.
<Project
DefaultTargets="Build"
xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<OutputType>Exe</OutputType>
<OutputName>mainExe</OutputName>
<Configuration
Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<ProjectGuid>{C286A968-6581-48EB-A6FC-3DFECFAD8112}</ProjectGuid>
<clarion_version>Clarion
6.0 Enterprise
Edition</clarion_version>
</PropertyGroup>
<PropertyGroup
Condition=" '$(Configuration)' == 'Debug' ">
<vid>Min</vid>
<stack_size>37888</stack_size>
<line_numbers>On</line_numbers>
<DefineConstants>adefine;bdefine,23;cdefine,off</DefineConstants>
<icon>D:\C7\DotNET\IDE\src\Main\StartUp\Clarion.Ico</icon>
</PropertyGroup>
<PropertyGroup
Condition=" '$(Configuration)' == 'Release' ">
</PropertyGroup>
<ItemGroup>
<Include
Include="inc.pi" />
</ItemGroup>
<ItemGroup>
<Library
Include="C%V%DF.LIB" />
</ItemGroup>
<ItemGroup>
<FileDriver
Include="MEMORY" />
</ItemGroup>
<ItemGroup>
<Compile
Include="MyTest.clw">
<VID>full</VID>
<line_num>off</line_num>
<DefineConstants>f,56</DefineConstants>
</Compile>
<Compile
Include="Main.clw" />
</ItemGroup>
<Import
Project="$(MSBuildExtensionsPath)\SoftVelocity\Clarion\7.0\SoftVelocity.CW.targets"
/>
</Project>