Browse Source

Build profiler when using SharpDevelop .bat files.

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/branches/3.0@3859 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
shortcuts
Daniel Grunwald 17 years ago
parent
commit
951e8971a6
  1. 35
      src/AddIns/Misc/Profiler/AutomatedBuild.proj
  2. 5
      src/AddIns/Misc/Profiler/Frontend/AddIn/AddIn.csproj
  3. 12
      src/AddIns/Misc/Profiler/Frontend/AddIn/BuildEvents.proj
  4. 2
      src/clean.bat
  5. 10
      src/debugbuild.bat
  6. 8
      src/releasebuild.bat

35
src/AddIns/Misc/Profiler/AutomatedBuild.proj

@ -5,11 +5,11 @@ @@ -5,11 +5,11 @@
<ProfilerProjectDir>$(MSBuildProjectDirectory)</ProfilerProjectDir>
<ProfilerHookDir>$(ProfilerProjectDir)\Hook</ProfilerHookDir>
<CppBatch32>call "$(PROGRAMFILES)\Microsoft Visual Studio 9.0\VC\bin\vcvars32.bat"</CppBatch32>
<CppBatch32>$(PROGRAMFILES)\Microsoft Visual Studio 9.0\VC\bin\vcvars32.bat</CppBatch32>
<CppBatch64Native>$(PROGRAMFILES)\Microsoft Visual Studio 9.0\VC\bin\vcvars64.bat</CppBatch64Native>
<CppBatch64Cross>$(PROGRAMFILES)\Microsoft Visual Studio 9.0\VC\bin\vcvarsx86_amd64.bat</CppBatch64Cross>
<CppBatch64 Condition="Exists('$(CppBatch64Native)')">call "$(CppBatch64Native)"</CppBatch64>
<CppBatch64 Condition="'$(CppBatch64)'==''">call "$(CppBatch64Cross)"</CppBatch64>
<CppBatch64 Condition="Exists('$(CppBatch64Native)')">$(CppBatch64Native)</CppBatch64>
<CppBatch64 Condition="'$(CppBatch64)'==''">$(CppBatch64Cross)</CppBatch64>
<VcBuildArguments>/showenv "$(ProfilerHookDir)\Hook.vcproj" $(Configuration)</VcBuildArguments>
</PropertyGroup>
@ -19,16 +19,24 @@ @@ -19,16 +19,24 @@
<MSBuildProjects Include="Frontend\Controls\Controls.csproj"/>
<MSBuildProjects Include="Frontend\AddIn\AddIn.csproj"/>
<MSBuildProjects Include="Frontend\Gui\Gui.csproj"/>
<CleanupDirectories Include="bin"/>
</ItemGroup>
<Target Name="Build">
<Error Text="SharpDevelopBinPath not set" Condition="'$(SharpDevelopBinPath)'==''"/>
<MSBuild Projects="@(X64ConverterProject)" Properties="Configuration=$(Configuration);Platform=AnyCPU;SharpDevelopBinPath=$(SharpDevelopBinPath)"/>
<MSBuild Projects="@(X64ConverterProject)" Properties="Configuration=$(Configuration);Platform=AnyCPU"/>
<Exec WorkingDirectory="$(ProfilerHookDir)"
Command="$(CppBatch32) &amp;&amp; vcbuild /platform:Win32 $(VcBuildArguments)"/>
Command='call "$(CppBatch32)" &amp;&amp; vcbuild /platform:Win32 $(VcBuildArguments)'
Condition="Exists('$(CppBatch32)')"/>
<Warning Text="$(CppBatch32) not found, skipped compiling profiler" Condition="!Exists('$(CppBatch32)')"/>
<Exec WorkingDirectory="$(ProfilerHookDir)"
Command="$(CppBatch64) &amp;&amp; vcbuild /platform:x64 $(VcBuildArguments)"/>
<MSBuild Projects="@(MSBuildProjects)" Properties="Configuration=$(Configuration);Platform=AnyCPU;SharpDevelopBinPath=$(SharpDevelopBinPath)"/>
Command='call "$(CppBatch64)" &amp;&amp; vcbuild /platform:x64 $(VcBuildArguments)'
Condition="Exists('$(CppBatch64)')"/>
<Warning Text="$(CppBatch64) not found, skipped compiling 64-bit profiler" Condition="!Exists('$(CppBatch64)')"/>
<!-- compile C# part of profiler -->
<MSBuild Projects="@(MSBuildProjects)" Properties="Configuration=$(Configuration);Platform=AnyCPU" Condition="Exists('$(CppBatch32)')"/>
</Target>
<Target Name="Rebuild">
@ -38,10 +46,13 @@ @@ -38,10 +46,13 @@
<Target Name="Clean">
<Exec WorkingDirectory="$(ProfilerHookDir)"
Command="$(CppBatch32) &amp;&amp; vcbuild /c /platform:Win32 $(VcBuildCommandLine)"/>
Command='call "$(CppBatch32)" &amp;&amp; vcbuild /c /platform:Win32 $(VcBuildCommandLine)'
Condition="Exists('$(CppBatch32)')"/>
<Exec WorkingDirectory="$(ProfilerHookDir)"
Command="$(CppBatch64) &amp;&amp; vcbuild /c /platform:x64 $(VcBuildCommandLine)"/>
<MSBuild Projects="@(MSBuildProjects)" Targets="Clean" Properties="Configuration=$(Configuration);Platform=AnyCPU;SharpDevelopBinPath=$(SharpDevelopBinPath)"/>
<MSBuild Projects="@(X64ConverterProject)" Targets="Clean" Properties="Configuration=$(Configuration);Platform=AnyCPU;SharpDevelopBinPath=$(SharpDevelopBinPath)"/>
Command='call "$(CppBatch64)" &amp;&amp; vcbuild /c /platform:x64 $(VcBuildCommandLine)'
Condition="Exists('$(CppBatch64)')"/>
<MSBuild Projects="@(MSBuildProjects)" Targets="Clean" Properties="Configuration=$(Configuration);Platform=AnyCPU"/>
<MSBuild Projects="@(X64ConverterProject)" Targets="Clean" Properties="Configuration=$(Configuration);Platform=AnyCPU"/>
<RemoveDir Directories="@(CleanupDirectories)" />
</Target>
</Project>

5
src/AddIns/Misc/Profiler/Frontend/AddIn/AddIn.csproj

@ -13,7 +13,7 @@ @@ -13,7 +13,7 @@
<WarningLevel>4</WarningLevel>
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
<RunPostBuildEvent>OnBuildSuccess</RunPostBuildEvent>
<OutputPath>..\..\bin</OutputPath>
<OutputPath>..\..\..\..\..\..\AddIns\AddIns\Misc\Profiler\</OutputPath>
<StartAction>Program</StartAction>
<StartProgram>$(SharpDevelopBinPath)\SharpDevelop.exe</StartProgram>
<StartArguments>/addindir:$(MSBuildProjectDirectory)\$(OutputPath)</StartArguments>
@ -39,7 +39,6 @@ @@ -39,7 +39,6 @@
<PlatformTarget>AnyCPU</PlatformTarget>
<FileAlignment>4096</FileAlignment>
</PropertyGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.Targets" />
<ItemGroup>
<Reference Include="ICSharpCode.Core">
<HintPath>..\..\..\..\..\..\bin\ICSharpCode.Core.dll</HintPath>
@ -137,4 +136,6 @@ @@ -137,4 +136,6 @@
<Name>Controls</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.Targets" />
<Import Project="BuildEvents.proj" />
</Project>

12
src/AddIns/Misc/Profiler/Frontend/AddIn/BuildEvents.proj

@ -0,0 +1,12 @@ @@ -0,0 +1,12 @@
<?xml version="1.0"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTarget="Build">
<PropertyGroup>
<PrepareForRunDependsOn>$(PrepareForRunDependsOn);MyPostBuildTarget</PrepareForRunDependsOn>
</PropertyGroup>
<ItemGroup>
<CopyHook Include="..\..\bin\Hook*" />
</ItemGroup>
<Target Name="MyPostBuildTarget">
<Copy SourceFiles="@(CopyHook)" DestinationFolder="$(OutputPath)" />
</Target>
</Project>

2
src/clean.bat

@ -1,2 +1,4 @@ @@ -1,2 +1,4 @@
%windir%\microsoft.net\framework\v3.5\msbuild /t:clean SharpDevelop.sln "/p:BooBinPath=%CD%\AddIns\BackendBindings\Boo\RequiredLibraries" "/p:FSharpBuildTasksPath=%CD%\AddIns\BackendBindings\FSharp\RequiredLibraries"
@IF %ERRORLEVEL% NEQ 0 PAUSE
%windir%\microsoft.net\framework\v3.5\msbuild /t:clean AddIns\Misc\Profiler\AutomatedBuild.proj
@IF %ERRORLEVEL% NEQ 0 PAUSE

10
src/debugbuild.bat

@ -1,2 +1,8 @@ @@ -1,2 +1,8 @@
%windir%\microsoft.net\framework\v3.5\msbuild SharpDevelop.sln "/p:BooBinPath=%CD%\AddIns\BackendBindings\Boo\RequiredLibraries" "/p:FSharpBuildTasksPath=%CD%\AddIns\BackendBindings\FSharp\RequiredLibraries"
@IF %ERRORLEVEL% NEQ 0 PAUSE
%windir%\microsoft.net\framework\v3.5\msbuild SharpDevelop.sln /p:Configuration=Debug "/p:BooBinPath=%CD%\AddIns\BackendBindings\Boo\RequiredLibraries" "/p:FSharpBuildTasksPath=%CD%\AddIns\BackendBindings\FSharp\RequiredLibraries"
@IF %ERRORLEVEL% NEQ 0 GOTO err
%windir%\microsoft.net\framework\v3.5\msbuild AddIns\Misc\Profiler\AutomatedBuild.proj /p:Configuration=Debug
@IF %ERRORLEVEL% NEQ 0 GOTO err
@exit /B 0
:err
@PAUSE
@exit /B 1

8
src/releasebuild.bat

@ -1,2 +1,8 @@ @@ -1,2 +1,8 @@
%windir%\microsoft.net\framework\v3.5\msbuild /property:Configuration=Release SharpDevelop.sln "/p:BooBinPath=%CD%\AddIns\BackendBindings\Boo\RequiredLibraries" "/p:FSharpBuildTasksPath=%CD%\AddIns\BackendBindings\FSharp\RequiredLibraries"
@IF %ERRORLEVEL% NEQ 0 PAUSE
@IF %ERRORLEVEL% NEQ 0 GOTO err
%windir%\microsoft.net\framework\v3.5\msbuild AddIns\Misc\Profiler\AutomatedBuild.proj /p:Configuration=Release
@IF %ERRORLEVEL% NEQ 0 GOTO err
@exit /B 0
:err
@PAUSE
@exit /B 1
Loading…
Cancel
Save