CMake: Installer buildscript fixes

This commit is contained in:
Vicki Pfau 2018-10-04 12:09:54 -07:00
parent d5548f6da8
commit eda2669780
2 changed files with 16 additions and 9 deletions

View File

@ -105,6 +105,7 @@ Features:
- Switch: Rumble support - Switch: Rumble support
- Switch: Rotation support - Switch: Rotation support
- Qt: State file load/save menu options - Qt: State file load/save menu options
- Windows installer
Bugfixes: Bugfixes:
- PSP2: Fix audio crackling after fast forward - PSP2: Fix audio crackling after fast forward
- PSP2: Fix audio crackling when buffer is full - PSP2: Fix audio crackling when buffer is full

View File

@ -1055,22 +1055,28 @@ else()
add_custom_target(LICENSE ALL DEPENDS LICENSE.txt) add_custom_target(LICENSE ALL DEPENDS LICENSE.txt)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/CHANGES.txt ${CMAKE_CURRENT_BINARY_DIR}/LICENSE.txt DESTINATION ${CMAKE_INSTALL_DOCDIR} COMPONENT ${BINARY_NAME}) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/CHANGES.txt ${CMAKE_CURRENT_BINARY_DIR}/LICENSE.txt DESTINATION ${CMAKE_INSTALL_DOCDIR} COMPONENT ${BINARY_NAME})
if(DISTBUILD AND WIN32) if(DISTBUILD AND WIN32)
set(INSTALLER "${PROJECT_NAME}-setup-${CLEAN_VERSION_STRING}-win${WIN_BITS}.exe") if(INSTALLER_NAME)
set(INSTALLER_TARGET "${INSTALLER_NAME}.exe")
set(ISCC_FLAGS "/F${INSTALLER_NAME}")
else()
set(INSTALLER_TARGET "${PROJECT_NAME}-setup-${CLEAN_VERSION_STRING}-win${WIN_BITS}.exe")
endif()
if(CMAKE_CROSSCOMPILING) if(CMAKE_CROSSCOMPILING)
find_program(WINE NAMES wine wine-stable wine-development) find_program(WINE NAMES wine wine-stable wine-development)
find_file(ISCC ISCC.exe HINTS "$ENV{HOME}/.wine/drive_c/Program Files/") find_file(ISCC ISCC.exe HINTS "$ENV{HOME}/.wine/drive_c/Program Files/" PATH_SUFFIXES "Inno Setup 5")
add_custom_command(OUTPUT ${INSTALLER} message(STATUS "${WINE}" "${ISCC}" setup.iss /Q ${ISCC_FLAGS})
COMMAND "${WINE}" "${ISCC}" setup.iss /Q add_custom_command(OUTPUT ${INSTALLER_TARGET}
COMMAND "${WINE}" "${ISCC}" setup.iss /Q ${ISCC_FLAGS}
DEPENDS ${BINARY_NAME}-qt ${BINARY_NAME}-sdl CHANGES LICENSE) DEPENDS ${BINARY_NAME}-qt ${BINARY_NAME}-sdl CHANGES LICENSE)
else() else()
find_program(ISCC NAMES ISSC ISSC.exe) find_program(ISCC NAMES ISCC ISCC.exe PATH_SUFFIXES "Inno Setup 5")
add_custom_command(OUTPUT ${INSTALLER} add_custom_command(OUTPUT ${INSTALLER_TARGET}
COMMAND "${ISCC}" setup.iss /Q COMMAND "${ISCC}" setup.iss /Q ${ISCC_FLAGS}
DEPENDS ${BINARY_NAME}-qt ${BINARY_NAME}-sdl CHANGES LICENSE) DEPENDS ${BINARY_NAME}-qt ${BINARY_NAME}-sdl CHANGES LICENSE)
endif() endif()
if(ISCC) if(ISCC)
add_custom_target(installer ALL DEPENDS ${INSTALLER}) add_custom_target(installer ALL DEPENDS ${INSTALLER_TARGET})
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${INSTALLER}" DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT installer) install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${INSTALLER_TARGET}" DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT installer)
endif() endif()
endif() endif()
endif() endif()