mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Allow building from a tarball.
* Add UPDATE_SOURCES. If "no", drop inst_svn and svn_up. * Add BUILD_FROM_TARBALL. If "yes", set GNUCASH_DIR=..\\.., REPOS_DIR=$GNUCASH_DIR and UPDATE_SOURCES=no. * Fix renaming of setup.exe in dist.sh. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@15924 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
cfd42cd0bf
commit
114190d816
@ -38,13 +38,34 @@ set_default GLOBAL_DIR c:\\soft
|
|||||||
set_default TMP_DIR $GLOBAL_DIR\\tmp
|
set_default TMP_DIR $GLOBAL_DIR\\tmp
|
||||||
set_default DOWNLOAD_DIR $GLOBAL_DIR\\downloads
|
set_default DOWNLOAD_DIR $GLOBAL_DIR\\downloads
|
||||||
|
|
||||||
set_default GNUCASH_DIR $GLOBAL_DIR\\gnucash
|
if [ -z "$BUILD_FROM_TARBALL" ]; then
|
||||||
set_default REPOS_URL "http://svn.gnucash.org/repo/gnucash/trunk"
|
if [ -f "../../src/swig-runtime.h" ]; then
|
||||||
set_default REPOS_DIR $GNUCASH_DIR\\repos
|
BUILD_FROM_TARBALL=yes
|
||||||
# keep this pointing from BUILD_DIR to REPOS_DIR
|
else
|
||||||
set_default REL_REPOS_DIR ..\\repos
|
BUILD_FROM_TARBALL=no
|
||||||
set_default BUILD_DIR $GNUCASH_DIR\\build
|
fi
|
||||||
set_default INSTALL_DIR $GNUCASH_DIR\\inst
|
fi
|
||||||
|
|
||||||
|
if [ "$BUILD_FROM_TARBALL" = "yes" ]; then
|
||||||
|
UPDATE_SOURCES=no
|
||||||
|
set_default GNUCASH_DIR "$(wpwd ..\\..)"
|
||||||
|
set_default REPOS_DIR $GNUCASH_DIR
|
||||||
|
# keep this pointing from BUILD_DIR to REPOS_DIR
|
||||||
|
set_default REL_REPOS_DIR ..
|
||||||
|
set_default BUILD_DIR $GNUCASH_DIR\\build
|
||||||
|
set_default INSTALL_DIR $GNUCASH_DIR\\inst
|
||||||
|
else
|
||||||
|
# change this to "no" if you are using install.sh from the same repository checkout
|
||||||
|
set_default UPDATE_SOURCES yes
|
||||||
|
set_default GNUCASH_DIR $GLOBAL_DIR\\gnucash
|
||||||
|
set_default REPOS_URL "http://svn.gnucash.org/repo/gnucash/trunk"
|
||||||
|
set_default REPOS_DIR $GNUCASH_DIR\\repos
|
||||||
|
# keep this pointing from BUILD_DIR to REPOS_DIR
|
||||||
|
set_default REL_REPOS_DIR ..\\repos
|
||||||
|
set_default BUILD_DIR $GNUCASH_DIR\\build
|
||||||
|
set_default INSTALL_DIR $GNUCASH_DIR\\inst
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
####
|
####
|
||||||
# For cross-compiling, change this to "yes"
|
# For cross-compiling, change this to "yes"
|
||||||
@ -277,8 +298,10 @@ if test x$cross_compile != xyes ; then
|
|||||||
add_step inst_inno
|
add_step inst_inno
|
||||||
add_step inst_hh
|
add_step inst_hh
|
||||||
fi
|
fi
|
||||||
add_step inst_svn
|
if test x$UPDATE_SOURCES = xyes ; then
|
||||||
add_step svn_up
|
add_step inst_svn
|
||||||
|
add_step svn_up
|
||||||
|
fi
|
||||||
add_step inst_gnucash
|
add_step inst_gnucash
|
||||||
add_step inst_docs
|
add_step inst_docs
|
||||||
|
|
||||||
|
@ -211,14 +211,17 @@ function finish() {
|
|||||||
echo "Now running the Inno Setup Compiler for creating the setup.exe"
|
echo "Now running the Inno Setup Compiler for creating the setup.exe"
|
||||||
${_INNO_UDIR}/iscc ${_GNUCASH_UDIR}/gnucash.iss
|
${_INNO_UDIR}/iscc ${_GNUCASH_UDIR}/gnucash.iss
|
||||||
|
|
||||||
# And changing output filename
|
if [ "$BUILD_FROM_TARBALL" = "no" ]; then
|
||||||
SVN_REV=`grep GNUCASH_SVN_REV ${_BUILD_UDIR}/src/gnome-utils/gnc-svninfo.h | cut -d" " -f3 | cut -d\" -f2 `
|
# And changing output filename
|
||||||
SETUP_FILENAME="gnucash-2.0.99-svn-r${SVN_REV}-setup.exe"
|
PKG_VERSION=`grep PACKAGE_VERSION ${_BUILD_UDIR}/config.h | cut -d" " -f3 | cut -d\" -f2 `
|
||||||
qpushd ${_GNUCASH_UDIR}
|
SVN_REV=`grep GNUCASH_SVN_REV ${_BUILD_UDIR}/src/gnome-utils/gnc-svninfo.h | cut -d" " -f3 | cut -d\" -f2 `
|
||||||
mv gnucash-2.0.99-setup.exe ${SETUP_FILENAME}
|
SETUP_FILENAME="gnucash-${PKG_VERSION}-svn-r${SVN_REV}-setup.exe"
|
||||||
qpopd
|
qpushd ${_GNUCASH_UDIR}
|
||||||
echo "Final resulting Setup program is:"
|
mv gnucash-${PKG_VERSION}-setup.exe ${SETUP_FILENAME}
|
||||||
echo ${_GNUCASH_UDIR}/${SETUP_FILENAME}
|
qpopd
|
||||||
|
echo "Final resulting Setup program is:"
|
||||||
|
echo ${_GNUCASH_UDIR}/${SETUP_FILENAME}
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
prepare
|
prepare
|
||||||
|
@ -38,6 +38,14 @@ function quiet() { "$@" &>/dev/null; }
|
|||||||
# c:/dir/sub
|
# c:/dir/sub
|
||||||
function win_fs_path() { echo "$*" | sed 's,\\,/,g'; }
|
function win_fs_path() { echo "$*" | sed 's,\\,/,g'; }
|
||||||
|
|
||||||
|
# usage: wpwd [rel]
|
||||||
|
# rel can be any relative path
|
||||||
|
function wpwd() {
|
||||||
|
qpushd `unix_path "${1:-.}"`
|
||||||
|
pwd -W
|
||||||
|
qpopd
|
||||||
|
}
|
||||||
|
|
||||||
# usage: smart_wget URL DESTDIR
|
# usage: smart_wget URL DESTDIR
|
||||||
function smart_wget() {
|
function smart_wget() {
|
||||||
_FILE=`basename $1`
|
_FILE=`basename $1`
|
||||||
|
@ -913,7 +913,9 @@ function inst_gnucash() {
|
|||||||
export BUILD_GUILE=yes
|
export BUILD_GUILE=yes
|
||||||
export name_build_guile=/usr/bin/guile-config
|
export name_build_guile=/usr/bin/guile-config
|
||||||
fi
|
fi
|
||||||
./autogen.sh
|
if [ "$BUILD_FROM_TARBALL" != "yes" ]; then
|
||||||
|
./autogen.sh
|
||||||
|
fi
|
||||||
# Windows DLLs don't need relinking
|
# Windows DLLs don't need relinking
|
||||||
grep -v "need_relink=yes" ltmain.sh > ltmain.sh.new ; mv ltmain.sh.new ltmain.sh
|
grep -v "need_relink=yes" ltmain.sh > ltmain.sh.new ; mv ltmain.sh.new ltmain.sh
|
||||||
qpopd
|
qpopd
|
||||||
|
Loading…
Reference in New Issue
Block a user