2007-09-27 18:02:23 +00:00
|
|
|
#! /bin/sh
|
|
|
|
|
|
|
|
dir="`pwd`"
|
2014-02-24 12:17:12 +00:00
|
|
|
version=$(cat ../src/config.h | grep VERSION | sed -e 's/.*\"\(.*\)\"/\1/g')
|
2011-09-06 23:40:43 +00:00
|
|
|
distdir=aseprite-$version
|
2010-06-24 12:53:17 +00:00
|
|
|
zip="zip -9"
|
|
|
|
zip_recursive_flag="-r"
|
2007-09-27 18:02:23 +00:00
|
|
|
|
2012-05-21 00:00:44 +00:00
|
|
|
if [ ! -f create_packages.sh ]; then
|
|
|
|
echo You must run create_packages.sh from scripts/ directory
|
2011-06-16 23:43:55 +00:00
|
|
|
exit 1
|
|
|
|
fi
|
2007-09-27 18:02:23 +00:00
|
|
|
|
|
|
|
######################################################################
|
2012-03-22 22:03:58 +00:00
|
|
|
# Full source distribution (with 3rd party code)
|
2007-09-27 18:02:23 +00:00
|
|
|
|
|
|
|
if [ ! -f $distdir.zip ] ; then
|
2011-06-16 23:43:55 +00:00
|
|
|
cd "$dir/.."
|
|
|
|
mkdir "$dir/$distdir"
|
2012-03-22 22:03:58 +00:00
|
|
|
cp --parents $(git ls-files) "$dir/$distdir"
|
2011-06-16 23:43:55 +00:00
|
|
|
cd "$dir"
|
|
|
|
|
|
|
|
$zip $zip_recursive_flag $distdir.zip $distdir
|
2012-03-22 22:03:58 +00:00
|
|
|
rm -fr $distdir
|
|
|
|
fi
|
|
|
|
|
|
|
|
#####################################################################
|
|
|
|
# Minimal source distribution (without 3rd party code).
|
|
|
|
# Used to compile ASEPRITE with shared libraries.
|
|
|
|
|
|
|
|
if [ ! -f $distdir.tar.xz ] ; then
|
|
|
|
cd "$dir/.."
|
|
|
|
mkdir "$dir/$distdir"
|
2012-09-14 23:31:17 +00:00
|
|
|
cp --parents $(git ls-files | grep -v -e ^third_party | grep -v -e ^src/allegro | grep -v -e ^scripts) "$dir/$distdir"
|
2012-03-22 22:03:58 +00:00
|
|
|
cp --parents third_party/CMakeLists.txt "$dir/$distdir"
|
|
|
|
cd "$dir"
|
|
|
|
|
|
|
|
tar vcfJ $distdir.tar.xz $distdir
|
2011-06-16 23:43:55 +00:00
|
|
|
rm -fr $distdir
|
2007-09-27 18:02:23 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
######################################################################
|
|
|
|
# Files for binary distributions
|
|
|
|
|
2007-09-27 20:13:06 +00:00
|
|
|
function def_common_files()
|
2007-09-27 18:02:23 +00:00
|
|
|
{
|
2012-01-05 22:45:03 +00:00
|
|
|
txt_files=" \
|
|
|
|
$1/README.html \
|
|
|
|
$1/LICENSE.txt \
|
|
|
|
$1/data/convmatr.def \
|
|
|
|
$1/data/*.xml \
|
|
|
|
$1/docs/files/*.txt \
|
|
|
|
$1/docs/licenses/*.txt \
|
2010-04-10 19:53:24 +00:00
|
|
|
$1/data/widgets/*.xml"
|
2007-09-27 18:02:23 +00:00
|
|
|
|
2012-01-05 22:45:03 +00:00
|
|
|
bin_files=" \
|
2014-04-18 01:33:06 +00:00
|
|
|
$1/data/palettes/*.gpl \
|
2012-01-05 22:45:03 +00:00
|
|
|
$1/data/icons/ase*.ico \
|
|
|
|
$1/data/icons/ase*.png \
|
|
|
|
$1/data/skins/*/*.png \
|
|
|
|
$1/data/skins/*/*.xml \
|
2007-09-27 18:02:23 +00:00
|
|
|
$1/docs/*.pdf"
|
|
|
|
}
|
|
|
|
|
|
|
|
######################################################################
|
|
|
|
# Win32 Distribution
|
|
|
|
|
|
|
|
if [ ! -f $distdir-win32.zip ] ; then
|
|
|
|
|
2011-06-16 23:43:55 +00:00
|
|
|
cd "$dir/.."
|
|
|
|
def_common_files .
|
|
|
|
mkdir "$dir/$distdir-win32"
|
2010-06-24 12:53:17 +00:00
|
|
|
|
2012-05-20 14:32:13 +00:00
|
|
|
# Generate README.html
|
|
|
|
pandoc README.md -o README.html
|
|
|
|
|
2011-06-16 23:43:55 +00:00
|
|
|
# For Allegro dll / C Runtime dll
|
|
|
|
#cp -r --parents $txt_files $bin_files aseprite.exe alleg44.dll msvcr90.dll "$dir/$distdir-win32"
|
2007-09-27 18:02:23 +00:00
|
|
|
|
2011-06-16 23:43:55 +00:00
|
|
|
# For Allegro static / static C runtime dll (use /MT to compile Allegro)
|
|
|
|
cp -r --parents $txt_files $bin_files aseprite.exe "$dir/$distdir-win32"
|
2010-06-24 12:53:17 +00:00
|
|
|
|
2012-05-20 14:32:13 +00:00
|
|
|
# Remove README.html
|
|
|
|
rm README.html
|
|
|
|
|
2011-06-16 23:43:55 +00:00
|
|
|
cd "$dir"
|
|
|
|
def_common_files $distdir-win32
|
2012-01-07 13:41:26 +00:00
|
|
|
$zip -l $distdir-win32.zip $txt_files
|
2010-06-24 12:53:17 +00:00
|
|
|
|
2011-06-16 23:43:55 +00:00
|
|
|
# Dynamic version of DLLs
|
2012-01-05 22:45:03 +00:00
|
|
|
#$zip $distdir-win32.zip $bin_files \
|
2011-06-16 23:43:55 +00:00
|
|
|
# $distdir-win32/aseprite.exe \
|
|
|
|
# $distdir-win32/alleg44.dll \
|
|
|
|
# $distdir-win32/msvcr90.dll
|
2010-06-24 12:53:17 +00:00
|
|
|
|
2011-06-16 23:43:55 +00:00
|
|
|
# Static version
|
|
|
|
$zip $distdir-win32.zip $bin_files \
|
|
|
|
$distdir-win32/aseprite.exe
|
2007-09-27 18:02:23 +00:00
|
|
|
|
2011-06-16 23:43:55 +00:00
|
|
|
rm -fr $distdir-win32
|
2007-09-27 18:02:23 +00:00
|
|
|
fi
|