Comments (11)
To say truth, I didn't think about this. So at the moment it simply downloads an archive from the list of the remote manifest and unpacks it to a temp folder. But I like the challenge, going to think of a possibility to specify explicitly what to take from the archive
from nw-autoupdater.
Since version 1.1.0 you can set via swapScript option your own swap script like:
rsync -a\${VERBOSE} --delete \${APP_PATH}/. \${BAK_PATH}/
rsync -a\${VERBOSE} \${UPDATE_PATH}/. \${APP_PATH}/package
that copies the downloaded/extracted HTML5 project files in package
subfolder in application directory, given your app manually bundled and HTML5 project located in package
from nw-autoupdater.
@dsheiko i am trying to achieve the same thing i.e. update just the html5 project but i don't understand what you mean by specifying the packages sub directory ?
How should the app be packaged and built for this technique to work ? Can you shed a bit more light on this ?
from nw-autoupdater.
This way it works if you do not bundle updates, but simply compress with zip or tar.gz. Thus updater, downloads the archive, unpack in TMP, takes project directory from there and replaces in the project. On macOS, NW.js app is kind of a folder, so it do it. On Windows/Linux, seems like the project shall not be bundled at all, but simply archived (usually with nw executable rebranded). In fact on Windows it even makes sense as it uncompress the package every time you run it and it takes considerably long time.
from nw-autoupdater.
I am at the moment using nw-builder to build my app.
This way it works if you do not bundle updates, but simply compress with zip or tar.gz.
Do you mean to say that this technique won't work if i bundle my app using the tool i mentioned above ?
from nw-autoupdater.
What OS do you target?
from nw-autoupdater.
Linux at the moment and Windows eventually. I mean i am developing on linux(ubuntu) right now but my end users are going to be mostly windows.
from nw-autoupdater.
@dsheiko The name of my app is testApp. Now when building with --flavor=sdk there is file named testApp which when executed from bash runs the app (Lets call this build A).
I made changes to code and rebuilt it (let's call this build B).
Now i simply replaced testApp in build A's folder with testApp from build B's folder and my code changes are available in the old build. While this satisfies my idea of updating just a single file which contains my source i don't think this is the correct way. Can you tell us which files contain the application code in the sdk build folder and if just replacing a single file and restarting the app will be the correct way to go about an update ?
from nw-autoupdater.
Well, nw-builder creates self-extracting executable for Windows, so the updater by default simply replaces that file with the downloaded one - thus it works. But it cannot currently modify the executable for updating let's project folder. At the moment I do not know for sure how to unpack that sort of bundle safely, update the folder and pack it back.
from nw-autoupdater.
In the nw-autoupdater examples I also refer to SDK version nwbuild -v 0.21.3-sdk
, as I want DevTools available in the demo app. The problem again, you get the project sources bundled together with NW.js executable and so it distributes. So to update source one needs to unpack the bundle
from nw-autoupdater.
Filed an issue in nw-builder repo. Posting here just for reference nwutils/nw-builder#460
from nw-autoupdater.
Related Issues (20)
- App does not swap when built with https://github.com/evshiron/nwjs-builder-phoenix HOT 4
- App does not restart after exiting post update (LINUX) HOT 3
- freeze screen
- Failed to compile (with create-react-app) HOT 1
- App not swap with script
- app.bak file in the same directory with app on Mac
- Doesn't restart after update, but updates without problems HOT 1
- unable to do anything other than output.innerHTML=''
- Unable to update after packaging using InnoSetup
- Error during installation of an update (EMFILE: too many open files)
- damaged update file
- Script Strategy HOT 1
- Folder backup
- Unable to download from AWS Cloudfront URL
- License file is missing in repo HOT 1
- NWJS v0.41.2 (latest) structure changed (build with nwjs-builder-phoenix) HOT 1
- Can not support https request HOT 4
- The default script deletes ALL files in folder (Mac)
- Callback fuction not defined in nodejs - chmod inside linux.js(Version - 1.1.11) HOT 1
- Request to move repo under NW Userland
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nw-autoupdater.