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

Replacing application source code files for delta updates #460

Closed
vinaynb opened this issue Jul 17, 2017 · 3 comments
Closed

Replacing application source code files for delta updates #460

vinaynb opened this issue Jul 17, 2017 · 3 comments

Comments

@vinaynb
Copy link

vinaynb commented Jul 17, 2017

I am trying to figure out implementing auto updates for nw.js application and at the moment i am on linux/ubuntu. I am building my app named 'nw-autoupdater-demo' using sdk flavor of nw.js binary and it creates a folder with all the files inside it which looks something like this
screenshot from 2017-07-17 18 07 35

I am using nw-autoupdater to roll out my updates and i do not wish to send nw.js binary everytime user needs to update to a newer version because the changes are related to just my js/html/css source code only. So i figured out if there's a specific file that contains my application code which i can replace with a newer version and keep the rest of nw.js binaries intact then that would solve my issue.

But from the above figure i cannot figure out which file contains my application code. I tried replacing the main executable file nw-autoupdater-demo with a changed version of my code in a older build created using nw-builder and it works !

Is this the correct approach to make changes to the app and issue updates ?
Is the main executable file the only file i need to replace to update my application source and it would just work ?

@vinaynb
Copy link
Author

vinaynb commented Sep 15, 2017

@adam-lynch can you shed some light on my query ?

@adam-lynch
Copy link
Contributor

This stuff is really interesting but I'm afraid I can't help much. I'm not sure about Linux I'm sorry :/, I'm not sure where your source goes. Even on Windows & Mac this is tricky because it can trigger the OS / anti-virus, especially if your app is signed. Electron does it nicely (only for Mac & Windows). I think people usually go down the route of publishing their app to package managers instead (e.g. using AppImage or something) rather than having an auto-updater with delta updates. Maybe you could build two simple apps and compare the output to see which files depend on your source?

@Blatman
Copy link

Blatman commented Sep 6, 2018

Quite an old issue this but when I have been messing around with builds on Linux I tend to use the unzipped option in NWB and this creates a package.nw folder alongside all the files in the snapshot above and it is this folder that holds all the app files. I would have thought that if I used the auto-updater to update the app alone then all I would need to do is replace the package.nw folder.
A separate package.nw folder will of course increase the size of the overall distro build.
Cheers,
Blane

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

No branches or pull requests

4 participants