Skip to content

Commit

Permalink
Fix the OMSens plugin path (#7018)
Browse files Browse the repository at this point in the history
Update OMSens_Qt
  • Loading branch information
adeas31 committed Dec 4, 2020
1 parent e4a3890 commit f33c31c
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
7 changes: 4 additions & 3 deletions OMEdit/OMEditLIB/MainWindow.cpp
Expand Up @@ -2693,11 +2693,12 @@ void MainWindow::runOMSensPlugin()
if (!mpOMSensPlugin) {
// load OMSens plugin
#ifdef Q_OS_WIN
QPluginLoader loader(QString("%1/bin/omsensplugin.dll").arg(Helper::OpenModelicaHome));
QPluginLoader loader(QString("%1/lib/omc/omsensplugin.dll").arg(Helper::OpenModelicaHome));
#elif defined(Q_OS_MAC)
QPluginLoader loader(QString("%1/bin/omsensplugin.dylib").arg(Helper::OpenModelicaHome));
MessagesWidget::instance()->addGUIMessage(MessageItem(MessageItem::Modelica, tr("OMSens is not supported on MacOS"), Helper::scriptingKind, Helper::errorLevel));
return;
#else
QPluginLoader loader(QString("%1/bin/libomsensplugin.so").arg(Helper::OpenModelicaHome));
QPluginLoader loader(QString("%1/lib/%2/omc/libomsensplugin.so").arg(Helper::OpenModelicaHome, HOST_SHORT));
#endif
mpOMSensPlugin = loader.instance();
if (!mpOMSensPlugin) {
Expand Down
1 change: 1 addition & 0 deletions OMEdit/OMEditLIB/Modeling/MessagesWidget.cpp
Expand Up @@ -474,6 +474,7 @@ void MessagesWidget::addGUIMessage(MessageItem messageItem)
case StringHandler::Internal:
mpErrorMessageWidget->addGUIMessage(messageItem);
mpAllMessageWidget->addGUIMessage(messageItem);
break;
case StringHandler::Notification:
mpNotificationMessageWidget->addGUIMessage(messageItem);
mpAllMessageWidget->addGUIMessage(messageItem);
Expand Down
1 change: 1 addition & 0 deletions OMEdit/omc_config.h.in
@@ -1,2 +1,3 @@
#define CONFIG_DEFAULT_OPENMODELICAHOME "@OPENMODELICAHOME@"
@LSB_RELEASE@
#define HOST_SHORT "@host_short@"
2 changes: 1 addition & 1 deletion OMSens_Qt

0 comments on commit f33c31c

Please sign in to comment.