mirror of
https://github.com/scummvm/scummvm.git
synced 2026-06-20 05:45:29 +00:00
updated create_project tool for residual, but not tested yet
This commit is contained in:
@@ -34,20 +34,20 @@ CodeBlocksProvider::CodeBlocksProvider(StringList &global_warnings, std::map<std
|
||||
}
|
||||
|
||||
void CodeBlocksProvider::createWorkspace(const BuildSetup &setup) {
|
||||
std::ofstream workspace((setup.outputDir + '/' + "scummvm.workspace").c_str());
|
||||
std::ofstream workspace((setup.outputDir + '/' + "residul.workspace").c_str());
|
||||
if (!workspace)
|
||||
error("Could not open \"" + setup.outputDir + '/' + "scummvm.workspace\" for writing");
|
||||
error("Could not open \"" + setup.outputDir + '/' + "residual.workspace\" for writing");
|
||||
|
||||
workspace << "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\" ?>\n"
|
||||
"<CodeBlocks_workspace_file>\n";
|
||||
|
||||
workspace << "\t<Workspace title=\"ScummVM\">\n";
|
||||
workspace << "\t<Workspace title=\"Residual\">\n";
|
||||
|
||||
writeReferences(workspace);
|
||||
|
||||
// Note we assume that the UUID map only includes UUIDs for enabled engines!
|
||||
for (UUIDMap::const_iterator i = _uuidMap.begin(); i != _uuidMap.end(); ++i) {
|
||||
if (i->first == "scummvm")
|
||||
if (i->first == "residual")
|
||||
continue;
|
||||
|
||||
workspace << "\t\t<Project filename=\"" << i->first << ".cbp\" />\n";
|
||||
@@ -90,16 +90,16 @@ void CodeBlocksProvider::createProjectFile(const std::string &name, const std::s
|
||||
"\t\t<Option compiler=\"gcc\" />\n"
|
||||
"\t\t<Build>\n";
|
||||
|
||||
if (name == "scummvm") {
|
||||
if (name == "residual") {
|
||||
std::string libraries;
|
||||
|
||||
for (StringList::const_iterator i = setup.libraries.begin(); i != setup.libraries.end(); ++i)
|
||||
libraries += processLibraryName(*i) + ".a;";
|
||||
|
||||
project << "\t\t\t<Target title=\"default\">\n"
|
||||
"\t\t\t\t<Option output=\"scummvm\\scummvm\" prefix_auto=\"1\" extension_auto=\"1\" />\n"
|
||||
"\t\t\t\t<Option object_output=\"scummvm\" />\n"
|
||||
"\t\t\t\t<Option external_deps=\"" << libraries /* + list of engines scummvm\engines\name\name.a */ << "\" />\n"
|
||||
"\t\t\t\t<Option output=\"residual\\residual\" prefix_auto=\"1\" extension_auto=\"1\" />\n"
|
||||
"\t\t\t\t<Option object_output=\"residual\" />\n"
|
||||
"\t\t\t\t<Option external_deps=\"" << libraries /* + list of engines residual\engines\name\name.a */ << "\" />\n"
|
||||
"\t\t\t\t<Option type=\"1\" />\n"
|
||||
"\t\t\t\t<Option compiler=\"gcc\" />\n"
|
||||
"\t\t\t\t<Option parameters=\"-d 8 --debugflags=parser\" />\n"
|
||||
@@ -112,8 +112,8 @@ void CodeBlocksProvider::createProjectFile(const std::string &name, const std::s
|
||||
writeWarnings(name, project);
|
||||
writeDefines(setup.defines, project);
|
||||
|
||||
project << "\t\t\t\t\t<Add directory=\"$(SCUMMVM_LIBS)include\" />\n"
|
||||
"\t\t\t\t\t<Add directory=\"$(SCUMMVM_LIBS)include\\SDL\" />\n"
|
||||
project << "\t\t\t\t\t<Add directory=\"$(RESIDUAL_LIBS)include\" />\n"
|
||||
"\t\t\t\t\t<Add directory=\"$(RESIDUAL_LIBS)include\\SDL\" />\n"
|
||||
"\t\t\t\t\t<Add directory=\"..\\..\\engines\" />\n"
|
||||
"\t\t\t\t\t<Add directory=\"..\\..\\common\" />\n"
|
||||
"\t\t\t\t\t<Add directory=\"..\\..\" />\n"
|
||||
@@ -127,21 +127,21 @@ void CodeBlocksProvider::createProjectFile(const std::string &name, const std::s
|
||||
project << "\t\t\t\t\t<Add library=\"" << processLibraryName(*i) << "\" />\n";
|
||||
|
||||
for (UUIDMap::const_iterator i = _uuidMap.begin(); i != _uuidMap.end(); ++i) {
|
||||
if (i->first == "scummvm")
|
||||
if (i->first == "residual")
|
||||
continue;
|
||||
|
||||
project << "\t\t\t\t\t<Add library=\"scummvm\\engines\\" << i->first << "\\lib" << i->first << ".a\" />\n";
|
||||
project << "\t\t\t\t\t<Add library=\"residual\\engines\\" << i->first << "\\lib" << i->first << ".a\" />\n";
|
||||
}
|
||||
|
||||
project << "\t\t\t\t\t<Add directory=\"$(SCUMMVM_LIBS)lib\\mingw\" />\n"
|
||||
"\t\t\t\t\t<Add directory=\"$(SCUMMVM_LIBS)lib\" />\n"
|
||||
project << "\t\t\t\t\t<Add directory=\"$(RESIDUAL_LIBS)lib\\mingw\" />\n"
|
||||
"\t\t\t\t\t<Add directory=\"$(RESIDUAL_LIBS)lib\" />\n"
|
||||
"\t\t\t\t</Linker>\n";
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// Resource compiler
|
||||
project << "\t\t\t\t<ResourceCompiler>\n"
|
||||
"\t\t\t\t\t<Add directory=\"..\\..\\dists\" />\n"
|
||||
"\t\t\t\t\t<Add directory=\"..\\..\\..\\scummvm\" />\n"
|
||||
"\t\t\t\t\t<Add directory=\"..\\..\\..\\residual\" />\n"
|
||||
"\t\t\t\t</ResourceCompiler>\n"
|
||||
"\t\t\t</Target>\n"
|
||||
"\t\t</Build>\n";
|
||||
@@ -150,9 +150,9 @@ void CodeBlocksProvider::createProjectFile(const std::string &name, const std::s
|
||||
|
||||
} else {
|
||||
project << "\t\t\t<Target title=\"default\">\n"
|
||||
"\t\t\t\t<Option output=\"scummvm\\engines\\" << name << "\\lib" << name << "\" prefix_auto=\"1\" extension_auto=\"1\" />\n"
|
||||
"\t\t\t\t<Option output=\"residual\\engines\\" << name << "\\lib" << name << "\" prefix_auto=\"1\" extension_auto=\"1\" />\n"
|
||||
"\t\t\t\t<Option working_dir=\"\" />\n"
|
||||
"\t\t\t\t<Option object_output=\"scummvm\" />\n"
|
||||
"\t\t\t\t<Option object_output=\"residual\" />\n"
|
||||
"\t\t\t\t<Option type=\"2\" />\n"
|
||||
"\t\t\t\t<Option compiler=\"gcc\" />\n"
|
||||
"\t\t\t\t<Option createDefFile=\"1\" />\n"
|
||||
@@ -163,11 +163,7 @@ void CodeBlocksProvider::createProjectFile(const std::string &name, const std::s
|
||||
|
||||
project << "\t\t\t\t\t<Add option=\"-g\" />\n"
|
||||
"\t\t\t\t\t<Add directory=\"..\\..\\engines\" />\n"
|
||||
"\t\t\t\t\t<Add directory=\"..\\..\\..\\scummvm\" />\n";
|
||||
|
||||
// Sword2.5 engine needs theora and vorbis includes
|
||||
if (name == "sword25")
|
||||
project << "\t\t\t\t\t<Add directory=\"$(SCUMMVM_LIBS)include\" />\n";
|
||||
"\t\t\t\t\t<Add directory=\"..\\..\\..\\residual\" />\n";
|
||||
|
||||
project << "\t\t\t\t</Compiler>\n"
|
||||
"\t\t\t</Target>\n"
|
||||
@@ -233,7 +229,7 @@ void CodeBlocksProvider::writeFileListToProject(const FileNode &dir, std::ofstre
|
||||
"\t\t</Unit>\n";
|
||||
} else if (ext == "asm") {
|
||||
projectFile << "\t\t<Unit filename=\"" << convertPathToWin(filePrefix + node->name) << "\">\n"
|
||||
"\t\t\t<Option compiler=\"gcc\" use=\"1\" buildCommand=\"$(SCUMMVM_LIBS)bin/nasm.exe -f win32 -g $file -o $object\" />"
|
||||
"\t\t\t<Option compiler=\"gcc\" use=\"1\" buildCommand=\"$(RESIDUAL_LIBS)bin/nasm.exe -f win32 -g $file -o $object\" />"
|
||||
"\t\t</Unit>\n";
|
||||
} else {
|
||||
projectFile << "\t\t<Unit filename=\"" << convertPathToWin(filePrefix + node->name) << "\" />\n";
|
||||
@@ -243,10 +239,10 @@ void CodeBlocksProvider::writeFileListToProject(const FileNode &dir, std::ofstre
|
||||
}
|
||||
|
||||
void CodeBlocksProvider::writeReferences(std::ofstream &output) {
|
||||
output << "\t\t<Project filename=\"scummvm.cbp\" active=\"1\">\n";
|
||||
output << "\t\t<Project filename=\"residual.cbp\" active=\"1\">\n";
|
||||
|
||||
for (UUIDMap::const_iterator i = _uuidMap.begin(); i != _uuidMap.end(); ++i) {
|
||||
if (i->first == "scummvm")
|
||||
if (i->first == "residual")
|
||||
continue;
|
||||
|
||||
output << "\t\t\t<Depends filename=\"" << i->first << ".cbp\" />\n";
|
||||
|
||||
Reference in New Issue
Block a user