Skip to content

Commit

Permalink
windows installer will now also silently install the vc redist package
Browse files Browse the repository at this point in the history
  • Loading branch information
rp- committed May 23, 2015
1 parent bedb1b0 commit d99d83f
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions CMakeLists.txt
Expand Up @@ -15,10 +15,12 @@ if(WIN32 AND MSVC)
set(QT5_PATH "E:/Qt64/Qt5.4.1/5.4/msvc2013_64")
set(SQLITE3_PATH "E:/libs/sqlite3_x64")
set(OPENSSL_PATH "E:/libs/openssl-1.0.2a-x64_86-win64")
set(VSREDIST "vcredist_x64.exe")
else()
set(QT5_PATH "E:/Qt/Qt5.4.1/5.4/msvc2013")
set(SQLITE3_PATH "E:/libs/sqlite3")
set(OPENSSL_PATH "E:/libs/openssl-1.0.2a-i386-win32")
set(VSREDIST "vcredist_x86.exe")
endif()
set(USE_QT5 TRUE)
set(CMAKE_PREFIX_PATH "${QT5_PATH};${SQLITE3_PATH}")
Expand Down Expand Up @@ -321,6 +323,8 @@ if(WIN32 AND MSVC)
install(FILES
${QT5_PATH}/plugins/platforms/qwindows.dll
DESTINATION bin/platforms)

install(PROGRAMS ${CMAKE_CURRENT_SOURCE_DIR}/deps/${VSREDIST} DESTINATION tmp)
endif()

#cpack
Expand All @@ -343,6 +347,12 @@ if(WIN32 AND NOT UNIX)
set(CPACK_NSIS_CONTACT "peinthor@gmail.com")
set(CPACK_NSIS_MODIFY_PATH OFF)
set(CPACK_NSIS_MUI_FINISHPAGE_RUN "sqlitebrowser.exe")

# VS redist
list(APPEND CPACK_NSIS_EXTRA_INSTALL_COMMANDS "
ExecWait '$INSTDIR\\\\tmp\\\\${VSREDIST} /install /passive /quiet'
Delete '$INSTDIR\\\\tmp\\\\${VSREDIST}'
")
else(WIN32 AND NOT UNIX)
set(CPACK_STRIP_FILES "bin/sqlitebrowser")
set(CPACK_SOURCE_STRIP_FILES "")
Expand Down

0 comments on commit d99d83f

Please sign in to comment.