diff --git a/apps/launcher/CMakeLists.txt b/apps/launcher/CMakeLists.txt index 9b812e4bab..5908deb907 100644 --- a/apps/launcher/CMakeLists.txt +++ b/apps/launcher/CMakeLists.txt @@ -4,7 +4,6 @@ set(LAUNCHER main.cpp maindialog.cpp playpage.cpp - unshieldthread.cpp textslotmsgbox.cpp settings/gamesettings.cpp @@ -16,6 +15,9 @@ set(LAUNCHER ${CMAKE_SOURCE_DIR}/files/launcher/launcher.rc ) +if(NOT WIN32) + LIST(APPEND LAUNCHER unshieldthread.cpp) +endif(NOT WIN32) set(LAUNCHER_HEADER datafilespage.hpp @@ -34,6 +36,10 @@ set(LAUNCHER_HEADER utils/textinputdialog.hpp ) +if(NOT WIN32) + LIST(APPEND LAUNCHER_HEADER unshieldthread.hpp) +endif(NOT WIN32) + # Headers that must be pre-processed set(LAUNCHER_HEADER_MOC @@ -48,6 +54,11 @@ set(LAUNCHER_HEADER_MOC utils/textinputdialog.hpp ) +if(NOT WIN32) + LIST(APPEND LAUNCHER_HEADER_MOC unshieldthread.hpp) +endif(NOT WIN32) + + set(LAUNCHER_UI ${CMAKE_SOURCE_DIR}/files/ui/datafilespage.ui ${CMAKE_SOURCE_DIR}/files/ui/graphicspage.ui @@ -72,7 +83,10 @@ QT4_WRAP_UI(UI_HDRS ${LAUNCHER_UI}) include(${QT_USE_FILE}) -include_directories(${CMAKE_CURRENT_BINARY_DIR} ${LIBUNSHIELD_INCLUDE}) +include_directories(${CMAKE_CURRENT_BINARY_DIR}) +if(NOT WIN32) + include_directories(${LIBUNSHIELD_INCLUDE}) +endif(NOT WIN32) # Main executable IF(OGRE_STATIC) @@ -100,8 +114,12 @@ target_link_libraries(omwlauncher ${SDL2_LIBRARY} ${QT_LIBRARIES} components - ${LIBUNSHIELD_LIBRARY} ) +if(NOT WIN32) + target_link_libraries(omwlauncher + ${LIBUNSHIELD_LIBRARY} + ) +endif(NOT WIN32) diff --git a/apps/launcher/maindialog.cpp b/apps/launcher/maindialog.cpp index 857a15196f..032f70916f 100644 --- a/apps/launcher/maindialog.cpp +++ b/apps/launcher/maindialog.cpp @@ -11,7 +11,10 @@ #include -#include "unshieldthread.hpp" +#ifndef WIN32 + #include "unshieldthread.hpp" +#endif + #include "textslotmsgbox.hpp" #include "utils/checkablemessagebox.hpp" @@ -352,6 +355,7 @@ bool MainDialog::setupLauncherSettings() return true; } +#ifndef WIN32 bool expansions(UnshieldThread& cd) { if(cd.BloodmoonDone()) @@ -421,6 +425,7 @@ bool expansions(UnshieldThread& cd) return true; } +#endif // WIN32 bool MainDialog::setupGameSettings() { @@ -480,9 +485,11 @@ bool MainDialog::setupGameSettings() QAbstractButton *dirSelectButton = msgBox.addButton(QObject::tr("Browse to &Install..."), QMessageBox::ActionRole); - - QAbstractButton *cdSelectButton = - msgBox.addButton(QObject::tr("Browse to &CD..."), QMessageBox::ActionRole); + + #ifndef WIN32 + QAbstractButton *cdSelectButton = + msgBox.addButton(QObject::tr("Browse to &CD..."), QMessageBox::ActionRole); + #endif msgBox.exec(); @@ -495,6 +502,7 @@ bool MainDialog::setupGameSettings() QDir::currentPath(), QString(tr("Morrowind master file (*.esm)"))); } + #ifndef WIN32 else if(msgBox.clickedButton() == cdSelectButton) { UnshieldThread cd; @@ -527,6 +535,7 @@ bool MainDialog::setupGameSettings() selectedFile = QString::fromStdString(cd.GetMWEsmPath()); } + #endif // WIN32 if (selectedFile.isEmpty()) return false; // Cancel was clicked;