-
Notifications
You must be signed in to change notification settings - Fork 22
/
ring3k.in
executable file
·71 lines (65 loc) · 1.34 KB
/
ring3k.in
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
#!/bin/sh
#
# ring3k - a user mode kernel for windows executables
#
# Copyright 2007-2009 (C) Mike McCormack
#
# ring3k Launch script
#
# Checks that the c: drive directory is present
# then launches the kernel binary
# from Wine's launch script
appdir=""
case "$0" in
*/*)
# $0 contains a path, use it
appdir=`dirname "$0"`
;;
*)
# no directory in $0, search in PATH
saved_ifs=$IFS
IFS=:
for d in $PATH
do
IFS=$saved_ifs
if [ -x "$d/$0" ]
then
appdir="$d"
break
fi
done
;;
esac
# find the kernel
kernel="$appdir/ring3k-bin"
if test \! -x "$kernel"
then
kernel="$appdir/kernel/ring3k-bin"
if test \! -x "$appdir"
then
echo "ring3k-bin not found in $appdir"
exit 1
fi
fi
# check for a c: link
if test \! -d "drive"
then
extract="$appdir/ring3k-setup"
if test -r "$extract"
then
. "$extract"
else
echo "c: not present and ring3k-setup script not found"
exit 2
fi
fi
# update minitris when it changes to help testing ...
#winlogon_replacement="programs/minitris/minitris.exe"
#winlogon_replacement="programs/winemine/winemine.exe"
winlogon_replacement="programs/clock/clock.exe"
if test -f "$winlogon_replacement"
then
echo "Replacing winlogon.exe with $winlogon_replacement"
cp -f "$winlogon_replacement" "drive/winnt/system32/winlogon.exe"
fi
exec "$kernel" $*