-
Notifications
You must be signed in to change notification settings - Fork 33
Expand file tree
/
Copy pathSetup.csproj
More file actions
46 lines (40 loc) · 2.55 KB
/
Copy pathSetup.csproj
File metadata and controls
46 lines (40 loc) · 2.55 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<Project Sdk="Microsoft.Build.NoTargets/3.7.0">
<!--
WARNING
This project is not automatically built when building the solution.
To build the Windows installer, explicitly build this project after having built the solution.
-->
<PropertyGroup>
<TargetFramework>net48</TargetFramework>
</PropertyGroup>
<Target Name="CreateInstaller" AfterTargets="Build">
<PropertyGroup>
<AdvancedInstallerPath>$(registry:HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Caphyon\Advanced Installer@Advanced Installer Path)</AdvancedInstallerPath>
<AdvancedInstallerExe>"$(AdvancedInstallerPath)bin\x86\AdvancedInstaller.com"</AdvancedInstallerExe>
<AIPFile>ServiceInsight.aip</AIPFile>
<CommandFile>commands.aic</CommandFile>
</PropertyGroup>
<ItemGroup>
<ResourceFiles Include="res\*.*" />
</ItemGroup>
<PropertyGroup>
<RepoRootDir>$([System.IO.Path]::GetFullPath($(MSBuildProjectDirectory)\..\..\))</RepoRootDir>
<SetupExeOutputFolder>$(RepoRootDir)assets\</SetupExeOutputFolder>
<SetupExeName>ServiceInsight-$(MinVerMajor).$(MinVerMinor).$(MinVerPatch).exe</SetupExeName>
</PropertyGroup>
<MakeDir Directories="$(SetupExeOutputFolder)" />
<ItemGroup>
<ExistingExes Include="$(SetupExeOutputFolder)*.exe" />
</ItemGroup>
<Delete Files="@(ExistingExes)" />
<Copy SourceFiles="$(AIPFile)" DestinationFolder="$(IntermediateOutputPath)" />
<Copy SourceFiles="$(CommandFile)" DestinationFolder="$(IntermediateOutputPath)" />
<Copy SourceFiles="License.rtf" DestinationFolder="$(IntermediateOutputPath)" />
<Copy SourceFiles="@(ResourceFiles)" DestinationFolder="$(IntermediateOutputPath)res\%(RecursiveDir)" SkipUnchangedFiles="true" />
<Exec Command="$(AdvancedInstallerExe) /edit $(IntermediateOutputPath)$(AIPFile) /NewPathVariable -name PROJECT_PATH -value $(RepoRootDir)src\Setup -valuetype Folder" />
<Exec Command="$(AdvancedInstallerExe) /edit $(IntermediateOutputPath)$(AIPFile) /NewPathVariable -name SI_PATH -value $(RepoRootDir)src\ServiceInsight\bin\$(Configuration)\$(TargetFramework) -valuetype Folder" />
<Exec Command="$(AdvancedInstallerExe) /edit $(IntermediateOutputPath)$(AIPFile) /SetVersion $(MinVerMajor).$(MinVerMinor).$(MinVerPatch)" />
<Exec Command="$(AdvancedInstallerExe) /edit $(IntermediateOutputPath)$(AIPFile) /SetPackageName $(SetupExeOutputFolder)$(SetupExeName) -buildname DefaultBuild" />
<Exec Command="$(AdvancedInstallerExe) /execute $(IntermediateOutputPath)$(AIPFile) $(IntermediateOutputPath)$(CommandFile)" />
</Target>
</Project>