Opened 13 years ago

Closed 13 years ago

Last modified 12 months ago

#8553 closed patch

Hardcoded path for theme files

Reported by: wjp Owned by: wjp
Priority: normal Component: GUI
Keywords: Cc:
Game:

Description

Since 0.9.0, scummvm comes with a number of data files
(modern.ini, modern.zip) that it has to be able to find.
On most linux systems, the default place to put such
files is $prefix/share/scummvm.

I'd like to add this directory to the standard search
path for themes, and was thinking of the following:

* add 'datadir' to configure similar to the current
'mandir'/'bindir'.
(So with a --datadir switch, defaulting to /usr/share.)

* add -DDATA_PATH=\"$_datadir/scummvm\" to the compiler
flags, or maybe put it in config.h.

* let ThemeNew.cpp call addDefaultDirectory(DATA_PATH) if
DATA_PATH is defined.

The attached patch implements this, and I have in fact
added this to the Fedora Core packages for 0.9.0.

Any comments/suggestions? Would this be useful for other
platforms as well? If so, please add a reply about which
directory your platform could use.

Ticket imported from: #1521412. Ticket imported from: patches/658.

Attachments (1)

scummvm090_theme.diff (1.5 KB ) - added by wjp 13 years ago.
patch v1

Download all attachments as: .zip

Change History (6)

by wjp, 13 years ago

Attachment: scummvm090_theme.diff added

patch v1

comment:1 by fingolfin, 13 years ago

It might be useful for debian, too, and other Linux distros. But since I am not a
linux user, I won't comment further.

comment:2 by fingolfin, 13 years ago

Since nobody else seems to be inclined, I'll comment some more after all.
First off, the basic idea seems to be a good one.

However, the #define shouldn't be done by modifying CXXFLAGS. We have the
DEFINES variable for that purpose instead.

But it would probably be even better to write it to config.h instead. Which
right now is a PITA to do, and it is somewhat odd that for some variables we
use -DFOO while others are placed into config.h ... I'll ponder this a bit.

comment:3 by wjp, 13 years ago

I changed it to use DEFINES instead of CPPFLAGS and
committed it to both the trunk and the 0.9.x branch.

comment:4 by wjp, 13 years ago

Owner: set to wjp
Status: newclosed

comment:5 by digitall, 12 months ago

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