--- /dev/null
+; Script generated by the HM NIS Edit Script Wizard.
+
+; HM NIS Edit Wizard helper defines
+!define PRODUCT_NAME "MIT-GNU Scheme"
+!define PRODUCT_VERSION "20090107"
+!define PRODUCT_PUBLISHER "GNU Project"
+!define PRODUCT_WEB_SITE "http://www.gnu.org/software/mit-scheme/"
+!define PRODUCT_DIR_REGKEY "Software\Microsoft\Windows\CurrentVersion\App Paths\scheme.exe"
+!define PRODUCT_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}"
+!define PRODUCT_UNINST_ROOT_KEY "HKLM"
+!define PRODUCT_STARTMENU_REGVAL "NSIS:StartMenuDir"
+
+SetCompressor lzma
+
+!define MIT_SCHEME_SRC_ROOT "c:\cph\xfer\mit-scheme-${PRODUCT_VERSION}\src"
+!define MIT_SCHEME_DOC_ROOT "c:\scheme"
+!define MIT_SCHEME_EXE "$INSTDIR\bin\scheme.exe"
+!define MIT_SCHEME_OPTIONS "--library $\"$INSTDIR\lib$\" --edit"
+
+!macro mit_scheme_aux_install dir_name
+ SetOutPath "$INSTDIR\lib\${dir_name}"
+ File "${MIT_SCHEME_SRC_ROOT}\${dir_name}\*.bci"
+ File "${MIT_SCHEME_SRC_ROOT}\${dir_name}\*.com"
+ File "${MIT_SCHEME_SRC_ROOT}\${dir_name}\*-w32.pkd"
+ File "${MIT_SCHEME_SRC_ROOT}\${dir_name}\load.scm"
+!macroend
+
+!macro mit_scheme_aux_uninstall dir_name
+ Delete "$INSTDIR\lib\${dir_name}\load.scm"
+ Delete "$INSTDIR\lib\${dir_name}\*-w32.pkd"
+ Delete "$INSTDIR\lib\${dir_name}\*.com"
+ Delete "$INSTDIR\lib\${dir_name}\*.bci"
+ RMDir "$INSTDIR\lib\${dir_name}"
+!macroend
+
+!macro mit_scheme_option_install dir_name root_name
+ File "${MIT_SCHEME_SRC_ROOT}\${dir_name}\${root_name}.com"
+!macroend
+
+; MUI 1.67 compatible ------
+!include "MUI.nsh"
+
+; MUI Settings
+!define MUI_ABORTWARNING
+!define MUI_ICON "${NSISDIR}\Contrib\Graphics\Icons\modern-install.ico"
+!define MUI_UNICON "${NSISDIR}\Contrib\Graphics\Icons\modern-uninstall.ico"
+
+; Welcome page
+!insertmacro MUI_PAGE_WELCOME
+; License page
+!insertmacro MUI_PAGE_LICENSE "${MIT_SCHEME_SRC_ROOT}\copying"
+; Directory page
+!insertmacro MUI_PAGE_DIRECTORY
+; Start menu page
+var ICONS_GROUP
+!define MUI_STARTMENUPAGE_NODISABLE
+!define MUI_STARTMENUPAGE_DEFAULTFOLDER "MIT-GNU Scheme"
+!define MUI_STARTMENUPAGE_REGISTRY_ROOT "${PRODUCT_UNINST_ROOT_KEY}"
+!define MUI_STARTMENUPAGE_REGISTRY_KEY "${PRODUCT_UNINST_KEY}"
+!define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "${PRODUCT_STARTMENU_REGVAL}"
+!insertmacro MUI_PAGE_STARTMENU Application $ICONS_GROUP
+; Instfiles page
+!insertmacro MUI_PAGE_INSTFILES
+; Finish page
+;!define MUI_FINISHPAGE_RUN "${MIT_SCHEME_EXE}"
+;!define MUI_FINISHPAGE_RUN_PARAMETERS "${MIT_SCHEME_OPTIONS}"
+;!define MUI_FINISHPAGE_RUN_NOTCHECKED
+;!define MUI_FINISHPAGE_SHOWREADME "$INSTDIR\doc\mit-scheme-user\index.html"
+;!define MUI_FINISHPAGE_SHOWREADME_NOTCHECKED
+;!insertmacro MUI_PAGE_FINISH
+
+; Uninstaller pages
+!insertmacro MUI_UNPAGE_INSTFILES
+
+; Language files
+!insertmacro MUI_LANGUAGE "English"
+
+; Reserve files
+!insertmacro MUI_RESERVEFILE_INSTALLOPTIONS
+
+; MUI end ------
+
+Name "MIT/GNU Scheme"
+OutFile "mit-scheme-${PRODUCT_VERSION}-ix86-win32.exe"
+InstallDir "$PROGRAMFILES\MIT-GNU Scheme"
+InstallDirRegKey "${PRODUCT_UNINST_ROOT_KEY}" "${PRODUCT_UNINST_KEY}" \
+ "InstallLocation"
+ShowInstDetails hide
+ShowUnInstDetails hide
+
+Section "MainSection" SEC01
+ SetOverwrite try
+ SetShellVarContext all
+
+ SetOutPath "$INSTDIR\bin"
+ File "${MIT_SCHEME_SRC_ROOT}\microcode\scheme.exe"
+ File "${MIT_SCHEME_SRC_ROOT}\win32\dibutils\dibutils.dll"
+
+ SetOutPath "$INSTDIR\lib"
+ File "${MIT_SCHEME_SRC_ROOT}\all.com"
+ File "${MIT_SCHEME_SRC_ROOT}\etc\optiondb.scm"
+ File "${MIT_SCHEME_SRC_ROOT}\microcode\utabmd.bin"
+
+ SetOutPath "$INSTDIR\lib\runtime"
+ !insertmacro mit_scheme_option_install "runtime" "chrsyn"
+ !insertmacro mit_scheme_option_install "runtime" "cpress"
+ !insertmacro mit_scheme_option_install "runtime" "dosproc"
+ !insertmacro mit_scheme_option_install "runtime" "format"
+ !insertmacro mit_scheme_option_install "runtime" "gdbm"
+ !insertmacro mit_scheme_option_install "runtime" "krypt"
+ !insertmacro mit_scheme_option_install "runtime" "mime-codec"
+ !insertmacro mit_scheme_option_install "runtime" "numint"
+ !insertmacro mit_scheme_option_install "runtime" "optiondb"
+ !insertmacro mit_scheme_option_install "runtime" "ordvec"
+ !insertmacro mit_scheme_option_install "runtime" "process"
+ !insertmacro mit_scheme_option_install "runtime" "rbtree"
+ !insertmacro mit_scheme_option_install "runtime" "regexp"
+ !insertmacro mit_scheme_option_install "runtime" "rexp"
+ !insertmacro mit_scheme_option_install "runtime" "rgxcmp"
+ !insertmacro mit_scheme_option_install "runtime" "syncproc"
+ !insertmacro mit_scheme_option_install "runtime" "wttree"
+ !insertmacro mit_scheme_option_install "runtime" "ystep"
+ File "${MIT_SCHEME_SRC_ROOT}\runtime\*.bci"
+
+ SetOutPath "$INSTDIR\lib\edwin"
+ !insertmacro mit_scheme_option_install "edwin" "artdebug"
+ !insertmacro mit_scheme_option_install "edwin" "debian-changelog"
+ !insertmacro mit_scheme_option_install "edwin" "eystep"
+ !insertmacro mit_scheme_option_install "edwin" "lisppaste"
+ !insertmacro mit_scheme_option_install "edwin" "manual"
+ !insertmacro mit_scheme_option_install "edwin" "midas"
+ !insertmacro mit_scheme_option_install "edwin" "nntp"
+ !insertmacro mit_scheme_option_install "edwin" "paredit"
+ !insertmacro mit_scheme_option_install "edwin" "pasmod"
+ !insertmacro mit_scheme_option_install "edwin" "print"
+ !insertmacro mit_scheme_option_install "edwin" "pwedit"
+ !insertmacro mit_scheme_option_install "edwin" "pwparse"
+ !insertmacro mit_scheme_option_install "edwin" "snr"
+ !insertmacro mit_scheme_option_install "edwin" "sort"
+ !insertmacro mit_scheme_option_install "edwin" "techinfo"
+ !insertmacro mit_scheme_option_install "edwin" "telnet"
+ !insertmacro mit_scheme_option_install "edwin" "tximod"
+ !insertmacro mit_scheme_option_install "edwin" "verilog"
+ !insertmacro mit_scheme_option_install "edwin" "vhdl"
+ !insertmacro mit_scheme_option_install "edwin" "webster"
+ File "${MIT_SCHEME_SRC_ROOT}\edwin\*.bci"
+ File "${MIT_SCHEME_SRC_ROOT}\etc\tutorial"
+ File "${MIT_SCHEME_DOC_ROOT}\info\*.*"
+
+ SetOutPath "$INSTDIR\doc"
+ File "${MIT_SCHEME_DOC_ROOT}\htdoc\index.html"
+ SetOutPath "$INSTDIR\doc\mit-scheme-imail"
+ File "${MIT_SCHEME_DOC_ROOT}\htdoc\mit-scheme-imail\*.*"
+ SetOutPath "$INSTDIR\doc\mit-scheme-ref"
+ File "${MIT_SCHEME_DOC_ROOT}\htdoc\mit-scheme-ref\*.*"
+ SetOutPath "$INSTDIR\doc\mit-scheme-sos"
+ File "${MIT_SCHEME_DOC_ROOT}\htdoc\mit-scheme-sos\*.*"
+ SetOutPath "$INSTDIR\doc\mit-scheme-user"
+ File "${MIT_SCHEME_DOC_ROOT}\htdoc\mit-scheme-user\*.*"
+
+ SetOutPath "$INSTDIR\lib\cref"
+ File "${MIT_SCHEME_SRC_ROOT}\cref\*.bci"
+ File "${MIT_SCHEME_SRC_ROOT}\cref\*.com"
+ File "${MIT_SCHEME_SRC_ROOT}\cref\*-w32.pkd"
+
+ !insertmacro mit_scheme_aux_install "imail"
+ !insertmacro mit_scheme_aux_install "sos"
+ !insertmacro mit_scheme_aux_install "ssp"
+ !insertmacro mit_scheme_aux_install "star-parser"
+ !insertmacro mit_scheme_aux_install "xml"
+
+; Shortcuts
+ !insertmacro MUI_STARTMENU_WRITE_BEGIN Application
+ CreateDirectory "$SMPROGRAMS\$ICONS_GROUP"
+ SetOutPath $INSTDIR
+ CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\MIT-GNU Scheme.lnk" \
+ "${MIT_SCHEME_EXE}" "${MIT_SCHEME_OPTIONS}" \
+ "${MIT_SCHEME_EXE}" 6
+ CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\Documentation.lnk" \
+ "$INSTDIR\doc\index.html"
+ CreateShortCut "$DESKTOP\MIT-GNU Scheme.lnk" \
+ "${MIT_SCHEME_EXE}" "${MIT_SCHEME_OPTIONS}" \
+ "${MIT_SCHEME_EXE}" 6
+ !insertmacro MUI_STARTMENU_WRITE_END
+SectionEnd
+
+Section -AdditionalIcons
+ !insertmacro MUI_STARTMENU_WRITE_BEGIN Application
+ WriteIniStr "$INSTDIR\${PRODUCT_NAME}.url" "InternetShortcut" "URL" \
+ "${PRODUCT_WEB_SITE}"
+ SetOutPath $INSTDIR
+ CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\Website.lnk" \
+ "$INSTDIR\${PRODUCT_NAME}.url"
+ CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\Uninstall.lnk" \
+ "$INSTDIR\uninst.exe"
+ !insertmacro MUI_STARTMENU_WRITE_END
+SectionEnd
+
+Section -Post
+ WriteUninstaller "$INSTDIR\uninst.exe"
+ WriteRegStr HKLM "${PRODUCT_DIR_REGKEY}" "" "${MIT_SCHEME_EXE}"
+ WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" \
+ "DisplayName" "$(^Name)"
+ WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" \
+ "UninstallString" "$INSTDIR\uninst.exe"
+ WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" \
+ "DisplayIcon" "${MIT_SCHEME_EXE}"
+ WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" \
+ "DisplayVersion" "${PRODUCT_VERSION}"
+ WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" \
+ "URLInfoAbout" "${PRODUCT_WEB_SITE}"
+ WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" \
+ "Publisher" "${PRODUCT_PUBLISHER}"
+ WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" \
+ "InstallLocation" "$INSTDIR"
+SectionEnd
+
+
+Function un.onUninstSuccess
+ HideWindow
+ MessageBox MB_ICONINFORMATION|MB_OK \
+ "$(^Name) was successfully removed from your computer."
+FunctionEnd
+
+Function un.onInit
+ MessageBox MB_ICONQUESTION|MB_YESNO|MB_DEFBUTTON2 \
+ "Are you sure you want to completely remove $(^Name) and all of its components?" IDYES +2
+ Abort
+FunctionEnd
+
+Section Uninstall
+ SetShellVarContext all
+
+ !insertmacro MUI_STARTMENU_GETFOLDER "Application" $ICONS_GROUP
+ Delete "$INSTDIR\${PRODUCT_NAME}.url"
+ Delete "$INSTDIR\uninst.exe"
+
+ !insertmacro mit_scheme_aux_uninstall "xml"
+ !insertmacro mit_scheme_aux_uninstall "star-parser"
+ !insertmacro mit_scheme_aux_uninstall "ssp"
+ !insertmacro mit_scheme_aux_uninstall "sos"
+ !insertmacro mit_scheme_aux_uninstall "imail"
+
+ Delete "$INSTDIR\lib\cref\*-w32.pkd"
+ Delete "$INSTDIR\lib\cref\*.com"
+ Delete "$INSTDIR\lib\cref\*.bci"
+ RMDir "$INSTDIR\lib\cref"
+
+ Delete "$INSTDIR\doc\mit-scheme-user\*.*"
+ RMDir "$INSTDIR\doc\mit-scheme-user"
+ Delete "$INSTDIR\doc\mit-scheme-sos\*.*"
+ RMDir "$INSTDIR\doc\mit-scheme-sos"
+ Delete "$INSTDIR\doc\mit-scheme-ref\*.*"
+ RMDir "$INSTDIR\doc\mit-scheme-ref"
+ Delete "$INSTDIR\doc\mit-scheme-imail\*.*"
+ RMDir "$INSTDIR\doc\mit-scheme-imail"
+ Delete "$INSTDIR\doc\index.html"
+ RMDir "$INSTDIR\doc"
+
+ Delete "$INSTDIR\lib\edwin\*.*"
+ RMDir "$INSTDIR\lib\edwin"
+
+ Delete "$INSTDIR\lib\runtime\*.*"
+ RMDir "$INSTDIR\lib\runtime"
+
+ Delete "$INSTDIR\lib\utabmd.bin"
+ Delete "$INSTDIR\lib\optiondb.scm"
+ Delete "$INSTDIR\lib\all.com"
+ RMDir "$INSTDIR\lib"
+
+ Delete "$INSTDIR\bin\*.*"
+ RMDir "$INSTDIR\bin"
+
+ RMDir "$INSTDIR"
+
+ Delete "$SMPROGRAMS\$ICONS_GROUP\Uninstall.lnk"
+ Delete "$SMPROGRAMS\$ICONS_GROUP\Website.lnk"
+ Delete "$SMPROGRAMS\$ICONS_GROUP\Documentation.lnk"
+ Delete "$DESKTOP\MIT-GNU Scheme.lnk"
+ Delete "$SMPROGRAMS\$ICONS_GROUP\MIT-GNU Scheme.lnk"
+
+ RMDir "$SMPROGRAMS\$ICONS_GROUP"
+
+ DeleteRegKey ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}"
+ DeleteRegKey HKLM "${PRODUCT_DIR_REGKEY}"
+ SetAutoClose true
+SectionEnd