Add files to build and distribute Windows binaries.
authorChris Hanson <org/chris-hanson/cph>
Fri, 18 Dec 2009 06:32:06 +0000 (22:32 -0800)
committerChris Hanson <org/chris-hanson/cph>
Fri, 18 Dec 2009 06:32:06 +0000 (22:32 -0800)
14 files changed:
dist/windows/build-band.bat [new file with mode: 0755]
dist/windows/build-band.scm [new file with mode: 0755]
dist/windows/compile-all.scm [new file with mode: 0755]
dist/windows/compile-prepare.bat [new file with mode: 0755]
dist/windows/scheme-inst.nsi [new file with mode: 0755]
src/etc/windows/build-6001.bat [new file with mode: 0644]
src/etc/windows/build-6001.scm [new file with mode: 0644]
src/etc/windows/build-all.bat [new file with mode: 0644]
src/etc/windows/build-all.scm [new file with mode: 0644]
src/etc/windows/build-compiler.bat [new file with mode: 0644]
src/etc/windows/build-compiler.scm [new file with mode: 0644]
src/etc/windows/build-edwin.bat [new file with mode: 0644]
src/etc/windows/build-edwin.scm [new file with mode: 0644]
src/etc/windows/build-runtime.scm [new file with mode: 0644]

diff --git a/dist/windows/build-band.bat b/dist/windows/build-band.bat
new file mode 100755 (executable)
index 0000000..d9e3dbd
--- /dev/null
@@ -0,0 +1,3 @@
+cd runtime
+..\microcode\scheme.exe --library ..\lib --fasl make.com
+cd ..
diff --git a/dist/windows/build-band.scm b/dist/windows/build-band.scm
new file mode 100755 (executable)
index 0000000..1302bd9
--- /dev/null
@@ -0,0 +1,11 @@
+(begin
+  (cd "../win32")
+  (load "make")
+  (cd "../sf")
+  (load "make")
+  (cd "../compiler")
+  (load "machines/i386/make")
+  (cd "../edwin")
+  (load "make")
+  (disk-save "../all.com")
+  (%exit))
\ No newline at end of file
diff --git a/dist/windows/compile-all.scm b/dist/windows/compile-all.scm
new file mode 100755 (executable)
index 0000000..78c3eef
--- /dev/null
@@ -0,0 +1,43 @@
+(with-working-directory-pathname "microcode\\"
+  (lambda ()
+    (sf-conditionally "utabmd")))
+(with-working-directory-pathname "runtime\\"
+  (lambda ()
+    (load "runtime.sf")
+    (load "runtime.cbf")))
+(with-working-directory-pathname "win32\\"
+  (lambda ()
+    (load "win32.sf")
+    (load "win32.cbf")))
+(with-working-directory-pathname "sf\\"
+  (lambda ()
+    (load "sf.sf")
+    (load "sf.cbf")))
+(with-working-directory-pathname "cref\\"
+  (lambda ()
+    (load "cref.sf")
+    (load "cref.cbf")))
+(with-working-directory-pathname "compiler\\"
+  (lambda ()
+    (let ((copy
+          (lambda (name)
+            (let ((from (merge-pathnames name "machines\\i386\\")))
+              (if (file-modification-time<? name from)
+                  (begin
+                    (delete-file-no-errors name)
+                    (copy-file from name)))))))
+      (copy "compiler.pkg")
+      (copy "make.com")
+      (copy "compiler.sf")
+      (copy "compiler.cbf"))
+    (load "compiler.sf")
+    (load "compiler.cbf")))
+(load "sos\\compile")
+(load "star-parser\\compile")
+(load "xml\\compile")
+(with-working-directory-pathname "edwin\\"
+  (lambda ()
+    (load "edwin.sf")
+    (load "edwin.cbf")))
+(load "imail\\compile")
+(load "ssp\\compile")
\ No newline at end of file
diff --git a/dist/windows/compile-prepare.bat b/dist/windows/compile-prepare.bat
new file mode 100755 (executable)
index 0000000..6c844ee
--- /dev/null
@@ -0,0 +1,9 @@
+cd microcode
+call ntutl\wconfig.bat
+wmake
+cd ..\win32\dibutils
+copy makefile.wcc makefile
+wmake
+cd ..\..\compiler
+copy machines\i386\compiler.* .
+cd ..
diff --git a/dist/windows/scheme-inst.nsi b/dist/windows/scheme-inst.nsi
new file mode 100755 (executable)
index 0000000..0bba36d
--- /dev/null
@@ -0,0 +1,287 @@
+; 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
diff --git a/src/etc/windows/build-6001.bat b/src/etc/windows/build-6001.bat
new file mode 100644 (file)
index 0000000..dc16088
--- /dev/null
@@ -0,0 +1 @@
+mit-scheme --load etc\windows\build-6001.scm
diff --git a/src/etc/windows/build-6001.scm b/src/etc/windows/build-6001.scm
new file mode 100644 (file)
index 0000000..5cd1dd3
--- /dev/null
@@ -0,0 +1,5 @@
+(begin
+  (cd "6001")
+  (load "make")
+  (disk-save "../lib/6001.com")
+  (%exit))
\ No newline at end of file
diff --git a/src/etc/windows/build-all.bat b/src/etc/windows/build-all.bat
new file mode 100644 (file)
index 0000000..29b7e81
--- /dev/null
@@ -0,0 +1 @@
+mit-scheme --library lib --load etc\windows\build-all.scm
diff --git a/src/etc/windows/build-all.scm b/src/etc/windows/build-all.scm
new file mode 100644 (file)
index 0000000..2124d72
--- /dev/null
@@ -0,0 +1,6 @@
+(begin
+  (load-option 'sf)
+  (load-option 'compiler)
+  (load-option 'edwin)
+  (disk-save "../lib/all.com")
+  (%exit))
\ No newline at end of file
diff --git a/src/etc/windows/build-compiler.bat b/src/etc/windows/build-compiler.bat
new file mode 100644 (file)
index 0000000..ec47d7c
--- /dev/null
@@ -0,0 +1 @@
+mit-scheme --library kub --load etc\windows\build-compiler.scm
diff --git a/src/etc/windows/build-compiler.scm b/src/etc/windows/build-compiler.scm
new file mode 100644 (file)
index 0000000..b301ea8
--- /dev/null
@@ -0,0 +1,5 @@
+(begin
+  (load-option 'sf)
+  (load-option 'compiler)
+  (disk-save "../lib/compiler.com")
+  (%exit))
\ No newline at end of file
diff --git a/src/etc/windows/build-edwin.bat b/src/etc/windows/build-edwin.bat
new file mode 100644 (file)
index 0000000..44ce6e4
--- /dev/null
@@ -0,0 +1 @@
+mit-scheme -load etc\windows\build-edwin.scm
diff --git a/src/etc/windows/build-edwin.scm b/src/etc/windows/build-edwin.scm
new file mode 100644 (file)
index 0000000..2018ee3
--- /dev/null
@@ -0,0 +1,4 @@
+(begin
+  (load-option 'edwin)
+  (disk-save "../lib/edwin.com")
+  (%exit))
\ No newline at end of file
diff --git a/src/etc/windows/build-runtime.scm b/src/etc/windows/build-runtime.scm
new file mode 100644 (file)
index 0000000..f000f0e
--- /dev/null
@@ -0,0 +1,3 @@
+(load-option 'win32)
+(disk-save "../lib/runtime.com")
+(%exit)
\ No newline at end of file