mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-13 21:31:53 +00:00
Merge pull request #896 from criezy/create-project-fixes
DEVTOOLS: Create project fixes
This commit is contained in:
commit
c1edd61669
@ -386,9 +386,15 @@ Common::String parseCommandLine(Common::StringMap &settings, int argc, const cha
|
||||
} else {
|
||||
// On MacOS X prior to 10.9 the OS is sometimes adding a -psn_X_XXXXXX argument (where X are digits)
|
||||
// to pass the process serial number. We need to ignore it to avoid an error.
|
||||
// When using XCode it also adds -NSDocumentRevisionsDebugMode YES argument if XCode option
|
||||
// "Allow debugging when using document Versions Browser" is on (which is the default).
|
||||
#ifdef MACOSX
|
||||
if (strncmp(s, "-psn_", 5) == 0)
|
||||
continue;
|
||||
if (strcmp(s, "-NSDocumentRevisionsDebugMode") == 0) {
|
||||
++i; // Also skip the YES that follows
|
||||
continue;
|
||||
}
|
||||
#endif
|
||||
|
||||
bool isLongCmd = (s[0] == '-' && s[1] == '-');
|
||||
|
@ -309,6 +309,23 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
//
|
||||
// Determine 64 bitness
|
||||
// Reference: http://nadeausoftware.com/articles/2012/02/c_c_tip_how_detect_processor_type_using_compiler_predefined_macros
|
||||
//
|
||||
#if !defined(HAVE_CONFIG_H)
|
||||
|
||||
#if defined(__x86_64__) || \
|
||||
defined(_M_X64) || \
|
||||
defined(__ppc64__) || \
|
||||
defined(__powerpc64__) || \
|
||||
defined(__LP64__)
|
||||
|
||||
#define SCUMM_64BITS
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
//
|
||||
// Some more system specific settings.
|
||||
|
@ -300,6 +300,19 @@ int main(int argc, char *argv[]) {
|
||||
for (EngineDescList::iterator j = setup.engines.begin(); j != setup.engines.end(); ++j)
|
||||
j->enable = false;
|
||||
}
|
||||
|
||||
// Disable engines for which we are missing dependencies
|
||||
for (EngineDescList::const_iterator i = setup.engines.begin(); i != setup.engines.end(); ++i) {
|
||||
if (i->enable) {
|
||||
for (StringList::const_iterator ef = i->requiredFeatures.begin(); ef != i->requiredFeatures.end(); ++ef) {
|
||||
FeatureList::iterator feature = std::find(setup.features.begin(), setup.features.end(), *ef);
|
||||
if (feature != setup.features.end() && !feature->enable) {
|
||||
setEngineBuildState(i->name, setup.engines, false);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Print status
|
||||
cout << "Enabled engines:\n\n";
|
||||
@ -906,7 +919,7 @@ namespace {
|
||||
*/
|
||||
bool parseEngine(const std::string &line, EngineDesc &engine) {
|
||||
// Format:
|
||||
// add_engine engine_name "Readable Description" enable_default ["SubEngineList"]
|
||||
// add_engine engine_name "Readable Description" enable_default ["SubEngineList"] ["base games"] ["dependencies"]
|
||||
TokenList tokens = tokenize(line);
|
||||
|
||||
if (tokens.size() < 4)
|
||||
@ -921,8 +934,14 @@ bool parseEngine(const std::string &line, EngineDesc &engine) {
|
||||
engine.name = *token; ++token;
|
||||
engine.desc = *token; ++token;
|
||||
engine.enable = (*token == "yes"); ++token;
|
||||
if (token != tokens.end())
|
||||
if (token != tokens.end()) {
|
||||
engine.subEngines = tokenize(*token);
|
||||
++token;
|
||||
if (token != tokens.end())
|
||||
++token;
|
||||
if (token != tokens.end())
|
||||
engine.requiredFeatures = tokenize(*token);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
@ -1024,6 +1043,7 @@ const Feature s_features[] = {
|
||||
{ "scalers", "USE_SCALERS", "", true, "Scalers" },
|
||||
{ "hqscalers", "USE_HQ_SCALERS", "", true, "HQ scalers" },
|
||||
{ "16bit", "USE_RGB_COLOR", "", true, "16bit color support" },
|
||||
{ "highres", "USE_HIGHRES", "", true, "high resolution" },
|
||||
{ "mt32emu", "USE_MT32EMU", "", true, "integrated MT-32 emulator" },
|
||||
{ "nasm", "USE_NASM", "", true, "IA-32 assembly support" }, // This feature is special in the regard, that it needs additional handling.
|
||||
{ "opengl", "USE_OPENGL", "", true, "OpenGL support" },
|
||||
|
@ -86,6 +86,11 @@ struct EngineDesc {
|
||||
* Whether the engine should be included in the build or not.
|
||||
*/
|
||||
bool enable;
|
||||
|
||||
/**
|
||||
* Features required for this engine.
|
||||
*/
|
||||
StringList requiredFeatures;
|
||||
|
||||
/**
|
||||
* A list of all available sub engine names. Sub engines are engines
|
||||
|
@ -950,6 +950,7 @@ void XcodeProvider::setupBuildConfiguration(const BuildSetup &setup) {
|
||||
scummvmOSX_LdFlags.push_back("-lvorbis");
|
||||
scummvmOSX_LdFlags.push_back("-lmad");
|
||||
scummvmOSX_LdFlags.push_back("-lFLAC");
|
||||
scummvmOSX_LdFlags.push_back("-lcurl");
|
||||
if (setup.useSDL2) {
|
||||
scummvmOSX_LdFlags.push_back("-lSDL2main");
|
||||
scummvmOSX_LdFlags.push_back("-lSDL2");
|
||||
|
Loading…
Reference in New Issue
Block a user