# HG changeset patch # User adb014 # Date 1170279941 0 # Node ID 7551f3e9c5a698fd667b5092d332625e915e0f7b # Parent 548899014cb8e675f8a8da2743044cbcc2ff2f22 move old Windows build scripts to cygwin directory diff -r 548899014cb8 -r 7551f3e9c5a6 admin/Windows/DetectDrives.nsi --- 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 diff -r 548899014cb8 -r 7551f3e9c5a6 admin/Windows/Makefile --- 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 diff -r 548899014cb8 -r 7551f3e9c5a6 admin/Windows/README --- 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 " >/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 diff -r 548899014cb8 -r 7551f3e9c5a6 admin/Windows/README-1st --- 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. diff -r 548899014cb8 -r 7551f3e9c5a6 admin/Windows/TODO --- 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 diff -r 548899014cb8 -r 7551f3e9c5a6 admin/Windows/bsubst.c --- 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 - -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 (iBrowse >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 diff -r 548899014cb8 -r 7551f3e9c5a6 admin/Windows/cygwin/Makefile --- /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 diff -r 548899014cb8 -r 7551f3e9c5a6 admin/Windows/cygwin/README --- /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 " >/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 diff -r 548899014cb8 -r 7551f3e9c5a6 admin/Windows/cygwin/README-1st --- /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. diff -r 548899014cb8 -r 7551f3e9c5a6 admin/Windows/cygwin/TODO --- /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 diff -r 548899014cb8 -r 7551f3e9c5a6 admin/Windows/cygwin/bsubst.c --- /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 + +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&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 key to continue" +echo +read choice diff -r 548899014cb8 -r 7551f3e9c5a6 admin/Windows/cygwin/mkdll.sh --- /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 <&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 key to continue" -echo -read choice diff -r 548899014cb8 -r 7551f3e9c5a6 admin/Windows/mkdll.sh --- 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 <