Skip to content

Commit

Permalink
[Setups] Include the server in the setups
Browse files Browse the repository at this point in the history
  • Loading branch information
Wolfteam committed Jun 26, 2021
1 parent 75037ae commit 39b9488
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 11 deletions.
14 changes: 7 additions & 7 deletions CastIt.Cli.Setup/CastIt.Cli.Setup.wixproj
Original file line number Diff line number Diff line change
Expand Up @@ -58,32 +58,32 @@
Other similar extension points exist, see Wix.targets.
-->
<PropertyGroup>
<DefineConstants>$(DefineConstants);CliBasePath=Source</DefineConstants>
<DefineConstants>$(DefineConstants);CliBasePath=Publish</DefineConstants>
</PropertyGroup>
<PropertyGroup>
<DefineConstants>$(DefineConstants);InstallerVersion=$(InstallerVersion)</DefineConstants>
</PropertyGroup>
<Target Name="BeforeBuild">
<!--First we clean delete the bin directories-->
<Exec Command="if exist Source rd /s /q Source">
<Exec Command="if exist Publish rd /s /q Publish">
</Exec>
<Exec Command="rd /s /q ..\CastIt.Cli\bin\">
</Exec>
<Exec Command="rd /s /q ..\CastIt.Server\bin\">
</Exec>
<!--Then, we publish our apps-->
<!--First the cli-->
<Exec Condition="$(Configuration) != 'Debug'" Command="dotnet publish ../CastIt.Cli/CastIt.Cli.csproj -c $(Configuration) -r win-$(Platform) -p:PublishSingleFile=true -p:PublishTrimmed=true -o Source">
<Exec Condition="$(Configuration) != 'Debug'" Command="dotnet publish ../CastIt.Cli/CastIt.Cli.csproj -c $(Configuration) -r win-$(Platform) -p:PublishSingleFile=true -p:PublishTrimmed=true -o Publish">
</Exec>
<Exec Condition="$(Configuration) == 'Debug'" Command="dotnet publish ../CastIt.Cli/CastIt.Cli.csproj -c $(Configuration) -r win-$(Platform) -p:PublishSingleFile=true -o Source">
<Exec Condition="$(Configuration) == 'Debug'" Command="dotnet publish ../CastIt.Cli/CastIt.Cli.csproj -c $(Configuration) -r win-$(Platform) -p:PublishSingleFile=true -o Publish">
</Exec>
<!--Then the server-->
<Exec Condition="$(Configuration) != 'Debug'" Command="dotnet publish ../CastIt.Server/CastIt.Server.csproj -c $(Configuration) -r win-$(Platform) -p:PublishSingleFile=true -p:PublishTrimmed=true -o Source\Server">
<Exec Condition="$(Configuration) != 'Debug'" Command="dotnet publish ../CastIt.Server/CastIt.Server.csproj -c $(Configuration) -r win-$(Platform) -p:PublishSingleFile=true -p:PublishTrimmed=true -o Publish\Server">
</Exec>
<Exec Condition="$(Configuration) == 'Debug'" Command="dotnet publish ../CastIt.Server/CastIt.Server.csproj -c $(Configuration) -r win-$(Platform) -p:PublishSingleFile=true -o Source\Server">
<Exec Condition="$(Configuration) == 'Debug'" Command="dotnet publish ../CastIt.Server/CastIt.Server.csproj -c $(Configuration) -r win-$(Platform) -p:PublishSingleFile=true -o Publish\Server">
</Exec>
<!--Finally we pick up all the files that we want to publish, and create an autogenerated component-->
<HeatDirectory OutputFile="CliAutoGeneratedComponents.wxs" DirectoryRefId="CliInstallFolder" ComponentGroupName="CliAutoGeneratedComponentsGroup" SuppressCom="true" Directory="Source" SuppressFragments="true" SuppressRegistry="true" SuppressRootDirectory="true" AutogenerateGuids="false" GenerateGuidsNow="true" ToolPath="$(WixToolPath)" PreprocessorVariable="var.CliBasePath" />
<HeatDirectory OutputFile="CliAutoGeneratedComponents.wxs" DirectoryRefId="CliInstallFolder" ComponentGroupName="CliAutoGeneratedComponentsGroup" SuppressCom="true" Directory="Publish" SuppressFragments="true" SuppressRegistry="true" SuppressRootDirectory="true" AutogenerateGuids="false" GenerateGuidsNow="true" ToolPath="$(WixToolPath)" PreprocessorVariable="var.CliBasePath" />
</Target>
<Target Name="AfterBuild">
<Exec Command="if not exist Installers mkdir Installers" />
Expand Down
18 changes: 14 additions & 4 deletions CastIt.Setup/CastIt.Setup.wixproj
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,22 @@
-->
<Target Name="BeforeBuild">
<!--First we clean delete the bin directories-->
<Exec Command="if exist Publish rd /s /q Publish">
</Exec>
<Exec Command="rd /s /q ..\CastIt\bin\">
</Exec>
<Exec Command="rd /s /q ..\CastIt.Server\bin\">
</Exec>
<!--Then, we publish our apps-->
<Exec Condition="$(Configuration) != 'Debug'" Command="dotnet publish ../CastIt/CastIt.csproj -c $(Configuration) -r win-$(Platform) -p:PublishTrimmed=true">
<!--First the desktop app-->
<Exec Condition="$(Configuration) != 'Debug'" Command="dotnet publish ../CastIt/CastIt.csproj -c $(Configuration) -r win-$(Platform) -p:PublishTrimmed=true -o Publish">
</Exec>
<Exec Condition="$(Configuration) == 'Debug'" Command="dotnet publish ../CastIt/CastIt.csproj -c $(Configuration) -r win-$(Platform) -o Publish">
</Exec>
<!--Then the server-->
<Exec Condition="$(Configuration) != 'Debug'" Command="dotnet publish ../CastIt.Server/CastIt.Server.csproj -c $(Configuration) -r win-$(Platform) -p:PublishSingleFile=true -p:PublishTrimmed=true -o Publish\Server">
</Exec>
<Exec Condition="$(Configuration) == 'Debug'" Command="dotnet publish ../CastIt/CastIt.csproj -c $(Configuration) -r win-$(Platform)">
<Exec Condition="$(Configuration) == 'Debug'" Command="dotnet publish ../CastIt.Server/CastIt.Server.csproj -c $(Configuration) -r win-$(Platform) -p:PublishSingleFile=true -o Publish\Server">
</Exec>
<!--Here we get the assemblies versions-->
<GetAssemblyIdentity AssemblyFiles="..\CastIt\bin\$(Configuration)\net5.0-windows\win-$(Platform)\CastIt.dll">
Expand All @@ -89,13 +99,13 @@
<DefineConstants>DesktopVersion=%(DesktopAssembly.Version)</DefineConstants>
</PropertyGroup>
<PropertyGroup>
<DefineConstants>$(DefineConstants);DesktopBasePath=..\CastIt\bin\$(Configuration)\net5.0-windows\win-$(Platform)\publish</DefineConstants>
<DefineConstants>$(DefineConstants);DesktopBasePath=Publish</DefineConstants>
</PropertyGroup>
<PropertyGroup>
<DefineConstants>$(DefineConstants);InstallerVersion=%(DesktopAssembly.Version)</DefineConstants>
</PropertyGroup>
<!--Finally we pick up all the files that we want to publish, and create an autogenerated component-->
<HeatDirectory OutputFile="DesktopAutoGeneratedComponents.wxs" DirectoryRefId="DesktopInstallFolder" ComponentGroupName="DesktopAutoGeneratedComponentsGroup" SuppressCom="true" Directory="..\CastIt\bin\$(Configuration)\net5.0-windows\win-$(Platform)\publish" SuppressFragments="true" SuppressRegistry="true" SuppressRootDirectory="true" AutogenerateGuids="false" GenerateGuidsNow="true" ToolPath="$(WixToolPath)" PreprocessorVariable="var.DesktopBasePath" />
<HeatDirectory OutputFile="DesktopAutoGeneratedComponents.wxs" DirectoryRefId="DesktopInstallFolder" ComponentGroupName="DesktopAutoGeneratedComponentsGroup" SuppressCom="true" Directory="Publish" SuppressFragments="true" SuppressRegistry="true" SuppressRootDirectory="true" AutogenerateGuids="false" GenerateGuidsNow="true" ToolPath="$(WixToolPath)" PreprocessorVariable="var.DesktopBasePath" />
</Target>
<Target Name="AfterBuild">
<GetAssemblyIdentity AssemblyFiles="..\CastIt\bin\$(Configuration)\net5.0-windows\win-$(Platform)\CastIt.dll">
Expand Down

0 comments on commit 39b9488

Please sign in to comment.