OTHER: Remove some cruft and clean up build system

This commit is contained in:
Thomas Frauendorfer 2009-08-31 23:22:35 +02:00
parent 3eb11f6933
commit 7501a912c9
7 changed files with 78 additions and 27 deletions

47
data/wscript Normal file
View file

@ -0,0 +1,47 @@
# encoding: utf-8
# vim:set syntax=python expandtab :
"""
This file is a part of Promoe, an XMMS2 Client
Copyright (C) 2009 XMMS2 Team
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. The name of the author may not be used to endorse or promote products
derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
"""
def set_options(opt):
pass
def configure(conf):
pass
def build(bld):
obj = bld.new_task_gen('qt4', 'staticlib', 'cxx')
obj.target = 'promoe_data'
obj.install_path = 0 # Don't install
obj.source = 'Almond-blue.qrc'
obj.uselib = 'QTCORE'
pass

View file

@ -49,12 +49,12 @@ def set_options(opt):
def configure(conf):
pass
def build(bld):
obj = bld.new_task_gen('qt4', 'staticlib', 'cxx')
obj.target = 'lib_promoe'
obj.install_path = 0 # Don't install
obj.includes = '.'
obj.source = lib_source
obj.uselib = 'QTCORE QTGUI XMMS2-CLIENT-CPP'
obj = bld.new_task_gen('qt4', 'staticlib', 'cxx')
obj.target = 'promoe_lib'
obj.install_path = 0 # Don't install
obj.includes = '.'
obj.source = lib_source
obj.uselib = 'QTCORE QTGUI XMMS2-CLIENT-CPP'
obj.export_incdirs = '.'
pass

View file

@ -26,6 +26,8 @@
#include <QtDebug>
#include "promoe_config.h"
SkinChooser::SkinChooser (QWidget *parent) : QDialog (parent)
{
@ -75,7 +77,7 @@ SkinList::SkinList (QWidget *parent) : QListWidget (parent)
settings.setValue ("skin/searchpath", searchpath);
}
// This should not be saved in the searchpath config value.
searchpath.append (DATADIR "/skins");
searchpath.append (PROMOE_SKINDIR);
QDir d;
d.setFilter (QDir::AllDirs|QDir::NoDotAndDotDot|QDir::Files);

View file

@ -28,6 +28,8 @@
#include <application.h>
#include "promoe_config.h"
TextScroller::TextScroller (QWidget *parent, uint w,
uint h, const QString &name) : QWidget (parent)
{

View file

@ -26,6 +26,8 @@
#include <QPainter>
#include <QPoint>
#include "promoe_config.h"
PlaylistShade::PlaylistShade (PlaylistWindow *parent) : QWidget (parent)
{
QSettings s;

View file

@ -93,13 +93,14 @@ def build(bld):
sources.append("../data/Almond-blue.qrc")
obj = bld.new_task_gen('qt4', 'program', 'cxx')
obj.target = 'promoe'
obj.includes = bld_subdirs
obj.includes.append('.')
# obj.includes.append('../lib')
obj.source= sources
obj.uselib_local = 'lib_promoe'
obj.uselib = 'QTCORE QTGUI AVAHI-CLIENT AVAHI-QT4'
incdirs = bld_subdirs
incdirs.append('.')
obj = bld.new_task_gen('qt4', 'program', 'cxx')
obj.target = 'promoe'
obj.includes = incdirs
obj.source = sources
obj.uselib_local = 'promoe_lib promoe_data'
obj.uselib = 'QTCORE QTGUI AVAHI-CLIENT AVAHI-QT4'
pass

19
wscript
View file

@ -59,26 +59,23 @@ def configure(conf):
conf.define('VERSION', APPVERSION)
conf.define('PROMOE_VERSION', APPVERSION)
conf.define('PROMOE_DATADIR', os.path.join(conf.env['DATADIR'], 'promoe'))
# temprary, until all usages are removed
conf.env['CXXDEFINES'] =[]
conf.env['CXXDEFINES'].append('PROMOE_VERSION="%s"'%APPVERSION)
conf.env['CXXDEFINES'].append('DATADIR="%s/promoe"'%conf.env['DATADIR'])
# Path for 'promoe_config.h'
conf.env.prepend_value("CPPPATH", conf.srcdir)
conf.define('PROMOE_SKINDIR',
os.path.join(conf.env['PROMOE_DATADIR'], 'Skins'))
conf.sub_config('lib')
# Path needed to find library headers for local static library
conf.env.prepend_value("CPPPATH", os.path.join(conf.srcdir, "lib"))
conf.sub_config('data')
conf.sub_config('src')
conf.write_config_header('promoe_config.h')
# Path for 'promoe_config.h'
# FIXME: There must be a better way to get this path
conf.env.append_value('CPPPATH', os.path.join(conf.blddir, conf.envname))
def build(bld):
bld.add_subdirs('lib')
bld.add_subdirs('data')
bld.add_subdirs('src')
bld.install_files('${MANDIR}/man1', 'promoe.1')