Diff for /gforth/iss.sh between versions 1.2 and 1.31

version 1.2, 2003/03/09 12:54:32 version 1.31, 2012/12/31 15:25:18
Line 1 Line 1
 #!/bin/bash  #!/bin/bash
   
 #Copyright (C) 2000 Free Software Foundation, Inc.  #Copyright (C) 2000,2003,2006,2007,2009,2011,2012 Free Software Foundation, Inc.
   
 #This file is part of Gforth.  #This file is part of Gforth.
   
 #Gforth is free software; you can redistribute it and/or  #Gforth is free software; you can redistribute it and/or
 #modify it under the terms of the GNU General Public License  #modify it under the terms of the GNU General Public License
 #as published by the Free Software Foundation; either version 2  #as published by the Free Software Foundation, either version 3
 #of the License, or (at your option) any later version.  #of the License, or (at your option) any later version.
   
 #This program is distributed in the hope that it will be useful,  #This program is distributed in the hope that it will be useful,
 #but WITHOUT ANY WARRANTY; without even the implied warranty of  #but WITHOUT ANY WARRANTY; without even the implied warranty of
 #MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.#See the  #MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.#See the
 #GNU General Public License for more details.  #GNU General Public License for more details.
   
 #You should have received a copy of the GNU General Public License  #You should have received a copy of the GNU General Public License
 #along with this program; if not, write to the Free Software  #along with this program; if not, see http://www.gnu.org/licenses/.
 #Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.  
   # This is the horror shell script to create an automatic install for
 # This is the horror shell script to create an automatic install for  # Windoze.
 # Windoze.  # Note that I use sed to create a setup file
 # Note that I use sed to create a setup file  
   # use iss.sh >gforth.iss
 # use iss.sh >iss.txt  # copy the resulting *.iss to the location of your Windows installation
 # copy the resulting iss.txt to the location of your Windows installation  # of Gforth, and start the setup compiler there.
 # of Gforth, and start the setup compiler there.  
   VERSION=$(cat version)
 cat <<EOT  
 ; This is the setup script for 4stack on Windows  for i in lib/gforth/$VERSION/libcc-named/*.la
 ; Setup program is Inno Setup  do
       sed "s/dependency_libs='.*'/dependency_libs=''/g" <$i >$i+
 [Setup]      mv $i+ $i
 Bits=32  done
 AppName=Gforth  
 AppVerName=gforth 0.5.0  cat <<EOT
 AppCopyright=Copyright © 1995,1996,1997,1998,2000 Free Software Foundation  ; This is the setup script for Gforth on Windows
 DefaultDirName=gforth  ; Setup program is Inno Setup
 DefaultGroupName=Gforth  
 AllowNoIcons=1  [Setup]
 LicenseFile=COPYING  AppName=Gforth
   AppVerName=Gforth $VERSION
 [Dirs]  AppCopyright=Copyright © 1995,1996,1997,1998,2000,2003,2006,2007,2008,2009,2010,2011,2012 Free Software Foundation
 $(make distfiles -f Makedist | tr ' ' '\n' | (while read i; do  DefaultDirName={pf}\gforth
   while [ ! -z "$i" ]  DefaultGroupName=Gforth
   do  AllowNoIcons=1
     if [ -d $i ]; then echo $i; fi  InfoBeforeFile=COPYING
     if [ "${i%/*}" != "$i" ]; then i="${i%/*}"; else i=""; fi  Compression=lzma
   done  DisableStartupPrompt=yes
 done) | sort -u | sed \  ChangesEnvironment=yes
   -e 's:/:\\:g' \  OutputBaseFilename=gforth-$VERSION
   -e 's:^\(..*\)$:{app}\\\1:g')  
   [Messages]
 [Files]  WizardInfoBefore=License Agreement
 ; Parameter quick reference:  InfoBeforeLabel=Gforth is free software.
 ;   "Source filename", "Dest. filename", Copy mode, Flags  InfoBeforeClickLabel=You don't have to accept the GPL to run the program. You only have to accept this license if you want to modify, copy, or distribute this program.
 "README.txt", "{app}\README.txt", copy_normal, flag_isreadme  
 "cygwin1.dll", "{app}\cygwin1.dll", copy_normal,  [Components]
 "gforth.fi", "{app}\gforth.fi", copy_normal,  Name: "help"; Description: "HTML Documentation"; Types: full
 $(make distfiles -f Makedist | tr ' ' '\n' | (while read i; do  Name: "info"; Description: "GNU info Documentation"; Types: full
   if [ ! -d $i ]; then echo $i; fi  Name: "print"; Description: "Postscript Documentation for printout"; Types: full
 done) | sed \  Name: "objects"; Description: "Compiler generated intermediate stuff"; Types: full
   -e 's:/:\\:g' \  
   -e 's:^\(..*\)$:"\1", "{app}\\\1", copy_normal,:g')  [Dirs]
   $(make distfiles -f Makedist | tr ' ' '\n' | grep -v CVS | (while read i; do
 [Icons]    while [ ! -z "$i" ]
 ; Parameter quick reference:    do
 ;   "Icon title", "File name", "Parameters", "Working dir (can leave blank)",      if [ -d $i ]; then echo $i; fi
 ;   "Custom icon filename (leave blank to use the default icon)", Icon index      if [ "${i%/*}" != "$i" ]; then i="${i%/*}"; else i=""; fi
 "Gforth", "{app}\gforth.exe", "", "{app}", , 0    done
 "Gforth-fast", "{app}\gforth-fast.exe", "", "{app}", , 0  done) | sort -u | sed \
     -e 's:/:\\:g' \
 [Run]    -e 's,^\(..*\)$,Name: "{app}\\\1",g')
 "{app}\gforth.exe", "{app}\fixpath.fs {app} gforth-fast.exe",  Name: "{app}\doc\gforth"
 "{app}\gforth.exe", "{app}\fixpath.fs {app} gforth-ditc.exe",  Name: "{app}\doc\vmgen"
 "{app}\gforth-fast.exe", "{app}\fixpath.fs {app} gforth.exe",  Name: "{app}\lib\gforth\\$VERSION\libcc-named"
   Name: "{app}\include\gforth\\$VERSION"
 [Registry]  
 ; Parameter quick reference:  [Files]
 ;   "Root key", "Subkey", "Value name", Data type, "Data", Flags  ; Parameter quick reference:
 HKCR, ".fs", "", STRING, "forthstream",  ;   "Source filename", "Dest. filename", Copy mode, Flags
 HKCR, ".fs", "Content Type", STRING, "application/forth",  Source: "README.txt"; DestDir: "{app}"; Flags: isreadme
 HKCR, ".fb", "", STRING, "forthblock",  Source: "c:\cygwin\bin\sh.exe"; DestDir: "{app}"
 HKCR, ".fb", "Content Type", STRING, "application/forth-block",  Source: "c:\cygwin\bin\cygwin1.dll"; DestDir: "{app}"
 HKCR, "forthstream", "", STRING, "Forth Source",  Source: "c:\cygwin\bin\cyggcc_s-1.dll"; DestDir: "{app}"
 HKCR, "forthstream", "EditFlags", DWORD, "00000000",  Source: "c:\cygwin\bin\cygintl-8.dll"; DestDir: "{app}"
 HKCR, "forthstream\DefaultIcon", "", STRING, "{sys}\System32\shell32.dll,61"  Source: "c:\cygwin\bin\cygiconv-2.dll"; DestDir: "{app}"
 HKCR, "forthstream\Shell", "", STRING, ""  Source: "c:\cygwin\bin\cygltdl-7.dll"; DestDir: "{app}"
 HKCR, "forthstream\Shell\Open\command", "", STRING, "{app}\gforth.exe %1"  Source: "c:\cygwin\bin\cygreadline7.dll"; DestDir: "{app}"
 HKCR, "forthblock", "", STRING, "Forth Block",  Source: "c:\cygwin\bin\cygncursesw-10.dll"; DestDir: "{app}"
 HKCR, "forthblock", "EditFlags", DWORD, "00000000",  Source: "c:\cygwin\bin\cygffi-4.dll"; DestDir: "{app}"
 HKCR, "forthblock\DefaultIcon", "", STRING, "{sys}\System32\shell32.dll,61"  Source: "gforthmi.sh"; DestDir: "{app}"
 EOT  $(ls doc/gforth | sed -e 's:/:\\:g' -e 's,^\(..*\)$,Source: "doc\\gforth\\\1"; DestDir: "{app}\\doc\\gforth"; Components: help,g')
   $(ls doc/vmgen | sed -e 's:/:\\:g' -e 's,^\(..*\)$,Source: "doc\\vmgen\\\1"; DestDir: "{app}\\doc\\vmgen"; Components: help,g')
   $(ls lib/gforth/$VERSION/libcc-named | sed -e 's:/:\\:g' -e 's,^\(..*\)$,Source: "lib\\gforth\\'$VERSION'\\libcc-named\\\1"; DestDir: "{app}\\lib\\gforth\\'$VERSION'\\libcc-named",g')
   $(ls lib/gforth/$VERSION/libcc-named/.libs | sed -e 's:/:\\:g' -e 's,^\(..*\)$,Source: "lib\\gforth\\'$VERSION'\\libcc-named\\.libs\\\1"; DestDir: "{app}\\lib\\gforth\\'$VERSION'\\libcc-named\\.libs",g')
   $(ls include/gforth/$VERSION | sed -e 's:/:\\:g' -e 's,^\(..*\)$,Source: "engine\\\1"; DestDir: "{app}\\include\\gforth\\'$VERSION'",g')
   $(make distfiles -f Makedist EXE=.exe | tr ' ' '\n' | grep -v engine.*exe | (while read i; do
     if [ ! -d $i ]; then echo $i; fi
   done) | sed \
     -e 's:/:\\:g' \
     -e 's,^\(..*\)\\\([^\\]*\)$,Source: "\1\\\2"; DestDir: "{app}\\\1",g' \
     -e 's,^\([^\\]*\)$,Source: "\1"; DestDir: "{app}",g' \
     -e 's,^\(.*\.[oib]".*\),\1; Components: objects,g' \
     -e 's,^\(.*\.p\)s\(".*\),\1df\2; Components: print,g' \
     -e 's,^\(.*\.info.*".*\),\1; Components: info,g')
   
   [Icons]
   ; Parameter quick reference:
   ;   "Icon title", "File name", "Parameters", "Working dir (can leave blank)",
   ;   "Custom icon filename (leave blank to use the default icon)", Icon index
   Name: "{group}\Gforth"; Filename: "{app}\gforth.exe"; WorkingDir: "{app}"
   Name: "{group}\Gforth-fast"; Filename: "{app}\gforth-fast.exe"; WorkingDir: "{app}"
   Name: "{group}\Gforth-dict"; Filename: "{app}\gforth-dict.exe"; WorkingDir: "{app}"
   Name: "{group}\Gforth-itc"; Filename: "{app}\gforth-itc.exe"; WorkingDir: "{app}"
   Name: "{group}\Gforth Manual"; Filename: "{app}\doc\gforth\index.html"; WorkingDir: "{app}"; Components: help
   Name: "{group}\Gforth Manual (PDF)"; Filename: "{app}\doc\gforth.pdf"; WorkingDir: "{app}"; Components: help
   Name: "{group}\VMgen Manual"; Filename: "{app}\doc\vmgen\index.html"; WorkingDir: "{app}"; Components: help
   Name: "{group}\Bash"; Filename: "{app}\sh.exe"; WorkingDir: "{app}"
   Name: "{group}\Uninstall Gforth"; Filename: "{uninstallexe}"
   
   [Run]
   Filename: "{app}\sh.exe"; WorkingDir: "{app}"; Parameters: "-c ""./gforthmi.sh || read"""
   Filename: "{app}\sh.exe"; WorkingDir: "{app}"; Parameters: "-c ""./gforth fixpath.fs gforth-fast.exe || read"""
   Filename: "{app}\sh.exe"; WorkingDir: "{app}"; Parameters: "-c ""./gforth fixpath.fs gforth-ditc.exe || read"""
   Filename: "{app}\sh.exe"; WorkingDir: "{app}"; Parameters: "-c ""./gforth fixpath.fs gforth-itc.exe || read"""
   Filename: "{app}\sh.exe"; WorkingDir: "{app}"; Parameters: "-c ""./gforth-fast fixpath.fs gforth.exe || read"""
   
   [UninstallDelete]
   Type: files; Name: "{app}\gforth.fi"
   Type: files; Name: "{app}\temp-image.fi1"
   Type: files; Name: "{app}\temp-image.fi2"
   
   [Registry]
   Root: HKLM; Subkey: "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"; ValueType: expandsz; ValueName: "Path"; ValueData: "{olddata};{app}"; Check: NeedsAddPath(ExpandConstant('{app}'))
   
   ;[Registry]
   ;registry commented out
   ; WorkingDir: "{app}"; Parameter quick reference:
   ;   "Root key", "Subkey", "Value name", Data type, "Data", Flags
   ;HKCR, ".fs"; STRING, "forthstream",
   ;HKCR, ".fs", "Content Type", STRING, "application/forth",
   ;HKCR, ".fb"; STRING, "forthblock",
   ;HKCR, ".fb", "Content Type", STRING, "application/forth-block",
   ;HKCR, "forthstream"; STRING, "Forth Source",
   ;HKCR, "forthstream", "EditFlags", DWORD, "00000000",
   ;HKCR, "forthstream\DefaultIcon"; STRING, "{sys}\System32\shell32.dll,61"
   ;HKCR, "forthstream\Shell"; STRING, ""
   ;HKCR, "forthstream\Shell\Open\command"; STRING, "{app}\gforth.exe %1"
   ;HKCR, "forthblock"; STRING, "Forth Block",
   ;HKCR, "forthblock", "EditFlags", DWORD, "00000000",
   ;HKCR, "forthblock\DefaultIcon"; STRING, "{sys}\System32\shell32.dll,61"
   
   [Code]
   function NeedsAddPath(Param: string): boolean;
   var
     OrigPath: string;
   begin
     if not RegQueryStringValue(HKEY_LOCAL_MACHINE,'SYSTEM\CurrentControlSet\Control\Session Manager\Environment', 'Path', OrigPath)
     then begin
       Result := True;
       exit;
     end;
     // look for the path with leading and trailing semicolon
     // Pos() returns 0 if not found
     Result := Pos(';' + UpperCase(Param) + ';', ';' + UpperCase(OrigPath) + ';') = 0;  
     if Result = True then
        Result := Pos(';' + UpperCase(Param) + '\;', ';' + UpperCase(OrigPath) + ';') = 0; 
   end;
   EOT
   
   sed -e 's/$/\r/' <README >README.txt

Removed from v.1.2  
changed lines
  Added in v.1.31


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>