Don't require libunshield on windows

loadfix
scrawl 10 years ago
parent c7933dd692
commit a8a2b44b0f

@ -600,11 +600,6 @@ if (BUILD_OPENCS)
endif()
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)
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
componentselectionpage.cpp
conclusionpage.cpp
existinginstallationpage.cpp
importpage.cpp
inisettings.cpp
installationpage.cpp
installationtargetpage.cpp
intropage.cpp
languageselectionpage.cpp
@ -12,8 +22,6 @@ set(WIZARD
mainwizard.cpp
methodselectionpage.cpp
unshield/unshieldworker.cpp
utils/componentlistwidget.cpp
)
@ -23,15 +31,12 @@ set(WIZARD_HEADER
existinginstallationpage.hpp
importpage.hpp
inisettings.hpp
installationpage.hpp
installationtargetpage.hpp
intropage.hpp
languageselectionpage.hpp
mainwizard.hpp
methodselectionpage.hpp
unshield/unshieldworker.hpp
utils/componentlistwidget.hpp
)
@ -41,15 +46,12 @@ set(WIZARD_HEADER_MOC
conclusionpage.hpp
existinginstallationpage.hpp
importpage.hpp
installationpage.hpp
installationtargetpage.hpp
intropage.hpp
languageselectionpage.hpp
mainwizard.hpp
methodselectionpage.hpp
unshield/unshieldworker.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/existinginstallationpage.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/intropage.ui
${CMAKE_SOURCE_DIR}/files/ui/wizard/languageselectionpage.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})
find_package(Qt4 REQUIRED)
@ -82,7 +92,11 @@ QT4_WRAP_UI(UI_HDRS ${WIZARD_UI})
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
${GUI_TYPE}
@ -96,10 +110,14 @@ add_executable(openmw-wizard
target_link_libraries(openmw-wizard
${Boost_LIBRARIES}
${QT_LIBRARIES}
${LIBUNSHIELD_LIBRARY}
components
)
if (OPENMW_USE_UNSHIELD)
target_link_libraries(openmw-wizard ${LIBUNSHIELD_LIBRARY})
endif()
if(DPKG_PROGRAM)
INSTALL(TARGETS openmw-wizard RUNTIME DESTINATION games COMPONENT openmw-wizard)
endif()

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

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

Loading…
Cancel
Save