Ejemplo n.º 1
0
common_closure_defines = [
    '-D', 'COMPILED=true',
    '-D', 'goog.STRICT_MODE_COMPATIBLE=true',
    '-D', 'goog.ENABLE_DEBUG_LOADER=false',
]
debug_closure_opts = [
    # Don't use a wrapper script in debug mode so all the internals are visible
    # on the global object.
    '-O', 'SIMPLE',
]
debug_closure_defines = [
    '-D', 'goog.DEBUG=true',
    '-D', 'goog.asserts.ENABLE_ASSERTS=true',
    '-D', 'shaka.log.MAX_LOG_LEVEL=4',  # shaka.log.Level.DEBUG
    '-D', 'shaka.Player.version="%s-debug"' % (
          shakaBuildHelpers.calculate_version()),
]
release_closure_opts = [
    ('--output_wrapper_file=%s/build/wrapper.template.js' %
     shakaBuildHelpers.cygwin_safe_path(shakaBuildHelpers.get_source_base())),
    '-O', 'ADVANCED',
]
release_closure_defines = [
    '-D', 'goog.DEBUG=false',
    '-D', 'goog.asserts.ENABLE_ASSERTS=false',
    '-D', 'shaka.log.MAX_LOG_LEVEL=0',
    '-D', 'shaka.Player.version="%s"' % shakaBuildHelpers.calculate_version(),
]


class Build(object):
Ejemplo n.º 2
0
debug_closure_opts = [
    # Don't use a wrapper script in debug mode so all the internals are visible
    # on the global object.
    '-O',
    'SIMPLE',
]
debug_closure_defines = [
    '-D',
    'goog.DEBUG=true',
    '-D',
    'goog.asserts.ENABLE_ASSERTS=true',
    '-D',
    'shaka.log.MAX_LOG_LEVEL=4',  # shaka.log.Level.DEBUG
    '-D',
    'shaka.Player.version="%s-debug"' %
    (shakaBuildHelpers.calculate_version()),
]
release_closure_opts = [
    '-O',
    'ADVANCED',
]
release_closure_defines = [
    '-D',
    'goog.DEBUG=false',
    '-D',
    'goog.asserts.ENABLE_ASSERTS=false',
    '-D',
    'shaka.log.MAX_LOG_LEVEL=0',
    '-D',
    'shaka.Player.version="%s"' % shakaBuildHelpers.calculate_version(),
]
Ejemplo n.º 3
0
  build.py +@complete
  build.py +@complete -@networking
  build.py +@complete -@ui
  build.py --name custom +@manifests +@networking +../my_plugin.js
"""

import argparse
import logging
import os
import re

import compiler
import shakaBuildHelpers


shaka_version = shakaBuildHelpers.calculate_version()

common_closure_opts = [
    '--language_out', 'ECMASCRIPT3',

    '--jscomp_error=*',

    # Turn off complaints like:
    #   "Private property foo_ is never modified, use the @const annotation"
    '--jscomp_off=jsdocMissingConst',

    '--extra_annotation_name=listens',
    '--extra_annotation_name=exportDoc',
    '--extra_annotation_name=exportInterface',

    '--conformance_configs',
Ejemplo n.º 4
0
    # Analyzer checks require explicit nullability, which is a pain.
    '--jscomp_off=analyzerChecksInternal',

    '--extra_annotation_name=listens',
    '--extra_annotation_name=exportDoc',

    '--conformance_configs',
    ('%s/build/conformance.textproto' %
     shakaBuildHelpers.cygwin_safe_path(shakaBuildHelpers.get_source_base())),

    '--generate_exports',

    '-D', 'COMPILED=true',
    '-D', 'goog.STRICT_MODE_COMPATIBLE=true',
    '-D', 'goog.ENABLE_DEBUG_LOADER=false',
    '-D', 'GIT_VERSION="%s"' % shakaBuildHelpers.calculate_version()
]
debug_closure_opts = [
    # Don't use a wrapper script in debug mode so all the internals are visible
    # on the global object.

    '-O', 'SIMPLE',
    '-D', 'goog.DEBUG=true',
    '-D', 'goog.asserts.ENABLE_ASSERTS=true',
    '-D', 'shaka.log.MAX_LOG_LEVEL=4',  # shaka.log.Level.DEBUG
]
release_closure_opts = [
    ('--output_wrapper_file=%s/build/wrapper.template.js' %
     shakaBuildHelpers.cygwin_safe_path(shakaBuildHelpers.get_source_base())),

    '-O', 'ADVANCED',
Ejemplo n.º 5
0
    '--conformance_configs',
    ('%s/build/conformance.textproto' %
     shakaBuildHelpers.cygwin_safe_path(shakaBuildHelpers.get_source_base())),

    '-O', 'ADVANCED',
    '--generate_exports',
    ('--output_wrapper_file=%s/build/wrapper.template.js' %
     shakaBuildHelpers.cygwin_safe_path(shakaBuildHelpers.get_source_base())),

    '-D', 'COMPILED=true',
    '-D', 'goog.DEBUG=false',
    '-D', 'goog.STRICT_MODE_COMPATIBLE=true',
    '-D', 'goog.ENABLE_DEBUG_LOADER=false',
    '-D', 'goog.asserts.ENABLE_ASSERTS=false',
    '-D', 'shaka.log.MAX_LOG_LEVEL=0',
    '-D', 'GIT_VERSION="%s"' % shakaBuildHelpers.calculate_version()
]


class Build(object):
  """Defines a build that has been parsed from a build file.

  This has exclude files even though it will not be used at the top-level.  This
  allows combining builds.  A file will only exist in at most one set.

  Members:
    include - A set of files to include.
    exclude - A set of files to remove.
  """

  def __init__(self, include=None, exclude=None):
Ejemplo n.º 6
0
]
debug_closure_opts = [
    # Don't use a wrapper script in debug mode so all the internals are visible
    # on the global object.
    '-O',
    'SIMPLE',
]
debug_closure_defines = [
    '-D',
    'goog.DEBUG=true',
    '-D',
    'goog.asserts.ENABLE_ASSERTS=true',
    '-D',
    'shaka.log.MAX_LOG_LEVEL=4',  # shaka.log.Level.DEBUG
    '-D',
    'GIT_VERSION="%s-debug"' % shakaBuildHelpers.calculate_version(),
]
release_closure_opts = [
    ('--output_wrapper_file=%s/build/wrapper.template.js' %
     shakaBuildHelpers.cygwin_safe_path(shakaBuildHelpers.get_source_base())),
    '-O',
    'ADVANCED',
]
release_closure_defines = [
    '-D',
    'goog.DEBUG=false',
    '-D',
    'goog.asserts.ENABLE_ASSERTS=false',
    '-D',
    'shaka.log.MAX_LOG_LEVEL=0',
    '-D',
Ejemplo n.º 7
0
  build.py +@complete -@networking
  build.py +@complete -@ui
  build.py --name custom +@manifests +@networking +../my_plugin.js
"""

import argparse
import logging
import os
import re

import compiler
import generateLocalizations
import shakaBuildHelpers


shaka_version = shakaBuildHelpers.calculate_version()

common_closure_opts = [
    '--language_out', 'ECMASCRIPT3',

    '--jscomp_error=*',

    # Turn off complaints like:
    #   "Private property foo_ is never modified, use the @const annotation"
    '--jscomp_off=jsdocMissingConst',

    '--extra_annotation_name=listens',
    '--extra_annotation_name=exportDoc',
    '--extra_annotation_name=exportInterface',

    '--conformance_configs',