<Project Sdk="WixToolset.Sdk/5.0.2">

  <PropertyGroup>
    <OutputType>Package</OutputType>
    <OutputName>TeamsISO-Setup-$(Version)</OutputName>

    <!-- 64-bit MSI; suppresses ICE80 on components in Program Files (x64). -->
    <Platform>x64</Platform>
    <InstallerPlatform>x64</InstallerPlatform>

    <!--
      Built artifact location. The installer expects a published build of
      TeamsISO.App rooted here. CI / local script:
        dotnet publish src/TeamsISO.App/TeamsISO.App.csproj
            -c Release -r win-x64 (with self contained false)
            -o $(SolutionDir)publish/TeamsISO
    -->
    <PublishDir>$(MSBuildThisFileDirectory)..\publish\TeamsISO\</PublishDir>

    <!-- Pass MSBuild values into WiX preprocessor. -->
    <DefineConstants>PublishDir=$(PublishDir);AssetsDir=$(MSBuildThisFileDirectory)..\src\TeamsISO.App\Assets\</DefineConstants>

    <!-- Code-signing hook (set externally for release builds; left empty for dev). -->
    <SignOutput Condition=" '$(SignOutput)' == '' ">false</SignOutput>
  </PropertyGroup>

  <!--
    Reference the WiX UI extension so the MSI shows a friendly progress UI
    instead of the silent default.
  -->
  <ItemGroup>
    <PackageReference Include="WixToolset.UI.wixext" Version="5.0.2" />
  </ItemGroup>

</Project>
