Rebrand Windows installer
[emacs.git] / admin / nt / dist-build / emacs.nsi
blobec33dc03da6e882ee56684603587e0fcb945843a
1 !include MUI2.nsh
4 Outfile "Emacs-${ARCH}-${OUT_VERSION}-installer.exe"
8 InstallDir "$DESKTOP\Emacs-${EMACS_VERSION}"
9 SetCompressor /solid lzma
12 Var StartMenuFolder
15 !define MUI_WELCOMEPAGE_TITLE "Emacs"
16 !define MUI_WELCOMEPAGE_TITLE_3LINES
17 !define MUI_WELCOMEPAGE_TEXT "Welcome to Emacs -- the editor of a lifetime."
19 !define MUI_WELCOMEFINISHPAGE_BITMAP "${ARCH}\share\emacs\${EMACS_VERSION}\etc\images\splash.bmp"
20 !define MUI_ICON "${ARCH}\share\emacs\${EMACS_VERSION}\etc\images\icons\hicolor\scalable\apps\emacs.ico"
22 !insertmacro MUI_PAGE_WELCOME
25 !define MUI_LICENSEPAGE_TEXT_TOP "The GNU General Public License"
26 !insertmacro MUI_PAGE_LICENSE "${ARCH}\share\emacs\${EMACS_VERSION}\lisp\COPYING"
28 !insertmacro MUI_PAGE_DIRECTORY
29 !insertmacro MUI_PAGE_INSTFILES
31 !insertmacro MUI_PAGE_STARTMENU Application $StartMenuFolder
33 !insertmacro MUI_UNPAGE_CONFIRM
34 !insertmacro MUI_UNPAGE_INSTFILES
36 !insertmacro MUI_LANGUAGE "English"
37 Name Emacs-${EMACS_VERSION}
39 Section
41 SetOutPath $INSTDIR
43 File /r ${ARCH}
44 # define uninstaller name
45 WriteUninstaller $INSTDIR\Uninstall.exe
47 !insertmacro MUI_STARTMENU_WRITE_BEGIN Application
48 ;Create shortcuts
49 CreateDirectory "$SMPROGRAMS\$StartMenuFolder"
50 CreateShortcut "$SMPROGRAMS\$StartMenuFolder\Uninstall.lnk" "$INSTDIR\Uninstall.exe"
52 !insertmacro MUI_STARTMENU_WRITE_END
53 CreateShortCut "$SMPROGRAMS\$StartMenuFolder\Emacs.lnk" "$INSTDIR\${ARCH}\bin\runemacs.exe"
54 SectionEnd
57 # create a section to define what the uninstaller does.
58 # the section will always be named "Uninstall"
59 Section "Uninstall"
61 # Always delete uninstaller first
62 Delete "$INSTDIR\Uninstall.exe"
64 # now delete installed directory
65 RMDir /r "$INSTDIR\${ARCH}"
66 RMDir "$INSTDIR"
68 !insertmacro MUI_STARTMENU_GETFOLDER Application $StartMenuFolder
70 Delete "$SMPROGRAMS\$StartMenuFolder\Uninstall.lnk"
71 RMDir "$SMPROGRAMS\$StartMenuFolder"
72 SectionEnd