fixes for deploy under Windows
This commit is contained in:
parent
4cbee9d1d5
commit
621aa8f1a6
1 changed files with 122 additions and 128 deletions
|
@ -1,128 +1,122 @@
|
||||||
; Jamulus NSIS installer script
|
; Jamulus NSIS installer script
|
||||||
|
|
||||||
!define APP_NAME "Jamulus"
|
!define APP_NAME "Jamulus"
|
||||||
!define APP_EXE "Jamulus.exe"
|
!define APP_EXE "Jamulus.exe"
|
||||||
!define AUTORUN_NAME "Jamulus server"
|
!define AUTORUN_NAME "Jamulus server"
|
||||||
!define UNINSTALL_EXE "Uninstall.exe"
|
!define UNINSTALL_EXE "Uninstall.exe"
|
||||||
!define INSTALLER_NAME "Jamulusinstaller.exe"
|
!define INSTALLER_NAME "Jamulusinstaller.exe"
|
||||||
!define BINARY_PATH "..\release\"
|
!define BINARY_PATH "..\release\"
|
||||||
;!define VS_REDIST_PATH "C:\Program Files (x86)\Microsoft Visual Studio 14.0\SDK\Bootstrapper\Packages\vcredist_x86\"
|
!define VS_REDIST_PATH "C:\Program Files (x86)\Microsoft Visual Studio 14.0\SDK\Bootstrapper\Packages\vcredist_x86\"
|
||||||
!define VS_REDIST_PATH "C:\Programme\Microsoft Visual Studio 14.0\SDK\Bootstrapper\Packages\vcredist_x86\"
|
;!define VS_REDIST_PATH "C:\Programme\Microsoft Visual Studio 14.0\SDK\Bootstrapper\Packages\vcredist_x86\"
|
||||||
!define VS_REDIST_EXE "vcredist_x86.exe"
|
!define VS_REDIST_EXE "vcredist_x86.exe"
|
||||||
!define UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APP_NAME}"
|
!define UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APP_NAME}"
|
||||||
!define AUTORUN_KEY "Software\Microsoft\Windows\CurrentVersion\Run"
|
!define AUTORUN_KEY "Software\Microsoft\Windows\CurrentVersion\Run"
|
||||||
|
|
||||||
|
|
||||||
SetCompressor lzma
|
SetCompressor lzma
|
||||||
Name "${APP_NAME}"
|
Name "${APP_NAME}"
|
||||||
Caption "${APP_NAME}"
|
Caption "${APP_NAME}"
|
||||||
OutFile "${INSTALLER_NAME}"
|
OutFile "${INSTALLER_NAME}"
|
||||||
InstallDir "$PROGRAMFILES\${APP_NAME}"
|
InstallDir "$PROGRAMFILES\${APP_NAME}"
|
||||||
|
|
||||||
LicenseText "License"
|
LicenseText "License"
|
||||||
LicenseData "..\COPYING"
|
LicenseData "..\COPYING"
|
||||||
|
|
||||||
Page license
|
Page license
|
||||||
Page directory
|
Page directory
|
||||||
Page instfiles
|
Page instfiles
|
||||||
|
|
||||||
|
|
||||||
Section
|
Section
|
||||||
|
|
||||||
; check if software is currently running
|
; check if software is currently running
|
||||||
FindProcDLL::FindProc "${APP_EXE}"
|
FindProcDLL::FindProc "${APP_EXE}"
|
||||||
IntCmp $R0 1 0 notRunning
|
IntCmp $R0 1 0 notRunning
|
||||||
MessageBox MB_OK|MB_ICONEXCLAMATION "${APP_NAME} is running. Please close it and run the setup again." /SD IDOK
|
MessageBox MB_OK|MB_ICONEXCLAMATION "${APP_NAME} is running. Please close it and run the setup again." /SD IDOK
|
||||||
Abort
|
Abort
|
||||||
notRunning:
|
notRunning:
|
||||||
|
|
||||||
; add reg keys so that software appears in Windows "Add/Remove Software"
|
; add reg keys so that software appears in Windows "Add/Remove Software"
|
||||||
WriteRegStr HKLM "${UNINST_KEY}" "DisplayName" "${APP_NAME} (remove only)"
|
WriteRegStr HKLM "${UNINST_KEY}" "DisplayName" "${APP_NAME} (remove only)"
|
||||||
WriteRegStr HKLM "${UNINST_KEY}" "UninstallString" '"$INSTDIR\${UNINSTALL_EXE}"'
|
WriteRegStr HKLM "${UNINST_KEY}" "UninstallString" '"$INSTDIR\${UNINSTALL_EXE}"'
|
||||||
|
|
||||||
SetOutPath $INSTDIR
|
SetOutPath $INSTDIR
|
||||||
|
|
||||||
; main application
|
; main application
|
||||||
File "${BINARY_PATH}${APP_EXE}"
|
File "${BINARY_PATH}${APP_EXE}"
|
||||||
|
|
||||||
; QT dlls
|
; QT dlls
|
||||||
File "$%QTDIR%\bin\Qt5Core.dll"
|
File "$%QTDIR%\bin\Qt5Core.dll"
|
||||||
File "$%QTDIR%\bin\Qt5Gui.dll"
|
File "$%QTDIR%\bin\Qt5Gui.dll"
|
||||||
File "$%QTDIR%\bin\Qt5Widgets.dll"
|
File "$%QTDIR%\bin\Qt5Widgets.dll"
|
||||||
File "$%QTDIR%\bin\Qt5Network.dll"
|
File "$%QTDIR%\bin\Qt5Network.dll"
|
||||||
File "$%QTDIR%\bin\Qt5Xml.dll"
|
File "$%QTDIR%\bin\Qt5Xml.dll"
|
||||||
File "$%QTDIR%\bin\D3DCompiler_47.dll"
|
File "$%QTDIR%\bin\D3DCompiler_47.dll"
|
||||||
File "$%QTDIR%\bin\icudt54.dll"
|
File "$%QTDIR%\bin\icudt54.dll"
|
||||||
File "$%QTDIR%\bin\icuin54.dll"
|
File "$%QTDIR%\bin\icuin54.dll"
|
||||||
File "$%QTDIR%\bin\icuuc54.dll"
|
File "$%QTDIR%\bin\icuuc54.dll"
|
||||||
File "$%QTDIR%\bin\libEGL.dll"
|
File "$%QTDIR%\bin\libEGL.dll"
|
||||||
File "$%QTDIR%\bin\libGLESv2.dll"
|
File "$%QTDIR%\bin\libGLESv2.dll"
|
||||||
|
|
||||||
; other files
|
; other files
|
||||||
File "..\COPYING"
|
File "..\COPYING"
|
||||||
|
|
||||||
; temporarily create Microsoft Visual Studio redistributable,
|
; temporarily create Microsoft Visual Studio redistributable,
|
||||||
File "${VS_REDIST_PATH}${VS_REDIST_EXE}"
|
File "${VS_REDIST_PATH}${VS_REDIST_EXE}"
|
||||||
ExecWait '"$INSTDIR\${VS_REDIST_EXE}" /Q'
|
ExecWait '"$INSTDIR\${VS_REDIST_EXE}" /Q'
|
||||||
|
|
||||||
; uninstaller
|
; uninstaller
|
||||||
WriteUninstaller $INSTDIR\${UNINSTALL_EXE}
|
WriteUninstaller $INSTDIR\${UNINSTALL_EXE}
|
||||||
|
|
||||||
; shortcuts
|
; shortcuts
|
||||||
CreateShortCut "$DESKTOP\${APP_NAME}.lnk" "$OUTDIR\${APP_EXE}"
|
CreateShortCut "$DESKTOP\${APP_NAME}.lnk" "$OUTDIR\${APP_EXE}"
|
||||||
|
|
||||||
CreateDirectory "$SMPROGRAMS\${APP_NAME}"
|
CreateDirectory "$SMPROGRAMS\${APP_NAME}"
|
||||||
CreateShortCut "$SMPROGRAMS\${APP_NAME}\${APP_NAME}.lnk" "$INSTDIR\${APP_EXE}"
|
CreateShortCut "$SMPROGRAMS\${APP_NAME}\${APP_NAME}.lnk" "$INSTDIR\${APP_EXE}"
|
||||||
CreateShortCut "$SMPROGRAMS\${APP_NAME}\${APP_NAME} Server.lnk" "$INSTDIR\${APP_EXE}" "-s"
|
CreateShortCut "$SMPROGRAMS\${APP_NAME}\${APP_NAME} Server.lnk" "$INSTDIR\${APP_EXE}" "-s"
|
||||||
CreateShortCut "$SMPROGRAMS\${APP_NAME}\${UNINSTALL_EXE}.lnk" "$INSTDIR\${UNINSTALL_EXE}"
|
CreateShortCut "$SMPROGRAMS\${APP_NAME}\${UNINSTALL_EXE}.lnk" "$INSTDIR\${UNINSTALL_EXE}"
|
||||||
|
|
||||||
; cleanup: remove temporary Microsoft Visual Studio redistributable executable
|
; cleanup: remove temporary Microsoft Visual Studio redistributable executable
|
||||||
Delete $INSTDIR\${VS_REDIST_EXE}
|
Delete $INSTDIR\${VS_REDIST_EXE}
|
||||||
|
|
||||||
; additional platform dlls
|
; additional platform dlls
|
||||||
SetOutPath $INSTDIR\platforms
|
SetOutPath $INSTDIR\platforms
|
||||||
File "$%QTDIR%\plugins\platforms\qwindows.dll"
|
File "$%QTDIR%\plugins\platforms\qwindows.dll"
|
||||||
File "$%QTDIR%\plugins\platforms\qminimal.dll"
|
File "$%QTDIR%\plugins\platforms\qminimal.dll"
|
||||||
|
|
||||||
; accessible qt plugin
|
SectionEnd
|
||||||
SetOutPath $INSTDIR\accessible
|
|
||||||
File "$%QTDIR%\plugins\accessible\qtaccessiblewidgets.dll"
|
|
||||||
|
Section "Uninstall"
|
||||||
SectionEnd
|
|
||||||
|
DeleteRegKey HKLM "${UNINST_KEY}"
|
||||||
|
|
||||||
Section "Uninstall"
|
; the software may have written an auto run entry in the registry, remove it
|
||||||
|
DeleteRegValue HKCU "${AUTORUN_KEY}" "${AUTORUN_NAME}"
|
||||||
DeleteRegKey HKLM "${UNINST_KEY}"
|
|
||||||
|
Delete "$DESKTOP\${APP_NAME}.lnk"
|
||||||
; the software may have written an auto run entry in the registry, remove it
|
Delete "$SMPROGRAMS\${APP_NAME}\${APP_NAME}.lnk"
|
||||||
DeleteRegValue HKCU "${AUTORUN_KEY}" "${AUTORUN_NAME}"
|
Delete "$SMPROGRAMS\${APP_NAME}\${APP_NAME} server.lnk"
|
||||||
|
Delete "$SMPROGRAMS\${APP_NAME}\${UNINSTALL_EXE}.lnk"
|
||||||
Delete "$DESKTOP\${APP_NAME}.lnk"
|
RMDIR "$SMPROGRAMS\${APP_NAME}"
|
||||||
Delete "$SMPROGRAMS\${APP_NAME}\${APP_NAME}.lnk"
|
|
||||||
Delete "$SMPROGRAMS\${APP_NAME}\${APP_NAME} server.lnk"
|
Delete $INSTDIR\${UNINSTALL_EXE}
|
||||||
Delete "$SMPROGRAMS\${APP_NAME}\${UNINSTALL_EXE}.lnk"
|
Delete $INSTDIR\${APP_EXE}
|
||||||
RMDIR "$SMPROGRAMS\${APP_NAME}"
|
Delete $INSTDIR\Qt5Core.dll
|
||||||
|
Delete $INSTDIR\Qt5Gui.dll
|
||||||
Delete $INSTDIR\${UNINSTALL_EXE}
|
Delete $INSTDIR\Qt5Widgets.dll
|
||||||
Delete $INSTDIR\${APP_EXE}
|
Delete $INSTDIR\Qt5Network.dll
|
||||||
Delete $INSTDIR\Qt5Core.dll
|
Delete $INSTDIR\Qt5Xml.dll
|
||||||
Delete $INSTDIR\Qt5Gui.dll
|
Delete $INSTDIR\D3DCompiler_47.dll
|
||||||
Delete $INSTDIR\Qt5Widgets.dll
|
Delete $INSTDIR\icudt54.dll
|
||||||
Delete $INSTDIR\Qt5Network.dll
|
Delete $INSTDIR\icuin54.dll
|
||||||
Delete $INSTDIR\Qt5Xml.dll
|
Delete $INSTDIR\icuuc54.dll
|
||||||
Delete $INSTDIR\D3DCompiler_47.dll
|
Delete $INSTDIR\libEGL.dll
|
||||||
Delete $INSTDIR\icudt54.dll
|
Delete $INSTDIR\libGLESv2.dll
|
||||||
Delete $INSTDIR\icuin54.dll
|
Delete $INSTDIR\COPYING
|
||||||
Delete $INSTDIR\icuuc54.dll
|
Delete $INSTDIR\platforms\qwindows.dll
|
||||||
Delete $INSTDIR\libEGL.dll
|
Delete $INSTDIR\platforms\qminimal.dll
|
||||||
Delete $INSTDIR\libGLESv2.dll
|
RMDir $INSTDIR\platforms
|
||||||
Delete $INSTDIR\COPYING
|
RMDir $INSTDIR
|
||||||
Delete $INSTDIR\platforms\qwindows.dll
|
|
||||||
Delete $INSTDIR\platforms\qminimal.dll
|
SectionEnd
|
||||||
RMDir $INSTDIR\platforms
|
|
||||||
Delete $INSTDIR\accessible\qtaccessiblewidgets.dll
|
|
||||||
RMDir $INSTDIR\accessible
|
|
||||||
RMDir $INSTDIR
|
|
||||||
|
|
||||||
SectionEnd
|
|
||||||
|
|
Loading…
Reference in a new issue