-
Notifications
You must be signed in to change notification settings - Fork 2
/
install-win31
executable file
·237 lines (201 loc) · 5.27 KB
/
install-win31
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
#!/bin/sh
. ./include/rc.sh
copy_if_exists()
{
if [ -f "$1" ]; then
cp "$1" "$2"
fi
}
if [ "$#" -ne 1 ]; then
echo "Usage: $0 DIRECTORY" >&2
echo "DIRECTORY should be empty or non-existant, then it will be created." >&2
echo "Example: $0 /tmp/win31" >&2
exit 1
fi
# dosemu doesn't check the environment variables when this file is not there, seems like a bug
if [ ! -e ${HOME}/.dosemurc ]; then
touch ${HOME}/.dosemurc
fi
mkdir -p $1/c
echo \${DOSEMU_COMMANDS_DIR} > "$1"/e.lnk
if [ ! -d /tmp/dosinst/msdos622 ]; then
./downloaddos -d msdos622 /tmp/dosinst/msdos622
fi
./installdos /tmp/dosinst/msdos622/ $1/c
copy_if_exists /usr/local/share/dosemu/commands/config.sys "$1"/c
copy_if_exists /usr/local/share/dosemu/commands/c/config.sys "$1"/c
copy_if_exists /usr/local/share/dosemu/commands/autoemu.bat "$1"/c
copy_if_exists /usr/share/dosemu/commands/config.sys "$1"/c
copy_if_exists /usr/share/dosemu/commands/config.sys "$1"/c
copy_if_exists /usr/share/dosemu/commands/autoemu.bat "$1"/c
export dosemu__hdimage="$1/*"
./dostricks $1/c/inst/win31 win31
./win31drv $1/c/inst/win31drv
./win31updates $1/c/inst/win31up
export dosemu__X_title="automated_by_$$"
dosemu.bin -o "$1/boot.log" -T -E "xmode -title $dosemu__X_title" --Fdrive_c "$1/c" &
# for older dosemu2 revisions
#dosemu -T --Fdrive_c "$1/c" &
set_window_id $(jobs -p)
#wait_for_text 'C:\\'
#backslash still giving issues
wait_for_text 'Welcome to dosemu2'
type cd \\inst\\win31
press_enter
type setup
press_enter
wait_for_text 'To set up Windows now, press ENTER.'
press_enter
wait_for_text 'To use Custom Setup, press C.'
type c
wait_for_text 'Press ENTER to continue Setup.'
press_enter
# Computer
wait_for_text 'MS-DOS System'
# enable APM
press Up Up Up Up Up Up Up Return
wait_for_text 'To select the computer you want from the following list'
press Down Down Down Down Down Down Down Down Down Down Down Down Down Down Down Return
# Display
wait_for_text 'VGA'
press Up Up Up Up Up Up Return
wait_for_text 'You have asked to change the type of Display to be installed.'
press Down Down Down Down Down Down Down Down Down Down Down Down Down Down Down \
Down Down Down Down Down Down Down Down Down Down Down Down Down Down Down Return
wait_for_text 'Please insert the display driver disk'
press Home
type '\inst\win31drv\video'
press_enter
wait_for_text 'You have chosen to install a display driver provided'
# 1024x768x4 small fonts - doesn't work well in dosemu
#press Return
# 1024x768x4 large fonts - ?
#press Down Return
# 1024x768x8 small fonts
#press Down Down Return
# 1024x768x8 large fonts
#press Down Down Down Return
# 640x480x8
#press Down Down Down Down Down Down Return
# 800x600x8
press Down Down Down Down Down Down Down Down Down Down Down Return
# Mouse
wait_for_text 'Microsoft, or IBM PS/2'
press Up Up Up Up Up Return
wait_for_text 'You have asked to change the type of Mouse to be installed.'
press Down Down Down Down Down Down Down Down Down Down Down Down Down Down Down Return
wait_for_text 'Please insert the mouse driver disk provided'
press Home
type '\inst\win31drv\mouse'
press_enter
wait_for_text 'You have chosen to install a mouse driver provided'
press_enter
wait_for_text 'If all the items in the list are correct, press ENTER'
press_enter
# enter your full name
wait_for_text_ocr full
type User
press alt+o
#verify it's correct
wait_for_text_ocr veri
press alt+o
wait_for_text_ocr selected
press alt+o
# select components
wait_for_text_ocr groups
press alt+o
# Virtual Memory
wait_for_text_ocr temp
press space
# update connfig.sys and autoexec.bat
wait_for_text_ocr ENTER
press alt+o
# confirm above
wait_for_text_ocr 'version'
press space
# choose a printer
wait_for_text_ocr printer
press Tab Tab space
# search applications
wait_for_text_ocr 'hard'
press alt+s
# set name for edit
wait_for_text_ocr ENTER
press_enter
# add all applications
#wait_for_text_ocr hard
sleep 1
press alt+d Return
# Tutorial
wait_for_text_ocr been
press alt+s
# Reboot to finish
wait_for_text_ocr prompt
press alt+r
./win31fixes "$1/c/windows"
# install Euro symbol support
wait_for_text 'Welcome to dosemu2'
type cd '\inst\win31up\win3euro'
press Return
sleep 0.3
type W31
press underscore
type euro
press space
type '\WINDOWS'
press Return
wait_for_text 'Press any key to continue'
press Return
type 'cd \windows'
press Return
# install SB16 driver
tar --extract --xz --file=$1/c/inst/win31drv/audio/sb16.tar.xz --directory=$1/c/
type '\windows\win'
press space
type '\sb16\winsetup'
press Return
wait_for_text_ocr 'the Sound'
press alt+o
wait_for_text_ocr ckup
press alt+p
wait_for_text_ocr 'need to'
press space
sleep 3
# install WinG
press Return
wait_for_text_ocr ptions
press alt+f
press r
type '\inst\win31up\wing\setup.exe'
press Return
wait_for_text_ocr pro
press alt+c alt+c
wait_for_text_ocr pro
press alt+c
wait_for_text_ocr optim
press space
# install V4W
wait_for_text_ocr ptions
press alt+f
press r
type '\inst\win31up\v4w\setup.exe'
press Return
wait_for_text_ocr ideo
press alt+c
wait_for_text_ocr complete
press alt+r
# install IE5
#wait_for_text ptions
#press alt+f
#press r
#type \\inst\\win31ip\\ie5\\setup.exe
#press Return
#memory error
wait_for_text_ocr ptions
press alt+f
press x
press space
sleep 2
type exitemu
press Return
echo Run \'env dosemu__hdimage=\'"$1/*"\' dosemu\' to start DOSEMU2 with the installed system