X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Ftools%2Fwscript;h=8b24bb0432201181d67af46a6c9a2e9c279b5d03;hb=1bd0ed7f4a2bd67da7e8957dac7a8d143e9a599a;hp=9c1ca7524ea65b1f6def3352ac78ebe70c933af1;hpb=288e7e64e9be84b8dbe11f5acb490e64a29d9378;p=dcpomatic.git diff --git a/src/tools/wscript b/src/tools/wscript index 9c1ca7524..8b24bb043 100644 --- a/src/tools/wscript +++ b/src/tools/wscript @@ -1,18 +1,68 @@ +# +# Copyright (C) 2012-2015 Carl Hetherington +# +# This file is part of DCP-o-matic. +# +# DCP-o-matic is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# DCP-o-matic is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with DCP-o-matic. If not, see . +# + +import os +import glob +from waflib import Logs +import i18n + +def configure(conf): + if conf.env.TARGET_WINDOWS: + conf.env.append_value('CXXFLAGS', ['-mconsole']) + conf.env.append_value('LINKFLAGS', ['-mconsole']) + def build(bld): - for t in ['makedcp', 'fixlengths', 'servomatic_cli']: - obj = bld(features = 'cxx cxxprogram') - obj.uselib = 'BOOST_THREAD' - obj.includes = ['..'] - obj.use = ['libdvdomatic'] + uselib = 'BOOST_THREAD BOOST_DATETIME DCP XMLSEC CXML XMLPP AVFORMAT AVFILTER AVCODEC ' + uselib += 'AVUTIL SWSCALE SWRESAMPLE POSTPROC CURL BOOST_FILESYSTEM SSH ZIP CAIROMM FONTCONFIG PANGOMM SUB ' + uselib += 'MAGICK SNDFILE SAMPLERATE BOOST_REGEX ICU NETTLE RTAUDIO ' + + if bld.env.TARGET_WINDOWS: + uselib += 'WINSOCK2 DBGHELP SHLWAPI MSWSOCK BOOST_LOCALE WINSOCK2 OLE32 DSOUND WINMM KSUSER ' + + for t in ['dcpomatic_cli', 'dcpomatic_server_cli', 'server_test', 'dcpomatic_kdm_cli', 'dcpomatic_create']: + obj = bld(features='cxx cxxprogram') + obj.uselib = uselib + obj.includes = ['..'] + obj.use = ['libdcpomatic2'] obj.source = '%s.cc' % t - obj.target = t + obj.target = t.replace('dcpomatic', 'dcpomatic2') + if t == 'server_test': + obj.install_path = None if not bld.env.DISABLE_GUI: - for t in ['dvdomatic', 'servomatic_gui']: - obj = bld(features = 'cxx cxxprogram') + for t in ['dcpomatic', 'dcpomatic_batch', 'dcpomatic_server', 'dcpomatic_kdm', 'dcpomatic_player']: + obj = bld(features='cxx cxxprogram') + obj.uselib = uselib + if bld.env.BUILD_STATIC or bld.env.TARGET_LINUX: + obj.uselib += ' GTK' + obj.uselib += ' WXWIDGETS' obj.includes = ['..'] - obj.use = ['libdvdomatic', 'libdvdomatic-wx'] + obj.use = ['libdcpomatic2', 'libdcpomatic2-wx'] obj.source = '%s.cc' % t if bld.env.TARGET_WINDOWS: - obj.source += ' ../../windows/dvdomatic.rc' - obj.target = t + obj.source += ' ../../platform/windows/%s.rc' % t + obj.target = t.replace('dcpomatic', 'dcpomatic2') + + i18n.po_to_mo(os.path.join('src', 'tools'), 'dcpomatic2', bld) + +def pot(bld): + i18n.pot(os.path.join('src', 'tools'), 'dcpomatic.cc dcpomatic_batch.cc dcpomatic_kdm.cc dcpomatic_server.cc', 'dcpomatic') + +def pot_merge(bld): + i18n.pot_merge(os.path.join('src', 'tools'), 'dcpomatic')