mirror of
https://github.com/mpv-player/mpv
synced 2025-01-29 19:22:48 +00:00
Applied DATADIR patch by Vladimir Kushnir
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@1354 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
56c90f5349
commit
7882ea9bad
10
configure
vendored
10
configure
vendored
@ -116,6 +116,8 @@ usage: $0 [options]
|
||||
params:
|
||||
--cc use this C compiler to build MPlayer [gcc]
|
||||
--prefix=DIR use this prefix for installing mplayer [/usr/local]
|
||||
--datadir=DIR use this prefix for installing machine independent
|
||||
data [/usr/local/share/mplayer]
|
||||
--enable-debug[=1-3] compile debugging information into mplayer [disable]
|
||||
--enable-profile compile profiling information into mplayer [disable]
|
||||
--enable-mmx build with mmx support [autodetect]
|
||||
@ -915,6 +917,7 @@ $_cc $_extraincdir $_extralibdir -o $TMPO -lesd $TMPC 2> /dev/null || { _esd=no;
|
||||
# check for the parameters.
|
||||
|
||||
_prefix="/usr/local"
|
||||
_datadir=$_prefix"/share/mplayer"
|
||||
|
||||
for ac_option
|
||||
do
|
||||
@ -1141,6 +1144,9 @@ do
|
||||
--prefix=*)
|
||||
_prefix=`echo $ac_option | cut -d '=' -f 2`
|
||||
;;
|
||||
--datadir=*)
|
||||
_datadir=`echo $ac_option | cut -d '=' -f 2`
|
||||
;;
|
||||
--cc=*)
|
||||
;;
|
||||
--as=*)
|
||||
@ -1249,6 +1255,7 @@ fi
|
||||
|
||||
# to screen.
|
||||
echo "Install prefix: $_prefix"
|
||||
echo "Data directory: $_datadir"
|
||||
if [ "$host_arch" = i386 ]; then
|
||||
echo "Checking for cpu vendor ... $pvendor ( $pfamily:$pmodel:$pstepping )"
|
||||
echo "Checking for cpu type ... $pname"
|
||||
@ -1722,6 +1729,9 @@ cat > $CCONF << EOF
|
||||
|
||||
/* -------- Generated by ./configure ----------- */
|
||||
|
||||
/* Common data directory (for fonts, etc) */
|
||||
#define DATADIR "$_datadir"
|
||||
|
||||
/* Define for using new DivX4Linux library, instead of open-source OpenDivX */
|
||||
/* You have to change DECORE_LIBS in config.mak too! */
|
||||
#undef NEW_DECORE
|
||||
|
@ -110,41 +110,40 @@ while(fgets(sor,1020,f)){
|
||||
}
|
||||
}
|
||||
|
||||
if(strcmp(section,"[fpath]")==0){
|
||||
if(pdb==1){
|
||||
desc->fpath=strdup(p[0]);
|
||||
continue;
|
||||
}
|
||||
} else
|
||||
|
||||
if(strcmp(section,"[files]")==0){
|
||||
if(pdb==2 && strcmp(p[0],"alpha")==0){
|
||||
char *cp,*cp2;
|
||||
if (!(cp=get_path("font/"))) return NULL;
|
||||
if (!(cp2=malloc(strlen(cp)+strlen(p[1])+1))) {
|
||||
free(cp);
|
||||
return NULL;
|
||||
}
|
||||
sprintf(cp2,"%s%s",cp,p[1]);
|
||||
if(!((desc->pic_a[fontdb]=load_raw(cp2,verbose)))){
|
||||
char *cp;
|
||||
if (!(cp=malloc(strlen(desc->fpath)+strlen(p[1])+2))) return NULL;
|
||||
|
||||
snprintf(cp,strlen(desc->fpath)+strlen(p[1])+2,"%s/%s",
|
||||
desc->fpath,p[1]);
|
||||
if(!((desc->pic_a[fontdb]=load_raw(cp,verbose)))){
|
||||
printf("Can't load font bitmap: %s\n",p[1]);
|
||||
free(cp);
|
||||
free(cp2);
|
||||
return NULL;
|
||||
}
|
||||
free(cp);
|
||||
free(cp2);
|
||||
continue;
|
||||
}
|
||||
if(pdb==2 && strcmp(p[0],"bitmap")==0){
|
||||
char *cp,*cp2;
|
||||
if (!(cp=get_path("font/"))) return NULL;
|
||||
if (!(cp2=malloc(strlen(cp)+strlen(p[1])+1))) {
|
||||
free(cp);
|
||||
return NULL;
|
||||
}
|
||||
sprintf(cp2,"%s%s",cp,p[1]);
|
||||
if(!((desc->pic_b[fontdb]=load_raw(cp2,verbose)))){
|
||||
char *cp;
|
||||
if (!(cp=malloc(strlen(desc->fpath)+strlen(p[1])+2))) return NULL;
|
||||
|
||||
snprintf(cp,strlen(desc->fpath)+strlen(p[1])+2,"%s/%s",
|
||||
desc->fpath,p[1]);
|
||||
if(!((desc->pic_b[fontdb]=load_raw(cp,verbose)))){
|
||||
printf("Can't load font bitmap: %s\n",p[1]);
|
||||
free(cp);
|
||||
free(cp2);
|
||||
return NULL;
|
||||
}
|
||||
free(cp);
|
||||
free(cp2);
|
||||
continue;
|
||||
}
|
||||
} else
|
||||
|
@ -7,6 +7,7 @@ typedef struct {
|
||||
|
||||
typedef struct {
|
||||
char *name;
|
||||
char *fpath;
|
||||
int spacewidth;
|
||||
int charspace;
|
||||
int height;
|
||||
|
@ -568,9 +568,11 @@ if(!filename){
|
||||
|
||||
// check codec.conf
|
||||
if(!parse_codec_cfg(get_path("codecs.conf"))){
|
||||
fprintf(stderr,"(copy/link DOCS/codecs.conf to ~/.mplayer/codecs.conf)\n");
|
||||
if(!parse_codec_cfg(DATADIR"/codecs.conf")){
|
||||
printf("(copy/link DOCS/codecs.conf to ~/.mplayer/codecs.conf)\n");
|
||||
GUI_MSG( mplCodecConfNotFound )
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
// check font
|
||||
@ -580,6 +582,8 @@ if(!parse_codec_cfg(get_path("codecs.conf"))){
|
||||
} else {
|
||||
// try default:
|
||||
vo_font=read_font_desc(get_path("font/font.desc"),font_factor,verbose>1);
|
||||
if(!vo_font)
|
||||
vo_font=read_font_desc(DATADIR"/font/font.desc",font_factor,verbose>1);
|
||||
}
|
||||
|
||||
// check .sub
|
||||
|
Loading…
Reference in New Issue
Block a user