--- a/bash/first_use +++ b/bash/first_use @@ -23,6 +23,17 @@ export XQUARTZ_VERSION="2.6.3" +fonts_install () # Debian tweak to avoid downloading Microsoft Fonts +{ + if [ ! -e "$REPERTOIRE/configurations/msfonts_installed" ] && [ ! -e "$REPERTOIRE/configurations/msfonts_deb_installed" ] + then + FONTS_WARNING="Microsoft fonts aren't installed.\n\n\ + If you encounter any fonts trouble, you should think about installing\ + the debian package\nttf-mscorefonts-installer (see README.Debian)." + POL_SetupWindow_message "$FONTS_WARNING" "Microsoft fonts" + POL_SetupWindow_Close + fi +} install_fonts () # Install Microsoft Fonts { @@ -281,8 +292,8 @@ [ "$POL_OS" == "Mac" ] && [ ! -e "/Applications/Utilities/XQuartz.app" ] && [ "$OSX_VERSION" = "10" ] && install_x11 [ "$POL_OS" == "Mac" ] && [ "$OSX_VERSION" = "9" ] && install_x11 -install_fonts +fonts_install install_prefix POL_SetupWindow_message "$(eval_gettext 'Thank you for using $APPLICATION_TITLE')" "$(eval_gettext '$APPLICATION_TITLE first use')" POL_SetupWindow_Close -$(POL_Config_Write FIRST_USE TRUE) \ No newline at end of file +$(POL_Config_Write FIRST_USE TRUE) --- a/bash/startup +++ b/bash/startup @@ -22,6 +22,38 @@ [ "$PLAYONLINUX" = "" ] && exit 0 source "$PLAYONLINUX/lib/sources" +install_debfonts () # Debian tweak to avoid downloading Microsoft Fonts +{ + if [ ! -e "$REPERTOIRE/configurations/msfonts_installed" ] && [ ! -e "$REPERTOIRE/configurations/msfonts_deb_installed" ] + then + DEBFONTS="/usr/share/fonts/truetype/msttcorefonts" + if [ ! -d $DEBFONTS ] + then + rm $HOME/.PlayOnLinux/fonts/ -r 2> /dev/null + rm $HOME/.PlayOnLinux/fonts 2> /dev/null + rm $HOME/.PlayOnLinux/configurations/fonts_installed 2> /dev/null + rm $HOME/.PlayOnLinux/configurations/msfonts_deb_installed 2> /dev/null + fi + if [ -d $DEBFONTS ] + then + rm $HOME/.PlayOnLinux/fonts/ -r 2> /dev/null + rm $HOME/.PlayOnLinux/fonts 2> /dev/null + rm $HOME/.PlayOnLinux/configurations/fonts_installed 2> /dev/null + FONTDIR=$HOME/.PlayOnLinux/fonts/ + mkdir -p $FONTDIR + OLDDIR="$PWD" + cd $DEBFONTS + for ttf in * + do + ln -s $DEBFONTS/$ttf $FONTDIR/$ttf + done + cd $OLDDIR + touch "$HOME/.PlayOnLinux/configurations/msfonts_deb_installed" + fi + fi +} + + # POL / POM won't work without that construire_repertoire_personnel # Initialize link between python and bash @@ -43,5 +75,6 @@ fi fi +install_debfonts # First use ? [ "$(POL_Config_Read FIRST_USE)" = "" ] && bash "$PLAYONLINUX/bash/first_use"