Difference between revisions of "Dev:Building on Windows"

From Synfig Studio :: Documentation
Jump to: navigation, search
m (a bunch of minor grammar corrections - more to come)
m (put all the scripts inside boxes to make them a little easier to see)
Line 14: Line 14:
 
==Files==
 
==Files==
 
Save this configuration file as <code>C:\msys\1.0\home\<windows login>\synfig\synbuild.conf</code>:
 
Save this configuration file as <code>C:\msys\1.0\home\<windows login>\synfig\synbuild.conf</code>:
 +
 +
<table style="padding: 1em; border: 1px dashed #2f6fab; color: Black; background-color: #f9f9f9; line-height: 1.1em;"><tr><td>
 
<pre># Synfig for Win32 build configuration script.
 
<pre># Synfig for Win32 build configuration script.
 
#############################################################################
 
#############################################################################
Line 116: Line 118:
 
export PKG_CONFIG_PATH
 
export PKG_CONFIG_PATH
 
export CPPFLAGS
 
export CPPFLAGS
</pre>
+
</pre></td></tr></table>
  
 
Save OpenEXR build script as <code>C:\msys\1.0\home\<windows login>\synfig\make_openexr.sh</code>:
 
Save OpenEXR build script as <code>C:\msys\1.0\home\<windows login>\synfig\make_openexr.sh</code>:
 +
<table style="padding: 1em; border: 1px dashed #2f6fab; color: Black; background-color: #f9f9f9; line-height: 1.1em;"><tr><td>
 
<pre>#!/bin/sh
 
<pre>#!/bin/sh
  
Line 168: Line 171:
  
 
echo "Done: OpenEXR"
 
echo "Done: OpenEXR"
</pre>
+
</pre></td></tr></table>
  
 
Save ETL build script as <code>C:\msys\1.0\home\<windows login>\synfig\make_etl.sh</code>:
 
Save ETL build script as <code>C:\msys\1.0\home\<windows login>\synfig\make_etl.sh</code>:
 +
<table style="padding: 1em; border: 1px dashed #2f6fab; color: Black; background-color: #f9f9f9; line-height: 1.1em;"><tr><td>
 
<pre>#!/bin/sh
 
<pre>#!/bin/sh
  
Line 222: Line 226:
  
 
echo "Done: ETL"
 
echo "Done: ETL"
</pre>
+
</pre></td></tr></table>
  
 
Save Synfig Core build script as <code>C:\msys\1.0\home\<windows login>\synfig\make_core.sh</code>:
 
Save Synfig Core build script as <code>C:\msys\1.0\home\<windows login>\synfig\make_core.sh</code>:
 +
<table style="padding: 1em; border: 1px dashed #2f6fab; color: Black; background-color: #f9f9f9; line-height: 1.1em;"><tr><td>
 
<pre>#!/bin/sh
 
<pre>#!/bin/sh
  
Line 317: Line 322:
  
 
echo "Done: synfig-core"
 
echo "Done: synfig-core"
</pre>
+
</pre></td></tr></table>
  
 
Save Synfig Studio build script as <code>C:\msys\1.0\home\<windows login>\synfig\make_studio.sh</code>:
 
Save Synfig Studio build script as <code>C:\msys\1.0\home\<windows login>\synfig\make_studio.sh</code>:
 +
<table style="padding: 1em; border: 1px dashed #2f6fab; color: Black; background-color: #f9f9f9; line-height: 1.1em;"><tr><td>
 
<pre>#!/bin/sh
 
<pre>#!/bin/sh
  
Line 381: Line 387:
  
 
echo "Done: synfig-studio"
 
echo "Done: synfig-studio"
</pre>
+
</pre></td></tr></table>
  
 
===_src directory===
 
===_src directory===
Line 398: Line 404:
 
===_filez directory===
 
===_filez directory===
 
Save the following text as <code>C:\msys\1.0\home\<windows login>\synfig\_filez\synfig-core-hack-libtool.patch</code>:
 
Save the following text as <code>C:\msys\1.0\home\<windows login>\synfig\_filez\synfig-core-hack-libtool.patch</code>:
 +
<table style="padding: 1em; border: 1px dashed #2f6fab; color: Black; background-color: #f9f9f9; line-height: 1.1em;"><tr><td>
 
<pre>diff -Nuar synfig-core.orig/win32build/libtool synfig-core/win32build/libtool
 
<pre>diff -Nuar synfig-core.orig/win32build/libtool synfig-core/win32build/libtool
 
--- synfig-core.orig/win32build/libtool Wed Feb  7 21:52:34 2007
 
--- synfig-core.orig/win32build/libtool Wed Feb  7 21:52:34 2007
Line 410: Line 417:
 
      # but the system doesn't support it.
 
      # but the system doesn't support it.
 
   
 
   
</pre>
+
</pre></td></tr></table>
  
 
Then save the following as <code>C:\msys\1.0\home\<windows login>\synfig\_filez\openexr-1.4.0-mingw32.patch</code>:
 
Then save the following as <code>C:\msys\1.0\home\<windows login>\synfig\_filez\openexr-1.4.0-mingw32.patch</code>:
 +
<table style="padding: 1em; border: 1px dashed #2f6fab; color: Black; background-color: #f9f9f9; line-height: 1.1em;"><tr><td>
 
<pre>diff -Nuar openexr-1.4.0.orig/IlmThread/Makefile.in openexr-1.4.0/IlmThread/Makefile.in
 
<pre>diff -Nuar openexr-1.4.0.orig/IlmThread/Makefile.in openexr-1.4.0/IlmThread/Makefile.in
 
--- openexr-1.4.0.orig/IlmThread/Makefile.in Wed Aug  9 05:45:52 2006
 
--- openexr-1.4.0.orig/IlmThread/Makefile.in Wed Aug  9 05:45:52 2006
Line 426: Line 434:
 
  DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/config
 
  DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/config
 
  depcomp = $(SHELL) $(top_srcdir)/depcomp
 
  depcomp = $(SHELL) $(top_srcdir)/depcomp
</pre>
+
</pre></td></tr></table>
  
 
Finally save the following as <code>C:\msys\1.0\home\<windows login>\synfig\_filez\openexr-1.4.0-pkgconfig.patch</code>:
 
Finally save the following as <code>C:\msys\1.0\home\<windows login>\synfig\_filez\openexr-1.4.0-pkgconfig.patch</code>:
 +
<table style="padding: 1em; border: 1px dashed #2f6fab; color: Black; background-color: #f9f9f9; line-height: 1.1em;"><tr><td>
 
<pre>diff -Nuar openexr-1.4.0.orig/OpenEXR.pc.in openexr-1.4.0/OpenEXR.pc.in
 
<pre>diff -Nuar openexr-1.4.0.orig/OpenEXR.pc.in openexr-1.4.0/OpenEXR.pc.in
 
--- openexr-1.4.0.orig/OpenEXR.pc.in Wed Aug  9 05:37:50 2006
 
--- openexr-1.4.0.orig/OpenEXR.pc.in Wed Aug  9 05:37:50 2006
Line 440: Line 449:
 
+Libs: -L${libdir} -lIlmImf -lImath -lHalf -lIex -lz
 
+Libs: -L${libdir} -lIlmImf -lImath -lHalf -lIex -lz
 
+Cflags: -I@includedir@ -I${OpenEXR_includedir}
 
+Cflags: -I@includedir@ -I${OpenEXR_includedir}
</pre>
+
</pre></td></tr></table>
  
 
==Configuration==
 
==Configuration==
Line 463: Line 472:
 
In this section you can find a number of patches definition blocks, looking like this:
 
In this section you can find a number of patches definition blocks, looking like this:
  
 +
<table style="padding: 1em; border: 1px dashed #2f6fab; color: Black; background-color: #f9f9f9; line-height: 1.1em;"><tr><td>
 
<pre># ETL patches
 
<pre># ETL patches
 
ETL_PATCHES=$(cat <<:END_ETL:
 
ETL_PATCHES=$(cat <<:END_ETL:
:END_ETL:)</pre>
+
:END_ETL:)</pre></td></tr></table>
  
 
For example, if you place any filenames of patches between '':END_ETL:'' blocks, it will be applied before configuration of ETL. Patch files need to be stored into <code>_filez</code> directory.
 
For example, if you place any filenames of patches between '':END_ETL:'' blocks, it will be applied before configuration of ETL. Patch files need to be stored into <code>_filez</code> directory.

Revision as of 19:38, 13 May 2007

Directories

First, if you didn't already start an msys session, do so now. Just double click the MSYS shortcut or run C:\msys\1.0\msys.bat. An msys session will be opened, creating your profile directory at C:\msys\1.0\home\<windows login>. As you can see, MinGW uses your windows login as the user name in its fake UNIX environment. Be careful, I've not checked whether it works with non latin-character account names.

Now, use explorer or your favorite file manager and go to C:\msys\1.0\home\<windows login>. Create a directory there for all Synfig operations. For example, let it be synfig. Go into this directory.

Ok, now you are at C:\msys\1.0\home\<windows login>\synfig. Create four directories here:

  • _filez, for patches (and maybe later, additional files).
  • _src, for program sources.
  • build, for building programs.
  • temp, for local installation programs and libraries, which are required for building synfig. (For example: ETL, synfig (core for studio), OpenEXR, etc...)

Of course, you can choose your own name for all the directories and choose their locations. All you need then is to set a new path in the configuration file. But for now we choose the easy way.

Files

Save this configuration file as C:\msys\1.0\home\<windows login>\synfig\synbuild.conf:

# Synfig for Win32 build configuration script.
#############################################################################
# 1. Files and Directories

# Uncompressed Synfig svn snapshots and another package sources
SYN_SOURCE_DIR=`dirname ~/.`"/synfig/_src"

# Directory additional files (patches f.e.)
SYN_FILEZ_DIR=`dirname ~/.`"/synfig/_filez"

# Temporary installations (ETL headers, synfig binaries for icon and image making)
SYN_TEMP_INSTALL=`dirname ~/.`"/synfig/temp"

# Build directory
SYN_BUILD_DIR=`dirname ~/.`"/synfig/build"

# OpenEXR source package
SYN_OPENEXR_VERSION="1.4.0"
SYN_OPENEXR_SRC="${SYN_SOURCE_DIR}/openexr-${SYN_OPENEXR_VERSION}a.tar.gz"

#############################################################################
# 2. External tools

# Path to ImageMagick directory.
SYN_IMAGEMAGICK_PATH="C:\Program Files\ImageMagick"

# Path to Subversion bin directory.
SYN_SUBVERSION_PATH="C:\Program Files\Subversion\bin"

# Path to NSIS directory with makensis.exe file.
SYN_NSIS_PATH="C:\Program Files\NSIS"

#############################################################################
# 3. Build setup

# Build host
MINGW_HOST="mingw32"

# Make debug build of Synfig Core
SYN_CORE_DEBUG_BUILD="no"

# Make debug build of Synfig Studio
SYN_STUDIO_DEBUG_BUILD="yes"

#############################################################################
# 4. Patches (you can place here any additional patches)

# ETL patches
ETL_PATCHES=$(cat <<:END_ETL:
:END_ETL:)

# Synfig Core patches
SYNCORE_PATCHES=$(cat <<:END_SYNCORE:
:END_SYNCORE:)

# Sunfig Studio patches
SYNSTUDIO_PATCHES=$(cat <<:END_SYNSTUDIO:
:END_SYNSTUDIO:)

# OpenEXR patches
OPENEXR_PATCHES=$(cat <<:END_OPENEXR:
openexr-1.4.0-pkgconfig.patch
openexr-1.4.0-mingw32.patch
:END_OPENEXR:)

#############################################################################
# 5. Autoconfiguration

if [ "$GTK_BASEPATH" ]; then
  CPPFLAGS="-I${GTK_BASEPATH}/include $CPPFLAGS"
fi

if [ "$SYN_IMAGEMAGICK_PATH" ]; then
  PATH="${SYN_IMAGEMAGICK_PATH}:${PATH}"
fi

if [ "$SYN_SUBVERSION_PATH" ]; then
  PATH="${SYN_SUBVERSION_PATH}:${PATH}"
fi

if [ "$SYN_NSIS_PATH" ]; then
  PATH="${SYN_NSIS_PATH}:${PATH}"
fi

if [ -d "${SYN_TEMP_INSTALL}/ETL" ]; then
  PATH="${SYN_TEMP_INSTALL}/ETL/bin:${PATH}"
  PKG_CONFIG_PATH="${SYN_TEMP_INSTALL}/ETL/lib/pkgconfig:${PKG_CONFIG_PATH}"
fi

if [ -d "${SYN_TEMP_INSTALL}/synfig-devel" ]; then
  PATH="${SYN_TEMP_INSTALL}/synfig-devel/bin:${PATH}"
  PKG_CONFIG_PATH="${SYN_TEMP_INSTALL}/synfig-devel/lib/pkgconfig:${PKG_CONFIG_PATH}"
fi

if [ -d "${SYN_TEMP_INSTALL}/openexr" ]; then
  PATH="${SYN_TEMP_INSTALL}/openexr/bin:${PATH}"
  PKG_CONFIG_PATH="${SYN_TEMP_INSTALL}/openexr/lib/pkgconfig:${PKG_CONFIG_PATH}"
fi

export PATH
export PKG_CONFIG_PATH
export CPPFLAGS

Save OpenEXR build script as C:\msys\1.0\home\<windows login>\synfig\make_openexr.sh:

#!/bin/sh

echo "Making OpenEXR..."
# Including configuration
if [ -r "./synbuild.conf" ]; then
  . ./synbuild.conf
else
  echo "No config file for synfig build (./synbuild.conf) found."
  exit 1
fi

CURRENT_DIR=`pwd`

echo "Cleanup directories"
rm -rf ${SYN_BUILD_DIR}/openexr
[ $? -eq 0 ] || exit 1
rm -rf ${SYN_TEMP_INSTALL}/openexr
[ $? -eq 0 ] || exit 1

echo "Preparing sources"
tar -xzf ${SYN_OPENEXR_SRC} -C ${SYN_BUILD_DIR}
[ $? -eq 0 ] || exit 1

echo "Applying patches..."
cd  ${SYN_BUILD_DIR}/openexr-${SYN_OPENEXR_VERSION}
[ $? -eq 0 ] || exit 1
for SFILE in ${OPENEXR_PATCHES[@]}
do
  patch -p1 <${SYN_FILEZ_DIR}/${SFILE}
  [ $? -eq 0 ] || exit 1
done

echo "Configuring"
[ $? -eq 0 ] || exit 1
./configure --host=${MINGW_HOST} --prefix=${SYN_TEMP_INSTALL}/openexr \
  --disable-static --disable-threading --disable-posix-sem
[ $? -eq 0 ] || exit 1

echo "Making"
make
[ $? -eq 0 ] || exit 1
make install
[ $? -eq 0 ] || exit 1
cd ${CURRENT_DIR}
[ $? -eq 0 ] || exit 1
rm -rf ${SYN_BUILD_DIR}/openexr-${SYN_OPENEXR_VERSION}
[ $? -eq 0 ] || exit 1

echo "Done: OpenEXR"

Save ETL build script as C:\msys\1.0\home\<windows login>\synfig\make_etl.sh:

#!/bin/sh

echo "Making ETL..."
# Including configuration
if [ -r "./synbuild.conf" ]; then
  . ./synbuild.conf
else
  echo "No config file for synfig build (./synbuild.conf) found."
  exit 1
fi

CURRENT_DIR=`pwd`

echo "Cleanup directories"
rm -rf ${SYN_BUILD_DIR}/ETL
[ $? -eq 0 ] || exit 1
rm -rf ${SYN_TEMP_INSTALL}/ETL
[ $? -eq 0 ] || exit 1

echo "Preparing sources"
mkdir  ${SYN_BUILD_DIR}/ETL
[ $? -eq 0 ] || exit 1
cp -R ${SYN_SOURCE_DIR}/ETL/*  ${SYN_BUILD_DIR}/ETL/
[ $? -eq 0 ] || exit 1
cp -R ${SYN_SOURCE_DIR}/ETL/.svn  ${SYN_BUILD_DIR}/ETL/
[ $? -eq 0 ] || exit 1

echo "Applying patches..."
cd  ${SYN_BUILD_DIR}/ETL
[ $? -eq 0 ] || exit 1
for SFILE in ${ETL_PATCHES[@]}
do
  patch -p1 <${SYN_FILEZ_DIR}/${SFILE}
  [ $? -eq 0 ] || exit 1
done

echo "Configuring"
./bootstrap
[ $? -eq 0 ] || exit 1
./configure --host=${MINGW_HOST} --prefix=${SYN_TEMP_INSTALL}/ETL
[ $? -eq 0 ] || exit 1

echo "Making"
make install
[ $? -eq 0 ] || exit 1
cd ${CURRENT_DIR}
[ $? -eq 0 ] || exit 1
rm -rf ${SYN_BUILD_DIR}/ETL
[ $? -eq 0 ] || exit 1

echo "Done: ETL"

Save Synfig Core build script as C:\msys\1.0\home\<windows login>\synfig\make_core.sh:

#!/bin/sh

echo "Making Synfig-Core..."
# Including configuration
if [ -r "./synbuild.conf" ]; then
  . ./synbuild.conf
else
  echo "No config file for synfig build (./synbuild.conf) found."
  exit 1
fi

CURRENT_DIR=`pwd`

echo "Cleanup directories"
rm -rf ${SYN_BUILD_DIR}/synfig-core
[ $? -eq 0 ] || exit 1
rm -rf ${SYN_TEMP_INSTALL}/synfig-devel
[ $? -eq 0 ] || exit 1

echo "Preparing sources"
mkdir ${SYN_BUILD_DIR}/synfig-core
[ $? -eq 0 ] || exit 1
cp -R ${SYN_SOURCE_DIR}/synfig-core/* ${SYN_BUILD_DIR}/synfig-core/
[ $? -eq 0 ] || exit 1
cp -R ${SYN_SOURCE_DIR}/synfig-core/.svn ${SYN_BUILD_DIR}/synfig-core/
[ $? -eq 0 ] || exit 1

echo "Applying patches..."
cd  ${SYN_BUILD_DIR}/synfig-core
[ $? -eq 0 ] || exit 1
for SFILE in ${SYNCORE_PATCHES[@]}
do
  patch -p1 <${SYN_FILEZ_DIR}/${SFILE}
  [ $? -eq 0 ] || exit 1
done

echo "Configuring"
./bootstrap
[ $? -eq 0 ] || exit 1
mkdir win32build
[ $? -eq 0 ] || exit 1
cd win32build
[ $? -eq 0 ] || exit 1
if [ "$SYN_CORE_DEBUG_BUILD" == "yes" ]; then
  ../configure --host=${MINGW_HOST} --prefix=C:/PROGRA~1/Synfig --disable-optimization --enable-debug
  [ $? -eq 0 ] || exit 1
else
  ../configure --host=${MINGW_HOST} --prefix=C:/PROGRA~1/Synfig --enable-optimization=1 --disable-debug
  [ $? -eq 0 ] || exit 1
fi

echo "Making"
# libtool hack patch [begin]
patch -p2 <${SYN_FILEZ_DIR}/synfig-core-hack-libtool.patch
[ $? -eq 0 ] || exit 1
# libtool hack patch [end]
make package
[ $? -eq 0 ] || exit 1
mv ./synfig-*.exe ${CURRENT_DIR}/
[ $? -eq 0 ] || exit 1

make clean
[ $? -eq 0 ] || exit 1
# auto build hack installation [begin]
make install prefix=${SYN_TEMP_INSTALL}/synfig-devel
[ $? -eq 0 ] || exit 1
# auto build hack installation [end]
cd ${CURRENT_DIR}

# auto build hack patch [begin]
echo "Postprocessing"
SYN_SED_PATH=`echo ${SYN_TEMP_INSTALL}/synfig-devel | sed -e 's/\//\\\\\//g'`
[ $? -eq 0 ] || exit 1
mv ${SYN_TEMP_INSTALL}/synfig-devel/bin/synfig-config ${SYN_TEMP_INSTALL}/synfig-devel/bin/synfig-config.tmp
[ $? -eq 0 ] || exit 1
sed -e "s/C:\/PROGRA~1\\/Synfig/${SYN_SED_PATH}/g" \
  ${SYN_TEMP_INSTALL}/synfig-devel/bin/synfig-config.tmp >${SYN_TEMP_INSTALL}/synfig-devel/bin/synfig-config
[ $? -eq 0 ] || exit 1
rm -f ${SYN_TEMP_INSTALL}/synfig-devel/bin/synfig-config.tmp
[ $? -eq 0 ] || exit 1
mv ${SYN_TEMP_INSTALL}/synfig-devel/lib/pkgconfig/synfig.pc ${SYN_TEMP_INSTALL}/synfig-devel/lib/pkgconfig/synfig.pc.tmp
[ $? -eq 0 ] || exit 1
sed -e "s/C:\/PROGRA~1\\/Synfig/${SYN_SED_PATH}/g" \
  ${SYN_TEMP_INSTALL}/synfig-devel/lib/pkgconfig/synfig.pc.tmp >${SYN_TEMP_INSTALL}/synfig-devel/lib/pkgconfig/synfig.pc
[ $? -eq 0 ] || exit 1
rm -f ${SYN_TEMP_INSTALL}/synfig-devel/lib/pkgconfig/synfig.pc.tmp
[ $? -eq 0 ] || exit 1
# auto build hack patch [end]

rm -rf ${SYN_BUILD_DIR}/synfig-core

echo "Done: synfig-core"

Save Synfig Studio build script as C:\msys\1.0\home\<windows login>\synfig\make_studio.sh:

#!/bin/sh

echo "Making Synfig-Studio..."
# Including configuration
if [ -r "./synbuild.conf" ]; then
  . ./synbuild.conf
else
  echo "No config file for synfig build (./synbuild.conf) found."
  exit 1
fi

CURRENT_DIR=`pwd`

echo "Cleanup directories"
rm -rf ${SYN_BUILD_DIR}/synfig-studio
[ $? -eq 0 ] || exit 1

echo "Preparing sources"
mkdir ${SYN_BUILD_DIR}/synfig-studio
[ $? -eq 0 ] || exit 1
cp -R ${SYN_SOURCE_DIR}/synfig-studio/* ${SYN_BUILD_DIR}/synfig-studio/
[ $? -eq 0 ] || exit 1
cp -R ${SYN_SOURCE_DIR}/synfig-studio/.svn ${SYN_BUILD_DIR}/synfig-studio/
[ $? -eq 0 ] || exit 1

echo "Applying patches..."
cd  ${SYN_BUILD_DIR}/synfig-studio
[ $? -eq 0 ] || exit 1
for SFILE in ${SYNSTUDIO_PATCHES[@]}
do
  patch -p1 <${SYN_FILEZ_DIR}/${SFILE}
  [ $? -eq 0 ] || exit 1
done

echo "Configuring"
./bootstrap
[ $? -eq 0 ] || exit 1
mkdir win32build
[ $? -eq 0 ] || exit 1
cd win32build
[ $? -eq 0 ] || exit 1
if [ "$SYN_STUDIO_DEBUG_BUILD" == "yes" ]; then
  ../configure --host=${MINGW_HOST} --prefix=C:/PROGRA~1/Synfig --disable-optimization --enable-debug
  [ $? -eq 0 ] || exit 1
else
  ../configure --host=${MINGW_HOST} --prefix=C:/PROGRA~1/Synfig --enable-optimization=1 --disable-debug
  [ $? -eq 0 ] || exit 1
fi

echo "Making"
make package
[ $? -eq 0 ] || exit 1

mv ./synfigstudio-*.exe ${CURRENT_DIR}/
[ $? -eq 0 ] || exit 1
cd ${CURRENT_DIR}
[ $? -eq 0 ] || exit 1
rm -rf ${SYN_BUILD_DIR}/synfig-studio
[ $? -eq 0 ] || exit 1

echo "Done: synfig-studio"

_src directory

Go to the C:\msys\1.0\home\<windows login>\synfig\_src directory. Get the latest sources of Synfig from its repository.

$ svn co http://svn.voria.com/code/ETL/trunk/ ETL

$ svn co http://svn.voria.com/code/synfig-core/trunk/ synfig-core

$ svn co http://svn.voria.com/code/synfig-studio/trunk/ synfig-studio

Download the current stable OpenEXR version from:

Finally you must have three directories (ETL, synfig-core and synfig-studio) and the openexr-1.4.0a.tar.gz file in your _src directory.

_filez directory

Save the following text as C:\msys\1.0\home\<windows login>\synfig\_filez\synfig-core-hack-libtool.patch:

diff -Nuar synfig-core.orig/win32build/libtool synfig-core/win32build/libtool
--- synfig-core.orig/win32build/libtool	Wed Feb  7 21:52:34 2007
+++ synfig-core/win32build/libtool	Wed Feb  7 21:57:12 2007
@@ -2805,7 +2805,7 @@
 	  fi
 	elif test "$build_libtool_libs" = yes; then
 	  # Not a shared library
-	  if test "$deplibs_check_method" != pass_all; then
+	  if test "$deplibs_check_method" != pass_all && test "$old_library" != "libltdl.a"; then
 	    # We're trying link a shared library against a static one
 	    # but the system doesn't support it.
 

Then save the following as C:\msys\1.0\home\<windows login>\synfig\_filez\openexr-1.4.0-mingw32.patch:

diff -Nuar openexr-1.4.0.orig/IlmThread/Makefile.in openexr-1.4.0/IlmThread/Makefile.in
--- openexr-1.4.0.orig/IlmThread/Makefile.in	Wed Aug  9 05:45:52 2006
+++ openexr-1.4.0/IlmThread/Makefile.in	Wed Apr 18 20:31:58 2007
@@ -62,7 +62,8 @@
 am_libIlmThread_la_OBJECTS = IlmThreadPool.lo IlmThread.lo \
 	IlmThreadSemaphore.lo IlmThreadMutex.lo IlmThreadPosix.lo \
 	IlmThreadSemaphorePosix.lo IlmThreadSemaphorePosixCompat.lo \
-	IlmThreadMutexPosix.lo
+	IlmThreadMutexPosix.lo IlmThreadWin32.lo IlmThreadSemaphoreWin32.lo \
+	IlmThreadMutexWin32.lo
 libIlmThread_la_OBJECTS = $(am_libIlmThread_la_OBJECTS)
 DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/config
 depcomp = $(SHELL) $(top_srcdir)/depcomp

Finally save the following as C:\msys\1.0\home\<windows login>\synfig\_filez\openexr-1.4.0-pkgconfig.patch:

diff -Nuar openexr-1.4.0.orig/OpenEXR.pc.in openexr-1.4.0/OpenEXR.pc.in
--- openexr-1.4.0.orig/OpenEXR.pc.in	Wed Aug  9 05:37:50 2006
+++ openexr-1.4.0/OpenEXR.pc.in	Fri Apr 20 20:52:46 2007
@@ -7,5 +7,5 @@
 Name: OpenEXR
 Description: OpenEXR image library
 Version: @OPENEXR_VERSION@
-Libs: -L${libdir} -lIlmImf -lImath -lHalf -lIex -lz @PTHREAD_LIBS@
-Cflags: @PTHREAD_CFLAGS@ -I${OpenEXR_includedir}
+Libs: -L${libdir} -lIlmImf -lImath -lHalf -lIex -lz
+Cflags: -I@includedir@ -I${OpenEXR_includedir}

Configuration

This section describes the parameters of synbuild.conf file.

Files and Directories

As you can see in this section you can define the path and name of the special directories (with sources, patches and temporary directories). If you install the build scripts as written above, there nothing to change.

Also this section contains the path and version of the OpenEXR source files.

External tools

In this section you need to define the path to the executable files of the three auxiliary packages: ImageMagick, Subversion and NSIS. ImageMagick and Subversion are set it paths to PATH environment variable. But it add its to the end of list and we can get name collision. For example, "convert" tool from ImageMagick name some like "convert" tool from Borland Delphi Explorer, which can be installed before ImageMagick.

Build setup

MINGW_HOST - host parameter of "configure" script. Do not change it.

SYN_CORE_DEBUG_BUILD - if "yes", Synfig Core will maked with debug info.

SYN_STUDIO_DEBUG_BUILD - if "yes", Synfig Studio will maked with debug info.

Patches

In this section you can find a number of patches definition blocks, looking like this:

# ETL patches
ETL_PATCHES=$(cat <<:END_ETL:
:END_ETL:)

For example, if you place any filenames of patches between :END_ETL: blocks, it will be applied before configuration of ETL. Patch files need to be stored into _filez directory.

This section is useful if you want to test your own patches before send it to Synfig developers.

Autoconfiguration

This section contatin code, which setup required environment variables and (by default) there no need to be changed.

Build Order

Note: If you want build synfig without lags, open a single msys session, then open "Task Manager", search for sh.exe process and set priority "Below normal" to it.

Note: On-access antivirus scanner can dramatically decrease configuration speed.

OpenEXR

This package need to build only once. Rebuild is required if you get new version or want apply new patch to it or you update the compiler and its incompatible with oldest binaries.

In your msys console goto C:\msys\1.0\home\<windows login>\synfig directory by typing:

$ cd ~/synfig

Then type:

$ ./make_openexr.sh

Wait for "Done: OpenEXR" string.

ETL

Rebuild it when you get new version of Synfig.

In your msys console goto C:\msys\1.0\home\<windows login>\synfig directory by typing:

$ cd ~/synfig

Then type:

$ ./make_etl.sh

Wait for "Done: ETL" string.

Synfig Core

Rebuild it when you get new version of Synfig.

In your msys console goto C:\msys\1.0\home\<windows login>\synfig directory by typing:

$ cd ~/synfig

Then type:

$ ./make_core.sh

Wait for "Done: synfig-core" string. It can take along time. Synfig Core installer will be moved into current directory.

Synfig Studio

Rebuild it when you get new version of Synfig.

In your msys console goto C:\msys\1.0\home\<windows login>\synfig directory by typing:

$ cd ~/synfig

Then type:

$ ./make_studio.sh

Wait for "Done: synfig-studio" string. It can take along time. Synfig Studio installer will be moved into current directory.

Additional tools

This tools is not required for Synfig building, but its can help in debugging process.

P.S. Post this later. ;-)