FreeCAD.getHomePath() not correct on Arch linux

Having trouble installing or compiling FreeCAD? Get help here.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
nokian
Posts: 40
Joined: Wed Sep 14, 2016 8:22 pm

Re: FreeCAD.getHomePath() not correct on Arch linux

Post by nokian »

@m42kus: Thanks for the information and the change to /opt.
Last edited by nokian on Wed Sep 21, 2016 1:31 pm, edited 1 time in total.
cox
Posts: 971
Joined: Wed Nov 26, 2014 11:37 pm

Re: FreeCAD.getHomePath() not correct on Arch linux

Post by cox »

m42kus wrote:Hi, freecad-netgen-git maintainer here (drhooves).

After I've read this thread I decided to move the installation of freecad-netgen-git
to /opt/freecad.
Just compiled your uppdated PKGBUILD and it seams to be working great(no more preloading VTK-qt4 libs :D ), can not wait to test further with different plugins. Thanks a lot m42kus/drhooves :D
Need help? Feel free to ask, but please read the guidelines first
simonvanderveldt
Posts: 62
Joined: Tue Mar 14, 2017 2:11 pm

Re: FreeCAD.getHomePath() not correct on Arch linux

Post by simonvanderveldt »

cox wrote:Now it finally seams that FreeCAD is behaving properly in my Arch installation.

All icons show, no more errors on startup.

I even can remove the Arch specific code from PluginManager. :D

I do not know if these changes would have any negative impact on other platforms.

Please advice on what to do next, to get this fixed.

...
Would you still be open to incorporating these changes into FreeCAD?
I'm running into the same issues as you are/were, trying to fix the ebuild for Gentoo. The build on Linux seems to be a bit of a mess, your suggested changes sound good, so I'd very much like to get them merged :)
I'd be happy to work together on verifying the changes and fixing and reviewing them.
cox
Posts: 971
Joined: Wed Nov 26, 2014 11:37 pm

Re: FreeCAD.getHomePath() not correct on Arch linux

Post by cox »

As most development and testing (on Linux side) is happening in Ubuntu I feel the practical solution would be to emulate the Ubuntu install under /opt. This has been done on https://aur.archlinux.org/packages/freecad-git/ and seams to work nicely. Not the cleanest way to do it in our distributions but at least plugins seams to be happier in general.

I do not possess the knowledge to fix this in a way that would be generic and general for all Linux distributions, but if you do I would be happy to be of any assistance.

My attempts to fix this earlier revealed that I did not have the complete overview on all ways thees folders was accessed, and as @werner points out in one of the threads concerning this, is that it was never a prioritized task by any developer to have this working in any general way.

If you can do a better job than me, and provide a patch that would solve this for all distros i am sure your patches will be accepted and merged by the main developers.
Need help? Feel free to ask, but please read the guidelines first
simonvanderveldt
Posts: 62
Joined: Tue Mar 14, 2017 2:11 pm

Re: FreeCAD.getHomePath() not correct on Arch linux

Post by simonvanderveldt »

cox wrote:As most development and testing (on Linux side) is happening in Ubuntu I feel the practical solution would be to emulate the Ubuntu install under /opt. This has been done on https://aur.archlinux.org/packages/freecad-git/ and seams to work nicely. Not the cleanest way to do it in our distributions but at least plugins seams to be happier in general.

I do not possess the knowledge to fix this in a way that would be generic and general for all Linux distributions, but if you do I would be happy to be of any assistance.

My attempts to fix this earlier revealed that I did not have the complete overview on all ways thees folders was accessed, and as @werner points out in one of the threads concerning this, is that it was never a prioritized task by any developer to have this working in any general way.

If you can do a better job than me, and provide a patch that would solve this for all distros i am sure your patches will be accepted and merged by the main developers.
Sounds good! Just started with some small steps which already brought forward some questions about the scope of FreeCAD's CMake/install scripts. I'll see first where that'll end up and then will start chipping away at fixing the install, shouldn't be too hard, it's just a lot of manual work :) I'll create a new topic when I'll start.
cox
Posts: 971
Joined: Wed Nov 26, 2014 11:37 pm

Re: FreeCAD.getHomePath() not correct on Arch linux

Post by cox »

simonvanderveldt wrote::) I'll create a new topic when I'll start.
Happy to see your progress :-)
Need help? Feel free to ask, but please read the guidelines first
User avatar
hobbes1069
Posts: 291
Joined: Wed Nov 09, 2011 3:49 pm
Location: Southaven, MS

Re: FreeCAD.getHomePath() not correct on Arch linux

Post by hobbes1069 »

simonvanderveldt wrote: Sun Mar 19, 2017 10:41 pm Sounds good! Just started with some small steps which already brought forward some questions about the scope of FreeCAD's CMake/install scripts. I'll see first where that'll end up and then will start chipping away at fixing the install, shouldn't be too hard, it's just a lot of manual work :) I'll create a new topic when I'll start.
I just found this thread... I've largely fixed the CMake side but ran into the same issue as the OP with all the various uses of finding the home path.. It took a bit to track down:

Code: Select all

FreeCAD.__ModDirs__ -> getHomePath() -> AppHomePath -> FindHomePath
I've submitted a pull request for review but obviously not complete yet...

https://github.com/FreeCAD/FreeCAD/pull/3525

Thanks,
Richard
Fedora FreeCAD maintainer
Post Reply