AppImage - Include auto-updating logic in to appimage directly?

Have some feature requests, feedback, cool stuff to share, or want to know where FreeCAD is going? This is the place.
Forum rules
Be nice to others! Read the FreeCAD code of conduct!
User avatar
Kunda1
Posts: 8378
Joined: Thu Jan 05, 2017 9:03 pm

AppImage - Include auto-updating logic in to appimage directly?

Postby Kunda1 » Thu Mar 19, 2020 1:27 pm

Name: Consider making the AppImage self-updatable from the menu
Ticket: https://github.com/FreeCAD/FreeCAD-AppImage/issues/27
Repo: https://github.com/antony-jr/AppImageUpdaterBridge
Note: this ticket was opened by @probonopd who developed the whole AppImage idea.

How do we do this?

The README says it's testable in this code:

Code: Select all

#include <QCoreApplication>
#include <AppImageUpdaterBridge>
int main(int argc, char **argv)
{
    using AppImageUpdaterBridge::AppImageDeltaRevisioner;

    QCoreApplication app(argc, argv);
    AppImageDeltaRevisioner DeltaRevisioner;
    QObject::connect(&DeltaRevisioner, &AppImageDeltaRevisioner::finished, &app, &QCoreApplication::quit);
    DeltaRevisioner.setShowLog(true); // Display logs?
    DeltaRevisioner.start();
    return app.exec();
}
Want to contribute back to FC? Checkout:
#lowhangingfruit | Use the Source, Luke. | How to Help FreeCAD | How to report FC bugs and features
User avatar
looo
Posts: 3465
Joined: Mon Nov 11, 2013 5:29 pm

Re: AppImage - Include auto-updating logic in to appimage directly?

Postby looo » Thu Mar 19, 2020 1:55 pm

Are there python bindings? I don't think we should make the source dependent on appimage-libraray (also not optional) and also we shouldn't make the package dependent on the appimage-library. I guess it's best to write an extension that adds the updating-process and install this extension during the appimage creation.
triplus
Posts: 9475
Joined: Mon Dec 12, 2011 4:45 pm

Re: AppImage - Include auto-updating logic in to appimage directly?

Postby triplus » Fri Mar 20, 2020 2:08 pm

I left a note on GitHub.

P.S. In short i feel that people using AppImages can handle a drag and drop operation just fine, for updating. And that already is an elegant and easy solution without introducing any additional maintenance burden and potential issues.
User avatar
Kunda1
Posts: 8378
Joined: Thu Jan 05, 2017 9:03 pm

Re: AppImage - Include auto-updating logic in to appimage directly?

Postby Kunda1 » Fri Mar 20, 2020 2:15 pm

looo wrote:
Thu Mar 19, 2020 1:55 pm
Are there python bindings? I don't think we should make the source dependent on appimage-libraray (also not optional) and also we shouldn't make the package dependent on the appimage-library. I guess it's best to write an extension that adds the updating-process and install this extension during the appimage creation.
See https://github.com/FreeCAD/FreeCAD-AppI ... -601215162 (the Edit part)
Want to contribute back to FC? Checkout:
#lowhangingfruit | Use the Source, Luke. | How to Help FreeCAD | How to report FC bugs and features
triplus
Posts: 9475
Joined: Mon Dec 12, 2011 4:45 pm

Re: AppImage - Include auto-updating logic in to appimage directly?

Postby triplus » Fri Mar 20, 2020 5:20 pm

I added an additional note on GitHub. Basically what we could do for now is to i guess package the library on Conda and hence include it in the AppImage (next development oriented AppImage). People could play with it after, from FreeCAD Python console. If anything comes out of it, like FreeCAD command providing a frontend, great, if not, just continue to use one of the AppImage updater tools available out there.

P.S. If we don't do that, and just continue to redirect people to using existing external updating tools, that is fine with me too.
User avatar
Kunda1
Posts: 8378
Joined: Thu Jan 05, 2017 9:03 pm

Re: AppImage - Include auto-updating logic in to appimage directly?

Postby Kunda1 » Sat Mar 21, 2020 4:53 pm

triplus wrote:
Fri Mar 20, 2020 5:20 pm
Basically what we could do for now is to i guess package the library on Conda and hence include it in the AppImage (next development oriented AppImage). People could play with it after, from FreeCAD Python console. If anything comes out of it, like FreeCAD command providing a frontend, great,
:+1:
Want to contribute back to FC? Checkout:
#lowhangingfruit | Use the Source, Luke. | How to Help FreeCAD | How to report FC bugs and features
User avatar
looo
Posts: 3465
Joined: Mon Nov 11, 2013 5:29 pm

Re: AppImage - Include auto-updating logic in to appimage directly?

Postby looo » Sat Mar 21, 2020 8:01 pm

recipe: https://github.com/FreeCAD/FreeCAD_Cond ... /meta.yaml
package: https://anaconda.org/freecad/appimage-u ... idge/files

but I am not sure how to build python bindings. Anyone familiar with shiboken? sry didn't see the link @kunda posted.
User avatar
antonyjr
Posts: 24
Joined: Sat Mar 21, 2020 9:35 pm
Contact:

Re: AppImage - Include auto-updating logic in to appimage directly?

Postby antonyjr » Sat Mar 21, 2020 9:40 pm

Thank you for creating the package.

The problem with the build is that you are using the stable version 1.1.6 which does not implement the interface for Qt plugin loader, The implementation is still in alpha and it is present in the plugin branch of the git repo. If possible, please use that branch to build the package to test out the plugin feature.

Also only the qmake project file has the logic to build it has a plugin.
User avatar
looo
Posts: 3465
Joined: Mon Nov 11, 2013 5:29 pm

Re: AppImage - Include auto-updating logic in to appimage directly?

Postby looo » Sun Mar 22, 2020 6:36 am

antonyjr wrote:
Sat Mar 21, 2020 9:40 pm
The problem with the build is that you are using the stable version 1.1.6 which does not implement the interface for Qt plugin loader, The implementation is still in alpha and it is present in the plugin branch of the git repo. If possible, please use that branch to build the package to test out the plugin feature.
I see.
antonyjr wrote:
Sat Mar 21, 2020 9:40 pm
Also only the qmake project file has the logic to build it has a plugin.
Any chance to add the plugin logic to cmake? qmake is a pain with conda-build (at least for me).
User avatar
antonyjr
Posts: 24
Joined: Sat Mar 21, 2020 9:35 pm
Contact:

Re: AppImage - Include auto-updating logic in to appimage directly?

Postby antonyjr » Sun Mar 22, 2020 4:10 pm

looo wrote:
Sun Mar 22, 2020 6:36 am
Any chance to add the plugin logic to cmake? qmake is a pain with conda-build (at least for me).
@looo sure I can. Just wait a bit, I will release all the documentation and also the instruction to build the plugin with cmake ASAP.
.