OLD | NEW |
| (Empty) |
1 #! -*- python -*- | |
2 # | |
3 # Copyright (c) 2011 The Native Client Authors. All rights reserved. | |
4 # Use of this source code is governed by a BSD-style license that can be | |
5 # found in the LICENSE file. | |
6 | |
7 import make_nacl_env | |
8 import nacl_utils | |
9 import os | |
10 | |
11 nacl_env = make_nacl_env.NaClEnvironment( | |
12 use_c_plus_plus_libs=True, nacl_platform=os.getenv('NACL_TARGET_PLATFORM')) | |
13 nacl_env.Append( | |
14 # Add a CPPPATH that enables the full-path #include directives, such as | |
15 # #include "examples/sine_synth/sine_synth.h" | |
16 CPPPATH=[os.path.dirname(os.path.dirname(os.getcwd()))], | |
17 ) | |
18 | |
19 sources = ['life.cc', | |
20 'life_application.cc', | |
21 'life_module.cc', | |
22 'stamp.cc', | |
23 os.path.join('audio', 'audio_player.cc'), | |
24 os.path.join('audio', 'web_wav_sound_resource.cc'), | |
25 os.path.join('scripting', 'scripting_bridge.cc'), | |
26 ] | |
27 | |
28 opt_life, dbg_life = nacl_env.AllNaClModules(sources, 'life') | |
29 | |
30 nacl_install_root = os.getenv( | |
31 'NACL_INSTALL_ROOT', os.path.join('C:%s' % os.sep, 'inetpub', 'wwwroot')) | |
32 install_dir = os.path.join(nacl_install_root, 'conways_life') | |
33 | |
34 cws_files = [os.path.join('cws', src_file) for src_file in [ | |
35 'manifest.json', | |
36 'conways_life_icon.png', | |
37 'conways_life_icon16.png', | |
38 'screenshot.jpg', | |
39 'screenshot_small.jpg', | |
40 ]] | |
41 install_cws = nacl_env.Install(dir=os.path.join(install_dir, 'cws'), | |
42 source=cws_files) | |
43 | |
44 app_sources = [ | |
45 'about.html', | |
46 'index.html', | |
47 'life.nmf', | |
48 'closure.js', | |
49 'life.js', | |
50 ] | |
51 install_app = nacl_env.Install(dir=install_dir, | |
52 source=opt_life + app_sources) | |
53 | |
54 controller_sources = [os.path.join('controllers', src_file) for src_file in [ | |
55 'stamp_editor.js', | |
56 'stamp_panel.js', | |
57 'viewcontroller.js', | |
58 ]] | |
59 install_controllers = nacl_env.Install( | |
60 dir=os.path.join(install_dir, 'controllers'), | |
61 source=controller_sources) | |
62 | |
63 events_sources = [os.path.join('events', src_file) for src_file in [ | |
64 'dragger.js', | |
65 'event.js', | |
66 ]] | |
67 install_events = nacl_env.Install( | |
68 dir=os.path.join(install_dir, 'events'), | |
69 source=events_sources) | |
70 | |
71 css_sources = [os.path.join('css', src_file) for src_file in [ | |
72 'life.css', | |
73 'stamp_editor.css', | |
74 'toolbar.css', | |
75 ]] | |
76 install_css = nacl_env.Install( | |
77 dir=os.path.join(install_dir, 'css'), | |
78 source=css_sources) | |
79 | |
80 img_sources = [os.path.join('img', src_file) for src_file in [ | |
81 'dead_cell.png', | |
82 'live_cell.png', | |
83 'minus_button.png', | |
84 'pause_button.png', | |
85 'play_button.png', | |
86 'plus_button.png', | |
87 'toolbar-bg.png', | |
88 ]] | |
89 install_imgs = nacl_env.Install( | |
90 dir=os.path.join(install_dir, 'img'), | |
91 source=img_sources) | |
92 | |
93 # Doorbell sound by Mike Koenig: http://soundbible.com/165-Door-Bell.html | |
94 # All other sounds from WavSource: http://www.wavsource.com/sfx/sfx.htm | |
95 sound_sources = [os.path.join('sounds', src_file) for src_file in [ | |
96 'ahem_x.wav', | |
97 'bicycle_bell.wav', | |
98 'boing_x.wav', | |
99 'doorbell.wav', | |
100 ]] | |
101 install_sounds = nacl_env.Install( | |
102 dir=os.path.join(install_dir, 'sounds'), | |
103 source=sound_sources) | |
104 | |
105 install_life = nacl_env.Alias('install', [ | |
106 install_cws, | |
107 install_app, | |
108 install_controllers, | |
109 install_events, | |
110 install_css, | |
111 install_imgs, | |
112 install_sounds]) | |
OLD | NEW |