(svn r15095) -Add [NoAI]: allow AI Libraries to be in .tar files (subdir required, as with AIs
-Add [NoAI]: allow multiple versions of the same AI co-exist -Change [NoAI]: updated the whole method of AI (Library) finding and loading; it is now much more clear and transparent -Change [NoAI]: the name of the AI is now the name used by CreateInstance() -Change [NoAI]: make the AI finder a bit more clever, mostly related to version finding
This commit is contained in:
@@ -361,7 +361,7 @@ FILE *FioFOpenFile(const char *filename, const char *mode, Subdirectory subdir,
|
||||
}
|
||||
|
||||
/* We can only use .tar in case of data-dir, and read-mode */
|
||||
if (f == NULL && (subdir == DATA_DIR || subdir == AI_DIR) && mode[0] == 'r') {
|
||||
if (f == NULL && (subdir == DATA_DIR || subdir == AI_DIR || subdir == AI_LIBRARY_DIR) && mode[0] == 'r') {
|
||||
static const uint MAX_RESOLVED_LENGTH = 2 * (100 + 100 + 155) + 1; // Enough space to hold two filenames plus link. See 'TarHeader'.
|
||||
char resolved_name[MAX_RESOLVED_LENGTH];
|
||||
|
||||
@@ -772,6 +772,8 @@ void ScanForTarFiles()
|
||||
num += ScanPathForTarFiles(path, strlen(path));
|
||||
FioAppendDirectory(path, MAX_PATH, sp, AI_DIR);
|
||||
num += ScanPathForTarFiles(path, strlen(path));
|
||||
FioAppendDirectory(path, MAX_PATH, sp, AI_LIBRARY_DIR);
|
||||
num += ScanPathForTarFiles(path, strlen(path));
|
||||
}
|
||||
DEBUG(misc, 1, "Scan complete, found %d files", num);
|
||||
}
|
||||
|
Reference in New Issue
Block a user