⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 configure.sh

📁 可以播放MP3,wma等文件格式的播放器
💻 SH
📖 第 1 页 / 共 2 页
字号:
#!/bin/sh## Configures Apollo for compilation## The Apollo Team <team@apolloplayer.org>PROJECT="Apollo"CACHE=".cache"LOGFILE=".log"TMAKE_DEF="tmake"QMAKE_DEF="qmake"TMAKE=$TMAKE_DEFPRO_FILE="apollo.pro"MAKE_CLEAN="true"BUILD="release"# Read previous settings if anyif [ -f $CACHE ]; then    echo "Reading cached settings"    echo     . $CACHEfi# Check parametersfor arg in $*; do    case $arg in	--help|-h)	    echo "Usage: $0 [options]"	    echo	    echo "Options: -h"	    echo "         --help              This message"	    echo "         --release           Build for release(default)"	    echo "         --debug             Build for debug"	    echo "         --make-clean        Always run \"make clean\"(default)"	    echo "         --no-make-clean     Do not run \"make clean\""	    echo "         --with-tmake        Use TMake for making the Makefile (default)"	    echo "         --with-qmake        Use QMake for making the Makefile (Qt3.0++)"	    echo "         --with-qt-dir=DIR   Where the root of Qt is installed (default "'$QTDIR'")"	    echo "         --with-stl[=DIR]    Add STL support with optional dir for include"	    echo "         --detect-stl        Detect if STL can be used"	    echo "         --without-stl       Do not add STL support"	    echo "         --with-kde2[=DIR]   Add KDE 2 support with optional dir for include"	    echo "         --without-kde2      Do not add KDE 2 support"	    echo "         --detect-kde2       Detect whether KDE 2 can be used (default)"	    echo "         --enable-buffer     Enable buffer setting for mpg123"	    echo "         --disable-buffer    Disable buffer setting for mpg123 (default)"	    echo "         --with-id3=DIR      Set id3lib directory"	    echo "         --with-mad=DIR      Enable mad"	    exit 1	    ;;	--release)	    BUILD="release"	    ;;	--debug)	    BUILD="debug"	    ;;	--make-clean)	    MAKE_CLEAN="true"	    ;;	--no-make-clean)	    MAKE_CLEAN="false"	    ;;	--with-tmake)            TMAKE_SET=1	    ;;	--with-qmake)            TMAKE_SET=2	    ;;	--with-qt-dir*)	    if echo $arg | grep -e "--with-qt-dir=" >/dev/null; then		QTDIR=`echo $arg | sed 's/--with-qt-dir=/\1/'`	    else		echo "$arg: requires a directory"	    fi	    ;;	--with-stl*)	    if echo $arg | grep -e "--with-stl=" >/dev/null; then		STL=`echo $arg | sed 's/--with-stl=/\1/'`	    else		STL="true"	    fi	    unset NO_STL	    ;;	--detect-stl)	    unset STL	    ;;	--without-stl)	    NO_STL="true"	    ;;	--with-kde2*)	    if echo $arg | grep -e "--with-kde2=" >/dev/null; then		KDE=`echo $arg | sed 's/--with-kde2=/\1/'`	    else		KDE="true"	    fi	    unset NO_KDE	    ;;	--detect-kde2)	    unset KDE	    unset NO_KDE	    ;;	--without-kde2)	    NO_KDE="true"	    ;;	--enable-buffer)	    USE_BUFFER="true"	    ;;	--disable-buffer)	    unset USE_BUFFER	    ;;	--with-id3*)	    if echo $arg | grep -e "--with-id3=" >/dev/null; then		ID3DIR=`echo $arg | sed 's/--with-id3=//'`		if test ! -d $ID3DIR ; then		    echo "id3 directory $ID3DIR does not exist"		    unset ID3DIR		fi	    else		unset ID3DIR	    fi	    ;;	--with-mad*)	    if echo $arg | grep -e "--with-mad=" >/dev/null; then		MADDIR=`echo $arg | sed 's/--with-mad=//'`		if test ! -d $MADDIR ; then		    echo "mad directory $MADDIR does not exist"		    MADDIR=""		fi	    else		echo "$arg: requires a directory"	    fi	    ;;	*)	    echo "$arg: unkown option"            $0 -h	    exit 1	    ;;    esac;donecase $TMAKE_SET in    1)	TMAKE=$TMAKE_DEF	;;    2)	TMAKE=$QMAKE_DEF	;;esac# Store the settingsif [ -f $CACHE ]; then    rm $CACHEfiecho "BUILD=$BUILD" >> $CACHEecho "MAKE_CLEAN=$MAKE_CLEAN" >> $CACHEif [ ! -z $QTDIR ]; then    echo "QTDIR=$QTDIR" >> $CACHEfiif [ ! -z $STL ]; then    echo "STL=$STL" >> $CACHEfiif [ ! -z $NO_STL ]; then    echo "NO_STL=$NO_STL" >> $CACHEfiif [ ! -z $KDE ]; then    echo "KDE=$KDE" >> $CACHEfiif [ ! -z $NO_KDE ]; then    echo "NO_KDE=$NO_KDE" >> $CACHEfiif [ ! -z $USE_BUFFER ]; then    echo "USE_BUFFER=$USE_BUFFER" >> $CACHEfiif [ ! -z $TMAKE_SET ]; then    echo "TMAKE_SET=$TMAKE_SET" >> $CACHEfi# Setup tmake settingsTMAKE_WARNING="warn_off"# if [ "$BUILD" == "debug" ]; then#     TMAKE_WARNING="warn_on"# fiTMAKE_CONF="CONFIG += $BUILD $TMAKE_WARNING"DEFTMAKEPATH="/usr/share/tmake"DEFLOCALTMAKEPATH="/usr/local/share/tmake"DEFTMAKELIBPATH="/usr/lib/tmake"DEFTMAKELOCALLIBPATH="/usr/local/lib/tmake"DEFTMAKESUSEPATH="/usr/lib/tmake/linux-g++/"DEFTMAKEMANDRAKEPATH="/usr/lib/tmake/lib/linux-g++/"TMAKE_FOUND=QMAKE_PATH=unset QMAKE_QMAKEwhich $TMAKE &>/dev/nullTMAKE_SEARCH_RESULT=$?if [ $TMAKE_SEARCH_RESULT -eq 1 -a "$TMAKE" == "$QMAKE_DEF" ]; then    PATH=$QTDIR/bin:$PATH which $TMAKE &>/dev/null    TMAKE_SEARCH_RESULT=$?    if [ $TMAKE_SEARCH_RESULT -eq 0 ]; then        echo "It seems that $TMAKE is not present in the default path,"	echo "however it was found among the Qt installation."	echo "$0 will add $QTDIR/bin"	echo "to the current path while building."	echo	echo "It's recommened that you add this to your path"	echo "by editing your shell config."	echo	echo "For bash or zsh do:"	echo "export \$PATH=\$PATH:$QTDIR/bin"	echo "For csh do:"	echo "setenv \$PATH \$PATH:$QTDIR/bin"	echo	QMAKE_QMAKE=$QTDIR/bin/$QMAKE_DEF	QMAKE_PATH=$QTDIR/bin    fifiif [ $TMAKE_SEARCH_RESULT -eq 1 ]; then    if [ $TMAKE = $TMAKE_DEF ]; then	which $QMAKE_DEF &>/dev/null	if [ $? -eq 0 ]; then	    TMAKE_FOUND=true  	    TMAKE=$QMAKE_DEF	    echo "TMake not found, switching to QMake"	fi    else	which $TMAKE_DEF &>/dev/null	if [ $? -eq 0 ]; then	    TMAKE_FOUND=true  	    TMAKE=$TMAKE_DEF	    echo "QMake not found, switching to TMake"	fi    fielse    TMAKE_FOUND=truefi# Check for tmakeif [ "$TMAKE" == "$TMAKE_DEF" ]; then    if [ -z $TMAKEPATH ]; then	if [ ! -d "$DEFTMAKEPATH" -a ! \	       -d "$DEFLOCALTMAKEPATH" -a ! \	       -d "$DEFTMAKELIBPATH" -a ! \	       -d "$DEFTMAKELOCALLIBPATH" -a ! \	       -d "$DEFTMAKEMANDRAKEPATH" -a ! \               -d "$DEFTMAKESUSEPATH"] ; then	    echo	    echo	    echo '   The enviroment variable $TMAKEPATH is not set and the default'	    echo "   tmake dirs $DEFTMAKEPATH, $DEFLOCALTMAKEPATH, $DEFTMAKELOCALLIBPATH or "	    echo "   $DEFTMAKELIBPATH cannot be found."	    echo '   This means that tmake is not installed or not properly setup.'	    echo '   TMake requires this to be set to create the Makefile.'	    echo '   You can get tmake from'	    echo '    http://www.trolltech.com/products/download/freebies/tmake.html'	    echo	    echo	    exit 1	elif [ ! -f "$DEFTMAKEPATH/tmake.conf" -a ! \	         -f "$DEFLOCALTMAKEPATH/tmake.conf" -a ! \		 -f "$DEFTMAKELIBPATH/tmake.conf" -a ! \		 -f "$DEFTMAKELOCALLIBPATH/tmake.conf" -a ! \	         -f "$DEFTMAKEMANDRAKEPATH" -a ! \                 -f "$DEFTMAKESUSEPATH"] ; then	    echo	    echo    	    echo '   The enviroment variable $TMAKEPATH is not set, but one of the default'	    echo "   tmake dirs $DEFTMAKEPATH, $DEFLOCALTMAKEPATH, $DEFTMAKELOCALLIBPATH, "	    echo "   $DEFTMAKELIBPATH, $DEFTMAKEMANDRAKEPATH, or $DEFTMAKESUSEPATH was found."	    echo "   Did NOT however find a tmake.conf, the tmake configuration file.  It might"	    echo "   be in a platform dependent subdirectory such as linux-g++.  Find the"	    echo "   directory, set $TMAKEPATH and run configure.sh again." 	    echo "   (export TMAKEPATH=/usr/lib/tmake/linux-g++/)." 	    echo	    echo	    exit 1	fi    fifiif [ -z $TMAKE_FOUND ]; then    echo    echo    echo "   TMake cannot be found in binary path, please make sure it's properly installed"    echo '   You can get tmake from'    echo '   http://www.trolltech.com/products/download/freebies/tmake.html'    echo    echo    exit 1fi# Check for Qt enviroment variablesif [ -z $QTDIR ]; then    echo    echo    echo '   The enviroment variable $QTDIR is not set, and the --with-qt-dir=DIRPATH'    echo '   switch is not used.  '$PROJECT' (and Qt programs) requires this to be set'    echo '   to compile. Read the Qt documentation for more information.'    echo    echo    exit 1fi# Find a make commandif ( which gmake &>/dev/null )then    MAKE=gmakeelse    if ( which make &>/dev/null )    then	MAKE=make    else	echo "You don't seem to have 'make' or 'gmake' in your PATH."	echo "Cannot proceed."	exit 1    fifiecho "Configuring $PROJECT:"echo "Building for "$BUILDrm -rf $LOGFILErm -rf $LOGFILE-kderm -rf $LOGFILE-stlrm -rf $LOGFILE-qtrm -rf $LOGFILE-id3CHECK="Checking whether"CHECK_FOR="Checking for"INCLUDES=""DEFINES=""SOURCES=""HEADERS=""LIBRARIES=""

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -