help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Octave on Windows


From: Agustin Barto
Subject: Re: Octave on Windows
Date: 02 Oct 2002 11:53:58 -0300

The source for the script is below. I'll change it a bit soon to give
the option not to install the desktop icon or the docs and an entry to
the add/remove program dialog on the control.

---X CUT HERE X---

Name "GNU Octave 2.1.36 + octave-forge"
OutFile "octave-2.1.36-2002092400.exe"
CRCCheck on

DirText "Please select a location to install GNU Octave + octave-forge
(or use the default):"
InstallDir "$PROGRAMFILES\GNU Octave 2.1.36"

LicenseText "You must read the following license before installing:"
LicenseData "C:\Octave\Copying.txt"

; SetOverwrite on
; AutoCloseWindow true
ShowInstDetails show
ShowUninstDetails show

Function .onInit
  ClearErrors
  ReadRegDWORD $1 HKLM "SOFTWARE\GNU Octave\Cygwin\mounts v2\/" flags
  IfErrors NoError Error0
  Error0:
    MessageBox MB_OKCANCEL|MB_ICONEXCLAMATION "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." IDOK Continue
    Abort
  Continue:
  ClearErrors
  ReadRegDWORD $1 HKLM "SOFTWARE\Cygnus Solutions\Cygwin\mounts v2\/"
flags
  IfErrors NoError Error1
  Error1:
    MessageBox MB_OKCANCEL|MB_ICONEXCLAMATION "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." IDOK NoError
    Abort
  NoError:
FunctionEnd

Section "Install"
  SetOutPath $INSTDIR
  File /r "C:\Octave\*.*"
  WriteUninstaller "$INSTDIR\uninstall.exe"

  ClearErrors
  ReadRegStr $1 HKCR "" ".m"
  StrCmp $1 "matfile" Matlab NoMatlab
  NoMatlab:
  WriteRegStr HKCR ".m" "" "octfile"
  Matlab:
  WriteRegStr HKCR ".o" "" "octfile"
  WriteRegStr HKCR "octfile" "" "Octave Data File"
  WriteRegStr HKCR "octfile\DefaultIcon" "" "$INSTDIR\octave.ico"
  WriteRegStr HKCR "octfile\Shell\open\command" ""
'"$WINDIR\notepad.exe" "%1"'

  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"
SectionEnd

Section "Start Menu"
  CreateDirectory "$SMPROGRAMS\GNU Octave 2.1.36"
  CreateShortCut "$SMPROGRAMS\GNU Octave 2.1.36\Uninstall GNU Octave
2.1.36.lnk" "$INSTDIR\uninstall.exe" "" "$INSTDIR\uninstall.exe" 0
  CreateShortCut "$SMPROGRAMS\GNU Octave 2.1.36\GNU Octave 2.1.36.lnk"
"$INSTDIR\bin\run.exe" `rxvt.exe --keysym.0xFF50 '^a' --keysym.0xFF57
'^e' --keysym.0xFFFF '^f^h' -fn "Lucida Console-12" -tn linux -title
"GNU Octave 2.1.36" -geometry 80x25 -sl 400 -sr -e /bin/start_octave.sh`
"$INSTDIR\octave.ico" 0
  CreateShortCut "$SMPROGRAMS\GNU Octave 2.1.36\GNU Octave 2.1.36
Manual.lnk" "$INSTDIR\octave_manual.pdf"
  CreateShortCut "$SMPROGRAMS\GNU Octave 2.1.36\Aprenda Matlab 4.2 como
si estuviera en Primero.lnk" "$INSTDIR\matlab42.pdf"
  CreateShortCut "$DESKTOP\GNU Octave 2.1.36.lnk" "$INSTDIR\bin\run.exe"
`rxvt.exe --keysym.0xFF50 '^a' --keysym.0xFF57 '^e' --keysym.0xFFFF
'^f^h' -fn "Lucida Console-12" -tn linux -title "GNU Octave 2.1.36"
-geometry 80x25 -sl 400 -sr -e /bin/start_octave.sh`
"$INSTDIR\octave.ico" 0
SectionEnd

Section "Uninstall"
  ClearErrors
  ReadRegStr $1 HKCR "" ".m"
  StrCmp $1 "octfile" NoMatlab Matlab
  NoMatlab:
  DeleteRegKey HKCR ".m"
  Matlab:
  DeleteRegKey HKCR ".o"
  DeleteRegKey HKCR "octfile\DefaultIcon"
  DeleteRegKey HKCR "octfile\Shell\open\command"
  DeleteRegKey HKCR "octfile"

  DeleteRegKey HKLM "SOFTWARE\GNU Octave"
  DeleteRegKey HKU ".DEFAULT\Software\GNU Octave"
  DeleteRegKey HKCU "Software\GNU Octave"
  Delete "$DESKTOP\GNU Octave 2.1.36.lnk"
  Delete "$SMPROGRAMS\GNU Octave 2.1.36\*.*"
  Delete "$INSTDIR\*.*"
  RMDir "$SMPROGRAMS\GNU Octave 2.1.36"
  RMDir /r "$INSTDIR"
SectionEnd


---X CUT HERE X---

On Wed, 2002-10-02 at 00:16, John W. Eaton wrote:
> 
>   3. A nice installer.  As I understand from reading the mailing
>      lists, Agustin has already written an install script using the
>      free installer NSIS (http://nsis.sourceforge.net) that people say
>      works OK.  I haven't seen it, so we'll need to try it before
>      deciding what (if any) changes would be good to have.  I would
>      like to include the sources for the installer script with the
>      main Octave distribution.
> 




-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------



reply via email to

[Prev in Thread] Current Thread [Next in Thread]