Don't require libunshield on windows

loadfix
scrawl 10 years ago
parent c7933dd692
commit a8a2b44b0f

@ -600,11 +600,6 @@ if (BUILD_OPENCS)
endif() endif()
if (BUILD_WIZARD) if (BUILD_WIZARD)
find_package(LIBUNSHIELD REQUIRED)
if(NOT LIBUNSHIELD_FOUND)
message(FATAL_ERROR "Failed to find Unshield library")
endif(NOT LIBUNSHIELD_FOUND)
add_subdirectory(apps/wizard) add_subdirectory(apps/wizard)
endif() endif()

@ -1,10 +1,20 @@
if (WIN32) # windows users can just run the morrowind installer
set(OPENMW_USE_UNSHIELD FALSE)
else()
set(OPENMW_USE_UNSHIELD TRUE)
find_package(LIBUNSHIELD REQUIRED)
if(NOT LIBUNSHIELD_FOUND)
message(FATAL_ERROR "Failed to find Unshield library")
endif(NOT LIBUNSHIELD_FOUND)
endif()
set(WIZARD set(WIZARD
componentselectionpage.cpp componentselectionpage.cpp
conclusionpage.cpp conclusionpage.cpp
existinginstallationpage.cpp existinginstallationpage.cpp
importpage.cpp importpage.cpp
inisettings.cpp inisettings.cpp
installationpage.cpp
installationtargetpage.cpp installationtargetpage.cpp
intropage.cpp intropage.cpp
languageselectionpage.cpp languageselectionpage.cpp
@ -12,8 +22,6 @@ set(WIZARD
mainwizard.cpp mainwizard.cpp
methodselectionpage.cpp methodselectionpage.cpp
unshield/unshieldworker.cpp
utils/componentlistwidget.cpp utils/componentlistwidget.cpp
) )
@ -23,15 +31,12 @@ set(WIZARD_HEADER
existinginstallationpage.hpp existinginstallationpage.hpp
importpage.hpp importpage.hpp
inisettings.hpp inisettings.hpp
installationpage.hpp
installationtargetpage.hpp installationtargetpage.hpp
intropage.hpp intropage.hpp
languageselectionpage.hpp languageselectionpage.hpp
mainwizard.hpp mainwizard.hpp
methodselectionpage.hpp methodselectionpage.hpp
unshield/unshieldworker.hpp
utils/componentlistwidget.hpp utils/componentlistwidget.hpp
) )
@ -41,15 +46,12 @@ set(WIZARD_HEADER_MOC
conclusionpage.hpp conclusionpage.hpp
existinginstallationpage.hpp existinginstallationpage.hpp
importpage.hpp importpage.hpp
installationpage.hpp
installationtargetpage.hpp installationtargetpage.hpp
intropage.hpp intropage.hpp
languageselectionpage.hpp languageselectionpage.hpp
mainwizard.hpp mainwizard.hpp
methodselectionpage.hpp methodselectionpage.hpp
unshield/unshieldworker.hpp
utils/componentlistwidget.hpp utils/componentlistwidget.hpp
) )
@ -58,13 +60,21 @@ set(WIZARD_UI
${CMAKE_SOURCE_DIR}/files/ui/wizard/conclusionpage.ui ${CMAKE_SOURCE_DIR}/files/ui/wizard/conclusionpage.ui
${CMAKE_SOURCE_DIR}/files/ui/wizard/existinginstallationpage.ui ${CMAKE_SOURCE_DIR}/files/ui/wizard/existinginstallationpage.ui
${CMAKE_SOURCE_DIR}/files/ui/wizard/importpage.ui ${CMAKE_SOURCE_DIR}/files/ui/wizard/importpage.ui
${CMAKE_SOURCE_DIR}/files/ui/wizard/installationpage.ui
${CMAKE_SOURCE_DIR}/files/ui/wizard/installationtargetpage.ui ${CMAKE_SOURCE_DIR}/files/ui/wizard/installationtargetpage.ui
${CMAKE_SOURCE_DIR}/files/ui/wizard/intropage.ui ${CMAKE_SOURCE_DIR}/files/ui/wizard/intropage.ui
${CMAKE_SOURCE_DIR}/files/ui/wizard/languageselectionpage.ui ${CMAKE_SOURCE_DIR}/files/ui/wizard/languageselectionpage.ui
${CMAKE_SOURCE_DIR}/files/ui/wizard/methodselectionpage.ui ${CMAKE_SOURCE_DIR}/files/ui/wizard/methodselectionpage.ui
) )
if (OPENMW_USE_UNSHIELD)
set (WIZARD ${WIZARD} installationpage.cpp unshield/unshieldworker.cpp)
set (WIZARD_HEADER ${WIZARD_HEADER} installationpage.hpp unshield/unshieldworker.hpp)
set (WIZARD_HEADER_MOC ${WIZARD_HEADER_MOC} installationpage.hpp unshield/unshieldworker.hpp)
set (WIZARD_UI ${WIZARD_UI} ${CMAKE_SOURCE_DIR}/files/ui/wizard/installationpage.ui)
add_definitions(-DOPENMW_USE_UNSHIELD)
endif (OPENMW_USE_UNSHIELD)
source_group(wizard FILES ${WIZARD} ${WIZARD_HEADER}) source_group(wizard FILES ${WIZARD} ${WIZARD_HEADER})
find_package(Qt4 REQUIRED) find_package(Qt4 REQUIRED)
@ -82,7 +92,11 @@ QT4_WRAP_UI(UI_HDRS ${WIZARD_UI})
include(${QT_USE_FILE}) include(${QT_USE_FILE})
include_directories(${CMAKE_CURRENT_BINARY_DIR} ${LIBUNSHIELD_INCLUDE}) include_directories(${CMAKE_CURRENT_BINARY_DIR})
if (OPENMW_USE_UNSHIELD)
include_directories(${LIBUNSHIELD_INCLUDE})
endif()
add_executable(openmw-wizard add_executable(openmw-wizard
${GUI_TYPE} ${GUI_TYPE}
@ -96,10 +110,14 @@ add_executable(openmw-wizard
target_link_libraries(openmw-wizard target_link_libraries(openmw-wizard
${Boost_LIBRARIES} ${Boost_LIBRARIES}
${QT_LIBRARIES} ${QT_LIBRARIES}
${LIBUNSHIELD_LIBRARY}
components components
) )
if (OPENMW_USE_UNSHIELD)
target_link_libraries(openmw-wizard ${LIBUNSHIELD_LIBRARY})
endif()
if(DPKG_PROGRAM) if(DPKG_PROGRAM)
INSTALL(TARGETS openmw-wizard RUNTIME DESTINATION games COMPONENT openmw-wizard) INSTALL(TARGETS openmw-wizard RUNTIME DESTINATION games COMPONENT openmw-wizard)
endif() endif()

@ -322,7 +322,9 @@ void Wizard::MainWizard::setupPages()
setPage(Page_ExistingInstallation, new ExistingInstallationPage(this)); setPage(Page_ExistingInstallation, new ExistingInstallationPage(this));
setPage(Page_InstallationTarget, new InstallationTargetPage(this, mCfgMgr)); setPage(Page_InstallationTarget, new InstallationTargetPage(this, mCfgMgr));
setPage(Page_ComponentSelection, new ComponentSelectionPage(this)); setPage(Page_ComponentSelection, new ComponentSelectionPage(this));
#ifdef OPENMW_USE_UNSHIELD
setPage(Page_Installation, new InstallationPage(this)); setPage(Page_Installation, new InstallationPage(this));
#endif
setPage(Page_Import, new ImportPage(this)); setPage(Page_Import, new ImportPage(this));
setPage(Page_Conclusion, new ConclusionPage(this)); setPage(Page_Conclusion, new ConclusionPage(this));
setStartId(Page_Intro); setStartId(Page_Intro);

@ -9,6 +9,11 @@ Wizard::MethodSelectionPage::MethodSelectionPage(QWidget *parent) :
setupUi(this); setupUi(this);
#ifndef OPENMW_USE_UNSHIELD
newLocationRadioButton->setEnabled(false);
existingLocationRadioButton->setChecked(true);
#endif
registerField(QLatin1String("installation.new"), newLocationRadioButton); registerField(QLatin1String("installation.new"), newLocationRadioButton);
} }

Loading…
Cancel
Save