summaryrefslogtreecommitdiff
blob: 1fd1a609d0d52b09129b8811da7e9eac911268aa (plain)
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
#!/bin/bash
# The wineX wrapper

# Kindly distributed by Martin Schlemmer
# Modified by phoen][x

export INSTALLDIR="/usr/lib/winex-cvs"

export WINEPREFIX="$HOME/.winex-cvs"

export LD_LIBRARY_PATH="$INSTALLDIR/lib/wine:$INSTALLDIR/lib:$LD_LIBRARY_PATH"
export WINEDLLPATH="$LD_LIBRARY_PATH"

export WINE_LOADER=wine

export RUNWINE="$INSTALLDIR/bin/wine" 
export REGAPI="$INSTALLDIR/bin/regapi" 

if [ ! -f $WINEPREFIX/config ]
then
	echo "!! ~/.winex-cvs/config misses"
	echo "!! Setting up a config file"

	mkdir -p $WINEPREFIX/fake_windows

	# First copy in the new config file.
	cp "$INSTALLDIR/.data/config" "$WINEPREFIX/config"

	echo "!! Setting up ~/.winex-cvs/fake_windows/"
	cp -R $INSTALLDIR/.data/fake_windows/* $WINEPREFIX/fake_windows

	echo "!! Setting up default registry."	
	"$REGAPI" setValue < "$INSTALLDIR/.data/winedefault.reg" &> /dev/null

	echo "!! Installation complete."
	echo "!! Modify ~/.winex-cvs/config to reflect your systems setup."
	exit
fi

# Force the use of the more memory-efficient MSVC 5 allocator with
# any programs that use MSVCRT.  This reduces memory consumption
# significantly.
export __MSVCRT_HEAP_SELECT=__GLOBAL_HEAP_SELECTED,2


PATH="$INSTALLDIR/bin:$PATH"

"$RUNWINE" --debugmsg -all "$@"