<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <PropertyGroup>
    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
    <!--VS2010 product version-->
    <ProductVersion>9.0.21022</ProductVersion>
    <SchemaVersion>2.0</SchemaVersion>
    <ProjectGuid>{45E4B59A-B7E0-435F-A342-6A67E1B9AA54}</ProjectGuid>
    <OutputType>Library</OutputType>
    <AppDesignerFolder>Properties</AppDesignerFolder>
    <RootNamespace>Ignore</RootNamespace>
    <AssemblyName>Ignore</AssemblyName>
    <TargetFrameworkVersion>v4.2</TargetFrameworkVersion>
    <FileAlignment>512</FileAlignment>
    <!--Identify this as a MicroFramework, CSharp project-->
    <ProjectTypeGuids>{b69e3092-b931-443c-abe7-7e7b65f2a37f};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
    <!--This entry seems to be specific to NET MF projects-->
    <NetMfTargetsBaseDir Condition="'$(NetMfTargetsBaseDir)'==''">$(MSBuildExtensionsPath32)\Microsoft\.NET Micro Framework\</NetMfTargetsBaseDir>
    <!-- Default transport and device-->
    <DeployDevice>Gadgeteer</DeployDevice>
    <DeployTransport>USB</DeployTransport>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
    <DebugSymbols>true</DebugSymbols>
    <DebugType>full</DebugType>
    <Optimize>false</Optimize>
    <OutputPath>bin\Debug\Ignore\</OutputPath>
    <DefineConstants>DEBUG;TRACE</DefineConstants>
    <ErrorReport>prompt</ErrorReport>
    <WarningLevel>4</WarningLevel>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
    <DebugType>pdbonly</DebugType>
    <Optimize>true</Optimize>
    <OutputPath>bin\Release\Ignore\</OutputPath>
    <DefineConstants>TRACE</DefineConstants>
    <ErrorReport>prompt</ErrorReport>
    <WarningLevel>4</WarningLevel>
  </PropertyGroup>
  <PropertyGroup>
    <RunPostBuildEvent>Always</RunPostBuildEvent>
  </PropertyGroup>
  <Import Project="$(NetMfTargetsBaseDir)$(TargetFrameworkVersion)\CSharp.Targets" />
  <ItemGroup>
    <ProjectReference Include="..\MountaineerUsb_41\MountaineerUsb_41.csproj" />
    <ProjectReference Include="..\MountaineerUsb_42\MountaineerUsb_42.csproj" />
  </ItemGroup>
  <ItemGroup>
    <Content Include="GadgeteerHardware.xml">
      <SubType>Designer</SubType>
    </Content>
    <Content Include="Mountaineer.ico" />
    <Content Include="ReadMe.txt" />
  </ItemGroup>
  <ItemGroup>
    <None Include="msm.wxs">
      <SubType>Designer</SubType>
    </None>
    <None Include="en-us.wxl" />
    <None Include="common.wxi">
      <SubType>Designer</SubType>
    </None>
    <None Include="msi.wxs" />
    <None Include="Image.jpg" />
  </ItemGroup>
  <!--Stuff for wix-->
  <PropertyGroup>
    <WixTasksPath Condition=" '$(WixTasksPath)' == '' AND '$(MSBuildExtensionsPath32)' != '' ">$(MSBuildExtensionsPath32)\Microsoft\WiX\v3.x\WixTasks.dll</WixTasksPath>
    <WixTasksPath Condition=" '$(WixTasksPath)' == '' ">$(MSBuildExtensionsPath)\Microsoft\WiX\v3.x\WixTasks.dll</WixTasksPath>
    <WixToolPath Condition=" '$(WixToolPath)' == ''">$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows Installer XML\3.5@InstallRoot)</WixToolPath>
    <WixToolPath Condition=" '$(WixToolPath)' == ''">$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows Installer XML\3.5@InstallRoot)</WixToolPath>
    <WixExtDir Condition=" '$(WixExtDir)' == ''">$(WixToolPath)</WixExtDir>
    <WixIntermediateFolderPath>$(IntermediateOutputPath)\..\Installer</WixIntermediateFolderPath>
    <WixOutputFolderPath>$(OutDir)\..\Installer</WixOutputFolderPath>
    <IsInstallerBuildEnabled Condition="! $(DefineConstants.Contains('DEBUG'))">true</IsInstallerBuildEnabled>
  </PropertyGroup>
  <UsingTask TaskName="Candle" AssemblyFile="$(WixTasksPath)" />
  <UsingTask TaskName="Light" AssemblyFile="$(WixTasksPath)" />
  <!--Build for installer -->
  <Target Name="AfterBuild" Condition="'$(IsInstallerBuildEnabled)' == 'true'">
    <Message Text="Compiling msm" />
    <Candle ToolPath="$(WixToolPath)" DefineConstants="BinPath=$(OutDir);SourcePath=$(ProjectDir);SafeProjectName=MountaineerUsb" SourceFiles="msm.wxs" OutputFile="$(WixIntermediateFolderPath)\msm.wixobj" />
    <Message Text="Linking msm" />
    <Light ToolPath="$(WixToolPath)" LocalizationFiles="en-us.wxl" ObjectFiles="$(WixIntermediateFolderPath)\msm.wixobj" OutputFile="$(WixOutputFolderPath)\MountaineerUsb.msm" />
    <Message Text="Compiling msi" />
    <Candle ToolPath="$(WixToolPath)" DefineConstants="BinPath=$(OutDir);SourcePath=$(ProjectDir);SafeProjectName=MountaineerUsb" SourceFiles="msi.wxs" OutputFile="$(WixIntermediateFolderPath)\msi.wixobj" />
    <Message Text="Linking msi" />
    <Light ToolPath="$(WixToolPath)" LocalizationFiles="en-us.wxl" ObjectFiles="$(WixIntermediateFolderPath)\msi.wixobj" OutputFile="$(WixOutputFolderPath)\MountaineerUsb.msi" />
  </Target>
  <!--Cleanup for installer -->
  <Target Name="AfterClean">
    <Message Text="Cleaning up installer" />
    <ItemGroup>
      <InstallerFiles Include="$(WixIntermediateFolderPath)\*" />
      <InstallerFiles Include="$(WixOutputFolderPath)\*" />
    </ItemGroup>
    <Delete Files="@(InstallerFiles)" />
  </Target>
</Project>