1 #!Nsis Installer Command Script
3 # Copyright (c) 2009, Shao Miller (shao.miller@yrdsb.edu.on.ca)
6 # Redistribution and use in source and binary forms, with or without
7 # modification, are permitted provided that the following conditions are met:
8 # * Redistributions of source code must retain the above copyright
9 # notice, this list of conditions and the following disclaimer.
10 # * Redistributions in binary form must reproduce the above copyright
11 # notice, this list of conditions and the following disclaimer in the
12 # documentation and/or other materials provided with the distribution.
14 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
15 # ''AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
16 # TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
17 # PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL <copyright holder> BE LIABLE FOR
18 # ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
20 # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
21 # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
22 # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
23 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 !define PRODUCT_NAME
"Netwide Assembler"
26 !define PRODUCT_SHORT_NAME
"nasm"
27 !define VERSION
"2.06rc7"
28 !define PACKAGE_NAME
"${PRODUCT_NAME} ${VERSION}"
29 !define PACKAGE_SHORT_NAME
"${PRODUCT_SHORT_NAME}-${VERSION}"
31 Name "${PACKAGE_NAME}"
32 OutFile "${PACKAGE_SHORT_NAME}-installer.exe"
33 InstallDir "$PROGRAMFILES\NASM"
34 InstallDirRegKey HKLM "SOFTWARE\${PACKAGE_SHORT_NAME}" "InstallDir"
39 DirText "Please select the installation folder."
42 ComponentText "Select which optional components you want to install."
46 ShowUninstDetails hide
49 Section "${PACKAGE_NAME}"
52 SetOutPath "$INSTDIR\."
63 FileOpen $0 "nasmpath.bat" w
65 FileWrite $0 "@set path=%path%;$INSTDIR$\r$\n"
66 FileWrite $0 "@%comspec%"
71 Section "Start Menu Shortcuts"
72 CreateDirectory "$SMPROGRAMS\${PACKAGE_NAME}"
73 CreateShortCut "$SMPROGRAMS\${PACKAGE_NAME}\Uninstall ${PACKAGE_NAME}.lnk" "$INSTDIR\Uninstall ${PACKAGE_NAME}.exe" "" "$INSTDIR\Uninstall ${PACKAGE_NAME}.exe" 0
74 CreateShortCut "$SMPROGRAMS\${PACKAGE_NAME}\NASM.lnk" "$INSTDIR\nasmpath.bat" "" "$INSTDIR\nasmpath.bat" 0
77 Section "Desktop Icons"
78 CreateShortCut "$DESKTOP\NASM.lnk" "$INSTDIR\nasmpath.bat" "" "$INSTDIR\nasmpath.bat" 0
82 Delete /rebootok
"$DESKTOP\NASM.lnk"
83 Delete /rebootok
"$SMPROGRAMS\${PACKAGE_NAME}\NASM.lnk"
84 Delete /rebootok
"$SMPROGRAMS\${PACKAGE_NAME}\Uninstall ${PACKAGE_NAME}.lnk"
85 RMDir "$SMPROGRAMS\${PACKAGE_NAME}"
87 Delete /rebootok
"$INSTDIR\nasmpath.bat"
88 Delete /rebootok
"$INSTDIR\rdx.exe"
89 Delete /rebootok
"$INSTDIR\rdflib.exe"
90 Delete /rebootok
"$INSTDIR\rdfdump.exe"
91 Delete /rebootok
"$INSTDIR\rdf2ihx.exe"
92 Delete /rebootok
"$INSTDIR\rdf2com.exe"
93 Delete /rebootok
"$INSTDIR\rdf2bin.exe"
94 Delete /rebootok
"$INSTDIR\ndisasm.exe"
95 Delete /rebootok
"$INSTDIR\nasmdoc.pdf"
96 Delete /rebootok
"$INSTDIR\nasm.exe"
97 Delete /rebootok
"$INSTDIR\ldrdf.exe"
102 WriteUninstaller "$INSTDIR\Uninstall ${PACKAGE_NAME}.exe"