appimage

Here's the place for discussion related to coding in FreeCAD, C++ or Python. Design, interfaces and structures.
User avatar
yorik
Site Admin
Posts: 10271
Joined: Tue Feb 17, 2009 9:16 pm
Location: São Paulo, Brazil
Contact:

appimage

Postby yorik » Fri Apr 29, 2016 3:03 am

http://appimage.org/

Have a look at this, I just tried one of those (krita) the other day, nice idea... Making one for FreeCAD would probably be really big and quite some work too, but it might be worth trying some day...
User avatar
NormandC
Posts: 17276
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: appimage

Postby NormandC » Fri Apr 29, 2016 3:16 am

AppImage has been around for years, but I haven't seen much use of it.

Ubuntu has introduced a similar concept with snap packages. Their goal is to eventually replace debian packages. We can already create snap packages on the PPA. But I think only Ubuntu 16.04 is supported.

https://developer.ubuntu.com/en/snappy/build-apps/
cox
Posts: 950
Joined: Wed Nov 26, 2014 11:37 pm

Re: appimage

Postby cox » Fri Apr 29, 2016 6:56 am

yorik wrote:http://appimage.org/

Have a look at this, I just tried one of those (krita) the other day, nice idea... Making one for FreeCAD would probably be really big and quite some work too, but it might be worth trying some day...
I think this is a excellent idea and a sensible way to go, as long as FreeCAD is under rapid development and third party library expansion(change).

It has possibility to do delta updates witch is cool.

What i do not like about it, is that this way of doing stuff removes(or further removes) the user from the development cycle, there is no easy way for the user to enter the source code and rebuild the exact binary he/she is using without replicating the setup of the creator of the appimage. I guess this problem is not solved yet in a cross distro way. Only possibility I see is statically linking and/or bringing/linking all libraries into freecad git in some way.

Please correct me if some of my assumptions are wrong on this.
Need help? Feel free to ask, but please read the guidelines first
triplus
Posts: 7640
Joined: Mon Dec 12, 2011 4:45 pm

Re: appimage

Postby triplus » Fri Apr 29, 2016 12:35 pm

I guess eventually FreeCAD wil have something like this as an option. @cox you include all the dependencies in the package and there is no need to do any installation after downloading. For example OpenShot started to support it and this is how it looks like:

http://www.openshot.org/download/

P.S. And Blender binary for Linux works in similar way (download -> extract -> run).
triplus
Posts: 7640
Joined: Mon Dec 12, 2011 4:45 pm

Re: appimage

Postby triplus » Fri Apr 29, 2016 1:11 pm

This is how OpenShot binaries are created:

https://github.com/OpenShot/openshot-qt ... er.py#L315

https://github.com/OpenShot/openshot-qt/issues/93

Basically everything is build on Linux and uploaded on daily basis. Similar libraries are used we will use eventually (Python 3 and Qt 5). Version information would i guess just work. ;)

But as for downsides adding further dependencies like OCE/OCC would increase the size of AppImage. For example OpenShot binary is at 188MB ATM. And there is the problem of download bandwidth.

P.S. On a bit unrelated note. In the future projects using Qt 5.6 + QtWebEngine (FreeCAD likely will use this in the future) will need to do their Windows builds on Windows:

https://bugreports.qt.io/browse/QTBUG-42725
triplus
Posts: 7640
Joined: Mon Dec 12, 2011 4:45 pm

Re: appimage

Postby triplus » Tue Dec 27, 2016 6:23 pm

While i was downloading AppImage for OpenShot i did a bit of research and here you can find AppImage file for FreeCAD:

https://twitter.com/probonopd/status/767802287980961792

https://bintray.com/probono/AppImages/FreeCAD/#files

To me it looks like it was produced by AppImage team and that is why i decided to test it. I tested it on Ubuntu 16.04 (64 bit) and it runs normally. There was one issue reported that i noticed about numpy (Assembly2 related). Maybe users on other distributions can try it out to see how good it works for them.

This option looks interesting:
Bundle your Travis CI builds as AppImages
And this might be of relevance:
How do I get support in bundling my app as an AppImage?

We try to help upstream application authors as good as we can, please open an issue in this project. If you are not an upstream application author, then please contact the upstream application author(s) first before you open an issue here.
Maybe in the future FreeCAD releases could be provided as AppImages for Linux users (PySide2/Qt5 variant likely could work). We can ask them for further guidance if one of the core devs opens an issue report there as instructed on their Wiki if we decide to explore this further in the future.
User avatar
sgrogan
Posts: 4618
Joined: Wed Oct 22, 2014 5:02 pm

Re: appimage

Postby sgrogan » Tue Dec 27, 2016 11:19 pm

triplus wrote:Maybe in the future FreeCAD releases could be provided as AppImages for Linux users
Please test this extensively!
It overcomes dependency problems at the expense of your package manager's protections.
It seems Winows'ish "Please install this virus, click OK to proceed."
It would be interesting what happens with the .cfg files and "macros" folder in a portable version.
triplus
Posts: 7640
Joined: Mon Dec 12, 2011 4:45 pm

Re: appimage

Postby triplus » Wed Dec 28, 2016 12:17 am

sgrogan wrote:It would be interesting what happens with the .cfg files and "macros" folder in a portable version.
Everything seems to work fine on Ubuntu (only numpy issue above was detected but i didn't test further on why). I can run macros from macro folder without issues.
It seems Winows'ish "Please install this virus, click OK to proceed."
Actually you don't install anything as it's a single portable package/file. From user point of view Mac/Windows (portable) installers available on the GitHub are the same thing. AppImage therefore could be downloaded from our download area for releases on the GitHub and it should run on Ubuntu/Arch/Fedora/OpenSUSE... distributions by making the downloaded file executable and after by clicking on it.

P.S. As a bonus mentioned FreeCAD AppImage offers to add desktop launcher. Reading the documentation having file association support should be possible. As i didn't select this option for now it could be the file association support is already provided.
User avatar
sgrogan
Posts: 4618
Joined: Wed Oct 22, 2014 5:02 pm

Re: appimage

Postby sgrogan » Wed Dec 28, 2016 12:56 am

triplus wrote:Actually you don't install anything as it's a single portable package/file. From user point of view Mac/Windows (portable) installers available on the GitHub are the same thing.
This is my point. Linux users are giving up security for convenience. Win and to a lesser extent OSX users have accepted this. I think that this has it's place but it's not Utopia.
triplus wrote:Everything seems to work fine on Ubuntu (only numpy issue above was detected but i didn't test further on why). I can run macros from macro folder without issues.
Is this created locally, or is this portable as well. What about called executables like Graphviz, OpenSACD, Gmeah, and Calculix?
triplus
Posts: 7640
Joined: Mon Dec 12, 2011 4:45 pm

Re: appimage

Postby triplus » Wed Dec 28, 2016 1:31 am

sgrogan wrote:This is my point. Linux users are giving up security for convenience. Win and to a lesser extent OSX users have accepted this. I think that this has it's place but it's not Utopia.
Not necessarily. That mostly comes down to us. If we would provide FreeCAD 0.17 AppImage (after FreeCAD 0.17 is released) and some security issue would be reported in one of the libraries in the provided AppImage. And Linux distribution AppImage was made on would get the security update. Re-creating and re-uploading the AppImage should remove the security issue and security would again be on pair with the Linux distribution AppImage was created on.
Is this created locally, or is this portable as well. What about called executables like Graphviz, OpenSACD, Gmeah, and Calculix?
As for config files, local Mod and Macro folders ... it uses the same ones as the other FreeCAD versions (from repository, PPA or self compiled). I did a quick test and the dependency graph command and POV-Ray work OK.

P.S. Here we would have additional option for Linux users:

https://github.com/FreeCAD/FreeCAD/releases

Instead of only providing the Source code package for Linux users as we currently do. ;)