mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Add Andi's script for automated build environment building on Windows/mingw32
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@14720 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
1286a411ac
commit
c63b2f96d6
30
packaging/win32/README
Normal file
30
packaging/win32/README
Normal file
@ -0,0 +1,30 @@
|
||||
These scripts try to download and install a Windows/mingw32 build
|
||||
environment for GnuCash.
|
||||
|
||||
Before you start with the automated build, you have to complete these
|
||||
steps manually. The directory variables are set in custom.sh.
|
||||
|
||||
* Download MSYS (but *only* msys, no mingw and no msysdtk)
|
||||
from http://www.mingw.org/download.shtml -> Current -> MSYS -> (bin, *.exe)
|
||||
to $DOWNLOAD_DIR
|
||||
|
||||
* Install MSYS (no postinstall)
|
||||
to $MSYS_DIR
|
||||
|
||||
* Download wget
|
||||
from http://www.mingw.org/download.shtml -> Current -> mingwPORT -> (bin, wget-*)
|
||||
to $DOWNLOAD_DIR
|
||||
|
||||
* Adjust installer.sh and/or custom.sh. Especially in the latter you
|
||||
can comment out those build steps that have been completed already
|
||||
and/or should not be performed now. If you want verbose output of
|
||||
any script step, change the first line in install.sh and add the
|
||||
"-x" switch.
|
||||
|
||||
Start/Enter any MSYS shell. Let the automated build begin by:
|
||||
|
||||
$INSTALLER_DIR/installer.sh
|
||||
|
||||
Good luck!
|
||||
|
||||
More information is collected on http://wiki.gnucash.org/wiki/Windows
|
99
packaging/win32/custom.sh
Normal file
99
packaging/win32/custom.sh
Normal file
@ -0,0 +1,99 @@
|
||||
#!/bin/sh # for emacs
|
||||
#
|
||||
# all directories should be without spaces!
|
||||
|
||||
GLOBAL_DIR=c:\\soft
|
||||
TMP_DIR=$GLOBAL_DIR\\tmp
|
||||
DOWNLOAD_DIR=$GLOBAL_DIR\\downloads
|
||||
|
||||
MSYS_DIR=$GLOBAL_DIR\\msys
|
||||
|
||||
WGET_DIR=$GLOBAL_DIR\\wget
|
||||
#WGET=
|
||||
|
||||
SF_MIRROR="http://heanet.dl.sourceforge.net/sourceforge"
|
||||
GNOME_MIRROR="ftp.gnome.org/pub/gnome"
|
||||
|
||||
DTK_URL="$SF_MIRROR/mingw/msysDTK-1.0.1.exe"
|
||||
|
||||
MINGW_URL="$SF_MIRROR/mingw/MinGW-5.0.2.exe"
|
||||
MINGW_DIR=$GLOBAL_DIR\\mingw
|
||||
|
||||
UNZIP_URL="$SF_MIRROR/gnuwin32/unzip-5.51-1.exe"
|
||||
UNZIP_DIR=$GLOBAL_DIR\\unzip
|
||||
|
||||
REGEX_BIN_URL="$SF_MIRROR/gnuwin32/regex-0.12-bin.zip"
|
||||
REGEX_LIB_URL="$SF_MIRROR/gnuwin32/regex-0.12-lib.zip"
|
||||
REGEX_DIR=$GLOBAL_DIR\\regex
|
||||
|
||||
READLINE_BIN_URL="$SF_MIRROR/gnuwin32/readline-5.0-bin.zip"
|
||||
READLINE_LIB_URL="$SF_MIRROR/gnuwin32/readline-5.0-lib.zip"
|
||||
READLINE_DIR=$GLOBAL_DIR\\readline
|
||||
|
||||
INDENT_BIN_URL="$SF_MIRROR/gnuwin32/indent-2.2.9-bin.zip"
|
||||
INDENT_DIR=$GLOBAL_DIR\\indent
|
||||
|
||||
GUILE_URL="http://ftp.gnu.org/pub/gnu/guile/guile-1.6.8.tar.gz"
|
||||
SLIB_URL="http://swiss.csail.mit.edu/ftpdir/scm/slib3a3.zip"
|
||||
GUILE_DIR=$GLOBAL_DIR\\guile
|
||||
|
||||
GWRAP_URL="http://download.savannah.gnu.org/releases/g-wrap/g-wrap-1.9.6.tar.gz"
|
||||
GWRAP_DIR=$GLOBAL_DIR\\g-wrap
|
||||
|
||||
GLADE_URL="$SF_MIRROR/gladewin32/gtk-win32-devel-2.8.18-rc1.exe"
|
||||
GLADE_DIR=$GLOBAL_DIR\\glade
|
||||
|
||||
GNOME_PLATFORM_URL="$GNOME_MIRROR/platform/2.14/2.14.3/win32"
|
||||
GNOME_DESKTOP_URL="$GNOME_MIRROR/desktop/2.14/2.14.2/win32"
|
||||
INTLTOOL_URL="$GNOME_PLATFORM_URL/intltool-0.35.0.zip"
|
||||
GCONF_URL="$GNOME_PLATFORM_URL/GConf-2.14.0.zip"
|
||||
GCONF_DEV_URL="$GNOME_PLATFORM_URL/GConf-dev-2.14.0.zip"
|
||||
ORBIT2_URL="$GNOME_PLATFORM_URL/ORBit2-2.14.2.zip"
|
||||
ORBIT2_DEV_URL="$GNOME_PLATFORM_URL/ORBit2-dev-2.14.2.zip"
|
||||
LIBBONOBO_URL="$GNOME_PLATFORM_URL/libbonobo-2.14.0-20060619.zip"
|
||||
LIBBONOBO_DEV_URL="$GNOME_PLATFORM_URL/libbonobo-dev-2.14.0-20060619.zip"
|
||||
GNOME_VFS_URL="$GNOME_PLATFORM_URL/gnome-vfs-2.14.2.zip"
|
||||
GNOME_VFS_DEV_URL="$GNOME_PLATFORM_URL/gnome-vfs-dev-2.14.2.zip"
|
||||
LIBGNOME_URL="$GNOME_PLATFORM_URL/libgnome-2.14.1-20060613.zip"
|
||||
LIBGNOME_DEV_URL="$GNOME_PLATFORM_URL/libgnome-dev-2.14.1-20060613.zip"
|
||||
LIBGNOMECANVAS_URL="$GNOME_PLATFORM_URL/libgnomecanvas-2.14.0.zip"
|
||||
LIBGNOMECANVAS_DEV_URL="$GNOME_PLATFORM_URL/libgnomecanvas-dev-2.14.0.zip"
|
||||
LIBBONOBOUI_URL="$GNOME_PLATFORM_URL/libbonoboui-2.14.0.zip"
|
||||
LIBBONOBOUI_DEV_URL="$GNOME_PLATFORM_URL/libbonoboui-dev-2.14.0.zip"
|
||||
LIBGNOMEUI_URL="$GNOME_PLATFORM_URL/libgnomeui-2.14.1.zip"
|
||||
LIBGNOMEUI_DEV_URL="$GNOME_PLATFORM_URL/libgnomeui-dev-2.14.1.zip"
|
||||
LIBGNOMEPRINT_URL="$GNOME_DESKTOP_URL/libgnomeprint-2.12.1.zip"
|
||||
LIBGNOMEPRINT_DEV_URL="$GNOME_DESKTOP_URL/libgnomeprint-dev-2.12.1.zip"
|
||||
LIBGNOMEPRINTUI_URL="$GNOME_DESKTOP_URL/libgnomeprintui-2.12.1.zip"
|
||||
LIBGNOMEPRINTUI_DEV_URL="$GNOME_DESKTOP_URL/libgnomeprintui-dev-2.12.1.zip"
|
||||
GTKHTML_URL="$GNOME_DESKTOP_URL/gtkhtml-3.10.2.zip"
|
||||
GTKHTML_DEV_URL="$GNOME_DESKTOP_URL/gtkhtml-dev-3.10.2.zip"
|
||||
GNOME_DIR=$GLOBAL_DIR\\gnome
|
||||
|
||||
AUTOCONF_URL="http://ftp.gnu.org/gnu/autoconf/autoconf-2.60.tar.bz2"
|
||||
AUTOMAKE_URL="http://ftp.gnu.org/gnu/automake/automake-1.9.6.tar.bz2"
|
||||
LIBTOOL_URL="http://ftp.gnu.org/gnu/libtool/libtool-1.5.22.tar.gz"
|
||||
AUTOTOOLS_DIR=$GLOBAL_DIR\\autotools
|
||||
|
||||
SVN_URL="http://subversion.tigris.org/files/documents/15/32856/svn-1.3.2-setup.exe"
|
||||
SVN_DIR=$GLOBAL_DIR\\svn
|
||||
|
||||
REPOS_URL="http://svn.gnucash.org/repo/gnucash/trunk"
|
||||
REPOS_DIR=$GLOBAL_DIR\\repos
|
||||
GNUCASH_DIR=$GLOBAL_DIR\\gnucash
|
||||
|
||||
add_step inst_wget
|
||||
add_step inst_dtk
|
||||
add_step inst_mingw
|
||||
add_step inst_unzip
|
||||
add_step inst_regex
|
||||
add_step inst_readline
|
||||
add_step inst_indent
|
||||
add_step inst_guile
|
||||
add_step inst_glade
|
||||
add_step inst_gwrap
|
||||
add_step inst_gnome
|
||||
add_step inst_autotools
|
||||
add_step inst_svn
|
||||
add_step svn_up
|
||||
add_step inst_gnucash
|
447
packaging/win32/install.sh
Normal file
447
packaging/win32/install.sh
Normal file
@ -0,0 +1,447 @@
|
||||
#!/bin/sh
|
||||
|
||||
function add_step() {
|
||||
steps=("${steps[@]}" "$@")
|
||||
}
|
||||
|
||||
. custom.sh
|
||||
|
||||
SEPS_ACLOCAL_FLAGS=" "
|
||||
SEPS_AUTOTOOLS_CPPFLAGS=" "
|
||||
SEPS_AUTOTOOLS_LDFLAGS=" "
|
||||
SEPS_GUILE_LOAD_PATH=";"
|
||||
SEPS_PATH=":"
|
||||
SEPS_PKG_CONFIG_PATH=":"
|
||||
SEPS_READLINE_CPPFLAGS=" "
|
||||
SEPS_READLINE_LDFLAGS=" "
|
||||
SEPS_REGEX_CPPFLAGS=" "
|
||||
SEPS_REGEX_LDFLAGS=" "
|
||||
SEPS_SCHEME_LIBRARY_PATH=";"
|
||||
ENV_VARS="\
|
||||
ACLOCAL_FLAGS \
|
||||
AUTOTOOLS_CPPFLAGS \
|
||||
AUTOTOOLS_LDFLAGS \
|
||||
GUILE_LOAD_PATH \
|
||||
PATH \
|
||||
PKG_CONFIG_PATH \
|
||||
READLINE_CPPFLAGS \
|
||||
READLINE_LDFLAGS \
|
||||
REGEX_CPPFLAGS \
|
||||
REGEX_LDFLAGS \
|
||||
SCHEME_LIBRARY_PATH \
|
||||
"
|
||||
|
||||
function setup() {
|
||||
echo
|
||||
echo "############################################################"
|
||||
echo "### $*"
|
||||
echo "############################################################"
|
||||
}
|
||||
|
||||
function die() {
|
||||
echo
|
||||
echo "!!! $* !!!"
|
||||
echo "!!! ABORTING !!!"
|
||||
exit -1
|
||||
}
|
||||
|
||||
function quiet() { "$@" &>/dev/null; }
|
||||
function qpushd() { pushd "$@" >/dev/null; }
|
||||
function qpopd() { popd >/dev/null; }
|
||||
|
||||
function add_to_env() {
|
||||
_SEP=`eval echo '"$'"SEPS_$2"'"'`
|
||||
_ENV=`eval echo '"$'"$2"'"'`
|
||||
_SED=`eval echo '"s#.*'"${_SEP}$1${_SEP}"'.*##"'`
|
||||
_TEST=`echo "${_SEP}${_ENV}${_SEP}" | sed "${_SED}"`
|
||||
if [ "$_TEST" ]; then
|
||||
if [ "$_ENV" ]; then
|
||||
eval "$2_ADDS"'="'"$1${_SEP}"'$'"$2_ADDS"'"'
|
||||
else
|
||||
eval "$2_ADDS"'="'"$1"'"'
|
||||
fi
|
||||
eval "$2"'="$'"$2_ADDS"'$'"$2_BASE"'"'
|
||||
fi
|
||||
}
|
||||
|
||||
# c:/dir/sub
|
||||
function win_fs_path() {
|
||||
echo "$*" | sed 's,\\,/,g'
|
||||
}
|
||||
|
||||
# /c/dir/sub
|
||||
function unix_path() {
|
||||
echo "$*" | sed 's,^\([A-Za-z]\):,/\1,;s,\\,/,g'
|
||||
}
|
||||
|
||||
function prepare() {
|
||||
mkdir -p $TMP_DIR
|
||||
for _ENV in $ENV_VARS; do
|
||||
eval "${_ENV}_BASE"'=$'"${_ENV}"
|
||||
eval "${_ENV}_ADDS="
|
||||
eval export "${_ENV}"
|
||||
done
|
||||
DOWNLOAD_UDIR=`unix_path $DOWNLOAD_DIR`
|
||||
TMP_UDIR=`unix_path $TMP_DIR`
|
||||
}
|
||||
|
||||
function inst_wget() {
|
||||
setup Wget
|
||||
_WGET_UDIR=`unix_path $WGET_DIR`
|
||||
mkdir -p $WGET_DIR
|
||||
tar -xjpf $DOWNLOAD_UDIR/wget*.tar.bz2 -C $WGET_DIR
|
||||
cp $_WGET_UDIR/*/*/wget.exe $WGET_DIR
|
||||
add_to_env $_WGET_UDIR PATH
|
||||
quiet wget --version || die "wget unavailable"
|
||||
}
|
||||
|
||||
function inst_dtk() {
|
||||
setup MSYS DTK
|
||||
wget -c $DTK_URL -P $DOWNLOAD_DIR
|
||||
echo "!!! The path must be: $MSYS_DIR !!!"
|
||||
$DOWNLOAD_UDIR/msysDTK-*.exe
|
||||
for file in \
|
||||
/bin/{aclocal*,auto*,ifnames,libtool*} \
|
||||
/share/{aclocal,aclocal-1.7,autoconf,autogen,automake-1.7,libtool}
|
||||
do
|
||||
mv $file $file.bak
|
||||
done
|
||||
quiet perl --help || die "msys dtk not installed correctly"
|
||||
}
|
||||
|
||||
function inst_mingw() {
|
||||
setup MinGW
|
||||
_MINGW_WFSDIR=`win_fs_path $MINGW_DIR`
|
||||
wget -c $MINGW_URL -P $DOWNLOAD_DIR
|
||||
echo "!!! Install g++ !!!"
|
||||
echo "!!! The path must be: $MINGW_DIR !!!"
|
||||
$DOWNLOAD_UDIR/MinGW-*.exe
|
||||
(echo "y"; echo "y"; echo "$_MINGW_WFSDIR") | sh pi.sh
|
||||
quiet gcc --version && quiet ld --help || die "mingw not installed correctly"
|
||||
}
|
||||
|
||||
function inst_unzip() {
|
||||
setup Unzip
|
||||
_UNZIP_UDIR=`unix_path $UNZIP_DIR`
|
||||
wget -c $UNZIP_URL -P $DOWNLOAD_DIR
|
||||
echo "!!! The path must be: $UNZIP_DIR !!!"
|
||||
$DOWNLOAD_UDIR/unzip-*.exe
|
||||
add_to_env $_UNZIP_UDIR/bin PATH
|
||||
quiet unzip --help || die "unzip unavailable"
|
||||
}
|
||||
|
||||
function inst_regex() {
|
||||
setup RegEx
|
||||
_REGEX_UDIR=`unix_path $REGEX_DIR`
|
||||
wget -c $REGEX_BIN_URL -P $DOWNLOAD_DIR
|
||||
wget -c $REGEX_LIB_URL -P $DOWNLOAD_DIR
|
||||
mkdir -p $REGEX_DIR
|
||||
unzip $DOWNLOAD_UDIR/regex-*-bin.zip -d $REGEX_DIR
|
||||
unzip $DOWNLOAD_UDIR/regex-*-lib.zip -d $REGEX_DIR
|
||||
add_to_env -I$_REGEX_UDIR/include REGEX_CPPFLAGS
|
||||
add_to_env -L$_REGEX_UDIR/lib REGEX_LDFLAGS
|
||||
add_to_env $_REGEX_UDIR/bin PATH
|
||||
quiet ld $REGEX_LDFLAGS -lregex -o tmp && rm tmp || die "regex not installed correctly"
|
||||
}
|
||||
|
||||
function inst_readline() {
|
||||
setup Readline
|
||||
_READLINE_UDIR=`unix_path $READLINE_DIR`
|
||||
wget -c $READLINE_BIN_URL -P $DOWNLOAD_DIR
|
||||
wget -c $READLINE_LIB_URL -P $DOWNLOAD_DIR
|
||||
mkdir -p $READLINE_DIR
|
||||
unzip $DOWNLOAD_DIR/readline-*-bin.zip -d $READLINE_DIR
|
||||
unzip $DOWNLOAD_DIR/readline-*-lib.zip -d $READLINE_DIR
|
||||
add_to_env -I$_READLINE_UDIR/include READLINE_CPPFLAGS
|
||||
add_to_env -L$_READLINE_UDIR/lib READLINE_LDFLAGS
|
||||
add_to_env $_READLINE_UDIR/bin PATH
|
||||
ld $READLINE_LDFLAGS -lreadline -o tmp && rm tmp || die "readline not installed correctly"
|
||||
}
|
||||
|
||||
function inst_indent() {
|
||||
setup Indent
|
||||
_INDENT_UDIR=`unix_path $INDENT_DIR`
|
||||
wget -c $INDENT_BIN_URL -P $DOWNLOAD_DIR
|
||||
mkdir -p $INDENT_DIR
|
||||
unzip $DOWNLOAD_UDIR/indent-*-bin.zip -d $INDENT_DIR
|
||||
add_to_env $_INDENT_UDIR/bin PATH
|
||||
quiet which indent || die "indent unavailable"
|
||||
}
|
||||
|
||||
function inst_guile() {
|
||||
setup Guile
|
||||
_GUILE_WFSDIR=`win_fs_path $GUILE_DIR`
|
||||
_GUILE_UDIR=`unix_path $GUILE_DIR`
|
||||
wget -c $GUILE_URL -P $DOWNLOAD_DIR
|
||||
wget -c $SLIB_URL -P $DOWNLOAD_DIR
|
||||
tar -xzpf $DOWNLOAD_UDIR/guile-*.tar.gz -C $TMP_UDIR
|
||||
qpushd $TMP_UDIR/guile-*
|
||||
qpushd ice-9
|
||||
cp boot-9.scm boot-9.scm.bak
|
||||
cat boot-9.scm.bak | sed '/SIGBUS/d' > boot-9.scm
|
||||
qpopd
|
||||
qpushd libguile
|
||||
cp fports.c fports.c.bak
|
||||
cat fports.c.bak | sed 's,#elif defined (FIONREAD),#elif 0,' > fports.c
|
||||
cp load.c load.c.bak
|
||||
cat load.c.bak | sed '/scan !=/s,:,;,' > load.c
|
||||
qpopd
|
||||
qpushd libguile-ltdl
|
||||
cp raw-ltdl.c raw-ltdl.c.bak
|
||||
cat raw-ltdl.c.bak | sed 's,\(SCMLTSTATIC\) LT_GLOBAL_DATA,\1,' > raw-ltdl.c
|
||||
touch upstream/ltdl.c.diff
|
||||
qpopd
|
||||
./configure \
|
||||
--disable-elisp \
|
||||
--disable-networking \
|
||||
--disable-dependency-tracking \
|
||||
--disable-libtool-lock \
|
||||
--disable-linuxthreads \
|
||||
-C --prefix=$_GUILE_WFSDIR \
|
||||
ac_cv_func_regcomp_rx=yes \
|
||||
CPPFLAGS="${READLINE_CPPFLAGS} ${REGEX_CPPFLAGS}" \
|
||||
LDFLAGS="-lwsock32 ${READLINE_LDFLAGS} ${REGEX_LDFLAGS} -lregex"
|
||||
cp config.status config.status.bak
|
||||
cat config.status.bak | sed 's# fileblocks[$.A-Za-z]*,#,#' > config.status
|
||||
./config.status
|
||||
for file in {srfi,libguile-ltdl,libguile}/Makefile; do
|
||||
cp $file $file.bak
|
||||
cat $file.bak | sed '/^lib.*LDFLAGS =/s,\(\\*\)$, -no-undefined \1,' > $file
|
||||
done
|
||||
qpushd guile-config
|
||||
cp Makefile Makefile.bak
|
||||
cat Makefile.bak | sed '/-bindir-/s,:,^,g' > Makefile
|
||||
qpopd
|
||||
make
|
||||
make install
|
||||
qpopd
|
||||
qpushd $GUILE_DIR/bin
|
||||
mv libguilereadline-v-12-12.dll libguilereadline-v-12.dll
|
||||
mv libguile-srfi-srfi-4-v-1-1.dll libguile-srfi-srfi-4-v-1.dll
|
||||
mv libguile-srfi-srfi-13-14-v-1-1.dll libguile-srfi-srfi-13-14-v-1.dll
|
||||
qpopd
|
||||
_SLIB_DIR=$GUILE_DIR\\share\\guile\\site
|
||||
mkdir -p $_SLIB_DIR
|
||||
unzip $DOWNLOAD_DIR/slib*.zip -d $_SLIB_DIR
|
||||
qpushd $_SLIB_DIR/slib
|
||||
cp guile.init guile.init.bak
|
||||
echo "(define software-type (lambda () 'MS-DOS))" >> guile.init
|
||||
qpopd
|
||||
add_to_env $_GUILE_UDIR/bin PATH
|
||||
add_to_env $_GUILE_WFSDIR/share/guile/site/slib/ SCHEME_LIBRARY_PATH
|
||||
add_to_env "-I $_GUILE_UDIR/share/aclocal" ACLOCAL_FLAGS
|
||||
guile -c '(use-modules (srfi srfi-39))' &&
|
||||
guile -c "(use-modules (ice-9 slib)) (require 'printf)" || die "guile not installed correctly"
|
||||
}
|
||||
|
||||
function inst_glade() {
|
||||
setup Glade
|
||||
wget -c $GLADE_URL -P $DOWNLOAD_DIR
|
||||
echo "!!! The path must be: $GLADE_DIR !!!"
|
||||
$DOWNLOAD_UDIR/gtk-win32-devel-*.exe
|
||||
qpushd $GLADE_DIR\\lib\\pkgconfig
|
||||
cp cairo.pc cairo.pc.bak
|
||||
cat cairo.pc.bak | sed 's,libpng12,libpng13,' > cairo.pc
|
||||
qpopd
|
||||
qpushd $GLADE_DIR\\bin
|
||||
cp intl.dll libintl-2.dll
|
||||
qpopd
|
||||
pkg-config --exists glib-2.0 gtk+-2.0 || die "glade not installed correctly"
|
||||
}
|
||||
|
||||
function inst_gwrap() {
|
||||
setup G-Wrap
|
||||
_GWRAP_WFSDIR=`win_fs_path $GWRAP_DIR`
|
||||
_GWRAP_UDIR=`unix_path $GWRAP_DIR`
|
||||
wget -c $GWRAP_URL -P $DOWNLOAD_DIR
|
||||
tar -xzpf $DOWNLOAD_UDIR/g-wrap-*.tar.gz -C $TMP_UDIR
|
||||
qpushd $TMP_UDIR/g-wrap-*
|
||||
qpushd g-wrap
|
||||
cp core-runtime.c core-runtime.c.bak
|
||||
cat core-runtime.c.bak | sed '/vasprintf/d' > core-runtime.c
|
||||
qpopd
|
||||
cp configure configure.bak
|
||||
cat configure.bak | sed 's,"glib","glib-2.0",g' > configure
|
||||
./configure \
|
||||
--prefix=$_GWRAP_WFSDIR \
|
||||
LDFLAGS="-no-undefined"
|
||||
qpushd guile/g-wrap/gw
|
||||
cp Makefile Makefile.bak
|
||||
cat Makefile.bak | sed '/^libgw_guile_standard_la_LIBADD/s,$, ../../../libffi/libffi.la ../../../g-wrap/libgwrap-core-runtime.la,;/libgw_guile_gw_glib_la_LIBADD/s,$, ../../../g-wrap/libgwrap-core-runtime.la,' > Makefile
|
||||
make standard.c gw-glib.c
|
||||
cp standard.scm standard.scm.bak
|
||||
cat standard.scm.bak | sed -c 's,\(libgw-guile-standard\),../lib/\1-0,' > standard.scm
|
||||
cp gw-glib.scm gw-glib.scm.bak
|
||||
cat gw-glib.scm.bak | sed -c 's,\(libgw-guile-gw-glib\),../lib/\1-0,' > gw-glib.scm
|
||||
qpopd
|
||||
qpushd guile/test
|
||||
cp Makefile Makefile.bak
|
||||
cat Makefile.bak | sed '/^std_libs/s,\\$, ../../libffi/libffi.la \\,' > Makefile
|
||||
qpopd
|
||||
make
|
||||
make install
|
||||
qpopd
|
||||
add_to_env $_GWRAP_UDIR/bin PATH
|
||||
add_to_env $_GWRAP_UDIR/lib/pkgconfig PKG_CONFIG_PATH
|
||||
add_to_env $_GWRAP_WFSDIR/share/guile/site GUILE_LOAD_PATH
|
||||
guile -c '(use-modules (srfi srfi-39))' &&
|
||||
quiet g-wrap-config --version || die "g-wrap not installed correctly"
|
||||
}
|
||||
|
||||
function inst_gnome() {
|
||||
setup Gnome platform
|
||||
_GNOME_UDIR=`unix_path $GNOME_DIR`
|
||||
wget -c $INTLTOOL_URL -P $DOWNLOAD_DIR
|
||||
wget -c $ORBIT2_URL -P $DOWNLOAD_DIR
|
||||
wget -c $ORBIT2_DEV_URL -P $DOWNLOAD_DIR
|
||||
wget -c $GCONF_URL -P $DOWNLOAD_DIR
|
||||
wget -c $GCONF_DEV_URL -P $DOWNLOAD_DIR
|
||||
wget -c $LIBBONOBO_URL -P $DOWNLOAD_DIR
|
||||
wget -c $LIBBONOBO_DEV_URL -P $DOWNLOAD_DIR
|
||||
wget -c $GNOME_VFS_URL -P $DOWNLOAD_DIR
|
||||
wget -c $GNOME_VFS_DEV_URL -P $DOWNLOAD_DIR
|
||||
wget -c $LIBGNOME_URL -P $DOWNLOAD_DIR
|
||||
wget -c $LIBGNOME_DEV_URL -P $DOWNLOAD_DIR
|
||||
wget -c $LIBGNOMECANVAS_URL -P $DOWNLOAD_DIR
|
||||
wget -c $LIBGNOMECANVAS_DEV_URL -P $DOWNLOAD_DIR
|
||||
wget -c $LIBBONOBOUI_URL -P $DOWNLOAD_DIR
|
||||
wget -c $LIBBONOBOUI_DEV_URL -P $DOWNLOAD_DIR
|
||||
wget -c $LIBGNOMEUI_URL -P $DOWNLOAD_DIR
|
||||
wget -c $LIBGNOMEUI_DEV_URL -P $DOWNLOAD_DIR
|
||||
wget -c $LIBGNOMEPRINT_URL -P $DOWNLOAD_DIR
|
||||
wget -c $LIBGNOMEPRINT_DEV_URL -P $DOWNLOAD_DIR
|
||||
wget -c $LIBGNOMEPRINTUI_URL -P $DOWNLOAD_DIR
|
||||
wget -c $LIBGNOMEPRINTUI_DEV_URL -P $DOWNLOAD_DIR
|
||||
wget -c $GTKHTML_URL -P $DOWNLOAD_DIR
|
||||
wget -c $GTKHTML_DEV_URL -P $DOWNLOAD_DIR
|
||||
mkdir -p $GNOME_DIR
|
||||
unzip $DOWNLOAD_UDIR/intltool-*.zip -d $GNOME_DIR
|
||||
unzip $DOWNLOAD_UDIR/ORBit2-[^d]*.zip -d $GNOME_DIR
|
||||
unzip $DOWNLOAD_UDIR/ORBit2-dev-*.zip -d $GNOME_DIR
|
||||
unzip $DOWNLOAD_UDIR/GConf-[^d]*.zip -d $GNOME_DIR
|
||||
unzip $DOWNLOAD_UDIR/GConf-dev-*.zip -d $GNOME_DIR
|
||||
unzip $DOWNLOAD_UDIR/libbonobo-[^d]*.zip -d $GNOME_DIR
|
||||
unzip $DOWNLOAD_UDIR/libbonobo-dev-*.zip -d $GNOME_DIR
|
||||
unzip $DOWNLOAD_UDIR/gnome-vfs-[^d]*.zip -d $GNOME_DIR
|
||||
unzip $DOWNLOAD_UDIR/gnome-vfs-dev-*.zip -d $GNOME_DIR
|
||||
unzip $DOWNLOAD_UDIR/libgnome-[^d]*.zip -d $GNOME_DIR
|
||||
unzip $DOWNLOAD_UDIR/libgnome-dev-*.zip -d $GNOME_DIR
|
||||
unzip $DOWNLOAD_UDIR/libgnomecanvas-[^d]*.zip -d $GNOME_DIR
|
||||
unzip $DOWNLOAD_UDIR/libgnomecanvas-dev-*.zip -d $GNOME_DIR
|
||||
unzip $DOWNLOAD_UDIR/libbonoboui-[^d]*.zip -d $GNOME_DIR
|
||||
unzip $DOWNLOAD_UDIR/libbonoboui-dev-*.zip -d $GNOME_DIR
|
||||
unzip $DOWNLOAD_UDIR/libgnomeui-[^d]*.zip -d $GNOME_DIR
|
||||
unzip $DOWNLOAD_UDIR/libgnomeui-dev-*.zip -d $GNOME_DIR
|
||||
unzip $DOWNLOAD_UDIR/libgnomeprint-[^d]*.zip -d $GNOME_DIR
|
||||
unzip $DOWNLOAD_UDIR/libgnomeprint-dev-*.zip -d $GNOME_DIR
|
||||
unzip $DOWNLOAD_UDIR/libgnomeprintui-[^d]*.zip -d $GNOME_DIR
|
||||
unzip $DOWNLOAD_UDIR/libgnomeprintui-dev-*.zip -d $GNOME_DIR
|
||||
unzip $DOWNLOAD_UDIR/gtkhtml-[^d]*.zip -d $GNOME_DIR
|
||||
unzip $DOWNLOAD_UDIR/gtkhtml-dev-*.zip -d $GNOME_DIR
|
||||
add_to_env $_GNOME_UDIR/bin PATH
|
||||
add_to_env $_GNOME_UDIR/lib/pkgconfig PKG_CONFIG_PATH
|
||||
add_to_env "-I $_GNOME_UDIR/share/aclocal" ACLOCAL_FLAGS
|
||||
quiet gconftool-2 --version &&
|
||||
pkg-config --exists gconf-2.0 libgnome-2.0 libgnomeui-2.0 libgnomeprint-2.2 libgnomeprintui-2.2 libgtkhtml-3.8 &&
|
||||
quiet intltoolize --version || die "gnome not installed correctly"
|
||||
}
|
||||
|
||||
function inst_autotools() {
|
||||
setup Autotools
|
||||
_AUTOTOOLS_UDIR=`unix_path $AUTOTOOLS_DIR`
|
||||
wget -c $AUTOCONF_URL -P $DOWNLOAD_DIR
|
||||
wget -c $AUTOMAKE_URL -P $DOWNLOAD_DIR
|
||||
wget -c $LIBTOOL_URL -P $DOWNLOAD_DIR
|
||||
add_to_env $_AUTOTOOLS_UDIR/bin PATH
|
||||
tar -xjpf $DOWNLOAD_UDIR/autoconf-*.tar.bz2 -C $TMP_UDIR
|
||||
qpushd $TMP_UDIR/autoconf-*
|
||||
./configure --prefix=$_AUTOTOOLS_UDIR
|
||||
make
|
||||
make install
|
||||
qpopd
|
||||
tar -xjpf $DOWNLOAD_UDIR/automake-*.tar.bz2 -C $TMP_UDIR
|
||||
qpushd $TMP_UDIR/automake-*
|
||||
./configure --prefix=$_AUTOTOOLS_UDIR
|
||||
make
|
||||
make install
|
||||
qpopd
|
||||
tar -xzpf $DOWNLOAD_UDIR/libtool-*.tar.gz -C $TMP_UDIR
|
||||
qpushd $TMP_UDIR/libtool-*
|
||||
./configure --prefix=$_AUTOTOOLS_UDIR
|
||||
make
|
||||
make install
|
||||
qpopd
|
||||
add_to_env -I$_AUTOTOOLS_UDIR/include AUTOTOOLS_CPPFLAGS
|
||||
add_to_env -L$_AUTOTOOLS_UDIR/lib AUTOTOOLS_LDFLAGS
|
||||
add_to_env "-I $_AUTOTOOLS_UDIR/share/aclocal" ACLOCAL_FLAGS
|
||||
quiet autoconf --help &&
|
||||
quiet automake --help &&
|
||||
quiet libtool --help || die "autotools not installed correctly"
|
||||
}
|
||||
|
||||
function inst_svn() {
|
||||
setup Subversion
|
||||
_SVN_UDIR=`unix_path $SVN_DIR`
|
||||
wget -c $SVN_URL -P $DOWNLOAD_DIR
|
||||
echo "!!! The path must be: $SVN_DIR !!!"
|
||||
$DOWNLOAD_UDIR/svn-*.exe
|
||||
export PATH="$_SVN_UDIR/bin:$PATH"
|
||||
}
|
||||
|
||||
function svn_up() {
|
||||
mkdir -p $REPOS_DIR
|
||||
qpushd $REPOS_DIR
|
||||
if [ -x .svn ]; then
|
||||
setup svn up
|
||||
svn up
|
||||
else
|
||||
setup svn co
|
||||
svn co $REPOS_URL .
|
||||
fi
|
||||
qpopd
|
||||
}
|
||||
|
||||
function inst_gnucash() {
|
||||
setup GnuCash
|
||||
_GNUCASH_WFSDIR=`win_fs_path $GNUCASH_DIR`
|
||||
qpushd $REPOS_DIR
|
||||
cp configure.in configure.in.bak
|
||||
cat configure.in.bak | sed '/AC_PROG_INTLTOOL/s#$#([],[no-xml])#;/GUILE_LOAD_PATH/s,:,;,g' > configure.in
|
||||
./autogen.sh
|
||||
./configure \
|
||||
--prefix=$_GNUCASH_WFSDIR \
|
||||
--enable-debug \
|
||||
CPPFLAGS="${AUTOTOOLS_CPPFLAGS}" \
|
||||
LDFLAGS="${AUTOTOOLS_LDFLAGS}"
|
||||
# make
|
||||
qpopd
|
||||
}
|
||||
|
||||
function finish() {
|
||||
_NEW=x
|
||||
for _ENV in $ENV_VARS; do
|
||||
_ADDS=`eval echo '"\$'"${_ENV}"'_ADDS"'`
|
||||
if [ "$_ADDS" ]; then
|
||||
if [ "$_NEW" ]; then
|
||||
echo
|
||||
echo "Environment variables changed, please do the following"
|
||||
echo
|
||||
_NEW=
|
||||
fi
|
||||
_VAL=`eval echo '"$'"${_ENV}_BASE"'"'`
|
||||
if [ "$_VAL" ]; then
|
||||
_CHANGE="export ${_ENV}=\"${_ADDS}"'$'"${_ENV}\""
|
||||
else
|
||||
_CHANGE="export ${_ENV}=\"${_ADDS}\""
|
||||
fi
|
||||
echo $_CHANGE
|
||||
echo echo "'${_CHANGE}' >> /etc/profile.d/installer.sh"
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
prepare
|
||||
for step in "${steps[@]}" ; do
|
||||
eval $step
|
||||
done
|
||||
finish
|
Loading…
Reference in New Issue
Block a user