diff --git a/src/App/DocumentPyImp.cpp b/src/App/DocumentPyImp.cpp index 4b5d805d4..c24be3cc4 100644 --- a/src/App/DocumentPyImp.cpp +++ b/src/App/DocumentPyImp.cpp @@ -182,12 +182,14 @@ PyObject* DocumentPy::removeObject(PyObject *args) PyObject* DocumentPy::copyObject(PyObject *args) { - PyObject *obj, *rec=0, *keep=0; + PyObject *obj, *rec=Py_False, *keep=Py_False; if (!PyArg_ParseTuple(args, "O!|O!O!",&(DocumentObjectPy::Type),&obj,&PyBool_Type,&rec,&PyBool_Type,&keep)) return NULL; // NULL triggers exception DocumentObjectPy* docObj = static_cast(obj); - DocumentObject* copy = getDocumentPtr()->copyObject(docObj->getDocumentObjectPtr(), rec==Py_True, keep==Py_True); + DocumentObject* copy = getDocumentPtr()->copyObject(docObj->getDocumentObjectPtr(), + PyObject_IsTrue(rec) ? true : false, + PyObject_IsTrue(keep)? true : false); if (copy) { return copy->getPyObject(); } @@ -199,12 +201,12 @@ PyObject* DocumentPy::copyObject(PyObject *args) PyObject* DocumentPy::moveObject(PyObject *args) { - PyObject *obj, *rec=0; + PyObject *obj, *rec=Py_False; if (!PyArg_ParseTuple(args, "O!|O!",&(DocumentObjectPy::Type),&obj,&PyBool_Type,&rec)) return NULL; // NULL triggers exception DocumentObjectPy* docObj = static_cast(obj); - DocumentObject* move = getDocumentPtr()->moveObject(docObj->getDocumentObjectPtr(), rec==Py_True); + DocumentObject* move = getDocumentPtr()->moveObject(docObj->getDocumentObjectPtr(), PyObject_IsTrue(rec) ? true : false); if (move) { return move->getPyObject(); } @@ -309,36 +311,36 @@ PyObject* DocumentPy::findObjects(PyObject *args) char *sType="App::DocumentObject", *sName=0; if (!PyArg_ParseTuple(args, "|ss",&sType, &sName)) // convert args: Python->C return NULL; // NULL triggers exception - - Base::Type type = Base::Type::fromName(sType); - if (type == Base::Type::badType()) { - PyErr_Format(PyExc_Exception, "'%s' is not a valid type", sType); - return NULL; - } - - if (!type.isDerivedFrom(App::DocumentObject::getClassTypeId())) { - PyErr_Format(PyExc_Exception, "Type '%s' does not inherit from 'App::DocumentObject'", sType); - return NULL; - } - - std::vector res; - - if (sName) { - try { - res = getDocumentPtr()->findObjects(type, sName); - } - catch (const boost::regex_error& e) { - PyErr_SetString(PyExc_RuntimeError, e.what()); - return 0; - } - } - else { - res = getDocumentPtr()->getObjectsOfType(type); - } - - Py_ssize_t index=0; - PyObject* list = PyList_New((Py_ssize_t)res.size()); - for (std::vector::const_iterator It = res.begin();It != res.end();++It, index++) + + Base::Type type = Base::Type::fromName(sType); + if (type == Base::Type::badType()) { + PyErr_Format(PyExc_Exception, "'%s' is not a valid type", sType); + return NULL; + } + + if (!type.isDerivedFrom(App::DocumentObject::getClassTypeId())) { + PyErr_Format(PyExc_Exception, "Type '%s' does not inherit from 'App::DocumentObject'", sType); + return NULL; + } + + std::vector res; + + if (sName) { + try { + res = getDocumentPtr()->findObjects(type, sName); + } + catch (const boost::regex_error& e) { + PyErr_SetString(PyExc_RuntimeError, e.what()); + return 0; + } + } + else { + res = getDocumentPtr()->getObjectsOfType(type); + } + + Py_ssize_t index=0; + PyObject* list = PyList_New((Py_ssize_t)res.size()); + for (std::vector::const_iterator It = res.begin();It != res.end();++It, index++) PyList_SetItem(list, index, (*It)->getPyObject()); return list; } diff --git a/src/App/FeaturePythonPyImp.cpp b/src/App/FeaturePythonPyImp.cpp index 42d90cdd4..3a6fb3958 100644 --- a/src/App/FeaturePythonPyImp.cpp +++ b/src/App/FeaturePythonPyImp.cpp @@ -51,7 +51,8 @@ PyObject* FeaturePythonPy::addProperty(PyObject *args) return NULL; // NULL triggers exception Property* prop=0; - prop = getFeaturePythonPtr()->addDynamicProperty(sType,sName,sGroup,sDoc,attr,ro==Py_True,hd==Py_True); + prop = getFeaturePythonPtr()->addDynamicProperty(sType,sName,sGroup,sDoc,attr, + PyObject_IsTrue(ro) ? true : false, PyObject_IsTrue(hd) ? true : false); if (!prop) { std::stringstream str; diff --git a/src/App/PropertyStandard.cpp b/src/App/PropertyStandard.cpp index 59a407f70..3918d0c36 100644 --- a/src/App/PropertyStandard.cpp +++ b/src/App/PropertyStandard.cpp @@ -1347,7 +1347,7 @@ PyObject *PropertyBool::getPyObject(void) void PropertyBool::setPyObject(PyObject *value) { if (PyBool_Check(value)) - setValue(value == Py_True); + setValue(PyObject_IsTrue(value)!=0); else if(PyInt_Check(value)) setValue(PyInt_AsLong(value)!=0); else { diff --git a/src/Base/PreCompiled.h b/src/Base/PreCompiled.h index 8d9663454..69bdb90f7 100644 --- a/src/Base/PreCompiled.h +++ b/src/Base/PreCompiled.h @@ -97,25 +97,26 @@ #include #include -#include -#include -#include +#include +#include +#include #include - -// QtCore -#include -#include + +// QtCore +#include +#include #include #include -#include -#include +#include +#include #include #include #include #include #include +#include + - #endif //_PreComp_ #endif // BASE_PRECOMPILED_H diff --git a/src/Base/Uuid.cpp b/src/Base/Uuid.cpp index 96ebedf18..9080d338f 100644 --- a/src/Base/Uuid.cpp +++ b/src/Base/Uuid.cpp @@ -26,6 +26,8 @@ #ifndef _PreComp_ # ifdef FC_OS_WIN32 # include +# else +# include # endif #endif @@ -63,7 +65,6 @@ Uuid::~Uuid() //************************************************************************** // Get the UUID //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - std::string Uuid::CreateUuid(void) { #ifdef FC_OS_WIN32 @@ -82,6 +83,12 @@ std::string Uuid::CreateUuid(void) /* convert it from rcp memory to our own */ //container = nssUTF8_Duplicate(uuidStr, NULL); RpcStringFree(&uuidStr); +#elif 1 + std::string Uuid; + QString uuid = QUuid::createUuid().toString(); + uuid = uuid.mid(1); + uuid.chop(1); + Uuid = (const char*)uuid.toAscii(); #else // use Python's implemententation std::string Uuid; @@ -100,3 +107,4 @@ std::string Uuid::CreateUuid(void) #endif return Uuid; } + diff --git a/src/Gui/BlenderNavigationStyle.cpp b/src/Gui/BlenderNavigationStyle.cpp index a33763596..2b782a19f 100644 --- a/src/Gui/BlenderNavigationStyle.cpp +++ b/src/Gui/BlenderNavigationStyle.cpp @@ -83,6 +83,9 @@ SbBool BlenderNavigationStyle::processSoEvent(const SoEvent * const ev) // which influence the seek mode itself -- these are handled further // up the inheritance hierarchy. if (this->isSeekMode()) { return inherited::processSoEvent(ev); } + // Switch off viewing mode (Bug #0000911) + if (!this->isSeekMode() && this->isViewing()) + this->setViewing(false); // by default disable viewing mode to render the scene const SoType type(ev->getTypeId()); diff --git a/src/Gui/CADNavigationStyle.cpp b/src/Gui/CADNavigationStyle.cpp index b7aae8f48..0aded9a73 100644 --- a/src/Gui/CADNavigationStyle.cpp +++ b/src/Gui/CADNavigationStyle.cpp @@ -85,6 +85,7 @@ SbBool CADNavigationStyle::processSoEvent(const SoEvent * const ev) // up the inheritance hierarchy. if (this->isSeekMode()) { return inherited::processSoEvent(ev); } #else + // Switch off viewing mode (Bug #0000911) if (!this->isSeekMode() && this->isViewing()) this->setViewing(false); // by default disable viewing mode to render the scene #endif diff --git a/src/Gui/CommandMacro.cpp b/src/Gui/CommandMacro.cpp index 3c8f13f94..50e09f842 100644 --- a/src/Gui/CommandMacro.cpp +++ b/src/Gui/CommandMacro.cpp @@ -164,14 +164,16 @@ StdCmdMacroStartDebug::StdCmdMacroStartDebug() void StdCmdMacroStartDebug::activated(int iMsg) { - doCommand(Command::Gui,"Gui.SendMsgToActiveView(\"StartDebug\")"); + PythonDebugger* dbg = Application::Instance->macroManager()->debugger(); + if (!dbg->isRunning()) + doCommand(Command::Gui,"Gui.SendMsgToActiveView(\"StartDebug\")"); + else + dbg->stepRun(); } bool StdCmdMacroStartDebug::isActive(void) { - static PythonDebugger* dbg = Application::Instance->macroManager()->debugger(); - return (!dbg->isRunning() && - getGuiApplication()->sendHasMsgToActiveView("StartDebug")); + return getGuiApplication()->sendHasMsgToActiveView("StartDebug"); } DEF_STD_CMD_A(StdCmdMacroStopDebug); @@ -226,6 +228,32 @@ bool StdCmdMacroStepOver::isActive(void) return dbg->isRunning(); } +DEF_STD_CMD_A(StdCmdMacroStepInto); + +StdCmdMacroStepInto::StdCmdMacroStepInto() + : Command("Std_MacroStepInto") +{ + sGroup = QT_TR_NOOP("Macro"); + sMenuText = QT_TR_NOOP("Step into"); + sToolTipText = QT_TR_NOOP("Step into"); + //sWhatsThis = "Std_MacroStepOver"; + sStatusTip = QT_TR_NOOP("Step into"); + sPixmap = 0; + sAccel = "F11"; + eType = 0; +} + +void StdCmdMacroStepInto::activated(int iMsg) +{ + Application::Instance->macroManager()->debugger()->stepInto(); +} + +bool StdCmdMacroStepInto::isActive(void) +{ + static PythonDebugger* dbg = Application::Instance->macroManager()->debugger(); + return dbg->isRunning(); +} + DEF_STD_CMD_A(StdCmdToggleBreakpoint); StdCmdToggleBreakpoint::StdCmdToggleBreakpoint() @@ -263,6 +291,7 @@ void CreateMacroCommands(void) rcCmdMgr.addCommand(new StdCmdMacroStartDebug()); rcCmdMgr.addCommand(new StdCmdMacroStopDebug()); rcCmdMgr.addCommand(new StdCmdMacroStepOver()); + rcCmdMgr.addCommand(new StdCmdMacroStepInto()); rcCmdMgr.addCommand(new StdCmdToggleBreakpoint()); } diff --git a/src/Gui/EditorView.cpp b/src/Gui/EditorView.cpp index 4566a4117..034564a3f 100644 --- a/src/Gui/EditorView.cpp +++ b/src/Gui/EditorView.cpp @@ -507,7 +507,7 @@ bool PythonEditorView::onMsg(const char* pMsg,const char** ppReturn) return true; } else if (strcmp(pMsg,"StartDebug")==0) { - startDebug(); + QTimer::singleShot(300, this, SLOT(startDebug())); return true; } else if (strcmp(pMsg,"ToggleBreakpoint")==0) { diff --git a/src/Gui/InventorNavigationStyle.cpp b/src/Gui/InventorNavigationStyle.cpp index 2ebc53371..1f48dd4b1 100644 --- a/src/Gui/InventorNavigationStyle.cpp +++ b/src/Gui/InventorNavigationStyle.cpp @@ -83,6 +83,9 @@ SbBool InventorNavigationStyle::processSoEvent(const SoEvent * const ev) // which influence the seek mode itself -- these are handled further // up the inheritance hierarchy. if (this->isSeekMode()) { return inherited::processSoEvent(ev); } + // Switch off viewing mode (Bug #0000911) + if (!this->isSeekMode() && this->isViewing()) + this->setViewing(false); // by default disable viewing mode to render the scene const SoType type(ev->getTypeId()); diff --git a/src/Gui/PythonDebugger.cpp b/src/Gui/PythonDebugger.cpp index fc7b432c8..45952dc60 100644 --- a/src/Gui/PythonDebugger.cpp +++ b/src/Gui/PythonDebugger.cpp @@ -236,9 +236,10 @@ Py::Object PythonDebugStderr::repr() Py::Object PythonDebugStderr::write(const Py::Tuple& args) { char *msg; - PyObject* pObj; + //PyObject* pObj; //args contains a single parameter which is the string to write. - if (!PyArg_ParseTuple(args.ptr(), "Os:OutputDebugString", &pObj, &msg)) + //if (!PyArg_ParseTuple(args.ptr(), "Os:OutputDebugString", &pObj, &msg)) + if (!PyArg_ParseTuple(args.ptr(), "s:OutputDebugString", &msg)) throw Py::Exception(); if (strlen(msg) > 0) @@ -248,6 +249,7 @@ Py::Object PythonDebugStderr::write(const Py::Tuple& args) //send it to the debugger as well //g_DebugSocket.SendMessage(eMSG_TRACE, msg); + Base::Console().Error("%s", msg); } return Py::None(); @@ -417,9 +419,42 @@ void PythonDebugger::runFile(const QString& fn) { try { RunningState state(d->running); - Base::Interpreter().runFile((const char*)fn.toUtf8(), true); + QByteArray pxFileName = fn.toUtf8(); +#ifdef FC_OS_WIN32 + Base::FileInfo fi((const char*)pxFileName); + FILE *fp = _wfopen(fi.toStdWString().c_str(),L"r"); +#else + FILE *fp = fopen((const char*)pxFileName,"r"); +#endif + if (!fp) return; + + Base::PyGILStateLocker locker; + PyObject *module, *dict; + module = PyImport_AddModule("__main__"); + dict = PyModule_GetDict(module); + dict = PyDict_Copy(dict); + if (PyDict_GetItemString(dict, "__file__") == NULL) { + PyObject *f = PyString_FromString((const char*)pxFileName); + if (f == NULL) + return; + if (PyDict_SetItemString(dict, "__file__", f) < 0) { + Py_DECREF(f); + return; + } + Py_DECREF(f); + } + + PyObject *result = PyRun_File(fp, (const char*)pxFileName, Py_file_input, dict, dict); + fclose(fp); + Py_DECREF(dict); + + if (!result) + PyErr_Print(); + else + Py_DECREF(result); } - catch (const Base::PyException&) { + catch (const Base::PyException&/* e*/) { + //PySys_WriteStderr("Exception: %s\n", e.what()); } catch (...) { Base::Console().Warning("Unknown exception thrown during macro debugging\n"); @@ -474,6 +509,16 @@ void PythonDebugger::stepOver() signalNextStep(); } +void PythonDebugger::stepInto() +{ + signalNextStep(); +} + +void PythonDebugger::stepRun() +{ + signalNextStep(); +} + void PythonDebugger::showDebugMarker(const QString& fn, int line) { PythonEditorView* edit = 0; @@ -524,7 +569,7 @@ int PythonDebugger::tracer_callback(PyObject *obj, PyFrameObject *frame, int wha //int no; //no = frame->f_tstate->recursion_depth; - //char* name = PyString_AsString(frame->f_code->co_name); + //std::string funcname = PyString_AsString(frame->f_code->co_name); QString file = QString::fromUtf8(PyString_AsString(frame->f_code->co_filename)); switch (what) { case PyTrace_CALL: diff --git a/src/Gui/PythonDebugger.h b/src/Gui/PythonDebugger.h index a42ff5a56..e3af16ebe 100644 --- a/src/Gui/PythonDebugger.h +++ b/src/Gui/PythonDebugger.h @@ -169,6 +169,8 @@ public: bool stop(); void tryStop(); void stepOver(); + void stepInto(); + void stepRun(); void showDebugMarker(const QString&, int line); void hideDebugMarker(const QString&); diff --git a/src/Gui/PythonEditor.h b/src/Gui/PythonEditor.h index f64e9ddf5..0db11c9e0 100644 --- a/src/Gui/PythonEditor.h +++ b/src/Gui/PythonEditor.h @@ -45,7 +45,6 @@ public: PythonEditor(QWidget *parent = 0); ~PythonEditor(); - void startDebug(); void toggleBreakpoint(); void showDebugMarker(int line); void hideDebugMarker(); @@ -62,6 +61,7 @@ public Q_SLOTS: */ void onUncomment(); void setFileName(const QString&); + void startDebug(); protected: /** Pops up the context menu with some extensions */ diff --git a/src/Gui/SelectionObjectPyImp.cpp b/src/Gui/SelectionObjectPyImp.cpp index a9b4b2503..5cd52a9f3 100644 --- a/src/Gui/SelectionObjectPyImp.cpp +++ b/src/Gui/SelectionObjectPyImp.cpp @@ -1,3 +1,24 @@ +/*************************************************************************** + * Copyright (c) 2009 Juergen Riegel (FreeCAD@juergen-riegel.net) * + * * + * This file is part of the FreeCAD CAx development system. * + * * + * This library is free software; you can redistribute it and/or * + * modify it under the terms of the GNU Library General Public * + * License as published by the Free Software Foundation; either * + * version 2 of the License, or (at your option) any later version. * + * * + * This library is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU Library General Public License for more details. * + * * + * You should have received a copy of the GNU Library General Public * + * License along with this library; see the file COPYING.LIB. If not, * + * write to the Free Software Foundation, Inc., 59 Temple Place, * + * Suite 330, Boston, MA 02111-1307, USA * + * * + ***************************************************************************/ #include "PreCompiled.h" diff --git a/src/Gui/SoFCUnifiedSelection.cpp b/src/Gui/SoFCUnifiedSelection.cpp index 77929a281..f8f42764b 100644 --- a/src/Gui/SoFCUnifiedSelection.cpp +++ b/src/Gui/SoFCUnifiedSelection.cpp @@ -105,8 +105,6 @@ SoFCUnifiedSelection::SoFCUnifiedSelection() : viewer(0) SO_NODE_SET_SF_ENUM_TYPE (highlightMode, HighlightModes); highlighted = FALSE; - bShift = FALSE; - bCtrl = FALSE; } /*! @@ -414,22 +412,6 @@ SoFCUnifiedSelection::handleEvent(SoHandleEventAction * action) } } } - // key press events - else if (event->isOfType(SoKeyboardEvent ::getClassTypeId())) { - SoKeyboardEvent * const e = (SoKeyboardEvent *) event; - if (SoKeyboardEvent::isKeyPressEvent(e,SoKeyboardEvent::LEFT_SHIFT) || - SoKeyboardEvent::isKeyPressEvent(e,SoKeyboardEvent::RIGHT_SHIFT) ) - bShift = true; - if (SoKeyboardEvent::isKeyReleaseEvent(e,SoKeyboardEvent::LEFT_SHIFT) || - SoKeyboardEvent::isKeyReleaseEvent(e,SoKeyboardEvent::RIGHT_SHIFT) ) - bShift = false; - if (SoKeyboardEvent::isKeyPressEvent(e,SoKeyboardEvent::LEFT_CONTROL) || - SoKeyboardEvent::isKeyPressEvent(e,SoKeyboardEvent::RIGHT_CONTROL) ) - bCtrl = true; - if (SoKeyboardEvent::isKeyReleaseEvent(e,SoKeyboardEvent::LEFT_CONTROL) || - SoKeyboardEvent::isKeyReleaseEvent(e,SoKeyboardEvent::RIGHT_CONTROL) ) - bCtrl = false; - } // mouse press events for (de)selection else if (event->isOfType(SoMouseButtonEvent::getClassTypeId()) && selectionMode.getValue() == SoFCUnifiedSelection::ON) { @@ -449,7 +431,7 @@ SoFCUnifiedSelection::handleEvent(SoHandleEventAction * action) std::string documentName = vpd->getObject()->getDocument()->getName(); std::string objectName = vpd->getObject()->getNameInDocument(); std::string subElementName = vpd->getElement(pp ? pp->getDetail() : 0); - if (bCtrl) { + if (event->wasCtrlDown()) { if (Gui::Selection().isSelected(documentName.c_str() ,objectName.c_str() ,subElementName.c_str())) { diff --git a/src/Gui/SoFCUnifiedSelection.h b/src/Gui/SoFCUnifiedSelection.h index 491c2d2c1..db6cf1183 100644 --- a/src/Gui/SoFCUnifiedSelection.h +++ b/src/Gui/SoFCUnifiedSelection.h @@ -107,9 +107,6 @@ private: SbBool highlighted; SoColorPacker colorpacker; - - SbBool bShift; - SbBool bCtrl; }; /** diff --git a/src/Gui/TouchpadNavigationStyle.cpp b/src/Gui/TouchpadNavigationStyle.cpp index 9eca5aafc..cef63a384 100644 --- a/src/Gui/TouchpadNavigationStyle.cpp +++ b/src/Gui/TouchpadNavigationStyle.cpp @@ -83,6 +83,9 @@ SbBool TouchpadNavigationStyle::processSoEvent(const SoEvent * const ev) // which influence the seek mode itself -- these are handled further // up the inheritance hierarchy. if (this->isSeekMode()) { return inherited::processSoEvent(ev); } + // Switch off viewing mode (Bug #0000911) + if (!this->isSeekMode() && this->isViewing()) + this->setViewing(false); // by default disable viewing mode to render the scene const SoType type(ev->getTypeId()); diff --git a/src/Gui/View3DInventorViewer.cpp b/src/Gui/View3DInventorViewer.cpp index 6a0b733c5..9cc832e60 100644 --- a/src/Gui/View3DInventorViewer.cpp +++ b/src/Gui/View3DInventorViewer.cpp @@ -525,9 +525,14 @@ void View3DInventorViewer::savePicture(const char* filename, int w, int h, // if we use transparency then we must not set a background color switch(eBackgroundType){ case Current: - useBackground = true; - cb = new SoCallback; - cb->setCallback(clearBuffer); + if (backgroundroot->findChild(pcBackGround) == -1) { + renderer.setBackgroundColor(this->getBackgroundColor()); + } + else { + useBackground = true; + cb = new SoCallback; + cb->setCallback(clearBuffer); + } break; case White: renderer.setBackgroundColor( SbColor(1.0, 1.0, 1.0) ); @@ -595,9 +600,14 @@ void View3DInventorViewer::savePicture(int w, int h, int eBackgroundType, QImage // if we use transparency then we must not set a background color switch(eBackgroundType){ case Current: - useBackground = true; - cb = new SoCallback; - cb->setCallback(clearBuffer); + if (backgroundroot->findChild(pcBackGround) == -1) { + renderer.setBackgroundColor(this->getBackgroundColor()); + } + else { + useBackground = true; + cb = new SoCallback; + cb->setCallback(clearBuffer); + } break; case White: renderer.setBackgroundColor( SbColor(1.0, 1.0, 1.0) ); diff --git a/src/Gui/View3DPy.cpp b/src/Gui/View3DPy.cpp index 1fd6e034e..889712108 100644 --- a/src/Gui/View3DPy.cpp +++ b/src/Gui/View3DPy.cpp @@ -464,7 +464,7 @@ Py::Object View3DInventorPy::viewRotateRight(const Py::Tuple& args) Py::Object View3DInventorPy::setCameraOrientation(const Py::Tuple& args) { PyObject* o; - PyObject* m=0; + PyObject* m=Py_False; if (!PyArg_ParseTuple(args.ptr(), "O!|O!", &PyTuple_Type, &o, &PyBool_Type, &m)) throw Py::Exception(); @@ -474,7 +474,7 @@ Py::Object View3DInventorPy::setCameraOrientation(const Py::Tuple& args) float q1 = (float)Py::Float(tuple[1]); float q2 = (float)Py::Float(tuple[2]); float q3 = (float)Py::Float(tuple[3]); - _view->getViewer()->setCameraOrientation(SbRotation(q0, q1, q2, q3), m==Py_True); + _view->getViewer()->setCameraOrientation(SbRotation(q0, q1, q2, q3), PyObject_IsTrue(m)); } catch (const Base::Exception& e) { throw Py::Exception(e.what()); diff --git a/src/Gui/ViewProviderGeometryObject.cpp b/src/Gui/ViewProviderGeometryObject.cpp index 4b5b33c3a..a4394338c 100644 --- a/src/Gui/ViewProviderGeometryObject.cpp +++ b/src/Gui/ViewProviderGeometryObject.cpp @@ -290,6 +290,11 @@ void ViewProviderGeometryObject::unsetEdit(int ModNum) // The manipulator has a sensor as user data and this sensor contains the view provider SoCenterballManip * manip = static_cast(path->getTail()); SoNodeSensor* sensor = reinterpret_cast(manip->getUserData()); + // #0000939: Pressing Escape while pivoting a box crashes + // #0000942: Crash when 2xdouble-click on part + SoDragger* dragger = manip->getDragger(); + if (dragger && dragger->getHandleEventAction()) + dragger->grabEventsCleanup(); // detach sensor sensor->detach(); diff --git a/src/Gui/ViewProviderPythonFeaturePyImp.cpp b/src/Gui/ViewProviderPythonFeaturePyImp.cpp index badd7a56f..ddd2816a4 100644 --- a/src/Gui/ViewProviderPythonFeaturePyImp.cpp +++ b/src/Gui/ViewProviderPythonFeaturePyImp.cpp @@ -73,7 +73,8 @@ PyObject* ViewProviderPythonFeaturePy::addProperty(PyObject *args) return NULL; // NULL triggers exception App::Property* prop=0; - prop = getViewProviderPythonFeaturePtr()->addDynamicProperty(sType,sName,sGroup,sDoc,attr,ro==Py_True,hd==Py_True); + prop = getViewProviderPythonFeaturePtr()->addDynamicProperty(sType,sName,sGroup,sDoc,attr, + PyObject_IsTrue(ro) ? true : false, PyObject_IsTrue(hd) ? true : false); if (!prop) { std::stringstream str; diff --git a/src/Gui/Workbench.cpp b/src/Gui/Workbench.cpp index 33e0942bb..f3580a814 100644 --- a/src/Gui/Workbench.cpp +++ b/src/Gui/Workbench.cpp @@ -499,7 +499,8 @@ MenuItem* StdWorkbench::setupMenuBar() const macro->setCommand("&Macro"); *macro << "Std_DlgMacroRecord" << "Std_MacroStopRecord" << "Std_DlgMacroExecute" << "Separator" << "Std_DlgMacroExecuteDirect" << "Std_MacroStartDebug" - << "Std_MacroStopDebug" << "Std_MacroStepOver" << "Std_ToggleBreakpoint"; + << "Std_MacroStopDebug" << "Std_MacroStepOver" << "Std_MacroStepInto" + << "Std_ToggleBreakpoint"; // Windows MenuItem* wnd = new MenuItem( menuBar ); diff --git a/src/Main/FreeCADGuiPy.cpp b/src/Main/FreeCADGuiPy.cpp index f3fb494cb..7a19da8f9 100644 --- a/src/Main/FreeCADGuiPy.cpp +++ b/src/Main/FreeCADGuiPy.cpp @@ -59,8 +59,8 @@ public: } void run() { - int argc = 0; - char **argv = {0}; + static int argc = 0; + static char **argv = {0}; QApplication app(argc, argv); if (setupMainWindow()) { app.exec(); @@ -82,29 +82,33 @@ FilterProc(int nCode, WPARAM wParam, LPARAM lParam) { static PyObject * FreeCADGui_showMainWindow(PyObject * /*self*/, PyObject *args) { - if (!PyArg_ParseTuple(args, "")) + PyObject* inThread = Py_False; + if (!PyArg_ParseTuple(args, "|O!", &PyBool_Type, &inThread)) return NULL; static GUIThread* thr = 0; if (!qApp) { -#if 0 - if (!thr) thr = new GUIThread(); - thr->start(); -#elif defined(Q_OS_WIN) - static int argc = 0; - static char **argv = {0}; - (void)new QApplication(argc, argv); - // When QApplication is constructed - hhook = SetWindowsHookEx(WH_GETMESSAGE, - FilterProc, 0, GetCurrentThreadId()); + if (PyObject_IsTrue(inThread)) { + if (!thr) thr = new GUIThread(); + thr->start(); + } + else { +#if defined(Q_OS_WIN) + static int argc = 0; + static char **argv = {0}; + (void)new QApplication(argc, argv); + // When QApplication is constructed + hhook = SetWindowsHookEx(WH_GETMESSAGE, + FilterProc, 0, GetCurrentThreadId()); #elif !defined(QT_NO_GLIB) - static int argc = 0; - static char **argv = {0}; - (void)new QApplication(argc, argv); + static int argc = 0; + static char **argv = {0}; + (void)new QApplication(argc, argv); #else - PyErr_SetString(PyExc_RuntimeError, "Must construct a QApplication before a QPaintDevice\n"); - return NULL; + PyErr_SetString(PyExc_RuntimeError, "Must construct a QApplication before a QPaintDevice\n"); + return NULL; #endif + } } else if (!qobject_cast(qApp)) { PyErr_SetString(PyExc_RuntimeError, "Cannot create widget when no GUI is being used\n"); @@ -240,6 +244,7 @@ QWidget* setupMainWindow() } if (!Gui::MainWindow::getInstance()) { + Base::PyGILStateLocker lock; PyObject* input = PySys_GetObject("stdin"); Gui::MainWindow *mw = new Gui::MainWindow(); QIcon icon = qApp->windowIcon(); diff --git a/src/Mod/Drawing/Gui/Workbench.cpp b/src/Mod/Drawing/Gui/Workbench.cpp index e74f510e6..9e604bca7 100644 --- a/src/Mod/Drawing/Gui/Workbench.cpp +++ b/src/Mod/Drawing/Gui/Workbench.cpp @@ -65,6 +65,8 @@ Gui::MenuItem* Workbench::setupMenuBar() const *part << "Drawing_Annotation"; *part << "Drawing_Clip"; *part << "Drawing_ExportPage"; + *part << "Separator"; + *part << "Drawing_ProjectShape"; return root; } diff --git a/src/Mod/Mesh/App/FeaturePythonPyImp.cpp b/src/Mod/Mesh/App/FeaturePythonPyImp.cpp index 47c19e5c5..2e985e2bb 100644 --- a/src/Mod/Mesh/App/FeaturePythonPyImp.cpp +++ b/src/Mod/Mesh/App/FeaturePythonPyImp.cpp @@ -49,7 +49,8 @@ PyObject* FeaturePythonPy::addProperty(PyObject *args) return NULL; // NULL triggers exception App::Property* prop=0; - prop = getFeaturePtr()->addDynamicProperty(sType,sName,sGroup,sDoc,attr,ro==Py_True,hd==Py_True); + prop = getFeaturePtr()->addDynamicProperty(sType,sName,sGroup,sDoc,attr, + PyObject_IsTrue(ro) ? true : false, PyObject_IsTrue(hd) ? true : false); if (!prop) { std::stringstream str; diff --git a/src/Mod/Mesh/App/MeshPyImp.cpp b/src/Mod/Mesh/App/MeshPyImp.cpp index 6d7c542f4..c25c6322b 100644 --- a/src/Mod/Mesh/App/MeshPyImp.cpp +++ b/src/Mod/Mesh/App/MeshPyImp.cpp @@ -127,9 +127,9 @@ PyObject* MeshPy::copy(PyObject *args) { if (!PyArg_ParseTuple(args, "")) return NULL; - + const MeshCore::MeshKernel& kernel = getMeshObjectPtr()->getKernel(); - return new MeshPy(new MeshObject(kernel)); + return new MeshPy(new MeshObject(kernel)); } PyObject* MeshPy::read(PyObject *args) @@ -238,7 +238,7 @@ PyObject* MeshPy::offsetSpecial(PyObject *args) PyObject* MeshPy::crossSections(PyObject *args) { PyObject *obj; - PyObject *poly=0; + PyObject *poly=Py_False; float min_eps = 1.0e-2f; if (!PyArg_ParseTuple(args, "O!|fO!", &PyList_Type, &obj, &min_eps, &PyBool_Type, &poly)) return 0; @@ -278,7 +278,7 @@ PyObject* MeshPy::crossSections(PyObject *args) } std::vector sections; - getMeshObjectPtr()->crossSections(csPlanes, sections, min_eps, (poly == Py_True)); + getMeshObjectPtr()->crossSections(csPlanes, sections, min_eps, PyObject_IsTrue(poly) ? true : false); // convert to Python objects Py::List crossSections; diff --git a/src/Mod/OpenSCAD/CMakeLists.txt b/src/Mod/OpenSCAD/CMakeLists.txt index 7dc63ac4a..74a15e944 100644 --- a/src/Mod/OpenSCAD/CMakeLists.txt +++ b/src/Mod/OpenSCAD/CMakeLists.txt @@ -28,7 +28,8 @@ set(all_files ${OpenSCAD_SRCS} ${ply_SRCS}) ADD_CUSTOM_TARGET(OpenSCAD ALL SOURCES ${allfiles} ) - fc_copy_sources(OpenSCAD "${CMAKE_BINARY_DIR}/Mod/OpenSCAD" ${all_files}) + +fc_copy_sources(OpenSCAD "${CMAKE_BINARY_DIR}/Mod/OpenSCAD" ${all_files}) INSTALL( FILES diff --git a/src/Mod/Part/App/AppPartPy.cpp b/src/Mod/Part/App/AppPartPy.cpp index 342c59069..f817a47f0 100644 --- a/src/Mod/Part/App/AppPartPy.cpp +++ b/src/Mod/Part/App/AppPartPy.cpp @@ -1147,8 +1147,8 @@ static PyObject * makeLoft(PyObject *self, PyObject *args) return new BSplineSurfacePy(new GeomBSplineSurface(aRes)); #else PyObject *pcObj; - PyObject *psolid=0; - PyObject *pruled=0; + PyObject *psolid=Py_False; + PyObject *pruled=Py_False; if (!PyArg_ParseTuple(args, "O!|O!O!", &(PyList_Type), &pcObj, &(PyBool_Type), &psolid, &(PyBool_Type), &pruled)) @@ -1166,8 +1166,8 @@ static PyObject * makeLoft(PyObject *self, PyObject *args) } TopoShape myShape; - Standard_Boolean anIsSolid = (psolid == Py_True) ? Standard_True : Standard_False; - Standard_Boolean anIsRuled = (pruled == Py_True) ? Standard_True : Standard_False; + Standard_Boolean anIsSolid = PyObject_IsTrue(psolid) ? Standard_True : Standard_False; + Standard_Boolean anIsRuled = PyObject_IsTrue(pruled) ? Standard_True : Standard_False; TopoDS_Shape aResult = myShape.makeLoft(profiles, anIsSolid, anIsRuled); return new TopoShapePy(new TopoShape(aResult)); } diff --git a/src/Mod/Part/App/BRepOffsetAPI_MakePipeShellPyImp.cpp b/src/Mod/Part/App/BRepOffsetAPI_MakePipeShellPyImp.cpp index 2017e86d2..187bec3b4 100644 --- a/src/Mod/Part/App/BRepOffsetAPI_MakePipeShellPyImp.cpp +++ b/src/Mod/Part/App/BRepOffsetAPI_MakePipeShellPyImp.cpp @@ -73,7 +73,7 @@ PyObject* BRepOffsetAPI_MakePipeShellPy::setFrenetMode(PyObject *args) PyObject *obj; if (!PyArg_ParseTuple(args, "O!",&PyBool_Type,&obj)) return 0; - this->getBRepOffsetAPI_MakePipeShellPtr()->SetMode(obj==Py_True); + this->getBRepOffsetAPI_MakePipeShellPtr()->SetMode(PyObject_IsTrue(obj) ? Standard_True : Standard_False); Py_Return; } @@ -121,19 +121,19 @@ PyObject* BRepOffsetAPI_MakePipeShellPy::setAuxiliarySpine(PyObject *args) PyErr_SetString(PyExc_TypeError, "spine is not a wire"); return 0; } - this->getBRepOffsetAPI_MakePipeShellPtr()->SetMode(TopoDS::Wire(s), curv==Py_True, keep==Py_True); + this->getBRepOffsetAPI_MakePipeShellPtr()->SetMode(TopoDS::Wire(s), PyObject_IsTrue(curv), PyObject_IsTrue(keep)); Py_Return; } PyObject* BRepOffsetAPI_MakePipeShellPy::add(PyObject *args) { - PyObject *prof, *curv=0, *keep=0; + PyObject *prof, *curv=Py_False, *keep=Py_False; if (!PyArg_ParseTuple(args, "O!|O!O!",&Part::TopoShapePy::Type,&prof ,&PyBool_Type,&curv ,&PyBool_Type,&keep)) return 0; const TopoDS_Shape& s = static_cast(prof)->getTopoShapePtr()->_Shape; - this->getBRepOffsetAPI_MakePipeShellPtr()->Add(s, curv==Py_True, keep==Py_True); + this->getBRepOffsetAPI_MakePipeShellPtr()->Add(s, PyObject_IsTrue(curv), PyObject_IsTrue(keep)); Py_Return; } diff --git a/src/Mod/Part/App/BSplineCurvePyImp.cpp b/src/Mod/Part/App/BSplineCurvePyImp.cpp index 7f608c902..b94b99213 100644 --- a/src/Mod/Part/App/BSplineCurvePyImp.cpp +++ b/src/Mod/Part/App/BSplineCurvePyImp.cpp @@ -183,7 +183,7 @@ PyObject* BSplineCurvePy::insertKnot(PyObject * args) try { Handle_Geom_BSplineCurve curve = Handle_Geom_BSplineCurve::DownCast (getGeometryPtr()->handle()); - curve->InsertKnot(U,M,tol,(add==Py_True)); + curve->InsertKnot(U,M,tol,PyObject_IsTrue(add)); } catch (Standard_Failure) { Handle_Standard_Failure e = Standard_Failure::Caught(); @@ -223,7 +223,7 @@ PyObject* BSplineCurvePy::insertKnots(PyObject * args) Handle_Geom_BSplineCurve curve = Handle_Geom_BSplineCurve::DownCast (getGeometryPtr()->handle()); - curve->InsertKnots(k,m,tol,(add==Py_True)); + curve->InsertKnots(k,m,tol,PyObject_IsTrue(add)); Py_Return; } catch (Standard_Failure) { @@ -755,7 +755,7 @@ PyObject* BSplineCurvePy::interpolate(PyObject *args) Standard_Failure::Raise("not enough points given"); } - GeomAPI_Interpolate aBSplineInterpolation(interpolationPoints, (closed == Py_True), tol3d); + GeomAPI_Interpolate aBSplineInterpolation(interpolationPoints, PyObject_IsTrue(closed), tol3d); if (t1 && t2) { Base::Vector3d v1 = Py::Vector(t1,false).toVector(); Base::Vector3d v2 = Py::Vector(t1,false).toVector(); @@ -811,7 +811,7 @@ PyObject* BSplineCurvePy::buildFromPoles(PyObject *args) mults.SetValue(1, degree+1); mults.SetValue(knots.Length(), degree+1); - Handle_Geom_BSplineCurve spline = new Geom_BSplineCurve(poles, knots, mults, degree, (closed == Py_True)); + Handle_Geom_BSplineCurve spline = new Geom_BSplineCurve(poles, knots, mults, degree, PyObject_IsTrue(closed)); if (!spline.IsNull()) { this->getGeomBSplineCurvePtr()->setHandle(spline); Py_Return; diff --git a/src/Mod/Part/App/BSplineSurfacePyImp.cpp b/src/Mod/Part/App/BSplineSurfacePyImp.cpp index 5fd9c9773..b299e4ac5 100644 --- a/src/Mod/Part/App/BSplineSurfacePyImp.cpp +++ b/src/Mod/Part/App/BSplineSurfacePyImp.cpp @@ -293,7 +293,7 @@ PyObject* BSplineSurfacePy::insertUKnot(PyObject *args) try { Handle_Geom_BSplineSurface surf = Handle_Geom_BSplineSurface::DownCast (getGeometryPtr()->handle()); - surf->InsertUKnot(U,M,tol,(add==Py_True)); + surf->InsertUKnot(U,M,tol,PyObject_IsTrue(add)); } catch (Standard_Failure) { Handle_Standard_Failure e = Standard_Failure::Caught(); @@ -333,7 +333,7 @@ PyObject* BSplineSurfacePy::insertUKnots(PyObject *args) Handle_Geom_BSplineSurface surf = Handle_Geom_BSplineSurface::DownCast (getGeometryPtr()->handle()); - surf->InsertUKnots(k,m,tol,(add==Py_True)); + surf->InsertUKnots(k,m,tol,PyObject_IsTrue(add)); Py_Return; } catch (Standard_Failure) { @@ -356,7 +356,7 @@ PyObject* BSplineSurfacePy::insertVKnot(PyObject *args) try { Handle_Geom_BSplineSurface surf = Handle_Geom_BSplineSurface::DownCast (getGeometryPtr()->handle()); - surf->InsertVKnot(V,M,tol,(add==Py_True)); + surf->InsertVKnot(V,M,tol,PyObject_IsTrue(add)); } catch (Standard_Failure) { Handle_Standard_Failure e = Standard_Failure::Caught(); @@ -396,7 +396,7 @@ PyObject* BSplineSurfacePy::insertVKnots(PyObject *args) Handle_Geom_BSplineSurface surf = Handle_Geom_BSplineSurface::DownCast (getGeometryPtr()->handle()); - surf->InsertVKnots(k,m,tol,(add==Py_True)); + surf->InsertVKnots(k,m,tol,PyObject_IsTrue(add)); Py_Return; } catch (Standard_Failure) { diff --git a/src/Mod/Part/App/FeaturePythonPyImp.cpp b/src/Mod/Part/App/FeaturePythonPyImp.cpp index 6f2c8a255..2a2f76cd6 100644 --- a/src/Mod/Part/App/FeaturePythonPyImp.cpp +++ b/src/Mod/Part/App/FeaturePythonPyImp.cpp @@ -47,7 +47,8 @@ PyObject* FeaturePythonPy::addProperty(PyObject *args) return NULL; // NULL triggers exception App::Property* prop=0; - prop = getFeaturePythonPtr()->addDynamicProperty(sType,sName,sGroup,sDoc,attr,ro==Py_True,hd==Py_True); + prop = getFeaturePythonPtr()->addDynamicProperty(sType,sName,sGroup,sDoc,attr, + PyObject_IsTrue(ro) ? true : false, PyObject_IsTrue(hd) ? true : false); if (!prop) { std::stringstream str; diff --git a/src/Mod/Part/App/RectangularTrimmedSurfacePyImp.cpp b/src/Mod/Part/App/RectangularTrimmedSurfacePyImp.cpp index 456223283..873a29f37 100644 --- a/src/Mod/Part/App/RectangularTrimmedSurfacePyImp.cpp +++ b/src/Mod/Part/App/RectangularTrimmedSurfacePyImp.cpp @@ -59,18 +59,18 @@ int RectangularTrimmedSurfacePy::PyInit(PyObject* args, PyObject* /*kwd*/) getGeomTrimmedSurfacePtr()->setHandle(new Geom_RectangularTrimmedSurface( Handle_Geom_Surface::DownCast(static_cast(surf)-> getGeomSurfacePtr()->handle()), - u1, u2, v1, v2, (usense==Py_True), (vsense==Py_True) + u1, u2, v1, v2, PyObject_IsTrue(usense), PyObject_IsTrue(vsense) )); return 0; } PyErr_Clear(); double param1,param2; - PyObject *utrim=0, *sense=Py_True; + PyObject *utrim=Py_False, *sense=Py_True; if (PyArg_ParseTuple(args, "O!ddO!|O!",&(Part::GeometrySurfacePy::Type),&surf, ¶m1,¶m2,&PyBool_Type,&utrim,&PyBool_Type,&sense)) { - Standard_Boolean UTrim = (utrim==Py_True); - Standard_Boolean Sense = (sense==Py_True); + Standard_Boolean UTrim = PyObject_IsTrue(utrim); + Standard_Boolean Sense = PyObject_IsTrue(sense); getGeomTrimmedSurfacePtr()->setHandle(new Geom_RectangularTrimmedSurface( Handle_Geom_Surface::DownCast(static_cast(surf)-> getGeomSurfacePtr()->handle()), diff --git a/src/Mod/Part/App/TopoShapeCompoundPyImp.cpp b/src/Mod/Part/App/TopoShapeCompoundPyImp.cpp index 3b84d7b97..50391d564 100644 --- a/src/Mod/Part/App/TopoShapeCompoundPyImp.cpp +++ b/src/Mod/Part/App/TopoShapeCompoundPyImp.cpp @@ -122,7 +122,7 @@ PyObject* TopoShapeCompoundPy::connectEdgesToWires(PyObject *args) for (TopExp_Explorer xp(s, TopAbs_EDGE); xp.More(); xp.Next()) hEdges->Append(xp.Current()); - ShapeAnalysis_FreeBounds::ConnectEdgesToWires(hEdges, tol, (shared==Py_True), hWires); + ShapeAnalysis_FreeBounds::ConnectEdgesToWires(hEdges, tol, PyObject_IsTrue(shared), hWires); TopoDS_Compound comp; BRep_Builder builder; diff --git a/src/Mod/Part/App/TopoShapePyImp.cpp b/src/Mod/Part/App/TopoShapePyImp.cpp index bc74344dd..24f26d832 100644 --- a/src/Mod/Part/App/TopoShapePyImp.cpp +++ b/src/Mod/Part/App/TopoShapePyImp.cpp @@ -1046,7 +1046,7 @@ PyObject* TopoShapePy::makeThickness(PyObject *args) } TopoDS_Shape shape = this->getTopoShapePtr()->makeThickSolid(facesToRemove, offset, tolerance, - (inter == Py_True), (self_inter == Py_True), offsetMode, join); + PyObject_IsTrue(inter) ? true : false, PyObject_IsTrue(self_inter) ? true : false, offsetMode, join); return new TopoShapeSolidPy(new TopoShape(shape)); } catch (Standard_Failure) { @@ -1073,7 +1073,9 @@ PyObject* TopoShapePy::makeOffsetShape(PyObject *args) try { TopoDS_Shape shape = this->getTopoShapePtr()->makeOffsetShape(offset, tolerance, - (inter == Py_True), (self_inter == Py_True), offsetMode, join, (fill == Py_True)); + PyObject_IsTrue(inter) ? true : false, + PyObject_IsTrue(self_inter) ? true : false, offsetMode, join, + PyObject_IsTrue(fill) ? true : false); return new TopoShapePy(new TopoShape(shape)); } catch (Standard_Failure) { @@ -1324,7 +1326,7 @@ PyObject* TopoShapePy::isInside(PyObject *args) gp_Pnt vertex = gp_Pnt(pnt.x,pnt.y,pnt.z); solidClassifier.Perform(vertex, tolerance); Standard_Boolean test = (solidClassifier.State() == stateIn); - if ( (checkFace == Py_True) && (solidClassifier.IsOnAFace()) ) + if (PyObject_IsTrue(checkFace) && (solidClassifier.IsOnAFace())) test = Standard_True; return Py_BuildValue("O", (test ? Py_True : Py_False)); } diff --git a/src/Mod/Sketcher/Gui/ViewProviderSketch.cpp b/src/Mod/Sketcher/Gui/ViewProviderSketch.cpp index f40226d1e..57e6c6ba6 100644 --- a/src/Mod/Sketcher/Gui/ViewProviderSketch.cpp +++ b/src/Mod/Sketcher/Gui/ViewProviderSketch.cpp @@ -1464,12 +1464,8 @@ void ViewProviderSketch::doBoxSelection(const SbVec2s &startPos, const SbVec2s & Gui::ViewVolumeProjection proj(viewer->getCamera()->getViewVolume()); - App::Document* doc = App::GetApplication().getActiveDocument(); - Sketcher::SketchObject *sketchObject = NULL; - if (doc) - sketchObject = dynamic_cast(doc->getActiveObject()); - if (!sketchObject) - return; + Sketcher::SketchObject *sketchObject = getSketchObject(); + App::Document *doc = sketchObject->getDocument(); Base::Placement Plm = sketchObject->Placement.getValue(); diff --git a/src/WindowsInstaller/BuildInstaller.bat b/src/WindowsInstaller/BuildInstaller.bat index f84c4de89..2ca4e2475 100644 --- a/src/WindowsInstaller/BuildInstaller.bat +++ b/src/WindowsInstaller/BuildInstaller.bat @@ -24,7 +24,7 @@ SET /P M=Reebuild and press enter rem making of the bin zip file -"c:\Program Files\7-Zip\7z.exe" a -t7z FreeCAD.7z "-xr!*.idb" "-xr!*.pdb" "-xr!*.ilk" "-xr!*.rule" "-xr!*.svn-base" "-xr!*.pyc" "-xr!*.stamp" "-xr!*.cmake" "-xr!*.svn*" "-xr!*.vcproj" "-xr!*.am" "-xr!CMakeFiles" "-xr!*.dir" ..\..\bin ..\..\Mod ..\..\Doc ..\..\data +c:\Programme\7-Zip\7z.exe a -t7z FreeCAD.7z "-xr!*.idb" "-xr!*.pdb" "-xr!*.ilk" "-xr!*.pyc" "-xr!?.git\*" "-xr!*.am" "-xr!CMakeFiles" "..\..\bin" "..\..\Mod" "..\..\Doc" "..\..\data" call CopyRelease.bat diff --git a/src/WindowsInstaller/CopyRelease.bat.in b/src/WindowsInstaller/CopyRelease.bat.in index 10b1758f6..6c7dbbb68 100644 --- a/src/WindowsInstaller/CopyRelease.bat.in +++ b/src/WindowsInstaller/CopyRelease.bat.in @@ -1,4 +1,4 @@ -copy FreeCAD.msi FreeCAD_0.13.$WCREV$_x86_unstable_setup.msi -copy FreeCAD.7z FreeCAD_0.13.$WCREV$_x86_unstable_bin.7z \ No newline at end of file +copy FreeCAD.msi FreeCAD_0.13.$WCREV$_x86_RC_setup.msi +copy FreeCAD.7z FreeCAD_0.13.$WCREV$_x86_RC_bin.7z \ No newline at end of file