appimage

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!
triplus
Veteran
Posts: 9471
Joined: Mon Dec 12, 2011 4:45 pm

Re: appimage

Post by triplus »

I did some further tests today and just based on the FreeCAD info and what packages i had installed on the system FreeCAD 0.17 dev/OCE/Qt/Python2.7/Coin ... are all provided in the package and therefore don't have to be installed on the target system.
probono
Posts: 42
Joined: Wed Dec 28, 2016 10:16 pm

Re: appimage

Post by probono »

Hello, AppImage developer here. Let me know what needs to be done in order for the FreeCAD project to consider providing an official AppImage.
triplus
Veteran
Posts: 9471
Joined: Mon Dec 12, 2011 4:45 pm

Re: appimage

Post by triplus »

probono wrote:Hello, AppImage developer here. Let me know what needs to be done in order for the FreeCAD project to consider providing an official AppImage.
Hi @probono.

As you have the needed expertise and i have seen you providing help to other projects. Could you explain roughly what is the procedure to create FreeCAD AppImage. Like the one you made and it is available at bintray? I do believe something like that could work for FreeCAD Linux users. FreeCAD is released annually and uploading the AppImage for the release would enable the Linux users to try it out without compiling. And to have an option to for example put the downloaded AppImage on the USB key and run it on other Linux computers.

P.S. On a slightly unrelated note and as this is much more ambitious goal. Nonetheless do you believe it would be possible to automate uploading of Travis builds as AppImages to our GitHub releases page? Now this is more theoretical question for now but i asked as i am sure you will be able to provide clear answer.
probono
Posts: 42
Joined: Wed Dec 28, 2016 10:16 pm

Re: appimage

Post by probono »

Hi @triplus, thanks for considering AppImage.
Could you explain roughly what is the procedure to create FreeCAD AppImage. Like the one you made and it is available at bintray?
I am using the following file to convert the FreeCAD packages from the freecad-maintainers/freecad-daily PPA:
https://github.com/probonopd/AppImages/ ... reeCAD.yml

On a Ubuntu/debian machine, you can run this like so:

Code: Select all

wget https://raw.githubusercontent.com/probonopd/AppImages/master/recipes/meta/Recipe
bash Recipe FreeCAD
It will fetch the yml file from GitHub and run it.
do you believe it would be possible to automate uploading of Travis builds as AppImages to our GitHub releases page?
Totally. In fact, my example AppImage is produced using Travis CI in an automated way, but it is using debs as ingredients (to make things easier for me). So if you could have your Travis CI build produce a deb, then it would be trivially easy to convert my example from above into a fully automated AppImage builder using Travis CI and uploading the AppImage to GitHub Releases upon each commit. Since this is a common use case for AppImages, I have written a little helper script to do the uploading: https://github.com/probonopd/uploadtool

I also uploaded a newer test AppImage:
https://bintray.com/probono/AppImages/d ... 4.AppImage
Does it still have the numpy issue? (How can I reproduce it?)
triplus
Veteran
Posts: 9471
Joined: Mon Dec 12, 2011 4:45 pm

Re: appimage

Post by triplus »

Thanks for the information and new AppImage build. I will go over everything and provide more testing and feedback tomorrow.
triplus
Veteran
Posts: 9471
Joined: Mon Dec 12, 2011 4:45 pm

Re: appimage

Post by triplus »

Hi @probono.

I did a few test and as for feedback. If we start with numpy issue Assembly 2 module uses it (3rd Party) and as it is popular module this issue would need to be sorted out. Your last AppImage build sorted the issue out for me. As for the Travis. Basically what you are saying and based on my understanding we already do that for Mac:

https://github.com/FreeCAD/FreeCAD/blob ... travis.yml

Therefore i am guessing similar procedure could be used for uploading Linux AppImage builds? But to have fully automated procedure as you say .deb packages would need to be crated and things like AppImageKit would need to be fetched for each build and .travis.yml file would need to be tackled and ... ? Anyway if a simple solution could be provided it would be interesting to have such capability. But i do imagine maintainer with in depth knowledge would be required for achieving such goal.

And last but not least i created the folder on my Desktop (Ubuntu 16.04):

Code: Select all

wget https://raw.githubusercontent.com/probonopd/AppImages/master/recipes/meta/Recipe
bash Recipe FreeCAD
After around 15 minutes i had Recipe file + folder named FreeCAD in it with all fetched .deb packages for nice overview. And most importantly additional out folder and in it new working AppImage build with FreeCAD from daily PPA. Now in my opinion this is something worth uploading to GitHub for mayor FreeCAD releases. At least until it works like that and something doesn't break we won't know how to fix. ;)
probono
Posts: 42
Joined: Wed Dec 28, 2016 10:16 pm

Re: appimage

Post by probono »

Looking at what you are doing for the Mac, yes, AppImage works extremely similar. Actually you are doing pretty cool stuff there :-)
https://github.com/FreeCAD/FreeCAD/blob ... catable.py

I see you are building FreeCAD on Travis CI which is great. We could use the build artifacts from there and bundle them up into an AppImage similar to the following projects do:

https://github.com/search?utf8=✓&q=%22P ... rchresults

I was just using the debs in the ppa for convenience, because that way I could re-use the generic "deb to AppImage" script that I had already written.
User avatar
NormandC
Veteran
Posts: 18589
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: appimage

Post by NormandC »

probono wrote:I see you are building FreeCAD on Travis CI which is great. We could use the build artifacts from there and bundle them up into an AppImage (...)

I was just using the debs in the ppa for convenience
That's good to know. With Ubuntu apparently switching from deb to snap packages on their infrastructure, there's no guarantee the FreeCAD PPA will still exist in a couple of years.

O/T: apparently phpBB doesn't support URLs with special characters.
triplus
Veteran
Posts: 9471
Joined: Mon Dec 12, 2011 4:45 pm

Re: appimage

Post by triplus »

@probono

Creating FreeCAD daily AppImages on Travis feels like the hardest things to achieve and maintain (as when things break in depth knowledge is needed to fix them). If you have an idea on how to tackle it in straightforward fashion and would like to try it out proceed and do it. If not providing FreeCAD daily AppImages in the form of:

Code: Select all

wget https://raw.githubusercontent.com/probonopd/AppImages/master/recipes/meta/Recipe
bash Recipe FreeCAD
Works good. But it needs dedicated person to create packages and to upload them. Starting with FreeCAD 0.16 (latest stable) and to provide FreeCAD 0.16 as AppImage could therefore make sense as the first step. It's more or less one time deal and we can observe user feedback after.

I have some additional questions:

Would it make more sense to provide FreeCAD 0.16 based on Ubuntu 12.04 and Stable PPA? As reading about AppImage using older Ubuntu release could increase the chance for AppImage to work on more Linux distributions? Or do you feel Ubuntu 14.04 makes the most sense? As for 32/64 AppImage builds. How does that work? As for extended desktop integration. Should we enable it or not?
probono
Posts: 42
Joined: Wed Dec 28, 2016 10:16 pm

Re: appimage

Post by probono »

triplus wrote:Would it make more sense to provide FreeCAD 0.16 based on Ubuntu 12.04 and Stable PPA?
If we use deb/PPA ingredients for the AppImage, then I would recommend to use the ones for the oldest version that FreeCAD still can be compiled on. The freecad-maintainers/freecad-daily PPA only has Ubuntu 16.04. But since the freecad-maintainers/freecad-stable PPA has Ubuntu 12.04, we should use that.

Let me know if I should write the yml for freecad-stable, should be easy.
triplus wrote:As for 32/64 AppImage builds. How does that work?
In theory, just run the same yml on a 32-bit machine and you will get a 32-bit AppImage. In practice, I haven't actually tried it in a long time so the bash scripts would probably need to get some if statements... ;-)
triplus wrote:As for extended desktop integration. Should we enable it or not?
Why not?

As for the continuous builds on Travis CI, I will see if I can find some time at some point, depending on the level of interest in this. If there is real demand, I shall give it a try.
Post Reply