diff --git a/build/premake/premake.exe b/build/premake/premake.exe index 250ac8f774..7e58da837d 100755 Binary files a/build/premake/premake.exe and b/build/premake/premake.exe differ diff --git a/build/premake/premake.lua b/build/premake/premake.lua index 44e66143eb..492f5ad449 100755 --- a/build/premake/premake.lua +++ b/build/premake/premake.lua @@ -4,6 +4,7 @@ dofile("../functions.lua") project.name = "pyrogenesis" project.bindir = "../../../binaries/system" project.libdir = "../../../binaries/system" +project.debugdir = "../../../binaries/data" project.configs = { "Debug", "Release", "Testing" } -- Start the package part diff --git a/build/premake/src/Premake.vcproj b/build/premake/src/Premake.vcproj index e6da3a8e88..290a79aa25 100644 --- a/build/premake/src/Premake.vcproj +++ b/build/premake/src/Premake.vcproj @@ -67,7 +67,7 @@ diff --git a/build/premake/src/Src/project.c b/build/premake/src/Src/project.c index 8644269c7b..6a4b4080b2 100644 --- a/build/premake/src/Src/project.c +++ b/build/premake/src/Src/project.c @@ -285,6 +285,7 @@ static int finishProject() project->path = getString(getProject(), "path"); project->binaries = getString(getProject(), "bindir"); project->libraries = getString(getProject(), "libdir"); + project->debugfiles = getString(getProject(), "debugdir"); optlist = getArray(-1, "options"); project->numOptions = getArraySize(optlist); diff --git a/build/premake/src/Src/project.h b/build/premake/src/Src/project.h index c10b3549c3..f9034e94b5 100644 --- a/build/premake/src/Src/project.h +++ b/build/premake/src/Src/project.h @@ -60,6 +60,7 @@ typedef struct _Project const char* name; const char* binaries; const char* libraries; + const char* debugfiles; const char* path; Package** package; Option** option; diff --git a/build/premake/src/Src/vs7.c b/build/premake/src/Src/vs7.c index f1e60826ee..ded6ea25f8 100644 --- a/build/premake/src/Src/vs7.c +++ b/build/premake/src/Src/vs7.c @@ -479,7 +479,20 @@ static int writeVcProject(int version, Package* package) writeList(file, config->libPaths, ";", "", "", checkDir, NULL); fprintf(file, "\"\n"); fprintf(file, " GenerateDebugInformation=\"%s\"\n", symbols ? "TRUE" : "FALSE"); - if (symbols) fprintf(file, " ProgramDatabaseFile=\"obj\\%s\\%s.pdb\"\n", config->name, getFilename(config->target, 0)); + + if (symbols) + { + if (project->debugfiles) + { + fprintf(file, " ProgramDatabaseFile=\""); + fprintf(file, reversePath(path, project->debugfiles, WIN32)); + fprintf(file, "%s.pdb\"\n", getFilename(config->target, 0)); + } + else + { + fprintf(file, " ProgramDatabaseFile=\"obj\\%s\\%s.pdb\"\n", config->name, getFilename(config->target, 0)); + } + } fprintf(file, " SubSystem=\"%d\"\n", subsystem); if (!debug) fprintf(file, " OptimizeReferences=\"2\"\n"); if (!debug) fprintf(file, " EnableCOMDATFolding=\"2\"\n"); diff --git a/build/workspaces/update-workspaces.bat b/build/workspaces/update-workspaces.bat index 77fcacec6b..dd2af3c037 100755 --- a/build/workspaces/update-workspaces.bat +++ b/build/workspaces/update-workspaces.bat @@ -9,17 +9,23 @@ REM Change to the lua project name, this must correspond to the base file name REM of the created project files SET PROJECT=pyrogenesis -CD premake -premake --target vs6 -MOVE %PROJECT%.dsw ..\vc6 -MOVE %PROJECT%.dsp ..\vc6 +cd ..\premake -premake --target vs7 -move %PROJECT%.sln ..\vc7 -move %PROJECT%.vcproj ..\vc7 +REM Minor hack to make sure the relative paths are correct: +mkdir tmp +copy premake.lua tmp +cd tmp -premake --target vs2003 -move %PROJECT%.sln ..\vc2003 -move %PROJECT%.vcproj ..\vc2003 +..\premake --target vs6 +move %PROJECT%.dsw ..\..\workspaces\vc6 +move %PROJECT%.dsp ..\..\workspaces\vc6 -cd .. +..\premake --target vs7 +move %PROJECT%.sln ..\..\workspaces\vc7 +move %PROJECT%.vcproj ..\..\workspaces\vc7 + +..\premake --target vs2003 +move %PROJECT%.sln ..\..\workspaces\vc2003 +move %PROJECT%.vcproj ..\..\workspaces\vc2003 + +cd ..\..\workspaces