Add Zipper class and use it in CinemaKDMs.
[dcpomatic.git] / src / lib / wscript
1 #
2 #    Copyright (C) 2012-2015 Carl Hetherington <cth@carlh.net>
3 #
4 #    This file is part of DCP-o-matic.
5 #
6 #    DCP-o-matic is free software; you can redistribute it and/or modify
7 #    it under the terms of the GNU General Public License as published by
8 #    the Free Software Foundation; either version 2 of the License, or
9 #    (at your option) any later version.
10 #
11 #    DCP-o-matic is distributed in the hope that it will be useful,
12 #    but WITHOUT ANY WARRANTY; without even the implied warranty of
13 #    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 #    GNU General Public License for more details.
15 #
16 #    You should have received a copy of the GNU General Public License
17 #    along with DCP-o-matic.  If not, see <http://www.gnu.org/licenses/>.
18 #
19
20 import os
21 import i18n
22
23 sources = """
24           active_text.cc
25           analyse_audio_job.cc
26           analyse_subtitles_job.cc
27           analytics.cc
28           atmos_mxf_content.cc
29           atomicity_checker.cc
30           audio_analysis.cc
31           audio_buffers.cc
32           audio_content.cc
33           audio_decoder.cc
34           audio_delay.cc
35           audio_filter.cc
36           audio_filter_graph.cc
37           audio_mapping.cc
38           audio_merger.cc
39           audio_point.cc
40           audio_processor.cc
41           audio_ring_buffers.cc
42           audio_stream.cc
43           butler.cc
44           text_content.cc
45           text_decoder.cc
46           case_insensitive_sorter.cc
47           checker.cc
48           check_content_change_job.cc
49           cinema.cc
50           cinema_kdms.cc
51           cinema_sound_processor.cc
52           colour_conversion.cc
53           config.cc
54           content.cc
55           content_factory.cc
56           copy_dcp_details_to_film.cc
57           create_cli.cc
58           cross_common.cc
59           crypto.cc
60           curl_uploader.cc
61           datasat_ap2x.cc
62           dcp.cc
63           dcp_content.cc
64           dcp_content_type.cc
65           dcp_decoder.cc
66           dcp_encoder.cc
67           dcp_examiner.cc
68           dcp_subtitle.cc
69           dcp_subtitle_content.cc
70           dcp_subtitle_decoder.cc
71           dcp_text_track.cc
72           dcp_video.cc
73           dcpomatic_log.cc
74           dcpomatic_socket.cc
75           dcpomatic_time.cc
76           decoder.cc
77           decoder_factory.cc
78           decoder_part.cc
79           decrypted_ecinema_kdm.cc
80           digester.cc
81           dkdm_wrapper.cc
82           dolby_cp750.cc
83           edid.cc
84           emailer.cc
85           empty.cc
86           encoder.cc
87           encode_server.cc
88           encode_server_finder.cc
89           encoded_log_entry.cc
90           encrypted_ecinema_kdm.cc
91           environment_info.cc
92           event_history.cc
93           examine_content_job.cc
94           examine_ffmpeg_subtitles_job.cc
95           exceptions.cc
96           file_group.cc
97           file_log.cc
98           filter_graph.cc
99           ffmpeg.cc
100           ffmpeg_audio_stream.cc
101           ffmpeg_content.cc
102           ffmpeg_decoder.cc
103           ffmpeg_encoder.cc
104           ffmpeg_file_encoder.cc
105           ffmpeg_examiner.cc
106           ffmpeg_stream.cc
107           ffmpeg_subtitle_stream.cc
108           film.cc
109           filter.cc
110           ffmpeg_image_proxy.cc
111           font.cc
112           frame_interval_checker.cc
113           frame_rate_change.cc
114           hints.cc
115           internet.cc
116           image.cc
117           image_content.cc
118           image_decoder.cc
119           image_examiner.cc
120           image_filename_sorter.cc
121           image_proxy.cc
122           isdcf_metadata.cc
123           j2k_image_proxy.cc
124           job.cc
125           job_manager.cc
126           j2k_encoder.cc
127           json_server.cc
128           lock_file_checker.cc
129           log.cc
130           log_entry.cc
131           mid_side_decoder.cc
132           monitor_checker.cc
133           overlaps.cc
134           player.cc
135           player_text.cc
136           player_video.cc
137           playlist.cc
138           position_image.cc
139           ratio.cc
140           raw_image_proxy.cc
141           reel_writer.cc
142           render_text.cc
143           resampler.cc
144           rgba.cc
145           scoped_temporary.cc
146           scp_uploader.cc
147           screen.cc
148           screen_kdm.cc
149           send_kdm_email_job.cc
150           send_notification_email_job.cc
151           send_problem_report_job.cc
152           server.cc
153           shuffler.cc
154           state.cc
155           spl.cc
156           spl_entry.cc
157           string_log_entry.cc
158           string_text_file.cc
159           string_text_file_content.cc
160           string_text_file_decoder.cc
161           subtitle_analysis.cc
162           subtitle_encoder.cc
163           text_ring_buffers.cc
164           timer.cc
165           transcode_job.cc
166           types.cc
167           signal_manager.cc
168           stdout_log.cc
169           update_checker.cc
170           upload_job.cc
171           uploader.cc
172           upmixer_a.cc
173           upmixer_b.cc
174           usl.cc
175           util.cc
176           verify_dcp_job.cc
177           video_content.cc
178           video_content_scale.cc
179           video_decoder.cc
180           video_filter_graph.cc
181           video_mxf_content.cc
182           video_mxf_decoder.cc
183           video_mxf_examiner.cc
184           video_ring_buffers.cc
185           writer.cc
186           zipper.cc
187           """
188
189 def build(bld):
190     if bld.env.STATIC_DCPOMATIC:
191         obj = bld(features = 'cxx cxxstlib')
192     else:
193         obj = bld(features = 'cxx cxxshlib')
194
195     obj.name = 'libdcpomatic2'
196     obj.export_includes = ['..']
197     obj.uselib = """
198                  AVCODEC AVUTIL AVFORMAT AVFILTER SWSCALE
199                  BOOST_FILESYSTEM BOOST_THREAD BOOST_DATETIME BOOST_SIGNALS2 BOOST_REGEX
200                  SAMPLERATE POSTPROC TIFF SSH DCP CXML GLIB LZMA XML++
201                  CURL ZIP FONTCONFIG PANGOMM CAIROMM XMLSEC SUB ICU NETTLE PNG LEQM_NRT
202                  """
203
204     if bld.env.TARGET_OSX:
205         obj.framework = ['IOKit', 'Foundation', 'DiskArbitration']
206
207     obj.source = sources + ' version.cc'
208
209     if bld.env.VARIANT == 'swaroop-theater' or bld.env.VARIANT == 'swaroop-studio':
210         obj.source += ' swaroop_spl.cc swaroop_spl_entry.cc'
211
212     if bld.env.ENABLE_DISK:
213         obj.source += ' copy_to_drive_job.cc nanomsg.cc'
214         obj.uselib += ' LWEXT4 NANOMSG'
215         if bld.env.TARGET_LINUX:
216             obj.uselib += ' POLKIT'
217
218     if bld.env.TARGET_WINDOWS:
219         obj.uselib += ' WINSOCK2 DBGHELP SHLWAPI MSWSOCK BOOST_LOCALE SETUPAPI'
220         obj.source += ' cross_windows.cc'
221     if bld.env.TARGET_OSX:
222         obj.source += ' cross_osx.cc'
223     if bld.env.TARGET_LINUX:
224         obj.source += ' cross_linux.cc'
225     if bld.env.STATIC_DCPOMATIC:
226         obj.uselib += ' XMLPP'
227
228     obj.target = 'dcpomatic2'
229
230     i18n.po_to_mo(os.path.join('src', 'lib'), 'libdcpomatic2', bld)
231
232 def pot(bld):
233     i18n.pot(os.path.join('src', 'lib'), sources + " util.h", 'libdcpomatic')
234
235 def pot_merge(bld):
236     i18n.pot_merge(os.path.join('src', 'lib'), 'libdcpomatic')