Skip to content

Commit

Permalink
Fix pruning bundle
Browse files Browse the repository at this point in the history
  • Loading branch information
nirbar committed Sep 24, 2024
1 parent 787675b commit c70d00c
Show file tree
Hide file tree
Showing 8 changed files with 98 additions and 8 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ on:
version:
description: 'Build & package version'
required: true
default: 0.2.2
default: 0.2.3
type: string
jobs:
Build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3.3.0
- uses: microsoft/setup-msbuild@v1.0.2
- uses: actions/checkout@v4.1.7
- uses: microsoft/setup-msbuild@v2

- name: Set version
run: Add-Content -Path $env:GITHUB_ENV -Value "FULL_VERSION=${{ github.event.inputs.version }}.${{ github.run_number }}"
Expand All @@ -26,7 +26,7 @@ jobs:
run: dotnet build MsiZapEx.sln -p:Configuration=Release -p:Version=${{ env.FULL_VERSION }}

- name: Publish artifacts
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3.0.0
with:
name: MsiZapEx
path: |
Expand All @@ -42,7 +42,7 @@ jobs:
dotnet nuget push build\MsiZapEx\Release\bin\MsiZapEx.${{ env.FULL_VERSION }}.nupkg --api-key ${{ secrets.NUGET_TOKEN }} --source https://api.nuget.org/v3/index.json
- name: Publish release
uses: softprops/action-gh-release@v0.1.14
uses: softprops/action-gh-release@v2.0.8
if: ${{ github.event.inputs.publish_nuget == 'true' }}
with:
prerelease: false
Expand Down
24 changes: 24 additions & 0 deletions MsiZapEx.sln
Original file line number Diff line number Diff line change
Expand Up @@ -14,28 +14,52 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MsiZapEx", "MsiZapEx\MsiZapEx.csproj", "{9F89D927-E4D7-48F1-89B6-C7E41816F202}"
EndProject
Project("{B7DD6F7E-DEF8-4E67-B5B7-07EF123DB6F0}") = "TestPackage", "TestPackage\TestPackage.wixproj", "{491B6EDC-B0B1-4330-824C-ECB21AD5699F}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|ARM64 = Debug|ARM64
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|Any CPU = Release|Any CPU
Release|ARM64 = Release|ARM64
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{9F89D927-E4D7-48F1-89B6-C7E41816F202}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9F89D927-E4D7-48F1-89B6-C7E41816F202}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9F89D927-E4D7-48F1-89B6-C7E41816F202}.Debug|ARM64.ActiveCfg = Debug|Any CPU
{9F89D927-E4D7-48F1-89B6-C7E41816F202}.Debug|ARM64.Build.0 = Debug|Any CPU
{9F89D927-E4D7-48F1-89B6-C7E41816F202}.Debug|x64.ActiveCfg = Debug|Any CPU
{9F89D927-E4D7-48F1-89B6-C7E41816F202}.Debug|x64.Build.0 = Debug|Any CPU
{9F89D927-E4D7-48F1-89B6-C7E41816F202}.Debug|x86.ActiveCfg = Debug|Any CPU
{9F89D927-E4D7-48F1-89B6-C7E41816F202}.Debug|x86.Build.0 = Debug|Any CPU
{9F89D927-E4D7-48F1-89B6-C7E41816F202}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9F89D927-E4D7-48F1-89B6-C7E41816F202}.Release|Any CPU.Build.0 = Release|Any CPU
{9F89D927-E4D7-48F1-89B6-C7E41816F202}.Release|ARM64.ActiveCfg = Release|Any CPU
{9F89D927-E4D7-48F1-89B6-C7E41816F202}.Release|ARM64.Build.0 = Release|Any CPU
{9F89D927-E4D7-48F1-89B6-C7E41816F202}.Release|x64.ActiveCfg = Release|Any CPU
{9F89D927-E4D7-48F1-89B6-C7E41816F202}.Release|x64.Build.0 = Release|Any CPU
{9F89D927-E4D7-48F1-89B6-C7E41816F202}.Release|x86.ActiveCfg = Release|Any CPU
{9F89D927-E4D7-48F1-89B6-C7E41816F202}.Release|x86.Build.0 = Release|Any CPU
{491B6EDC-B0B1-4330-824C-ECB21AD5699F}.Debug|Any CPU.ActiveCfg = Debug|x64
{491B6EDC-B0B1-4330-824C-ECB21AD5699F}.Debug|Any CPU.Build.0 = Debug|x64
{491B6EDC-B0B1-4330-824C-ECB21AD5699F}.Debug|ARM64.ActiveCfg = Debug|ARM64
{491B6EDC-B0B1-4330-824C-ECB21AD5699F}.Debug|ARM64.Build.0 = Debug|ARM64
{491B6EDC-B0B1-4330-824C-ECB21AD5699F}.Debug|x64.ActiveCfg = Debug|x64
{491B6EDC-B0B1-4330-824C-ECB21AD5699F}.Debug|x64.Build.0 = Debug|x64
{491B6EDC-B0B1-4330-824C-ECB21AD5699F}.Debug|x86.ActiveCfg = Debug|x86
{491B6EDC-B0B1-4330-824C-ECB21AD5699F}.Debug|x86.Build.0 = Debug|x86
{491B6EDC-B0B1-4330-824C-ECB21AD5699F}.Release|Any CPU.ActiveCfg = Release|x64
{491B6EDC-B0B1-4330-824C-ECB21AD5699F}.Release|Any CPU.Build.0 = Release|x64
{491B6EDC-B0B1-4330-824C-ECB21AD5699F}.Release|ARM64.ActiveCfg = Release|ARM64
{491B6EDC-B0B1-4330-824C-ECB21AD5699F}.Release|ARM64.Build.0 = Release|ARM64
{491B6EDC-B0B1-4330-824C-ECB21AD5699F}.Release|x64.ActiveCfg = Release|x64
{491B6EDC-B0B1-4330-824C-ECB21AD5699F}.Release|x64.Build.0 = Release|x64
{491B6EDC-B0B1-4330-824C-ECB21AD5699F}.Release|x86.ActiveCfg = Release|x86
{491B6EDC-B0B1-4330-824C-ECB21AD5699F}.Release|x86.Build.0 = Release|x86
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
6 changes: 3 additions & 3 deletions MsiZapEx/RegistryModifier.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using Microsoft.Win32;
using Microsoft.Win32;
using System;
using System.Collections.Generic;
using System.Linq;
Expand Down Expand Up @@ -170,7 +170,7 @@ private void DoDeleteValues()
{
using (RegistryKey k = root.OpenSubKey(delValue.key, true))
{
k.DeleteValue(delValue.name);
k.DeleteValue(delValue.name, false);
}
}
}
Expand Down Expand Up @@ -202,7 +202,7 @@ private void DoDeleteKeys()

if (Settings.Instance?.DryRun != true)
{
root.DeleteSubKeyTree(delKey.key);
root.DeleteSubKeyTree(delKey.key, false);
}
}
}
Expand Down
24 changes: 24 additions & 0 deletions TestPackage/ExampleComponents.wxs
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
<Fragment>
<ComponentGroup Id="ExampleComponents1" Directory="INSTALLFOLDER">
<Component>
<File Source="ExampleComponents.wxs" />
</Component>
</ComponentGroup>
<ComponentGroup Id="ExampleComponents2" Directory="INSTALLFOLDER">
<Component>
<File Source="ExampleComponents.wxs" Name="ExampleComponents2.wxs" />
</Component>
</ComponentGroup>
<ComponentGroup Id="ExampleComponents3" Directory="INSTALLFOLDER">
<Component>
<File Source="ExampleComponents.wxs" Name="ExampleComponents3.wxs"/>
</Component>
</ComponentGroup>
<ComponentGroup Id="ExampleComponents4" Directory="INSTALLFOLDER">
<Component>
<File Source="ExampleComponents.wxs" Name="ExampleComponents4.wxs"/>
</Component>
</ComponentGroup>
</Fragment>
</Wix>
7 changes: 7 additions & 0 deletions TestPackage/Folders.wxs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
<Fragment>
<StandardDirectory Id="ProgramFiles6432Folder">
<Directory Id="INSTALLFOLDER" Name="!(bind.Property.Manufacturer) !(bind.Property.ProductName)" />
</StandardDirectory>
</Fragment>
</Wix>
8 changes: 8 additions & 0 deletions TestPackage/Package.en-us.wxl
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<!--
This file contains the declaration of all the localizable strings.
-->
<WixLocalization xmlns="http://wixtoolset.org/schemas/v4/wxl" Culture="en-US">

<String Id="DowngradeError" Value="A newer version of [ProductName] is already installed." />

</WixLocalization>
21 changes: 21 additions & 0 deletions TestPackage/Package.wxs
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
<Package Name="TestPackage" Manufacturer="TODO Manufacturer" Version="1.0.0.0" UpgradeCode="270775df-83c8-42fa-b78f-4713cb37d84d">
<MajorUpgrade DowngradeErrorMessage="!(loc.DowngradeError)" />

<UIRef Id="WixUI_FeatureTree_$(sys.BUILDARCHSHORT)"/>
<Feature Id="ExampleComponents1">
<ComponentGroupRef Id="ExampleComponents1" />

<Feature Id="ExampleComponents2">
<ComponentGroupRef Id="ExampleComponents2" />
</Feature>

<Feature Id="ExampleComponents3">
<ComponentGroupRef Id="ExampleComponents3" />
<Feature Id="ExampleComponents4">
<ComponentGroupRef Id="ExampleComponents4" />
</Feature>
</Feature>
</Feature>
</Package>
</Wix>
6 changes: 6 additions & 0 deletions TestPackage/TestPackage.wixproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<Project Sdk="WixToolset.Sdk/5.0.0">

<ItemGroup>
<PackageReference Include="WixToolset.UI.wixext" Version="5.0.0"/>
</ItemGroup>
</Project>

0 comments on commit c70d00c

Please sign in to comment.