# SConscript for Nonpareil
# $Id: SConscript 1241 2008-08-24 00:27:47Z eric $
# Copyright 2004, 2005, 2008 Eric Smith <eric@brouhaha.com>

# Nonpareil is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.  Note that I am not
# granting permission to redistribute or modify Nonpareil under the
# terms of any later version of the General Public License.

# Nonpareil is distributed in the hope that they 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 this program (in the file "COPYING"); if not, write to
# the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111, USA.

Import('env source_release_dir snapshot_dir')

#-----------------------------------------------------------------------------
# Sources
#-----------------------------------------------------------------------------

unmod_images = Split ("""35.png 45.png 55.png 80.png
                         21.png 25.png
                         32e.png 33c.png 34c.png 37e.png 38c.png
                         41cv.png""")

#-----------------------------------------------------------------------------
# Export 41CV image for use in building Nonpareil executable
#-----------------------------------------------------------------------------

env.Append (IMAGE_41CV = File ('41cv.png'))

#-----------------------------------------------------------------------------
# Install image files
#-----------------------------------------------------------------------------

env.Alias (target = 'install',
           source = env.Install (dir = env ['destdir'] + env ['libdir'],
                                 source = unmod_images))

#-----------------------------------------------------------------------------
# source tarball
#-----------------------------------------------------------------------------

dist_files = ['SConscript'] + unmod_images

env.Distribute (source_release_dir, dist_files)

env.Distribute (snapshot_dir, dist_files)

#-----------------------------------------------------------------------------
# Windows distribution ZIP file
#-----------------------------------------------------------------------------

if env ['target'] == 'win32':
    Import ('win32_bin_dist_dir')
    Install (win32_bin_dist_dir, unmod_images)
