2009-08-18 19:14:44 +02:00
|
|
|
; llcon NSIS installer script
|
|
|
|
|
2011-05-07 17:36:35 +02:00
|
|
|
!define APP_NAME "Llcon"
|
|
|
|
!define APP_EXE "llcon.exe"
|
2011-05-08 13:31:53 +02:00
|
|
|
!define AUTORUN_NAME "llcon server"
|
2011-05-07 17:36:35 +02:00
|
|
|
!define UNINSTALL_EXE "Uninstall.exe"
|
|
|
|
!define INSTALLER_NAME "llconinstaller.exe"
|
|
|
|
!define VS_REDIST_PATH "C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\BootStrapper\Packages\vcredist_x86\"
|
|
|
|
;!define VS_REDIST_PATH "C:\Programme\Microsoft Visual Studio 8\SDK\v2.0\BootStrapper\Packages\vcredist_x86\"
|
|
|
|
!define VS_REDIST_EXE "vcredist_x86.exe"
|
|
|
|
!define UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APP_NAME}"
|
2011-05-08 13:31:53 +02:00
|
|
|
!define AUTORUN_KEY "Software\Microsoft\Windows\CurrentVersion\Run"
|
2009-08-18 19:14:44 +02:00
|
|
|
|
|
|
|
|
|
|
|
SetCompressor lzma
|
|
|
|
Name "${APP_NAME}"
|
|
|
|
Caption "${APP_NAME}"
|
|
|
|
OutFile "${INSTALLER_NAME}"
|
|
|
|
InstallDir "$PROGRAMFILES\${APP_NAME}"
|
|
|
|
|
2009-08-19 20:26:40 +02:00
|
|
|
LicenseText "License"
|
|
|
|
LicenseData "..\COPYING"
|
|
|
|
|
|
|
|
Page license
|
2009-08-18 19:14:44 +02:00
|
|
|
Page directory
|
|
|
|
Page instfiles
|
|
|
|
|
|
|
|
|
|
|
|
Section
|
|
|
|
|
2011-05-09 20:09:38 +02:00
|
|
|
; 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:
|
|
|
|
|
2009-08-19 20:26:40 +02:00
|
|
|
; 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}"'
|
|
|
|
|
2009-08-18 19:14:44 +02:00
|
|
|
SetOutPath $INSTDIR
|
2009-11-28 10:43:00 +01:00
|
|
|
|
2009-08-19 17:00:50 +02:00
|
|
|
; main application
|
2009-08-18 19:14:44 +02:00
|
|
|
File "Release\${APP_EXE}"
|
2009-08-19 17:00:50 +02:00
|
|
|
|
|
|
|
; QT dlls
|
|
|
|
File "$%QTDIR%\bin\QtCore4.dll"
|
|
|
|
File "$%QTDIR%\bin\QtGui4.dll"
|
|
|
|
File "$%QTDIR%\bin\QtNetwork4.dll"
|
|
|
|
File "$%QTDIR%\bin\QtXml4.dll"
|
|
|
|
|
|
|
|
; other files
|
|
|
|
File "..\COPYING"
|
|
|
|
|
2009-08-19 17:22:50 +02:00
|
|
|
; temporarily create Microsoft Visual Studio redistributable,
|
|
|
|
File "${VS_REDIST_PATH}${VS_REDIST_EXE}"
|
|
|
|
ExecWait '"$INSTDIR\${VS_REDIST_EXE}" /Q'
|
2009-11-28 10:43:00 +01:00
|
|
|
|
2009-08-19 17:00:50 +02:00
|
|
|
; uninstaller
|
2009-08-18 19:14:44 +02:00
|
|
|
WriteUninstaller $INSTDIR\${UNINSTALL_EXE}
|
|
|
|
|
2009-08-19 17:00:50 +02:00
|
|
|
; shortcuts
|
2009-08-18 19:14:44 +02:00
|
|
|
CreateShortCut "$DESKTOP\${APP_NAME}.lnk" "$OUTDIR\${APP_EXE}"
|
|
|
|
|
|
|
|
CreateDirectory "$SMPROGRAMS\${APP_NAME}"
|
|
|
|
CreateShortCut "$SMPROGRAMS\${APP_NAME}\${APP_NAME}.lnk" "$INSTDIR\${APP_EXE}"
|
2009-11-28 10:43:00 +01:00
|
|
|
CreateShortCut "$SMPROGRAMS\${APP_NAME}\${APP_NAME} server.lnk" "$INSTDIR\${APP_EXE}" "-s"
|
2009-08-18 19:14:44 +02:00
|
|
|
CreateShortCut "$SMPROGRAMS\${APP_NAME}\${UNINSTALL_EXE}.lnk" "$INSTDIR\${UNINSTALL_EXE}"
|
|
|
|
|
2009-11-28 12:12:34 +01:00
|
|
|
; cleanup: remove temporary Microsoft Visual Studio redistributable executable
|
|
|
|
Delete $INSTDIR\${VS_REDIST_EXE}
|
|
|
|
|
2009-11-29 13:05:19 +01:00
|
|
|
; accessible qt plugin
|
|
|
|
SetOutPath $INSTDIR\accessible
|
|
|
|
File "$%QTDIR%\plugins\accessible\qtaccessiblewidgets4.dll"
|
|
|
|
|
2009-08-18 19:14:44 +02:00
|
|
|
SectionEnd
|
|
|
|
|
|
|
|
|
|
|
|
Section "Uninstall"
|
|
|
|
|
2009-08-19 20:26:40 +02:00
|
|
|
DeleteRegKey HKLM "${UNINST_KEY}"
|
|
|
|
|
2011-05-07 17:36:35 +02:00
|
|
|
; the software may have written an auto run entry in the registry, remove it
|
2011-05-08 13:31:53 +02:00
|
|
|
DeleteRegValue HKCU "${AUTORUN_KEY}" "${AUTORUN_NAME}"
|
2011-05-07 17:36:35 +02:00
|
|
|
|
2009-08-18 19:14:44 +02:00
|
|
|
Delete "$DESKTOP\${APP_NAME}.lnk"
|
|
|
|
Delete "$SMPROGRAMS\${APP_NAME}\${APP_NAME}.lnk"
|
2009-11-28 10:43:00 +01:00
|
|
|
Delete "$SMPROGRAMS\${APP_NAME}\${APP_NAME} server.lnk"
|
2009-08-18 19:14:44 +02:00
|
|
|
Delete "$SMPROGRAMS\${APP_NAME}\${UNINSTALL_EXE}.lnk"
|
|
|
|
RMDIR "$SMPROGRAMS\${APP_NAME}"
|
|
|
|
|
|
|
|
Delete $INSTDIR\${UNINSTALL_EXE}
|
|
|
|
Delete $INSTDIR\${APP_EXE}
|
2009-08-19 17:00:50 +02:00
|
|
|
Delete $INSTDIR\QtCore4.dll
|
|
|
|
Delete $INSTDIR\QtGui4.dll
|
|
|
|
Delete $INSTDIR\QtNetwork4.dll
|
|
|
|
Delete $INSTDIR\QtXml4.dll
|
|
|
|
Delete $INSTDIR\COPYING
|
2009-11-29 13:05:19 +01:00
|
|
|
Delete $INSTDIR\accessible\qtaccessiblewidgets4.dll
|
|
|
|
RMDir $INSTDIR\accessible
|
2009-08-18 19:14:44 +02:00
|
|
|
RMDir $INSTDIR
|
|
|
|
|
2009-11-28 10:43:00 +01:00
|
|
|
SectionEnd
|