2013-03-24 10:18:56 +01:00
|
|
|
; Jamulus NSIS installer script
|
2013-01-14 19:21:35 +01:00
|
|
|
|
2013-02-19 22:20:15 +01:00
|
|
|
!define APP_NAME "Jamulus"
|
|
|
|
!define APP_EXE "Jamulus.exe"
|
2013-03-24 10:18:56 +01:00
|
|
|
!define AUTORUN_NAME "Jamulus server"
|
2013-01-14 19:21:35 +01:00
|
|
|
!define UNINSTALL_EXE "Uninstall.exe"
|
2013-02-19 22:20:15 +01:00
|
|
|
!define INSTALLER_NAME "Jamulusinstaller.exe"
|
2013-01-24 10:56:18 +01:00
|
|
|
!define BINARY_PATH "..\release\"
|
2013-01-14 19:21:35 +01:00
|
|
|
!define VS_REDIST_PATH "C:\Program Files\Microsoft Visual Studio 10.0\SDK\v3.5\BootStrapper\Packages\vcredist_x86\"
|
|
|
|
;!define VS_REDIST_PATH "C:\Programme\Microsoft Visual Studio 10.0\SDK\v3.5\BootStrapper\Packages\vcredist_x86\"
|
|
|
|
!define VS_REDIST_EXE "vcredist_x86.exe"
|
|
|
|
!define UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APP_NAME}"
|
|
|
|
!define AUTORUN_KEY "Software\Microsoft\Windows\CurrentVersion\Run"
|
|
|
|
|
|
|
|
|
|
|
|
SetCompressor lzma
|
|
|
|
Name "${APP_NAME}"
|
|
|
|
Caption "${APP_NAME}"
|
|
|
|
OutFile "${INSTALLER_NAME}"
|
|
|
|
InstallDir "$PROGRAMFILES\${APP_NAME}"
|
|
|
|
|
|
|
|
LicenseText "License"
|
|
|
|
LicenseData "..\COPYING"
|
|
|
|
|
|
|
|
Page license
|
|
|
|
Page directory
|
|
|
|
Page instfiles
|
|
|
|
|
|
|
|
|
|
|
|
Section
|
|
|
|
|
|
|
|
; check if software is currently running
|
|
|
|
FindProcDLL::FindProc "${APP_EXE}"
|
|
|
|
IntCmp $R0 1 0 notRunning
|
|
|
|
MessageBox MB_OK|MB_ICONEXCLAMATION "${APP_NAME} is running. Please close it and run the setup again." /SD IDOK
|
|
|
|
Abort
|
|
|
|
notRunning:
|
|
|
|
|
|
|
|
; 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}" "UninstallString" '"$INSTDIR\${UNINSTALL_EXE}"'
|
|
|
|
|
|
|
|
SetOutPath $INSTDIR
|
|
|
|
|
|
|
|
; main application
|
2013-01-24 10:34:16 +01:00
|
|
|
File "${BINARY_PATH}${APP_EXE}"
|
2013-01-14 19:21:35 +01:00
|
|
|
|
|
|
|
; QT dlls
|
|
|
|
File "$%QTDIR%\bin\Qt5Core.dll"
|
|
|
|
File "$%QTDIR%\bin\Qt5Gui.dll"
|
|
|
|
File "$%QTDIR%\bin\Qt5Widgets.dll"
|
|
|
|
File "$%QTDIR%\bin\Qt5Network.dll"
|
|
|
|
File "$%QTDIR%\bin\Qt5Xml.dll"
|
2013-01-24 10:34:16 +01:00
|
|
|
File "$%QTDIR%\bin\D3DCompiler_43.dll"
|
2014-01-02 11:11:35 +01:00
|
|
|
File "$%QTDIR%\bin\icudt51.dll"
|
|
|
|
File "$%QTDIR%\bin\icuin51.dll"
|
|
|
|
File "$%QTDIR%\bin\icuuc51.dll"
|
2013-01-24 10:34:16 +01:00
|
|
|
File "$%QTDIR%\bin\libEGL.dll"
|
|
|
|
File "$%QTDIR%\bin\libGLESv2.dll"
|
2013-01-14 19:21:35 +01:00
|
|
|
|
|
|
|
; other files
|
|
|
|
File "..\COPYING"
|
|
|
|
|
|
|
|
; temporarily create Microsoft Visual Studio redistributable,
|
|
|
|
File "${VS_REDIST_PATH}${VS_REDIST_EXE}"
|
|
|
|
ExecWait '"$INSTDIR\${VS_REDIST_EXE}" /Q'
|
|
|
|
|
|
|
|
; uninstaller
|
|
|
|
WriteUninstaller $INSTDIR\${UNINSTALL_EXE}
|
|
|
|
|
|
|
|
; shortcuts
|
|
|
|
CreateShortCut "$DESKTOP\${APP_NAME}.lnk" "$OUTDIR\${APP_EXE}"
|
|
|
|
|
|
|
|
CreateDirectory "$SMPROGRAMS\${APP_NAME}"
|
|
|
|
CreateShortCut "$SMPROGRAMS\${APP_NAME}\${APP_NAME}.lnk" "$INSTDIR\${APP_EXE}"
|
2013-02-19 22:20:15 +01:00
|
|
|
CreateShortCut "$SMPROGRAMS\${APP_NAME}\${APP_NAME} Server.lnk" "$INSTDIR\${APP_EXE}" "-s"
|
2013-01-14 19:21:35 +01:00
|
|
|
CreateShortCut "$SMPROGRAMS\${APP_NAME}\${UNINSTALL_EXE}.lnk" "$INSTDIR\${UNINSTALL_EXE}"
|
|
|
|
|
|
|
|
; cleanup: remove temporary Microsoft Visual Studio redistributable executable
|
|
|
|
Delete $INSTDIR\${VS_REDIST_EXE}
|
|
|
|
|
2013-02-11 19:16:17 +01:00
|
|
|
; additional platform dlls
|
|
|
|
SetOutPath $INSTDIR\platforms
|
|
|
|
File "$%QTDIR%\plugins\platforms\qwindows.dll"
|
|
|
|
File "$%QTDIR%\plugins\platforms\qminimal.dll"
|
|
|
|
|
2013-01-14 19:21:35 +01:00
|
|
|
; accessible qt plugin
|
|
|
|
SetOutPath $INSTDIR\accessible
|
|
|
|
File "$%QTDIR%\plugins\accessible\qtaccessiblewidgets.dll"
|
|
|
|
|
|
|
|
SectionEnd
|
|
|
|
|
|
|
|
|
|
|
|
Section "Uninstall"
|
|
|
|
|
|
|
|
DeleteRegKey HKLM "${UNINST_KEY}"
|
|
|
|
|
|
|
|
; the software may have written an auto run entry in the registry, remove it
|
|
|
|
DeleteRegValue HKCU "${AUTORUN_KEY}" "${AUTORUN_NAME}"
|
|
|
|
|
|
|
|
Delete "$DESKTOP\${APP_NAME}.lnk"
|
|
|
|
Delete "$SMPROGRAMS\${APP_NAME}\${APP_NAME}.lnk"
|
|
|
|
Delete "$SMPROGRAMS\${APP_NAME}\${APP_NAME} server.lnk"
|
|
|
|
Delete "$SMPROGRAMS\${APP_NAME}\${UNINSTALL_EXE}.lnk"
|
|
|
|
RMDIR "$SMPROGRAMS\${APP_NAME}"
|
|
|
|
|
|
|
|
Delete $INSTDIR\${UNINSTALL_EXE}
|
|
|
|
Delete $INSTDIR\${APP_EXE}
|
|
|
|
Delete $INSTDIR\Qt5Core.dll
|
|
|
|
Delete $INSTDIR\Qt5Gui.dll
|
|
|
|
Delete $INSTDIR\Qt5Widgets.dll
|
|
|
|
Delete $INSTDIR\Qt5Network.dll
|
|
|
|
Delete $INSTDIR\Qt5Xml.dll
|
2013-01-24 10:34:16 +01:00
|
|
|
Delete $INSTDIR\D3DCompiler_43.dll
|
2014-01-02 11:11:35 +01:00
|
|
|
Delete $INSTDIR\icudt51.dll
|
|
|
|
Delete $INSTDIR\icuin51.dll
|
|
|
|
Delete $INSTDIR\icuuc51.dll
|
2013-01-24 10:34:16 +01:00
|
|
|
Delete $INSTDIR\libEGL.dll
|
|
|
|
Delete $INSTDIR\libGLESv2.dll
|
2013-01-14 19:21:35 +01:00
|
|
|
Delete $INSTDIR\COPYING
|
2013-02-11 19:16:17 +01:00
|
|
|
Delete $INSTDIR\platforms\qwindows.dll
|
|
|
|
Delete $INSTDIR\platforms\qminimal.dll
|
2013-02-19 22:20:15 +01:00
|
|
|
RMDir $INSTDIR\platforms
|
2013-01-14 19:21:35 +01:00
|
|
|
Delete $INSTDIR\accessible\qtaccessiblewidgets.dll
|
|
|
|
RMDir $INSTDIR\accessible
|
|
|
|
RMDir $INSTDIR
|
|
|
|
|
|
|
|
SectionEnd
|