Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Added gyp_ots script which fetches gyp and creates build files. - Cleanup ots-standalone.gyp and added further test program targets. - Fixed some compile errors of test programs on Mac. Review URL: https://chromiumcodereview.appspot.com/10314003
- Loading branch information
bashi@chromium.org
committed
May 7, 2012
1 parent
b4cd4b3
commit 1d2b263
Showing
8 changed files
with
159 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,37 @@ | ||
How to build (on Linux): | ||
How to build (using scons, on Linux): | ||
|
||
$ cd ots/test/ | ||
$ sudo apt-get install scons g++ libfreetype6-dev | ||
$ scons | ||
|
||
How to build (on Windows) (experimental): | ||
How to build (using gyp): | ||
|
||
1. Download zlib compiled DLL from http://www.zlib.net/ and install them | ||
following the instruction described in the document. | ||
(Note: test programs which require gtest can't build with gyp for now) | ||
|
||
2. Install gyp (Generate Your Projects) from http://code.google.com/p/gyp/. | ||
You will need a subversion client to install gyp. | ||
See http://code.google.com/p/gyp/source/checkout to install gyp. | ||
1. If you are building OTS on Windows, download zlib from | ||
http://www.zlib.net/ and put them in appropriate folder. | ||
|
||
3. Generate MSVS project file. | ||
2. Run gyp_ots | ||
|
||
$ gyp --depth=. -f msvs ots-standalone.gyp | ||
$ ./gyp_ots | ||
|
||
4. Open the generated project file (ots-standalone.sln) and build it. | ||
Make sure that zlib.h and zconf.h are located in a directory found in | ||
the INCLUDE path list. | ||
This will fetch gyp and generate build files. By default, following | ||
files will be generated: | ||
- MSVS solution file on Windows | ||
- Xcode project file on Mac | ||
- Makefile on Linux | ||
|
||
5. Test binary (only idempotent.exe for now) will be located in Default/ | ||
directory. | ||
If you want to generate Makefile on Mac, you can use -f option: | ||
|
||
$ ./gyp_ots -f make | ||
|
||
3. Build OTS | ||
|
||
Using MSVS: | ||
Open ots-standalone.sln and build targets. | ||
|
||
Using Xcode: | ||
$ xcodebuild -target ots-standalone.xcodeproj -target all | ||
|
||
Using Makefile: | ||
$ make |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
#!/usr/bin/env python | ||
|
||
# Copyright (c) 2012 The Chromium Authors. All rights reserved. | ||
# Use of this source code is governed by a BSD-style license that can be | ||
# found in the LICENSE file. | ||
|
||
import os | ||
import subprocess | ||
import sys | ||
|
||
_GYP_REVISION = '1344' | ||
_GYP_FETCH_URL = 'https://gyp.googlecode.com/svn/trunk@' + _GYP_REVISION | ||
|
||
def _fetch_gyp(): | ||
gyp_dir = os.path.join('third_party', 'gyp') | ||
if not os.path.exists(gyp_dir): | ||
retcode = subprocess.call(['svn', 'checkout', _GYP_FETCH_URL, gyp_dir]) | ||
if retcode < 0: | ||
raise "Couldn't fetch gyp" | ||
# TODO(bashi): Check revision, etc | ||
sys.path.insert(0, os.path.abspath(os.path.join(gyp_dir, 'pylib'))) | ||
|
||
def main(): | ||
script_dir = os.path.abspath(os.path.dirname(__file__)) | ||
os.chdir(script_dir) | ||
_fetch_gyp() | ||
import gyp | ||
|
||
args = [] | ||
args.extend(['--depth', '.']) | ||
args.extend(sys.argv[1:]) | ||
args.append(os.path.join(script_dir, 'ots-standalone.gyp')) | ||
sys.exit(gyp.main(args)) | ||
|
||
if __name__ == '__main__': | ||
main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters