[Scummvm-devel] [Scummvm-cvs-logs] SF.net SVN: scummvm:[53023] scummvm/branches/branch-1-2-0/base/commandLine. cpp
Neil
neil at millstone.demon.co.uk
Tue Oct 5 02:44:18 CEST 2010
On 04/10/2010 23:57, Max Horn wrote:
> Am 05.10.2010 um 00:42 schrieb agent-q at users.sourceforge.net:
>
>> Revision: 53023
>> http://scummvm.svn.sourceforge.net/scummvm/?rev=53023&view=rev
>> Author: agent-q
>> Date: 2010-10-04 22:42:28 +0000 (Mon, 04 Oct 2010)
>>
>> Log Message:
>> -----------
>> DS: Prevent the command line help string from being included in the binary.
> Actually, I am a bit surprised by this. Don't you use DISABLE_COMMAND_LINE, which should disable that string, and *a lot more* anyway?
>
> Grepping seems to indicate that you #define it in portdefs.h; the "new" DS build system using configure& make defines it via -D on the command line, though. Actually, for reference, here is everything I disabled for the "new" DS build system:
>
> DEFINES="$DEFINES -DDISABLE_FANCY_THEMES -DVECTOR_RENDERER_FORMAT=1555"
> DEFINES="$DEFINES -DDISABLE_DEFAULT_SAVEFILEMANAGER"
> DEFINES="$DEFINES -DREDUCE_MEMORY_USAGE -DSTREAM_AUDIO_FROM_DISK"
> DEFINES="$DEFINES -DDISABLE_DOSBOX_OPL -DDISABLE_SID -DDISABLE_NES_APU"
> DEFINES="$DEFINES -DDISABLE_COMMAND_LINE"
>
> The Android, GP32 and Symbian porters may want to look into that, too. In fact, all small devices porters should... And we should document all these switches better :).
>
> Cheers,
> Max
>
>> Modified Paths:
>> --------------
>> scummvm/branches/branch-1-2-0/base/commandLine.cpp
>>
>> Modified: scummvm/branches/branch-1-2-0/base/commandLine.cpp
>> ===================================================================
>> --- scummvm/branches/branch-1-2-0/base/commandLine.cpp 2010-10-04 22:41:22 UTC (rev 53022)
>> +++ scummvm/branches/branch-1-2-0/base/commandLine.cpp 2010-10-04 22:42:28 UTC (rev 53023)
>> @@ -49,7 +49,7 @@
>> ;
>>
>> // DONT FIXME: DO NOT ORDER ALPHABETICALLY, THIS IS ORDERED BY IMPORTANCE/CATEGORY! :)
>> -#if defined(__SYMBIAN32__) || defined(__GP32__) || defined(ANDROID)
>> +#if defined(__SYMBIAN32__) || defined(__GP32__) || defined(ANDROID) || defined(__DS__)
>> static const char HELP_STRING[] = "NoUsageString"; // save more data segment space
>> #else
>> static const char HELP_STRING[] =
>> @@ -143,7 +143,7 @@
>> vsnprintf(buf, STRINGBUFLEN, s, va);
>> va_end(va);
>>
>> -#if !(defined(__GP32__) || defined (__SYMBIAN32__))
>> +#if !(defined(__GP32__) || defined (__SYMBIAN32__) || defined(__DS__))
>> printf(USAGE_STRING, s_appName, buf, s_appName, s_appName);
>> #endif
>> exit(1);
>> @@ -944,7 +944,7 @@
>> // environment variable. This is weaker than a --savepath on the
>> // command line, but overrides the default savepath, hence it is
>> // handled here, just before the command line gets parsed.
>> -#if !defined(_WIN32_WCE)&& !defined(__GP32__)&& !defined(ANDROID)
>> +#if !defined(_WIN32_WCE)&& !defined(__GP32__)&& !defined(ANDROID)&& !defined(__DS__)
>> if (!settings.contains("savepath")) {
>> const char *dir = getenv("SCUMMVM_SAVEPATH");
>> if (dir&& *dir&& strlen(dir)< MAXPATHLEN) {
Hmm. I thought that that line still referenced the usage string when
command line was #ifdef'd out, but it seems I was wrong. I must have
misread an #endif somewhere.
I assume DISABLE_NES_APU disable sound on the NES games? I don't have
that one defined. I don't have NES MM to find out if it would run ok on
the DS, but I suppose this is an extremely rare title so it may be
acceptable to sacrifice the sound for it until someone complains! After
trying it, it only appears to save 4Kb though.
Cheers,
- Neil
More information about the Scummvm-devel
mailing list