mirror of https://github.com/mpv-player/mpv
renames: DATADIR->MPLAYER_DATADIR, CONFDIR->MPLAYER_CONFDIR, LIBDIR->MPLAYER_LIBDIR
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@10273 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
fbf7cf9162
commit
ed9296d845
|
@ -188,7 +188,7 @@ void guiInit( void )
|
|||
wsXInit( (void *)mDisplay );
|
||||
// --- load skin
|
||||
skinDirInHome=get_path("Skin");
|
||||
skinMPlayerDir=DATADIR "/Skin";
|
||||
skinMPlayerDir=MPLAYER_DATADIR "/Skin";
|
||||
printf("SKIN dir 1: '%s'\n",skinDirInHome);
|
||||
printf("SKIN dir 2: '%s'\n",skinMPlayerDir);
|
||||
if ( !skinName ) skinName=strdup( "default" );
|
||||
|
@ -405,7 +405,7 @@ void guiLoadFont( void )
|
|||
vo_font=read_font_desc( font_name,font_factor,0 );
|
||||
if ( !vo_font )
|
||||
{
|
||||
gfree( (void **)&font_name ); font_name=gstrdup( DATADIR"/font/font.desc" );
|
||||
gfree( (void **)&font_name ); font_name=gstrdup(MPLAYER_DATADIR "/font/font.desc" );
|
||||
vo_font=read_font_desc( font_name,font_factor,0 );
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5432,9 +5432,9 @@ $_def_hpux_scsi_h
|
|||
$_def_stddef
|
||||
|
||||
/* Common data directory (for fonts, etc) */
|
||||
#define DATADIR "$_datadir"
|
||||
#define CONFDIR "$_confdir"
|
||||
#define LIBDIR "$_libdir"
|
||||
#define MPLAYER_DATADIR "$_datadir"
|
||||
#define MPLAYER_CONFDIR "$_confdir"
|
||||
#define MPLAYER_LIBDIR "$_libdir"
|
||||
|
||||
/* Define this to compile stream-caching support, it can be enabled via
|
||||
-cache <kilobytes> */
|
||||
|
|
|
@ -1464,7 +1464,7 @@ mp_input_init(void) {
|
|||
|
||||
if(! mp_input_parse_config(file)) {
|
||||
// Try global conf dir
|
||||
file = CONFDIR"/input.conf";
|
||||
file = MPLAYER_CONFDIR "/input.conf";
|
||||
if(! mp_input_parse_config(file))
|
||||
mp_msg(MSGT_INPUT,MSGL_WARN,"Falling back on default (hardcoded) input config\n");
|
||||
}
|
||||
|
|
|
@ -160,11 +160,11 @@ int init_audio(sh_audio_t *sh_audio,char* codecname,char* afm,int status){
|
|||
ad_functions_t *funcs_sym;
|
||||
ad_info_t *info_sym;
|
||||
|
||||
buf_len = strlen(LIBDIR)+strlen(sh_audio->codec->drv)+16;
|
||||
buf_len = strlen(MPLAYER_LIBDIR)+strlen(sh_audio->codec->drv)+16;
|
||||
buf = malloc(buf_len);
|
||||
if (!buf)
|
||||
break;
|
||||
snprintf(buf, buf_len, "%s/mplayer/ad_%s.so", LIBDIR, sh_audio->codec->drv);
|
||||
snprintf(buf, buf_len, "%s/mplayer/ad_%s.so", MPLAYER_LIBDIR, sh_audio->codec->drv);
|
||||
mp_msg(MSGT_DECAUDIO, MSGL_DBG2, "Trying to open external plugin: %s\n", buf);
|
||||
sh_audio->dec_handle = dlopen(buf, RTLD_LAZY);
|
||||
if (!sh_audio->dec_handle)
|
||||
|
@ -181,7 +181,7 @@ int init_audio(sh_audio_t *sh_audio,char* codecname,char* afm,int status){
|
|||
free(buf);
|
||||
mpadec = funcs_sym;
|
||||
mp_msg(MSGT_DECAUDIO, MSGL_V, "Using external decoder plugin (%s/mplayer/ad_%s.so)!\n",
|
||||
LIBDIR, sh_audio->codec->drv);
|
||||
MPLAYER_LIBDIR, sh_audio->codec->drv);
|
||||
}
|
||||
#endif
|
||||
if(!mpadec){ // driver not available (==compiled in)
|
||||
|
|
|
@ -187,11 +187,11 @@ int init_video(sh_video_t *sh_video,char* codecname,char* vfm,int status){
|
|||
vd_functions_t *funcs_sym;
|
||||
vd_info_t *info_sym;
|
||||
|
||||
buf_len = strlen(LIBDIR)+strlen(sh_video->codec->drv)+16;
|
||||
buf_len = strlen(MPLAYER_LIBDIR)+strlen(sh_video->codec->drv)+16;
|
||||
buf = malloc(buf_len);
|
||||
if (!buf)
|
||||
break;
|
||||
snprintf(buf, buf_len, "%s/mplayer/vd_%s.so", LIBDIR, sh_video->codec->drv);
|
||||
snprintf(buf, buf_len, "%s/mplayer/vd_%s.so", MPLAYER_LIBDIR, sh_video->codec->drv);
|
||||
mp_msg(MSGT_DECVIDEO, MSGL_DBG2, "Trying to open external plugin: %s\n", buf);
|
||||
sh_video->dec_handle = dlopen(buf, RTLD_LAZY);
|
||||
if (!sh_video->dec_handle)
|
||||
|
@ -207,7 +207,7 @@ int init_video(sh_video_t *sh_video,char* codecname,char* vfm,int status){
|
|||
free(buf);
|
||||
mpvdec = funcs_sym;
|
||||
mp_msg(MSGT_DECVIDEO, MSGL_V, "Using external decoder plugin (%s/mplayer/vd_%s.so)!\n",
|
||||
LIBDIR, sh_video->codec->drv);
|
||||
MPLAYER_LIBDIR, sh_video->codec->drv);
|
||||
}
|
||||
#endif
|
||||
if(!mpvdec){ // driver not available (==compiled in)
|
||||
|
|
|
@ -22,7 +22,6 @@
|
|||
#include <sys/wait.h>
|
||||
#include "../osdep/shmem.h"
|
||||
#else
|
||||
#undef DATADIR
|
||||
#include <windows.h>
|
||||
static DWORD WINAPI ThreadProc(void* s);
|
||||
#endif
|
||||
|
|
|
@ -39,7 +39,6 @@
|
|||
#include <sys/types.h>
|
||||
|
||||
#if defined( WIN32 )
|
||||
# undef DATADIR /* clashes with /usr/include/w32api/objidl.h */
|
||||
# include <windows.h>
|
||||
# include <winioctl.h>
|
||||
#elif defined ( SYS_OS2 )
|
||||
|
|
|
@ -157,7 +157,7 @@ while(fgets(sor,1020,f)){
|
|||
} else
|
||||
|
||||
if(strcmp(section,"[files]")==0){
|
||||
char *default_dir=DATADIR"/font";
|
||||
char *default_dir=MPLAYER_DATADIR "/font";
|
||||
if(pdb==2 && strcmp(p[0],"alpha")==0){
|
||||
char *cp;
|
||||
if (!(cp=malloc(strlen(desc->fpath)+strlen(p[1])+2))) return NULL;
|
||||
|
|
|
@ -905,7 +905,7 @@ static int load_sub_face(char *name, FT_Face *face)
|
|||
if (err) {
|
||||
err = FT_New_Face(library, get_path("subfont.ttf"), 0, face);
|
||||
if (err) {
|
||||
err = FT_New_Face(library, DATADIR"/subfont.ttf", 0, face);
|
||||
err = FT_New_Face(library, MPLAYER_DATADIR "/subfont.ttf", 0, face);
|
||||
if (err) {
|
||||
mp_msg(MSGT_OSD, MSGL_ERR, "New_Face failed. Maybe the font path is wrong.\nPlease supply the text font file (~/.mplayer/subfont.ttf).\n" );
|
||||
return -1;
|
||||
|
|
|
@ -709,7 +709,7 @@ int vidix_preinit(const char *drvname,void *server)
|
|||
printf("vosub_vidix: You have wrong version of VIDIX library\n");
|
||||
return -1;
|
||||
}
|
||||
vidix_handler = vdlOpen(LIBDIR"/mplayer/vidix/",
|
||||
vidix_handler = vdlOpen(MPLAYER_LIBDIR "/mplayer/vidix/",
|
||||
drvname ? drvname[0] == ':' ? &drvname[1] : drvname[0] ? drvname : NULL : NULL,
|
||||
TYPE_OUTPUT,
|
||||
verbose);
|
||||
|
|
|
@ -377,7 +377,7 @@ unsigned int timer_start;
|
|||
|
||||
// check codec.conf
|
||||
if(!parse_codec_cfg(get_path("codecs.conf"))){
|
||||
if(!parse_codec_cfg(CONFDIR"/codecs.conf")){
|
||||
if(!parse_codec_cfg(MPLAYER_CONFDIR "/codecs.conf")){
|
||||
if(!parse_codec_cfg(NULL)){
|
||||
mp_msg(MSGT_MENCODER,MSGL_HINT,MSGTR_CopyCodecsConf);
|
||||
exit(0);
|
||||
|
@ -443,7 +443,7 @@ if(!parse_codec_cfg(get_path("codecs.conf"))){
|
|||
// 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);
|
||||
vo_font=read_font_desc(MPLAYER_DATADIR "/font/font.desc",font_factor,verbose>1);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
|
10
mplayer.c
10
mplayer.c
|
@ -525,7 +525,7 @@ void parse_cfgfiles( m_config_t* conf )
|
|||
{
|
||||
char *conffile;
|
||||
int conffile_fd;
|
||||
if (m_config_parse_config_file(conf, CONFDIR"/mplayer.conf") < 0)
|
||||
if (m_config_parse_config_file(conf, MPLAYER_CONFDIR "/mplayer.conf") < 0)
|
||||
exit(1);
|
||||
if ((conffile = get_path("")) == NULL) {
|
||||
mp_msg(MSGT_CPLAYER,MSGL_WARN,MSGTR_NoHomeDir);
|
||||
|
@ -866,7 +866,7 @@ int gui_no_filename=0;
|
|||
|
||||
// check codec.conf
|
||||
if(!parse_codec_cfg(get_path("codecs.conf"))){
|
||||
if(!parse_codec_cfg(CONFDIR"/codecs.conf")){
|
||||
if(!parse_codec_cfg(MPLAYER_CONFDIR "/codecs.conf")){
|
||||
if(!parse_codec_cfg(NULL)){
|
||||
mp_msg(MSGT_CPLAYER,MSGL_HINT,MSGTR_CopyCodecsConf);
|
||||
exit(0);
|
||||
|
@ -1038,7 +1038,7 @@ if(!parse_codec_cfg(get_path("codecs.conf"))){
|
|||
// 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);
|
||||
vo_font=read_font_desc(MPLAYER_DATADIR "/font/font.desc",font_factor,verbose>1);
|
||||
}
|
||||
#ifdef HAVE_FREETYPE
|
||||
if (!vo_font)
|
||||
|
@ -1117,8 +1117,8 @@ current_module = NULL;
|
|||
if(menu_init(menu_cfg))
|
||||
mp_msg(MSGT_CPLAYER,MSGL_INFO,"Menu inited: %s\n", menu_cfg);
|
||||
else {
|
||||
if(menu_init(CONFDIR"/menu.conf"))
|
||||
mp_msg(MSGT_CPLAYER,MSGL_INFO,"Menu inited: %s\n", CONFDIR"/menu.conf");
|
||||
if(menu_init(MPLAYER_CONFDIR "/menu.conf"))
|
||||
mp_msg(MSGT_CPLAYER,MSGL_INFO,"Menu inited: %s\n", MPLAYER_CONFDIR"/menu.conf");
|
||||
else {
|
||||
mp_msg(MSGT_CPLAYER,MSGL_INFO,"Menu init failed\n");
|
||||
use_menu = 0;
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
|
||||
#ifndef HAVE_GLOB
|
||||
#ifdef __MINGW32__
|
||||
#undef DATADIR
|
||||
#include <windows.h>
|
||||
#include "glob.h"
|
||||
|
||||
|
|
Loading…
Reference in New Issue