diff --git a/data/wscript b/data/wscript new file mode 100644 index 0000000..8206123 --- /dev/null +++ b/data/wscript @@ -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 + diff --git a/lib/wscript b/lib/wscript index 03d5414..0de9f9a 100644 --- a/lib/wscript +++ b/lib/wscript @@ -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 diff --git a/src/SkinChooser.cpp b/src/SkinChooser.cpp index 4bb9e78..73c7db9 100644 --- a/src/SkinChooser.cpp +++ b/src/SkinChooser.cpp @@ -26,6 +26,8 @@ #include +#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); diff --git a/src/mainwindow/textscroller.cpp b/src/mainwindow/textscroller.cpp index da8a5db..d136956 100644 --- a/src/mainwindow/textscroller.cpp +++ b/src/mainwindow/textscroller.cpp @@ -28,6 +28,8 @@ #include +#include "promoe_config.h" + TextScroller::TextScroller (QWidget *parent, uint w, uint h, const QString &name) : QWidget (parent) { diff --git a/src/playlist/playlistshade.cpp b/src/playlist/playlistshade.cpp index 3f7ef41..30753c6 100644 --- a/src/playlist/playlistshade.cpp +++ b/src/playlist/playlistshade.cpp @@ -26,6 +26,8 @@ #include #include +#include "promoe_config.h" + PlaylistShade::PlaylistShade (PlaylistWindow *parent) : QWidget (parent) { QSettings s; diff --git a/src/wscript b/src/wscript index 8606300..8a978b3 100644 --- a/src/wscript +++ b/src/wscript @@ -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 diff --git a/wscript b/wscript index 381b116..1bf71ba 100644 --- a/wscript +++ b/wscript @@ -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')