1: #!/bin/bash
2: # This is the horror shell script to create an automatic install for
3: # Windoze.
4: # Note that I use sed to create a setup file
5:
6: # use iss.sh >iss.txt
7: # copy the resulting iss.txt to the location of your Windows installation
8: # of Gforth, and start the setup compiler there.
9:
10: cat <<EOT
11: ; This is the setup script for 4stack on Windows
12: ; Setup program is Inno Setup
13:
14: [Setup]
15: Bits=32
16: AppName=Gforth
17: AppVerName=gforth 0.5.0
18: AppCopyright=Copyright © 1995-2000 by Free Software Foundation
19: DefaultDirName=gforth
20: DefaultGroupName=Gforth
21: AllowNoIcons=1
22: LicenseFile=COPYING
23:
24: [Dirs]
25: $(make distfiles -f Makedist | tr ' ' '\n' | (while read i; do
26: while [ ! -z "$i" ]
27: do
28: if [ -d $i ]; then echo $i; fi
29: if [ "${i%/*}" != "$i" ]; then i="${i%/*}"; else i=""; fi
30: done
31: done) | sort -u | sed \
32: -e 's:/:\\:g' \
33: -e 's:^\(..*\)$:{app}\\\1:g')
34:
35: [Files]
36: ; Parameter quick reference:
37: ; "Source filename", "Dest. filename", Copy mode, Flags
38: "README.txt", "{app}\README.txt", copy_normal, flag_isreadme
39: "cygwin1.dll", "{app}\cygwin1.dll", copy_normal,
40: "gforth.fi", "{app}\gforth.fi", copy_normal,
41: $(make distfiles -f Makedist | tr ' ' '\n' | (while read i; do
42: if [ ! -d $i ]; then echo $i; fi
43: done) | sed \
44: -e 's:/:\\:g' \
45: -e 's:^\(..*\)$:"\1", "{app}\\\1", copy_normal,:g')
46:
47: [Icons]
48: ; Parameter quick reference:
49: ; "Icon title", "File name", "Parameters", "Working dir (can leave blank)",
50: ; "Custom icon filename (leave blank to use the default icon)", Icon index
51: "Gforth", "{app}\gforth.exe", "", "{app}", , 0
52: "Gforth-fast", "{app}\gforth-fast.exe", "", "{app}", , 0
53:
54: [Run]
55: "{app}\gforth.exe", "{app}\fixpath.fs {app} gforth-fast.exe",
56: "{app}\gforth.exe", "{app}\fixpath.fs {app} gforth-ditc.exe",
57: "{app}\gforth-fast.exe", "{app}\fixpath.fs {app} gforth.exe",
58:
59: [Registry]
60: ; Parameter quick reference:
61: ; "Root key", "Subkey", "Value name", Data type, "Data", Flags
62: HKCR, ".fs", "", STRING, "forthstream",
63: HKCR, ".fs", "Content Type", STRING, "application/forth",
64: HKCR, ".fb", "", STRING, "forthblock",
65: HKCR, ".fb", "Content Type", STRING, "application/forth-block",
66: HKCR, "forthstream", "", STRING, "Forth Source",
67: HKCR, "forthstream", "EditFlags", DWORD, "00000000",
68: HKCR, "forthstream\DefaultIcon", "", STRING, "{sys}\System32\shell32.dll,61"
69: HKCR, "forthstream\Shell", "", STRING, ""
70: HKCR, "forthstream\Shell\Open\command", "", STRING, "{app}\gforth.exe %1"
71: HKCR, "forthblock", "", STRING, "Forth Block",
72: HKCR, "forthblock", "EditFlags", DWORD, "00000000",
73: HKCR, "forthblock\DefaultIcon", "", STRING, "{sys}\System32\shell32.dll,61"
74: EOT
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>