コード例 #1
0
def get_opts():
    from SCons.Variables import BoolVariable, EnumVariable

    return [
        ("osxcross_sdk", "OSXCross SDK version", "darwin16"),
        ("MACOS_SDK_PATH", "Path to the macOS SDK", ""),
        BoolVariable(
            "use_static_mvk",
            "Link MoltenVK statically as Level-0 driver (better portability) or use Vulkan ICD loader (enables"
            " validation layers)",
            False,
        ),
        EnumVariable("macports_clang", "Build using Clang from MacPorts", "no",
                     ("no", "5.0", "devel")),
        BoolVariable("debug_symbols",
                     "Add debugging symbols to release/release_debug builds",
                     True),
        BoolVariable("separate_debug_symbols",
                     "Create a separate file containing debugging symbols",
                     False),
        BoolVariable(
            "use_ubsan",
            "Use LLVM/GCC compiler undefined behavior sanitizer (UBSAN)",
            False),
        BoolVariable("use_asan",
                     "Use LLVM/GCC compiler address sanitizer (ASAN))", False),
        BoolVariable("use_lsan",
                     "Use LLVM/GCC compiler leak sanitizer (LSAN))", False),
        BoolVariable("use_tsan",
                     "Use LLVM/GCC compiler thread sanitizer (TSAN))", False),
    ]
コード例 #2
0
def get_opts():
    from SCons.Variables import BoolVariable, EnumVariable

    mingw32 = ""
    mingw64 = ""
    if os.name == "posix":
        mingw32 = "i686-w64-mingw32-"
        mingw64 = "x86_64-w64-mingw32-"

    if os.getenv("MINGW32_PREFIX"):
        mingw32 = os.getenv("MINGW32_PREFIX")
    if os.getenv("MINGW64_PREFIX"):
        mingw64 = os.getenv("MINGW64_PREFIX")

    return [
        ("mingw_prefix_32", "MinGW prefix (Win32)", mingw32),
        ("mingw_prefix_64", "MinGW prefix (Win64)", mingw64),
        # Targeted Windows version: 7 (and later), minimum supported version
        # XP support dropped after EOL due to missing API for IPv6 and other issues
        # Vista support dropped after EOL due to GH-10243
        ("target_win_version", "Targeted Windows version, >= 0x0601 (Windows 7)", "0x0601"),
        BoolVariable("debug_symbols", "Add debugging symbols to release/release_debug builds", True),
        EnumVariable("windows_subsystem", "Windows subsystem", "default", ("default", "console", "gui")),
        BoolVariable("separate_debug_symbols", "Create a separate file containing debugging symbols", False),
        ("msvc_version", "MSVC version to use. Ignored if VCINSTALLDIR is set in shell env.", None),
        BoolVariable("use_mingw", "Use the Mingw compiler, even if MSVC is installed.", False),
        BoolVariable("use_llvm", "Use the LLVM compiler", False),
        BoolVariable("use_thinlto", "Use ThinLTO", False),
        BoolVariable("use_static_cpp", "Link MinGW/MSVC C++ runtime libraries statically", True),
        BoolVariable("use_asan", "Use address sanitizer (ASAN)", False),
    ]
コード例 #3
0
def get_opts():
    from SCons.Variables import BoolVariable, EnumVariable
    return [
        BoolVariable('use_llvm', 'Use the LLVM compiler', False),
        BoolVariable(
            'use_static_cpp',
            'Link libgcc and libstdc++ statically for better portability',
            False),
        BoolVariable(
            'use_ubsan',
            'Use LLVM/GCC compiler undefined behavior sanitizer (UBSAN)',
            False),
        BoolVariable('use_asan',
                     'Use LLVM/GCC compiler address sanitizer (ASAN))', False),
        BoolVariable('use_lsan',
                     'Use LLVM/GCC compiler leak sanitizer (LSAN))', False),
        EnumVariable('debug_symbols',
                     'Add debugging symbols to release builds', 'yes',
                     ('yes', 'no', 'full')),
        BoolVariable('separate_debug_symbols',
                     'Create a separate file containing debugging symbols',
                     False),
        BoolVariable(
            'execinfo',
            'Use libexecinfo on systems where glibc is not available', False),
    ]
コード例 #4
0
ファイル: detect.py プロジェクト: RoyalWarrior/Godot-Engine
def get_opts():
    from SCons.Variables import BoolVariable, EnumVariable

    return [
        ('osxcross_sdk', 'OSXCross SDK version', 'darwin14'),
        ('MACOS_SDK_PATH', 'Path to the macOS SDK', ''),
        EnumVariable('debug_symbols', 'Add debugging symbols to release builds', 'yes', ('yes', 'no', 'full')),
        BoolVariable('separate_debug_symbols', 'Create a separate file containing debugging symbols', False),
    ]
コード例 #5
0
def get_opts():
    from SCons.Variables import BoolVariable, EnumVariable

    return [
        ("ANDROID_NDK_ROOT", "Path to the Android NDK", os.environ.get("ANDROID_NDK_ROOT", 0)),
        ("ndk_platform", 'Target platform (android-<api>, e.g. "android-24")', "android-24"),
        EnumVariable("android_arch", "Target architecture", "armv7", ("armv7", "arm64v8", "x86", "x86_64")),
        BoolVariable("android_neon", "Enable NEON support (armv7 only)", True),
    ]
コード例 #6
0
def _parse_default_command_line_options():
    """Parses the command line options controlling various build settings

    @remarks
        This contains variables that work across all builds. Build-specific variables
        are discouraged, but would be irgnored by SCons' Variables class."""

    command_line_variables = Variables(None, ARGUMENTS)

    # Build configuration (also called build type in many SCons examples)
    command_line_variables.Add(
        BoolVariable(
            'DEBUG',
            'Whether to do an unoptimized debug build',
            False
        )
    )

    # Default architecture for the binaries. We follow the Debian practices,
    # which, while clueless and chaotic, are at least widely used.
    default_arch = 'amd64'
    if 'armv7' in platform.uname()[4]:
        default_arch = 'armhf'
    if 'aarch64' in platform.uname()[4]:
        default_arch = 'arm64'

    # CPU architecture to target
    command_line_variables.Add(
        EnumVariable(
            'TARGET_ARCH',
            'CPU architecture the binary will run on',
            default_arch,
            allowed_values=('armhf', 'arm64', 'x86', 'amd64', 'any')
        )
    )

    # Directory for intermediate files
    command_line_variables.Add(
        PathVariable(
            'INTERMEDIATE_DIRECTORY',
            'Directory in which intermediate build files will be stored',
            'obj',
            PathVariable.PathIsDirCreate
        )
    )

    # Directory for intermediate files
    command_line_variables.Add(
        PathVariable(
            'ARTIFACT_DIRECTORY',
            'Directory in which build artifacts (outputs) will be stored',
            'bin',
            PathVariable.PathIsDirCreate
        )
    )

    return command_line_variables
コード例 #7
0
ファイル: compiler.py プロジェクト: langmm/sconsx
    def option(self, opts):

        self.default()

        opts.Add(
            BoolVariable('debug', 'compilation in a debug mode',
                         self._default['debug']))
        opts.Add(
            BoolVariable('warnings', 'compilation with -Wall and similar',
                         self._default['warnings']))
        opts.Add(BoolVariable('static', '', self._default['static']))

        compilers = self._default['compilers']
        default_compiler = compilers[0]
        opts.Add(
            EnumVariable('compiler', 'compiler tool used for the build',
                         default_compiler, compilers))
        opts.Add('compiler_libs_suffix',
                 'Library suffix name like -vc80 or -mgw',
                 self._default['libs_suffix'])

        opts.Add('rpath', 'A list of paths to search for shared libraries')

        opts.Add('EXTRA_CCFLAGS', 'Specific user flags for c compiler', '')
        opts.Add('EXTRA_CXXFLAGS', 'Specific user flags for c++ compiler', '')
        opts.Add('EXTRA_CPPDEFINES', 'Specific c++ defines', '')
        opts.Add('EXTRA_LINKFLAGS', 'Specific user flags for c++ linker', '')
        opts.Add('EXTRA_CPPPATH', 'Specific user include path', '')
        opts.Add('EXTRA_LIBPATH', 'Specific user library path', '')
        opts.Add('EXTRA_LIBS', 'Specific user libraries', '')

        if isinstance(platform, Win32):
            opts.Add(
                EnumVariable('TARGET_ARCH',
                             'Target Architecture',
                             'amd64' if is_64bit_environment() else 'x86',
                             allowed_values=('x86', 'amd64', 'i386', 'emt64',
                                             'x86_64', 'ia64')))
            opts.Add(
                EnumVariable('MSVC_VERSION',
                             'Version ',
                             '' if not is_conda() else get_default_msvc(),
                             allowed_values=sorted(MsvcVersion.values()) +
                             ['']))
コード例 #8
0
def get_opts():
    from SCons.Variables import BoolVariable, EnumVariable

    return [
        BoolVariable("use_llvm", "Use the LLVM compiler", False),
        BoolVariable("use_static_cpp", "Link libgcc and libstdc++ statically for better portability", False),
        BoolVariable("use_coverage", "Test Godot coverage", False),
        BoolVariable("use_ubsan", "Use LLVM/GCC compiler undefined behavior sanitizer (UBSAN)", False),
        BoolVariable("use_asan", "Use LLVM/GCC compiler address sanitizer (ASAN))", False),
        BoolVariable("use_lsan", "Use LLVM/GCC compiler leak sanitizer (LSAN))", False),
        BoolVariable("use_tsan", "Use LLVM/GCC compiler thread sanitizer (TSAN))", False),
        EnumVariable("debug_symbols", "Add debugging symbols to release/release_debug builds", "yes", ("yes", "no")),
        BoolVariable("separate_debug_symbols", "Create a separate file containing debugging symbols", False),
        BoolVariable("execinfo", "Use libexecinfo on systems where glibc is not available", False),
    ]
コード例 #9
0
ファイル: detect.py プロジェクト: shinaka/godot-built
def get_opts():
    from SCons.Variables import BoolVariable, EnumVariable

    return [
        BoolVariable('use_llvm', 'Use the LLVM compiler', False),
        BoolVariable('use_static_cpp', 'Link libgcc and libstdc++ statically for better portability', False),
        BoolVariable('use_sanitizer', 'Use LLVM compiler address sanitizer', False),
        BoolVariable('use_leak_sanitizer', 'Use LLVM compiler memory leaks sanitizer (implies use_sanitizer)', False),
        BoolVariable('pulseaudio', 'Detect & use pulseaudio', True),
        BoolVariable('udev', 'Use udev for gamepad connection callbacks', False),
        EnumVariable('debug_symbols', 'Add debugging symbols to release builds', 'yes', ('yes', 'no', 'full')),
        BoolVariable('separate_debug_symbols', 'Create a separate file containing debugging symbols', False),
        BoolVariable('touch', 'Enable touch events', True),
        BoolVariable('execinfo', 'Use libexecinfo on systems where glibc is not available', False),
    ]
コード例 #10
0
def get_opts():
    from SCons.Variables import BoolVariable

    return [
        (
            "IPHONEPATH",
            "Path to iPhone toolchain",
            "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain",
        ),
        ("IPHONESDK", "Path to the iPhone SDK", ""),
        BoolVariable(
            "use_static_mvk",
            "Link MoltenVK statically as Level-0 driver (better portability) or use Vulkan ICD loader (enables"
            " validation layers)",
            False,
        ),
        BoolVariable("ios_exceptions", "Enable exceptions", False),
        ("ios_triple", "Triple for ios toolchain", ""),
    ]
コード例 #11
0
def get_opts():
    from SCons.Variables import BoolVariable

    return [
        # eval() can be a security concern, so it can be disabled.
        BoolVariable("javascript_eval", "Enable JavaScript eval interface",
                     True),
        BoolVariable(
            "threads_enabled",
            "Enable WebAssembly Threads support (limited browser support)",
            False),
        BoolVariable(
            "gdnative_enabled",
            "Enable WebAssembly GDNative support (produces bigger binaries)",
            False),
        BoolVariable("use_closure_compiler",
                     "Use closure compiler to minimize JavaScript code",
                     False),
    ]
コード例 #12
0
def get_opts():
    from SCons.Variables import BoolVariable, EnumVariable

    return [
        ('osxcross_sdk', 'OSXCross SDK version', 'darwin14'),
        EnumVariable('debug_symbols', 'Add debug symbols to release version',
                     'yes', ('yes', 'no', 'full')),
        BoolVariable('separate_debug_symbols',
                     'Create a separate file with the debug symbols', False),
    ]
コード例 #13
0
def get_opts():
    from SCons.Variables import BoolVariable, EnumVariable

    return [
        ('ANDROID_NDK_ROOT', 'Path to the Android NDK',
         os.environ.get("ANDROID_NDK_ROOT", 0)),
        ('ndk_platform', 'Target platform (android-<api>, e.g. "android-18")',
         "android-18"),
        EnumVariable('android_arch', 'Target architecture', "armv7",
                     ('armv7', 'arm64v8', 'x86', 'x86_64')),
        BoolVariable('android_neon', 'Enable NEON support (armv7 only)', True),
    ]
コード例 #14
0
ファイル: detect.py プロジェクト: JarceloElemental/godot-1
def get_opts():
    from SCons.Variables import BoolVariable

    return [
        ('msvc_version',
         'MSVC version to use (ignored if the VCINSTALLDIR environment variable is set)',
         None),
        BoolVariable(
            'use_mingw',
            'Use the MinGW compiler even if MSVC is installed (only used on Windows)',
            False),
    ]
コード例 #15
0
def get_opts():
    from SCons.Variables import BoolVariable, EnumVariable

    return [
        ("osxcross_sdk", "OSXCross SDK version", "darwin14"),
        ("MACOS_SDK_PATH", "Path to the macOS SDK", ""),
        EnumVariable("debug_symbols",
                     "Add debugging symbols to release builds", "yes",
                     ("yes", "no", "full")),
        BoolVariable("separate_debug_symbols",
                     "Create a separate file containing debugging symbols",
                     False),
        BoolVariable(
            "use_ubsan",
            "Use LLVM/GCC compiler undefined behavior sanitizer (UBSAN)",
            False),
        BoolVariable("use_asan",
                     "Use LLVM/GCC compiler address sanitizer (ASAN))", False),
        BoolVariable("use_tsan",
                     "Use LLVM/GCC compiler thread sanitizer (TSAN))", False),
    ]
コード例 #16
0
def get_opts():
    from SCons.Variables import BoolVariable

    return [
        ('msvc_version',
         'MSVC version to use. Ignored if VCINSTALLDIR is set in shell env.',
         None),
        BoolVariable(
            'use_mingw',
            'Use the Mingw compiler, even if MSVC is installed. Only used on Windows.',
            False),
    ]
コード例 #17
0
ファイル: detect.py プロジェクト: vrid/godot
def get_opts():
    from SCons.Variables import BoolVariable, EnumVariable

    return [
        ("osxcross_sdk", "OSXCross SDK version", "darwin16"),
        ("MACOS_SDK_PATH", "Path to the macOS SDK", ""),
        ("VULKAN_SDK_PATH", "Path to the Vulkan SDK", ""),
        EnumVariable("macports_clang", "Build using Clang from MacPorts", "no",
                     ("no", "5.0", "devel")),
        BoolVariable("debug_symbols",
                     "Add debugging symbols to release/release_debug builds",
                     True),
        BoolVariable("separate_debug_symbols",
                     "Create a separate file containing debugging symbols",
                     False),
        BoolVariable(
            "use_ubsan",
            "Use LLVM/GCC compiler undefined behavior sanitizer (UBSAN)",
            False),
        BoolVariable("use_asan",
                     "Use LLVM/GCC compiler address sanitizer (ASAN)", False),
        BoolVariable("use_tsan",
                     "Use LLVM/GCC compiler thread sanitizer (TSAN)", False),
        BoolVariable(
            "use_coverage",
            "Use instrumentation codes in the binary (e.g. for code coverage)",
            False),
    ]
コード例 #18
0
ファイル: detect.py プロジェクト: yarwelp/godot
def get_opts():
    from SCons.Variables import BoolVariable, EnumVariable

    return [
        BoolVariable('use_llvm', 'Use the LLVM compiler', False),
        BoolVariable('use_static_cpp', 'Link stdc++ statically', False),
        BoolVariable('use_sanitizer', 'Use LLVM compiler address sanitizer', False),
        BoolVariable('use_leak_sanitizer', 'Use LLVM compiler memory leaks sanitizer (implies use_sanitizer)', False),
        BoolVariable('pulseaudio', 'Detect & use pulseaudio', True),
        BoolVariable('udev', 'Use udev for gamepad connection callbacks', False),
        EnumVariable('debug_symbols', 'Add debug symbols to release version', 'yes', ('yes', 'no', 'full')),
        BoolVariable('separate_debug_symbols', 'Create a separate file with the debug symbols', False),
        BoolVariable('touch', 'Enable touch events', True),
    ]
コード例 #19
0
ファイル: detect.py プロジェクト: xix-xeaon/godot
def get_opts():
    from SCons.Variables import BoolVariable, EnumVariable

    mingw32 = ""
    mingw64 = ""
    if os.name == "posix":
        mingw32 = "i686-w64-mingw32-"
        mingw64 = "x86_64-w64-mingw32-"

    if os.getenv("MINGW32_PREFIX"):
        mingw32 = os.getenv("MINGW32_PREFIX")
    if os.getenv("MINGW64_PREFIX"):
        mingw64 = os.getenv("MINGW64_PREFIX")

    return [
        ("mingw_prefix_32", "MinGW prefix (Win32)", mingw32),
        ("mingw_prefix_64", "MinGW prefix (Win64)", mingw64),
        # Targeted Windows version: 7 (and later), minimum supported version
        # XP support dropped after EOL due to missing API for IPv6 and other issues
        # Vista support dropped after EOL due to GH-10243
        ("target_win_version",
         "Targeted Windows version, >= 0x0601 (Windows 7)", "0x0601"),
        EnumVariable("debug_symbols",
                     "Add debugging symbols to release builds", "yes",
                     ("yes", "no", "full")),
        BoolVariable("separate_debug_symbols",
                     "Create a separate file containing debugging symbols",
                     False),
        ("msvc_version",
         "MSVC version to use. Ignored if VCINSTALLDIR is set in shell env.",
         None),
        BoolVariable(
            "use_mingw",
            "Use the Mingw compiler, even if MSVC is installed. Only used on Windows.",
            False),
        BoolVariable("use_llvm", "Use the LLVM compiler", False),
        BoolVariable("use_thinlto", "Use ThinLTO", False),
    ]
コード例 #20
0
ファイル: detect.py プロジェクト: gingivitiss/Unnamed-Game
def get_opts():
    from SCons.Variables import BoolVariable, EnumVariable

    mingw32 = ""
    mingw64 = ""
    if (os.name == "posix"):
        mingw32 = "i686-w64-mingw32-"
        mingw64 = "x86_64-w64-mingw32-"

    if (os.getenv("MINGW32_PREFIX")):
        mingw32 = os.getenv("MINGW32_PREFIX")
    if (os.getenv("MINGW64_PREFIX")):
        mingw64 = os.getenv("MINGW64_PREFIX")

    return [
        ('mingw_prefix_32', 'MinGW prefix (Win32)', mingw32),
        ('mingw_prefix_64', 'MinGW prefix (Win64)', mingw64),
        # Targeted Windows version: 7 (and later), minimum supported version
        # XP support dropped after EOL due to missing API for IPv6 and other issues
        # Vista support dropped after EOL due to GH-10243
        ('target_win_version',
         'Targeted Windows version, >= 0x0601 (Windows 7)', '0x0601'),
        EnumVariable('debug_symbols',
                     'Add debugging symbols to release builds', 'yes',
                     ('yes', 'no', 'full')),
        BoolVariable('separate_debug_symbols',
                     'Create a separate file containing debugging symbols',
                     False),
        ('msvc_version',
         'MSVC version to use. Ignored if VCINSTALLDIR is set in shell env.',
         None),
        BoolVariable(
            'use_mingw',
            'Use the Mingw compiler, even if MSVC is installed. Only used on Windows.',
            False),
        BoolVariable('use_llvm', 'Use the LLVM compiler', False),
        BoolVariable('use_thinlto', 'Use ThinLTO', False),
    ]
コード例 #21
0
 def add_options(self, vars):
     name = self.name
     upp = name.upper()
     vars.Add(upp + '_DIR', help='Location of %s.' % name)
     vars.Add(upp + '_INC_DIR', help='Location of %s header files.' % name)
     vars.Add(upp + '_LIB_DIR', help='Location of %s libraries.' % name)
     vars.Add(upp + '_LIBS', help='%s libraries.' % name)
     if self.download_url:
         vars.Add(
             BoolVariable(upp + '_DOWNLOAD',
                          help='Download and use a local copy of %s.' %
                          name,
                          default=False))
         vars.Add(
             BoolVariable(
                 upp + '_REDOWNLOAD',
                 help='Force update of previously downloaded copy of %s.' %
                 name,
                 default=False))
         self.one_shot_options.append(upp + '_REDOWNLOAD')
     self.options.extend([
         upp + '_DIR', upp + '_INC_DIR', upp + '_LIB_DIR', upp + '_LIBS',
         upp + '_DOWNLOAD'
     ])
コード例 #22
0
    def _GetConfigurationVariables(self):
        """
			Retrieve and define help variables for configuration variables.
		"""

        cmd_line_args = ARGUMENTS
        cfgVars = Variables(None, cmd_line_args)
        [
            cfgVars.Add(BoolVariable(name, helptext, default))
            for name, helptext, default in self._boolean_variables
        ]
        [
            cfgVars.Add(EnumVariable(name, helptext, default, valid))
            for name, helptext, default, valid in self._enumerable_variables
        ]
        [cfgVars.Add(option) for option in self._numerical_variables]

        return cfgVars
コード例 #23
0
ファイル: Package.py プロジェクト: nehzatemamy/opendihu
 def add_options(self, vars):
   name = self.name
   upp = name.upper()
   vars.Add(BoolVariable('DISABLE_CHECKS', help='Allow failure of checks for all packages.', default=False))
   vars.Add(BoolVariable('DISABLE_RUN', help='Do not attempt to run executables for checks, only compile, for all packages.', default=False))
   vars.Add(upp + '_DIR', help='Location of %s.'%name)
   vars.Add(upp + '_INC_DIR', help='Location of %s header files.'%name)
   vars.Add(upp + '_LIB_DIR', help='Location of %s libraries.'%name)
   vars.Add(upp + '_LIBS', help='%s libraries.'%name)
   vars.Add(upp + '_DISABLE_CHECKS', help='Allow failure of check for %s.'%name)
   vars.Add(upp + '_DISABLE_RUN', help='Do not attempt to run executables for checks for %s.'%name)
   if self.download_url:
     vars.Add(BoolVariable(upp + '_DOWNLOAD', help='Download and use a local copy of %s.'%name, default=False))
     vars.Add(BoolVariable(upp + '_REDOWNLOAD', help='Force update of previously downloaded copy of %s.'%name, default=False))
   vars.Add(BoolVariable(upp + '_REBUILD', help='Force new build of previously downloaded copy of %s, even if it was installed successfully.'%name, default=False))
   vars.Add(BoolVariable('MPI_IGNORE_MPICC', help='Disable retrieving mpi compile information from mpicc --showme.', default=False))
   vars.Add(BoolVariable('MPI_DEBUG', help='Build MPI with debugging support for memcheck.', default=False))
   vars.Add(BoolVariable('PETSC_DEBUG', help='Build Petsc with debugging support.', default=False))
   
   self.options.extend([upp + '_DIR', upp + '_INC_DIR', upp + '_LIB_DIR', upp + '_LIBS', upp + '_DOWNLOAD'])
コード例 #24
0
def setup_options(env, opts, gen_help, is_gdnative=False):
    from SCons.Variables import BoolVariable, EnumVariable

    opts.Add(
        BoolVariable("godot_remote_disable_server",
                     "Godot Remote. Remove server.", False))
    opts.Add(
        BoolVariable("godot_remote_disable_client",
                     "Godot Remote. Remove client.", False))
    opts.Add(
        BoolVariable("godot_remote_no_default_resources",
                     "Godot Remote. Remove default resources.", False))
    opts.Add(
        BoolVariable(
            "godot_remote_auto_connection_enabled",
            "Godot Remote. Enable auto connection mode using UDP broadcasting.",
            True))
    opts.Add(
        BoolVariable("godot_remote_libjpeg_turbo_enabled",
                     "Godot Remote. Enable libjpeg-turbo.", True))
    opts.Add(
        BoolVariable("godot_remote_h264_enabled",
                     "Godot Remote. Enable OpenH264 codec.", True))
    opts.Add(
        BoolVariable(
            "godot_remote_use_sse2",
            "Godot Remote. Use SSE2 to convert YUV to RGB for the H264 codec. Only on PC and without libjpeg-turbo.",
            True))
    opts.Add(
        BoolVariable("godot_remote_tracy_enabled",
                     "Godot Remote. Enable tracy profiler.", False))
    #opts.Add(BoolVariable("godot_remote_livepp", "Godot Remote. Live++ support... Windows only", False))
    opts.Update(env)

    gen_help(env)

    if env['platform'] not in ['windows', 'x11', 'linuxbsd', 'osx']:
        env['godot_remote_use_sse2'] = False

    if not is_gdnative:
        setup_default_cpp_defines(env)
コード例 #25
0
def get_opts():
    from SCons.Variables import BoolVariable, EnumVariable

    mingw32 = ""
    mingw64 = ""
    if (os.name == "posix"):
        mingw32 = "i686-w64-mingw32-"
        mingw64 = "x86_64-w64-mingw32-"

    if (os.getenv("MINGW32_PREFIX")):
        mingw32 = os.getenv("MINGW32_PREFIX")
    if (os.getenv("MINGW64_PREFIX")):
        mingw64 = os.getenv("MINGW64_PREFIX")

    return [
        ('mingw_prefix_32', 'MinGW prefix (Win32)', mingw32),
        ('mingw_prefix_64', 'MinGW prefix (Win64)', mingw64),
        BoolVariable('use_lto', 'Use link time optimization (when using MingW)', False),
        EnumVariable('debug_symbols', 'Add debug symbols to release version', 'yes', ('yes', 'no', 'full')),
    ]
コード例 #26
0
    def updateVariables(self):
        """
			Retrieve and define help options for configuration variables.
		"""
        rootdir = Dir('#').abspath
        cfg_files = [
            rootdir + "/library/configuration/" + self._cfg_name + "/" +
            self._module_name + ".py",
        ]

        cfgVars = Variables(cfg_files, self._cmd_line_args)
        [
            cfgVars.Add(BoolVariable(name, helptext, default))
            for name, helptext, default in self._bool_vars
        ]
        [
            cfgVars.Add(EnumVariable(name, helptext, default, valid))
            for name, helptext, default, valid in self._enum_vars
        ]
        [cfgVars.Add(option) for option in self._other_vars]

        self._variables = cfgVars
コード例 #27
0
ファイル: detect.py プロジェクト: yarwelp/godot
def get_opts():
    from SCons.Variables import BoolVariable, EnumVariable

    mingw32 = ""
    mingw64 = ""
    if (os.name == "posix"):
        mingw32 = "i686-w64-mingw32-"
        mingw64 = "x86_64-w64-mingw32-"

    if (os.getenv("MINGW32_PREFIX")):
        mingw32 = os.getenv("MINGW32_PREFIX")
    if (os.getenv("MINGW64_PREFIX")):
        mingw64 = os.getenv("MINGW64_PREFIX")

    return [
        ('mingw_prefix_32', 'MinGW prefix (Win32)', mingw32),
        ('mingw_prefix_64', 'MinGW prefix (Win64)', mingw64),
        # Targeted Windows version: 7 (and later), minimum supported version
        # XP support dropped after EOL due to missing API for IPv6 and other issues
        # Vista support dropped after EOL due to GH-10243
        ('target_win_version', 'Targeted Windows version, >= 0x0601 (Windows 7)', '0x0601'),
        EnumVariable('debug_symbols', 'Add debug symbols to release version', 'yes', ('yes', 'no', 'full')),
        BoolVariable('separate_debug_symbols', 'Create a separate file with the debug symbols', False),
    ]
コード例 #28
0
ファイル: detect.py プロジェクト: wendale1231/godot
def get_opts():
    from SCons.Variables import BoolVariable, EnumVariable

    return [
        BoolVariable("use_llvm", "Use the LLVM compiler", False),
        BoolVariable("use_lld", "Use the LLD linker", False),
        BoolVariable("use_thinlto", "Use ThinLTO", False),
        BoolVariable(
            "use_static_cpp",
            "Link libgcc and libstdc++ statically for better portability",
            False),
        BoolVariable("use_coverage", "Test Godot coverage", False),
        BoolVariable(
            "use_ubsan",
            "Use LLVM/GCC compiler undefined behavior sanitizer (UBSAN)",
            False),
        BoolVariable("use_asan",
                     "Use LLVM/GCC compiler address sanitizer (ASAN))", False),
        BoolVariable("use_lsan",
                     "Use LLVM/GCC compiler leak sanitizer (LSAN))", False),
        BoolVariable("use_tsan",
                     "Use LLVM/GCC compiler thread sanitizer (TSAN))", False),
        BoolVariable("pulseaudio", "Detect and use PulseAudio", True),
        BoolVariable("udev", "Use udev for gamepad connection callbacks",
                     False),
        EnumVariable("debug_symbols",
                     "Add debugging symbols to release builds", "yes",
                     ("yes", "no", "full")),
        BoolVariable("separate_debug_symbols",
                     "Create a separate file containing debugging symbols",
                     False),
        BoolVariable("touch", "Enable touch events", True),
        BoolVariable(
            "execinfo",
            "Use libexecinfo on systems where glibc is not available", False),
    ]
コード例 #29
0
ファイル: detect.py プロジェクト: mrtripie/godot
def get_opts():
    from SCons.Variables import BoolVariable, EnumVariable

    return [
        EnumVariable("linker", "Linker program", "default",
                     ("default", "bfd", "gold", "lld", "mold")),
        BoolVariable("use_llvm", "Use the LLVM compiler", False),
        BoolVariable(
            "use_thinlto",
            "Use ThinLTO (LLVM only, requires linker=lld, implies use_lto=yes)",
            False),
        BoolVariable(
            "use_static_cpp",
            "Link libgcc and libstdc++ statically for better portability",
            True),
        BoolVariable("use_coverage", "Test Godot coverage", False),
        BoolVariable(
            "use_ubsan",
            "Use LLVM/GCC compiler undefined behavior sanitizer (UBSAN)",
            False),
        BoolVariable("use_asan",
                     "Use LLVM/GCC compiler address sanitizer (ASAN)", False),
        BoolVariable("use_lsan", "Use LLVM/GCC compiler leak sanitizer (LSAN)",
                     False),
        BoolVariable("use_tsan",
                     "Use LLVM/GCC compiler thread sanitizer (TSAN)", False),
        BoolVariable("use_msan", "Use LLVM compiler memory sanitizer (MSAN)",
                     False),
        BoolVariable("pulseaudio", "Detect and use PulseAudio", True),
        BoolVariable("dbus", "Detect and use D-Bus to handle screensaver",
                     True),
        BoolVariable(
            "speechd",
            "Detect and use Speech Dispatcher for Text-to-Speech support",
            True),
        BoolVariable("fontconfig",
                     "Detect and use fontconfig for system fonts support",
                     True),
        BoolVariable("udev", "Use udev for gamepad connection callbacks",
                     True),
        BoolVariable("x11", "Enable X11 display", True),
        BoolVariable("debug_symbols",
                     "Add debugging symbols to release/release_debug builds",
                     True),
        BoolVariable("separate_debug_symbols",
                     "Create a separate file containing debugging symbols",
                     False),
        BoolVariable("touch", "Enable touch events", True),
        BoolVariable(
            "execinfo",
            "Use libexecinfo on systems where glibc is not available", False),
    ]
コード例 #30
0
def get_opts():
    from SCons.Variables import BoolVariable, EnumVariable

    return [
        BoolVariable('use_llvm', 'Use the LLVM compiler', False),
        BoolVariable('use_lld', 'Use the LLD linker', False),
        BoolVariable('use_thinlto', 'Use ThinLTO', False),
        BoolVariable(
            'use_static_cpp',
            'Link libgcc and libstdc++ statically for better portability',
            False),
        BoolVariable(
            'use_ubsan',
            'Use LLVM/GCC compiler undefined behavior sanitizer (UBSAN)',
            False),
        BoolVariable('use_asan',
                     'Use LLVM/GCC compiler address sanitizer (ASAN))', False),
        BoolVariable('use_lsan',
                     'Use LLVM/GCC compiler leak sanitizer (LSAN))', False),
        BoolVariable('use_tsan',
                     'Use LLVM/GCC compiler thread sanitizer (TSAN))', False),
        BoolVariable('pulseaudio', 'Detect and use PulseAudio', True),
        BoolVariable('udev', 'Use udev for gamepad connection callbacks',
                     False),
        EnumVariable('debug_symbols',
                     'Add debugging symbols to release builds', 'yes',
                     ('yes', 'no', 'full')),
        BoolVariable('separate_debug_symbols',
                     'Create a separate file containing debugging symbols',
                     False),
        BoolVariable('touch', 'Enable touch events', True),
        BoolVariable(
            'execinfo',
            'Use libexecinfo on systems where glibc is not available', False),
    ]