rthomasv3 / Scum-Bag

Scum Bag is an all-in-one save manager for all your characters and games.
5 stars 2 forks source link

Consider using PublishSingleFile=True to publish the release #8

Closed 13xforever closed 1 month ago

13xforever commented 1 month ago

This would reduce the number of files, which makes it easier for end users to use the application. Also consider removing extraneous nfd.lib, .exp, and .pdb to reduce the end file size slightly.

Documentation: https://learn.microsoft.com/en-us/dotnet/core/deploying/single-file/overview Note that some features are restricted or not available when publishing as a single executable (some reflection is limited), but it seems to work fine with this project without tweaking so far.

Example command:

dotnet publish -c Release -r win-x64 --self-contained -p:PublishSingleFile=True -p:PublishTrimmed=False -p:DebugType=None -o .\distrib
rthomasv3 commented 1 month ago

I do publish as a single file here on github - it's in the release as Scum_Bag_win-x64.exe.zip. The build command is similar to your suggestion and can be found in the build file (.github/workflows/build-windows.yml).

However, I don't distribute the app like this because it causes it to be falsely flagged by virus scanners. I'm not completely sure why, but I think it has to do with the webview dependency self-extracting to the app data folder.

https://www.virustotal.com/gui/file/0d49c56a3a2c11f0fe432df2c675e5e239799ab21236138ca242738167bd2c1c/