Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
use Files element
  • Loading branch information
lahma committed Jul 25, 2025
commit ef754511e8502507f73777fe2de34f5bcfae297a
11 changes: 1 addition & 10 deletions src/NSwagStudio.Installer/NSwagStudio.Installer.wixproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<NoWarn>$(NoWarn);HEAT5149;HEAT5151</NoWarn>
<OutputPath>..\..\artifacts\bin\NSwagStudio.Installer\$(Configuration)\</OutputPath>
<IntermediateOutputPath>..\..\artifacts\obj\NSwagStudio.Installer\$(Configuration)\</IntermediateOutputPath>
<DefineConstants>SourcePath=..\..\artifacts\bin\NSwagStudio\$(Configuration)</DefineConstants>
<DefineConstants>SourcePath=..\..\NSwagStudio\$(Configuration)</DefineConstants>
</PropertyGroup>

<ItemGroup>
Expand All @@ -25,13 +25,4 @@
<PackageReference Include="WixToolset.UI.wixext" />
</ItemGroup>

<ItemGroup>
<HarvestDirectory Include="..\..\artifacts\bin\NSwagStudio\$(Configuration)">
<DirectoryRefId>RootDirectory</DirectoryRefId>
<SuppressRootDirectory>true</SuppressRootDirectory>
<ComponentGroupName>SourceComponentGroup</ComponentGroupName>
<PreprocessorVariable>var.SourcePath</PreprocessorVariable>
</HarvestDirectory>
</ItemGroup>

</Project>
25 changes: 20 additions & 5 deletions src/NSwagStudio.Installer/Product.wxs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<Package
Name="NSwagStudio"
Language="1033"
Version="!(bind.FileVersion.filnYMAEBxLTF3CcDAg0eYQImHyMxs)"
Version="!(bind.FileVersion.NSwagExe)"
Manufacturer="Rico Suter"
UpgradeCode="571BBE29-70A5-4062-B478-A8BA84A7F90A"
InstallerVersion="200">
Expand All @@ -15,7 +15,8 @@
<MediaTemplate EmbedCab="yes" />

<Feature Id="ProductFeature" Title="Installer" Level="1">
<ComponentGroupRef Id="SourceComponentGroup" />
<ComponentGroupRef Id="AppFiles" />
<ComponentGroupRef Id="AppExe" />
<ComponentRef Id="ApplicationComponent" />
</Feature>

Expand All @@ -31,11 +32,25 @@

<Property Id="WIXUI_EXITDIALOGOPTIONALCHECKBOXTEXT" Value="Launch NSwagStudio" />

<Property Id="WixShellExecTarget" Value="[#filnYMAEBxLTF3CcDAg0eYQImHyMxs]" />
<Property Id="WixShellExecTarget" Value="[#NSwagExe]" />
<CustomAction Id="LaunchApplication" DllEntry="WixShellExec" Impersonate="yes" BinaryRef="Wix4UtilCA_X86" />

</Package>

<Fragment>
<ComponentGroup Id="AppFiles" Directory="INSTALLFOLDER">
<Files Include="$(var.SourcePath)\**">
<Exclude Files="$(var.SourcePath)\NSwagStudio.exe" />
</Files>
</ComponentGroup>

<ComponentGroup Id="AppExe">
<Component Id="NSwagExeComponent" Directory="INSTALLFOLDER">
<File Id="NSwagExe" Source="$(var.SourcePath)\NSwagStudio.exe" KeyPath="yes" />
</Component>
</ComponentGroup>
</Fragment>

<Fragment>

<DirectoryRef Id="INSTALLFOLDER">
Expand Down Expand Up @@ -76,14 +91,14 @@
Icon="ApplicationIcon"
Name="NSwagStudio"
Description="NSwagStudio"
Target="[#filnYMAEBxLTF3CcDAg0eYQImHyMxs]"
Target="[#NSwagExe]"
WorkingDirectory="RootDirectory" />

<RemoveFile Id="RemoveShortcut" Name="NSwagStudio" On="uninstall" />

<ProgId Id="NSwagFile" Description="NSwag Configuration file">
<Extension Id="nswag" ContentType="application/json">
<Verb Id="open" Command="Open" TargetFile="filnYMAEBxLTF3CcDAg0eYQImHyMxs" Argument="&quot;%1&quot;" />
<Verb Id="open" Command="Open" TargetFile="NSwagExe" Argument="&quot;%1&quot;" />
</Extension>
</ProgId>

Expand Down