2007-09-27 18:02:23 +00:00
|
|
|
#! /bin/sh
|
|
|
|
|
|
|
|
dir="`pwd`"
|
2014-02-24 09:17:12 -03:00
|
|
|
version=$(cat ../src/config.h | grep VERSION | sed -e 's/.*\"\(.*\)\"/\1/g')
|
2011-09-06 20:40:43 -03:00
|
|
|
distdir=aseprite-$version
|
2010-06-24 09:53:17 -03:00
|
|
|
zip="zip -9"
|
|
|
|
zip_recursive_flag="-r"
|
2007-09-27 18:02:23 +00:00
|
|
|
|
2012-05-20 21:00:44 -03:00
|
|
|
if [ ! -f create_packages.sh ]; then
|
|
|
|
echo You must run create_packages.sh from scripts/ directory
|
2011-06-16 20:43:55 -03:00
|
|
|
exit 1
|
|
|
|
fi
|
2007-09-27 18:02:23 +00:00
|
|
|
|
|
|
|
######################################################################
|
2012-03-22 19:03:58 -03:00
|
|
|
# Full source distribution (with 3rd party code)
|
2007-09-27 18:02:23 +00:00
|
|
|
|
|
|
|
if [ ! -f $distdir.zip ] ; then
|
2011-06-16 20:43:55 -03:00
|
|
|
cd "$dir/.."
|
|
|
|
mkdir "$dir/$distdir"
|
2012-03-22 19:03:58 -03:00
|
|
|
cp --parents $(git ls-files) "$dir/$distdir"
|
2011-06-16 20:43:55 -03:00
|
|
|
cd "$dir"
|
|
|
|
|
|
|
|
$zip $zip_recursive_flag $distdir.zip $distdir
|
2012-03-22 19:03:58 -03: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 20:31:17 -03: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 19:03:58 -03:00
|
|
|
cp --parents third_party/CMakeLists.txt "$dir/$distdir"
|
|
|
|
cd "$dir"
|
|
|
|
|
|
|
|
tar vcfJ $distdir.tar.xz $distdir
|
2011-06-16 20:43:55 -03: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 19:45:03 -03: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 16:53:24 -03:00
|
|
|
$1/data/widgets/*.xml"
|
2007-09-27 18:02:23 +00:00
|
|
|
|
2012-01-05 19:45:03 -03:00
|
|
|
bin_files=" \
|
2014-04-17 22:33:06 -03:00
|
|
|
$1/data/palettes/*.gpl \
|
2012-01-05 19:45:03 -03: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 20:43:55 -03:00
|
|
|
cd "$dir/.."
|
|
|
|
def_common_files .
|
|
|
|
mkdir "$dir/$distdir-win32"
|
2010-06-24 09:53:17 -03:00
|
|
|
|
2012-05-20 11:32:13 -03:00
|
|
|
# Generate README.html
|
|
|
|
pandoc README.md -o README.html
|
|
|
|
|
2011-06-16 20:43:55 -03: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 20:43:55 -03: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 09:53:17 -03:00
|
|
|
|
2012-05-20 11:32:13 -03:00
|
|
|
# Remove README.html
|
|
|
|
rm README.html
|
|
|
|
|
2011-06-16 20:43:55 -03:00
|
|
|
cd "$dir"
|
|
|
|
def_common_files $distdir-win32
|
2012-01-07 10:41:26 -03:00
|
|
|
$zip -l $distdir-win32.zip $txt_files
|
2010-06-24 09:53:17 -03:00
|
|
|
|
2011-06-16 20:43:55 -03:00
|
|
|
# Dynamic version of DLLs
|
2012-01-05 19:45:03 -03:00
|
|
|
#$zip $distdir-win32.zip $bin_files \
|
2011-06-16 20:43:55 -03:00
|
|
|
# $distdir-win32/aseprite.exe \
|
|
|
|
# $distdir-win32/alleg44.dll \
|
|
|
|
# $distdir-win32/msvcr90.dll
|
2010-06-24 09:53:17 -03:00
|
|
|
|
2011-06-16 20:43:55 -03:00
|
|
|
# Static version
|
|
|
|
$zip $distdir-win32.zip $bin_files \
|
|
|
|
$distdir-win32/aseprite.exe
|
2007-09-27 18:02:23 +00:00
|
|
|
|
2011-06-16 20:43:55 -03:00
|
|
|
rm -fr $distdir-win32
|
2007-09-27 18:02:23 +00:00
|
|
|
fi
|