Better error message than "Kernel failed to load!"

git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@2495 8092fc87-c524-0410-9efc-e669fe64eaf9
This commit is contained in:
mcmartin
2006-11-11 15:57:31 +00:00
parent 193314f2ef
commit eadd6cfcca
4 changed files with 13 additions and 5 deletions
+1
View File
@@ -1,4 +1,5 @@
Changes towards version 0.6:
- Better error message for 'Kernel failed to load' (#917) - Michael
- Pushbutton for connecting to netplay, in anticipation of a full
configuration dialog later - Michael
- Cleanup of comm.c - SvdB
+5 -4
View File
@@ -53,6 +53,8 @@ uio_DirHandle *configDir;
uio_DirHandle *saveDir;
uio_DirHandle *meleeDir;
char baseContentPath[PATH_MAX];
uio_DirList *availableAddons;
extern uio_Repository *repository;
@@ -116,7 +118,6 @@ prepareContentDir (const char *contentDirName, const char **addons)
{
const char *testFile = "version";
const char *loc;
char path[PATH_MAX];
if (contentDirName == NULL)
{
@@ -140,16 +141,16 @@ prepareContentDir (const char *contentDirName, const char **addons)
exit (EXIT_FAILURE);
}
if (expandPath (path, sizeof path, loc, EP_ALL_SYSTEM) == -1)
if (expandPath (baseContentPath, sizeof baseContentPath, loc, EP_ALL_SYSTEM) == -1)
{
log_add (log_Fatal, "Fatal error: Could not expand path to content "
"directory: %s", strerror (errno));
exit (EXIT_FAILURE);
}
log_add (log_Debug, "Using '%s' as base content dir.", path);
log_add (log_Debug, "Using '%s' as base content dir.", baseContentPath);
mountContentDir (repository, path, addons);
mountContentDir (repository, baseContentPath, addons);
}
void
+1
View File
@@ -46,6 +46,7 @@ extern uio_DirHandle *contentDir;
extern uio_DirHandle *configDir;
extern uio_DirHandle *saveDir;
extern uio_DirHandle *meleeDir;
extern char baseContentPath[PATH_MAX];
extern uio_DirList *availableAddons;
+6 -1
View File
@@ -35,6 +35,8 @@
#include "libs/tasklib.h"
#include "libs/log.h"
#include "uqmversion.h"
#include "options.h"
// Open or close the periodically occuring QuasiSpace portal.
// A seperate thread is always inside this function when the player
@@ -275,7 +277,10 @@ while (--ac > 0)
}
else
{
log_add (log_Fatal, "Kernel failed to load!");
log_add (log_Fatal, "\n *** FATAL ERROR: Could not load basic content ***\n\nUQM requires at least the base content pack to run properly.");
log_add (log_Fatal, "This file is typically called uqm-%d.%d.0.uqm. UQM was expecting it", UQM_MAJOR_VERSION, UQM_MINOR_VERSION);
log_add (log_Fatal, "in the %s/packages directory.", baseContentPath);
log_add (log_Fatal, "Either your installation did not install the content pack at all, or it\ninstalled it in a different directory.\n\nFix your installation and rerun UQM.\n\n *******************\n");
}
FreeKernel ();