nwutils / nw-updater

Update NW.js applications.
MIT License
474 stars 91 forks source link

unzip.exe is not signed #68

Open adam-lynch opened 9 years ago

thoughtspacewebsites commented 8 years ago

Could this possibly lead to any errors when trying to unpack downloaded files on Windows? I've been getting a failure with code 1 on all of my Windows unpack attempts. Not sure if it's some sort of conflict with Windows Defender or something...

adam-lynch commented 8 years ago

@thoughtspacewebsites Possibly... can't say for sure. You could just sign it yourself.

thoughtspacewebsites commented 8 years ago

Darn... I've been running into code 1 and I'm pulling my hair out over this one. I couldn't find anything in the issue tracker about it. I'm packaging with Enigma Virtual Box... Do the ZIP contents NEED to be in a certain format in order to work? I wouldn't imagine that along would cause the unzip command to fail....

adam-lynch commented 8 years ago

I haven't worked on this in awhile so I'm a little rusty but I'm pretty sure it does. But as you said that wouldn't make the unzup command fail, it would fail later when trying to run the app. It is possible to debug this, although it is awkward.

Let's say you have code like:

x()
y()
z()

Change it to:

require('nw.gui').Window.get().showDevTools();

setTimeout(function(){
  debugger;
  x();
  y();
  z();
}, 3000);
thoughtspacewebsites commented 8 years ago

I actually just figured it out.... This doesn't work with Enigma Virtual Box because EVB puts all of the windows files (nw.exe, the app, and all the DLLs) inside of a single EXE for distribution. Since the unzip.exe file lives inside of the node-webkit-updater module, and the node-webkit-updater folder is packed into an exe, it's failing out... Looks like I can't use Enigma Virtual Box with node-webkit-updater. This might be worth adding to the README since NWJS actually recommends Enigma Virtual Box as a distribution method...

adam-lynch commented 8 years ago

@thoughtspacewebsites please create a pull-request :smile:. Thanks for finding this. Where does NW.js recommend it?

thoughtspacewebsites commented 8 years ago

I'll make a pull request as soon as I get everything with my app hammered out. I'm right on the verge of launching, so I want to get it taken care of really quick.

NWJS mentions it on their "How to package and distribute your app" page:

https://github.com/nwjs/nw.js/wiki/how-to-package-and-distribute-your-apps#an-alternative-way-to-make-an-executable-file-in-windows

I ended up using InnoSetup, which seems to have solved this issue, since it installs the app loose to the Program Fiels directory instead of encasing everything in a single exe. Now I just have to figure out why it keeps stalling out on the updater.install() step...

adam-lynch commented 8 years ago

@thoughtspacewebsites yeah, we use InnoSetup. I'd recommend installing it to AppData/Roaming instead to avoid permissions problems.

thoughtspacewebsites commented 8 years ago

That's the route I ended up going, and I did run into the permissions issue when trying to update when I originally installed to programfiles. Everything is fixed now though and I successfully launched my app! Also, I created a pull request with an updated README.md that has this warning in the "troubleshooting" section:

https://github.com/edjafarov/node-webkit-updater/pull/99