changeset 3012:7551f3e9c5a6 octave-forge

move old Windows build scripts to cygwin directory
author adb014
date Wed, 31 Jan 2007 21:45:41 +0000
parents 548899014cb8
children ea80af7eb81c
files admin/Windows/DetectDrives.nsi admin/Windows/Makefile admin/Windows/README admin/Windows/README-1st admin/Windows/TODO admin/Windows/bsubst.c admin/Windows/config_octave.sh admin/Windows/cygwin/DetectDrives.nsi admin/Windows/cygwin/Makefile admin/Windows/cygwin/README admin/Windows/cygwin/README-1st admin/Windows/cygwin/TODO admin/Windows/cygwin/bsubst.c admin/Windows/cygwin/config_octave.sh admin/Windows/cygwin/donation.txt admin/Windows/cygwin/install_octave.sh admin/Windows/cygwin/mkdll.sh admin/Windows/cygwin/mkstdc++dll.sh admin/Windows/cygwin/octave-install-win32.nsi admin/Windows/cygwin/octave.ico admin/Windows/cygwin/octave.nsi admin/Windows/cygwin/start_octave.sh admin/Windows/donation.txt admin/Windows/install_octave.sh admin/Windows/mkdll.sh admin/Windows/mkstdc++dll.sh admin/Windows/octave-install-win32.nsi admin/Windows/octave.ico admin/Windows/octave.nsi admin/Windows/start_octave.sh
diffstat 30 files changed, 1750 insertions(+), 1750 deletions(-) [+]
line wrap: on
line diff
--- a/admin/Windows/DetectDrives.nsi	Wed Jan 31 15:26:28 2007 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,177 +0,0 @@
-# Title: Detect Local Drives
-# Author: deguix
-# Source: NSIS archive >Browse >Useful Functions >Disk, Path & File Functions
-#
-# Function to detect available local drives and return their letters
-# (with colon and foward slash, like C:/). As my Search File Function,
-# this function uses the callback function, for each drive detected.
-#
-# Calling sequence:
-#   !include "DetectDrives.nsi"
-#
-#   Push "DriveTypes"
-#   Push $0
-#   GetFunctionAddress $0 "Callback"
-#   Exch $0
-#   Call DetectDrives
-#
-# Drive Types:
-#
-#   Three drive types are available:
-#
-#     Hard Drives
-#     CDROM Drives
-#     Diskette Drives
-#
-#   Separate multiple drive types by '&' (but keep the above order!).
-#
-#   E.g.,
-#      Hard Drives & Diskette Drives
-#      CDROM Drives & Diskette Drives
-#      Hard Drives & CDROM Drives & Diskette Drives
-#
-#   To select all, you may also use:
-#      All Local Drives
-#
-# Callback function:
-#
-#    * On entry, $R0 contains the drive letter detected.
-#
-#    * On return, push "Stop" to stop, or "Continue" to continue searching.
-#
-#    * Do not push any other values on the stack without popping them later.
-#
-#    * Use any variables, but $R0 through $R4 will be overwritten.
-#
-# Notes:
-#   Uses the system and kernel32 plugins repeatedly.  You may get better 
-#   performance if you have the following in your .nsi file:
-# 
-#      SetPluginUnload alwaysoff
-#
-#   This clue is from reading the docs, not from any tests. YMMV.
-
-Function DetectDrives
-
-Exch
-Exch $R0
-Exch
-Exch $R1
-Push $R2
-Push $R3
-Push $R4
-StrCpy $R4 $R1
-
-# Memory for paths
- 
-System::Alloc 1024 
-Pop $R1 
-
-# Get drives 
-
-System::Call 'kernel32::GetLogicalDriveStringsA(i, i) i(1024, R1)' 
-
-enumok: 
-
-# One more drive? 
-
-System::Call 'kernel32::lstrlenA(t) i(i R1) .R2' 
-IntCmp $R2 0 enumex 
-
-# Now, search for drives according to user conditions
-
-System::Call 'kernel32::GetDriveTypeA(t) i (i R1) .R3' 
-
-StrCmp $R0 "Hard Drives" 0 +2
-StrCmp $R3 3 0 enumnext
-
-StrCmp $R0 "CDROM Drives" 0 +2
-StrCmp $R3 5 0 enumnext
-
-StrCmp $R0 "Diskette Drives" 0 +2
-StrCmp $R3 2 0 enumnext
-
-StrCmp $R0 "Hard Drives & CDROM Drives" 0 +3
-StrCmp $R3 3 +2 0
-StrCmp $R3 5 0 enumnext
-
-StrCmp $R0 "Hard Drives & Diskette Drives" 0 +3
-StrCmp $R3 3 +2 0
-StrCmp $R3 2 0 enumnext
-
-StrCmp $R0 "CDROM Drives & Diskette Drives" 0 +3
-StrCmp $R3 5 +2 0
-StrCmp $R3 2 0 enumnext
-
-StrCmp $R0 "Hard Drives & CDROM Drives & Diskette Drives" +2 0
-StrCmp $R0 "All Local Drives" 0 +4
-StrCmp $R3 3 +3 0
-StrCmp $R3 5 +2 0
-StrCmp $R3 2 0 enumnext
-
-# Get drive path string 
-
-System::Call '*$R1(&t1024 .R3)' 
-
-# Prepare variables for the Callback function
-
-Push $R4
-Push $R3
-Push $R2
-Push $R1
-Push $R0
-
-StrCpy $R0 $R3
-
-# Call the Callback function
-
-Call $R4
-
-# Return variables
-
-Push $R5
-Exch
-Pop $R5
-
-Exch
-Pop $R0
-Exch
-Pop $R1
-Exch
-Pop $R2
-Exch
-Pop $R3
-Exch
-Pop $R4
-
-StrCmp $R5 "Stop" 0 +3
-  Pop $R5
-  Goto enumex
-
-Pop $R5
-
-enumnext: 
-
-# Next drive path
-
-IntOp $R1 $R1 + $R2 
-IntOp $R1 $R1 + 1 
-goto enumok 
-
-# End Search
-
-enumex:
- 
-# Free memory used for paths
-
-System::Free $R1 
-
-# Return original user variables
-
-Pop $R4
-Pop $R3
-Pop $R2
-Pop $R1
-Pop $R0
-
-FunctionEnd
--- a/admin/Windows/Makefile	Wed Jan 31 15:26:28 2007 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,234 +0,0 @@
-# assumptions:
-#   build happens in /c/src/cygwin/octave-2.1.xx
-#   source is in /c/src/octave-2.1.xx
-#   octave-forge is in /c/src/octave-forge
-#   install into /opt/octave-2.1.xx
-ROOT=/cygdrive/c/src
-ifeq (,$(OCTVER))
-  $(error usage: OCTVER=2.1.xx make)
-endif
-ifneq (,$(minor))
-  nsis_minor=/DMINOR=$minor
-endif
-BUILD=$(ROOT)/cygwin/octave-$(OCTVER)
-SOURCE=$(ROOT)/octave-$(OCTVER)
-FORGE=$(ROOT)/octave-forge
-ADMIN=$(FORGE)/admin/Windows
-DEST=/opt/octave-$(OCTVER)
-WINDEST=C:\\opt\\octave-$(OCTVER)
-NSIS="/cygdrive/c/Program Files/NSIS/makensis" 
-NSISPARS=/DVERSION=$(OCTVER) $(nsis_minor) /DROOT=$(WINDEST)
-PACKAGEDIR=/opt
-
-$(warning ADMIN=$(ADMIN))
-$(warning SOURCE=$(SOURCE))
-$(warning BUILD=$(BUILD))
-$(warning DEST=$(DEST))
-$(warning OCTVER=$(OCTVER))
-
-EXTERNAL_PACKAGES=fftw3 hdf5 lapack gnuplot gsl ginac image qhull epstk
-PACKAGE_TARGETS=$(patsubst %,$(DEST)/unpack.%,$(EXTERNAL_PACKAGES))
-
-# cygkey and octkey must be exactly the same length
-cygkey=Cygnus Solutions
-octkey=GNUOctave $(OCTVER)
-
-.PHONY: all setup stdc++ ranlibhack confighack config build check \
-	install strip docs forge epstk cygwin dist clean \
-	mklinks mkoctlinks mkoflinks
-
-all: build check install forge epstk strip docs
-	@echo "Done octave build: test using $(DEST)/bin/octave"
-
-
-# ==== create install directory, unpack dependencies, and generate stdc++ dll
-setup: $(SOURCE) $(DEST) $(BUILD) stdc++ $(PACKAGE_TARGETS)
-#$(SOURCE): $(ROOT)/octave-$(OCTVER).tar.bz2
-$(SOURCE):
-	@echo "Preparing source directory $(SOURCE)"
-	tar xjf $(ROOT)/octave-$(OCTVER).tar.bz2 -C $(ROOT)
-$(DEST): 
-	@echo "Preparing install directory $(DEST)"
-	-mkdir $(DEST)
-	-mkdir $(DEST)/bin
-	-mkdir $(DEST)/lib
-	-mkdir $(DEST)/doc
-$(BUILD):
-	@echo "Preparing build directory $(BUILD)"
-	-mkdir $(BUILD)
-
-$(DEST)/unpack.% : $(PACKAGEDIR)/%.tar.bz2 ; tar xjf $< -C $(DEST) ; touch $@
-
-stdc++: $(DEST)/lib/libstdc++.dll.a
-$(DEST)/lib/libstdc++.dll.a:
-	@echo "Making shared stdc++ in $(DEST)"
-	mkdir dll
-	cd dll && ar x /usr/lib/libstdc++.a
-	gcc -shared -o$(DEST)/bin/stdc++.dll dll/*.o \
-		-Wl,--enable-auto-image-base,--out-implib,$(DEST)/lib/libstdc++.dll.a
-	$(RM) -rf dll
-
-# ==== octave configure
-ranlibhack: ranlibhack.octave
-ranlibhack.octave:
-	@echo "Moving ranlib/setgmn.f to setgmn.f-orig if necessary"
-	if test -f $(SOURCE)/libcruft/ranlib/setgmn.f; then \
-	    mv $(SOURCE)/libcruft/ranlib/setgmn.f \
-		$(SOURCE)/libcruft/ranlib/setgmn.f-orig; \
-	fi
-	touch ranlibhack.octave
-
-confighack: confighack.octave
-confighack.octave:
-	@echo "Changing LAPACK tests from single to double precision if necessary"
-	if grep -q cheev $(SOURCE)/configure; then \
-	    mv $(SOURCE)/configure $(SOURCE)/configure-orig; \
-	    sed -e 's/cheev/zheev/g;s/CHEEV/ZHEEV/g;s/sgemm/dgemm/g;s/SGEMM/DGEMM/g' \
-		< $(SOURCE)/configure-orig > $(SOURCE)/configure; \
-	fi
-	touch confighack.octave
-
-config: setup ranlibhack confighack config.octave
-config.octave: $(ADMIN)/config_octave.sh
-	@echo "Configuring octave $(OCTVER): results in config.octave"
-	cd $(BUILD) && $(ADMIN)/config_octave.sh $(SOURCE) > $(ADMIN)/config.octave 2>&1
-
-# ==== build octave
-build: config build.octave
-build.octave: 
-	@echo "Building $(OCTVER): results in build.octave"
-	cd $(BUILD) && $(MAKE) -k > $(ADMIN)/build.octave 2>&1
-
-check: build check.octave
-check.octave: 
-	@echo "Checking $(OCTVER): results in check.octave"
-	-cd $(BUILD) && PATH=$(DEST)/bin:$(PATH) $(MAKE) check > $(ADMIN)/check.octave 2>&1
-
-install: build install.octave
-install.octave: 
-	# omit_deps=1 for faster install
-	# don't use install-strip for now since it strips the libs
-	@echo "Installing $(OCTVER): results in install.octave"
-	cd $(BUILD) && make omit_deps=1 install > $(ADMIN)/install.octave 2>&1
-
-# ==== strip octave
-strip: install
-	@echo "Stripping binaries for smaller distribution"
-	strip $(DEST)/bin/*.dll
-	strip $(DEST)/bin/*.exe
-	strip $(DEST)/base/oct/*.oct
-	strip $(DEST)/site/oct/*/*.oct
-clean: clean.forge
-	-$(RM) *.octave *.forge
-
-# ==== install documentation
-docs: build
-	@echo "Installing documentation"
-	cd $(BUILD)/doc/refcard && dvipdf refcard-letter.dvi
-	mkdir $(DEST)/doc
-	cp $(BUILD)/doc/refcard/refcard-letter.pdf $(DEST)/doc
-	mkdir $(DEST)/interpreter
-	cp $(BUILD)/interpreter/*.html $(DEST)/doc/interpreter
-
-# ==== generate a cygwin environment
-# Octave requires a hacked version of the cygwin dll so
-# that it doesn't conflict with an existing cygwin installation.
-# This is stored in the cygwin directory of the installation
-# which gets mounted as /bin in the installed system.  The octave
-# bin directory gets mounted as /usr/bin in the installed
-# system.  By keeping these separate, it should be possible to run
-# octave from either the hacked cygwin or the users own cygwin,
-# assuming the cygwin1.dll API hasn't changed.
-
-# Runtime support DLLs
-CYGDLL := $(CYGDLL) cygwin1 cygpcre cygncurses6 cygreadline5
-
-# Terminal support
-CYGBIN := $(CYGBIN) run rxvt 
-CYGDLL := $(CYGDLL) libW11
-
-# Utility functions --- we need a lot more these; see for
-# example the list of commands in the Linux Standard Base
-# specification at http://www.linuxbase.org
-CYGBIN := $(CYGBIN) mount umount mkdir rmdir mkfifo \
-	            mknod basename expr mv rm ln ls ps sed sh touch
-
-# Cygwin specific utility functions
-CYGBIN := $(CYGBIN) cygpath regtool
-
-# help and pager
-CYGBIN := $(CYGBIN) info infokey makeinfo less lessecho lesskey
-
-# These don't seem to be used:
-# CYGDLL := $(CYGDLL) cygz cygncurses++6
-# CYGBIN := $(CYGBIN) mkpasswd cygserver
-
-# Tag support files with directory and extension
-CYGDIR := $(DEST)/cygwin
-CYGSUP := $(patsubst %,$(CYGDIR)/%.dll,$(CYGDLL)) \
-	  $(patsubst %,$(CYGDIR)/%.exe,$(CYGBIN))
-
-# Rule to copy things from /bin to /opt/octave-x.x.xx/cygwin
-$(CYGDIR)/%: /bin/% ; cp $< $@
-
-cygwin: setup $(CYGDIR) $(CYGSUP)
-
-# program to substitute one string for another of the same length
-# in a binary file.
-$(ADMIN)/bsubst.exe: $(ADMIN)/bsubst.c
-	$(CC) -O2 -o $@ $<
-
-$(CYGDIR)/cygwin1.dll: /bin/cygwin1.dll $(ADMIN)/bsubst.exe
-	@echo "Copy cygwin1.dll to $(DEST) with registry key <$(octkey)>"
-	$(ADMIN)/bsubst /bin/cygwin1.dll $(CYGDIR)/cygwin1.dll \
-		"$(cygkey)" "$(octkey)"
-
-$(CYGDIR):
-	-mkdir $(DEST)/cygwin
-
-# ==== build octave-forge
-dist: forge cygwin mklinks octave.nsi
-	$(NSIS) $(NSISPARS) octave.nsi
-
-mklinks: mkoctlinks mkoflinks
-
-mkoflinks:
-	cd $(DEST)/site/oct/octave-forge && ls -l | grep ^l \
-		| sed -e 's,^.* \([^ ]*\) -> *\(.*\)$$,rm \1;ln -s \2 \1,' \
-		> mklinks.sh
-
-mkoctlinks:
-	cd $(BUILD)/src && $(SOURCE)/src/mk-oct-links -p \
-		`cd $(SOURCE)/src/DLD-FUNCTIONS&&ls *.cc|sed -e's/cc$$/df/g'` \
-		| sed -e 's,^\([^ ]*\)  *\([^ ]*\)$$,rm \2;ln -s \1 \2,' \
-		> $(DEST)/base/oct/mklinks.sh
-
-# ==== build octave-forge
-forge: install config.forge build.forge check.forge install.forge
-
-clean.forge:
-	@echo "Cleaning octave-forge"
-	-rm config.forge build.forge check.forge install.forge
-	cd $(FORGE) && make clean
-
-config.forge:
-	@echo "Configuring octave-forge --- I hope it is cleaned and refreshed"
-	cd $(FORGE) && ./autogen.sh
-	cd $(FORGE) && OCTAVE=$(DEST)/bin/octave MKOCTFILE=$(DEST)/bin/mkoctfile \
-		./configure --prefix=$(DEST) > $(ADMIN)/config.forge 2>&1
-
-build.forge: config.forge
-	@echo "Building octave-forge"
-	cd $(FORGE) && make -k > $(ADMIN)/build.forge 2>&1
-
-check.forge: build.forge
-	@echo "Checking octave-forge"
-	cd $(FORGE) && make check > $(ADMIN)/check.forge 2>&1
-
-install.forge: build.forge
-	@echo "Installing octave-forge"
-	cd $(FORGE) && make install > $(ADMIN)/install.forge 2>&1
-
-run.forge:
-	@echo "Running with an octave-forge environment"
-	cd $(FORGE) && make run
--- a/admin/Windows/README	Wed Jan 31 15:26:28 2007 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,181 +0,0 @@
-Most of the work of building a new release is
-encoded in admin/Windows/Makefile.
-
-1) Setup environment
-
-First you will need a cygwin environment.  Search 
-the net for details.  I'm assuming it is installed
-in C:.  If it is in D:, then you will need to change
-C: to D: and /cygdrive/c to /cygdrive/d below.
-
-As of this writing, only the gcc 3.2 compiler is 
-acceptable, later versions being too slow.  Search
-the octave-forge mailing list archives for details
-where you can find the right cygwin packages.
-
-Note that the gcc 3.2 compiler is missing stdint.h.  
-For our purposes you can do the following from
-cygwin to get around this:
-
-  if test ! -f /usr/include/stdint.h
-  then cat "#include <sys/types.h>" >/usr/include/stdint.h
-  fi
-
-Within cygwin, create a few directories:
-
-  mkdir /cygdrive/c/src        # SOURCE
-  mkdir /cygdrive/c/src/cygwin # BUILD
-  mkdir /opt                   # DEST
-
-Unbundle octave-forge-YYYY.MM.DD.tar.gz in the SOURCE directory:
-
-  tar xzf octave-forge-YYYY.MM.DD.tar.gz -C /cygdrive/c/src
-
-or use CVS:
-
-  cd /cygdrive/c/src
-  cvs -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/octave login
-  cvs -z3 -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/octave co octave-forge
-
-If you are using different SOURCE BUILD and DEST directories
-you will need to change octave-forge/admin/Windows/Makefile
-to reflect the directories you are actually using.
-
-Download the various windows-dev packages from the
-octave-forge download site into C:\cygwin\opt:
-
-  http://sourceforge.net/project/showfiles.php?group_id=2888
-
-These will be unbundled automatically during build.
-
-Download the latest octave from the octave download site 
-into C:\src:
-
-  http://www.octave.org/download
-
-This will be unbundled automatically during build.
-
-
-2) Build octave and octave-forge
-
-Start in the Windows admin directory.
-
-  cd /cygdrive/c/src/octave-forge/admin/Windows
-
-If using CVS, update the octave-forge version:
-
-  (cd /cygdrive/c/src/octave-forge; cvs -q update -dP)
-
-Set your octave version:
-
-  export OCTVER=2.1.xx
-
-Clean out any old version of octave-forge and force reconfigure/rebuild:
-
-  make clean
-
-Invoke the build:
-
-  make 
-
-The results of the build will be in:
-
-  config.octave
-  build.octave
-  check.octave
-  install.octave
-  config.forge
-  build.forge
-  check.forge
-  install.forge
-
-If any stage fails for some reason (e.g., because 
-routines haven't been ported to cygwin yet), you 
-will need to remove the corresponding results file 
-in order to rebuild it.  This will likely be 
-build.octave or build.forge.
-
-If external packages are causing a problem, remove
-them from the EXTERNAL_PACKAGES line in the Makefile.
-
-It may be helpful when fixing problems to run
-octave-forge in place:
-
-  make run.forge
-
-See the results of the tests:
-
-  less check.octave
-  less check.forge
-
-Both will have some errors, but there shouldn't be too many.
-
-The following make targets are available:
-
-  setup
-    * create /opt/octave-2.1.xx
-    * unpack packages in /opt/PACKAGE.tar.gz
-    * build stdc++.dll
-
-  config -> config.octave
-    * remove single-precision lapack requirements
-    * call ./configure with the appropriate options 
-
-  build -> build.octave
-    * call make in the octave directory
-
-  check -> check.octave
-    * calls make check in the octave directory
-
-  install -> install.octave
-    * calls make install in the octave directory
-
-  docs
-    * copies octave docs to the install directory
-
-  clean.forge
-    * call make clean in the octave-forge directory
-  config.forge -> config.forge
-    * call ./autogen.sh and ./configure in octave-forge
-  build.forge -> build.forge
-    * call make in octave-forge
-  check.forge -> check.forge
-    * call make check in octave-forge
-  install.forge -> install.forge
-    * call make install in octave-forge
-
-
-  cygwin
-    * sets up a cygwin environment for octave, taken
-      from the current environment.  The list of
-      cygwin files is hard-coded.  You may need a
-      different list for your version of cygwin.  This
-      is only needed for constructing a new distribution.
-
-  dist
-    * use nsis to build a new octave distribution.
-
-3) Try out the new build.
-
-You should be able to run the octave with
-
-  /opt/octave-2.1.xx/bin/octave
-
-4) Create a new release
-
-To build a release distribution, you will need the Nullsoft NSIS 2.0
-installer from 
-
-  http://www.nullsoft.com/free/nsis/#download
-
-Update the Makefile with NSIS containing the path to your 
-makensis.exe.  You will probably need to set WINDEST to
-C:\\cygwin\\opt\\octave-${OCTVER} as well since currently
-I'm building into C:\opt.
-
-To build the installer, use:
-
-  make dist
-
-Paul Kienzle
-2004-11-30
--- a/admin/Windows/README-1st	Wed Jan 31 15:26:28 2007 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-This directory contains the tools that were used to build an old cygwin binary
-of octave. They are currently very out of date, and need a large amount of
-work. They are kept for reference and should be removed in the future.
--- a/admin/Windows/TODO	Wed Jan 31 15:26:28 2007 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,28 +0,0 @@
-* Compile libmath.dll with various optimizations
-
-* Use chm so users can search the entire help system
-
-* Include epstk/category index in package so that documentation is consistent
-
-* Use DetectDrives.nsi to detect available drives in NSIS:
-
-	!include "DetectDrives.nsi"
-
-	Function MakeDriveLink
-	   StrCpy $R2 $R0 1
-	   # FileOpen $R1 "$INSTDIR/drive.link" "a"
-	   # FileSeek $R1 0 END
-	   # FileWrite $R1 "ln -sf /cygdrive/$R2 /$R2"
-	   # FileClose $R1
-	   Exec "$INSTDIR\bin\sh.exe -c 'ln -sf /cygdrive/$R2 /$R2'"
-	FunctionEnd
-
-	Section "-Make drive links"
-	   # Delete "$INSTDIR/drive.link"
-	   Push "All Local Drives"
-	   Push $0
-	   GetFunctionAddress $0 "MakeDriveLink"
-	   Exch $0
-	   Call DetectDrives
-	   # Add commands to install_octave.sh to detect and evaluate drive.link
-	SectionEnd
--- a/admin/Windows/bsubst.c	Wed Jan 31 15:26:28 2007 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,77 +0,0 @@
-#include <stdio.h>
-
-int main(int argc, unsigned char *argv[])
-{
-    unsigned char *buf, *from, *to, *text, *subst;
-    FILE *fromfid, *tofid;
-    if (argc != 5) {
-        fprintf(stderr,"Usage: %s from to text replacement\n",argv[0]);
-        exit(1);
-    }
-    from = argv[1];
-    to = argv[2];
-    text = argv[3];
-    subst = argv[4];
-    if (strlen(text) != strlen(subst)) {
-        fprintf(stderr,"%s: text and substitution different lengths\n",argv[0]);
-        exit(1);
-    }
-    fromfid = fopen(from,"rb");
-    if (fromfid == NULL) {
-        perror(from);
-        exit(1);
-    }
-    tofid = fopen(to,"wb");
-    if (tofid == NULL) {
-        fclose(fromfid);
-        perror(to);
-        exit(1);
-    }
-    buf = malloc(strlen(text));
-    if (buf == NULL) {
-        fprintf(stderr,"%s: memory allocation failure", argv[0]);
-        fclose(fromfid);
-        fclose(tofid);
-        exit(1);
-    }
-    int pos=0;
-    while (1) {
-        int c=fgetc(fromfid);
-        if (c < 0) {
-            if (ferror(fromfid)) perror(from);
-            if (pos) {
-                if (fwrite(buf,1,pos,tofid) != pos) goto write_error;
-            }
-            fclose(fromfid);
-            fclose(tofid);
-            if (ferror(fromfid)) {
-                exit(1);
-            } else {
-                exit(0);
-            }
-        }
-        buf[pos++] = (unsigned char)c;
-        if (buf[pos-1] != text[pos-1]) {
-            /* text does not match buffer */
-            int i;
-        shift:
-            /* output first character of buf and shift left by 1 */
-            if (fputc(buf[0],tofid) < 0) goto write_error;
-            for (i=1; i < pos; i++) buf[i-1]=buf[i];
-            pos--;
-            /* repeat until shifted buf matches start of text */
-            for (i=0; i < pos; i++) if (buf[i]!=text[i]) break;
-            if (i<pos) goto shift;
-        } else if (text[pos]=='\0') {
-            /* text matches buffer, so write subst */
-            if (fwrite(subst,1,pos,tofid) != pos) goto write_error;
-            pos = 0;
-        } /* else text matches so far, check next character */
-    }
-
-write_error:
-    perror(to);
-    fclose(from);
-    fclose(to);
-    exit(1);    
-}
\ No newline at end of file
--- a/admin/Windows/config_octave.sh	Wed Jan 31 15:26:28 2007 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,45 +0,0 @@
-#!/bin/bash
-
-dir="`pwd`"
-ver=${dir##*/}
-
-test "${dir#*/src/cygwin/octave-}" = "$dir" && echo "Expected to be in src/cygwin/octave-2.1.xx instead of $dir" && exit
-
-# May need to hack configure replacing sgemm with dgemm and
-# cheev with zheev, so that only need double precision lapack.
-# May need to hack libcruft/ranlib/setgmn.f, renaming it to setgmn.f-orig 
-# to remove the only single-precision requirement in octave.
-
-base_m='$(prefix)/base/m'
-site_m='$(prefix)/site/m'
-base_oct='$(prefix)/base/oct'
-site_oct='$(prefix)/site/oct'
-base_exec='$(prefix)/base/exec'
-site_exec='$(prefix)/site/exec'
-base_image='$(prefix)/base/imagelib'
-site_image='$(prefix)/site/imagelib'
-export fcnfiledir="$base_m"
-export localapifcnfiledir="$site_m"
-export localfcnfiledir="$site_m"
-export localverfcnfiledir="$site_m"
-export localfcnfilepath="$site_m//"
-export octlibdir="$base_exec"
-export archlibdir="$base_exec"
-export localarchlibdir="$site_exec"
-export localverarchlibdir="$site_exec"
-export octfiledir="$base_oct"
-export localoctfiledir="$site_oct"
-export localapioctfiledir="$site_oct"
-export localveroctfiledir="$site_oct"
-export localoctfilepath="$site_oct//"
-export imagedir="$base_image"
-export PATH=/opt/$ver/bin:$PATH
-export LDFLAGS=-L/opt/$ver/lib 
-export CPPFLAGS=-I/opt/$ver/include
-export CFLAGS=-O2 
-export CXXFLAGS=-O2
-$1/configure --enable-shared --disable-static \
-    --prefix=/opt/$ver --with-blas=lapack
-
-# correct misconfigurations:
-#   it doesn't seem to be detecting multiplot correctly
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/admin/Windows/cygwin/DetectDrives.nsi	Wed Jan 31 21:45:41 2007 +0000
@@ -0,0 +1,177 @@
+# Title: Detect Local Drives
+# Author: deguix
+# Source: NSIS archive >Browse >Useful Functions >Disk, Path & File Functions
+#
+# Function to detect available local drives and return their letters
+# (with colon and foward slash, like C:/). As my Search File Function,
+# this function uses the callback function, for each drive detected.
+#
+# Calling sequence:
+#   !include "DetectDrives.nsi"
+#
+#   Push "DriveTypes"
+#   Push $0
+#   GetFunctionAddress $0 "Callback"
+#   Exch $0
+#   Call DetectDrives
+#
+# Drive Types:
+#
+#   Three drive types are available:
+#
+#     Hard Drives
+#     CDROM Drives
+#     Diskette Drives
+#
+#   Separate multiple drive types by '&' (but keep the above order!).
+#
+#   E.g.,
+#      Hard Drives & Diskette Drives
+#      CDROM Drives & Diskette Drives
+#      Hard Drives & CDROM Drives & Diskette Drives
+#
+#   To select all, you may also use:
+#      All Local Drives
+#
+# Callback function:
+#
+#    * On entry, $R0 contains the drive letter detected.
+#
+#    * On return, push "Stop" to stop, or "Continue" to continue searching.
+#
+#    * Do not push any other values on the stack without popping them later.
+#
+#    * Use any variables, but $R0 through $R4 will be overwritten.
+#
+# Notes:
+#   Uses the system and kernel32 plugins repeatedly.  You may get better 
+#   performance if you have the following in your .nsi file:
+# 
+#      SetPluginUnload alwaysoff
+#
+#   This clue is from reading the docs, not from any tests. YMMV.
+
+Function DetectDrives
+
+Exch
+Exch $R0
+Exch
+Exch $R1
+Push $R2
+Push $R3
+Push $R4
+StrCpy $R4 $R1
+
+# Memory for paths
+ 
+System::Alloc 1024 
+Pop $R1 
+
+# Get drives 
+
+System::Call 'kernel32::GetLogicalDriveStringsA(i, i) i(1024, R1)' 
+
+enumok: 
+
+# One more drive? 
+
+System::Call 'kernel32::lstrlenA(t) i(i R1) .R2' 
+IntCmp $R2 0 enumex 
+
+# Now, search for drives according to user conditions
+
+System::Call 'kernel32::GetDriveTypeA(t) i (i R1) .R3' 
+
+StrCmp $R0 "Hard Drives" 0 +2
+StrCmp $R3 3 0 enumnext
+
+StrCmp $R0 "CDROM Drives" 0 +2
+StrCmp $R3 5 0 enumnext
+
+StrCmp $R0 "Diskette Drives" 0 +2
+StrCmp $R3 2 0 enumnext
+
+StrCmp $R0 "Hard Drives & CDROM Drives" 0 +3
+StrCmp $R3 3 +2 0
+StrCmp $R3 5 0 enumnext
+
+StrCmp $R0 "Hard Drives & Diskette Drives" 0 +3
+StrCmp $R3 3 +2 0
+StrCmp $R3 2 0 enumnext
+
+StrCmp $R0 "CDROM Drives & Diskette Drives" 0 +3
+StrCmp $R3 5 +2 0
+StrCmp $R3 2 0 enumnext
+
+StrCmp $R0 "Hard Drives & CDROM Drives & Diskette Drives" +2 0
+StrCmp $R0 "All Local Drives" 0 +4
+StrCmp $R3 3 +3 0
+StrCmp $R3 5 +2 0
+StrCmp $R3 2 0 enumnext
+
+# Get drive path string 
+
+System::Call '*$R1(&t1024 .R3)' 
+
+# Prepare variables for the Callback function
+
+Push $R4
+Push $R3
+Push $R2
+Push $R1
+Push $R0
+
+StrCpy $R0 $R3
+
+# Call the Callback function
+
+Call $R4
+
+# Return variables
+
+Push $R5
+Exch
+Pop $R5
+
+Exch
+Pop $R0
+Exch
+Pop $R1
+Exch
+Pop $R2
+Exch
+Pop $R3
+Exch
+Pop $R4
+
+StrCmp $R5 "Stop" 0 +3
+  Pop $R5
+  Goto enumex
+
+Pop $R5
+
+enumnext: 
+
+# Next drive path
+
+IntOp $R1 $R1 + $R2 
+IntOp $R1 $R1 + 1 
+goto enumok 
+
+# End Search
+
+enumex:
+ 
+# Free memory used for paths
+
+System::Free $R1 
+
+# Return original user variables
+
+Pop $R4
+Pop $R3
+Pop $R2
+Pop $R1
+Pop $R0
+
+FunctionEnd
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/admin/Windows/cygwin/Makefile	Wed Jan 31 21:45:41 2007 +0000
@@ -0,0 +1,234 @@
+# assumptions:
+#   build happens in /c/src/cygwin/octave-2.1.xx
+#   source is in /c/src/octave-2.1.xx
+#   octave-forge is in /c/src/octave-forge
+#   install into /opt/octave-2.1.xx
+ROOT=/cygdrive/c/src
+ifeq (,$(OCTVER))
+  $(error usage: OCTVER=2.1.xx make)
+endif
+ifneq (,$(minor))
+  nsis_minor=/DMINOR=$minor
+endif
+BUILD=$(ROOT)/cygwin/octave-$(OCTVER)
+SOURCE=$(ROOT)/octave-$(OCTVER)
+FORGE=$(ROOT)/octave-forge
+ADMIN=$(FORGE)/admin/Windows
+DEST=/opt/octave-$(OCTVER)
+WINDEST=C:\\opt\\octave-$(OCTVER)
+NSIS="/cygdrive/c/Program Files/NSIS/makensis" 
+NSISPARS=/DVERSION=$(OCTVER) $(nsis_minor) /DROOT=$(WINDEST)
+PACKAGEDIR=/opt
+
+$(warning ADMIN=$(ADMIN))
+$(warning SOURCE=$(SOURCE))
+$(warning BUILD=$(BUILD))
+$(warning DEST=$(DEST))
+$(warning OCTVER=$(OCTVER))
+
+EXTERNAL_PACKAGES=fftw3 hdf5 lapack gnuplot gsl ginac image qhull epstk
+PACKAGE_TARGETS=$(patsubst %,$(DEST)/unpack.%,$(EXTERNAL_PACKAGES))
+
+# cygkey and octkey must be exactly the same length
+cygkey=Cygnus Solutions
+octkey=GNUOctave $(OCTVER)
+
+.PHONY: all setup stdc++ ranlibhack confighack config build check \
+	install strip docs forge epstk cygwin dist clean \
+	mklinks mkoctlinks mkoflinks
+
+all: build check install forge epstk strip docs
+	@echo "Done octave build: test using $(DEST)/bin/octave"
+
+
+# ==== create install directory, unpack dependencies, and generate stdc++ dll
+setup: $(SOURCE) $(DEST) $(BUILD) stdc++ $(PACKAGE_TARGETS)
+#$(SOURCE): $(ROOT)/octave-$(OCTVER).tar.bz2
+$(SOURCE):
+	@echo "Preparing source directory $(SOURCE)"
+	tar xjf $(ROOT)/octave-$(OCTVER).tar.bz2 -C $(ROOT)
+$(DEST): 
+	@echo "Preparing install directory $(DEST)"
+	-mkdir $(DEST)
+	-mkdir $(DEST)/bin
+	-mkdir $(DEST)/lib
+	-mkdir $(DEST)/doc
+$(BUILD):
+	@echo "Preparing build directory $(BUILD)"
+	-mkdir $(BUILD)
+
+$(DEST)/unpack.% : $(PACKAGEDIR)/%.tar.bz2 ; tar xjf $< -C $(DEST) ; touch $@
+
+stdc++: $(DEST)/lib/libstdc++.dll.a
+$(DEST)/lib/libstdc++.dll.a:
+	@echo "Making shared stdc++ in $(DEST)"
+	mkdir dll
+	cd dll && ar x /usr/lib/libstdc++.a
+	gcc -shared -o$(DEST)/bin/stdc++.dll dll/*.o \
+		-Wl,--enable-auto-image-base,--out-implib,$(DEST)/lib/libstdc++.dll.a
+	$(RM) -rf dll
+
+# ==== octave configure
+ranlibhack: ranlibhack.octave
+ranlibhack.octave:
+	@echo "Moving ranlib/setgmn.f to setgmn.f-orig if necessary"
+	if test -f $(SOURCE)/libcruft/ranlib/setgmn.f; then \
+	    mv $(SOURCE)/libcruft/ranlib/setgmn.f \
+		$(SOURCE)/libcruft/ranlib/setgmn.f-orig; \
+	fi
+	touch ranlibhack.octave
+
+confighack: confighack.octave
+confighack.octave:
+	@echo "Changing LAPACK tests from single to double precision if necessary"
+	if grep -q cheev $(SOURCE)/configure; then \
+	    mv $(SOURCE)/configure $(SOURCE)/configure-orig; \
+	    sed -e 's/cheev/zheev/g;s/CHEEV/ZHEEV/g;s/sgemm/dgemm/g;s/SGEMM/DGEMM/g' \
+		< $(SOURCE)/configure-orig > $(SOURCE)/configure; \
+	fi
+	touch confighack.octave
+
+config: setup ranlibhack confighack config.octave
+config.octave: $(ADMIN)/config_octave.sh
+	@echo "Configuring octave $(OCTVER): results in config.octave"
+	cd $(BUILD) && $(ADMIN)/config_octave.sh $(SOURCE) > $(ADMIN)/config.octave 2>&1
+
+# ==== build octave
+build: config build.octave
+build.octave: 
+	@echo "Building $(OCTVER): results in build.octave"
+	cd $(BUILD) && $(MAKE) -k > $(ADMIN)/build.octave 2>&1
+
+check: build check.octave
+check.octave: 
+	@echo "Checking $(OCTVER): results in check.octave"
+	-cd $(BUILD) && PATH=$(DEST)/bin:$(PATH) $(MAKE) check > $(ADMIN)/check.octave 2>&1
+
+install: build install.octave
+install.octave: 
+	# omit_deps=1 for faster install
+	# don't use install-strip for now since it strips the libs
+	@echo "Installing $(OCTVER): results in install.octave"
+	cd $(BUILD) && make omit_deps=1 install > $(ADMIN)/install.octave 2>&1
+
+# ==== strip octave
+strip: install
+	@echo "Stripping binaries for smaller distribution"
+	strip $(DEST)/bin/*.dll
+	strip $(DEST)/bin/*.exe
+	strip $(DEST)/base/oct/*.oct
+	strip $(DEST)/site/oct/*/*.oct
+clean: clean.forge
+	-$(RM) *.octave *.forge
+
+# ==== install documentation
+docs: build
+	@echo "Installing documentation"
+	cd $(BUILD)/doc/refcard && dvipdf refcard-letter.dvi
+	mkdir $(DEST)/doc
+	cp $(BUILD)/doc/refcard/refcard-letter.pdf $(DEST)/doc
+	mkdir $(DEST)/interpreter
+	cp $(BUILD)/interpreter/*.html $(DEST)/doc/interpreter
+
+# ==== generate a cygwin environment
+# Octave requires a hacked version of the cygwin dll so
+# that it doesn't conflict with an existing cygwin installation.
+# This is stored in the cygwin directory of the installation
+# which gets mounted as /bin in the installed system.  The octave
+# bin directory gets mounted as /usr/bin in the installed
+# system.  By keeping these separate, it should be possible to run
+# octave from either the hacked cygwin or the users own cygwin,
+# assuming the cygwin1.dll API hasn't changed.
+
+# Runtime support DLLs
+CYGDLL := $(CYGDLL) cygwin1 cygpcre cygncurses6 cygreadline5
+
+# Terminal support
+CYGBIN := $(CYGBIN) run rxvt 
+CYGDLL := $(CYGDLL) libW11
+
+# Utility functions --- we need a lot more these; see for
+# example the list of commands in the Linux Standard Base
+# specification at http://www.linuxbase.org
+CYGBIN := $(CYGBIN) mount umount mkdir rmdir mkfifo \
+	            mknod basename expr mv rm ln ls ps sed sh touch
+
+# Cygwin specific utility functions
+CYGBIN := $(CYGBIN) cygpath regtool
+
+# help and pager
+CYGBIN := $(CYGBIN) info infokey makeinfo less lessecho lesskey
+
+# These don't seem to be used:
+# CYGDLL := $(CYGDLL) cygz cygncurses++6
+# CYGBIN := $(CYGBIN) mkpasswd cygserver
+
+# Tag support files with directory and extension
+CYGDIR := $(DEST)/cygwin
+CYGSUP := $(patsubst %,$(CYGDIR)/%.dll,$(CYGDLL)) \
+	  $(patsubst %,$(CYGDIR)/%.exe,$(CYGBIN))
+
+# Rule to copy things from /bin to /opt/octave-x.x.xx/cygwin
+$(CYGDIR)/%: /bin/% ; cp $< $@
+
+cygwin: setup $(CYGDIR) $(CYGSUP)
+
+# program to substitute one string for another of the same length
+# in a binary file.
+$(ADMIN)/bsubst.exe: $(ADMIN)/bsubst.c
+	$(CC) -O2 -o $@ $<
+
+$(CYGDIR)/cygwin1.dll: /bin/cygwin1.dll $(ADMIN)/bsubst.exe
+	@echo "Copy cygwin1.dll to $(DEST) with registry key <$(octkey)>"
+	$(ADMIN)/bsubst /bin/cygwin1.dll $(CYGDIR)/cygwin1.dll \
+		"$(cygkey)" "$(octkey)"
+
+$(CYGDIR):
+	-mkdir $(DEST)/cygwin
+
+# ==== build octave-forge
+dist: forge cygwin mklinks octave.nsi
+	$(NSIS) $(NSISPARS) octave.nsi
+
+mklinks: mkoctlinks mkoflinks
+
+mkoflinks:
+	cd $(DEST)/site/oct/octave-forge && ls -l | grep ^l \
+		| sed -e 's,^.* \([^ ]*\) -> *\(.*\)$$,rm \1;ln -s \2 \1,' \
+		> mklinks.sh
+
+mkoctlinks:
+	cd $(BUILD)/src && $(SOURCE)/src/mk-oct-links -p \
+		`cd $(SOURCE)/src/DLD-FUNCTIONS&&ls *.cc|sed -e's/cc$$/df/g'` \
+		| sed -e 's,^\([^ ]*\)  *\([^ ]*\)$$,rm \2;ln -s \1 \2,' \
+		> $(DEST)/base/oct/mklinks.sh
+
+# ==== build octave-forge
+forge: install config.forge build.forge check.forge install.forge
+
+clean.forge:
+	@echo "Cleaning octave-forge"
+	-rm config.forge build.forge check.forge install.forge
+	cd $(FORGE) && make clean
+
+config.forge:
+	@echo "Configuring octave-forge --- I hope it is cleaned and refreshed"
+	cd $(FORGE) && ./autogen.sh
+	cd $(FORGE) && OCTAVE=$(DEST)/bin/octave MKOCTFILE=$(DEST)/bin/mkoctfile \
+		./configure --prefix=$(DEST) > $(ADMIN)/config.forge 2>&1
+
+build.forge: config.forge
+	@echo "Building octave-forge"
+	cd $(FORGE) && make -k > $(ADMIN)/build.forge 2>&1
+
+check.forge: build.forge
+	@echo "Checking octave-forge"
+	cd $(FORGE) && make check > $(ADMIN)/check.forge 2>&1
+
+install.forge: build.forge
+	@echo "Installing octave-forge"
+	cd $(FORGE) && make install > $(ADMIN)/install.forge 2>&1
+
+run.forge:
+	@echo "Running with an octave-forge environment"
+	cd $(FORGE) && make run
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/admin/Windows/cygwin/README	Wed Jan 31 21:45:41 2007 +0000
@@ -0,0 +1,181 @@
+Most of the work of building a new release is
+encoded in admin/Windows/Makefile.
+
+1) Setup environment
+
+First you will need a cygwin environment.  Search 
+the net for details.  I'm assuming it is installed
+in C:.  If it is in D:, then you will need to change
+C: to D: and /cygdrive/c to /cygdrive/d below.
+
+As of this writing, only the gcc 3.2 compiler is 
+acceptable, later versions being too slow.  Search
+the octave-forge mailing list archives for details
+where you can find the right cygwin packages.
+
+Note that the gcc 3.2 compiler is missing stdint.h.  
+For our purposes you can do the following from
+cygwin to get around this:
+
+  if test ! -f /usr/include/stdint.h
+  then cat "#include <sys/types.h>" >/usr/include/stdint.h
+  fi
+
+Within cygwin, create a few directories:
+
+  mkdir /cygdrive/c/src        # SOURCE
+  mkdir /cygdrive/c/src/cygwin # BUILD
+  mkdir /opt                   # DEST
+
+Unbundle octave-forge-YYYY.MM.DD.tar.gz in the SOURCE directory:
+
+  tar xzf octave-forge-YYYY.MM.DD.tar.gz -C /cygdrive/c/src
+
+or use CVS:
+
+  cd /cygdrive/c/src
+  cvs -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/octave login
+  cvs -z3 -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/octave co octave-forge
+
+If you are using different SOURCE BUILD and DEST directories
+you will need to change octave-forge/admin/Windows/Makefile
+to reflect the directories you are actually using.
+
+Download the various windows-dev packages from the
+octave-forge download site into C:\cygwin\opt:
+
+  http://sourceforge.net/project/showfiles.php?group_id=2888
+
+These will be unbundled automatically during build.
+
+Download the latest octave from the octave download site 
+into C:\src:
+
+  http://www.octave.org/download
+
+This will be unbundled automatically during build.
+
+
+2) Build octave and octave-forge
+
+Start in the Windows admin directory.
+
+  cd /cygdrive/c/src/octave-forge/admin/Windows
+
+If using CVS, update the octave-forge version:
+
+  (cd /cygdrive/c/src/octave-forge; cvs -q update -dP)
+
+Set your octave version:
+
+  export OCTVER=2.1.xx
+
+Clean out any old version of octave-forge and force reconfigure/rebuild:
+
+  make clean
+
+Invoke the build:
+
+  make 
+
+The results of the build will be in:
+
+  config.octave
+  build.octave
+  check.octave
+  install.octave
+  config.forge
+  build.forge
+  check.forge
+  install.forge
+
+If any stage fails for some reason (e.g., because 
+routines haven't been ported to cygwin yet), you 
+will need to remove the corresponding results file 
+in order to rebuild it.  This will likely be 
+build.octave or build.forge.
+
+If external packages are causing a problem, remove
+them from the EXTERNAL_PACKAGES line in the Makefile.
+
+It may be helpful when fixing problems to run
+octave-forge in place:
+
+  make run.forge
+
+See the results of the tests:
+
+  less check.octave
+  less check.forge
+
+Both will have some errors, but there shouldn't be too many.
+
+The following make targets are available:
+
+  setup
+    * create /opt/octave-2.1.xx
+    * unpack packages in /opt/PACKAGE.tar.gz
+    * build stdc++.dll
+
+  config -> config.octave
+    * remove single-precision lapack requirements
+    * call ./configure with the appropriate options 
+
+  build -> build.octave
+    * call make in the octave directory
+
+  check -> check.octave
+    * calls make check in the octave directory
+
+  install -> install.octave
+    * calls make install in the octave directory
+
+  docs
+    * copies octave docs to the install directory
+
+  clean.forge
+    * call make clean in the octave-forge directory
+  config.forge -> config.forge
+    * call ./autogen.sh and ./configure in octave-forge
+  build.forge -> build.forge
+    * call make in octave-forge
+  check.forge -> check.forge
+    * call make check in octave-forge
+  install.forge -> install.forge
+    * call make install in octave-forge
+
+
+  cygwin
+    * sets up a cygwin environment for octave, taken
+      from the current environment.  The list of
+      cygwin files is hard-coded.  You may need a
+      different list for your version of cygwin.  This
+      is only needed for constructing a new distribution.
+
+  dist
+    * use nsis to build a new octave distribution.
+
+3) Try out the new build.
+
+You should be able to run the octave with
+
+  /opt/octave-2.1.xx/bin/octave
+
+4) Create a new release
+
+To build a release distribution, you will need the Nullsoft NSIS 2.0
+installer from 
+
+  http://www.nullsoft.com/free/nsis/#download
+
+Update the Makefile with NSIS containing the path to your 
+makensis.exe.  You will probably need to set WINDEST to
+C:\\cygwin\\opt\\octave-${OCTVER} as well since currently
+I'm building into C:\opt.
+
+To build the installer, use:
+
+  make dist
+
+Paul Kienzle
+2004-11-30
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/admin/Windows/cygwin/README-1st	Wed Jan 31 21:45:41 2007 +0000
@@ -0,0 +1,3 @@
+This directory contains the tools that were used to build an old cygwin binary
+of octave. They are currently very out of date, and need a large amount of
+work. They are kept for reference and should be removed in the future.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/admin/Windows/cygwin/TODO	Wed Jan 31 21:45:41 2007 +0000
@@ -0,0 +1,28 @@
+* Compile libmath.dll with various optimizations
+
+* Use chm so users can search the entire help system
+
+* Include epstk/category index in package so that documentation is consistent
+
+* Use DetectDrives.nsi to detect available drives in NSIS:
+
+	!include "DetectDrives.nsi"
+
+	Function MakeDriveLink
+	   StrCpy $R2 $R0 1
+	   # FileOpen $R1 "$INSTDIR/drive.link" "a"
+	   # FileSeek $R1 0 END
+	   # FileWrite $R1 "ln -sf /cygdrive/$R2 /$R2"
+	   # FileClose $R1
+	   Exec "$INSTDIR\bin\sh.exe -c 'ln -sf /cygdrive/$R2 /$R2'"
+	FunctionEnd
+
+	Section "-Make drive links"
+	   # Delete "$INSTDIR/drive.link"
+	   Push "All Local Drives"
+	   Push $0
+	   GetFunctionAddress $0 "MakeDriveLink"
+	   Exch $0
+	   Call DetectDrives
+	   # Add commands to install_octave.sh to detect and evaluate drive.link
+	SectionEnd
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/admin/Windows/cygwin/bsubst.c	Wed Jan 31 21:45:41 2007 +0000
@@ -0,0 +1,77 @@
+#include <stdio.h>
+
+int main(int argc, unsigned char *argv[])
+{
+    unsigned char *buf, *from, *to, *text, *subst;
+    FILE *fromfid, *tofid;
+    if (argc != 5) {
+        fprintf(stderr,"Usage: %s from to text replacement\n",argv[0]);
+        exit(1);
+    }
+    from = argv[1];
+    to = argv[2];
+    text = argv[3];
+    subst = argv[4];
+    if (strlen(text) != strlen(subst)) {
+        fprintf(stderr,"%s: text and substitution different lengths\n",argv[0]);
+        exit(1);
+    }
+    fromfid = fopen(from,"rb");
+    if (fromfid == NULL) {
+        perror(from);
+        exit(1);
+    }
+    tofid = fopen(to,"wb");
+    if (tofid == NULL) {
+        fclose(fromfid);
+        perror(to);
+        exit(1);
+    }
+    buf = malloc(strlen(text));
+    if (buf == NULL) {
+        fprintf(stderr,"%s: memory allocation failure", argv[0]);
+        fclose(fromfid);
+        fclose(tofid);
+        exit(1);
+    }
+    int pos=0;
+    while (1) {
+        int c=fgetc(fromfid);
+        if (c < 0) {
+            if (ferror(fromfid)) perror(from);
+            if (pos) {
+                if (fwrite(buf,1,pos,tofid) != pos) goto write_error;
+            }
+            fclose(fromfid);
+            fclose(tofid);
+            if (ferror(fromfid)) {
+                exit(1);
+            } else {
+                exit(0);
+            }
+        }
+        buf[pos++] = (unsigned char)c;
+        if (buf[pos-1] != text[pos-1]) {
+            /* text does not match buffer */
+            int i;
+        shift:
+            /* output first character of buf and shift left by 1 */
+            if (fputc(buf[0],tofid) < 0) goto write_error;
+            for (i=1; i < pos; i++) buf[i-1]=buf[i];
+            pos--;
+            /* repeat until shifted buf matches start of text */
+            for (i=0; i < pos; i++) if (buf[i]!=text[i]) break;
+            if (i<pos) goto shift;
+        } else if (text[pos]=='\0') {
+            /* text matches buffer, so write subst */
+            if (fwrite(subst,1,pos,tofid) != pos) goto write_error;
+            pos = 0;
+        } /* else text matches so far, check next character */
+    }
+
+write_error:
+    perror(to);
+    fclose(from);
+    fclose(to);
+    exit(1);    
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/admin/Windows/cygwin/config_octave.sh	Wed Jan 31 21:45:41 2007 +0000
@@ -0,0 +1,45 @@
+#!/bin/bash
+
+dir="`pwd`"
+ver=${dir##*/}
+
+test "${dir#*/src/cygwin/octave-}" = "$dir" && echo "Expected to be in src/cygwin/octave-2.1.xx instead of $dir" && exit
+
+# May need to hack configure replacing sgemm with dgemm and
+# cheev with zheev, so that only need double precision lapack.
+# May need to hack libcruft/ranlib/setgmn.f, renaming it to setgmn.f-orig 
+# to remove the only single-precision requirement in octave.
+
+base_m='$(prefix)/base/m'
+site_m='$(prefix)/site/m'
+base_oct='$(prefix)/base/oct'
+site_oct='$(prefix)/site/oct'
+base_exec='$(prefix)/base/exec'
+site_exec='$(prefix)/site/exec'
+base_image='$(prefix)/base/imagelib'
+site_image='$(prefix)/site/imagelib'
+export fcnfiledir="$base_m"
+export localapifcnfiledir="$site_m"
+export localfcnfiledir="$site_m"
+export localverfcnfiledir="$site_m"
+export localfcnfilepath="$site_m//"
+export octlibdir="$base_exec"
+export archlibdir="$base_exec"
+export localarchlibdir="$site_exec"
+export localverarchlibdir="$site_exec"
+export octfiledir="$base_oct"
+export localoctfiledir="$site_oct"
+export localapioctfiledir="$site_oct"
+export localveroctfiledir="$site_oct"
+export localoctfilepath="$site_oct//"
+export imagedir="$base_image"
+export PATH=/opt/$ver/bin:$PATH
+export LDFLAGS=-L/opt/$ver/lib 
+export CPPFLAGS=-I/opt/$ver/include
+export CFLAGS=-O2 
+export CXXFLAGS=-O2
+$1/configure --enable-shared --disable-static \
+    --prefix=/opt/$ver --with-blas=lapack
+
+# correct misconfigurations:
+#   it doesn't seem to be detecting multiplot correctly
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/admin/Windows/cygwin/donation.txt	Wed Jan 31 21:45:41 2007 +0000
@@ -0,0 +1,6 @@
+http://www.uwfoundation.wisc.edu/index.html
+
+  I/we wish to support ongoing development of the Octave modeling 
+  language, under the supervision of Professor James B. Rawlings and 
+  Dr. John W. Eaton of the Department of Chemical and Biological 
+  Engineering at the University of Wisconsin-Madison.
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/admin/Windows/cygwin/install_octave.sh	Wed Jan 31 21:45:41 2007 +0000
@@ -0,0 +1,143 @@
+#!/bin/sh
+export PATH="/bin:$PATH"
+
+echo '                Welcome to Octave'
+echo
+echo
+echo 'Octave has been successfully installed on your computer.'
+echo 'At this point the software will customize the octave'
+echo 'installation for your machine.'
+echo
+
+echo 'STEP 1'
+echo
+echo 'There is no step one for now.'
+echo
+#echo 'Octave has been optimized for various computer architectures.'
+#echo 'The following optimized versions of octave are available:'
+#echo
+#
+#maxchoice=0;
+#for oct in /bin/octave-2.*.*-*atlas.exe ; do 
+#    maxchoice=`expr $maxchoice + 1`;
+#    echo "$maxchoice: "`basename $oct .exe` ; 
+#done
+#
+#if [ "$maxchoice" = "1" ] ; then
+#    echo "Selecting default octave version: $oct";
+#    choice=1;
+#else
+#    choice=-1;
+#fi
+#
+#while [ "$choice" -lt 1 -o "$choice" -gt $maxchoice ] ; do
+#    echo -n 'Choose which version to install:'
+#    read choice;
+#done
+#
+#idx=0 ;
+#for oct in /bin/octave-2.*.*-*atlas.exe ; do 
+#    idx=`expr $idx + 1`;
+#    if [ "$idx" = "$choice" ] ; then
+#        ln -sf $oct /bin/octave.exe ;
+#    else
+#        rm $oct;
+#    fi
+#done
+
+echo
+echo 'STEP 2'
+echo
+#echo 'Setting links to your active drives'
+#echo 'you will be able to access C: as /C from octave'
+
+#for drive in A B C D E F G H I J K L M N O P Q R S T U V W X Y Z ; do
+#    drvmsg=`cmd /c vol $drive: 2>&1 | sed -e'
+#            1d
+#           s/.*system cannot find.*/NOTOK/'`;
+#    if [ "$drvmsg" = "NOTOK" ] ; then
+#    else 
+#        echo "Creating link to drive $drive:";
+#        ln -sf /cygdrive/$drive /$drive ;
+#    fi
+#done
+
+echo
+echo 'Setting links to your oct-files'
+echo
+
+(cd /opt/octave*/bin && ./mklinks.sh)
+(cd /opt/octave*/base/oct && ./mklinks.sh)
+(cd /opt/octave*/site/oct/octave-forge && ./mklinks.sh)
+
+echo
+echo 'STEP 3'
+echo
+echo 'Set Editor used by the "edit" command'
+echo 'The default is currently "notepad"'
+echo 'If you wish to use a different editor, enter the path and'
+echo 'filename here'
+echo
+
+echo -n "Editor (currently notepad)> ";
+read neweditor
+if [ -z "$neweditor" ] ; then
+    neweditor=notepad
+fi
+
+echo "Installing editor $neweditor into start_octave.sh"
+soct="start_octave.sh"
+sed -e"s! EDITOR=.*! EDITOR=\'$neweditor\'!" /bin/$soct > /tmp/$soct
+mv /tmp/$soct /bin/$soct 
+
+echo
+echo 'STEP 4'
+echo
+echo 'In order to use the epstk graphics functions, you'
+echo 'need to have a postscript interpreter. This would'
+echo 'typically be gswin or ghostscript'
+echo
+
+# get the program associated for ps file types
+psassoc=`cmd /c assoc .ps | sed -e's/.ps=//'`;
+if [ -n "$psassoc" ] ; then
+    psfile=`cmd /c ftype $psassoc | sed -e"
+            s/$psassoc=//
+            s/^\"//
+            s/\" *\"%1\"//
+            "`;
+fi
+
+if [ -f "$psfile" ] ; then
+    echo "The program associated with ps files is $psfile"
+    echo "To accept this program type return, otherwise,"
+    echo "enter the full path of the desired ps viewer program"
+else
+    echo "No program is currently associated with ps files"
+    echo "If you have such a program installed, enter the"
+    echo "full path to the executable, otherwise type return"
+fi
+
+echo -n "New PS viewer> ";
+read newpsfile
+if [ -n "$newpsfile" ] ; then
+    psfile=$newpsfile;
+fi
+if [ -n "$psfile" ] ; then
+    psfile=`cygpath -msa "$psfile"`
+fi
+
+echo "Installing PS viewer at $psfile into start_octave.sh"
+soct="start_octave.sh"
+sed -e"s!export PS_VIEWER=!&\"$psfile\"!" /bin/$soct > /tmp/$soct
+mv /tmp/$soct /bin/$soct 
+
+
+
+echo
+echo "COMPLETE"
+echo
+echo "Configuration of octave is now complete"
+echo "Press <return> key to continue"
+echo
+read choice
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/admin/Windows/cygwin/mkdll.sh	Wed Jan 31 21:45:41 2007 +0000
@@ -0,0 +1,71 @@
+#! /bin/sh
+
+test $# -eq 0 && cat <<EOF && exit 1
+mkdll.sh libarchive.a [outname.dll [outlib.lib]]
+
+Converts a static library to a DLL plus a LIB for linking
+to that DLL.  By default the output name is archive.
+
+This routine goes to considerable trouble to protect
+against object files of the same name in different
+subdirectories.
+EOF
+
+# Get full path to archive name
+archive="$1"
+test "${archive#/}" = "$archive" && archive="`pwd`/$archive"
+test ! -f "$archive" && echo "$archive does not exist" && exit -1 
+
+# Get base name from /path/libbase.a
+base="${archive##*/}"; base="${base#lib}"; base="${base%.a}"
+
+# Determine dll and lib names, or default them from base
+if test $# -gt 1 ; then
+  dll="$2"
+  if test $# -gt 2 ; then
+    lib="$3"
+  else
+    lib="${dll%.dll}.lib"
+  fi
+else
+  dll="$base.dll"
+  lib="$base.lib"
+fi
+
+# Create a temporary directory for building the archive
+test -e "/tmp/$base-dll" && echo "/tmp/$base-dll exists...remove it" && exit 1
+mkdir "/tmp/$base-dll"
+
+# extract the archive to a working directory
+dir="`pwd`"
+work="/tmp/$base-dll"
+(cd "$work" && ar x "$archive")
+
+# duplicate filenames in the archive need to be extracted individually 
+dups=`ar t "$archive" | sort | uniq -c | grep -v '^ *1[^0-9]'`
+even=0
+cd "$work"
+mkdir dups
+for x in 0 junk $dups; do
+    if test $even -eq 0; then 
+	n=$x
+	even=1
+    else
+	while test $n -gt 1; do
+	    n=`expr $n - 1`
+	    echo "extracting $x-$n"
+	    (cd dups && ar xN $n "$archive" $x)
+	    mv dups/$x $x-$n
+	done
+	even=0
+    fi
+done
+rmdir dups
+
+# Build the dll
+cd "$dir"
+gcc -shared "-o$dll" "-Wl,--out-implib,$lib" $work/*
+
+# A little bit of cleanup
+rm -f $work/*
+rmdir $work
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/admin/Windows/cygwin/mkstdc++dll.sh	Wed Jan 31 21:45:41 2007 +0000
@@ -0,0 +1,33 @@
+#! /bin/sh
+
+# This script builds stdc++.dll and the corresponding libstdc++.dll.a.
+# Now you have two choices:
+#
+# (1) Put libstdc++.dll.a into /usr/lib.  Now all g++ will link shared 
+#     to stdc++.dll by default, but you can override it by adding
+#     -static to your link line.  You should put stdc++.dll into /usr/bin
+#     if you do this, and be sure to include it with any executables
+#     that you distribute.
+#
+# (2) Put libstdc++.dll.a into a private lib directory.  All g++ will
+#     continue to link statically by default, but you can override it
+#     by adding -Lpath_to_private_libs to your link line.  You should
+#     install stdc++.dll into the directory containing the executable,
+#     and be sure to include it with any executables that you distribute.
+#
+# Older versions of cygwin (but not too old) require the flag 
+#    -Wl,--enable-runtime-pseudo-reloc
+# to link against stdc++.dll.  As of this writing, this is no
+# longer required.
+#
+# Paul Kienzle
+# 2003-07-17
+
+mkdir buildc++
+cd buildc++
+ar x /usr/lib/libstdc++.a
+gcc -shared -o../stdc++.dll \
+	-Wl,--enable-auto-image-base,--out-implib,../libstdc++.dll.a *.o
+cd ..
+rm -rf buildc++
+strip stdc++.dll
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/admin/Windows/cygwin/octave-install-win32.nsi	Wed Jan 31 21:45:41 2007 +0000
@@ -0,0 +1,356 @@
+#
+# NSI script for octave windows
+# $Id$
+#
+
+# http://nsis.sourceforge.net/Docs
+
+# Sort out command line parameters
+
+!ifndef VERSION
+!error "Start MakeNSIS with /DVERSION=2.1.xx [/DMINOR=-yyyymmdd] [/DROOT=C:\cygwin] octave.nsi"
+!endif
+!ifndef MINOR
+!define MINOR ""
+!endif
+!ifndef ROOT
+!define ROOT "C:\cygwin"
+!endif
+
+# Product and version
+!define MUI_PRODUCT "GNU Octave ${VERSION}"
+!define MUI_VERSION "${VERSION}${MINOR}"
+
+
+!define STARTMENU
+
+!include "${NSISDIR}\Contrib\Modern UI\System.nsh"
+
+!define MUI_LICENSEPAGE
+!define MUI_COMPONENTSPAGE
+!define MUI_DIRECTORYPAGE
+
+!define MUI_ABORTWARNING
+
+!define MUI_UNINSTALLER
+!define MUI_UNCONFIRMPAGE
+
+!insertmacro MUI_LANGUAGE "English"
+!insertmacro MUI_LANGUAGE "Spanish"
+
+CrcCheck On
+
+OutFile "octave-${MUI_VERSION}-inst.exe"
+#Icon "octave.ico"
+#UninstallIcon "octave.ico"
+
+# ****************** Localization ***********************
+
+LicenseData /LANG=${LANG_ENGLISH} "..\..\COPYING.GPL"
+LicenseData /LANG=${LANG_SPANISH} "..\..\COPYING.GPL-spanish"
+
+; The default caption is a language dependent string saying
+;     ${MUI_PRODUCT} ${VERSION} Setup
+; Since our ${MUI_PRODUCT} includes ${VERSION}, we need to
+; set the caption by hand for each of our languages.
+Caption /LANG=${LANG_ENGLISH} "${MUI_PRODUCT} Setup"
+Caption /LANG=${LANG_SPANISH} "Instalación de ${MUI_PRODUCT}"
+
+UninstallCaption /LANG=${LANG_ENGLISH} "Uninstall ${MUI_PRODUCT}"
+UninstallCaption /LANG=${LANG_SPANISH} "Desinstalar ${MUI_PRODUCT}"
+
+LangString TITLE_Section1 ${LANG_ENGLISH} "${MUI_PRODUCT}"
+LangString TITLE_Section1 ${LANG_SPANISH} "${MUI_PRODUCT}"
+
+LangString TITLE_Section2 ${LANG_ENGLISH} "Start Menu Icons"
+LangString TITLE_Section2 ${LANG_SPANISH} "Iconos de Menú de Inicio"
+
+LangString TITLE_Section3 ${LANG_ENGLISH} "Desktop Icons"
+LangString TITLE_Section3 ${LANG_SPANISH} "Iconos de Escritorio"
+
+LangString DESC_Section1 ${LANG_ENGLISH} "Install the ${MUI_PRODUCT} for Windows binary distribution including gnuplot, epstk and the octave-forge extensions."
+LangString DESC_Section1 ${LANG_SPANISH} "Instalar la version ejecutable the ${MUI_PRODUCT} para Windows la cual incluye gnuplot, epstk y las extensiones de octave-forge."
+
+LangString DESC_Section2 ${LANG_ENGLISH} "Add a ${MUI_PRODUCT} folder to the Start Menu."
+LangString DESC_Section2 ${LANG_SPANISH} "Agregar una carpeta de ${MUI_PRODUCT} al Menú de Inicio."
+
+LangString DESC_Section3 ${LANG_ENGLISH} "Add a ${MUI_PRODUCT} icon to the Desktop."
+LangString DESC_Section3 ${LANG_SPANISH} "Agregar un icono de ${MUI_PRODUCT} al Escritorio."
+
+LangString UninstallLink ${LANG_ENGLISH} "$SMPROGRAMS\${MUI_PRODUCT}\Uninstall ${MUI_PRODUCT}.lnk"
+LangString UninstallLink ${LANG_SPANISH} "$SMPROGRAMS\${MUI_PRODUCT}\Desinstalar ${MUI_PRODUCT}.lnk"
+
+LangString ManualLink ${LANG_ENGLISH} "$SMPROGRAMS\${MUI_PRODUCT}\${MUI_PRODUCT} Manual (HTML).lnk"
+LangString ManualLink ${LANG_SPANISH} "$SMPROGRAMS\${MUI_PRODUCT}\Manual de ${MUI_PRODUCT} (HTML).lnk"
+
+LangString FunctionLink ${LANG_ENGLISH} "$SMPROGRAMS\${MUI_PRODUCT}\OctaveForge Quick Reference (HTML).url"
+LangString FunctionLink ${LANG_SPANISH} "$SMPROGRAMS\${MUI_PRODUCT}\Refencia Rápida de OctaveForge (HTML).url"
+
+LangString EpstkLink ${LANG_ENGLISH} "$SMPROGRAMS\${MUI_PRODUCT}\Epstk Manual (HTML).url"
+LangString EpstkLink ${LANG_SPANISH} "$SMPROGRAMS\${MUI_PRODUCT}\Manual de Epstk (HTML).url"
+
+LangString RefcardLink ${LANG_ENGLISH} "$SMPROGRAMS\${MUI_PRODUCT}\${MUI_PRODUCT} Quick Reference (PDF).lnk"
+LangString RefcardLink ${LANG_SPANISH} "$SMPROGRAMS\${MUI_PRODUCT}\Refencia Rápida de ${MUI_PRODUCT} (PDF).lnk"
+
+; The following strings are used by "Function .onInit".  If you are
+; adding a new language, be sure to add new tests therein, otherwise
+; the English language messages will be used.
+
+!define PreviousCygwinEnglish "A previous installation of cygwin was detected. This package is not to be used from within a cygwin enviroment. Click OK if you want to continue anyway or CANCEL if you want to abort the installation process."
+!define PreviousCygwinSpanish "Se detectó una versión de cygwin instalada. Este paquete no fue diseñado para funcionar dentro de un ambiente de cygwin. Presione Aceptar si desea continuar o Cancelar si desea detener el preceso de instalación."
+
+!define PreviousOctaveEnglish "A previous version of Octave for Windows was detected. Please uninstall any previous version before running this installer. Click OK if you want to continue anyway or CANCEL if you want to abort the installation process."
+!define PreviousOctaveSpanish "Se detectó una versión anterior de Octave para Windows. Por favor desinstale cualquier versión anterior antes de ejecutar este instalador. Presione Aceptar si desea continuar o Cancelar si desea detener el proceso de instalación."
+
+!define GenuineIntelEnglish "This version of Octave for Windows is optimized for Intel x86 processors and is known to cause troubles with other architectures. Click OK if you want to continue anyway or CANCEL if you want to abort the installation process."
+!define GenuineIntelSpanish "Esta versión de Octave para Windows ha sido optimizada para procesadores Intel x86 y puede no funcionar correctamente sobre otros procesadores. Presione Aceptar si desea continuar o Cancelar si desea detener el proceso de instalación."
+
+# ****************** End Localization ***********************
+
+# This is the command to start octave.
+!define OctaveStart "rxvt.exe --keysym.0xFF50 '^a' --keysym.0xFF57 '^e' --keysym.0xFFFF '^f^h' -fn 'Lucida Console-12' -tn linux -title '${MUI_PRODUCT}' -geometry 80x25 -sl 400 -sr -e /bin/start_octave.sh"
+
+
+InstallDir "$PROGRAMFILES\${MUI_PRODUCT}"
+
+; Files and registry keys
+Section $(TITLE_Section1) Section1
+
+  CreateDirectory $INSTDIR\tmp
+  CreateDirectory $INSTDIR\octave_files
+  SetOutPath $INSTDIR\bin
+  File "${ROOT}\opt\octave-support\*.*"
+  File install_octave.sh start_octave.sh
+  File octave.ico
+  File "${ROOT}\opt\octave\bin\*.*"
+  SetOutPath $INSTDIR\opt\octave\share
+  File /r "${ROOT}\opt\octave\share\*.*"
+  SetOutPath $INSTDIR\opt\octave\libexec
+  File /r "${ROOT}\opt\octave\libexec\*.*"
+  SetOutPath $INSTDIR\opt\octave\doc
+  File /r "${ROOT}\opt\octave\doc\*.*"
+  WriteUninstaller "$INSTDIR\uninstall.exe"
+
+  ;Write language to the registry (for the uninstaller)
+  WriteRegStr HKCU "Software\GNU Octave" "Installer Language" $LANGUAGE
+
+  ;File associations --- don't conflict with matlab's entries
+  ClearErrors
+  ReadRegStr $1 HKCR "" ".m"
+  StrCmp $1 "matfile" Matlab NoMatlab
+  NoMatlab:
+  WriteRegStr HKCR ".m" "" "octfile"
+  Matlab:
+  WriteRegStr HKCR "octfile" "" "Octave Script File"
+  WriteRegStr HKCR "octfile\DefaultIcon" "" "$INSTDIR\bin\octave.ico"
+  WriteRegStr HKCR "octfile\Shell\open\command" "" '"$WINDIR\notepad.exe" "%1"'
+
+  DetailPrint ";Cygwin's registry entries"
+  WriteRegStr HKLM \
+	"SOFTWARE\GNU Octave\Cygwin\mounts v2\/" "native" "$INSTDIR"
+  WriteRegDWORD HKLM \
+	"SOFTWARE\GNU Octave\Cygwin\mounts v2\/" "flags" "a"
+  WriteRegStr HKLM \
+	"SOFTWARE\GNU Octave\Cygwin\mounts v2\/usr/bin" "native" "$INSTDIR/bin"
+  WriteRegDWORD HKLM \
+	"SOFTWARE\GNU Octave\Cygwin\mounts v2\/usr/bin" "flags" "a"
+  WriteRegStr HKLM \
+	"SOFTWARE\GNU Octave\Cygwin\mounts v2\/usr/lib" "native" "$INSTDIR/lib"
+  WriteRegDWORD HKLM \
+	"SOFTWARE\GNU Octave\Cygwin\mounts v2\/usr/lib" "flags" "a"
+  WriteRegStr HKLM \
+	"SOFTWARE\GNU Octave\Cygwin\Program Options" "temp" "temp"
+  DeleteRegValue HKLM \
+	"SOFTWARE\GNU Octave\Cygwin\Program Options" "temp"
+
+  WriteRegStr HKU \
+	".DEFAULT\Software\GNU Octave\Cygwin\mounts v2\/" "native" "$INSTDIR"
+  WriteRegDWORD HKU \
+	".DEFAULT\Software\GNU Octave\Cygwin\mounts v2\/" "flags" "a"
+  WriteRegStr HKU \
+	".DEFAULT\Software\GNU Octave\Cygwin\mounts v2\/usr/bin" \
+	"native" "$INSTDIR/bin"
+  WriteRegDWORD HKU \
+	".DEFAULT\Software\GNU Octave\Cygwin\mounts v2\/usr/bin" "flags" "a"
+  WriteRegStr HKU \
+	".DEFAULT\Software\GNU Octave\Cygwin\mounts v2\/usr/lib" \
+	"native" "$INSTDIR/lib"
+  WriteRegDWORD HKU \
+	".DEFAULT\Software\GNU Octave\Cygwin\mounts v2\/usr/lib" "flags" "a"
+  WriteRegStr HKU \
+	".DEFAULT\Software\GNU Octave\Cygwin\Program Options" "temp" "temp"
+  DeleteRegValue HKU \
+	".DEFAULT\Software\GNU Octave\Cygwin\Program Options" "temp"
+
+  WriteRegStr HKCU \
+	"Software\GNU Octave\Cygwin\mounts v2\/" "cygdrive prefix" "/cygdrive"
+  WriteRegDWORD HKCU \
+	"Software\GNU Octave\Cygwin\mounts v2\/" "cygdrive flags" "22"
+  WriteRegStr HKCU \
+	"Software\GNU Octave\Cygwin\Program Options" "temp" "temp"
+  DeleteRegValue HKCU \
+	"Software\GNU Octave\Cygwin\Program Options" "temp"
+
+  ;Uninstaller registry entries
+  WriteRegStr HKLM \
+	"Software\Microsoft\Windows\CurrentVersion\Uninstall\GNU Octave" \
+	"DisplayName" "${MUI_PRODUCT}"
+  WriteRegStr HKLM \
+	"Software\Microsoft\Windows\CurrentVersion\Uninstall\GNU Octave" \
+	"DisplayIcon" "$INSTDIR\bin\octave.ico"
+  WriteRegStr HKLM \
+	"Software\Microsoft\Windows\CurrentVersion\Uninstall\GNU Octave" \
+	"UninstallString" "$INSTDIR\uninstall.exe"
+SectionEnd
+
+; Start menu shortcuts
+Section "$(TITLE_Section2)" Section2
+  CreateDirectory "$SMPROGRAMS\${MUI_PRODUCT}"
+  CreateShortCut $(UninstallLink) \
+	"$INSTDIR\uninstall.exe" "" "$INSTDIR\uninstall.exe" 0
+  CreateShortCut "$SMPROGRAMS\${MUI_PRODUCT}\${MUI_PRODUCT}.lnk" \
+	"$INSTDIR\bin\run.exe" "${OctaveStart}" "$INSTDIR\bin\octave.ico" 0
+  CreateShortCut $(ManualLink) \
+	"$INSTDIR\opt\octave\doc\octave_toc.html"
+  CreateShortCut $(RefcardLink) \
+	"$INSTDIR\opt\octave\doc\refcard-letter.pdf"
+  WriteINIStr $(FunctionLink) "InternetShortcut" "URL" \
+	"http://octave.sourceforge.net/index/index.html"
+  WriteINIStr $(EpstkLink) "InternetShortcut" "URL" \
+	"http://epstk.sourceforge.net/epstk/quickref/index.html"
+SectionEnd
+
+; Desktop shortcuts
+Section "$(TITLE_Section3)" Section3
+  CreateShortCut "$DESKTOP\${MUI_PRODUCT}.lnk" \
+	"$INSTDIR\bin\run.exe" "${OctaveStart}" "$INSTDIR\bin\octave.ico" 0
+SectionEnd
+
+; Make links to drives
+!include "DetectDrives.nsi"
+Function MakeDriveLink
+   StrCpy $R2 $R0 1
+   # FileOpen $R1 "$INSTDIR/drive.link" a
+   # FileSeek $R1 0 END
+   # FileWrite $R1 "ln -sf /cygdrive/$R2 /$R2"
+   # FileClose $R1
+   DetailPrint "ln -sf /cygdrive/$R2 /$R2"
+   # Shouldn't need PATH=/bin here, but if I don't then cygwin
+   # complains.  I don't know why it doesn't complain below
+   # in section -Local Config
+   Exec `$INSTDIR\bin\sh.exe -c "PATH=/bin ln -sf /cygdrive/$R2 /$R2"`
+FunctionEnd
+Section "-Make drive links"
+   # Delete "$INSTDIR/drive.link"
+   Push "All Local Drives"
+   Push $0
+   GetFunctionAddress $0 "MakeDriveLink"
+   Exch $0
+   Call DetectDrives
+   # Add commands to install_octave.sh to detect and evaluate drive.link
+SectionEnd
+
+; Post-installation configuration
+Section "-Local Config"
+  Exec "$INSTDIR\bin\sh.exe -e /bin/install_octave.sh"
+SectionEnd
+
+!insertmacro MUI_SECTIONS_FINISHHEADER
+
+Function .onInit
+  Push Tahoma
+  Push 8
+
+  ; Ask for language before doing anything else
+  !insertmacro MUI_LANGDLL_DISPLAY
+  Push 2F
+  LangDLL::LangDialog "Installer Language" "Please select a language."
+  Pop $LANGUAGE
+  StrCmp $LANGUAGE "cancel" 0 +2
+    Abort
+
+  ; We may be Intel-specific, especially if compiled against ATLAS.
+  ClearErrors
+  ReadRegStr $1 HKLM "HARDWARE\DESCRIPTION\System\CentralProcessor\0\" "VendorIdentifier"
+  StrCmp $1 "GenuineIntel" Continue0 Error0
+  Error0:
+    ; Language specific strings don't work in .onInit, so simulate the effect.
+    StrCpy $0 "${GenuineIntelEnglish}"
+    StrCmp $LANGUAGE ${LANG_SPANISH} 0 +2
+	StrCpy $0 "${GenuineIntelSpanish}"
+    MessageBox MB_OKCANCEL|MB_ICONEXCLAMATION $0 IDOK Continue0
+    Abort
+  Continue0:
+
+  ; Detect an existing Octave installation
+  ClearErrors
+  ReadRegDWORD $1 HKLM "SOFTWARE\GNU Octave\Cygwin\mounts v2\/" flags
+  IfErrors Continue1 Error1
+  Error1:
+    ; Language specific strings don't work in .onInit, so simulate the effect.
+    StrCpy $0 "${PreviousOctaveEnglish}"
+    StrCmp $LANGUAGE ${LANG_SPANISH} 0 +2
+	StrCpy $0 "${PreviousOctaveSpanish}"
+    MessageBox MB_OKCANCEL|MB_ICONEXCLAMATION $0 IDOK Continue1
+    Abort
+  Continue1:
+
+  ; Detect an existing Cygwin installation
+  ClearErrors
+  ReadRegDWORD $1 HKLM "SOFTWARE\Cygnus Solutions\Cygwin\mounts v2\/" flags
+  IfErrors Continue2 Error2
+  Error2:
+    ; Language specific strings don't work in .onInit, so simulate the effect.
+    StrCpy $0 "${PreviousCygwinEnglish}"
+    StrCmp $LANGUAGE ${LANG_SPANISH} 0 +2
+	StrCpy $0 "${PreviousCygwinSpanish}"
+    MessageBox MB_OKCANCEL|MB_ICONEXCLAMATION $0 IDOK Continue2
+    Abort
+  Continue2:
+
+FunctionEnd
+
+!insertmacro MUI_FUNCTIONS_DESCRIPTION_BEGIN
+!insertmacro MUI_DESCRIPTION_TEXT ${Section1} $(DESC_Section1)
+!insertmacro MUI_DESCRIPTION_TEXT ${Section2} $(DESC_Section2)
+!insertmacro MUI_DESCRIPTION_TEXT ${Section3} $(DESC_Section3)
+!insertmacro MUI_FUNCTIONS_DESCRIPTION_END
+
+Section "Uninstall"
+  ClearErrors
+
+  ; Clear file associations
+  ReadRegStr $1 HKCR "" ".m"
+  StrCmp $1 "octfile" NoMatlab Matlab
+  NoMatlab:
+  DeleteRegKey HKCR ".m"
+  Matlab:
+  DeleteRegKey HKCR "octfile\DefaultIcon"
+  DeleteRegKey HKCR "octfile\Shell\open\command"
+  DeleteRegKey HKCR "octfile"
+
+  ; Clean up registry
+  DeleteRegKey HKLM "SOFTWARE\GNU Octave"
+  DeleteRegKey HKU ".DEFAULT\Software\GNU Octave"
+  DeleteRegKey HKCU "Software\GNU Octave"
+  DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\GNU Octave"
+  ;; The following used value is now stored in GNU Octave, which is cleaned above.
+  ; DeleteRegKey HKCU "Software\${MUI_PRODUCT}" "Installer Language"
+
+  ; Clean up start menu
+  Delete "$DESKTOP\${MUI_PRODUCT}.lnk"
+  Delete "$SMPROGRAMS\${MUI_PRODUCT}\*.*"
+  Delete "$INSTDIR\*.*"
+  RMDir "$SMPROGRAMS\${MUI_PRODUCT}"
+
+  ; Clean up files
+  RMDir /r "$INSTDIR"
+
+  ;Display the Finish header
+  !insertmacro MUI_UNFINISHHEADER
+SectionEnd
+
+Function un.onInit
+  ;Get language from registry
+  ReadRegStr $LANGUAGE HKCU "Software\GNU Octave" "Installer Language"
+FunctionEnd
Binary file admin/Windows/cygwin/octave.ico has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/admin/Windows/cygwin/octave.nsi	Wed Jan 31 21:45:41 2007 +0000
@@ -0,0 +1,385 @@
+#
+# NSI script for octave windows
+# $Id$
+#
+
+# http://nsis.sourceforge.net/Docs
+# Sort out command line parameters
+
+!ifndef VERSION
+!error "Start MakeNSIS with /DVERSION=2.1.xx [/DMINOR=-yyyymmdd] [/DROOT=C:\cygwin] octave.nsi"
+!endif
+!ifndef MINOR
+!define MINOR ""
+!endif
+!ifndef ROOT
+!define ROOT "C:\cygwin"
+!endif
+
+; Product and version
+!include "MUI.nsh"
+!define MUI_PRODUCT "GNU Octave ${VERSION}"
+!define MUI_VERSION "${VERSION}${MINOR}"
+
+XPStyle on
+CrcCheck on
+	
+OutFile "octave-${MUI_VERSION}-inst.exe"
+Icon "octave.ico"
+UninstallIcon "octave.ico"
+
+;-------------------------------
+;Version Information
+
+VIProductVersion "${VERSION}.0"
+VIAddVersionKey "ProductName" "GNU Octave"
+VIAddVersionKey "FileVersion" "${VERSION}.0"
+VIAddVersionKey "LegalCopyright" "© John W. Eaton, et al."
+VIAddVersionKey "FileDescription" "Octave+octave-forge+gnuplot"
+
+# ****************** Localization ***********************
+; Translate the following strings into all the languages
+; that we support for the installer.  Some things may not
+; yet be translated.  Search for the following strings:
+;
+;    Spanish  ;ESP
+
+LoadLanguageFile "${NSISDIR}\Contrib\Language files\English.nlf"
+LoadLanguageFile "${NSISDIR}\Contrib\Language files\Spanish.nlf"
+
+; License data files --- put a translation of the GPL into
+; the root of the octave-forge tree.
+LicenseLangString LicenseFile ${LANG_ENGLISH} "..\..\COPYING.GPL"
+LicenseLangString LicenseFile ${LANG_SPANISH} "..\..\COPYING.GPL-spanish"
+
+;ESP
+LangString LicenseTextStr ${LANG_ENGLISH} "GNU Octave is free software released under the GNU Public License.  Read below for your rights:" 
+LangString LicenseTextStr ${LANG_SPANISH} "GNU Octave is free software released under the GNU Public License.  Read below for your rights:" 
+
+LangString ^ComponentsText ${LANG_ENGLISH} "${MUI_PRODUCT} Setup"
+LangString ^ComponentsText ${LANG_SPANISH} "Instalación de ${MUI_PRODUCT}"
+
+LangString installcaption ${LANG_ENGLISH} "${MUI_PRODUCT} Setup"
+LangString installcaption ${LANG_SPANISH} "Instalación de ${MUI_PRODUCT}"
+
+LangString uninstcaption ${LANG_ENGLISH} "Uninstall ${MUI_PRODUCT}"
+LangString uninstcaption ${LANG_SPANISH} "Desintalar de ${MUI_PRODUCT}"
+
+LangString TITLE_Section1 ${LANG_ENGLISH} "${MUI_PRODUCT}"
+LangString TITLE_Section1 ${LANG_SPANISH} "${MUI_PRODUCT}"
+
+LangString DESC_Section1 ${LANG_ENGLISH} "Install the ${MUI_PRODUCT} for Windows binary distribution including gnuplot, epstk and the octave-forge extensions."
+LangString DESC_Section1 ${LANG_SPANISH} "Instalar la version ejecutable the ${MUI_PRODUCT} para Windows la cual incluye gnuplot, epstk y las extensiones de octave-forge."
+
+LangString TITLE_Section2 ${LANG_ENGLISH} "Start Menu Icons"
+LangString TITLE_Section2 ${LANG_SPANISH} "Iconos de Menú de Inicio"
+
+LangString DESC_Section2 ${LANG_ENGLISH} "Add a ${MUI_PRODUCT} folder to the Start Menu."
+LangString DESC_Section2 ${LANG_SPANISH} "Agregar una carpeta de ${MUI_PRODUCT} al Menú de Inicio."
+
+LangString TITLE_Section3 ${LANG_ENGLISH} "Desktop Icons"
+LangString TITLE_Section3 ${LANG_SPANISH} "Iconos de Escritorio"
+
+LangString DESC_Section3 ${LANG_ENGLISH} "Add a ${MUI_PRODUCT} icon to the Desktop."
+LangString DESC_Section3 ${LANG_SPANISH} "Agregar un icono de ${MUI_PRODUCT} al Escritorio."
+
+LangString UninstallLink ${LANG_ENGLISH} "$SMPROGRAMS\${MUI_PRODUCT}\Uninstall ${MUI_PRODUCT}.lnk"
+LangString UninstallLink ${LANG_SPANISH} "$SMPROGRAMS\${MUI_PRODUCT}\Desinstalar ${MUI_PRODUCT}.lnk"
+
+LangString ManualLink ${LANG_ENGLISH} "$SMPROGRAMS\${MUI_PRODUCT}\${MUI_PRODUCT} Manual (HTML).lnk"
+LangString ManualLink ${LANG_SPANISH} "$SMPROGRAMS\${MUI_PRODUCT}\Manual de ${MUI_PRODUCT} (HTML).lnk"
+
+LangString FunctionLink ${LANG_ENGLISH} "$SMPROGRAMS\${MUI_PRODUCT}\OctaveForge Quick Reference (HTML).url"
+LangString FunctionLink ${LANG_SPANISH} "$SMPROGRAMS\${MUI_PRODUCT}\Refencia Rápida de OctaveForge (HTML).url"
+
+LangString EpstkLink ${LANG_ENGLISH} "$SMPROGRAMS\${MUI_PRODUCT}\Epstk Manual (HTML).url"
+LangString EpstkLink ${LANG_SPANISH} "$SMPROGRAMS\${MUI_PRODUCT}\Manual de Epstk (HTML).url"
+
+LangString RefcardLink ${LANG_ENGLISH} "$SMPROGRAMS\${MUI_PRODUCT}\${MUI_PRODUCT} Quick Reference (PDF).lnk"
+LangString RefcardLink ${LANG_SPANISH} "$SMPROGRAMS\${MUI_PRODUCT}\Refencia Rápida de ${MUI_PRODUCT} (PDF).lnk"
+
+;ESP
+LangString PreviousCygwin ${LANG_ENGLISH} "A previous installation of cygwin was detected. To use this package from the cygwin system, mount the install directory as /opt/octave-${VERSION}."
+LangString PreviousCygwin ${LANG_SPANISH} "Se detectó una versión de cygwin instalada. Este paquete no fue diseñado para funcionar dentro de un ambiente de cygwin. Presione Aceptar si desea continuar o Cancelar si desea detener el preceso de instalación."
+
+LangString PreviousOctave ${LANG_ENGLISH} "A previous version of Octave ${VERSION} for Windows was detected. Please uninstall any previous version before running this installer. Click OK if you want to continue anyway or CANCEL if you want to abort the installation process."
+LangString PreviousOctave ${LANG_SPANISH} "Se detectó una versión anterior de Octave ${VERSION} para Windows. Por favor desinstale cualquier versión anterior antes de ejecutar este instalador. Presione Aceptar si desea continuar o Cancelar si desea detener el proceso de instalación."
+
+LangString GenuineIntel ${LANG_ENGLISH} "This version of Octave for Windows is optimized for Intel x86 processors and is known to cause troubles with other architectures. Click OK if you want to continue anyway or CANCEL if you want to abort the installation process."
+LangString GenuineIntel ${LANG_SPANISH} "Esta versión de Octave para Windows ha sido optimizada para procesadores Intel x86 y puede no funcionar correctamente sobre otros procesadores. Presione Aceptar si desea continuar o Cancelar si desea detener el proceso de instalación."
+
+;ESP
+LangString Donation ${LANG_ENGLISH} "Octave needs your support!  Please donate to the University of Wisconsin Foundation, dedicated as follows:"
+LangString Donation ${LANG_SPANISH} "Octave needs your support!  Please donate to the University of Wisconsin Foundation, dedicated as follows:"
+
+; This function is for choosing languages.  If you add
+; a new language, you will need to add the name of the
+; language to this function in order for the user to
+; select it.
+Function ChooseLanguage
+  Push ""
+  Push ${LANG_ENGLISH}
+  Push "English"
+  Push ${LANG_SPANISH}
+  Push "Español"
+  Push A ; A means auto count languages
+  ; for the auto count to work the first empty push (Push "") must remain
+  LangDLL::LangDialog "Installer Language" "Please select the language of the installer"
+  Pop $LANGUAGE
+  StrCmp "$LANGUAGE" "cancel" Cancel
+  Return
+  Cancel:
+  Abort
+FunctionEnd
+
+Function .onInit
+  Push Tahoma
+  Push 8
+  Call ChooseLanguage
+FunctionEnd
+
+# ****************** End Localization ***********************
+
+LicenseText $(LicenseTextStr) $(^NextBtn)
+LicenseData $(LicenseFile)
+Name "${MUI_PRODUCT}"
+Caption $(installcaption)
+UninstallCaption $(uninstcaption)
+
+; Page structure
+!include "MUI.nsh"
+Page license BeforeFirstPage
+Page components
+Page directory
+Page instfiles
+PageEx license
+  LicenseText $(Donation) $(^CloseBtn)
+  LicenseData donation.txt
+PageExEnd
+UninstPage uninstConfirm
+UninstPage instfiles
+
+; Section descriptions
+!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
+!insertmacro MUI_DESCRIPTION_TEXT Section1 $(DESC_Section1)
+!insertmacro MUI_DESCRIPTION_TEXT Section2 $(DESC_Section2)
+!insertmacro MUI_DESCRIPTION_TEXT Section3 $(DESC_Section3)
+!insertmacro MUI_FUNCTION_DESCRIPTION_END
+
+; This is the command to start octave.
+!define OctaveStart "rxvt.exe --keysym.0xFF50 '^a' --keysym.0xFF57 '^e' --keysym.0xFFFF '^f^h' -tn linux -title '${MUI_PRODUCT}' -geometry 80x25 -e /bin/sh  /opt/octave-${VERSION}/bin/start_octave.sh"
+
+!define OCTKEY "GNUOctave ${VERSION}"
+!define CYGKEY "${OCTKEY}\Cygwin"
+!define MOUNTKEY "${CYGKEY}\mounts v2"
+
+InstallDir "$PROGRAMFILES\${MUI_PRODUCT}"
+
+; Files and registry keys
+Section !$(TITLE_Section1) Section1
+
+  CreateDirectory $INSTDIR\tmp
+  CreateDirectory $INSTDIR\octave_files
+  CreateDirectory $INSTDIR\cygwin
+  CreateDirectory $INSTDIR\bin
+  CreateDirectory $INSTDIR\base
+  CreateDirectory $INSTDIR\site
+  SetOutPath $INSTDIR\cygwin
+  File "${ROOT}\cygwin\*.*"
+  SetOutPath $INSTDIR\bin
+  File install_octave.sh start_octave.sh
+  File octave.ico
+  File /r ${ROOT}\bin\*.*
+  SetOutPath $INSTDIR\base
+  File /r ${ROOT}\base\*.*
+  SetOutPath $INSTDIR\site
+  File /r ${ROOT}\site\*.*
+  SetOutPath $INSTDIR\doc
+  File /r ${ROOT}\doc\*.*
+  WriteUninstaller "$INSTDIR\uninstall.exe"
+
+  ;Write language to the registry (for the uninstaller)
+  WriteRegStr HKCU "Software\${OCTKEY}" "Installer Language" $LANGUAGE
+
+  ;File associations --- don't conflict with matlab's entries
+  ClearErrors
+  ReadRegStr $1 HKCR "" ".m"
+  StrCmp $1 "matfile" Matlab NoMatlab
+  NoMatlab:
+  DetailPrint ";File associations for .m files"
+  WriteRegStr HKCR ".m" "" "octfile"
+  WriteRegStr HKCR "octfile" "" "Octave Script File"
+  WriteRegStr HKCR "octfile\DefaultIcon" "" "$INSTDIR\bin\octave.ico"
+  WriteRegStr HKCR "octfile\Shell\open\command" "" '"$WINDIR\notepad.exe" "%1"'
+  Matlab:
+
+  DetailPrint ";Cygwin's registry entries"
+  WriteRegStr HKLM \
+	"SOFTWARE\${MOUNTKEY}\/" "native" "$INSTDIR"
+  WriteRegDWORD HKLM \
+	"SOFTWARE\${MOUNTKEY}\/" "flags" "a"
+  WriteRegStr HKLM \
+	"SOFTWARE\${MOUNTKEY}\/bin" "native" "$INSTDIR/cygwin"
+  WriteRegDWORD HKLM \
+	"SOFTWARE\${MOUNTKEY}\/bin" "flags" "rx"
+  WriteRegStr HKLM \
+	"SOFTWARE\${MOUNTKEY}\/opt/octave-${VERSION}" "native" "$INSTDIR"
+  WriteRegDWORD HKLM \
+	"SOFTWARE\${MOUNTKEY}\/opt/octave-${VERSION}" "flags" "a"
+  WriteRegStr HKLM \
+	"SOFTWARE\${CYGKEY}\Program Options" "temp" "temp"
+  DeleteRegValue HKLM \
+	"SOFTWARE\${CYGKEY}\Program Options" "temp"
+
+  WriteRegStr HKU \
+	".DEFAULT\Software\${MOUNTKEY}\/" "native" "$INSTDIR"
+  WriteRegDWORD HKU \
+	".DEFAULT\Software\${MOUNTKEY}\/" "flags" "a"
+  WriteRegStr HKU \
+	".DEFAULT\Software\${MOUNTKEY}\/bin" "native" "$INSTDIR/cygwin"
+  WriteRegDWORD HKU \
+	".DEFAULT\Software\${MOUNTKEY}\/bin" "flags" "rx"
+  WriteRegStr HKU \
+	".DEFAULT\Software\${MOUNTKEY}\/opt/octave-${VERSION}" \
+	"native" "$INSTDIR"
+  WriteRegDWORD HKU \
+	".DEFAULT\Software\${MOUNTKEY}\/opt/octave-${VERSION}" "flags" "a"
+  WriteRegStr HKU \
+	".DEFAULT\Software\${CYGKEY}\Program Options" "temp" "temp"
+  DeleteRegValue HKU \
+	".DEFAULT\Software\${CYGKEY}\Program Options" "temp"
+
+  WriteRegStr HKCU \
+	"Software\${MOUNTKEY}\/" "cygdrive prefix" "/cygdrive"
+  WriteRegDWORD HKCU \
+	"Software\${MOUNTKEY}\/" "cygdrive flags" "22"
+  WriteRegStr HKCU \
+	"Software\${CYGKEY}\Program Options" "temp" "temp"
+  DeleteRegValue HKCU \
+	"Software\${CYGKEY}\Program Options" "temp"
+
+  ;Uninstaller registry entries
+  WriteRegStr HKLM \
+	"Software\Microsoft\Windows\CurrentVersion\Uninstall\${OCTKEY}" \
+	"DisplayName" "${MUI_PRODUCT}"
+  WriteRegStr HKLM \
+	"Software\Microsoft\Windows\CurrentVersion\Uninstall\${OCTKEY}" \
+	"DisplayIcon" "$INSTDIR\bin\octave.ico"
+  WriteRegStr HKLM \
+	"Software\Microsoft\Windows\CurrentVersion\Uninstall\${OCTKEY}" \
+	"UninstallString" "$INSTDIR\uninstall.exe"
+SectionEnd
+
+; Start menu shortcuts
+Section !$(TITLE_Section2) Section2
+  CreateDirectory "$SMPROGRAMS\${MUI_PRODUCT}"
+  CreateShortCut $(UninstallLink) \
+	"$INSTDIR\uninstall.exe" "" "$INSTDIR\uninstall.exe" 0
+  CreateShortCut "$SMPROGRAMS\${MUI_PRODUCT}\${MUI_PRODUCT}.lnk" \
+	"$INSTDIR\bin\run.exe" "${OctaveStart}" "$INSTDIR\bin\octave.ico" 0
+  CreateShortCut $(ManualLink) \
+	"$INSTDIR\opt\octave\doc\octave_toc.html"
+  CreateShortCut $(RefcardLink) \
+	"$INSTDIR\opt\octave\doc\refcard-letter.pdf"
+  WriteINIStr $(FunctionLink) "InternetShortcut" "URL" \
+	"http://octave.sourceforge.net/index/index.html"
+  WriteINIStr $(EpstkLink) "InternetShortcut" "URL" \
+	"http://epstk.sourceforge.net/epstk/quickref/index.html"
+SectionEnd
+
+; Desktop shortcuts
+Section !$(TITLE_Section3) Section3
+  CreateShortCut "$DESKTOP\${MUI_PRODUCT}.lnk" \
+	"$INSTDIR\bin\run.exe" "${OctaveStart}" "$INSTDIR\bin\octave.ico" 0
+SectionEnd
+
+!ifdef SKIP
+; Make links to drives
+!include "DetectDrives.nsi"
+Function MakeDriveLink
+   StrCpy $R2 $R0 1
+   DetailPrint "ln -sf /cygdrive/$R2 /$R2"
+   # Need PATH=/bin here because the default path is the windows path.
+   # We could try running $INSTDIR\bin\ln.exe directly.
+   Exec `$INSTDIR\bin\sh.exe -c "PATH=/bin /bin/ln.exe -sf /cygdrive/$R2 /$R2"`
+FunctionEnd
+Section "-Make drive links"
+   Push "All Local Drives"
+   Push $0
+   GetFunctionAddress $0 "MakeDriveLink"
+   Exch $0
+   Call DetectDrives
+SectionEnd
+!endif
+
+; Post-installation configuration
+Section "-Local Config"
+  Exec "$INSTDIR\bin\run.exe rxvt -e /opt/octave-${VERSION}/bin/install_octave.sh"
+SectionEnd
+
+; Tests which are done before the first page, but can't
+; be done in .onInit since LangString variables do not 
+; work in the .onInit function.
+Function BeforeFirstPage
+  ; We may be Intel-specific, especially if compiled against ATLAS.
+  ClearErrors
+  ReadRegStr $1 HKLM "HARDWARE\DESCRIPTION\System\CentralProcessor\0\" "VendorIdentifier"
+  StrCmp $1 "GenuineIntel" Continue0
+  MessageBox MB_OKCANCEL|MB_ICONEXCLAMATION $(GenuineIntel) /SD IDOK IDOK Continue0
+  Quit
+  Continue0:
+
+  ; Detect an existing Octave installation
+  ClearErrors
+  EnumRegKey $1 HKLM "SOFTWARE\${MOUNTKEY}\\" 0
+  StrCmp $1 "" Continue1
+  MessageBox MB_OKCANCEL|MB_ICONEXCLAMATION $(PreviousOctave) /SD IDOK IDOK Continue1
+  Quit
+  Continue1:
+
+  ; Detect an existing Cygwin installation
+  ClearErrors
+  EnumRegKey $1 HKLM "SOFTWARE\Cygnus Solutions\Cygwin" 0
+  StrCmp $1 "" Continue2
+  MessageBox MB_OKCANCEL|MB_ICONEXCLAMATION $(PreviousCygwin) /SD IDOK IDOK Continue2
+  Quit
+  Continue2:
+FunctionEnd
+
+Section "Uninstall"
+  ClearErrors
+
+  ; Clear file associations
+  ReadRegStr $1 HKCR "" ".m"
+  StrCmp $1 "octfile" NoMatlab Matlab
+  NoMatlab:
+  DeleteRegKey HKCR ".m"
+  Matlab:
+  DeleteRegKey HKCR "octfile\DefaultIcon"
+  DeleteRegKey HKCR "octfile\Shell\open\command"
+  DeleteRegKey HKCR "octfile"
+
+  ; Clean up registry
+  DeleteRegKey HKLM "SOFTWARE\${OCTKEY}"
+  DeleteRegKey HKU ".DEFAULT\Software\${OCTKEY}"
+  DeleteRegKey HKCU "Software\${OCTKEY}"
+  DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${OCTKEY}"
+  ;; The following used value is now stored in GNU Octave, which is cleaned above.
+  ; DeleteRegKey HKCU "Software\${MUI_PRODUCT}" "Installer Language"
+
+  ; Clean up start menu
+  Delete "$DESKTOP\${MUI_PRODUCT}.lnk"
+  Delete "$SMPROGRAMS\${MUI_PRODUCT}\*.*"
+  Delete "$INSTDIR\*.*"
+  RMDir "$SMPROGRAMS\${MUI_PRODUCT}"
+
+  ; Clean up files
+  RMDir /r "$INSTDIR"
+
+  ;Display the Finish header 
+SectionEnd
+
+Function un.onInit
+  ;Get language from registry
+  ReadRegStr $LANGUAGE HKCU "Software\${OCTKEY}" "Installer Language"
+FunctionEnd
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/admin/Windows/cygwin/start_octave.sh	Wed Jan 31 21:45:41 2007 +0000
@@ -0,0 +1,11 @@
+#!/bin/sh
+# This script is executed under sh.exe to start octave
+# $Id$
+export PATH="/bin:$PATH"
+export HOME="/octave_files"
+export PS_VIEWER=
+export EDITOR=notepad
+cd "$HOME"
+#ulimit -c 0 # no core files
+octave.exe
+rm -f /tmp/*
--- a/admin/Windows/donation.txt	Wed Jan 31 15:26:28 2007 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,6 +0,0 @@
-http://www.uwfoundation.wisc.edu/index.html
-
-  I/we wish to support ongoing development of the Octave modeling 
-  language, under the supervision of Professor James B. Rawlings and 
-  Dr. John W. Eaton of the Department of Chemical and Biological 
-  Engineering at the University of Wisconsin-Madison.
\ No newline at end of file
--- a/admin/Windows/install_octave.sh	Wed Jan 31 15:26:28 2007 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,143 +0,0 @@
-#!/bin/sh
-export PATH="/bin:$PATH"
-
-echo '                Welcome to Octave'
-echo
-echo
-echo 'Octave has been successfully installed on your computer.'
-echo 'At this point the software will customize the octave'
-echo 'installation for your machine.'
-echo
-
-echo 'STEP 1'
-echo
-echo 'There is no step one for now.'
-echo
-#echo 'Octave has been optimized for various computer architectures.'
-#echo 'The following optimized versions of octave are available:'
-#echo
-#
-#maxchoice=0;
-#for oct in /bin/octave-2.*.*-*atlas.exe ; do 
-#    maxchoice=`expr $maxchoice + 1`;
-#    echo "$maxchoice: "`basename $oct .exe` ; 
-#done
-#
-#if [ "$maxchoice" = "1" ] ; then
-#    echo "Selecting default octave version: $oct";
-#    choice=1;
-#else
-#    choice=-1;
-#fi
-#
-#while [ "$choice" -lt 1 -o "$choice" -gt $maxchoice ] ; do
-#    echo -n 'Choose which version to install:'
-#    read choice;
-#done
-#
-#idx=0 ;
-#for oct in /bin/octave-2.*.*-*atlas.exe ; do 
-#    idx=`expr $idx + 1`;
-#    if [ "$idx" = "$choice" ] ; then
-#        ln -sf $oct /bin/octave.exe ;
-#    else
-#        rm $oct;
-#    fi
-#done
-
-echo
-echo 'STEP 2'
-echo
-#echo 'Setting links to your active drives'
-#echo 'you will be able to access C: as /C from octave'
-
-#for drive in A B C D E F G H I J K L M N O P Q R S T U V W X Y Z ; do
-#    drvmsg=`cmd /c vol $drive: 2>&1 | sed -e'
-#            1d
-#           s/.*system cannot find.*/NOTOK/'`;
-#    if [ "$drvmsg" = "NOTOK" ] ; then
-#    else 
-#        echo "Creating link to drive $drive:";
-#        ln -sf /cygdrive/$drive /$drive ;
-#    fi
-#done
-
-echo
-echo 'Setting links to your oct-files'
-echo
-
-(cd /opt/octave*/bin && ./mklinks.sh)
-(cd /opt/octave*/base/oct && ./mklinks.sh)
-(cd /opt/octave*/site/oct/octave-forge && ./mklinks.sh)
-
-echo
-echo 'STEP 3'
-echo
-echo 'Set Editor used by the "edit" command'
-echo 'The default is currently "notepad"'
-echo 'If you wish to use a different editor, enter the path and'
-echo 'filename here'
-echo
-
-echo -n "Editor (currently notepad)> ";
-read neweditor
-if [ -z "$neweditor" ] ; then
-    neweditor=notepad
-fi
-
-echo "Installing editor $neweditor into start_octave.sh"
-soct="start_octave.sh"
-sed -e"s! EDITOR=.*! EDITOR=\'$neweditor\'!" /bin/$soct > /tmp/$soct
-mv /tmp/$soct /bin/$soct 
-
-echo
-echo 'STEP 4'
-echo
-echo 'In order to use the epstk graphics functions, you'
-echo 'need to have a postscript interpreter. This would'
-echo 'typically be gswin or ghostscript'
-echo
-
-# get the program associated for ps file types
-psassoc=`cmd /c assoc .ps | sed -e's/.ps=//'`;
-if [ -n "$psassoc" ] ; then
-    psfile=`cmd /c ftype $psassoc | sed -e"
-            s/$psassoc=//
-            s/^\"//
-            s/\" *\"%1\"//
-            "`;
-fi
-
-if [ -f "$psfile" ] ; then
-    echo "The program associated with ps files is $psfile"
-    echo "To accept this program type return, otherwise,"
-    echo "enter the full path of the desired ps viewer program"
-else
-    echo "No program is currently associated with ps files"
-    echo "If you have such a program installed, enter the"
-    echo "full path to the executable, otherwise type return"
-fi
-
-echo -n "New PS viewer> ";
-read newpsfile
-if [ -n "$newpsfile" ] ; then
-    psfile=$newpsfile;
-fi
-if [ -n "$psfile" ] ; then
-    psfile=`cygpath -msa "$psfile"`
-fi
-
-echo "Installing PS viewer at $psfile into start_octave.sh"
-soct="start_octave.sh"
-sed -e"s!export PS_VIEWER=!&\"$psfile\"!" /bin/$soct > /tmp/$soct
-mv /tmp/$soct /bin/$soct 
-
-
-
-echo
-echo "COMPLETE"
-echo
-echo "Configuration of octave is now complete"
-echo "Press <return> key to continue"
-echo
-read choice
--- a/admin/Windows/mkdll.sh	Wed Jan 31 15:26:28 2007 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,71 +0,0 @@
-#! /bin/sh
-
-test $# -eq 0 && cat <<EOF && exit 1
-mkdll.sh libarchive.a [outname.dll [outlib.lib]]
-
-Converts a static library to a DLL plus a LIB for linking
-to that DLL.  By default the output name is archive.
-
-This routine goes to considerable trouble to protect
-against object files of the same name in different
-subdirectories.
-EOF
-
-# Get full path to archive name
-archive="$1"
-test "${archive#/}" = "$archive" && archive="`pwd`/$archive"
-test ! -f "$archive" && echo "$archive does not exist" && exit -1 
-
-# Get base name from /path/libbase.a
-base="${archive##*/}"; base="${base#lib}"; base="${base%.a}"
-
-# Determine dll and lib names, or default them from base
-if test $# -gt 1 ; then
-  dll="$2"
-  if test $# -gt 2 ; then
-    lib="$3"
-  else
-    lib="${dll%.dll}.lib"
-  fi
-else
-  dll="$base.dll"
-  lib="$base.lib"
-fi
-
-# Create a temporary directory for building the archive
-test -e "/tmp/$base-dll" && echo "/tmp/$base-dll exists...remove it" && exit 1
-mkdir "/tmp/$base-dll"
-
-# extract the archive to a working directory
-dir="`pwd`"
-work="/tmp/$base-dll"
-(cd "$work" && ar x "$archive")
-
-# duplicate filenames in the archive need to be extracted individually 
-dups=`ar t "$archive" | sort | uniq -c | grep -v '^ *1[^0-9]'`
-even=0
-cd "$work"
-mkdir dups
-for x in 0 junk $dups; do
-    if test $even -eq 0; then 
-	n=$x
-	even=1
-    else
-	while test $n -gt 1; do
-	    n=`expr $n - 1`
-	    echo "extracting $x-$n"
-	    (cd dups && ar xN $n "$archive" $x)
-	    mv dups/$x $x-$n
-	done
-	even=0
-    fi
-done
-rmdir dups
-
-# Build the dll
-cd "$dir"
-gcc -shared "-o$dll" "-Wl,--out-implib,$lib" $work/*
-
-# A little bit of cleanup
-rm -f $work/*
-rmdir $work
--- a/admin/Windows/mkstdc++dll.sh	Wed Jan 31 15:26:28 2007 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,33 +0,0 @@
-#! /bin/sh
-
-# This script builds stdc++.dll and the corresponding libstdc++.dll.a.
-# Now you have two choices:
-#
-# (1) Put libstdc++.dll.a into /usr/lib.  Now all g++ will link shared 
-#     to stdc++.dll by default, but you can override it by adding
-#     -static to your link line.  You should put stdc++.dll into /usr/bin
-#     if you do this, and be sure to include it with any executables
-#     that you distribute.
-#
-# (2) Put libstdc++.dll.a into a private lib directory.  All g++ will
-#     continue to link statically by default, but you can override it
-#     by adding -Lpath_to_private_libs to your link line.  You should
-#     install stdc++.dll into the directory containing the executable,
-#     and be sure to include it with any executables that you distribute.
-#
-# Older versions of cygwin (but not too old) require the flag 
-#    -Wl,--enable-runtime-pseudo-reloc
-# to link against stdc++.dll.  As of this writing, this is no
-# longer required.
-#
-# Paul Kienzle
-# 2003-07-17
-
-mkdir buildc++
-cd buildc++
-ar x /usr/lib/libstdc++.a
-gcc -shared -o../stdc++.dll \
-	-Wl,--enable-auto-image-base,--out-implib,../libstdc++.dll.a *.o
-cd ..
-rm -rf buildc++
-strip stdc++.dll
--- a/admin/Windows/octave-install-win32.nsi	Wed Jan 31 15:26:28 2007 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,356 +0,0 @@
-#
-# NSI script for octave windows
-# $Id$
-#
-
-# http://nsis.sourceforge.net/Docs
-
-# Sort out command line parameters
-
-!ifndef VERSION
-!error "Start MakeNSIS with /DVERSION=2.1.xx [/DMINOR=-yyyymmdd] [/DROOT=C:\cygwin] octave.nsi"
-!endif
-!ifndef MINOR
-!define MINOR ""
-!endif
-!ifndef ROOT
-!define ROOT "C:\cygwin"
-!endif
-
-# Product and version
-!define MUI_PRODUCT "GNU Octave ${VERSION}"
-!define MUI_VERSION "${VERSION}${MINOR}"
-
-
-!define STARTMENU
-
-!include "${NSISDIR}\Contrib\Modern UI\System.nsh"
-
-!define MUI_LICENSEPAGE
-!define MUI_COMPONENTSPAGE
-!define MUI_DIRECTORYPAGE
-
-!define MUI_ABORTWARNING
-
-!define MUI_UNINSTALLER
-!define MUI_UNCONFIRMPAGE
-
-!insertmacro MUI_LANGUAGE "English"
-!insertmacro MUI_LANGUAGE "Spanish"
-
-CrcCheck On
-
-OutFile "octave-${MUI_VERSION}-inst.exe"
-#Icon "octave.ico"
-#UninstallIcon "octave.ico"
-
-# ****************** Localization ***********************
-
-LicenseData /LANG=${LANG_ENGLISH} "..\..\COPYING.GPL"
-LicenseData /LANG=${LANG_SPANISH} "..\..\COPYING.GPL-spanish"
-
-; The default caption is a language dependent string saying
-;     ${MUI_PRODUCT} ${VERSION} Setup
-; Since our ${MUI_PRODUCT} includes ${VERSION}, we need to
-; set the caption by hand for each of our languages.
-Caption /LANG=${LANG_ENGLISH} "${MUI_PRODUCT} Setup"
-Caption /LANG=${LANG_SPANISH} "Instalación de ${MUI_PRODUCT}"
-
-UninstallCaption /LANG=${LANG_ENGLISH} "Uninstall ${MUI_PRODUCT}"
-UninstallCaption /LANG=${LANG_SPANISH} "Desinstalar ${MUI_PRODUCT}"
-
-LangString TITLE_Section1 ${LANG_ENGLISH} "${MUI_PRODUCT}"
-LangString TITLE_Section1 ${LANG_SPANISH} "${MUI_PRODUCT}"
-
-LangString TITLE_Section2 ${LANG_ENGLISH} "Start Menu Icons"
-LangString TITLE_Section2 ${LANG_SPANISH} "Iconos de Menú de Inicio"
-
-LangString TITLE_Section3 ${LANG_ENGLISH} "Desktop Icons"
-LangString TITLE_Section3 ${LANG_SPANISH} "Iconos de Escritorio"
-
-LangString DESC_Section1 ${LANG_ENGLISH} "Install the ${MUI_PRODUCT} for Windows binary distribution including gnuplot, epstk and the octave-forge extensions."
-LangString DESC_Section1 ${LANG_SPANISH} "Instalar la version ejecutable the ${MUI_PRODUCT} para Windows la cual incluye gnuplot, epstk y las extensiones de octave-forge."
-
-LangString DESC_Section2 ${LANG_ENGLISH} "Add a ${MUI_PRODUCT} folder to the Start Menu."
-LangString DESC_Section2 ${LANG_SPANISH} "Agregar una carpeta de ${MUI_PRODUCT} al Menú de Inicio."
-
-LangString DESC_Section3 ${LANG_ENGLISH} "Add a ${MUI_PRODUCT} icon to the Desktop."
-LangString DESC_Section3 ${LANG_SPANISH} "Agregar un icono de ${MUI_PRODUCT} al Escritorio."
-
-LangString UninstallLink ${LANG_ENGLISH} "$SMPROGRAMS\${MUI_PRODUCT}\Uninstall ${MUI_PRODUCT}.lnk"
-LangString UninstallLink ${LANG_SPANISH} "$SMPROGRAMS\${MUI_PRODUCT}\Desinstalar ${MUI_PRODUCT}.lnk"
-
-LangString ManualLink ${LANG_ENGLISH} "$SMPROGRAMS\${MUI_PRODUCT}\${MUI_PRODUCT} Manual (HTML).lnk"
-LangString ManualLink ${LANG_SPANISH} "$SMPROGRAMS\${MUI_PRODUCT}\Manual de ${MUI_PRODUCT} (HTML).lnk"
-
-LangString FunctionLink ${LANG_ENGLISH} "$SMPROGRAMS\${MUI_PRODUCT}\OctaveForge Quick Reference (HTML).url"
-LangString FunctionLink ${LANG_SPANISH} "$SMPROGRAMS\${MUI_PRODUCT}\Refencia Rápida de OctaveForge (HTML).url"
-
-LangString EpstkLink ${LANG_ENGLISH} "$SMPROGRAMS\${MUI_PRODUCT}\Epstk Manual (HTML).url"
-LangString EpstkLink ${LANG_SPANISH} "$SMPROGRAMS\${MUI_PRODUCT}\Manual de Epstk (HTML).url"
-
-LangString RefcardLink ${LANG_ENGLISH} "$SMPROGRAMS\${MUI_PRODUCT}\${MUI_PRODUCT} Quick Reference (PDF).lnk"
-LangString RefcardLink ${LANG_SPANISH} "$SMPROGRAMS\${MUI_PRODUCT}\Refencia Rápida de ${MUI_PRODUCT} (PDF).lnk"
-
-; The following strings are used by "Function .onInit".  If you are
-; adding a new language, be sure to add new tests therein, otherwise
-; the English language messages will be used.
-
-!define PreviousCygwinEnglish "A previous installation of cygwin was detected. This package is not to be used from within a cygwin enviroment. Click OK if you want to continue anyway or CANCEL if you want to abort the installation process."
-!define PreviousCygwinSpanish "Se detectó una versión de cygwin instalada. Este paquete no fue diseñado para funcionar dentro de un ambiente de cygwin. Presione Aceptar si desea continuar o Cancelar si desea detener el preceso de instalación."
-
-!define PreviousOctaveEnglish "A previous version of Octave for Windows was detected. Please uninstall any previous version before running this installer. Click OK if you want to continue anyway or CANCEL if you want to abort the installation process."
-!define PreviousOctaveSpanish "Se detectó una versión anterior de Octave para Windows. Por favor desinstale cualquier versión anterior antes de ejecutar este instalador. Presione Aceptar si desea continuar o Cancelar si desea detener el proceso de instalación."
-
-!define GenuineIntelEnglish "This version of Octave for Windows is optimized for Intel x86 processors and is known to cause troubles with other architectures. Click OK if you want to continue anyway or CANCEL if you want to abort the installation process."
-!define GenuineIntelSpanish "Esta versión de Octave para Windows ha sido optimizada para procesadores Intel x86 y puede no funcionar correctamente sobre otros procesadores. Presione Aceptar si desea continuar o Cancelar si desea detener el proceso de instalación."
-
-# ****************** End Localization ***********************
-
-# This is the command to start octave.
-!define OctaveStart "rxvt.exe --keysym.0xFF50 '^a' --keysym.0xFF57 '^e' --keysym.0xFFFF '^f^h' -fn 'Lucida Console-12' -tn linux -title '${MUI_PRODUCT}' -geometry 80x25 -sl 400 -sr -e /bin/start_octave.sh"
-
-
-InstallDir "$PROGRAMFILES\${MUI_PRODUCT}"
-
-; Files and registry keys
-Section $(TITLE_Section1) Section1
-
-  CreateDirectory $INSTDIR\tmp
-  CreateDirectory $INSTDIR\octave_files
-  SetOutPath $INSTDIR\bin
-  File "${ROOT}\opt\octave-support\*.*"
-  File install_octave.sh start_octave.sh
-  File octave.ico
-  File "${ROOT}\opt\octave\bin\*.*"
-  SetOutPath $INSTDIR\opt\octave\share
-  File /r "${ROOT}\opt\octave\share\*.*"
-  SetOutPath $INSTDIR\opt\octave\libexec
-  File /r "${ROOT}\opt\octave\libexec\*.*"
-  SetOutPath $INSTDIR\opt\octave\doc
-  File /r "${ROOT}\opt\octave\doc\*.*"
-  WriteUninstaller "$INSTDIR\uninstall.exe"
-
-  ;Write language to the registry (for the uninstaller)
-  WriteRegStr HKCU "Software\GNU Octave" "Installer Language" $LANGUAGE
-
-  ;File associations --- don't conflict with matlab's entries
-  ClearErrors
-  ReadRegStr $1 HKCR "" ".m"
-  StrCmp $1 "matfile" Matlab NoMatlab
-  NoMatlab:
-  WriteRegStr HKCR ".m" "" "octfile"
-  Matlab:
-  WriteRegStr HKCR "octfile" "" "Octave Script File"
-  WriteRegStr HKCR "octfile\DefaultIcon" "" "$INSTDIR\bin\octave.ico"
-  WriteRegStr HKCR "octfile\Shell\open\command" "" '"$WINDIR\notepad.exe" "%1"'
-
-  DetailPrint ";Cygwin's registry entries"
-  WriteRegStr HKLM \
-	"SOFTWARE\GNU Octave\Cygwin\mounts v2\/" "native" "$INSTDIR"
-  WriteRegDWORD HKLM \
-	"SOFTWARE\GNU Octave\Cygwin\mounts v2\/" "flags" "a"
-  WriteRegStr HKLM \
-	"SOFTWARE\GNU Octave\Cygwin\mounts v2\/usr/bin" "native" "$INSTDIR/bin"
-  WriteRegDWORD HKLM \
-	"SOFTWARE\GNU Octave\Cygwin\mounts v2\/usr/bin" "flags" "a"
-  WriteRegStr HKLM \
-	"SOFTWARE\GNU Octave\Cygwin\mounts v2\/usr/lib" "native" "$INSTDIR/lib"
-  WriteRegDWORD HKLM \
-	"SOFTWARE\GNU Octave\Cygwin\mounts v2\/usr/lib" "flags" "a"
-  WriteRegStr HKLM \
-	"SOFTWARE\GNU Octave\Cygwin\Program Options" "temp" "temp"
-  DeleteRegValue HKLM \
-	"SOFTWARE\GNU Octave\Cygwin\Program Options" "temp"
-
-  WriteRegStr HKU \
-	".DEFAULT\Software\GNU Octave\Cygwin\mounts v2\/" "native" "$INSTDIR"
-  WriteRegDWORD HKU \
-	".DEFAULT\Software\GNU Octave\Cygwin\mounts v2\/" "flags" "a"
-  WriteRegStr HKU \
-	".DEFAULT\Software\GNU Octave\Cygwin\mounts v2\/usr/bin" \
-	"native" "$INSTDIR/bin"
-  WriteRegDWORD HKU \
-	".DEFAULT\Software\GNU Octave\Cygwin\mounts v2\/usr/bin" "flags" "a"
-  WriteRegStr HKU \
-	".DEFAULT\Software\GNU Octave\Cygwin\mounts v2\/usr/lib" \
-	"native" "$INSTDIR/lib"
-  WriteRegDWORD HKU \
-	".DEFAULT\Software\GNU Octave\Cygwin\mounts v2\/usr/lib" "flags" "a"
-  WriteRegStr HKU \
-	".DEFAULT\Software\GNU Octave\Cygwin\Program Options" "temp" "temp"
-  DeleteRegValue HKU \
-	".DEFAULT\Software\GNU Octave\Cygwin\Program Options" "temp"
-
-  WriteRegStr HKCU \
-	"Software\GNU Octave\Cygwin\mounts v2\/" "cygdrive prefix" "/cygdrive"
-  WriteRegDWORD HKCU \
-	"Software\GNU Octave\Cygwin\mounts v2\/" "cygdrive flags" "22"
-  WriteRegStr HKCU \
-	"Software\GNU Octave\Cygwin\Program Options" "temp" "temp"
-  DeleteRegValue HKCU \
-	"Software\GNU Octave\Cygwin\Program Options" "temp"
-
-  ;Uninstaller registry entries
-  WriteRegStr HKLM \
-	"Software\Microsoft\Windows\CurrentVersion\Uninstall\GNU Octave" \
-	"DisplayName" "${MUI_PRODUCT}"
-  WriteRegStr HKLM \
-	"Software\Microsoft\Windows\CurrentVersion\Uninstall\GNU Octave" \
-	"DisplayIcon" "$INSTDIR\bin\octave.ico"
-  WriteRegStr HKLM \
-	"Software\Microsoft\Windows\CurrentVersion\Uninstall\GNU Octave" \
-	"UninstallString" "$INSTDIR\uninstall.exe"
-SectionEnd
-
-; Start menu shortcuts
-Section "$(TITLE_Section2)" Section2
-  CreateDirectory "$SMPROGRAMS\${MUI_PRODUCT}"
-  CreateShortCut $(UninstallLink) \
-	"$INSTDIR\uninstall.exe" "" "$INSTDIR\uninstall.exe" 0
-  CreateShortCut "$SMPROGRAMS\${MUI_PRODUCT}\${MUI_PRODUCT}.lnk" \
-	"$INSTDIR\bin\run.exe" "${OctaveStart}" "$INSTDIR\bin\octave.ico" 0
-  CreateShortCut $(ManualLink) \
-	"$INSTDIR\opt\octave\doc\octave_toc.html"
-  CreateShortCut $(RefcardLink) \
-	"$INSTDIR\opt\octave\doc\refcard-letter.pdf"
-  WriteINIStr $(FunctionLink) "InternetShortcut" "URL" \
-	"http://octave.sourceforge.net/index/index.html"
-  WriteINIStr $(EpstkLink) "InternetShortcut" "URL" \
-	"http://epstk.sourceforge.net/epstk/quickref/index.html"
-SectionEnd
-
-; Desktop shortcuts
-Section "$(TITLE_Section3)" Section3
-  CreateShortCut "$DESKTOP\${MUI_PRODUCT}.lnk" \
-	"$INSTDIR\bin\run.exe" "${OctaveStart}" "$INSTDIR\bin\octave.ico" 0
-SectionEnd
-
-; Make links to drives
-!include "DetectDrives.nsi"
-Function MakeDriveLink
-   StrCpy $R2 $R0 1
-   # FileOpen $R1 "$INSTDIR/drive.link" a
-   # FileSeek $R1 0 END
-   # FileWrite $R1 "ln -sf /cygdrive/$R2 /$R2"
-   # FileClose $R1
-   DetailPrint "ln -sf /cygdrive/$R2 /$R2"
-   # Shouldn't need PATH=/bin here, but if I don't then cygwin
-   # complains.  I don't know why it doesn't complain below
-   # in section -Local Config
-   Exec `$INSTDIR\bin\sh.exe -c "PATH=/bin ln -sf /cygdrive/$R2 /$R2"`
-FunctionEnd
-Section "-Make drive links"
-   # Delete "$INSTDIR/drive.link"
-   Push "All Local Drives"
-   Push $0
-   GetFunctionAddress $0 "MakeDriveLink"
-   Exch $0
-   Call DetectDrives
-   # Add commands to install_octave.sh to detect and evaluate drive.link
-SectionEnd
-
-; Post-installation configuration
-Section "-Local Config"
-  Exec "$INSTDIR\bin\sh.exe -e /bin/install_octave.sh"
-SectionEnd
-
-!insertmacro MUI_SECTIONS_FINISHHEADER
-
-Function .onInit
-  Push Tahoma
-  Push 8
-
-  ; Ask for language before doing anything else
-  !insertmacro MUI_LANGDLL_DISPLAY
-  Push 2F
-  LangDLL::LangDialog "Installer Language" "Please select a language."
-  Pop $LANGUAGE
-  StrCmp $LANGUAGE "cancel" 0 +2
-    Abort
-
-  ; We may be Intel-specific, especially if compiled against ATLAS.
-  ClearErrors
-  ReadRegStr $1 HKLM "HARDWARE\DESCRIPTION\System\CentralProcessor\0\" "VendorIdentifier"
-  StrCmp $1 "GenuineIntel" Continue0 Error0
-  Error0:
-    ; Language specific strings don't work in .onInit, so simulate the effect.
-    StrCpy $0 "${GenuineIntelEnglish}"
-    StrCmp $LANGUAGE ${LANG_SPANISH} 0 +2
-	StrCpy $0 "${GenuineIntelSpanish}"
-    MessageBox MB_OKCANCEL|MB_ICONEXCLAMATION $0 IDOK Continue0
-    Abort
-  Continue0:
-
-  ; Detect an existing Octave installation
-  ClearErrors
-  ReadRegDWORD $1 HKLM "SOFTWARE\GNU Octave\Cygwin\mounts v2\/" flags
-  IfErrors Continue1 Error1
-  Error1:
-    ; Language specific strings don't work in .onInit, so simulate the effect.
-    StrCpy $0 "${PreviousOctaveEnglish}"
-    StrCmp $LANGUAGE ${LANG_SPANISH} 0 +2
-	StrCpy $0 "${PreviousOctaveSpanish}"
-    MessageBox MB_OKCANCEL|MB_ICONEXCLAMATION $0 IDOK Continue1
-    Abort
-  Continue1:
-
-  ; Detect an existing Cygwin installation
-  ClearErrors
-  ReadRegDWORD $1 HKLM "SOFTWARE\Cygnus Solutions\Cygwin\mounts v2\/" flags
-  IfErrors Continue2 Error2
-  Error2:
-    ; Language specific strings don't work in .onInit, so simulate the effect.
-    StrCpy $0 "${PreviousCygwinEnglish}"
-    StrCmp $LANGUAGE ${LANG_SPANISH} 0 +2
-	StrCpy $0 "${PreviousCygwinSpanish}"
-    MessageBox MB_OKCANCEL|MB_ICONEXCLAMATION $0 IDOK Continue2
-    Abort
-  Continue2:
-
-FunctionEnd
-
-!insertmacro MUI_FUNCTIONS_DESCRIPTION_BEGIN
-!insertmacro MUI_DESCRIPTION_TEXT ${Section1} $(DESC_Section1)
-!insertmacro MUI_DESCRIPTION_TEXT ${Section2} $(DESC_Section2)
-!insertmacro MUI_DESCRIPTION_TEXT ${Section3} $(DESC_Section3)
-!insertmacro MUI_FUNCTIONS_DESCRIPTION_END
-
-Section "Uninstall"
-  ClearErrors
-
-  ; Clear file associations
-  ReadRegStr $1 HKCR "" ".m"
-  StrCmp $1 "octfile" NoMatlab Matlab
-  NoMatlab:
-  DeleteRegKey HKCR ".m"
-  Matlab:
-  DeleteRegKey HKCR "octfile\DefaultIcon"
-  DeleteRegKey HKCR "octfile\Shell\open\command"
-  DeleteRegKey HKCR "octfile"
-
-  ; Clean up registry
-  DeleteRegKey HKLM "SOFTWARE\GNU Octave"
-  DeleteRegKey HKU ".DEFAULT\Software\GNU Octave"
-  DeleteRegKey HKCU "Software\GNU Octave"
-  DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\GNU Octave"
-  ;; The following used value is now stored in GNU Octave, which is cleaned above.
-  ; DeleteRegKey HKCU "Software\${MUI_PRODUCT}" "Installer Language"
-
-  ; Clean up start menu
-  Delete "$DESKTOP\${MUI_PRODUCT}.lnk"
-  Delete "$SMPROGRAMS\${MUI_PRODUCT}\*.*"
-  Delete "$INSTDIR\*.*"
-  RMDir "$SMPROGRAMS\${MUI_PRODUCT}"
-
-  ; Clean up files
-  RMDir /r "$INSTDIR"
-
-  ;Display the Finish header
-  !insertmacro MUI_UNFINISHHEADER
-SectionEnd
-
-Function un.onInit
-  ;Get language from registry
-  ReadRegStr $LANGUAGE HKCU "Software\GNU Octave" "Installer Language"
-FunctionEnd
Binary file admin/Windows/octave.ico has changed
--- a/admin/Windows/octave.nsi	Wed Jan 31 15:26:28 2007 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,385 +0,0 @@
-#
-# NSI script for octave windows
-# $Id$
-#
-
-# http://nsis.sourceforge.net/Docs
-# Sort out command line parameters
-
-!ifndef VERSION
-!error "Start MakeNSIS with /DVERSION=2.1.xx [/DMINOR=-yyyymmdd] [/DROOT=C:\cygwin] octave.nsi"
-!endif
-!ifndef MINOR
-!define MINOR ""
-!endif
-!ifndef ROOT
-!define ROOT "C:\cygwin"
-!endif
-
-; Product and version
-!include "MUI.nsh"
-!define MUI_PRODUCT "GNU Octave ${VERSION}"
-!define MUI_VERSION "${VERSION}${MINOR}"
-
-XPStyle on
-CrcCheck on
-	
-OutFile "octave-${MUI_VERSION}-inst.exe"
-Icon "octave.ico"
-UninstallIcon "octave.ico"
-
-;-------------------------------
-;Version Information
-
-VIProductVersion "${VERSION}.0"
-VIAddVersionKey "ProductName" "GNU Octave"
-VIAddVersionKey "FileVersion" "${VERSION}.0"
-VIAddVersionKey "LegalCopyright" "© John W. Eaton, et al."
-VIAddVersionKey "FileDescription" "Octave+octave-forge+gnuplot"
-
-# ****************** Localization ***********************
-; Translate the following strings into all the languages
-; that we support for the installer.  Some things may not
-; yet be translated.  Search for the following strings:
-;
-;    Spanish  ;ESP
-
-LoadLanguageFile "${NSISDIR}\Contrib\Language files\English.nlf"
-LoadLanguageFile "${NSISDIR}\Contrib\Language files\Spanish.nlf"
-
-; License data files --- put a translation of the GPL into
-; the root of the octave-forge tree.
-LicenseLangString LicenseFile ${LANG_ENGLISH} "..\..\COPYING.GPL"
-LicenseLangString LicenseFile ${LANG_SPANISH} "..\..\COPYING.GPL-spanish"
-
-;ESP
-LangString LicenseTextStr ${LANG_ENGLISH} "GNU Octave is free software released under the GNU Public License.  Read below for your rights:" 
-LangString LicenseTextStr ${LANG_SPANISH} "GNU Octave is free software released under the GNU Public License.  Read below for your rights:" 
-
-LangString ^ComponentsText ${LANG_ENGLISH} "${MUI_PRODUCT} Setup"
-LangString ^ComponentsText ${LANG_SPANISH} "Instalación de ${MUI_PRODUCT}"
-
-LangString installcaption ${LANG_ENGLISH} "${MUI_PRODUCT} Setup"
-LangString installcaption ${LANG_SPANISH} "Instalación de ${MUI_PRODUCT}"
-
-LangString uninstcaption ${LANG_ENGLISH} "Uninstall ${MUI_PRODUCT}"
-LangString uninstcaption ${LANG_SPANISH} "Desintalar de ${MUI_PRODUCT}"
-
-LangString TITLE_Section1 ${LANG_ENGLISH} "${MUI_PRODUCT}"
-LangString TITLE_Section1 ${LANG_SPANISH} "${MUI_PRODUCT}"
-
-LangString DESC_Section1 ${LANG_ENGLISH} "Install the ${MUI_PRODUCT} for Windows binary distribution including gnuplot, epstk and the octave-forge extensions."
-LangString DESC_Section1 ${LANG_SPANISH} "Instalar la version ejecutable the ${MUI_PRODUCT} para Windows la cual incluye gnuplot, epstk y las extensiones de octave-forge."
-
-LangString TITLE_Section2 ${LANG_ENGLISH} "Start Menu Icons"
-LangString TITLE_Section2 ${LANG_SPANISH} "Iconos de Menú de Inicio"
-
-LangString DESC_Section2 ${LANG_ENGLISH} "Add a ${MUI_PRODUCT} folder to the Start Menu."
-LangString DESC_Section2 ${LANG_SPANISH} "Agregar una carpeta de ${MUI_PRODUCT} al Menú de Inicio."
-
-LangString TITLE_Section3 ${LANG_ENGLISH} "Desktop Icons"
-LangString TITLE_Section3 ${LANG_SPANISH} "Iconos de Escritorio"
-
-LangString DESC_Section3 ${LANG_ENGLISH} "Add a ${MUI_PRODUCT} icon to the Desktop."
-LangString DESC_Section3 ${LANG_SPANISH} "Agregar un icono de ${MUI_PRODUCT} al Escritorio."
-
-LangString UninstallLink ${LANG_ENGLISH} "$SMPROGRAMS\${MUI_PRODUCT}\Uninstall ${MUI_PRODUCT}.lnk"
-LangString UninstallLink ${LANG_SPANISH} "$SMPROGRAMS\${MUI_PRODUCT}\Desinstalar ${MUI_PRODUCT}.lnk"
-
-LangString ManualLink ${LANG_ENGLISH} "$SMPROGRAMS\${MUI_PRODUCT}\${MUI_PRODUCT} Manual (HTML).lnk"
-LangString ManualLink ${LANG_SPANISH} "$SMPROGRAMS\${MUI_PRODUCT}\Manual de ${MUI_PRODUCT} (HTML).lnk"
-
-LangString FunctionLink ${LANG_ENGLISH} "$SMPROGRAMS\${MUI_PRODUCT}\OctaveForge Quick Reference (HTML).url"
-LangString FunctionLink ${LANG_SPANISH} "$SMPROGRAMS\${MUI_PRODUCT}\Refencia Rápida de OctaveForge (HTML).url"
-
-LangString EpstkLink ${LANG_ENGLISH} "$SMPROGRAMS\${MUI_PRODUCT}\Epstk Manual (HTML).url"
-LangString EpstkLink ${LANG_SPANISH} "$SMPROGRAMS\${MUI_PRODUCT}\Manual de Epstk (HTML).url"
-
-LangString RefcardLink ${LANG_ENGLISH} "$SMPROGRAMS\${MUI_PRODUCT}\${MUI_PRODUCT} Quick Reference (PDF).lnk"
-LangString RefcardLink ${LANG_SPANISH} "$SMPROGRAMS\${MUI_PRODUCT}\Refencia Rápida de ${MUI_PRODUCT} (PDF).lnk"
-
-;ESP
-LangString PreviousCygwin ${LANG_ENGLISH} "A previous installation of cygwin was detected. To use this package from the cygwin system, mount the install directory as /opt/octave-${VERSION}."
-LangString PreviousCygwin ${LANG_SPANISH} "Se detectó una versión de cygwin instalada. Este paquete no fue diseñado para funcionar dentro de un ambiente de cygwin. Presione Aceptar si desea continuar o Cancelar si desea detener el preceso de instalación."
-
-LangString PreviousOctave ${LANG_ENGLISH} "A previous version of Octave ${VERSION} for Windows was detected. Please uninstall any previous version before running this installer. Click OK if you want to continue anyway or CANCEL if you want to abort the installation process."
-LangString PreviousOctave ${LANG_SPANISH} "Se detectó una versión anterior de Octave ${VERSION} para Windows. Por favor desinstale cualquier versión anterior antes de ejecutar este instalador. Presione Aceptar si desea continuar o Cancelar si desea detener el proceso de instalación."
-
-LangString GenuineIntel ${LANG_ENGLISH} "This version of Octave for Windows is optimized for Intel x86 processors and is known to cause troubles with other architectures. Click OK if you want to continue anyway or CANCEL if you want to abort the installation process."
-LangString GenuineIntel ${LANG_SPANISH} "Esta versión de Octave para Windows ha sido optimizada para procesadores Intel x86 y puede no funcionar correctamente sobre otros procesadores. Presione Aceptar si desea continuar o Cancelar si desea detener el proceso de instalación."
-
-;ESP
-LangString Donation ${LANG_ENGLISH} "Octave needs your support!  Please donate to the University of Wisconsin Foundation, dedicated as follows:"
-LangString Donation ${LANG_SPANISH} "Octave needs your support!  Please donate to the University of Wisconsin Foundation, dedicated as follows:"
-
-; This function is for choosing languages.  If you add
-; a new language, you will need to add the name of the
-; language to this function in order for the user to
-; select it.
-Function ChooseLanguage
-  Push ""
-  Push ${LANG_ENGLISH}
-  Push "English"
-  Push ${LANG_SPANISH}
-  Push "Español"
-  Push A ; A means auto count languages
-  ; for the auto count to work the first empty push (Push "") must remain
-  LangDLL::LangDialog "Installer Language" "Please select the language of the installer"
-  Pop $LANGUAGE
-  StrCmp "$LANGUAGE" "cancel" Cancel
-  Return
-  Cancel:
-  Abort
-FunctionEnd
-
-Function .onInit
-  Push Tahoma
-  Push 8
-  Call ChooseLanguage
-FunctionEnd
-
-# ****************** End Localization ***********************
-
-LicenseText $(LicenseTextStr) $(^NextBtn)
-LicenseData $(LicenseFile)
-Name "${MUI_PRODUCT}"
-Caption $(installcaption)
-UninstallCaption $(uninstcaption)
-
-; Page structure
-!include "MUI.nsh"
-Page license BeforeFirstPage
-Page components
-Page directory
-Page instfiles
-PageEx license
-  LicenseText $(Donation) $(^CloseBtn)
-  LicenseData donation.txt
-PageExEnd
-UninstPage uninstConfirm
-UninstPage instfiles
-
-; Section descriptions
-!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
-!insertmacro MUI_DESCRIPTION_TEXT Section1 $(DESC_Section1)
-!insertmacro MUI_DESCRIPTION_TEXT Section2 $(DESC_Section2)
-!insertmacro MUI_DESCRIPTION_TEXT Section3 $(DESC_Section3)
-!insertmacro MUI_FUNCTION_DESCRIPTION_END
-
-; This is the command to start octave.
-!define OctaveStart "rxvt.exe --keysym.0xFF50 '^a' --keysym.0xFF57 '^e' --keysym.0xFFFF '^f^h' -tn linux -title '${MUI_PRODUCT}' -geometry 80x25 -e /bin/sh  /opt/octave-${VERSION}/bin/start_octave.sh"
-
-!define OCTKEY "GNUOctave ${VERSION}"
-!define CYGKEY "${OCTKEY}\Cygwin"
-!define MOUNTKEY "${CYGKEY}\mounts v2"
-
-InstallDir "$PROGRAMFILES\${MUI_PRODUCT}"
-
-; Files and registry keys
-Section !$(TITLE_Section1) Section1
-
-  CreateDirectory $INSTDIR\tmp
-  CreateDirectory $INSTDIR\octave_files
-  CreateDirectory $INSTDIR\cygwin
-  CreateDirectory $INSTDIR\bin
-  CreateDirectory $INSTDIR\base
-  CreateDirectory $INSTDIR\site
-  SetOutPath $INSTDIR\cygwin
-  File "${ROOT}\cygwin\*.*"
-  SetOutPath $INSTDIR\bin
-  File install_octave.sh start_octave.sh
-  File octave.ico
-  File /r ${ROOT}\bin\*.*
-  SetOutPath $INSTDIR\base
-  File /r ${ROOT}\base\*.*
-  SetOutPath $INSTDIR\site
-  File /r ${ROOT}\site\*.*
-  SetOutPath $INSTDIR\doc
-  File /r ${ROOT}\doc\*.*
-  WriteUninstaller "$INSTDIR\uninstall.exe"
-
-  ;Write language to the registry (for the uninstaller)
-  WriteRegStr HKCU "Software\${OCTKEY}" "Installer Language" $LANGUAGE
-
-  ;File associations --- don't conflict with matlab's entries
-  ClearErrors
-  ReadRegStr $1 HKCR "" ".m"
-  StrCmp $1 "matfile" Matlab NoMatlab
-  NoMatlab:
-  DetailPrint ";File associations for .m files"
-  WriteRegStr HKCR ".m" "" "octfile"
-  WriteRegStr HKCR "octfile" "" "Octave Script File"
-  WriteRegStr HKCR "octfile\DefaultIcon" "" "$INSTDIR\bin\octave.ico"
-  WriteRegStr HKCR "octfile\Shell\open\command" "" '"$WINDIR\notepad.exe" "%1"'
-  Matlab:
-
-  DetailPrint ";Cygwin's registry entries"
-  WriteRegStr HKLM \
-	"SOFTWARE\${MOUNTKEY}\/" "native" "$INSTDIR"
-  WriteRegDWORD HKLM \
-	"SOFTWARE\${MOUNTKEY}\/" "flags" "a"
-  WriteRegStr HKLM \
-	"SOFTWARE\${MOUNTKEY}\/bin" "native" "$INSTDIR/cygwin"
-  WriteRegDWORD HKLM \
-	"SOFTWARE\${MOUNTKEY}\/bin" "flags" "rx"
-  WriteRegStr HKLM \
-	"SOFTWARE\${MOUNTKEY}\/opt/octave-${VERSION}" "native" "$INSTDIR"
-  WriteRegDWORD HKLM \
-	"SOFTWARE\${MOUNTKEY}\/opt/octave-${VERSION}" "flags" "a"
-  WriteRegStr HKLM \
-	"SOFTWARE\${CYGKEY}\Program Options" "temp" "temp"
-  DeleteRegValue HKLM \
-	"SOFTWARE\${CYGKEY}\Program Options" "temp"
-
-  WriteRegStr HKU \
-	".DEFAULT\Software\${MOUNTKEY}\/" "native" "$INSTDIR"
-  WriteRegDWORD HKU \
-	".DEFAULT\Software\${MOUNTKEY}\/" "flags" "a"
-  WriteRegStr HKU \
-	".DEFAULT\Software\${MOUNTKEY}\/bin" "native" "$INSTDIR/cygwin"
-  WriteRegDWORD HKU \
-	".DEFAULT\Software\${MOUNTKEY}\/bin" "flags" "rx"
-  WriteRegStr HKU \
-	".DEFAULT\Software\${MOUNTKEY}\/opt/octave-${VERSION}" \
-	"native" "$INSTDIR"
-  WriteRegDWORD HKU \
-	".DEFAULT\Software\${MOUNTKEY}\/opt/octave-${VERSION}" "flags" "a"
-  WriteRegStr HKU \
-	".DEFAULT\Software\${CYGKEY}\Program Options" "temp" "temp"
-  DeleteRegValue HKU \
-	".DEFAULT\Software\${CYGKEY}\Program Options" "temp"
-
-  WriteRegStr HKCU \
-	"Software\${MOUNTKEY}\/" "cygdrive prefix" "/cygdrive"
-  WriteRegDWORD HKCU \
-	"Software\${MOUNTKEY}\/" "cygdrive flags" "22"
-  WriteRegStr HKCU \
-	"Software\${CYGKEY}\Program Options" "temp" "temp"
-  DeleteRegValue HKCU \
-	"Software\${CYGKEY}\Program Options" "temp"
-
-  ;Uninstaller registry entries
-  WriteRegStr HKLM \
-	"Software\Microsoft\Windows\CurrentVersion\Uninstall\${OCTKEY}" \
-	"DisplayName" "${MUI_PRODUCT}"
-  WriteRegStr HKLM \
-	"Software\Microsoft\Windows\CurrentVersion\Uninstall\${OCTKEY}" \
-	"DisplayIcon" "$INSTDIR\bin\octave.ico"
-  WriteRegStr HKLM \
-	"Software\Microsoft\Windows\CurrentVersion\Uninstall\${OCTKEY}" \
-	"UninstallString" "$INSTDIR\uninstall.exe"
-SectionEnd
-
-; Start menu shortcuts
-Section !$(TITLE_Section2) Section2
-  CreateDirectory "$SMPROGRAMS\${MUI_PRODUCT}"
-  CreateShortCut $(UninstallLink) \
-	"$INSTDIR\uninstall.exe" "" "$INSTDIR\uninstall.exe" 0
-  CreateShortCut "$SMPROGRAMS\${MUI_PRODUCT}\${MUI_PRODUCT}.lnk" \
-	"$INSTDIR\bin\run.exe" "${OctaveStart}" "$INSTDIR\bin\octave.ico" 0
-  CreateShortCut $(ManualLink) \
-	"$INSTDIR\opt\octave\doc\octave_toc.html"
-  CreateShortCut $(RefcardLink) \
-	"$INSTDIR\opt\octave\doc\refcard-letter.pdf"
-  WriteINIStr $(FunctionLink) "InternetShortcut" "URL" \
-	"http://octave.sourceforge.net/index/index.html"
-  WriteINIStr $(EpstkLink) "InternetShortcut" "URL" \
-	"http://epstk.sourceforge.net/epstk/quickref/index.html"
-SectionEnd
-
-; Desktop shortcuts
-Section !$(TITLE_Section3) Section3
-  CreateShortCut "$DESKTOP\${MUI_PRODUCT}.lnk" \
-	"$INSTDIR\bin\run.exe" "${OctaveStart}" "$INSTDIR\bin\octave.ico" 0
-SectionEnd
-
-!ifdef SKIP
-; Make links to drives
-!include "DetectDrives.nsi"
-Function MakeDriveLink
-   StrCpy $R2 $R0 1
-   DetailPrint "ln -sf /cygdrive/$R2 /$R2"
-   # Need PATH=/bin here because the default path is the windows path.
-   # We could try running $INSTDIR\bin\ln.exe directly.
-   Exec `$INSTDIR\bin\sh.exe -c "PATH=/bin /bin/ln.exe -sf /cygdrive/$R2 /$R2"`
-FunctionEnd
-Section "-Make drive links"
-   Push "All Local Drives"
-   Push $0
-   GetFunctionAddress $0 "MakeDriveLink"
-   Exch $0
-   Call DetectDrives
-SectionEnd
-!endif
-
-; Post-installation configuration
-Section "-Local Config"
-  Exec "$INSTDIR\bin\run.exe rxvt -e /opt/octave-${VERSION}/bin/install_octave.sh"
-SectionEnd
-
-; Tests which are done before the first page, but can't
-; be done in .onInit since LangString variables do not 
-; work in the .onInit function.
-Function BeforeFirstPage
-  ; We may be Intel-specific, especially if compiled against ATLAS.
-  ClearErrors
-  ReadRegStr $1 HKLM "HARDWARE\DESCRIPTION\System\CentralProcessor\0\" "VendorIdentifier"
-  StrCmp $1 "GenuineIntel" Continue0
-  MessageBox MB_OKCANCEL|MB_ICONEXCLAMATION $(GenuineIntel) /SD IDOK IDOK Continue0
-  Quit
-  Continue0:
-
-  ; Detect an existing Octave installation
-  ClearErrors
-  EnumRegKey $1 HKLM "SOFTWARE\${MOUNTKEY}\\" 0
-  StrCmp $1 "" Continue1
-  MessageBox MB_OKCANCEL|MB_ICONEXCLAMATION $(PreviousOctave) /SD IDOK IDOK Continue1
-  Quit
-  Continue1:
-
-  ; Detect an existing Cygwin installation
-  ClearErrors
-  EnumRegKey $1 HKLM "SOFTWARE\Cygnus Solutions\Cygwin" 0
-  StrCmp $1 "" Continue2
-  MessageBox MB_OKCANCEL|MB_ICONEXCLAMATION $(PreviousCygwin) /SD IDOK IDOK Continue2
-  Quit
-  Continue2:
-FunctionEnd
-
-Section "Uninstall"
-  ClearErrors
-
-  ; Clear file associations
-  ReadRegStr $1 HKCR "" ".m"
-  StrCmp $1 "octfile" NoMatlab Matlab
-  NoMatlab:
-  DeleteRegKey HKCR ".m"
-  Matlab:
-  DeleteRegKey HKCR "octfile\DefaultIcon"
-  DeleteRegKey HKCR "octfile\Shell\open\command"
-  DeleteRegKey HKCR "octfile"
-
-  ; Clean up registry
-  DeleteRegKey HKLM "SOFTWARE\${OCTKEY}"
-  DeleteRegKey HKU ".DEFAULT\Software\${OCTKEY}"
-  DeleteRegKey HKCU "Software\${OCTKEY}"
-  DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${OCTKEY}"
-  ;; The following used value is now stored in GNU Octave, which is cleaned above.
-  ; DeleteRegKey HKCU "Software\${MUI_PRODUCT}" "Installer Language"
-
-  ; Clean up start menu
-  Delete "$DESKTOP\${MUI_PRODUCT}.lnk"
-  Delete "$SMPROGRAMS\${MUI_PRODUCT}\*.*"
-  Delete "$INSTDIR\*.*"
-  RMDir "$SMPROGRAMS\${MUI_PRODUCT}"
-
-  ; Clean up files
-  RMDir /r "$INSTDIR"
-
-  ;Display the Finish header 
-SectionEnd
-
-Function un.onInit
-  ;Get language from registry
-  ReadRegStr $LANGUAGE HKCU "Software\${OCTKEY}" "Installer Language"
-FunctionEnd
--- a/admin/Windows/start_octave.sh	Wed Jan 31 15:26:28 2007 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,11 +0,0 @@
-#!/bin/sh
-# This script is executed under sh.exe to start octave
-# $Id$
-export PATH="/bin:$PATH"
-export HOME="/octave_files"
-export PS_VIEWER=
-export EDITOR=notepad
-cd "$HOME"
-#ulimit -c 0 # no core files
-octave.exe
-rm -f /tmp/*