Merge branch 'dev'

This commit is contained in:
David Capello 2014-06-06 08:51:45 -03:00
commit c82d91b1cf
3 changed files with 107 additions and 59 deletions

View File

@ -6,6 +6,10 @@
# Hard to reproduce bugs
* add PRINTFs to observers, there is something wrong with save as
* sometimes, when the background layer is in a strange state:
* two layers, hide background, the extra cel/brush preview isn't visible in the mini-editor
* timeline: can move background
* does lock alpha work correctly?
* does onscrollchange notification calls onscrollchange notification?
* random clicks on toolbar crashes the program

View File

@ -6,57 +6,100 @@ read srcdir
echo -n "What version to release (e.g. 0.9.1-beta) ? "
read version
destdir=aseprite-release-$version
echo -n "What kind of distribution (e.g. production, trial) ? "
read distribution
echo -n "What platform (e.g. win, mac) ? "
read platform
destdir=$(pwd)/aseprite-release-$version
if [ "$platform" == "win" ]; then
exefile=aseprite.exe
generator=ninja
elif [ "$platform" == "mac" ]; then
exefile=aseprite
generator=make
fi
# --------------------------
# Clone the local repository
# --------------------------
if [ ! -d $destdir ] ; then
git clone --depth=1 $srcdir $destdir
if [ ! -d "$destdir" ] ; then
git clone --depth=1 "$srcdir" "$destdir"
fi
# --------------
# Update version
# --------------
cd $destdir/scripts
sh update_version.sh $version
cd ..
cd "$destdir/scripts"
sh $srcdir/scripts/update_version.sh $version
# ----------------------------------------------
# Make a build/ directory and compile with cmake
# ----------------------------------------------
if [ ! -d build ] ; then
mkdir build
cd build
cmake \
-D "CMAKE_BUILD_TYPE:STRING=RelWithDebInfo" \
-D "CMAKE_CXX_FLAGS_RELWITHDEBINFO:STRING = /Zi /MT /O2 /Ob1 /D NDEBUG" \
-D "CMAKE_C_FLAGS_RELWITHDEBINFO:STRING = /Zi /MT /O2 /Ob1 /D NDEBUG" \
-D "CMAKE_EXE_LINKER_FLAGS:STRING = /MACHINE:X86 /SUBSYSTEM:WINDOWS,5.01" \
-G "Ninja" \
..
cd ..
if [ ! -d "$destdir/build" ] ; then
mkdir "$destdir/build"
cd "$destdir/build"
if [ "$platform" == "win" ]; then
if [ "$distribution" == "production" ]; then
cmake \
-D "CMAKE_BUILD_TYPE:STRING=RelWithDebInfo" \
-D "CMAKE_CXX_FLAGS_RELWITHDEBINFO:STRING = /Zi /MT /O2 /Ob1 /D NDEBUG" \
-D "CMAKE_C_FLAGS_RELWITHDEBINFO:STRING = /Zi /MT /O2 /Ob1 /D NDEBUG" \
-D "CMAKE_EXE_LINKER_FLAGS:STRING = /MACHINE:X86 /SUBSYSTEM:WINDOWS,5.01" \
-G "Ninja" \
..
elif [ "$distribution" == "trial" ]; then
cmake \
-D "CMAKE_BUILD_TYPE:STRING=RelWithDebInfo" \
-D "CMAKE_CXX_FLAGS_RELWITHDEBINFO:STRING = /Zi /MT /O2 /Ob1 /D NDEBUG" \
-D "CMAKE_C_FLAGS_RELWITHDEBINFO:STRING = /Zi /MT /O2 /Ob1 /D NDEBUG" \
-D "CMAKE_EXE_LINKER_FLAGS:STRING = /MACHINE:X86 /SUBSYSTEM:WINDOWS,5.01" \
-D "ENABLE_TRIAL_MODE:BOOL=ON" \
-G "Ninja" \
..
fi
elif [ "$platform" == "mac" ]; then
if [ "$distribution" == "production" ]; then
cmake \
-D "CMAKE_BUILD_TYPE:STRING=RelWithDebInfo" \
-G "Unix Makefiles" \
..
elif [ "$distribution" == "trial" ]; then
cmake \
-D "CMAKE_BUILD_TYPE:STRING=RelWithDebInfo" \
-D "ENABLE_TRIAL_MODE:BOOL=ON" \
-G "Unix Makefiles" \
..
fi
fi
fi
# -------
# Compile
# -------
if [ ! -f aseprite.exe ] ; then
cd build
ninja aseprite
cd src
aseprite-sign aseprite.exe
cp aseprite.exe ../..
cd ../..
if [ ! -f "$destdir/$exefile" ] ; then
cd "$destdir/build"
$generator aseprite
cd "$destdir/build/src"
signexe $exefile
cp $exefile "$destdir"
fi
# ---------------
# Create packages
# ---------------
cd scripts
sh create_packages.sh
cd "$destdir/scripts"
if [ "$platform" == "win" ]; then
sh create_packages.sh
elif [ "$platform" == "mac" ]; then
sh create_dmg.sh
fi

View File

@ -1,33 +1,34 @@
#! /bin/sh
if [ ! -f update_version.sh ]; then
echo You must run update_version.sh from scripts/ directory
exit 1
fi
version=$1
if [ "$version" == "" ]; then
echo Usage: update_version.sh VERSION
exit 1
fi
version_win32=$(echo $1 | sed -e 's/\./,/g' | sed -e 's/-.*$//')
commas=$(grep -o "," <<< "$version_win32" | wc -l)
while [ $commas -lt 3 ] ; do
version_win32+=",0"
commas=$(grep -o "," <<< "$version_win32" | wc -l)
done
sed -e "s/define VERSION.*/define VERSION \"$version\"/" < ../src/config.h > tmp
mv tmp ../src/config.h
sed -e "s/gui version=\".*/gui version=\"$version\">/" < ../data/gui.xml > tmp
mv tmp ../data/gui.xml
sed -e "s/FILEVERSION .*/FILEVERSION $version_win32/" < ../src/main/resources_win32.rc \
| sed -e "s/PRODUCTVERSION .*/PRODUCTVERSION $version_win32/" \
| sed -e "s/FileVersion\",.*/FileVersion\", \"$version_win32\"/" \
| sed -e "s/ProductVersion\",.*/ProductVersion\", \"$version_win32\"/" \
> tmp
mv tmp ../src/main/resources_win32.rc
#! /bin/sh
if [ ! -f update_version.sh ]; then
echo You must run update_version.sh from scripts/ directory
exit 1
fi
version=$1
if [ "$version" == "" ]; then
echo Usage: update_version.sh VERSION
exit 1
fi
version_win32=$(echo $1 | sed -e 's/\./,/g' | sed -e 's/-.*$//')
commas=$(grep -o "," <<< "$version_win32" | wc -l)
while [ $commas -lt 3 ] ; do
version_win32+=",0"
commas=$(grep -o "," <<< "$version_win32" | wc -l)
done
sed -e "s/define VERSION.*/define VERSION \"$version\"/" < ../src/config.h > tmp
mv tmp ../src/config.h
sed -e "s/gui version=\".*/gui version=\"$version\">/" < ../data/gui.xml > tmp
mv tmp ../data/gui.xml
cat ../src/main/resources_win32.rc \
| sed -e "s/FILEVERSION .*/FILEVERSION $version_win32/" \
| sed -e "s/PRODUCTVERSION .*/PRODUCTVERSION $version_win32/" \
| sed -e "s/FileVersion\",.*/FileVersion\", \"$version_win32\"/" \
| sed -e "s/ProductVersion\",.*/ProductVersion\", \"$version_win32\"/" \
> tmp
mv tmp ../src/main/resources_win32.rc