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
.repo
.settings
/base/
/build/
/docs/
/ipc/
/net/
/out/
/testing/
/third_party/curl/source/
/third_party/gflags/
/third_party/gold/
/third_party/icu/
/third_party/libevent/
/third_party/libxml/
/third_party/llvm-build/
/third_party/modp_b64/
/third_party/openssl/
/third_party/protobuf/
/third_party/zlib/
/tools/clang/
/tools/gyp/
/tools/protoc_wrapper/
/tools/valgrind/
/packager/base/
/packager/build/
/packager/docs/
/packager/ipc/
/packager/net/
/packager/testing/
/packager/third_party/curl/source/
/packager/third_party/gflags/
/packager/third_party/gold/
/packager/third_party/icu/
/packager/third_party/libevent/
/packager/third_party/libxml/
/packager/third_party/llvm-build/
/packager/third_party/modp_b64/
/packager/third_party/openssl/
/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 = {
"src/base":
"src/packager/base":
Var("chromium_svn") + "/src/base@" + Var("chromium_rev"),
"src/build":
"src/packager/build":
Var("chromium_svn") + "/src/build@" + Var("chromium_rev"),
# Required by base/metrics/stats_table.cc.
"src/ipc":
"src/packager/ipc":
File(Var("chromium_svn") + "/src/ipc/ipc_descriptors.h@" + Var("chromium_rev")),
# Required by base isolate dependencies, although it is compiled off.
@ -41,68 +41,68 @@ deps = {
# <= net/third_party/nss/ssl_base.isolate
# 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).
"src/net/third_party/nss":
"src/packager/net/third_party/nss":
Var("chromium_svn") + "/src/net/third_party/nss@" + Var("chromium_rev"),
"src/testing":
"src/packager/testing":
Var("chromium_svn") + "/src/testing@" + Var("chromium_rev"),
"src/testing/gmock":
"src/packager/testing/gmock":
(Var("googlecode_url") % "googlemock") + "/trunk@" + Var("gmock_rev"),
"src/testing/gtest":
"src/packager/testing/gtest":
(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"),
"src/third_party/gflags":
"src/packager/third_party/gflags":
(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"),
# Required by libxml.
"src/third_party/icu":
"src/packager/third_party/icu":
Var("chromium_svn") + "/deps/third_party/icu46@" + Var("chromium_rev"),
# 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"),
"src/third_party/libxml":
"src/packager/third_party/libxml":
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"),
"src/third_party/openssl":
"src/packager/third_party/openssl":
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"),
"src/tools/clang":
"src/packager/tools/clang":
Var("chromium_svn") + "/src/tools/clang@" + Var("chromium_rev"),
"src/tools/gyp":
"src/packager/tools/gyp":
(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"),
"src/tools/valgrind":
"src/packager/tools/valgrind":
Var("chromium_svn") + "/src/tools/valgrind@" + Var("chromium_rev"),
}
deps_os = {
"unix": { # Linux, actually.
# 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"),
# 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"),
},
}
@ -114,11 +114,11 @@ hooks = [
# Pull clang if on Mac or clang is requested via GYP_DEFINES.
"name": "clang",
"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.
"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
```Shell
mkdir packager
cd packager
mkdir edash_packager
cd edash_packager
gclient config https://www.github.com/google/edash-packager.git --name=src
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.
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
GYP_GENERATORS='make' ./gyp_packager.py
GYP_GENERATORS='make' gclient runhooks
```
Another example, developers can also enable clang by overriding *GYP_DEFINE*.
```Shell
GYP_DEFINES='clang=1' ./gyp_packager.py
```
Take note that clang needs to be setup for the first time if it is not setup yet.
```Shell
tools/clang/scripts/update.sh
GYP_DEFINES='clang=1' gclient runhooks
```
5. Updating the code

View File

@ -34,7 +34,8 @@
import os
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'))
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'):
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...'
sys.stdout.flush()

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