source: trunk/dports/gnustep/gnustep/files/config-gnustep-user.sh @ 26267

Last change on this file since 26267 was 26267, checked in by yves@…, 13 years ago

Some fixes for you know what

  • Property svn:eol-style set to native
File size: 3.2 KB
Line 
1#!/bin/sh
2
3# some fancy term output methods
4have_tput=true
5if [ $TERM = "vt100" ]
6        then
7        t_bold="tput smso"
8        t_norm="tput rmso"
9elif `echo $TERM | grep -q xterm`
10        then
11        t_bold="tput bold"
12        t_norm="tput sgr0"
13else
14        have_tput=false
15fi
16if $have_tput
17        then
18        t_clear="tput clear"
19        $t_clear
20fi
21
22$t_clear
23
24. /opt/local/GNUstep/System/Library/Makefiles/GNUstep.sh
25
26$t_bold
27echo
28echo "Welcome to the G E C H S C U"
29$t_norm
30echo
31echo "(GNUstep environment configuration helper script for the common user)"
32
33sleep 2
34
35echo
36echo
37
38#
39# ask for timezone
40#
41echo
42echo
43echo "Please enter your timezone"
44echo -n 'or type "list" for a list of available zones or "enter" : '
45read
46zone=${REPLY:-false}
47if [ $zone != false ]
48        then
49        if [ $zone = "list" ]
50                then
51                cat $GNUSTEP_SYSTEM_ROOT/Library/Libraries/gnustep-base/Versions/1.14/Resources/NSTimeZones/regions | awk '{print $2}' | more
52                echo
53                echo -n 'you can enter timezone right now or "enter" to continue : '
54                read
55                zone=${REPLY:-false}
56        fi
57fi
58if [ $zone != false ]
59        then
60        $t_bold
61        if ! `grep -q $zone $GNUSTEP_SYSTEM_ROOT/Library/Libraries/gnustep-base/Versions/1.14/Resources/NSTimeZones/regions`
62                then
63                echo "$zone is not a recognized region name"
64                zone=false
65        else
66                echo Timezone = $zone
67        fi
68        $t_norm
69fi
70
71echo
72echo
73
74if [ ! -d $GNUSTEP_USER_ROOT/Library/WindowMaker ]
75        then
76        echo -n "Installing WindowMaker resources ... "
77        mkdir $GNUSTEP_USER_ROOT
78        wmaker.inst
79        echo "Done"
80fi
81echo "Setting AntiAliased text in WindowMaker"
82def=$GNUSTEP_USER_ROOT/Defaults/WindowMaker
83sed '/AntialiasedText/ s/NO/YES/' $def > $def.new
84mv -f $def.new $def
85
86echo
87echo
88
89echo "Setting some GNUstep environment defaults ... "
90sleep 2
91echo "System fonts    : Bitstream Vera"
92gdefaults write NSGlobalDomain NSFont 'BitstreamVeraSans-Roman'
93gdefaults write NSGlobalDomain NSBoldFont 'BitstreamVeraSans-Bold'
94gdefaults write NSGlobalDomain NSItalicFont 'BitstreamVeraSans-Oblique'
95gdefaults write NSGlobalDomain NSBoldItalicFont 'BitstreamVeraSans-BoldOblique'
96gdefaults write NSGlobalDomain NSUserFixedPitchFont 'BitstreamVeraSansMono-Roman'
97sleep 2
98echo "Font size       : 10"
99gdefaults write NSGlobalDomain NSFontSize '10'
100
101if [ $zone != false ]
102        then
103        sleep 2
104    echo "Local Time Zone : $zone"
105        gdefaults write NSGlobalDomain "Local Time Zone" $zone
106fi
107
108sleep 2
109echo "XShm            : disabled"
110gdefaults write NSGlobalDomain XWindowBufferUseXShm NO
111
112sleep 2
113bundledir="$GNUSTEP_SYSTEM_ROOT/Library/Bundles"
114echo "Resetting GSAppKitUserBundles (in NSGlobalDomain)"
115defaults write NSGlobalDomain GSAppKitUserBundles "($bundledir/Camaelon.themeEngine, $bundledir/EtoileMenus.bundle, $bundledir/EtoileBehavior.bundle)"
116sleep 2
117echo "Setting User Interface Theme to Nesedah (in Camaelon domain)"
118gdefaults write Camaelon Theme Nesedah
119
120defaults write GWorkspace NoWarnOnQuit YES
121defaults write NSGlobalDomain GSWorkspaceApplication "NotExist.app"
122
123echo
124
125sleep 2
126echo
127echo "All done !"
128
129
130sleep 2
131echo
132echo "Note that even though the GNUstep environment is set"
133sleep 2
134echo "You may need to reset it if you experience DYLD errors when trying to start a GNUstep app"
135sleep 2
136echo "You can do so with '. $GNUSTEP_SYSTEM_ROOT/Library/Makefiles/GNUstep.sh'"
137sleep 2
138
139echo
140echo
141echo "Have a nice day !"
142
143echo
144echo
Note: See TracBrowser for help on using the repository browser.