Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix bundling unwanted files in MSI #583

Merged
merged 4 commits into from
Sep 6, 2023

Conversation

sburmanoctopus
Copy link
Contributor

@sburmanoctopus sburmanoctopus commented Sep 6, 2023

[sc-59022]

Background

We found that the Tentacle Manager was being shipped in the net6.0 MSI, when is shouldn't be.

Results

Related to #584

Before

We generate the files to include in Wix using Heat.exe. This exe then overrides the Tentacle.Generated.wxs file with what should be installed.

Before we run Heat.exe, we copy all the files we need for the MSI being built into the _build\Installer folder, and then tell Heat.exe to include everything in there.

But we don't clear that folder between MSI builds. So any file from a previous MSI build will be included in the next MSI (unless it's overridden, which most of them are).

After

We now clear the _build\Installer folder so that the Tentacle Manager files from the previous MSI build are not included in the net6.0 MSIs anymore.

Below is output from a test installation. Note we order by type, and that there is no Octopus.Manager.Tentacle.exe
image

Also, note the file size changes before and after.
Before
image

After
image

How to review this PR

Quality ✔️

Pre-requisites

  • I have read How we use GitHub Issues for help deciding when and where it's appropriate to make an issue.
  • I have considered informing or consulting the right people, according to the ownership map.
  • I have considered appropriate testing for my change.

@@ -49,6 +49,7 @@ tools

_artifacts
_build
_test
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When tests clean up after themselves, we don't need this. But when they don't, it's a Git mess

@shortcut-integration
Copy link

This pull request has been linked to Shortcut Story #59022: Ensure net6.0 only installs required files.

@sburmanoctopus sburmanoctopus marked this pull request as ready for review September 6, 2023 02:32
@sburmanoctopus sburmanoctopus requested a review from a team as a code owner September 6, 2023 02:32
@sburmanoctopus sburmanoctopus changed the title Sast/fix bundling unwanted files in msi Fix bundling unwanted files in MSI Sep 6, 2023
@@ -158,6 +158,7 @@ void PackWindowsInstallers(MSBuildTargetPlatform platform, AbsolutePath wixNuget
{
var installerDirectory = BuildDirectory / "Installer";
FileSystemTasks.EnsureExistingDirectory(installerDirectory);
FileSystemTasks.EnsureCleanDirectory(installerDirectory);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good spot

@sburmanoctopus sburmanoctopus enabled auto-merge (squash) September 6, 2023 03:33
@sburmanoctopus sburmanoctopus merged commit 5af1c57 into main Sep 6, 2023
@sburmanoctopus sburmanoctopus deleted the sast/FixBundlingUnwantedFilesInMsi branch September 6, 2023 03:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants