Exemple #1
0
def AddOptions(opts):
    configs.linux.AddOptions(opts)
    from SCons.Variables.PathVariable import PathVariable
    from SCons.Variables.EnumVariable import EnumVariable
    from SCons.Variables.BoolVariable import BoolVariable
    if 'android_sdk_path' in opts.keys():
        return
    opts.Add(
        PathVariable('android_sdk_path',
                     'Path to android sdk installed directory', '',
                     PathVariable.PathAccept))

    opts.Add(
        PathVariable('android_ndk_path',
                     'Path to android native sdk installed directory', '',
                     PathVariable.PathAccept))
    opts.Add(
        ('android_compiler', 'Build binary for specified compiler', 'default'))
    opts.Add((
        'android_libabi',
        'Install native libraries into the lib/$android_libabi directory of apk',
        'default'))
    opts.Add(
        EnumVariable('android_platform',
                     'Build binary for specified android platform', 'default',
                     ('default', '4', '5', '7', '8', '9')))

    opts.Add(
        EnumVariable('android_fpu',
                     'Build binary for specified float point unit', 'default',
                     ('default', 'softfloat', 'hardfloat', 'vfp', 'vfpv3',
                      'vfpv3-16', 'neon')))
    opts.Add(
        EnumVariable('android_cpu', 'Build binary for specified cpu',
                     'generic', ('generic', 'tcc89xx', 'armv7-a', 'cortex-a8',
                                 'cortex-a9', 'mips32r2')))

    opts.Add(
        PathVariable(
            'apk_sign_keystore', 'keystore to sign apks',
            os.path.join('#android', 'keystore', 'apk.transmension.com'),
            PathVariable.PathAccept))
    opts.Add(('apk_sign_key', 'key to sign apks', 'apk.transmension.com'))
    opts.Add(('apk_sign_keystore_pass', 'keystore password',
              'apk.transmension.com'))
    opts.Add(('apk_sign_key_pass', 'key password', 'apk.transmension.com'))
    opts.Add (BoolVariable('android_filesystem',
                           'Enable/disable the file system driver ' + \
                           'which use android api to open and load ' + \
                           'files in apk but it might be not efficient as ' + \
                           'the zzip driver.',
                           False))
    opts.Add(
        BoolVariable('embed_game_launcher', 'Embed the game launcher into apk',
                     True))
Exemple #2
0
def LinuxInputAddOptions(opts):
    from SCons.Variables.BoolVariable import BoolVariable
    if 'linux_input_grab_device' in opts.keys():
        return
    opts.Add(
        BoolVariable('linux_input_grab_device', 'Grab the input event device',
                     'True'))
Exemple #3
0
def OpenALSoundAddOptions (opts):
    from SCons.Variables.PathVariable import PathVariable
    from SCons.Variables.BoolVariable import BoolVariable
    if 'openal_ccflags' in opts.keys ():
        return
    opts.Add ('openal_ccflags', "c/c++ compiler flags for openal.", '')
    opts.Add ('openal_ldflags', "link flags for openal", '')
    opts.Add(BoolVariable ('static_openal', 'build openal as a static library', 'False'))
Exemple #4
0
def AudiereSoundAddOptions (opts):
    from SCons.Variables.PathVariable import PathVariable
    from SCons.Variables.BoolVariable import BoolVariable
    if 'audiere_ccflags' in opts.keys ():
        return
    opts.Add ('audiere_ccflags', "c/c++ compiler flags for audiere.", '')
    opts.Add ('audiere_ldflags', "link flags for audiere", '')
    opts.Add(BoolVariable ('static_audiere', 'build audiere as a static library', 'False'))
Exemple #5
0
def FreeTypeAddOptions (opts):
    from SCons.Variables.PathVariable import PathVariable
    from SCons.Variables.BoolVariable import BoolVariable

    if 'freetype' in opts.keys ():
        return
    opts.Add(BoolVariable ('freetype', 'build the freetype font driver',
                           GetOptionsDefault('freetype', False)))
    opts.Add ('freetype_ccflags', "c/c++ compiler flags for freetype.", '')
    opts.Add ('freetype_ldflags', "link flags for freetype", '')
Exemple #6
0
def AddOptions(opts):
    configs.AddOptions(opts)
    configs.FreeTypeAddOptions(opts)

    from SCons.Variables.BoolVariable import BoolVariable
    if 'build_32bit' in opts.keys():
        return
    opts.Add(
        BoolVariable('build_32bit',
                     "build binaries as 32-bit on 64-bit platform.", 'False'))
Exemple #7
0
def AddOptions(opts):
    from SCons.Variables.BoolVariable import BoolVariable
    from SCons.Variables.ListVariable import ListVariable
    from SCons.Variables.EnumVariable import EnumVariable

    if 'debug' in opts.keys ():
        return

    opts.Add('config_file', 'the path to Config.py', 'Config.py')
    opts.Add('config', 'configuration used to build the framework', '')
    opts.Add(BoolVariable ('debug', 'build debug version', False))
    opts.Add(BoolVariable ('release', 'build release version', False))
    opts.Add(BoolVariable ('optimize', 'build optimize version', False))
    opts.Add(ListVariable ('optimize_level', 'the level of optimizing',
                           '2', ['0', 's', '1', '2']))
    opts.Add(BoolVariable ('builddir', 'output to an alternative directory', True))
    opts.Add(BoolVariable ('static', 'build the framework as a static library', True))
    opts.Add(BoolVariable ('strip', 'strip debug informantion from objects', True))
    opts.Add(BoolVariable ('colorize_output', 'cmake like colorize output message', True))
    opts.Add(BoolVariable ('keyboard', 'support changing focus by pressing arrow keys', True))
    opts.Add(BoolVariable ('cheat', 'enable cheatting', False))
    opts.Add(ListVariable ('package_format', 'the format of game packages(zip, tar.gz, tar.bz2..)',
                           'none', ['zip', 'gztar', 'bztar', 'tar']))
    opts.Add(EnumVariable ('perf_level', 'the level of performance',
                           GetOptionsDefault('perf_level', 'high'),
                           ['low', 'medium', 'high']))
    opts.Add(EnumVariable ('memory_level', 'the level of available memory',
                           GetOptionsDefault('memory_level', 'high'),
                           ['low', 'medium', 'high']))
    opts.Add('language', 'specify the language of games', 'en_US')
    opts.Add('oem', "the name of oem", 'default')
    opts.Add('target', "the name of oem target for example(olo, canmore)", '')
    opts.Add('install_prefix', 'install games into its subdirectory', '')
    opts.Add('otherdirs', 'build other components in different directories(seperated by comma)', '')

    FreeTypeAddOptions(opts)