Commit Graph

13 Commits

Author SHA1 Message Date
Joey Parrish 7e6a0f38ff fix: Correct license headers in misc. files
This corrects/normalizes license headers in misc. files, such as
config files, docs, build tools, tests, and externs.  This does not
affect the compiled output, and is only done for consistency.

Issue #2638

Change-Id: I9d8da2de55243b08d7df2b743aac73c6f15e858a
2020-06-09 16:13:56 -07:00
Jacob Trimble 6ab4e68ff2 Fix default encoding when reading files.
Under Windows, the default encoding isn't UTF-8, so we are getting
encoding errors when trying to read files.  This adds a helper to
explicitly set the encoding to UTF-8 in Python3.  This doesn't really
affect Python2 since it reads the file as byte strings.

We can't use 'locale.setlocale' to fix this since (at least on my
machine) we can't set the encoding to be UTF-8 on Windows.

Fixes #2206

Change-Id: I76e35cc9ae638b433ca61c7bda6478e989bc755a
2019-10-25 17:23:28 +00:00
Sandra Lokshina 6b1ca2d229 Initial release of Shaka Player UI
Other contributors:
 - @joeyparrish
 - @michellezhuogg
 - @TheModMaker
 - @theodab
 - @vaage

Change-Id: If6df33d9ab5035d1ead4402004f7de37ee8470f4
2018-11-16 14:40:37 -08:00
Jacob Trimble 841f31b3ba Add support for Python3.
Change-Id: Ia7a5b41e3e7d4a75339d6e4de85b8b303fad8d9d
2018-10-23 19:10:29 +00:00
Joey Parrish 45a1d71b8a Add more strict conformance checks
This adds extra conformance checks:
  - A ban on @expose, which we already got rid of in 775d7552
  - A ban on unresolved types, which did not generate any failures
  - A ban on global variables
  - A more comprehensive ban on console logging

None of these caught any real bugs in the existing code base.

In one test suite (MediaSourceEngine unit tests), the compiler was
unable to determine the type of one of the mocks, leading it to
suspect that it could possibly violate the new ban on console.error.

The goog.define('GIT_VERSION', ...) line in player.js was seen
(correctly) as a global variable.  This has been fixed and simplified
as a result.

The only custom conformance checks we are not using are "BanNullDeref"
(too many false negatives) and "BanThrowOfNonErrorTypes" (for which
we have our own, more restrictive version).

Since we have now tried all custom conformance rules provided by the
compiler today, this closes the associated issue.

Closes #1130.

Change-Id: Iad9040d0f5ee397c7d46b1d64bc5bebf2def57bc
2017-11-29 14:50:47 -08:00
Jacob Trimble 1458832a31 Change Player version suffix.
Rather than using the -debug suffix for uncompiled builds, use
-uncompiled.  This also changes the version for debug compiled builds
to use the -debug suffix.

Change-Id: I3c0c1c3b849d5f817c4d7f7bcfd7f967a00d1aaf
2017-10-19 20:21:40 +00:00
Jacob Trimble fddcf0c259 Use logging module over print.
Rather than using print, use the logging module.  This allows embedding
environments to setup logging how they want.  This also ensures the logs
are flushed properly.

The prints for check.py, checkversion.py, stats.py, and for the --help
flag will still be printed to stdout since that would be the expected
output location.

Change-Id: I26e1bc866803c42981628c7e62261d13c7b3ff2b
2017-05-10 21:25:39 +00:00
Joey Parrish 1e0ad7126f Update shebang lines of python scripts
/usr/bin/env python is preferable, since it allows us to support
executable scripts on systems where python is installed in places
other than /usr/bin.

Incidentally, this was the only thing I needed to do to confirm
full build support on Windows, so I'm dropping a TODO about Windows
support for the extern generator.

Change-Id: Ice93174428e0d8015d0a7787f07a17e8ac808dc7
2017-04-24 20:17:43 +00:00
Joey Parrish 3978a8626b Update changelog and versions for v2.0.0-beta3
Change-Id: I0eebb4d035c9432376659e19e388c37b2454b954
2016-07-29 18:42:37 +00:00
Jacob Trimble a1449e44dc Make build files consistent with Google python style guide.
Change-Id: I49d181c4dbe4fe12b73cdc4a5c78b3dcf1319b56
2016-06-28 22:30:30 +00:00
Joey Parrish 06142be8fe Update changelog and bump versions for v2.0.0-beta
Also make version checking liberal enough to allow -beta.

Change-Id: I75dbffb78f3bc96f0f9a6c4a34fa2c639c419caf
2016-04-07 21:49:52 +00:00
Jacob Trimble 19973d63f4 Changed copyright headers from 2015 to 2016.
Change-Id: I429ff27e4794c03b7ea392e38415075077f9bfb1
2016-03-15 16:32:13 -07:00
Jacob Trimble 92075fbc29 Replaced remaining build scripts with python.
This also makes all build scripts runnable on Windows using both
Cygwin and native python.

Change-Id: If324800b8b899cac1cc715d30383255cd5f6ee71
2016-02-02 00:37:42 +00:00