Skip to content

Commit

Permalink
Merge branch 'BobSynfig-648_render_done_sound'. Closes #648.
Browse files Browse the repository at this point in the history
  • Loading branch information
morevnaproject committed Dec 15, 2018
2 parents c20b21c + b7de1b3 commit df34426
Show file tree
Hide file tree
Showing 16 changed files with 450 additions and 71 deletions.
8 changes: 8 additions & 0 deletions .gitignore
Expand Up @@ -233,3 +233,11 @@ synfig-studio/doc
/.project
/.cproject
/.settings/

# ------------------------------------------------------------------------
# Netbeans projects
# ------------------------------------------------------------------------
/nbproject/
/ETL/nbproject/
/synfig-core/nbproject/
/synfig-studio/nbproject/
4 changes: 2 additions & 2 deletions autobuild/default-nixpkgs.nix
Expand Up @@ -52,7 +52,7 @@ let
ETL boost cairo fftw glibmm intltool libjpeg libsigcxx libxmlxx
mlt imagemagick pango which
];

preConfigure = "./bootstrap.sh";

};
Expand All @@ -68,7 +68,7 @@ stdenv.mkDerivation rec {
buildInputs = [
ETL boost cairo fftw glibmm gnome3.defaultIconTheme gtk3 gtkmm3
imagemagick intltool libjack2 libsigcxx libxmlxx makeWrapper mlt
synfig which
synfig which SDL2 SDL2_mixer
];

postInstall = ''
Expand Down
14 changes: 7 additions & 7 deletions autobuild/default.nix
Expand Up @@ -30,26 +30,26 @@ stdenv.mkDerivation rec {
buildInputs = [
boost cairo ffmpeg fftw intltool glibmm gnome3.defaultIconTheme gtk3 gtkmm3
imagemagick intltool libjpeg libjack2 libsigcxx libxmlxx mlt
pango which
pango which SDL2 SDL2_mixer
];

preConfigure = "";
configureScript = "";

BOOST_CONFIGURE_OPTIONS = " --with-boost=${boost.dev} --with-boost-libdir=${boost.out}/lib ";
ADWAITA_PATH = "${gnome3.adwaita-icon-theme.out}";
MAKE_WRAPPER_PATH = "${makeWrapper.out}";

sourceRoot = ".";

postUnpack = ''
touch configure.ac
'';

buildPhase = ''
PREFIX=$out ./autobuild/build.sh
'';

installPhase = ''
echo
'';
Expand Down
10 changes: 8 additions & 2 deletions autobuild/install-requirements-linux.sh
Expand Up @@ -24,6 +24,8 @@ DEB_LIST_MINIMAL="\
libatk1.0-dev \
libgl1-mesa-dev \
imagemagick \
libsdl2-dev \
libsdl2-mixer-dev \
bzip2"
if which dnf >/dev/null; then
#
Expand Down Expand Up @@ -64,7 +66,9 @@ if which dnf >/dev/null; then
ocl-icd-devel \
opencl-headers \
gtkmm30-devel \
glibmm24-devel"
glibmm24-devel \
SDL2-devel \
SDL2_mixer-devel"
fi
if ! ( rpm -qv $PKG_LIST ); then
echo "Running dnf (you need root privelegies to do that)..."
Expand Down Expand Up @@ -109,7 +113,9 @@ elif which yum >/dev/null; then
ocl-icd-devel \
opencl-headers \
gtkmm30-devel \
glibmm24-devel"
glibmm24-devel \
SDL2-devel \
SDL2_mixer-devel"
fi
if ! ( rpm -qv $PKG_LIST ); then
echo "Running yum (you need root privelegies to do that)..."
Expand Down
2 changes: 1 addition & 1 deletion autobuild/osx/brew/install-requirements-osx.sh
Expand Up @@ -13,7 +13,7 @@

set -e

PACKAGES="autoconf automake ccache libtool intltool gettext pkg-config glibmm libxml++ cairo fftw pango mlt boost gtkmm3"
PACKAGES="autoconf automake ccache libtool intltool gettext pkg-config glibmm libxml++ cairo fftw pango mlt boost gtkmm3 ывд2 sdl2_mixer"

export HOMEBREW_NO_AUTO_UPDATE=1
export HOMEBREW_NO_ANALYTICS=1
Expand Down
80 changes: 41 additions & 39 deletions autobuild/synfigstudio-osx-build.sh
Expand Up @@ -16,14 +16,14 @@
#
#
# = Usage notes =
#
#
# * You need to have XCode and git installed
# * Builds from current repository, current revision. So you should manually checkout the desired revision to build
# * If no repository found - then sources fetched into ~/src/synfig and the latest master branch is built
# * Executing script without arguments makes a full clean build and produces dmg package
# * You can pass arguments to the script to invoke particular stage.
# * You can pass arguments to the script to invoke particular stage.
# Available stages: mkmacports, mkdeps, mketl, mksynfig, mksynfigstudio, mkapp, mkdmg
# Example:
# Example:
# synfigstudio-osx-build.sh mkdeps
# * You can pass a custom command to be invoked in the build environment.
# Example (uninstalls glibmm package from the buildroot):
Expand Down Expand Up @@ -105,19 +105,19 @@ fi
prepare()
{
# == workarounds ==

#We should do that, otherwise python won't build:
if [ -e $MACPORTS/tmp/app ]; then
[ ! -e $MACPORTS/tmp/app.bak ] || rm -rf $MACPORTS/tmp/app.bak
echo "Backing up custom /Applications/MacPorts dir..."
mv $MACPORTS/tmp/app $MACPORTS/tmp/app.bak || true
fi

# Cleanup some stuff, remaining from older installations
rm /Library/LaunchDaemons/org.macports.rsyncd.plist || true

# == symlinks ==

if [ ! -e "$BUILDDIR" ]; then
mkdir -p "$BUILDDIR"
fi
Expand Down Expand Up @@ -206,11 +206,11 @@ mkdeps()
rm -rf "$MACPORTS"
mkmacports
fi

# Don't write into /Applications/MacPorts
[ -d $MACPORTS/tmp/app ] || mkdir -p $MACPORTS/tmp/app
sed -i "" -e "s|/Applications/MacPorts|$MACPORTS/tmp/app|g" "$MACPORTS/etc/macports/macports.conf" || true

if [[ ! $UNIVERSAL == 0 ]]; then
if [[ $X11 == 1 ]]; then
echo "+universal +x11 +nonfree" > $MACPORTS/etc/macports/variants.conf
Expand All @@ -224,23 +224,23 @@ mkdeps()
echo "+no_x11 +quartz -x11 +nonfree" > $MACPORTS/etc/macports/variants.conf
fi
fi

pushd ${SCRIPTPATH}/macports
portindex
popd
echo "file://${SCRIPTPATH}/macports [nosync]" > $MACPORTS/etc/macports/sources.conf
echo "rsync://rsync.macports.org/release/tarballs/ports.tar [default]" >> $MACPORTS/etc/macports/sources.conf

# workaround the bug introduced in MacPorts 2.2.0 - https://trac.macports.org/ticket/39850
cp -rf $MACPORTS/etc/macports/macports.conf $MACPORTS/etc/macports/macports.conf.bak
sed '/sandbox_enable/d' $MACPORTS/etc/macports/macports.conf.bak > $MACPORTS/etc/macports/macports.conf
echo "sandbox_enable no" >> $MACPORTS/etc/macports/macports.conf

port selfupdate

# We have to make sure python 2 is default, because some packages won't build with python 3
port select --set python python27 || true

port upgrade outdated || true

CORE_DEPS=" \
Expand All @@ -259,22 +259,24 @@ mkdeps()
ffmpeg \
boost \
cairo \
libtool"
libtool \
libsdl2 \
libsdl2_mixer"
STUDIO_DEPS=" \
gtkmm3 \
python33 \
gnome-themes-standard \
intltool"
port install -f $CORE_DEPS $STUDIO_DEPS

# We have to make sure python 2 is default, because some packages won't build with python 3
port select --set python python27

# ...but we still need python3 binary available
pushd $MACPORTS/bin/ > /dev/null
ln -sf python3.3 python3
popd > /dev/null

cp ${SCRIPTPATH}/gtk-3.0/settings.ini ${MACPORTS}/etc/gtk-3.0/

}
Expand Down Expand Up @@ -311,7 +313,7 @@ mksynfigstudio()
# Copy launch script, so we can test synfigstudio without building an app package
[ ! -e "${MACPORTS}/../MacOS" ] || rm -rf "${MACPORTS}/../MacOS"
cp -rf $SCRIPTPATH/app-template/Contents/MacOS ${MACPORTS}/../MacOS

# building synfig-studio
pushd ${SYNFIG_REPO_DIR}/synfig-studio

Expand All @@ -328,19 +330,19 @@ mksynfigstudio()
do
cp -f $n ${MACPORTS}
done

popd
}

mkapp()
{
VERSION=`get_version_release_string`
echo Now trying to build your new SynfigStudio app ...

DIR=`dirname "$BUILDDIR"`
APPDIR="$DIR/SynfigStudio-new-app"
APPCONTENTS="$APPDIR/Contents/Resources"

# initial cleanup
[ ! -e $DIR/SynfigStudio-new-app ] || rm -rf $DIR/SynfigStudio-new-app
[ ! -e $DIR/SynfigStudio.app ] || rm -rf $DIR/SynfigStudio.app
Expand All @@ -352,14 +354,14 @@ mkapp()
#cp -R "$MACPORTS/bin/ffmpeg" "$APPCONTENTS/bin"
#"$SCRIPTPATH/macos-gather-deps.sh" "$APPCONTENTS/bin/ffmpeg"
#exit 0

#cp -R "$MACPORTS/synfig/bin/synfig" "$APPCONTENTS/bin"
mkdir -p "$APPCONTENTS/etc"
mkdir -p "$APPCONTENTS/share"

# Synfig
"$SCRIPTPATH/osx-relocate-binary.sh" "$MACPORTS/synfig/bin/synfig" "$MACPORTS" "$APPCONTENTS"
"$SCRIPTPATH/osx-relocate-binary.sh" "$MACPORTS/synfig/bin/synfigstudio" "$MACPORTS" "$APPCONTENTS"
"$SCRIPTPATH/osx-relocate-binary.sh" "$MACPORTS/synfig/bin/synfigstudio" "$MACPORTS" "$APPCONTENTS"
pushd "$MACPORTS/synfig/lib/synfig/modules/"
for FILE in `ls -1 *.so`; do
"$SCRIPTPATH/osx-relocate-binary.sh" "$MACPORTS/synfig/lib/synfig/modules/$FILE" "$MACPORTS" "$APPCONTENTS"
Expand All @@ -368,13 +370,13 @@ mkapp()
popd
cp -R "$MACPORTS/synfig/etc" "$APPCONTENTS/synfig/"
cp -R "$MACPORTS/synfig/share" "$APPCONTENTS/synfig/"

"$SCRIPTPATH/osx-relocate-binary.sh" "$MACPORTS/bin/ffmpeg" "$MACPORTS" "$APPCONTENTS"
"$SCRIPTPATH/osx-relocate-binary.sh" "$MACPORTS/bin/ffprobe" "$MACPORTS" "$APPCONTENTS"

"$SCRIPTPATH/osx-relocate-binary.sh" "$MACPORTS/bin/encodedv" "$MACPORTS" "$APPCONTENTS"
"$SCRIPTPATH/osx-relocate-binary.sh" "$MACPORTS/bin/sox" "$MACPORTS" "$APPCONTENTS"

# Gtk3
"$SCRIPTPATH/osx-relocate-binary.sh" "$MACPORTS/bin/gdk-pixbuf-query-loaders" "$MACPORTS" "$APPCONTENTS"
"$SCRIPTPATH/osx-relocate-binary.sh" "$MACPORTS/bin/gdk-pixbuf-pixdata" "$MACPORTS" "$APPCONTENTS"
Expand Down Expand Up @@ -409,15 +411,15 @@ mkapp()
cp -R "$MACPORTS/lib/girepository-1.0" "$APPCONTENTS/lib/"
mkdir -p "$APPCONTENTS/share/glib-2.0/"
cp -R "$MACPORTS/share/glib-2.0/schemas" "$APPCONTENTS/share/glib-2.0"

# Python 3
"$SCRIPTPATH/osx-relocate-binary.sh" "$MACPORTS/bin/python3" "$MACPORTS" "$APPCONTENTS"
"$SCRIPTPATH/osx-relocate-binary.sh" "$MACPORTS/Library/Frameworks/Python.framework/Versions/3.3/Resources/Python.app/Contents/MacOS/Python" "$MACPORTS" "$APPCONTENTS"
mkdir -p "$APPCONTENTS/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/"
rsync -av --exclude "__pycache__" "$MACPORTS/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/" "$APPCONTENTS/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/"
#cp -R "$MACPORTS/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3" "$APPCONTENTS/Library/Frameworks/Python.framework/Versions/3.3/lib/"
#find $APPCONTENTS/Library/Frameworks/Python.framework/Versions/3.3/lib -name "__pycache__" -exec rm -rf {} \;

# MLT
"$SCRIPTPATH/osx-relocate-binary.sh" "$MACPORTS/bin/melt" "$MACPORTS" "$APPCONTENTS"
pushd "$MACPORTS/lib/mlt/"
Expand All @@ -426,7 +428,7 @@ mkapp()
done
popd
cp -R "$MACPORTS/share/mlt" "$APPCONTENTS/share/"

# ImageMagick
"$SCRIPTPATH/osx-relocate-binary.sh" "$MACPORTS/bin/animate" "$MACPORTS" "$APPCONTENTS"
"$SCRIPTPATH/osx-relocate-binary.sh" "$MACPORTS/bin/composite" "$MACPORTS" "$APPCONTENTS"
Expand All @@ -445,15 +447,15 @@ mkapp()
popd
cp -R "$MACPORTS/lib/ImageMagick-6.9.2/config-Q16" "$APPCONTENTS/lib/ImageMagick-6.9.2/"
cp -R "$MACPORTS/etc/ImageMagick-6" "$APPCONTENTS/etc/"

cp -R "$MACPORTS/share/icons" "$APPCONTENTS/share/"
cp -R "$MACPORTS/share/themes" "$APPCONTENTS/share/"
cp -R "$MACPORTS/share/mime" "$APPCONTENTS/share/"

# app bundle files
echo "*** Please do _NOT_ delete this file. The file script depends on it. ***" > "$APPCONTENTS/v$VERSION"
sed -i "" -e "s/_VERSION_/$VERSION/g" "$APPDIR/Contents/MacOS/SynfigStudio"
sed -i "" -e "s/_VERSION_/$VERSION/g" "$APPDIR/Contents/Info.plist"
sed -i "" -e "s/_VERSION_/$VERSION/g" "$APPDIR/Contents/MacOS/SynfigStudio"
sed -i "" -e "s/_VERSION_/$VERSION/g" "$APPDIR/Contents/Info.plist"

# save information about the ports which make up this build
echo "Synfig Studio $VERSION for Mac OS X $OSNAME" > "$APPCONTENTS/build-info.txt"
Expand All @@ -471,7 +473,7 @@ mkapp()
mkdmg()
{
cd ~

# get OS major version
OSXVER=`uname -r | cut -f 1 -d '.'`

Expand All @@ -485,13 +487,13 @@ mkdmg()
else
export FINAL_FILENAME=SynfigStudio-"$VERSION"."$ARCH"
fi


VOLNAME="SynfigStudio"
TRANSITORY_FILENAME="synfig-wla.sparseimage"

APPDIR=`dirname "$BUILDDIR"`/SynfigStudio.app

/usr/bin/hdiutil detach /Volumes/"$VOLNAME" || true

echo "Creating and attaching disk image..."
Expand Down Expand Up @@ -543,7 +545,7 @@ get_version_release_string()
#fi
VERSION=${VERSION%%-*}
fi
if [ ! -z $BREED ]; then
if [ ! -z $BREED ]; then
BREED=`echo $BREED | tr _ . | tr - .` # No "-" or "_" characters, becuse RPM and DEB complain
BREED=.$BREED
fi
Expand Down Expand Up @@ -609,7 +611,7 @@ do_cleanup()
###=================================== MAIN ======================================

main() # dummy for navigation
{
{
true
}

Expand Down

0 comments on commit df34426

Please sign in to comment.