; NSIS_WIN32_MAKENSIS
!define PRODUCT "QEMU"
-!define URL "http://www.qemu-project.org/"
+!define URL "https://www.qemu.org/"
!define UNINST_EXE "$INSTDIR\qemu-uninstall.exe"
!define UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT}"
!define OUTFILE "qemu-setup.exe"
!endif
-; Optionally install documentation.
-!ifndef CONFIG_DOCUMENTATION
-!define CONFIG_DOCUMENTATION
-!endif
+; Build a unicode installer
+Unicode true
; Use maximum compression.
SetCompressor /SOLID lzma
; Registry key to check for directory (so if you install again, it will
; overwrite the old one automatically)
-InstallDirRegKey HKLM "Software\qemu" "Install_Dir"
+!ifdef W64
+InstallDirRegKey HKLM "Software\qemu64" "Install_Dir"
+!else
+InstallDirRegKey HKLM "Software\qemu32" "Install_Dir"
+!endif
; Request administrator privileges for Windows Vista.
RequestExecutionLevel admin
;--------------------------------
; The stuff to install.
+;
+; Remember to keep the "Uninstall" section in sync.
+
Section "${PRODUCT} (required)"
SectionIn RO
; Set output path to the installation directory.
SetOutPath "$INSTDIR"
- File "${SRCDIR}\Changelog"
File "${SRCDIR}\COPYING"
File "${SRCDIR}\COPYING.LIB"
- File "${SRCDIR}\README"
+ File "${SRCDIR}\README.rst"
File "${SRCDIR}\VERSION"
- File "${BINDIR}\*.bmp"
- File "${BINDIR}\*.bin"
- File "${BINDIR}\*.dtb"
- File "${BINDIR}\*.rom"
- File "${BINDIR}\openbios-*"
-
File /r "${BINDIR}\keymaps"
-!ifdef CONFIG_GTK
File /r "${BINDIR}\share"
-!endif
!ifdef W64
SetRegView 64
; Write the uninstall keys for Windows
WriteRegStr HKLM "${UNINST_KEY}" "DisplayName" "QEMU"
+!ifdef DISPLAYVERSION
+ WriteRegStr HKLM "${UNINST_KEY}" "DisplayVersion" "${DISPLAYVERSION}"
+!endif
WriteRegStr HKLM "${UNINST_KEY}" "UninstallString" '"${UNINST_EXE}"'
WriteRegDWORD HKLM "${UNINST_KEY}" "NoModify" 1
WriteRegDWORD HKLM "${UNINST_KEY}" "NoRepair" 1
!ifdef CONFIG_DOCUMENTATION
Section "Documentation" SectionDoc
+ SetOutPath "$INSTDIR\doc"
+ File /r "${BINDIR}\doc"
SetOutPath "$INSTDIR"
- File "${BINDIR}\qemu-doc.html"
- File "${BINDIR}\qemu-tech.html"
CreateDirectory "$SMPROGRAMS\${PRODUCT}"
- CreateShortCut "$SMPROGRAMS\${PRODUCT}\User Documentation.lnk" "$INSTDIR\qemu-doc.html" "" "$INSTDIR\qemu-doc.html" 0
- CreateShortCut "$SMPROGRAMS\${PRODUCT}\Technical Documentation.lnk" "$INSTDIR\qemu-tech.html" "" "$INSTDIR\qemu-tech.html" 0
+ CreateShortCut "$SMPROGRAMS\${PRODUCT}\User Documentation.lnk" "$INSTDIR\doc\index.html" "" "$INSTDIR\doc\index.html" 0
SectionEnd
!endif
Delete "$INSTDIR\Changelog"
Delete "$INSTDIR\COPYING"
Delete "$INSTDIR\COPYING.LIB"
- Delete "$INSTDIR\README"
+ Delete "$INSTDIR\README.rst"
Delete "$INSTDIR\VERSION"
Delete "$INSTDIR\*.bmp"
Delete "$INSTDIR\*.bin"
Delete "$INSTDIR\*.dll"
Delete "$INSTDIR\*.dtb"
+ Delete "$INSTDIR\*.fd"
+ Delete "$INSTDIR\*.img"
+ Delete "$INSTDIR\*.lid"
+ Delete "$INSTDIR\*.ndrv"
Delete "$INSTDIR\*.rom"
Delete "$INSTDIR\openbios-*"
Delete "$INSTDIR\qemu-img.exe"
Delete "$INSTDIR\qemu-io.exe"
Delete "$INSTDIR\qemu.exe"
Delete "$INSTDIR\qemu-system-*.exe"
- Delete "$INSTDIR\qemu-doc.html"
- Delete "$INSTDIR\qemu-tech.html"
- RMDir /r "$INSTDIR\keymaps"
+ RMDir /r "$INSTDIR\doc"
RMDir /r "$INSTDIR\share"
; Remove generated files
Delete "$INSTDIR\stderr.txt"
; Descriptions (mouse-over).
!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
!insertmacro MUI_DESCRIPTION_TEXT ${SectionSystem} "System emulation."
- !insertmacro MUI_DESCRIPTION_TEXT ${Section_alpha} "Alpha system emulation."
- !insertmacro MUI_DESCRIPTION_TEXT ${Section_alphaw} "Alpha system emulation (GUI)."
- !insertmacro MUI_DESCRIPTION_TEXT ${Section_i386} "PC i386 system emulation."
- !insertmacro MUI_DESCRIPTION_TEXT ${Section_i386w} "PC i386 system emulation (GUI)."
+!include "${BINDIR}\system-mui-text.nsh"
!insertmacro MUI_DESCRIPTION_TEXT ${SectionTools} "Tools."
!ifdef DLLDIR
!insertmacro MUI_DESCRIPTION_TEXT ${SectionDll} "Runtime Libraries (DLL)."