Fix Fem Find Calculix binary (if installed) on Linux

This commit is contained in:
Bernd Hahnebach 2015-02-23 21:42:43 +01:00 committed by wmayer
parent 38eaf76dea
commit a6dd8870ab

View File

@ -213,8 +213,13 @@ class _JobControlTaskPanel:
# for the subcomponents, such as additions, subtractions.
# the categories are shown only if they are not empty.
self.form=FreeCADGui.PySideUic.loadUi(FreeCAD.getHomePath() + "Mod/Fem/MechanicalAnalysis.ui")
self.CalculixBinary = FreeCAD.getHomePath() +'bin/ccx.exe'
from platform import system
if system == 'Linux':
self.CalculixBinary = 'ccx'
elif system == 'Windows':
self.CalculixBinary = FreeCAD.getHomePath() + 'bin/ccx.exe'
else:
self.CalculixBinary = 'ccx'
self.TempDir = FreeCAD.ActiveDocument.TransientDir.replace('\\','/') + '/FemAnl_'+ object.Uid[-4:]
if not os.path.isdir(self.TempDir):
os.mkdir(self.TempDir)