ADD_EXECUTABLE(mussagl WIN32 MACOSX_BUNDLE ${MAIN_SOURCES} )
-SET(PYTHON_CFLAGS "-DUSE_PYTHON")
-
# For windows you need to go from library with the most dependencies
# to the library with the least dependencies -diane
TARGET_LINK_LIBRARIES(mussagl
mussa_qui
- mussa_py
mussa_core
${QT_LIBRARIES}
# Including QT_LIBS twice is for dealing with linking dependancies
${BOOST_FILESYSTEM_LIBRARY}
${BOOST_SERIALIZATION_LIBRARY}
${BOOST_PROGRAM_OPTIONS_LIBRARY}
- ${BOOST_PYTHON_LIBRARY}
- ${PYTHON_LIBRARIES}
- ${PYTHON_LINK_LIBRARIES}
${OPENGL_gl_LIBRARY}
)
+IF(USE_PYTHON)
+ SET(PYTHON_CFLAGS "-DUSE_PYTHON")
+ TARGET_LINK_LIBRARIES(mussagl
+ mussa_py
+ ${BOOST_PYTHON_LIBRARY}
+ ${PYTHON_LIBRARIES}
+ ${PYTHON_LINK_LIBRARIES})
+ENDIF(USE_PYTHON)
+
+
GET_MUSSA_COMPILE_FLAGS(MAIN_CFLAGS)
GET_MUSSA_LINK_FLAGS(MAIN_LDFLAGS)
-#include "py/python.hpp"
#include "qui/MussaWindow.hpp"
#include "mussa_exceptions.hpp"
#include "version.hpp"
#include <QApplication>
#include <QAssistantClient>
#include <QCloseEvent>
+#include <QDesktopServices>
#include <QDir>
#include <QFileDialog>
#include <QHBoxLayout>
#include <QStatusBar>
#include <QString>
#include <QStringList>
+#include <QUrl>
#include <QWhatsThis>
#include <memory>
QMessageBox::NoButton);
}
#else
- try {
- boost::python::object webopen = get_py()["webbrowser.open"];
- webopen("http://woldlab.caltech.edu/~king/mussagl_manual/");
- } catch( boost::python::error_already_set ) {
- PyErr_Print();
+ QUrl manual_url("http://woldlab.caltech.edu/~king/mussagl_manual/");
+ if (not QDesktopServices::openUrl(manual_url)) {
QMessageBox::warning(this,
tr("Mussa Help Error"),
tr("Unable to launch webbrowser"),
#include <boost/filesystem/operations.hpp>
using namespace boost::filesystem;
+#ifdef USE_PYTHON
#include "py/python.hpp"
+#endif
+
#include "qui/MussaWindow.hpp"
#include "alg/parse_options.hpp"
#include "mussa_exceptions.hpp"
qFatal(e.what());
} catch (boost::filesystem::filesystem_error e) {
qFatal(e.what());
- } catch( boost::python::error_already_set ) {
+ }
+#ifdef USE_PYTHON
+ catch( boost::python::error_already_set ) {
PyErr_Print();
- } catch (std::runtime_error e) {
+ }
+#endif
+ catch (std::runtime_error e) {
qFatal(e.what());
} catch (...) {
qFatal("unrecognized exception");