only use unshield on not windows

actorid
Tom Mason 12 years ago
parent 865a7c63df
commit 06ff40eda7

@ -4,7 +4,6 @@ set(LAUNCHER
main.cpp main.cpp
maindialog.cpp maindialog.cpp
playpage.cpp playpage.cpp
unshieldthread.cpp
textslotmsgbox.cpp textslotmsgbox.cpp
settings/gamesettings.cpp settings/gamesettings.cpp
@ -16,6 +15,9 @@ set(LAUNCHER
${CMAKE_SOURCE_DIR}/files/launcher/launcher.rc ${CMAKE_SOURCE_DIR}/files/launcher/launcher.rc
) )
if(NOT WIN32)
LIST(APPEND LAUNCHER unshieldthread.cpp)
endif(NOT WIN32)
set(LAUNCHER_HEADER set(LAUNCHER_HEADER
datafilespage.hpp datafilespage.hpp
@ -34,6 +36,10 @@ set(LAUNCHER_HEADER
utils/textinputdialog.hpp utils/textinputdialog.hpp
) )
if(NOT WIN32)
LIST(APPEND LAUNCHER_HEADER unshieldthread.hpp)
endif(NOT WIN32)
# Headers that must be pre-processed # Headers that must be pre-processed
set(LAUNCHER_HEADER_MOC set(LAUNCHER_HEADER_MOC
@ -48,6 +54,11 @@ set(LAUNCHER_HEADER_MOC
utils/textinputdialog.hpp utils/textinputdialog.hpp
) )
if(NOT WIN32)
LIST(APPEND LAUNCHER_HEADER_MOC unshieldthread.hpp)
endif(NOT WIN32)
set(LAUNCHER_UI set(LAUNCHER_UI
${CMAKE_SOURCE_DIR}/files/ui/datafilespage.ui ${CMAKE_SOURCE_DIR}/files/ui/datafilespage.ui
${CMAKE_SOURCE_DIR}/files/ui/graphicspage.ui ${CMAKE_SOURCE_DIR}/files/ui/graphicspage.ui
@ -72,7 +83,10 @@ QT4_WRAP_UI(UI_HDRS ${LAUNCHER_UI})
include(${QT_USE_FILE}) 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 # Main executable
IF(OGRE_STATIC) IF(OGRE_STATIC)
@ -100,8 +114,12 @@ target_link_libraries(omwlauncher
${SDL2_LIBRARY} ${SDL2_LIBRARY}
${QT_LIBRARIES} ${QT_LIBRARIES}
components components
${LIBUNSHIELD_LIBRARY}
) )
if(NOT WIN32)
target_link_libraries(omwlauncher
${LIBUNSHIELD_LIBRARY}
)
endif(NOT WIN32)

@ -11,7 +11,10 @@
#include <QDebug> #include <QDebug>
#include "unshieldthread.hpp" #ifndef WIN32
#include "unshieldthread.hpp"
#endif
#include "textslotmsgbox.hpp" #include "textslotmsgbox.hpp"
#include "utils/checkablemessagebox.hpp" #include "utils/checkablemessagebox.hpp"
@ -352,6 +355,7 @@ bool MainDialog::setupLauncherSettings()
return true; return true;
} }
#ifndef WIN32
bool expansions(UnshieldThread& cd) bool expansions(UnshieldThread& cd)
{ {
if(cd.BloodmoonDone()) if(cd.BloodmoonDone())
@ -421,6 +425,7 @@ bool expansions(UnshieldThread& cd)
return true; return true;
} }
#endif // WIN32
bool MainDialog::setupGameSettings() bool MainDialog::setupGameSettings()
{ {
@ -480,9 +485,11 @@ bool MainDialog::setupGameSettings()
QAbstractButton *dirSelectButton = QAbstractButton *dirSelectButton =
msgBox.addButton(QObject::tr("Browse to &Install..."), QMessageBox::ActionRole); msgBox.addButton(QObject::tr("Browse to &Install..."), QMessageBox::ActionRole);
QAbstractButton *cdSelectButton = #ifndef WIN32
msgBox.addButton(QObject::tr("Browse to &CD..."), QMessageBox::ActionRole); QAbstractButton *cdSelectButton =
msgBox.addButton(QObject::tr("Browse to &CD..."), QMessageBox::ActionRole);
#endif
msgBox.exec(); msgBox.exec();
@ -495,6 +502,7 @@ bool MainDialog::setupGameSettings()
QDir::currentPath(), QDir::currentPath(),
QString(tr("Morrowind master file (*.esm)"))); QString(tr("Morrowind master file (*.esm)")));
} }
#ifndef WIN32
else if(msgBox.clickedButton() == cdSelectButton) { else if(msgBox.clickedButton() == cdSelectButton) {
UnshieldThread cd; UnshieldThread cd;
@ -527,6 +535,7 @@ bool MainDialog::setupGameSettings()
selectedFile = QString::fromStdString(cd.GetMWEsmPath()); selectedFile = QString::fromStdString(cd.GetMWEsmPath());
} }
#endif // WIN32
if (selectedFile.isEmpty()) if (selectedFile.isEmpty())
return false; // Cancel was clicked; return false; // Cancel was clicked;

Loading…
Cancel
Save