Page 1 of 1

vlc does not start without the full path (commandline WinXP)

Posted: 18 Feb 2006 23:44
by winspool
Hi.
When I try to start start vlc (0.8.4a and nightly 20060218) from the commandline without the full Path, vlc does not start (WinXP and wine). (the VLC-Directory in in the Path and my cd is somewhere else)

WinXPsp2 does not Print any text on the commandline

wine:

Code: Select all

~/wine.cvs/dosdevices/c:$ wine vlc.exe VLC media player 0.8.5-svn-20060218-0001 Janus [00000026] main interface error: no interface module matched "hotkeys,none" [00000026] main interface error: no suitable intf module [00000001] main vlc error: interface "hotkeys,none" initialization failed [00000027] main interface error: no interface module matched "any" [00000027] main interface error: no suitable intf module [00000001] main vlc error: interface "(null)" initialization failed

When I try to start vlc.exe with the full Path, vlc comes up on WinXP and wine. (Example: "c:\Programme\VideoLAN\VLC\vlc.exe")

when using "vlc.exe" on WinME, vlc start succesful.
argv[0] includes the full Path on WinME, but not on WinXP and wine.

Possible Solution may be GetModuleFileName(NULL....) instead of argv[0]

Any Ideas/comments?

--
By by ... Detlef

Posted: 19 Feb 2006 03:31
by DJ
The DOS box when entering DOS commands does NOT recognize long file names!

So the command would be: "c:\progra~1\videolan\vlc\vlc" and any options you want including a path to the media and file name.

:lol:

Posted: 19 Feb 2006 04:15
by tonsofpcs
try running with -vvv and looking at the very very verbose output

Posted: 19 Feb 2006 12:49
by winspool
try running with -vvv and looking at the very very verbose output
I started with a clean "Application Data\vlc":

Code: Select all

detlef@p4:~/wine.cvs/dosdevices/c:$ wine vlc.exe -vvv VLC media player 0.8.4a Janus [00000001] main vlc debug: opening config file c:\windows\profiles\detlef\Anwendungsdaten/vlc/vlcrc [00000001] main vlc warning: config file c:\windows\profiles\detlef\Anwendungsdaten/vlc/vlcrc does not exist yet [00000001] main vlc debug: checking builtin modules [00000001] main vlc debug: checking plugin modules [00000001] main vlc debug: loading plugins cache file c:\windows\profiles\detlef\Anwendungsdaten/vlc/cache/plugins-04041e.dat [00000001] main vlc warning: could not open plugins cache file c:\windows\profiles\detlef\Anwendungsdaten/vlc/cache/plugins-04041e.dat for reading [00000001] main vlc debug: recursively browsing `C:\modules' [00000001] main vlc debug: recursively browsing `C:\plugins' [00000001] main vlc debug: module bank initialized, found 14 modules ... [00000026] main interface debug: looking for interface module: 0 candidates [00000026] main interface error: no interface module matched "hotkeys,none" [00000026] main interface error: no suitable intf module [00000001] main vlc error: interface "hotkeys,none" initialization failed [00000027] main interface debug: looking for interface module: 0 candidates [00000027] main interface error: no interface module matched "any" [00000027] main interface error: no suitable intf module [00000001] main vlc error: interface "(null)" initialization failed
IMHO, "c:\plugins" and "C:\modules" are the problems. The same
is for the "locale", but there is no message from vlc about this.

when starting vlc.exe with the full path, "plugins" and "modules"
(and also "locale") have the correct path:

Code: Select all

detlef@p4:~/wine.cvs/drive_c$ wine Programme/VideoLAN/VLC/vlc.exe -vvv VLC media player 0.8.4a Janus [00000001] main vlc debug: opening config file c:\windows\profiles\detlef\Anwendungsdaten/vlc/vlcrc [00000001] main vlc warning: config file c:\windows\profiles\detlef\Anwendungsdaten/vlc/vlcrc does not exist yet [00000001] main vlc debug: checking builtin modules [00000001] main vlc debug: checking plugin modules [00000001] main vlc debug: loading plugins cache file c:\windows\profiles\detlef\Anwendungsdaten/vlc/cache/plugins-04041e.dat[00000001] main vlc warning: could not open plugins cache file c:\windows\profiles\detlef\Anwendungsdaten/vlc/cache/plugins-04041e.dat for reading [00000001] main vlc debug: recursively browsing `C:\Programme\VideoLAN\VLC\modules' [00000001] main vlc debug: recursively browsing `C:\Programme\VideoLAN\VLC\plugins' [00000001] main vlc debug: module bank initialized, found 209 modules
WinXP does not help at all (vlc is silent):

Code: Select all

d:>vlc.exe -vvv d:\>which vlc.exe c:\Programme\VideoLAN\VLC\vlc.exe d:>
Thanks for your Help
--
By by ... Detlef

Posted: 19 Feb 2006 13:06
by winspool
The DOS box when entering DOS commands does NOT recognize long file names!
The DOS-Box recognize long names for me since win95...
So the command would be: "c:\progra~1\videolan\vlc\vlc" and any options you want including a path to the media and file name.

:lol:
That's the BUG: I must include the full Path

Expected:
just a simple "vlc.exe" works

--
By by ... Detlef

Posted: 19 Feb 2006 14:52
by dionoea
it's not a bug. No programs work without including the full path in the dos shell, unless you put it in one of the directories listed in the PATH environement variable.

Use

Code: Select all

echo %PATH%
to check that. If you want to add the VLC directory to the path, run

Code: Select all

set PATH=%PATH%;"C:\Program Files\VideoLAN\VLC\"
.

To change the default path: open "System Properties", go on the "Advanced" tab, click "Environement Variables" and change the PATH.

hth,

vlc must started with full Path to work from the commandline

Posted: 19 Feb 2006 23:57
by winspool
it's not a bug. No programs work without including the full path in the dos shell, unless you put it in one of the directories listed in the PATH environement variable.
Quotes from my Messages:
(the VLC-Directory in in the Path and my cd is somewhere else)
d:\>which vlc.exe
c:\Programme\VideoLAN\VLC\vlc.exe
Once Again the Bug in vlc:
vlc must started with the full Path to work from the commandline (Windows XP and wine)
On win9x (95/98/ME), the OS supplied the full Path in argv[0], but that is not the case for Windows XP.

It would be nice, if someone with write-Access to the trac-system can open a ticket.

vlc in the AppDB of wine: http://appdb.winehq.org/appview.php?versionId=4271

--
By by ... Detlef

bug is in: src/misc/win32_specific.c: system_Init

Posted: 20 Feb 2006 00:49
by winspool
it's not a bug. No programs work without including the full path in the dos shell, unless you put it in one of the directories listed in the PATH environement variable.
I searched the source and found the bug in misc/win32_specific.c (system_Init):

Code: Select all

#else if( ppsz_argv[0] ) { GetFullPathName( ppsz_argv[0], MAX_PATH, psz_path, &psz_vlc ); } else if( !GetModuleFileName( NULL, psz_path, MAX_PATH ) ) { psz_path[0] = '\0'; } #endif if( (psz_vlc = strrchr( psz_path, '\\' )) ) *psz_vlc = '\0'; p_this->p_libvlc->psz_vlcpath = strdup( psz_path );
From MSDN: http://msdn.microsoft.com/library/defau ... thname.asp
GetFullPathName merges the name of the current drive and directory with a specified file name
When my current Directory is "c:\", GetFullPathname() returns "c:\vlc.exe", and finaly
p_this->p_libvlc->psz_vlcpath is "c:\".

Because of this Bug, vlc searches "c:\locale" (silent) and
[00000001] main vlc debug: recursively browsing `C:\modules'
[00000001] main vlc debug: recursively browsing `C:\plugins'

Fix: Throw away the Part around "GetFullPathName()"

Code: Select all

#else if( !GetModuleFileName( NULL, psz_path, MAX_PATH ) ) { psz_path[0] = '\0'; } #endif
It would be fine to see an fixed vlc soon.
Thanks.
--
By by ... Detlef Riekenberg

Re: bug is in: src/misc/win32_specific.c: system_Init

Posted: 01 Mar 2006 00:53
by winspool
Hi dionoea.

http://trac.videolan.org/vlc/changeset/14452
:D

Works great. Thanks for the fast fix.

--
By by ... Detlef

Posted: 01 Mar 2006 11:18
by dionoea
I actually reverted that commit as it seems that it broke the mozilla plugin... i'll have to test a little bit more.

Posted: 01 Mar 2006 20:52
by ipkiss
Why not using the --plugins-path command-line option (or maybe --plugin-path, i never remember)?