diff --git a/CMakeLists.txt b/CMakeLists.txt index 19fc71865..09fea1e0e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -702,8 +702,13 @@ ELSE(MSVC) MESSAGE(STATUS "Build type: ${CMAKE_BUILD_TYPE}") ENDIF(MSVC) IF(MINGW) - SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mthreads") - SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mthreads") + # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=12477 + # Actually '-Wno-inline-dllimport' should work to suppress warnings of the form: + # inline function 'foo' is declared as dllimport: attribute ignored + # But it doesn't work with MinGW gcc 4.5.0 while using '-Wno-attributes' seems to + # do the trick. + SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mthreads -Wno-attributes") + SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mthreads -Wno-attributes") SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -mthreads -Wl,--export-all-symbols") SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -mthreads -Wl,--export-all-symbols") # http://stackoverflow.com/questions/8375310/warning-auto-importing-has-been-activated-without-enable-auto-import-specifie diff --git a/src/Mod/PartDesign/Gui/Workbench.cpp b/src/Mod/PartDesign/Gui/Workbench.cpp index c1dcaac3d..7912f968b 100644 --- a/src/Mod/PartDesign/Gui/Workbench.cpp +++ b/src/Mod/PartDesign/Gui/Workbench.cpp @@ -191,11 +191,13 @@ Gui::MenuItem* Workbench::setupMenuBar() const << "PartDesign_LinearPattern" << "PartDesign_PolarPattern" // << "PartDesign_Scaled" - << "PartDesign_MultiTransform" - << "PartDesign_InvoluteGear"; + << "PartDesign_MultiTransform"; // For 0.13 a couple of python packages like numpy, matplotlib and others // are not deployed with the installer on Windows. Thus, the WizardShaft is // not deployed either hence the check for the existence of the command. + if (Gui::Application::Instance->commandManager().getCommandByName("PartDesign_InvoluteGear")) { + *part << "PartDesign_InvoluteGear"; + } if (Gui::Application::Instance->commandManager().getCommandByName("PartDesign_WizardShaft")) { *part << "Separator" << "PartDesign_WizardShaft"; } diff --git a/src/Mod/PartDesign/InitGui.py b/src/Mod/PartDesign/InitGui.py index 855d3d8a6..05732d188 100644 --- a/src/Mod/PartDesign/InitGui.py +++ b/src/Mod/PartDesign/InitGui.py @@ -69,10 +69,13 @@ class PartDesignWorkbench ( Workbench ): try: from WizardShaft import WizardShaft except: - print "Wizard shaft not installed" + print "Wizard shaft module cannot be loaded" import PartDesignGui import PartDesign - import InvoluteGearFeature + try: + import InvoluteGearFeature + except: + print "Involute gear module cannot be loaded" def GetClassName(self): return "PartDesignGui::Workbench"