Opened 12 years ago

Closed 12 years ago

Last modified 9 months ago

#8768 closed patch

BUILD: Automate the list of data files to be distributed

Reported by: jvprat Owned by: fingolfin
Priority: normal Component: Ports
Keywords: Cc:
Game:

Description

The attached patch prepares some variables that contain the theme files and the engine data files that should be distributed together with the binaries. Maybe these could be merged in a common "DIST_DATAFILES" variable which also contains pred.dic, since all those files seem to be copied to the same directory.

The case of the engine data files is specially interesting because it just lists the data files needed by the built engines. For example, igor.tbl won't be on the list if configured with the default options.

I've also tried to upgrade ports.mk so that these new variables replace the old behavior.

Ticket imported from: #1862888. Ticket imported from: patches/873.

Attachments (1)

makefile-datafiles.patch (3.2 KB) - added by jvprat 12 years ago.

Download all attachments as: .zip

Change History (12)

Changed 12 years ago by jvprat

Attachment: makefile-datafiles.patch added

comment:1 Changed 12 years ago by fingolfin

Owner: set to lordhoto

comment:2 Changed 12 years ago by fingolfin

One caveat: The OS X bundle copies the "kyra.dat" file to "KYRA.DAT". I haven't tested it, but the reason may have been to avoid problem with the fact that OS X preserves but ignoes the case of filenames. It is a bit odd that the file is named "kyra.dat" in our repository, but the engine tries to load "KYRA.DAT". All other engines use lower case names, I think. Usually, it's not problem because we change the file names to lower case, if the upper case variant fails, but still...

LordHoto, could you do two things in the Kyra engine:
1) Define a macro
#define SUPPORT_FILENAME "KYRA.DAT"
or so in the Kyra engine, and replace all occurance of KYRA.DAT with that,
2) consider switching it to "kyra.dat"

comment:3 Changed 12 years ago by lordhoto

The only reason Kyra uses "KYRA.DAT" instead of "kyra.dat" is that all other files load in Kyra are uppercase, so I used it there too to look more consistent, but I think it should be no problem at all to switch it to kyra.dat, I'll look into it.

comment:4 Changed 12 years ago by lordhoto

Owner: changed from lordhoto to fingolfin

comment:5 Changed 12 years ago by lordhoto

I changed the Kyra code to use "kyra.dat" instead of "KYRA.DAT". I'm assigning this back to Fingolfin then.

comment:6 Changed 12 years ago by fingolfin

Added to trunk. Thanks

comment:7 Changed 12 years ago by fingolfin

Status: newclosed

comment:8 Changed 12 years ago by Kirben

I noticed a problem with this patch:
If ScummVM is built without any engines requiring the engine data files, then the dist targets are broken, since there are no items to actually copy over.

comment:9 Changed 12 years ago by jvprat

Good catch :-\

One way to solve it would be to use a common DIST_DATAFILES and ensure there's always at least one file there (pred.dic and the themes, for example), but it's only valid if all those files are copied to the same target directory (which is the current case).

Another way would be to unify the common parts of the dist targets, and it could test if that variable is empty. I'll try to work on this in a few days.

comment:10 Changed 12 years ago by fingolfin

In addition, it would be nice to unify the installation/distribution of pred.dic. I think right now only AGI really needs it, but strictly speaking it's not engine specific. So we could just always include it in DIST_DATAFILES and thus avoid the issue *g*.

comment:11 Changed 9 months ago by digitall

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