windows-installer icon indicating copy to clipboard operation
windows-installer copied to clipboard

Large delta when only changing version number

Open joshua-redmond opened this issue 8 years ago • 14 comments
trafficstars

Delta file's are 25MB in size.

This started happening about a 4 months ago and I don't think i changed anything

To reproduce download https://github.com/Mike-Wood/electron-winstaller-delta-size-test

Run: npm install

  1. Run: node createInstaller.js
  2. And: node compressWin.js

Then in the installers/win folder there will be an executable.

Now update the version in package.json

Repeat steps 1 and 2

In installers/win there will now be a 25MB delta file

joshua-redmond avatar Oct 24 '17 17:10 joshua-redmond

I just tried it again with the newest version of electron-packager and still does not work.

Something I forgot to include is If I manually replace the files under resources/app/ then the delta's are a good size

Could somebody please look into this?

joshua-redmond avatar Nov 03 '17 14:11 joshua-redmond

Hello? Is anybody going to pay attention to this bug?

joshua-redmond avatar Nov 14 '17 16:11 joshua-redmond

@Mike-Wood after you build the installer, what happens if you delete the files that were created? If I had to guess, that installer directory is also being packaged. You might want to add an entry in your .gitignore for installers

bsclifton avatar Nov 14 '17 17:11 bsclifton

Sorry, I don't understand what you mean by "what happens if you delete the files that were created?" but I made sure that the installer directory is not being packaged. I forgot to do that with the test case I provided

joshua-redmond avatar Nov 15 '17 12:11 joshua-redmond

@Mike-Wood that is exactly what I meant- basically running git status and deleting anything that shows up as not included in the project (ex: run a git clean -f).

If you bump the version, commit... then destroy the folder and re-clone/re-run packaging, you don't have the problem, right?

bsclifton avatar Nov 15 '17 17:11 bsclifton

What folder are you talking about when you say "then destroy the folder" do you mean the entire project? Because if I have to do that every time it's still a bug.

joshua-redmond avatar Nov 16 '17 17:11 joshua-redmond

@Mike-Wood I'm not disagreeing that it's a bug- I'm trying to help narrow it down.

It sounds like the packaging process is including previous packages (or other resources). This is proven by the fact you can destroy everything (by this, I mean whatever project it is you're trying to build) and re-cloning the repo you want to build an installer for and building an installer. For example:

git clone [email protected]:Mike-Wood/electron-winstaller-delta-size-test.git
cd electron-winstaller-delta-size-test
## do the build here
cd ../
rm -rf electron-winstaller-delta-size-test
git clone [email protected]:Mike-Wood/electron-winstaller-delta-size-test.git
cd electron-winstaller-delta-size-test
## increment version
## do build again; it shouldn't be large

So the problem isn't incrementing the version. It's building the installer more than once

bsclifton avatar Nov 16 '17 17:11 bsclifton

Yes I can delete the code and copy it back and it will still make large deltas

joshua-redmond avatar Nov 18 '17 16:11 joshua-redmond

I have the same issue, happened in July for me.

devtobo avatar Nov 22 '17 21:11 devtobo

I have the same issue...

Valantir007 avatar Dec 01 '17 10:12 Valantir007

Same issue here. 53.9 meg project gets a 30.6 meg delta for just a few lines of code changed. Sometimes I get a few hundred KBs or 15 meg delta file but a majority of the time it rides around 30 megs.

baconbrad avatar Jan 02 '18 23:01 baconbrad

I am having the same issue. Looking inside the -delta.nupkg, the full [app name].exe is there, which is 47 MB for me. That accounts for 99.9% of the size of my unzipped -delta.nupkg.

@bsclifton is there some log file I can attach that might help investigate why the full .exe is included?

guillaumejenkins avatar Apr 12 '18 16:04 guillaumejenkins

I have found electron-packager to be the culprit. It is creating a new executable with a different hash. As a result Squirrel.Windows thinks the whole file changed. Copying my old exe into my app directory and doing the install creation process produced a tiny delta file. So the fix for me is reworking my build script.

baconbrad avatar May 16 '18 23:05 baconbrad

I think this issue is a duplicate of https://github.com/electron/windows-installer/issues/185 and can be closed.

adabru avatar Jan 13 '20 17:01 adabru