Avoid all custom tasks, since this causes build issues in Visual Studio (Build.Tasks.dll gets loaded into the main AppDomain and remains locked, meaning you have to exit Visual Studio before rebuilding the project).

This commit is contained in:
the_fiddler 2010-10-06 14:14:15 +00:00
parent 61b4f2686e
commit fb9b355bcd
2 changed files with 28 additions and 22 deletions

View file

@ -14,7 +14,6 @@
<PlatformTarget>AnyCPU</PlatformTarget>
<CodeAnalysisIgnoreBuiltInRules>false</CodeAnalysisIgnoreBuiltInRules>
</PropertyGroup>
<Import Project="..\..\Source\Build.Tasks\Common.xml" />
<PropertyGroup>
<ProjectGuid>{ADC34399-7613-44D2-90B2-19250F06FE7A}</ProjectGuid>
<TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
@ -24,19 +23,17 @@
<None Include="opentk.nsi" />
</ItemGroup>
<Target Name="Build">
<DateStamp>
<Output TaskParameter="Date" PropertyName="ShortDate" />
</DateStamp>
<Run Command="makensis opentk.nsi" />
<Copy SourceFiles=".\opentk.exe" DestinationFiles="..\..\opentk-1.0.$(ShortDate).exe" />
<Exec Command="makensis opentk.nsi" />
<ReadLinesFromFile File="../../Version.txt">
<Output TaskParameter="Lines" ItemName="Version"/>
</ReadLinesFromFile>
<Copy SourceFiles=".\opentk.exe" DestinationFiles="@(Version->'../../opentk-%(Identity).exe')" />
</Target>
<Target Name="Clean">
<ItemGroup Condition="'$(OS)' == 'Windows_NT'">
<FilesToDelete Include=".\opentk.exe;..\..\opentk-1.0.*.exe" />
</ItemGroup>
<Delete Files="@(FilesToDelete)" Condition="'$(OS)' == 'Windows_NT'" />
<Exec Command="rm -f .\opentk.exe" Condition="'$(OS)' != 'Windows_NT'" />
<Exec Command="rm -f ..\..\opentk-1.0.*.exe" Condition="'$(OS)' != 'Windows_NT'" />
<CreateItem Include=".\opentk.exe;..\..\opentk-*.exe">
<Output TaskParameter="Include" ItemName="FilesToDelete" />
</CreateItem>
<Delete Files="@(FilesToDelete)" />
</Target>
<Target Name="Rebuild">
<CallTarget Targets="Clean" />

View file

@ -12,7 +12,6 @@
<PropertyGroup Condition="'$(Configuration)' == 'Nsis'">
<OutputPath>.\opentk\</OutputPath>
</PropertyGroup>
<Import Project="..\..\Source\Build.Tasks\Common.xml" />
<PropertyGroup>
<ProjectGuid>{ADC34399-7613-44D2-90B2-19250F06FE7B}</ProjectGuid>
<TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
@ -20,8 +19,9 @@
<InputPath>..\..\</InputPath>
<OutputPath>.\opentk\</OutputPath>
</PropertyGroup>
<Target Name="Build">
<DelTree Path="$(OutputPath)" />
<Target Name="Build1">
<CallTarget Targets="CleanTreeCopy" />
<!-- Make a clean copy of the source tree -->
<CreateItem
Include="$(InputPath)**\*.*"
Exclude="$(InputPath)**\.svn\**\*.*;
@ -32,27 +32,36 @@
$(InputPath)**\*.suo;
$(InputPath)**\*.pidb;
$(InputPath)**\*.userprefs;
$(InputPath)**\opentk*.zip;
$(InputPath)**\opentk-*.zip;
$(InputPath)**\opentk-*.exe;
$(InputPath)**\vshost*.exe;
">
<Output TaskParameter="Include" ItemName="FileList" />
</CreateItem>
<DateStamp>
<Output TaskParameter="Date" PropertyName="ShortDate" />
</DateStamp>
<Copy SourceFiles="@(FileList)" DestinationFiles="@(FileList->'$(OutputPath)%(RecursiveDir)%(Filename)%(Extension)')" />
<!-- Zip the copy of the source tree -->
<Run Command="7z a -tzip opentk.zip $(OutputPath)" />
<Copy SourceFiles=".\opentk.zip" DestinationFiles="..\..\opentk-1.0.$(ShortDate).zip" />
</Target>
<Target Name="Build">
<!-- Copy the zip file to the root directory and add a date stamp -->
<ReadLinesFromFile File="../../Version.txt">
<Output TaskParameter="Lines" ItemName="Version"/>
</ReadLinesFromFile>
<Copy SourceFiles=".\opentk.zip" DestinationFiles="@(Version->'..\..\opentk-%(Identity).zip')" />
</Target>
<Target Name="Clean">
<CreateItem Include=".\opentk.zip;..\..\opentk-1.0.*.zip">
<CreateItem Include=".\opentk.zip;..\..\opentk-*.zip">
<Output TaskParameter="Include" ItemName="FilesToDelete" />
</CreateItem>
<Delete Files="@(FilesToDelete)" />
<DelTree Path="$(OutputPath)" />
<CallTarget Targets="CleanTreeCopy" />
</Target>
<Target Name="Rebuild">
<CallTarget Targets="Clean" />
<CallTarget Targets="Build" />
</Target>
<Target Name="CleanTreeCopy">
<RemoveDir Directories="$(OutputPath)" Condition="$(OS) == 'Windows_NT'" />
<Exec Command="rm -rf '$(OutputPath)'" Condition="$(OS) != 'Windows_NT'" />
</Target>
</Project>