Giter VIP home page Giter VIP logo

Comments (11)

dsheiko avatar dsheiko commented on July 21, 2024

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.

dsheiko avatar dsheiko commented on July 21, 2024

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.

vinaynb avatar vinaynb commented on July 21, 2024

@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.

dsheiko avatar dsheiko commented on July 21, 2024

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.

vinaynb avatar vinaynb commented on July 21, 2024

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.

dsheiko avatar dsheiko commented on July 21, 2024

What OS do you target?

from nw-autoupdater.

vinaynb avatar vinaynb commented on July 21, 2024

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.

vinaynb avatar vinaynb commented on July 21, 2024

@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.

dsheiko avatar dsheiko commented on July 21, 2024

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.

dsheiko avatar dsheiko commented on July 21, 2024

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.

vinaynb avatar vinaynb commented on July 21, 2024

Filed an issue in nw-builder repo. Posting here just for reference nwutils/nw-builder#460

from nw-autoupdater.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.