3 # Install Window Maker for the current user
6 # directory where system wide configuration is stored
7 GLOBALDIR
="#pkgdatadir#"
23 cat << EOF >> $ISCRIPT
24 # Window Maker default X session startup script
28 # If you login from xdm, uncomment this to make error messages appear
29 # in the console window.
31 # tail -f $HOME/.xsession-errors > /dev/console
41 # Copy files considering special cases
46 file=`basename $source`
48 if [ "$file" = "WMRootMenu" ]; then
49 echo \"$GSDIR/Library
/WindowMaker
/menu
\" > \
51 elif [ "$file" = "WindowMaker" ]; then
52 sed -e "s|~/GNUstep|$GSDIR|g" $source > $target
54 if test "x$GNUSTEP_USER_ROOT" = "x"; then
57 sed -e "s|~/GNUstep|$GSDIR|g" $source > $target
64 echo "Installing WindowMaker $VERSION for current user..."
67 if [ ! -d $GLOBALDIR ]; then
68 echo "Could not find global configurations files"
69 echo "Make sure you've installed Window Maker correctly"
73 if [ ! -d "$USERDIR" ]; then
74 echo "Could not find user directory $USERDIR"
79 if test "x$GNUSTEP_USER_ROOT" = "x"; then
81 GSDIR
=$USERDIR/GNUstep
82 if [ ! -d $GSDIR ]; then
83 echo "Creating $GSDIR user directory"
87 GSDIR
=$GNUSTEP_USER_ROOT
88 if [ ! -d $GSDIR ]; then
89 echo "Directory specified in GNUSTEP_USER_ROOT environment variable does not exist"
97 if [ ! -d "$GSDIR/.AppInfo" ]; then
98 make_dir
$GSDIR/.AppInfo
101 if [ ! -d "$GSDIR/Defaults" ]; then
102 make_dir
$GSDIR/Defaults
105 echo "Copying defaults database..."
107 FILES
=`(cd $GLOBALDIR/Defaults;ls *)`
110 if [ -f $GSDIR/Defaults
/$i ]; then
111 echo "The configuration file \"$i\" already exists in your defaults database."
112 echo "Do you wish to replace it? <y/n/a> [n] $all"
113 if [ "$all" != "a" ]; then
115 if [ "$foo" = "a" -o "$foo" = "A" ]; then
119 if [ "$foo" = "y" -o "$foo" = "Y" -o "$all" = "a" ]; then
120 copy
$GLOBALDIR/Defaults
/$i $GSDIR/Defaults
/$i
123 copy
$GLOBALDIR/Defaults
/$i $GSDIR/Defaults
/$i
128 if [ ! -d "$GSDIR/Library/Icons/" ]; then
129 echo "Creating icon library directory $GSDIR/Library/Icons"
130 if [ ! -d $GSDIR/Library
]; then
131 make_dir
$GSDIR/Library
133 make_dir
$GSDIR/Library
/Icons
137 if [ ! -d "$GSDIR/Library/WindowMaker/" ]; then
138 echo "Creating WindowMaker data library directory $GSDIR/Library/WindowMaker"
139 if [ ! -d $GSDIR/Library
]; then
140 make_dir
$GSDIR/Library
142 make_dir
$GSDIR/Library
/WindowMaker
145 if [ ! -d "$GSDIR/Library/WindowMaker/Styles" ]; then
146 echo "Creating style library $GSDIR/Library/WindowMaker/Styles"
147 make_dir
$GSDIR/Library
/WindowMaker
/Styles
151 if [ ! -d "$GSDIR/Library/WindowMaker/Themes" ]; then
152 echo "Creating theme library $GSDIR/Library/WindowMaker/Themes"
153 make_dir
$GSDIR/Library
/WindowMaker
/Themes
158 if [ ! -d "$GSDIR/Library/WindowMaker/Backgrounds" ]; then
159 echo "Creating bg image library $GSDIR/Library/WindowMaker/Backgrounds"
160 make_dir
$GSDIR/Library
/WindowMaker
/Backgrounds
162 echo "Default Backgrounds directory already exists. Skipping..."
166 if [ ! -d "$GSDIR/Library/WindowMaker/IconSets" ]; then
167 echo "Creating icon setup library $GSDIR/Library/WindowMaker/IconSets"
168 make_dir
$GSDIR/Library
/WindowMaker
/IconSets
170 echo "Default IconSets directory already exists. Skipping..."
174 if [ ! -d "$GSDIR/Library/WindowMaker/Pixmaps" ]; then
175 echo "Creating pixmap library $GSDIR/Library/WindowMaker/Pixmaps"
176 make_dir
$GSDIR/Library
/WindowMaker
/Pixmaps
178 echo "Default Pixmaps directory already exists. Skipping..."
182 if [ ! -d "$GSDIR/Library/WindowMaker/Sounds" ]; then
183 echo "Creating sound library $GSDIR/Library/WindowMaker/Sounds"
184 make_dir
$GSDIR/Library
/WindowMaker
/Sounds
186 echo "Default Sounds directory already exists. Skipping..."
190 if [ ! -d "$GSDIR/Library/WindowMaker/SoundSets" ]; then
191 echo "Creating sound set library $GSDIR/Library/WindowMaker/SoundSets"
192 make_dir
$GSDIR/Library
/WindowMaker
/SoundSets
194 echo "Default SoundSets directory already exists. Skipping..."
198 if test -z #LITE# ; then
200 if [ -f "$GSDIR/Library/WindowMaker/$i" ]; then
201 echo "The file \"$i\" already exists in $GSDIR/Library/WindowMaker"
202 echo "Do you wish to replace it? <y/n/a> [n] $all"
203 if [ "$all" != "a" ]; then
205 if [ "$foo" = "a" -o "$foo" = "A" ]; then
209 if [ "$foo" = "y" -o "$foo" = "Y" -o "$foo" = "a" ]; then
210 copy
$GLOBALDIR/$i $GSDIR/Library
/WindowMaker
/$i
213 copy
$GLOBALDIR/$i $GSDIR/Library
/WindowMaker
/$i
218 cp $GLOBALDIR/README
$GSDIR/Library
/WindowMaker
219 cp -i $GLOBALDIR/autostart.sh
$GSDIR/Library
/WindowMaker
/autostart
220 chmod +rx
$GSDIR/Library
/WindowMaker
/autostart
223 #######################
225 DATE
=`date +%m%d%H%M`
230 echo "Installation Finished"
232 if test -z #LITE# ; then
233 echo "There are menus in 2 different file formats. The plain text format and"
234 echo "the property list format. The plain text format is more flexible, but"
235 echo "the menu in the property list format can be edited graphically. The"
236 echo "menu that will be used by default is the plain text. Read"
237 echo "$GSDIR/Library/WindowMaker/README for information on how to change it."
239 echo "Your copy of Window Maker is configured especially for KDE."
240 echo "Window Maker application menus are not available."
244 if test -z `grep wmaker ~/.xinitrc`; then
249 trap "show_end_message;exit" 2
252 echo "Now the .xinitrc, .Xclients or .xsession script must be updated so that"
253 echo "it calls wmaker when you start an X session."
254 echo "Type the name of the file that must be changed (normally .xinitrc)."
255 echo "If the file already exists, it will be backed up with a .old.$DATE extension"
256 echo "If you want to edit it by hand, hit <Control>-C now."
259 if test "x$file" = "x"; then
260 echo "Using .xinitrc as a default value"
264 if [ -f $USERDIR/$file ]; then
265 mv $USERDIR/$file $USERDIR/$file.old.
$DATE
268 make_script
$USERDIR/$file