Refactor Companion Windows install and installer targets (#5949)
* [companion][build][Windows] Refactor 'install' and 'installer' targets: Use qtwindeploy to collect Qt dependencies; 'install' with WIN_DO_FULL_INSTALL=YES now really copies everything needed; Simplified NSIS script, now also supports MinGW build; Refactor libeay search. * Rename nsis input script. * Fix NSIS input script name in CMakeLists.txt. * [Companion][build] Create new Windows icon with more sizes; move icon files out of src root.
@@ -303,7 +303,7 @@ set(companion_UIS
|
|||||||
)
|
)
|
||||||
|
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
set(icon_RC icon.rc)
|
set(icon_RC images/winicons/icon.rc)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
qt5_wrap_ui(companion_SRCS ${companion_UIS})
|
qt5_wrap_ui(companion_SRCS ${companion_UIS})
|
||||||
@@ -362,13 +362,6 @@ if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
|||||||
|
|
||||||
elseif(WIN32)
|
elseif(WIN32)
|
||||||
|
|
||||||
set(QT_DLL_DIR ${QT_LIB_DIR})
|
|
||||||
set(INSTALL_TEMP_QTDLL_FILES Qt5Core Qt5Gui Qt5Widgets Qt5Xml Qt5Network Qt5PrintSupport Qt5Multimedia Qt5Svg)
|
|
||||||
set(INSTALL_TEMP_ICUDLL_FILES icudt54.dll icuin54.dll icuuc54.dll)
|
|
||||||
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
|
|
||||||
set(INSTALL_TEMP_QTDLL_SFX "d")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(NOT WIN_DO_FULL_INSTALL)
|
if(NOT WIN_DO_FULL_INSTALL)
|
||||||
# Just copy supporting DLLs to build folder
|
# Just copy supporting DLLs to build folder
|
||||||
set(INSTALL_DESTINATION "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}")
|
set(INSTALL_DESTINATION "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}")
|
||||||
@@ -382,106 +375,90 @@ elseif(WIN32)
|
|||||||
install(TARGETS ${SIMULATOR_NAME} DESTINATION ${INSTALL_DESTINATION})
|
install(TARGETS ${SIMULATOR_NAME} DESTINATION ${INSTALL_DESTINATION})
|
||||||
install(FILES ${simulator_plugins} DESTINATION "${INSTALL_DESTINATION}")
|
install(FILES ${simulator_plugins} DESTINATION "${INSTALL_DESTINATION}")
|
||||||
# supporting utilities
|
# supporting utilities
|
||||||
set(INSTALL_TEMP_FILES avrdude.exe avrdude.conf dfu-util.exe libusb0.dll libusb-1.0.dll)
|
set(INSTALL_TEMP_FILES avrdude.exe avrdude.conf dfu-util.exe libusb0.dll libusb-1.0.dll license.txt)
|
||||||
foreach(tmpfile ${INSTALL_TEMP_FILES})
|
foreach(tmpfile ${INSTALL_TEMP_FILES})
|
||||||
install(FILES "${COMPANION_SRC_DIRECTORY}/../targets/windows/${tmpfile}" DESTINATION ${INSTALL_DESTINATION})
|
install(FILES "${COMPANION_SRC_DIRECTORY}/../targets/windows/${tmpfile}" DESTINATION ${INSTALL_DESTINATION})
|
||||||
endforeach()
|
endforeach()
|
||||||
endif() # WIN_DO_FULL_INSTALL
|
endif() # WIN_DO_FULL_INSTALL
|
||||||
|
|
||||||
# Qt dlls
|
# Qt dlls (using windeployqt)
|
||||||
foreach(tmpfile ${INSTALL_TEMP_QTDLL_FILES})
|
## Qt translations are already packaged into our custom qrc. Pckg size could be further reduced with: [--no-system-d3d-compiler] [--no-angle]
|
||||||
install(FILES ${QT_DLL_DIR}/${tmpfile}${INSTALL_TEMP_QTDLL_SFX}.dll DESTINATION ${INSTALL_DESTINATION})
|
set(wdqtopts --no-translations --no-opengl-sw)
|
||||||
endforeach()
|
if(CMAKE_BUILD_TYPE STREQUAL "Release")
|
||||||
install(FILES ${QT_DLL_DIR}/../plugins/platforms/qwindows${INSTALL_TEMP_QTDLL_SFX}.dll DESTINATION ${INSTALL_DESTINATION}/platforms)
|
set(wdqtopts ${wdqtopts} --release) # release builds aren't always properly detected with mingw
|
||||||
# ICU dlls
|
endif()
|
||||||
foreach(tmpfile ${INSTALL_TEMP_ICUDLL_FILES})
|
if(MSVC)
|
||||||
# Qt5.7+ doesn't use icu dlls anymore, hence optional
|
set(wdqtopts ${wdqtopts} --no-compiler-runtime) # --compiler-runtime includes vcredist_x86, but we just copy the required DLLs manually
|
||||||
install(FILES ${QT_DLL_DIR}/${tmpfile}.dll DESTINATION ${INSTALL_DESTINATION} OPTIONAL)
|
endif()
|
||||||
endforeach()
|
set(wdqtopts ${wdqtopts} -dir "${INSTALL_DESTINATION}" "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${COMPANION_NAME}.exe" "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${SIMULATOR_NAME}.exe")
|
||||||
|
# Add installer command to execute windeployqt
|
||||||
|
install(CODE "execute_process(COMMAND \"${QT_BIN_DIR}/windeployqt.exe\" ${wdqtopts})")
|
||||||
|
|
||||||
# SDL dll
|
# SDL dll
|
||||||
if(SDL_FOUND AND SDL_LIBRARY_PATH AND EXISTS "${SDL_LIBRARY_PATH}/SDL.dll")
|
if(SDL_FOUND AND EXISTS "${SDL_LIBRARY_PATH}/SDL.dll")
|
||||||
set(SDL_DIR ${SDL_LIBRARY_PATH}) # this is also used by NSIS installer script
|
set(SDL_DIR ${SDL_LIBRARY_PATH}) # this is also used by NSIS installer script
|
||||||
install(FILES ${SDL_DIR}/SDL.dll DESTINATION ${INSTALL_DESTINATION})
|
install(FILES ${SDL_DIR}/SDL.dll DESTINATION ${INSTALL_DESTINATION})
|
||||||
elseif(SDL_FOUND)
|
elseif(SDL_FOUND)
|
||||||
message(WARNING "Installer: SDL.dll not found!")
|
message(WARNING "Installer: SDL.dll not found, set SDL_LIBRARY_PATH manually.")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# libeay (SSL) dlls (used by QtNetwork)
|
# libeay (SSL) dlls (used by QtNetwork) -- not strictly required but avoids possible issues with downloads and Qt warnings.
|
||||||
set(EAY_LIB_DIR "") # this is also used by NSIS installer script
|
file(TO_CMAKE_PATH "$ENV{PROGRAMFILES}" WIN_PROGRAM_FILES)
|
||||||
# Mingw-w64 comes with the required DLLs
|
find_path(EAY_LIB_DIR libeay32.dll HINTS
|
||||||
if (MINGW AND IS_DIRECTORY "${MINGW_DIR}/../opt/bin/libeay32.dll")
|
"${WIN_PROGRAM_FILES}/OpenSSL" "${WIN_PROGRAM_FILES}/OpenSSL-Win32"
|
||||||
set(EAY_LIB_DIR "${MINGW_DIR}/../opt/bin")
|
"C:/OpenSSL/" "C:/OpenSSL-Win32/"
|
||||||
# check the user-configured WIN_EXTRA_LIBS_PATH for an OpenSSL folder
|
"${WIN_EXTRA_LIBS_PATH}" "${WIN_EXTRA_LIBS_PATH}/OpenSSL" "${WIN_EXTRA_LIBS_PATH}/OpenSSL-Win32"
|
||||||
elseif(EXISTS "${WIN_EXTRA_LIBS_PATH}/OpenSSL/libeay32.dll")
|
"${MINGW_DIR}/../opt/bin"
|
||||||
set(EAY_LIB_DIR "${WIN_EXTRA_LIBS_PATH}/OpenSSL")
|
"${PYTHON_DIRECTORY}/lib/site-packages/PyQt4"
|
||||||
# most build setups will still have the (now legacy) PyQt dependency, so check for that next
|
PATH_SUFFIXES bin
|
||||||
elseif(EXISTS "${PYTHON_DIRECTORY}/lib/site-packages/PyQt4/libeay32.dll")
|
DOC "Path to libeay32.dll and ssleay32.dll (OpenSSL)"
|
||||||
set(EAY_LIB_DIR "${PYTHON_DIRECTORY}/lib/site-packages/PyQt4")
|
)
|
||||||
else()
|
|
||||||
# the "slow" way -- look for an OpenSSL install
|
|
||||||
find_package("OpenSSL")
|
|
||||||
if (OPENSSL_FOUND)
|
|
||||||
set(EAY_LIB_DIR "${OPENSSL_INCLUDE_DIR}/../bin")
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
if (EAY_LIB_DIR)
|
if (EAY_LIB_DIR)
|
||||||
install(FILES "${EAY_LIB_DIR}/libeay32.dll" "${EAY_LIB_DIR}/ssleay32.dll" DESTINATION ${INSTALL_DESTINATION} OPTIONAL)
|
install(FILES "${EAY_LIB_DIR}/libeay32.dll" "${EAY_LIB_DIR}/ssleay32.dll" DESTINATION ${INSTALL_DESTINATION} OPTIONAL)
|
||||||
|
else()
|
||||||
|
message(WARNING "Installer: SSL libs not found, set EAY_LIB_DIR manually.")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# C++/system dlls, depends on compiler
|
# C++/system dlls, depends on compiler
|
||||||
if(MSVC)
|
if(MSVC)
|
||||||
string(REPLACE "\\" "/" WIN_SYSDIR "$ENV{windir}")
|
file(TO_CMAKE_PATH "$ENV{windir}/SysWOW64" WIN_SYSDIR) # This would be "system32" for a 64-bit build or on x86... but how to tell?
|
||||||
set(WIN_SYSDIR "${WIN_SYSDIR}/SysWOW64") # This would be "system32" for a 64-bit build or on x86... but how to tell?
|
if (NOT EXISTS "${WIN_SYSDIR}")
|
||||||
if(IS_DIRECTORY "${WIN_SYSDIR}")
|
file(TO_CMAKE_PATH "$ENV{windir}/system32" WIN_SYSDIR) # Must be 32-bit Windows.
|
||||||
install(FILES "${WIN_SYSDIR}/msvcp140.dll" "${WIN_SYSDIR}/vcruntime140.dll" DESTINATION ${INSTALL_DESTINATION} OPTIONAL)
|
|
||||||
endif()
|
endif()
|
||||||
|
install(FILES "${WIN_SYSDIR}/msvcp140.dll" "${WIN_SYSDIR}/vcruntime140.dll" DESTINATION ${INSTALL_DESTINATION} OPTIONAL)
|
||||||
if(WIN_PTHREAD_DLL)
|
if(WIN_PTHREAD_DLL)
|
||||||
install(FILES "${WIN_PTHREAD_DLL}" DESTINATION ${INSTALL_DESTINATION})
|
install(FILES "${WIN_PTHREAD_DLL}" DESTINATION ${INSTALL_DESTINATION})
|
||||||
endif()
|
endif()
|
||||||
elseif(MINGW)
|
|
||||||
install(FILES "${MINGW_DIR}/libgcc_s_dw2-1.dll" "${MINGW_DIR}/libstdc++-6.dll" "${MINGW_DIR}/libwinpthread-1.dll" DESTINATION ${INSTALL_DESTINATION})
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
endif() # WIN32 install
|
endif() # WIN32 install
|
||||||
|
|
||||||
############# Packaging ####################
|
############# Packaging ####################
|
||||||
|
|
||||||
# Create Windows installer with NSIS (only works for MSVC for now)
|
# Create Windows installer with NSIS
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
if(MSVC)
|
|
||||||
set(COMPANION_NSI_IN_FILE companion-vs.nsi.in)
|
|
||||||
set(SIMULATOR_NSI_IN_FILE simulator-vs.nsi.in)
|
|
||||||
else()
|
|
||||||
set(COMPANION_NSI_IN_FILE companion-msys.nsi.in)
|
|
||||||
set(SIMULATOR_NSI_IN_FILE simulator-msys.nsi.in)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
set(SYSDIR "$ENV{windir}/system32")
|
|
||||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/../targets/windows/${COMPANION_NSI_IN_FILE} ${PROJECT_BINARY_DIR}/companion/companion.nsi @ONLY)
|
|
||||||
#configure_file(${CMAKE_CURRENT_SOURCE_DIR}/../targets/windows/${SIMULATOR_NSI_IN_FILE} ${PROJECT_BINARY_DIR}/companion/simulator.nsi @ONLY)
|
|
||||||
|
|
||||||
find_program(NSIS_EXE makensis.exe PATHS
|
find_program(NSIS_EXE makensis.exe PATHS
|
||||||
"C:/Program Files/NSIS"
|
"C:/Program Files/NSIS"
|
||||||
"C:/Program Files (x86)/NSIS"
|
"C:/Program Files (x86)/NSIS"
|
||||||
"C:/Programs/NSIS"
|
"C:/Programs/NSIS"
|
||||||
|
"${WIN_EXTRA_LIBS_PATH}/NSIS"
|
||||||
|
)
|
||||||
|
|
||||||
|
if (NSIS_EXE)
|
||||||
|
file(TO_NATIVE_PATH "${INSTALL_DESTINATION}" NSIS_DISTRO) # all files in here will be included in installer
|
||||||
|
set(NSI_FILE "${PROJECT_BINARY_DIR}/companion/companion.nsi")
|
||||||
|
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/../targets/windows/companion.nsi.in" "${NSI_FILE}" @ONLY)
|
||||||
|
|
||||||
|
add_custom_target(installer
|
||||||
|
# The 'install' target prepares all the distro files, make sure it has been executed first.
|
||||||
|
COMMAND "${CMAKE_COMMAND}" --build "${CMAKE_BINARY_DIR}" --target install
|
||||||
|
COMMAND "${NSIS_EXE}" "${NSI_FILE}"
|
||||||
|
DEPENDS "${NSI_FILE}"
|
||||||
|
COMMENT "Building Windows NSIS installer..."
|
||||||
)
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
add_custom_command(OUTPUT ${PROJECT_BINARY_DIR}/companion/companion-windows.exe
|
|
||||||
COMMAND "${NSIS_EXE}" ARGS ${PROJECT_BINARY_DIR}/companion/companion.nsi
|
|
||||||
DEPENDS companion simulator opentx-simulators ${PROJECT_BINARY_DIR}/companion/companion.nsi
|
|
||||||
COMMENT "Companion Windows NSIS Installer")
|
|
||||||
|
|
||||||
# add_custom_command(OUTPUT ${PROJECT_BINARY_DIR}/companion/simulator-install.exe
|
|
||||||
# COMMAND "${NSIS_EXE}" ARGS ${PROJECT_BINARY_DIR}/companion/simulator.nsi
|
|
||||||
# DEPENDS simulator ${PROJECT_BINARY_DIR}/companion/simulator.nsi
|
|
||||||
# COMMENT "Simulator Windows NSIS Installer")
|
|
||||||
|
|
||||||
add_custom_target(installer
|
|
||||||
DEPENDS ${PROJECT_BINARY_DIR}/companion/companion-windows.exe
|
|
||||||
# DEPENDS ${PROJECT_BINARY_DIR}/companion/simulator-windows.exe
|
|
||||||
SOURCES ${PROJECT_BINARY_DIR}/companion/companion.nsi
|
|
||||||
# SOURCES ${PROJECT_BINARY_DIR}/companion/simulator.nsi
|
|
||||||
)
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(CPACK_PACKAGE_NAME "companion${C9X_NAME_SUFFIX}")
|
set(CPACK_PACKAGE_NAME "companion${C9X_NAME_SUFFIX}")
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<!DOCTYPE RCC><RCC version="1.0">
|
<!DOCTYPE RCC><RCC version="1.0">
|
||||||
<qresource prefix="/">
|
<qresource prefix="/">
|
||||||
<file>images/customize.png</file>
|
<file>images/customize.png</file>
|
||||||
<file>icon.png</file>
|
<file alias="icon.png">images/icon.png</file>
|
||||||
<file>../../CREDITS.txt</file>
|
<file>../../CREDITS.txt</file>
|
||||||
<file>../releasenotes.txt</file>
|
<file>../releasenotes.txt</file>
|
||||||
<file>images/screenshot.png</file>
|
<file>images/screenshot.png</file>
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 78 KiB |
@@ -1 +0,0 @@
|
|||||||
IDI_ICON1 ICON DISCARDABLE "icon.ico"
|
|
||||||
|
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 2.6 KiB |
@@ -0,0 +1 @@
|
|||||||
|
IDI_ICON1 ICON DISCARDABLE "opentx.ico"
|
||||||
|
After Width: | Height: | Size: 480 KiB |
|
After Width: | Height: | Size: 66 KiB |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 1.7 KiB |
|
After Width: | Height: | Size: 2.4 KiB |
|
After Width: | Height: | Size: 264 KiB |
|
After Width: | Height: | Size: 3.7 KiB |
|
After Width: | Height: | Size: 4.2 KiB |
|
After Width: | Height: | Size: 5.4 KiB |
|
After Width: | Height: | Size: 6.6 KiB |
|
After Width: | Height: | Size: 9.4 KiB |
|
After Width: | Height: | Size: 15 KiB |
|
After Width: | Height: | Size: 17 KiB |
|
After Width: | Height: | Size: 21 KiB |
|
After Width: | Height: | Size: 26 KiB |
|
After Width: | Height: | Size: 37 KiB |
@@ -1,200 +0,0 @@
|
|||||||
;NSIS Modern User Interface
|
|
||||||
;Start Menu Folder Selection Example Script
|
|
||||||
;Written by Joost Verburg
|
|
||||||
|
|
||||||
;--------------------------------
|
|
||||||
;Include Modern UI
|
|
||||||
|
|
||||||
!include "MUI2.nsh"
|
|
||||||
!include "@CMAKE_CURRENT_SOURCE_DIR@\..\targets\windows\FileAssociation.nsh"
|
|
||||||
|
|
||||||
;--------------------------------
|
|
||||||
;General
|
|
||||||
|
|
||||||
;Name and file
|
|
||||||
Name "OpenTX companion"
|
|
||||||
OutFile "companion-windows-v@VERSION@.exe"
|
|
||||||
|
|
||||||
;Default installation folder
|
|
||||||
InstallDir "$PROGRAMFILES\OpenTX companion"
|
|
||||||
|
|
||||||
;Get installation folder from registry if available
|
|
||||||
InstallDirRegKey HKCU "Software\companion9x" ""
|
|
||||||
|
|
||||||
;Compressor options
|
|
||||||
SetCompressor /FINAL /SOLID lzma
|
|
||||||
SetCompressorDictSize 64
|
|
||||||
|
|
||||||
;Request application privileges for Windows Vista
|
|
||||||
RequestExecutionLevel admin
|
|
||||||
|
|
||||||
;--------------------------------
|
|
||||||
;Variables
|
|
||||||
|
|
||||||
Var StartMenuFolder
|
|
||||||
|
|
||||||
;--------------------------------
|
|
||||||
;Interface Settings
|
|
||||||
|
|
||||||
!define MUI_ABORTWARNING
|
|
||||||
|
|
||||||
;--------------------------------
|
|
||||||
;Pages
|
|
||||||
|
|
||||||
!insertmacro MUI_PAGE_LICENSE "@CMAKE_CURRENT_SOURCE_DIR@\..\targets\windows\license.txt"
|
|
||||||
!insertmacro MUI_PAGE_COMPONENTS
|
|
||||||
!insertmacro MUI_PAGE_DIRECTORY
|
|
||||||
|
|
||||||
;Start Menu Folder Page Configuration
|
|
||||||
!define MUI_STARTMENUPAGE_REGISTRY_ROOT "HKCU"
|
|
||||||
!define MUI_STARTMENUPAGE_REGISTRY_KEY "Software\companion9x"
|
|
||||||
!define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "Start Menu Folder"
|
|
||||||
|
|
||||||
!insertmacro MUI_PAGE_STARTMENU Application $StartMenuFolder
|
|
||||||
|
|
||||||
!insertmacro MUI_PAGE_INSTFILES
|
|
||||||
|
|
||||||
# These indented statements modify settings for MUI_PAGE_FINISH
|
|
||||||
!define MUI_FINISHPAGE_NOAUTOCLOSE
|
|
||||||
!define MUI_FINISHPAGE_RUN
|
|
||||||
!define MUI_FINISHPAGE_RUN_CHECKED
|
|
||||||
!define MUI_FINISHPAGE_RUN_TEXT "Launch companion"
|
|
||||||
!define MUI_FINISHPAGE_RUN_FUNCTION "LaunchLink"
|
|
||||||
# !define MUI_FINISHPAGE_SHOWREADME_NOTCHECKED
|
|
||||||
# !define MUI_FINISHPAGE_SHOWREADME $INSTDIR\readme.txt
|
|
||||||
!insertmacro MUI_PAGE_FINISH
|
|
||||||
|
|
||||||
!insertmacro MUI_UNPAGE_CONFIRM
|
|
||||||
!insertmacro MUI_UNPAGE_INSTFILES
|
|
||||||
|
|
||||||
;--------------------------------
|
|
||||||
;Languages
|
|
||||||
|
|
||||||
!insertmacro MUI_LANGUAGE "English"
|
|
||||||
!insertmacro MUI_LANGUAGE "French"
|
|
||||||
|
|
||||||
;--------------------------------
|
|
||||||
;Installer Sections
|
|
||||||
|
|
||||||
Section "OpenTX companion" SecDummy
|
|
||||||
|
|
||||||
SetOutPath "$INSTDIR"
|
|
||||||
|
|
||||||
File "@CMAKE_CURRENT_SOURCE_DIR@\..\targets\windows\license.txt"
|
|
||||||
File "companion.exe"
|
|
||||||
File "C:\Programs\xerces\src\.libs\libxerces-c-3-1.dll"
|
|
||||||
File "C:\MinGW\bin\libgcc_s_dw2-1.dll"
|
|
||||||
File "C:\MinGW\bin\mingwm10.dll"
|
|
||||||
File "C:\MinGW\bin\libstdc++-6.dll"
|
|
||||||
File "@QT_BINARY_DIR@\QtCore4.dll"
|
|
||||||
File "@QT_BINARY_DIR@\QtGui4.dll"
|
|
||||||
File "@QT_BINARY_DIR@\QtXml4.dll"
|
|
||||||
File "@QT_BINARY_DIR@\QtNetwork4.dll"
|
|
||||||
File "@QT_BINARY_DIR@\Phonon4.dll"
|
|
||||||
File "@CMAKE_CURRENT_SOURCE_DIR@\..\targets\windows\avrdude.exe"
|
|
||||||
File "@CMAKE_CURRENT_SOURCE_DIR@\..\targets\windows\avrdude.conf"
|
|
||||||
File "@CMAKE_CURRENT_SOURCE_DIR@\..\targets\windows\libusb0.dll"
|
|
||||||
File "@CMAKE_CURRENT_SOURCE_DIR@\..\targets\windows\dfu-util.exe"
|
|
||||||
|
|
||||||
CreateDirectory "$INSTDIR\phonon_backend"
|
|
||||||
SetOutPath "$INSTDIR\phonon_backend"
|
|
||||||
File "@QT_BINARY_DIR@\..\plugins\phonon_backend\Phonon_ds94.dll"
|
|
||||||
|
|
||||||
CreateDirectory "$INSTDIR\lang"
|
|
||||||
SetOutPath "$INSTDIR\lang"
|
|
||||||
File "*.qm"
|
|
||||||
|
|
||||||
SetOutPath "$INSTDIR"
|
|
||||||
;Store installation folder
|
|
||||||
WriteRegStr HKCU "Software\companion9x" "" $INSTDIR
|
|
||||||
|
|
||||||
;Associate with extentions ,bin and .hex
|
|
||||||
${registerExtension} "$INSTDIR\companion.exe" ".bin" "BIN_File"
|
|
||||||
${registerExtension} "$INSTDIR\companion.exe" ".hex" "HEX_File"
|
|
||||||
${registerExtension} "$INSTDIR\companion.exe" ".companion" "EEPE_File"
|
|
||||||
${registerExtension} "$INSTDIR\companion.exe" ".eepm" "EEPM_File"
|
|
||||||
|
|
||||||
;Create uninstaller
|
|
||||||
WriteUninstaller "$INSTDIR\Uninstall.exe"
|
|
||||||
|
|
||||||
;Registry information for add/remove programs
|
|
||||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\OpenTX" "DisplayName" "OpenTX Companion"
|
|
||||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\OpenTX" "UninstallString" "$\"$INSTDIR\Uninstall.exe$\""
|
|
||||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\OpenTX" "DisplayIcon" "$\"$INSTDIR\companion.exe$\""
|
|
||||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\OpenTX" "Publisher" "OpenTX"
|
|
||||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\OpenTX" "URLInfoAbout" "http://www.open-tx.org"
|
|
||||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\ImageMaker" "QuietUninstallString" "$\"$INSTDIR\Uninstall.exe$\" /S"
|
|
||||||
|
|
||||||
!insertmacro MUI_STARTMENU_WRITE_BEGIN Application
|
|
||||||
|
|
||||||
;Create shortcuts
|
|
||||||
CreateDirectory "$SMPROGRAMS\$StartMenuFolder"
|
|
||||||
CreateShortCut "$SMPROGRAMS\$StartMenuFolder\companion.lnk" "$INSTDIR\companion.exe"
|
|
||||||
CreateShortCut "$SMPROGRAMS\$StartMenuFolder\Uninstall.lnk" "$INSTDIR\Uninstall.exe"
|
|
||||||
|
|
||||||
!insertmacro MUI_STARTMENU_WRITE_END
|
|
||||||
|
|
||||||
SectionEnd
|
|
||||||
|
|
||||||
;--------------------------------
|
|
||||||
;Descriptions
|
|
||||||
|
|
||||||
;Language strings
|
|
||||||
LangString DESC_SecDummy ${LANG_ENGLISH} "Models and settings editor for OpenTX"
|
|
||||||
LangString DESC_SecDummy ${LANG_FRENCH} "Editeur de r�glages et mod�les pour OpenTX"
|
|
||||||
|
|
||||||
;Assign language strings to sections
|
|
||||||
!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
|
|
||||||
!insertmacro MUI_DESCRIPTION_TEXT ${SecDummy} $(DESC_SecDummy)
|
|
||||||
!insertmacro MUI_FUNCTION_DESCRIPTION_END
|
|
||||||
|
|
||||||
;--------------------------------
|
|
||||||
;Uninstaller Section
|
|
||||||
|
|
||||||
Section "Uninstall"
|
|
||||||
|
|
||||||
;ADD YOUR OWN FILES HERE...
|
|
||||||
|
|
||||||
Delete "$INSTDIR\license.txt"
|
|
||||||
Delete "$INSTDIR\companion.exe"
|
|
||||||
Delete "$INSTDIR\libxerces-c-3-1.dll"
|
|
||||||
Delete "$INSTDIR\libgcc_s_dw2-1.dll"
|
|
||||||
Delete "$INSTDIR\mingwm10.dll"
|
|
||||||
Delete "$INSTDIR\libstdc++-6.dll"
|
|
||||||
Delete "$INSTDIR\QtCore4.dll"
|
|
||||||
Delete "$INSTDIR\QtGui4.dll"
|
|
||||||
Delete "$INSTDIR\QtNetwork4.dll"
|
|
||||||
Delete "$INSTDIR\Phonon4.dll"
|
|
||||||
Delete "$INSTDIR\QtXml4.dll"
|
|
||||||
Delete "$INSTDIR\avrdude.exe"
|
|
||||||
Delete "$INSTDIR\avrdude.conf"
|
|
||||||
Delete "$INSTDIR\libusb0.dll"
|
|
||||||
Delete "$INSTDIR\dfu-util.exe"
|
|
||||||
Delete "$INSTDIR\Uninstall.exe"
|
|
||||||
|
|
||||||
Delete "$INSTDIR\lang\*.*"
|
|
||||||
Delete "$INSTDIR\phonon_backend\*.*"
|
|
||||||
|
|
||||||
RMDir "$INSTDIR\lang"
|
|
||||||
RMDir "$INSTDIR\phonon_backend"
|
|
||||||
RMDir "$INSTDIR"
|
|
||||||
|
|
||||||
${unregisterExtension} ".bin" "BIN File"
|
|
||||||
${unregisterExtension} ".hex" "HEX File"
|
|
||||||
${unregisterExtension} ".eepm" "EEPE File"
|
|
||||||
${unregisterExtension} ".companion" "EEPM File"
|
|
||||||
|
|
||||||
!insertmacro MUI_STARTMENU_GETFOLDER Application $StartMenuFolder
|
|
||||||
|
|
||||||
Delete "$SMPROGRAMS\$StartMenuFolder\companion.lnk"
|
|
||||||
Delete "$SMPROGRAMS\$StartMenuFolder\Uninstall.lnk"
|
|
||||||
RMDir "$SMPROGRAMS\$StartMenuFolder"
|
|
||||||
|
|
||||||
DeleteRegKey /ifempty HKCU "Software\companion9x"
|
|
||||||
DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\OpenTX"
|
|
||||||
|
|
||||||
SectionEnd
|
|
||||||
|
|
||||||
Function LaunchLink
|
|
||||||
ExecShell "" "$INSTDIR\companion.exe"
|
|
||||||
FunctionEnd
|
|
||||||
@@ -60,7 +60,7 @@
|
|||||||
;--------------------------------
|
;--------------------------------
|
||||||
;Pages
|
;Pages
|
||||||
|
|
||||||
!insertmacro MUI_PAGE_LICENSE "@CMAKE_CURRENT_SOURCE_DIR@\..\targets\windows\license.txt"
|
!insertmacro MUI_PAGE_LICENSE "@NSIS_DISTRO@\license.txt"
|
||||||
!insertmacro MUI_PAGE_COMPONENTS
|
!insertmacro MUI_PAGE_COMPONENTS
|
||||||
!insertmacro MUI_PAGE_DIRECTORY
|
!insertmacro MUI_PAGE_DIRECTORY
|
||||||
|
|
||||||
@@ -98,70 +98,18 @@
|
|||||||
Section "OpenTX Companion @VERSION_FAMILY@" SecDummy
|
Section "OpenTX Companion @VERSION_FAMILY@" SecDummy
|
||||||
|
|
||||||
Delete "$INSTDIR\opentx-*-simulator.dll"
|
Delete "$INSTDIR\opentx-*-simulator.dll"
|
||||||
Delete "$INSTDIR\lang\*.*"
|
RMDir /r "$INSTDIR\lang"
|
||||||
RMDir "$INSTDIR\lang"
|
RMDir /r "$INSTDIR\phonon_backend"
|
||||||
SetOutPath "$INSTDIR\platforms"
|
|
||||||
File "@QT_DLL_DIR@\..\plugins\platforms\qwindows.dll"
|
|
||||||
|
|
||||||
SetOutPath "$INSTDIR"
|
SetOutPath "$INSTDIR"
|
||||||
|
|
||||||
File "@CMAKE_CURRENT_SOURCE_DIR@\..\targets\windows\license.txt"
|
; Copy the complete distribution folder contents
|
||||||
File "..\Release\companion.exe"
|
File /r "@NSIS_DISTRO@\*"
|
||||||
File "..\Release\simulator.exe"
|
|
||||||
File "..\Release\opentx-*-simulator.dll"
|
|
||||||
${!defineifexist} PTHREAD_WINDIR "C:\Programs\pthreads\Pre-built.2\lib\pthreadVC2.dll"
|
|
||||||
!ifdef PTHREAD_WINDIR
|
|
||||||
File "C:\Programs\pthreads\Pre-built.2\lib\pthreadVC2.dll"
|
|
||||||
!else
|
|
||||||
File "@SYSDIR@\system32\pthreadVC2.dll"
|
|
||||||
!endif
|
|
||||||
File "@SYSDIR@\msvcp140.dll"
|
|
||||||
File "@SYSDIR@\vcruntime140.dll"
|
|
||||||
File "@QT_DLL_DIR@\Qt5Core.dll"
|
|
||||||
File "@QT_DLL_DIR@\Qt5Gui.dll"
|
|
||||||
File "@QT_DLL_DIR@\Qt5Widgets.dll"
|
|
||||||
File "@QT_DLL_DIR@\Qt5PrintSupport.dll"
|
|
||||||
File "@QT_DLL_DIR@\Qt5Network.dll"
|
|
||||||
File "@QT_DLL_DIR@\Qt5Multimedia.dll"
|
|
||||||
File "@QT_DLL_DIR@\Qt5Svg.dll"
|
|
||||||
File "@QT_DLL_DIR@\Qt5Xml.dll"
|
|
||||||
${!defineifexist} EAY_LIB_WINDIR "@EAY_LIB_DIR@\libeay32.dll"
|
|
||||||
!ifdef EAY_LIB_WINDIR
|
|
||||||
File "@EAY_LIB_DIR@\libeay32.dll"
|
|
||||||
File "@EAY_LIB_DIR@\ssleay32.dll"
|
|
||||||
!endif
|
|
||||||
|
|
||||||
File "@SDL_DIR@\SDL.dll"
|
|
||||||
File "@CMAKE_CURRENT_SOURCE_DIR@\..\targets\windows\avrdude.exe"
|
|
||||||
File "@CMAKE_CURRENT_SOURCE_DIR@\..\targets\windows\avrdude.conf"
|
|
||||||
File "@CMAKE_CURRENT_SOURCE_DIR@\..\targets\windows\libusb0.dll"
|
|
||||||
File "@CMAKE_CURRENT_SOURCE_DIR@\..\targets\windows\dfu-util.exe"
|
|
||||||
File "@CMAKE_CURRENT_SOURCE_DIR@\..\targets\windows\libusb-1.0.dll"
|
|
||||||
|
|
||||||
SetOutPath "$INSTDIR\printsupport"
|
|
||||||
File "@QT_DLL_DIR@\..\plugins\printsupport\windowsprintersupport.dll"
|
|
||||||
|
|
||||||
SetOutPath "$INSTDIR\imageformats"
|
|
||||||
File "@QT_DLL_DIR@\..\plugins\imageformats\qjpeg.dll"
|
|
||||||
File "@QT_DLL_DIR@\..\plugins\imageformats\qsvg.dll"
|
|
||||||
File "@QT_DLL_DIR@\..\plugins\imageformats\qdds.dll"
|
|
||||||
File "@QT_DLL_DIR@\..\plugins\imageformats\qgif.dll"
|
|
||||||
File "@QT_DLL_DIR@\..\plugins\imageformats\qicns.dll"
|
|
||||||
File "@QT_DLL_DIR@\..\plugins\imageformats\qico.dll"
|
|
||||||
File "@QT_DLL_DIR@\..\plugins\imageformats\qtga.dll"
|
|
||||||
File "@QT_DLL_DIR@\..\plugins\imageformats\qtiff.dll"
|
|
||||||
File "@QT_DLL_DIR@\..\plugins\imageformats\qwbmp.dll"
|
|
||||||
File "@QT_DLL_DIR@\..\plugins\imageformats\qwebp.dll"
|
|
||||||
|
|
||||||
SetOutPath "$INSTDIR\mediaservice"
|
|
||||||
File "@QT_DLL_DIR@\..\plugins\mediaservice\dsengine.dll"
|
|
||||||
|
|
||||||
SetOutPath "$INSTDIR"
|
|
||||||
;Store installation folder
|
;Store installation folder
|
||||||
WriteRegStr HKCU "Software\OpenTX\Companion @VERSION_FAMILY@" "" $INSTDIR
|
WriteRegStr HKCU "Software\OpenTX\Companion @VERSION_FAMILY@" "" $INSTDIR
|
||||||
|
|
||||||
;Associate with extentions .otx, .bin (TODO: remove .bin)
|
;Associate with extentions .otx
|
||||||
${registerExtension} "$INSTDIR\companion.exe" ".bin" "BIN File"
|
|
||||||
${registerExtension} "$INSTDIR\companion.exe" ".otx" "OpenTX Settings File"
|
${registerExtension} "$INSTDIR\companion.exe" ".otx" "OpenTX Settings File"
|
||||||
|
|
||||||
;Create uninstaller
|
;Create uninstaller
|
||||||
@@ -206,46 +154,46 @@ Section "un.OpenTX Companion @VERSION_FAMILY@"
|
|||||||
|
|
||||||
SectionIn RO ; Not deselectable
|
SectionIn RO ; Not deselectable
|
||||||
|
|
||||||
;ADD YOUR OWN FILES HERE...
|
|
||||||
|
|
||||||
Delete "$INSTDIR\license.txt"
|
Delete "$INSTDIR\license.txt"
|
||||||
Delete "$INSTDIR\companion.exe"
|
Delete "$INSTDIR\companion.exe"
|
||||||
Delete "$INSTDIR\simulator.exe"
|
Delete "$INSTDIR\simulator.exe"
|
||||||
Delete "$INSTDIR\opentx-*-simulator.dll"
|
Delete "$INSTDIR\*opentx-*-simulator.dll"
|
||||||
Delete "$INSTDIR\pthreadVC2.dll"
|
|
||||||
Delete "$INSTDIR\SDL.dll"
|
Delete "$INSTDIR\SDL.dll"
|
||||||
|
; MSVC-specific libs
|
||||||
Delete "$INSTDIR\msvcp140.dll"
|
Delete "$INSTDIR\msvcp140.dll"
|
||||||
Delete "$INSTDIR\vcruntime140.dll"
|
Delete "$INSTDIR\vcruntime140.dll"
|
||||||
Delete "$INSTDIR\Qt5Core.dll"
|
Delete "$INSTDIR\pthreadVC2.dll"
|
||||||
Delete "$INSTDIR\Qt5Gui.dll"
|
; Qt libs
|
||||||
Delete "$INSTDIR\Qt5Widgets.dll"
|
Delete "$INSTDIR\Qt5*.dll"
|
||||||
Delete "$INSTDIR\Qt5PrintSupport.dll"
|
Delete "$INSTDIR\d3dcompiler_47.dll"
|
||||||
Delete "$INSTDIR\Qt5Network.dll"
|
Delete "$INSTDIR\libEGL.dll"
|
||||||
Delete "$INSTDIR\Qt5Multimedia.dll"
|
Delete "$INSTDIR\libGLESV2.dll"
|
||||||
Delete "$INSTDIR\Qt5Xml.dll"
|
; flashing utils
|
||||||
Delete "$INSTDIR\Qt5Svg.dll"
|
|
||||||
Delete "$INSTDIR\avrdude.exe"
|
Delete "$INSTDIR\avrdude.exe"
|
||||||
Delete "$INSTDIR\avrdude.conf"
|
Delete "$INSTDIR\avrdude.conf"
|
||||||
Delete "$INSTDIR\libusb0.dll"
|
|
||||||
Delete "$INSTDIR\dfu-util.exe"
|
Delete "$INSTDIR\dfu-util.exe"
|
||||||
|
Delete "$INSTDIR\libusb0.dll"
|
||||||
Delete "$INSTDIR\libusb-1.0.dll"
|
Delete "$INSTDIR\libusb-1.0.dll"
|
||||||
|
; OpenSSL libs
|
||||||
Delete "$INSTDIR\libeay32.dll"
|
Delete "$INSTDIR\libeay32.dll"
|
||||||
Delete "$INSTDIR\ssleay32.dll"
|
Delete "$INSTDIR\ssleay32.dll"
|
||||||
|
; MinGW libs
|
||||||
|
Delete "$INSTDIR\libgcc_s_dw2-1.dll"
|
||||||
|
Delete "$INSTDIR\libstdc++-6.dll"
|
||||||
|
Delete "$INSTDIR\libwinpthread-1.dll"
|
||||||
|
|
||||||
Delete "$INSTDIR\Uninstall.exe"
|
Delete "$INSTDIR\Uninstall.exe"
|
||||||
|
|
||||||
Delete "$INSTDIR\lang\*.*"
|
; Qt plugin folders
|
||||||
Delete "$INSTDIR\phonon_backend\*.*"
|
RMDir /r "$INSTDIR\audio"
|
||||||
Delete "$INSTDIR\platforms\*.*"
|
RMDir /r "$INSTDIR\bearer"
|
||||||
Delete "$INSTDIR\printsupport\*.*"
|
RMDir /r "$INSTDIR\iconengines"
|
||||||
Delete "$INSTDIR\mediaservice\*.*"
|
RMDir /r "$INSTDIR\imageformats"
|
||||||
Delete "$INSTDIR\imageformats\*.*"
|
RMDir /r "$INSTDIR\mediaservice"
|
||||||
|
RMDir /r "$INSTDIR\platforms"
|
||||||
|
RMDir /r "$INSTDIR\playlistformats"
|
||||||
|
RMDir /r "$INSTDIR\printsupport"
|
||||||
|
|
||||||
RMDir "$INSTDIR\lang"
|
|
||||||
RMDir "$INSTDIR\phonon_backend"
|
|
||||||
RMDir "$INSTDIR\platforms"
|
|
||||||
RMDir "$INSTDIR\printsupport"
|
|
||||||
RMDir "$INSTDIR\mediaservice"
|
|
||||||
RMDir "$INSTDIR\imageformats"
|
|
||||||
RMDir "$INSTDIR"
|
RMDir "$INSTDIR"
|
||||||
|
|
||||||
${unregisterExtension} ".bin" "BIN File"
|
${unregisterExtension} ".bin" "BIN File"
|
||||||
@@ -1,204 +0,0 @@
|
|||||||
;NSIS Modern User Interface
|
|
||||||
;Start Menu Folder Selection Example Script
|
|
||||||
;Written by Joost Verburg
|
|
||||||
|
|
||||||
;--------------------------------
|
|
||||||
;Include Modern UI
|
|
||||||
|
|
||||||
!include "MUI2.nsh"
|
|
||||||
|
|
||||||
;--------------------------------
|
|
||||||
;General
|
|
||||||
|
|
||||||
;Name and file
|
|
||||||
Name "OpenTX Simulator"
|
|
||||||
OutFile "simulator-windows-@VERSION@.exe"
|
|
||||||
|
|
||||||
;Default installation folder
|
|
||||||
InstallDir "$PROGRAMFILES\OpenTX"
|
|
||||||
|
|
||||||
;Get installation folder from registry if available
|
|
||||||
InstallDirRegKey HKCU "Software\OpenTX" ""
|
|
||||||
|
|
||||||
;Compressor options
|
|
||||||
SetCompressor /FINAL /SOLID lzma
|
|
||||||
SetCompressorDictSize 64
|
|
||||||
|
|
||||||
;Request application privileges for Windows Vista
|
|
||||||
RequestExecutionLevel admin
|
|
||||||
|
|
||||||
;--------------------------------
|
|
||||||
;Variables
|
|
||||||
|
|
||||||
Var StartMenuFolder
|
|
||||||
|
|
||||||
;--------------------------------
|
|
||||||
;Interface Settings
|
|
||||||
|
|
||||||
!define MUI_ABORTWARNING
|
|
||||||
|
|
||||||
;--------------------------------
|
|
||||||
;File Exists Macro
|
|
||||||
|
|
||||||
; See http://nsis.sourceforge.net/Check_if_a_file_exists_at_compile_time for documentation
|
|
||||||
!macro !defineifexist _VAR_NAME _FILE_NAME
|
|
||||||
!tempfile _TEMPFILE
|
|
||||||
!ifdef NSIS_WIN32_MAKENSIS
|
|
||||||
; Windows - cmd.exe
|
|
||||||
!system 'if exist "${_FILE_NAME}" echo !define ${_VAR_NAME} > "${_TEMPFILE}"'
|
|
||||||
!else
|
|
||||||
; Posix - sh
|
|
||||||
!system 'if [ -e "${_FILE_NAME}" ]; then echo "!define ${_VAR_NAME}" > "${_TEMPFILE}"; fi'
|
|
||||||
!endif
|
|
||||||
!include '${_TEMPFILE}'
|
|
||||||
!delfile '${_TEMPFILE}'
|
|
||||||
!undef _TEMPFILE
|
|
||||||
!macroend
|
|
||||||
!define !defineifexist "!insertmacro !defineifexist"
|
|
||||||
|
|
||||||
;--------------------------------
|
|
||||||
;Pages
|
|
||||||
|
|
||||||
!insertmacro MUI_PAGE_LICENSE "@CMAKE_CURRENT_SOURCE_DIR@\..\targets\windows\license.txt"
|
|
||||||
!insertmacro MUI_PAGE_COMPONENTS
|
|
||||||
!insertmacro MUI_PAGE_DIRECTORY
|
|
||||||
|
|
||||||
;Start Menu Folder Page Configuration
|
|
||||||
!define MUI_STARTMENUPAGE_REGISTRY_ROOT "HKCU"
|
|
||||||
!define MUI_STARTMENUPAGE_REGISTRY_KEY "Software\OpenTX"
|
|
||||||
!define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "Start Menu Folder"
|
|
||||||
|
|
||||||
!insertmacro MUI_PAGE_STARTMENU Application $StartMenuFolder
|
|
||||||
|
|
||||||
!insertmacro MUI_PAGE_INSTFILES
|
|
||||||
|
|
||||||
# These indented statements modify settings for MUI_PAGE_FINISH
|
|
||||||
!define MUI_FINISHPAGE_NOAUTOCLOSE
|
|
||||||
!define MUI_FINISHPAGE_RUN
|
|
||||||
!define MUI_FINISHPAGE_RUN_CHECKED
|
|
||||||
!define MUI_FINISHPAGE_RUN_TEXT "Launch OpenTX Simulator"
|
|
||||||
!define MUI_FINISHPAGE_RUN_FUNCTION "LaunchLink"
|
|
||||||
!insertmacro MUI_PAGE_FINISH
|
|
||||||
|
|
||||||
!insertmacro MUI_UNPAGE_CONFIRM
|
|
||||||
!insertmacro MUI_UNPAGE_INSTFILES
|
|
||||||
|
|
||||||
;--------------------------------
|
|
||||||
;Languages
|
|
||||||
|
|
||||||
!insertmacro MUI_LANGUAGE "English"
|
|
||||||
!insertmacro MUI_LANGUAGE "French"
|
|
||||||
|
|
||||||
;--------------------------------
|
|
||||||
;Installer Sections
|
|
||||||
|
|
||||||
Section "OpenTX Simulator" SecDummy
|
|
||||||
|
|
||||||
SetOutPath "$INSTDIR"
|
|
||||||
|
|
||||||
File "@CMAKE_CURRENT_SOURCE_DIR@\..\targets\windows\license.txt"
|
|
||||||
File "Release\simulator.exe"
|
|
||||||
File "Release\opentx-*-simulator.dll"
|
|
||||||
|
|
||||||
${!defineifexist} PTHREAD_WINDIR "C:\Programs\pthreads\Pre-built.2\lib\pthreadVC2.dll"
|
|
||||||
!ifdef PTHREAD_WINDIR
|
|
||||||
File "C:\Programs\pthreads\Pre-built.2\lib\pthreadVC2.dll"
|
|
||||||
!else
|
|
||||||
File "@SYSDIR@\system32\pthreadVC2.dll"
|
|
||||||
!endif
|
|
||||||
File "C:\Programs\xerces-vc\bin\xerces-c_3_1.dll"
|
|
||||||
File "C:\Programs\SDL\lib\SDL.dll"
|
|
||||||
File "@SYSDIR@\msvcp100.dll"
|
|
||||||
File "@SYSDIR@\msvcr100.dll"
|
|
||||||
File "@QT_BINARY_DIR@\QtCore4.dll"
|
|
||||||
File "@QT_BINARY_DIR@\QtGui4.dll"
|
|
||||||
File "@QT_BINARY_DIR@\QtNetwork4.dll"
|
|
||||||
File "@QT_BINARY_DIR@\Phonon4.dll"
|
|
||||||
File "@QT_BINARY_DIR@\QtXml4.dll"
|
|
||||||
|
|
||||||
CreateDirectory "$INSTDIR\phonon_backend"
|
|
||||||
SetOutPath "$INSTDIR\phonon_backend"
|
|
||||||
File "@QT_BINARY_DIR@\..\plugins\phonon_backend\Phonon_ds94.dll"
|
|
||||||
|
|
||||||
CreateDirectory "$INSTDIR\lang"
|
|
||||||
SetOutPath "$INSTDIR\lang"
|
|
||||||
File "src\*.qm"
|
|
||||||
|
|
||||||
SetOutPath "$INSTDIR"
|
|
||||||
;Store installation folder
|
|
||||||
WriteRegStr HKCU "Software\OpenTX" "" $INSTDIR
|
|
||||||
|
|
||||||
;Create uninstaller
|
|
||||||
WriteUninstaller "$INSTDIR\Uninstall.exe"
|
|
||||||
|
|
||||||
;Registry information for add/remove programs
|
|
||||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\OpenTX" "DisplayName" "OpenTX Simulator"
|
|
||||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\OpenTX" "UninstallString" "$\"$INSTDIR\Uninstall.exe$\""
|
|
||||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\OpenTX" "DisplayIcon" "$\"$INSTDIR\simulator.exe$\""
|
|
||||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\OpenTX" "Publisher" "OpenTX"
|
|
||||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\OpenTX" "URLInfoAbout" "http://www.open-tx.org"
|
|
||||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\ImageMaker" "QuietUninstallString" "$\"$INSTDIR\Uninstall.exe$\" /S"
|
|
||||||
|
|
||||||
!insertmacro MUI_STARTMENU_WRITE_BEGIN Application
|
|
||||||
|
|
||||||
;Create shortcuts
|
|
||||||
CreateDirectory "$SMPROGRAMS\$StartMenuFolder"
|
|
||||||
CreateShortCut "$SMPROGRAMS\$StartMenuFolder\simulator.lnk" "$INSTDIR\simulator.exe"
|
|
||||||
CreateShortCut "$SMPROGRAMS\$StartMenuFolder\Uninstall.lnk" "$INSTDIR\Uninstall.exe"
|
|
||||||
|
|
||||||
!insertmacro MUI_STARTMENU_WRITE_END
|
|
||||||
|
|
||||||
SectionEnd
|
|
||||||
|
|
||||||
;--------------------------------
|
|
||||||
;Descriptions
|
|
||||||
|
|
||||||
;Language strings
|
|
||||||
LangString DESC_SecDummy ${LANG_ENGLISH} "Simulator for OpenTX"
|
|
||||||
LangString DESC_SecDummy ${LANG_FRENCH} "Simulateur pour OpenTX"
|
|
||||||
|
|
||||||
;Assign language strings to sections
|
|
||||||
!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
|
|
||||||
!insertmacro MUI_DESCRIPTION_TEXT ${SecDummy} $(DESC_SecDummy)
|
|
||||||
!insertmacro MUI_FUNCTION_DESCRIPTION_END
|
|
||||||
|
|
||||||
;--------------------------------
|
|
||||||
;Uninstaller Section
|
|
||||||
|
|
||||||
Section "Uninstall"
|
|
||||||
|
|
||||||
;ADD YOUR OWN FILES HERE...
|
|
||||||
|
|
||||||
Delete "$INSTDIR\license.txt"
|
|
||||||
Delete "$INSTDIR\simulator.exe"
|
|
||||||
Delete "$INSTDIR\pthreadVC2.dll"
|
|
||||||
Delete "$INSTDIR\xerces-c_3_1.dll"
|
|
||||||
Delete "$INSTDIR\SDL.dll"
|
|
||||||
Delete "$INSTDIR\msvcp100.dll"
|
|
||||||
Delete "$INSTDIR\msvcr100.dll"
|
|
||||||
Delete "$INSTDIR\QtCore4.dll"
|
|
||||||
Delete "$INSTDIR\QtGui4.dll"
|
|
||||||
Delete "$INSTDIR\QtXml4.dll"
|
|
||||||
Delete "$INSTDIR\QtNetwork4.dll"
|
|
||||||
Delete "$INSTDIR\Phonon4.dll"
|
|
||||||
Delete "$INSTDIR\Uninstall.exe"
|
|
||||||
Delete "$INSTDIR\lang\*.*"
|
|
||||||
Delete "$INSTDIR\opentx-*-simulator.dll"
|
|
||||||
|
|
||||||
RMDir "$INSTDIR\lang"
|
|
||||||
RMDir "$INSTDIR"
|
|
||||||
|
|
||||||
!insertmacro MUI_STARTMENU_GETFOLDER Application $StartMenuFolder
|
|
||||||
|
|
||||||
Delete "$SMPROGRAMS\$StartMenuFolder\simulator.lnk"
|
|
||||||
Delete "$SMPROGRAMS\$StartMenuFolder\Uninstall.lnk"
|
|
||||||
RMDir "$SMPROGRAMS\$StartMenuFolder"
|
|
||||||
|
|
||||||
DeleteRegKey /ifempty HKCU "Software\OpenTX"
|
|
||||||
DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\OpenTX"
|
|
||||||
|
|
||||||
SectionEnd
|
|
||||||
|
|
||||||
Function LaunchLink
|
|
||||||
ExecShell "" "$INSTDIR\simulator.exe"
|
|
||||||
FunctionEnd
|
|
||||||
@@ -1,204 +0,0 @@
|
|||||||
;NSIS Modern User Interface
|
|
||||||
;Start Menu Folder Selection Example Script
|
|
||||||
;Written by Joost Verburg
|
|
||||||
|
|
||||||
;--------------------------------
|
|
||||||
;Include Modern UI
|
|
||||||
|
|
||||||
!include "MUI2.nsh"
|
|
||||||
|
|
||||||
;--------------------------------
|
|
||||||
;General
|
|
||||||
|
|
||||||
;Name and file
|
|
||||||
Name "OpenTX Simulator"
|
|
||||||
OutFile "simulator-windows-@VERSION@.exe"
|
|
||||||
|
|
||||||
;Default installation folder
|
|
||||||
InstallDir "$PROGRAMFILES\OpenTX"
|
|
||||||
|
|
||||||
;Get installation folder from registry if available
|
|
||||||
InstallDirRegKey HKCU "Software\OpenTX" ""
|
|
||||||
|
|
||||||
;Compressor options
|
|
||||||
SetCompressor /FINAL /SOLID lzma
|
|
||||||
SetCompressorDictSize 64
|
|
||||||
|
|
||||||
;Request application privileges for Windows Vista
|
|
||||||
RequestExecutionLevel admin
|
|
||||||
|
|
||||||
;--------------------------------
|
|
||||||
;Variables
|
|
||||||
|
|
||||||
Var StartMenuFolder
|
|
||||||
|
|
||||||
;--------------------------------
|
|
||||||
;Interface Settings
|
|
||||||
|
|
||||||
!define MUI_ABORTWARNING
|
|
||||||
|
|
||||||
;--------------------------------
|
|
||||||
;File Exists Macro
|
|
||||||
|
|
||||||
; See http://nsis.sourceforge.net/Check_if_a_file_exists_at_compile_time for documentation
|
|
||||||
!macro !defineifexist _VAR_NAME _FILE_NAME
|
|
||||||
!tempfile _TEMPFILE
|
|
||||||
!ifdef NSIS_WIN32_MAKENSIS
|
|
||||||
; Windows - cmd.exe
|
|
||||||
!system 'if exist "${_FILE_NAME}" echo !define ${_VAR_NAME} > "${_TEMPFILE}"'
|
|
||||||
!else
|
|
||||||
; Posix - sh
|
|
||||||
!system 'if [ -e "${_FILE_NAME}" ]; then echo "!define ${_VAR_NAME}" > "${_TEMPFILE}"; fi'
|
|
||||||
!endif
|
|
||||||
!include '${_TEMPFILE}'
|
|
||||||
!delfile '${_TEMPFILE}'
|
|
||||||
!undef _TEMPFILE
|
|
||||||
!macroend
|
|
||||||
!define !defineifexist "!insertmacro !defineifexist"
|
|
||||||
|
|
||||||
;--------------------------------
|
|
||||||
;Pages
|
|
||||||
|
|
||||||
!insertmacro MUI_PAGE_LICENSE "@CMAKE_CURRENT_SOURCE_DIR@\..\targets\windows\license.txt"
|
|
||||||
!insertmacro MUI_PAGE_COMPONENTS
|
|
||||||
!insertmacro MUI_PAGE_DIRECTORY
|
|
||||||
|
|
||||||
;Start Menu Folder Page Configuration
|
|
||||||
!define MUI_STARTMENUPAGE_REGISTRY_ROOT "HKCU"
|
|
||||||
!define MUI_STARTMENUPAGE_REGISTRY_KEY "Software\OpenTX"
|
|
||||||
!define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "Start Menu Folder"
|
|
||||||
|
|
||||||
!insertmacro MUI_PAGE_STARTMENU Application $StartMenuFolder
|
|
||||||
|
|
||||||
!insertmacro MUI_PAGE_INSTFILES
|
|
||||||
|
|
||||||
# These indented statements modify settings for MUI_PAGE_FINISH
|
|
||||||
!define MUI_FINISHPAGE_NOAUTOCLOSE
|
|
||||||
!define MUI_FINISHPAGE_RUN
|
|
||||||
!define MUI_FINISHPAGE_RUN_CHECKED
|
|
||||||
!define MUI_FINISHPAGE_RUN_TEXT "Launch OpenTX Simulator"
|
|
||||||
!define MUI_FINISHPAGE_RUN_FUNCTION "LaunchLink"
|
|
||||||
!insertmacro MUI_PAGE_FINISH
|
|
||||||
|
|
||||||
!insertmacro MUI_UNPAGE_CONFIRM
|
|
||||||
!insertmacro MUI_UNPAGE_INSTFILES
|
|
||||||
|
|
||||||
;--------------------------------
|
|
||||||
;Languages
|
|
||||||
|
|
||||||
!insertmacro MUI_LANGUAGE "English"
|
|
||||||
!insertmacro MUI_LANGUAGE "French"
|
|
||||||
|
|
||||||
;--------------------------------
|
|
||||||
;Installer Sections
|
|
||||||
|
|
||||||
Section "OpenTX Simulator" SecDummy
|
|
||||||
|
|
||||||
SetOutPath "$INSTDIR"
|
|
||||||
|
|
||||||
File "@CMAKE_CURRENT_SOURCE_DIR@\..\targets\windows\license.txt"
|
|
||||||
File "Release\simulator.exe"
|
|
||||||
File "Release\opentx-*-simulator.dll"
|
|
||||||
|
|
||||||
${!defineifexist} PTHREAD_WINDIR "C:\Programs\pthreads\Pre-built.2\lib\pthreadVC2.dll"
|
|
||||||
!ifdef PTHREAD_WINDIR
|
|
||||||
File "C:\Programs\pthreads\Pre-built.2\lib\pthreadVC2.dll"
|
|
||||||
!else
|
|
||||||
File "@SYSDIR@\system32\pthreadVC2.dll"
|
|
||||||
!endif
|
|
||||||
File "C:\Programs\xerces-vc\bin\xerces-c_3_1.dll"
|
|
||||||
File "C:\Programs\SDL\lib\SDL.dll"
|
|
||||||
File "@SYSDIR@\msvcp100.dll"
|
|
||||||
File "@SYSDIR@\msvcr100.dll"
|
|
||||||
File "@QT_BINARY_DIR@\QtCore4.dll"
|
|
||||||
File "@QT_BINARY_DIR@\QtGui4.dll"
|
|
||||||
File "@QT_BINARY_DIR@\QtNetwork4.dll"
|
|
||||||
File "@QT_BINARY_DIR@\Phonon4.dll"
|
|
||||||
File "@QT_BINARY_DIR@\QtXml4.dll"
|
|
||||||
|
|
||||||
CreateDirectory "$INSTDIR\phonon_backend"
|
|
||||||
SetOutPath "$INSTDIR\phonon_backend"
|
|
||||||
File "@QT_BINARY_DIR@\..\plugins\phonon_backend\Phonon_ds94.dll"
|
|
||||||
|
|
||||||
CreateDirectory "$INSTDIR\lang"
|
|
||||||
SetOutPath "$INSTDIR\lang"
|
|
||||||
File "src\*.qm"
|
|
||||||
|
|
||||||
SetOutPath "$INSTDIR"
|
|
||||||
;Store installation folder
|
|
||||||
WriteRegStr HKCU "Software\OpenTX" "" $INSTDIR
|
|
||||||
|
|
||||||
;Create uninstaller
|
|
||||||
WriteUninstaller "$INSTDIR\Uninstall.exe"
|
|
||||||
|
|
||||||
;Registry information for add/remove programs
|
|
||||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\OpenTX" "DisplayName" "OpenTX Simulator"
|
|
||||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\OpenTX" "UninstallString" "$\"$INSTDIR\Uninstall.exe$\""
|
|
||||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\OpenTX" "DisplayIcon" "$\"$INSTDIR\simulator.exe$\""
|
|
||||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\OpenTX" "Publisher" "OpenTX"
|
|
||||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\OpenTX" "URLInfoAbout" "http://www.open-tx.org"
|
|
||||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\ImageMaker" "QuietUninstallString" "$\"$INSTDIR\Uninstall.exe$\" /S"
|
|
||||||
|
|
||||||
!insertmacro MUI_STARTMENU_WRITE_BEGIN Application
|
|
||||||
|
|
||||||
;Create shortcuts
|
|
||||||
CreateDirectory "$SMPROGRAMS\$StartMenuFolder"
|
|
||||||
CreateShortCut "$SMPROGRAMS\$StartMenuFolder\simulator.lnk" "$INSTDIR\simulator.exe"
|
|
||||||
CreateShortCut "$SMPROGRAMS\$StartMenuFolder\Uninstall.lnk" "$INSTDIR\Uninstall.exe"
|
|
||||||
|
|
||||||
!insertmacro MUI_STARTMENU_WRITE_END
|
|
||||||
|
|
||||||
SectionEnd
|
|
||||||
|
|
||||||
;--------------------------------
|
|
||||||
;Descriptions
|
|
||||||
|
|
||||||
;Language strings
|
|
||||||
LangString DESC_SecDummy ${LANG_ENGLISH} "Simulator for OpenTX"
|
|
||||||
LangString DESC_SecDummy ${LANG_FRENCH} "Simulateur pour OpenTX"
|
|
||||||
|
|
||||||
;Assign language strings to sections
|
|
||||||
!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
|
|
||||||
!insertmacro MUI_DESCRIPTION_TEXT ${SecDummy} $(DESC_SecDummy)
|
|
||||||
!insertmacro MUI_FUNCTION_DESCRIPTION_END
|
|
||||||
|
|
||||||
;--------------------------------
|
|
||||||
;Uninstaller Section
|
|
||||||
|
|
||||||
Section "Uninstall"
|
|
||||||
|
|
||||||
;ADD YOUR OWN FILES HERE...
|
|
||||||
|
|
||||||
Delete "$INSTDIR\license.txt"
|
|
||||||
Delete "$INSTDIR\simulator.exe"
|
|
||||||
Delete "$INSTDIR\pthreadVC2.dll"
|
|
||||||
Delete "$INSTDIR\xerces-c_3_1.dll"
|
|
||||||
Delete "$INSTDIR\SDL.dll"
|
|
||||||
Delete "$INSTDIR\msvcp100.dll"
|
|
||||||
Delete "$INSTDIR\msvcr100.dll"
|
|
||||||
Delete "$INSTDIR\QtCore4.dll"
|
|
||||||
Delete "$INSTDIR\QtGui4.dll"
|
|
||||||
Delete "$INSTDIR\QtXml4.dll"
|
|
||||||
Delete "$INSTDIR\QtNetwork4.dll"
|
|
||||||
Delete "$INSTDIR\Phonon4.dll"
|
|
||||||
Delete "$INSTDIR\Uninstall.exe"
|
|
||||||
Delete "$INSTDIR\lang\*.*"
|
|
||||||
Delete "$INSTDIR\opentx-*-simulator.dll"
|
|
||||||
|
|
||||||
RMDir "$INSTDIR\lang"
|
|
||||||
RMDir "$INSTDIR"
|
|
||||||
|
|
||||||
!insertmacro MUI_STARTMENU_GETFOLDER Application $StartMenuFolder
|
|
||||||
|
|
||||||
Delete "$SMPROGRAMS\$StartMenuFolder\simulator.lnk"
|
|
||||||
Delete "$SMPROGRAMS\$StartMenuFolder\Uninstall.lnk"
|
|
||||||
RMDir "$SMPROGRAMS\$StartMenuFolder"
|
|
||||||
|
|
||||||
DeleteRegKey /ifempty HKCU "Software\OpenTX"
|
|
||||||
DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\OpenTX"
|
|
||||||
|
|
||||||
SectionEnd
|
|
||||||
|
|
||||||
Function LaunchLink
|
|
||||||
ExecShell "" "$INSTDIR\simulator.exe"
|
|
||||||
FunctionEnd
|
|
||||||