Move source code into packager directory

Make it easier to be included and integrated into other code.

Change-Id: I609881688cc20f8fac676cbd91fde4753af32ee5
This commit is contained in:
KongQun Yang 2014-10-01 13:44:41 -07:00
parent e3d0f60c4b
commit b8126bc9da
375 changed files with 70 additions and 58 deletions

42
.gitignore vendored
View File

@ -5,25 +5,25 @@
.pydevproject .pydevproject
.repo .repo
.settings .settings
/base/
/build/
/docs/
/ipc/
/net/
/out/ /out/
/testing/ /packager/base/
/third_party/curl/source/ /packager/build/
/third_party/gflags/ /packager/docs/
/third_party/gold/ /packager/ipc/
/third_party/icu/ /packager/net/
/third_party/libevent/ /packager/testing/
/third_party/libxml/ /packager/third_party/curl/source/
/third_party/llvm-build/ /packager/third_party/gflags/
/third_party/modp_b64/ /packager/third_party/gold/
/third_party/openssl/ /packager/third_party/icu/
/third_party/protobuf/ /packager/third_party/libevent/
/third_party/zlib/ /packager/third_party/libxml/
/tools/clang/ /packager/third_party/llvm-build/
/tools/gyp/ /packager/third_party/modp_b64/
/tools/protoc_wrapper/ /packager/third_party/openssl/
/tools/valgrind/ /packager/third_party/protobuf/
/packager/third_party/zlib/
/packager/tools/clang/
/packager/tools/gyp/
/packager/tools/protoc_wrapper/
/packager/tools/valgrind/

48
DEPS
View File

@ -22,14 +22,14 @@ vars = {
} }
deps = { deps = {
"src/base": "src/packager/base":
Var("chromium_svn") + "/src/base@" + Var("chromium_rev"), Var("chromium_svn") + "/src/base@" + Var("chromium_rev"),
"src/build": "src/packager/build":
Var("chromium_svn") + "/src/build@" + Var("chromium_rev"), Var("chromium_svn") + "/src/build@" + Var("chromium_rev"),
# Required by base/metrics/stats_table.cc. # Required by base/metrics/stats_table.cc.
"src/ipc": "src/packager/ipc":
File(Var("chromium_svn") + "/src/ipc/ipc_descriptors.h@" + Var("chromium_rev")), File(Var("chromium_svn") + "/src/ipc/ipc_descriptors.h@" + Var("chromium_rev")),
# Required by base isolate dependencies, although it is compiled off. # Required by base isolate dependencies, although it is compiled off.
@ -41,68 +41,68 @@ deps = {
# <= net/third_party/nss/ssl_base.isolate # <= net/third_party/nss/ssl_base.isolate
# We don't need to pull in the whole directory, but it doesn't seem possible # We don't need to pull in the whole directory, but it doesn't seem possible
# to just pull in the two *.isolate files (ssl.isolate and ssl_base.isolate). # to just pull in the two *.isolate files (ssl.isolate and ssl_base.isolate).
"src/net/third_party/nss": "src/packager/net/third_party/nss":
Var("chromium_svn") + "/src/net/third_party/nss@" + Var("chromium_rev"), Var("chromium_svn") + "/src/net/third_party/nss@" + Var("chromium_rev"),
"src/testing": "src/packager/testing":
Var("chromium_svn") + "/src/testing@" + Var("chromium_rev"), Var("chromium_svn") + "/src/testing@" + Var("chromium_rev"),
"src/testing/gmock": "src/packager/testing/gmock":
(Var("googlecode_url") % "googlemock") + "/trunk@" + Var("gmock_rev"), (Var("googlecode_url") % "googlemock") + "/trunk@" + Var("gmock_rev"),
"src/testing/gtest": "src/packager/testing/gtest":
(Var("googlecode_url") % "googletest") + "/trunk@" + Var("gtest_rev"), (Var("googlecode_url") % "googletest") + "/trunk@" + Var("gtest_rev"),
"src/third_party/curl/source": "src/packager/third_party/curl/source":
Var("curl_url") + "@" + Var("curl_rev"), Var("curl_url") + "@" + Var("curl_rev"),
"src/third_party/gflags": "src/packager/third_party/gflags":
(Var("googlecode_url") % "webrtc")+ "/trunk/third_party/gflags@" + Var("webrtc_rev"), (Var("googlecode_url") % "webrtc")+ "/trunk/third_party/gflags@" + Var("webrtc_rev"),
"src/third_party/gflags/src": "src/packager/third_party/gflags/src":
(Var("googlecode_url") % "gflags") + "/trunk/src@" + Var("gflags_rev"), (Var("googlecode_url") % "gflags") + "/trunk/src@" + Var("gflags_rev"),
# Required by libxml. # Required by libxml.
"src/third_party/icu": "src/packager/third_party/icu":
Var("chromium_svn") + "/deps/third_party/icu46@" + Var("chromium_rev"), Var("chromium_svn") + "/deps/third_party/icu46@" + Var("chromium_rev"),
# Required by base/message_pump_libevent.cc. # Required by base/message_pump_libevent.cc.
"src/third_party/libevent": "src/packager/third_party/libevent":
Var("chromium_svn") + "/src/third_party/libevent@" + Var("chromium_rev"), Var("chromium_svn") + "/src/third_party/libevent@" + Var("chromium_rev"),
"src/third_party/libxml": "src/packager/third_party/libxml":
Var("chromium_svn") + "/src/third_party/libxml@" + Var("chromium_rev"), Var("chromium_svn") + "/src/third_party/libxml@" + Var("chromium_rev"),
"src/third_party/modp_b64": "src/packager/third_party/modp_b64":
Var("chromium_svn") + "/src/third_party/modp_b64@" + Var("chromium_rev"), Var("chromium_svn") + "/src/third_party/modp_b64@" + Var("chromium_rev"),
"src/third_party/openssl": "src/packager/third_party/openssl":
Var("chromium_svn") + "/deps/third_party/openssl@" + Var("chromium_rev"), Var("chromium_svn") + "/deps/third_party/openssl@" + Var("chromium_rev"),
"src/third_party/protobuf": "src/packager/third_party/protobuf":
Var("chromium_svn") + "/src/third_party/protobuf@" + Var("chromium_rev"), Var("chromium_svn") + "/src/third_party/protobuf@" + Var("chromium_rev"),
"src/tools/clang": "src/packager/tools/clang":
Var("chromium_svn") + "/src/tools/clang@" + Var("chromium_rev"), Var("chromium_svn") + "/src/tools/clang@" + Var("chromium_rev"),
"src/tools/gyp": "src/packager/tools/gyp":
(Var("googlecode_url") % "gyp") + "/trunk@" + Var("gyp_rev"), (Var("googlecode_url") % "gyp") + "/trunk@" + Var("gyp_rev"),
"src/tools/protoc_wrapper": "src/packager/tools/protoc_wrapper":
Var("chromium_svn") + "/src/tools/protoc_wrapper@" + Var("chromium_rev"), Var("chromium_svn") + "/src/tools/protoc_wrapper@" + Var("chromium_rev"),
"src/tools/valgrind": "src/packager/tools/valgrind":
Var("chromium_svn") + "/src/tools/valgrind@" + Var("chromium_rev"), Var("chromium_svn") + "/src/tools/valgrind@" + Var("chromium_rev"),
} }
deps_os = { deps_os = {
"unix": { # Linux, actually. "unix": { # Linux, actually.
# Linux gold build to build faster. # Linux gold build to build faster.
"src/third_party/gold": "src/packager/third_party/gold":
Var("chromium_svn") + "/deps/third_party/gold@" + Var("chromium_rev"), Var("chromium_svn") + "/deps/third_party/gold@" + Var("chromium_rev"),
# Required by /src/build/linux/system.gyp. # Required by /src/build/linux/system.gyp.
"src/third_party/zlib": "src/packager/third_party/zlib":
Var("chromium_svn") + "/src/third_party/zlib@" + Var("chromium_rev"), Var("chromium_svn") + "/src/third_party/zlib@" + Var("chromium_rev"),
}, },
} }
@ -114,11 +114,11 @@ hooks = [
# Pull clang if on Mac or clang is requested via GYP_DEFINES. # Pull clang if on Mac or clang is requested via GYP_DEFINES.
"name": "clang", "name": "clang",
"pattern": ".", "pattern": ".",
"action": ["python", "src/tools/clang/scripts/update.py", "--mac-only"], "action": ["python", "src/packager/tools/clang/scripts/update.py", "--mac-only"],
}, },
{ {
# A change to a .gyp, .gypi, or to GYP itself should run the generator. # A change to a .gyp, .gypi, or to GYP itself should run the generator.
"pattern": ".", "pattern": ".",
"action": ["python", "src/gyp_packager.py"], "action": ["python", "src/gyp_packager.py", "--depth=src/packager"],
}, },
] ]

View File

@ -13,8 +13,8 @@ This document provides the information needed to create a DASH packager that is
3. Get the source 3. Get the source
```Shell ```Shell
mkdir packager mkdir edash_packager
cd packager cd edash_packager
gclient config https://www.github.com/google/edash-packager.git --name=src gclient config https://www.github.com/google/edash-packager.git --name=src
gclient sync gclient sync
``` ```
@ -34,17 +34,13 @@ This document provides the information needed to create a DASH packager that is
``` ```
Refer to ninja manual for details. Refer to ninja manual for details.
We also provide a mechanism to change build configurations, for example, developers can change build system to “make” by overriding *GYP_GENERATORS* using *gyp_packager.py* script, i.e. We also provide a mechanism to change build configurations, for example, developers can change build system to “make” by overriding *GYP_GENERATORS*.
```Shell ```Shell
GYP_GENERATORS='make' ./gyp_packager.py GYP_GENERATORS='make' gclient runhooks
``` ```
Another example, developers can also enable clang by overriding *GYP_DEFINE*. Another example, developers can also enable clang by overriding *GYP_DEFINE*.
```Shell ```Shell
GYP_DEFINES='clang=1' ./gyp_packager.py GYP_DEFINES='clang=1' gclient runhooks
```
Take note that clang needs to be setup for the first time if it is not setup yet.
```Shell
tools/clang/scripts/update.sh
``` ```
5. Updating the code 5. Updating the code

View File

@ -34,7 +34,8 @@
import os import os
import sys import sys
src_dir = os.path.dirname(os.path.realpath(__file__)) checkout_dir = os.path.dirname(os.path.realpath(__file__))
src_dir = os.path.join(checkout_dir, 'packager')
sys.path.insert(0, os.path.join(src_dir, 'build')) sys.path.insert(0, os.path.join(src_dir, 'build'))
import gyp_helper # Workaround the dynamic path. pylint: disable-msg=F0401 import gyp_helper # Workaround the dynamic path. pylint: disable-msg=F0401
@ -79,6 +80,18 @@ if __name__ == '__main__':
if not os.environ.get('GYP_GENERATORS'): if not os.environ.get('GYP_GENERATORS'):
os.environ['GYP_GENERATORS'] = 'ninja' os.environ['GYP_GENERATORS'] = 'ninja'
# TODO(kqyang): Find a better way to handle the depth. This workaround works
# only if this script is executed in 'src' directory.
if ['--depth' in arg for arg in args].count(True) == 0:
args.append('--depth=packager')
output_dir = os.path.join(checkout_dir, 'out')
gyp_generator_flags = 'output_dir="' + output_dir + '"'
if os.environ.get('GYP_GENERATOR_FLAGS'):
os.environ['GYP_GENERATOR_FLAGS'] += " " + gyp_generator_flags
else:
os.environ['GYP_GENERATOR_FLAGS'] = gyp_generator_flags
print 'Updating projects from gyp files...' print 'Updating projects from gyp files...'
sys.stdout.flush() sys.stdout.flush()

Some files were not shown because too many files have changed in this diff Show More