From e18b42161669f7d647882c3e485d4d91d46971b7 Mon Sep 17 00:00:00 2001 From: David Capello Date: Wed, 4 Jun 2014 21:58:18 -0300 Subject: [PATCH 1/6] Update TODO.md --- TODO.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/TODO.md b/TODO.md index 6c4e107cb..147a1fa64 100644 --- a/TODO.md +++ b/TODO.md @@ -6,6 +6,9 @@ # Hard to reproduce bugs +* 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 From f9e0be9e56ce2279180da91b2abd8e0c3c0441cf Mon Sep 17 00:00:00 2001 From: David Capello Date: Wed, 4 Jun 2014 22:11:58 -0300 Subject: [PATCH 2/6] Add distribution type to create_release.sh script --- scripts/create_release.sh | 28 +++++++++++++++++++++------- 1 file changed, 21 insertions(+), 7 deletions(-) diff --git a/scripts/create_release.sh b/scripts/create_release.sh index 18cafa5e8..3ac70bb2f 100644 --- a/scripts/create_release.sh +++ b/scripts/create_release.sh @@ -6,6 +6,9 @@ read srcdir echo -n "What version to release (e.g. 0.9.1-beta) ? " read version +echo -n "What kind of distribution (e.g. production, trial) ? " +read distribution + destdir=aseprite-release-$version # -------------------------- @@ -31,13 +34,24 @@ cd .. 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" \ - .. + if [ "$distribution" == "production" ]; then + echo 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 cd .. fi From 2df2f6d5407217677413aac545b3e4859206c946 Mon Sep 17 00:00:00 2001 From: David Capello Date: Wed, 4 Jun 2014 22:21:38 -0300 Subject: [PATCH 3/6] Change code-signing tool in create_release.sh --- scripts/create_release.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/create_release.sh b/scripts/create_release.sh index 3ac70bb2f..d5df3237a 100644 --- a/scripts/create_release.sh +++ b/scripts/create_release.sh @@ -63,7 +63,7 @@ if [ ! -f aseprite.exe ] ; then cd build ninja aseprite cd src - aseprite-sign aseprite.exe + signexe aseprite.exe cp aseprite.exe ../.. cd ../.. fi From f2d3bcac296e11f4c6651fe058e7e4bb613d7f90 Mon Sep 17 00:00:00 2001 From: David Capello Date: Thu, 5 Jun 2014 00:08:34 -0300 Subject: [PATCH 4/6] Update create_release.sh script --- scripts/create_release.sh | 30 ++++++++++++++---------------- 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/scripts/create_release.sh b/scripts/create_release.sh index d5df3237a..28511013b 100644 --- a/scripts/create_release.sh +++ b/scripts/create_release.sh @@ -9,33 +9,32 @@ read version echo -n "What kind of distribution (e.g. production, trial) ? " read distribution -destdir=aseprite-release-$version +destdir=$(pwd)/aseprite-release-$version # -------------------------- # 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 +cd "$destdir/scripts" sh update_version.sh $version -cd .. # ---------------------------------------------- # Make a build/ directory and compile with cmake # ---------------------------------------------- -if [ ! -d build ] ; then - mkdir build - cd build +if [ ! -d "$destdir/build" ] ; then + mkdir "$destdir/build" + cd "$destdir/build" if [ "$distribution" == "production" ]; then - echo cmake \ + 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" \ @@ -52,25 +51,24 @@ if [ ! -d build ] ; then -G "Ninja" \ .. fi - cd .. fi # ------- # Compile # ------- -if [ ! -f aseprite.exe ] ; then - cd build +if [ ! -f "$destdir/aseprite.exe" ] ; then + cd "$destdir/build" ninja aseprite - cd src + + cd "$destdir/build/src" signexe aseprite.exe - cp aseprite.exe ../.. - cd ../.. + cp aseprite.exe "$destdir" fi # --------------- # Create packages # --------------- -cd scripts +cd "$destdir/scripts" sh create_packages.sh From 1ffccada68eb1ab14f584665276897c950e940c4 Mon Sep 17 00:00:00 2001 From: David Capello Date: Fri, 6 Jun 2014 08:51:11 -0300 Subject: [PATCH 5/6] Update create_release.sh script to create Mac releases too --- scripts/create_release.sh | 77 +++++++++++++++++++++++++++------------ scripts/update_version.sh | 67 +++++++++++++++++----------------- 2 files changed, 88 insertions(+), 56 deletions(-) diff --git a/scripts/create_release.sh b/scripts/create_release.sh index 28511013b..68a39565c 100644 --- a/scripts/create_release.sh +++ b/scripts/create_release.sh @@ -9,8 +9,19 @@ read 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 # -------------------------- @@ -24,7 +35,7 @@ fi # -------------- cd "$destdir/scripts" -sh update_version.sh $version +sh $srcdir/scripts/update_version.sh $version # ---------------------------------------------- # Make a build/ directory and compile with cmake @@ -33,23 +44,39 @@ sh update_version.sh $version if [ ! -d "$destdir/build" ] ; then mkdir "$destdir/build" cd "$destdir/build" - 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" \ - .. + + 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 @@ -57,13 +84,13 @@ fi # Compile # ------- -if [ ! -f "$destdir/aseprite.exe" ] ; then +if [ ! -f "$destdir/$exefile" ] ; then cd "$destdir/build" - ninja aseprite + $generator aseprite cd "$destdir/build/src" - signexe aseprite.exe - cp aseprite.exe "$destdir" + signexe $exefile + cp $exefile "$destdir" fi # --------------- @@ -71,4 +98,8 @@ fi # --------------- cd "$destdir/scripts" -sh create_packages.sh +if [ "$platform" == "win" ]; then + sh create_packages.sh +elif [ "$platform" == "mac" ]; then + sh create_dmg.sh +fi diff --git a/scripts/update_version.sh b/scripts/update_version.sh index 26170e385..08b714a6d 100644 --- a/scripts/update_version.sh +++ b/scripts/update_version.sh @@ -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 From 33641b29975bb7d6e6a13a1c5353a19ccf6ee301 Mon Sep 17 00:00:00 2001 From: David Capello Date: Fri, 6 Jun 2014 08:51:27 -0300 Subject: [PATCH 6/6] Add one item to TODO --- TODO.md | 1 + 1 file changed, 1 insertion(+) diff --git a/TODO.md b/TODO.md index 147a1fa64..f7ce0571e 100644 --- a/TODO.md +++ b/TODO.md @@ -6,6 +6,7 @@ # 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