Skip to content

Commit

Permalink
Fix module paths under Linux.
Browse files Browse the repository at this point in the history
  • Loading branch information
temochka committed Feb 11, 2017
1 parent 81c3d19 commit e67ffab
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 11 deletions.
28 changes: 17 additions & 11 deletions src/ide/ide.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -473,11 +473,14 @@ void
IDE::initModules()
{
this->activeModules.insert(
"indicators", ModuleSlotWidget(tr("Block of 8-segment indicators"), "indicators", indicatorsModulePath, false));
"indicators", ModuleSlotWidget(tr("Block of 8-segment indicators"),
"indicators", indicatorsModulePath, false));
this->activeModules.insert(
"display", ModuleSlotWidget(tr("Text display and keyboard"), "display", displayModulePath, false));
"display", ModuleSlotWidget(tr("Text display and keyboard"), "display",
displayModulePath, false));
this->activeModules.insert(
"keyboard", ModuleSlotWidget(tr("Digital keyboard"), "keyboard", keyboardModulePath, false));
"keyboard", ModuleSlotWidget(tr("Digital keyboard"), "keyboard",
keyboardModulePath, false));
this->activeModules.insert(
"adc", ModuleSlotWidget(tr("ADC/DAC"), "adc", adcModulePath, false));
}
Expand Down Expand Up @@ -525,14 +528,17 @@ IDE::onStepClick()
this->ui->menuStart->setEnabled(true);
}

#ifndef MAC_OS_X
#ifdef MAC_OS_X
const char* IDE::adcModulePath = "../Resources/adc.app/Contents/MacOS/adc";
const char* IDE::displayModulePath = "../Resources/display.app/Contents/MacOS/display";
const char* IDE::indicatorsModulePath = "../Resources/indicators.app/Contents/MacOS/indicators";
const char* IDE::keyboardModulePath = "../Resources/keyboard.app/Contents/MacOS/keyboard";
const char* IDE::displayModulePath =
"../Resources/display.app/Contents/MacOS/display";
const char* IDE::indicatorsModulePath =
"../Resources/indicators.app/Contents/MacOS/indicators";
const char* IDE::keyboardModulePath =
"../Resources/keyboard.app/Contents/MacOS/keyboard";
#else
const char* IDE::adcModulePath = "modules/adc";
const char* IDE::displayModulePath = "modules/display";
const char* IDE::indicatorsModulePath = "modules/indicators";
const char* IDE::keyboardModulePath = "modules/keyboard";
const char* IDE::adcModulePath = "module/adc";
const char* IDE::displayModulePath = "module/display";
const char* IDE::indicatorsModulePath = "module/indicators";
const char* IDE::keyboardModulePath = "module/keyboard";
#endif
4 changes: 4 additions & 0 deletions try8085.pri
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,7 @@ QMAKE_BUNDLE_DATA += \

GIT_VERSION = $$system(git --git-dir $$PWD/.git --work-tree $$PWD describe --always --tags)
DEFINES += GIT_VERSION=\\\"$$GIT_VERSION\\\"

macx {
DEFINES += MAC_OS_X
}

0 comments on commit e67ffab

Please sign in to comment.