Code Monkey home page Code Monkey logo

Comments (7)

antony-jr avatar antony-jr commented on May 18, 2024 1

@luzpaz The new version released, You can see the docs here. But before you start using the new version I think we might need to change the conda recipe because the project was renamed. But Github takes care of all redirects but still some build specific stuff breaks.

Here is how you do it,

# v2.x code

# Get constants from plugin itself.
Action_CheckForUpdate = updater.getConstant("Action::CheckForUpdate")
Action_UpdateWGUI = updater.getConstant("Action::UpdateWithGUI") # Start updater with gui

def handleFinished(info, action):
    if action == Action_Update:
       print("New version Details:: {}".format(info))
       app.quit()
    elif action == Action_CheckForUpdate:
       if info["UpdateAvailable"].toBool():
          # updater.setGuiFlag(updater.getConstant("GuiFlag::Default"))
          # You can customize the GUI to some extent with flags. See docs.
          updater.start(Action_UpdateWGUI)
       else:
          print("You already have the new version")

# Connect
updater.finished.connect(handleFinished)

# Start the update process 
updater.start(Action_CheckForUpdate) 

If you want BitTorrent Support then FreeCAD need to use https://github.com/antony-jr/MakeAppImageTorrent to make torrent file at build time and upload it to the releases along with the .zsync file. Now you need to add -DDECENTRALIZED_UPDATE_ENABLED=ON flag to cmake to enable building QAppImageUpdate with torrent support. Also you need to build libtorrent at build time. ping me if you want help.

Then you just need to replace Action::UpdateWithGUI with Action::UpdateWithGUIAndTorrent.

from freecad-bundle.

antony-jr avatar antony-jr commented on May 18, 2024

@luzpaz Actually there is a inbuilt GUI that is not used. It's the same one used in the unofficial updater. It shows you release notes too and a simple progress.

from freecad-bundle.

luzpaz avatar luzpaz commented on May 18, 2024

@antony-jr how does one enable it ?

from freecad-bundle.

antony-jr avatar antony-jr commented on May 18, 2024

Oops, Actually it's only usable in plugin in v2.x. (Which will be released soon)

from freecad-bundle.

luzpaz avatar luzpaz commented on May 18, 2024

@looooo can we try this?

from freecad-bundle.

antony-jr avatar antony-jr commented on May 18, 2024

@luzpaz The PR is ready, Once the review is done, we can get user friendly GUI for updating looooo/freecad.appimage_updater#5

from freecad-bundle.

antony-jr avatar antony-jr commented on May 18, 2024

@luzpaz We can close this.

from freecad-bundle.

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.