Flow.Launcher icon indicating copy to clipboard operation
Flow.Launcher copied to clipboard

Build script fixed + enhanced

Open dcog989 opened this issue 2 months ago • 9 comments

Main issues: redundant 95MB file removed from portable zip; fixed plugin build logic so that we always get the latest version and not an obsolete DLL.


  1. Fixed Portable Package Creation

    • The portable build process was including the temporary packages directory in the final archive. This added FlowLauncher-x.x.x-full.nupkg file, increasing zip size by ~95MB. We now explicitly remove this directory before compression.
    • We now use a staging directory to assemble the portable version by running a silent install which ensures package structure is correct and contains no unnecessary build artifacts.
  2. Enhanced Build Process Reliability

    • Dynamic Squirrel Path: The script no longer uses a hardcoded path to squirrel.windows.
    • Improved Dependency Handling: By changing <Private> from false to true in Directory.Build.targets, project-to-project dependencies are now correctly copied to the output directory. This prevents "missing assembly" errors, especially for plugins.
    • Safer File Deletion: The Remove-UnusedFiles function now includes a safety check to prevent accidentally deleting a plugin's main DLL if it shares a name with a common dependency.
    • Structured Build Flow: The main build logic has been restructured to follow a sequence of building the solution, publishing to a temporary directory, and then merging into the final release folder, which prevents interference from old build artifacts.
    • More Reliable Version Retrieval: The Build-Version function was updated to use (Get-Item).VersionInfo.ProductVersion instead of Get-Command. This is more reliable for retrieving file version in PowerShell and aligns with AssemblyInformationalVersion.
  3. Modernized NuGet Package

    • The .nuspec file has been updated to use the modern <icon> and <readme> tags (note - I failed to get rid of the deprecated <iconUrl> due to Squirrel).

[!NOTE] I've been playing with https://github.com/velopack/velopack for https://github.com/dcog989/Cliptoo - would there be interest in converting Flow to use this given that Squirrel was abandoned long ago? (Velopack originates from a fork of Squirrel).

dcog989 avatar Sep 21 '25 12:09 dcog989