Opened 12 years ago

Closed 12 years ago

Last modified 6 months ago

#3268 closed defect (wontfix)

Modern theme depends on current directory

Reported by: SF/iamdrsbaitso Owned by: Kirben
Priority: normal Component: GUI
Keywords: Cc:
Game:

Description

If ScummVM is launched with a current directory other than the install directory (the one where scummvm.exe is), this error is given:

WARNING: Config 'modern' is NOT usable for themes or not found!
WARNING: falling back to classic style!

And the launcher uses the classic theme.

This usually doesn't come up in with shortcuts (since the shortcut typically sets the start directory to the same one as the target path) but it happens almost all the time if ScummVM is launched from the command line.

Version info:
ScummVM 0.10.0 (Jun 17 2007 11:19:20)
Features compiled in: Vorbis FLAC MP3 zLib MPEG2

To reproduce on Windows (assuming ScummVM is installed in C:\Program Files\ScummVM), open a command prompt and run these commands:

cd \
"C:\Program Files\ScummVM\scummvm.exe"
cd "C:\Program Files\ScummVM"
scummvm.exe

The first execution of ScummVM uses the classic theme; the second uses the modern theme.

Ticket imported from: #1742296. Ticket imported from: bugs/3268.

Change History (6)

comment:1 Changed 12 years ago by Kirben

Component: --Unset--
Owner: set to Kirben
Resolution: wontfix
Status: newclosed

comment:2 Changed 12 years ago by Kirben

Not a supported method of launching ScummVM, as we don't store the install path.

The problem will only occur, when launching ScummVM via a command line, from a location other than the install location. And can be solved, by simply setting the theme path, via the launcher.

If we placed the theme in a common location, it would cause more issues, if people switched between different versions of ScummVM.

comment:3 Changed 12 years ago by fingolfin

Although I wonder, is it possible for a program on Windows to determine the location it resides in, no matter where it was launched from?

comment:4 Changed 12 years ago by Kirben

The GetModuleFileName() function can return the complete path of the current executable file been used. But adding Windows specific code to Theme::loadConfigFile() seems like a kludge.

comment:5 Changed 12 years ago by fingolfin

Aye, that would be a kludge. But adding the exe dir to the search path or setting it as the default theme path, doesn't seem that kludgy to me. On Mac OS X, for example, applications are always distributed in .app bundles, and it is normal for apps to search certain data files inside those.

comment:6 Changed 6 months ago by digitall

Component: --Unset--GUI
Note: See TracTickets for help on using tickets.