The fix for this is to just use the option to embed the zip file in the installer instead of using the download method. The space required figure number will still be somewhat off because we embed a zip file that we then extract ourselves rather than letting NSIS take care of embedding and compressing files.
Another option is to just get rid of the Required Disk Space line (SpaceTexts in NSIS script can do it). I prefer this one since DMD isn't big enough that the average user needs to care about how much disk space it takes up.
Comment #2 by code — 2014-02-04T14:31:20Z
It would be generally preferable to only embed those files that are actually needed for a Windows installation, not the whole dmd.zip.
Comment #3 by code — 2014-02-04T14:34:02Z
(In reply to comment #2)
> It would be generally preferable to only embed those files that are actually
> needed for a Windows installation, not the whole dmd.zip.
Is it difficult to embed zip files?
Ideally we could simply use the dmd.windows.zip generated by create_dmd_release.
http://ftp.digitalmars.com/dmd.2.065.0-b3.windows.zip 15.2MB
Comment #4 by eco — 2014-02-04T14:51:28Z
(In reply to comment #3)
> (In reply to comment #2)
> > It would be generally preferable to only embed those files that are actually
> > needed for a Windows installation, not the whole dmd.zip.
>
> Is it difficult to embed zip files?
> Ideally we could simply use the dmd.windows.zip generated by
> create_dmd_release.
> http://ftp.digitalmars.com/dmd.2.065.0-b3.windows.zip 15.2MB
Nope, it already supports doing that actually. You just comment out the "!define Download" near the top and have zip files in place for it to snag. https://github.com/D-Programming-Language/installer/blob/master/windows/dinstaller.nsi#L146
What I meant though is using NSIS's "File" to include the files rather than including a zip file with everything already included. If there is a directory dmd.windows.zip is made from we'd ideally just "File /r <path>" that directory and then we'd have a non-downloading installer that only includes the relevant portions, has a true Space Required amount, and would actually be smaller because NSIS can do LZMA compression.
This would also fix the problem of ensuring the uninstall only removes files it installed itself (there are readymade solutions for this as long as you are using NSIS's built in file embedding).
Comment #5 by robert.schadek — 2025-01-02T15:46:15Z