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

Reduce/Optimize total size of installer/setup. #319

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

goodusername123
Copy link

Changes are documented in the commits attached.
No lossy operations where used only lossless.
Expending on what I said/noted in one of the commits: Deflate64 is only supported in newer versions of .Net or more specifically newer versions of System.IO.Compression, so If Reshade's setup is ever upgraded to a modern version of .Net Core then Deflate64 can be used instead of Deflate for a nice compression gain.
The update to 7za.exe is not 100% necessary but I felt it was fine to include it.

Tools/Things used:

sets the compression effort for the zip archive attached to the installer up from the default to almost the absolute maximum. 
In the future if the version of .NET used is updated to a modern version of .NET Core then add `-mm=Deflate64` and replace `-mfb=258` with `-mfb=257` for a an even further improved compression ratio.
Was previously version 18.05 before this point. Also as a note both this binary and the one it's replacing are 32-bit, 64-bit releases are available and could be used instead.
This was done with IcoCrush from IcoTools + Oxipng with the following command: `IcoCrush -i "main_icon.ico" --write-in-place --preferred-format MinimizeStorage --png-tool "oxipng -v -o max -Z -a --nb --nc"`
Note: This icon will not render on Windows XP and older, If support for such versions is desired then changing "MinimizeStorage" to "PngLargeImages" in the above command will produce a .ico compatible with versions of Windows older then Vista at the cost of size.
@crosire
Copy link
Owner

crosire commented Apr 30, 2024

ReShade is Windows Vista+, so that's certainly enough compatibility for the icon. .NET can't currently be updated unfortunately to retain that compatibility with older Windows versions.
7-zip 18.05 and 23.01 seem to compress to the same size with the added options though, so I'd skip the 7za.exe update since it doesn't really add value and just increases the Git repository site (albeit by a negligible amount).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants