r15924 - gnucash/trunk/packaging/win32 - Allow building from a tarball.
Andreas Köhler
andi5 at cvs.gnucash.org
Wed Apr 18 18:05:38 EDT 2007
Author: andi5
Date: 2007-04-18 18:05:36 -0400 (Wed, 18 Apr 2007)
New Revision: 15924
Trac: http://svn.gnucash.org/trac/changeset/15924
Modified:
gnucash/trunk/packaging/win32/defaults
gnucash/trunk/packaging/win32/dist.sh
gnucash/trunk/packaging/win32/functions
gnucash/trunk/packaging/win32/install.sh
Log:
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.
Modified: gnucash/trunk/packaging/win32/defaults
===================================================================
--- gnucash/trunk/packaging/win32/defaults 2007-04-18 19:17:11 UTC (rev 15923)
+++ gnucash/trunk/packaging/win32/defaults 2007-04-18 22:05:36 UTC (rev 15924)
@@ -38,14 +38,35 @@
set_default TMP_DIR $GLOBAL_DIR\\tmp
set_default DOWNLOAD_DIR $GLOBAL_DIR\\downloads
-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
+if [ -z "$BUILD_FROM_TARBALL" ]; then
+ if [ -f "../../src/swig-runtime.h" ]; then
+ BUILD_FROM_TARBALL=yes
+ else
+ BUILD_FROM_TARBALL=no
+ fi
+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"
set_default cross_compile "no"
@@ -277,8 +298,10 @@
add_step inst_inno
add_step inst_hh
fi
-add_step inst_svn
-add_step svn_up
+if test x$UPDATE_SOURCES = xyes ; then
+ add_step inst_svn
+ add_step svn_up
+fi
add_step inst_gnucash
add_step inst_docs
Modified: gnucash/trunk/packaging/win32/dist.sh
===================================================================
--- gnucash/trunk/packaging/win32/dist.sh 2007-04-18 19:17:11 UTC (rev 15923)
+++ gnucash/trunk/packaging/win32/dist.sh 2007-04-18 22:05:36 UTC (rev 15924)
@@ -211,14 +211,17 @@
echo "Now running the Inno Setup Compiler for creating the setup.exe"
${_INNO_UDIR}/iscc ${_GNUCASH_UDIR}/gnucash.iss
- # And changing output filename
- SVN_REV=`grep GNUCASH_SVN_REV ${_BUILD_UDIR}/src/gnome-utils/gnc-svninfo.h | cut -d" " -f3 | cut -d\" -f2 `
- SETUP_FILENAME="gnucash-2.0.99-svn-r${SVN_REV}-setup.exe"
- qpushd ${_GNUCASH_UDIR}
- mv gnucash-2.0.99-setup.exe ${SETUP_FILENAME}
- qpopd
- echo "Final resulting Setup program is:"
- echo ${_GNUCASH_UDIR}/${SETUP_FILENAME}
+ if [ "$BUILD_FROM_TARBALL" = "no" ]; then
+ # And changing output filename
+ PKG_VERSION=`grep PACKAGE_VERSION ${_BUILD_UDIR}/config.h | cut -d" " -f3 | cut -d\" -f2 `
+ SVN_REV=`grep GNUCASH_SVN_REV ${_BUILD_UDIR}/src/gnome-utils/gnc-svninfo.h | cut -d" " -f3 | cut -d\" -f2 `
+ SETUP_FILENAME="gnucash-${PKG_VERSION}-svn-r${SVN_REV}-setup.exe"
+ qpushd ${_GNUCASH_UDIR}
+ mv gnucash-${PKG_VERSION}-setup.exe ${SETUP_FILENAME}
+ qpopd
+ echo "Final resulting Setup program is:"
+ echo ${_GNUCASH_UDIR}/${SETUP_FILENAME}
+ fi
}
prepare
Modified: gnucash/trunk/packaging/win32/functions
===================================================================
--- gnucash/trunk/packaging/win32/functions 2007-04-18 19:17:11 UTC (rev 15923)
+++ gnucash/trunk/packaging/win32/functions 2007-04-18 22:05:36 UTC (rev 15924)
@@ -38,6 +38,14 @@
# c:/dir/sub
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
function smart_wget() {
_FILE=`basename $1`
Modified: gnucash/trunk/packaging/win32/install.sh
===================================================================
--- gnucash/trunk/packaging/win32/install.sh 2007-04-18 19:17:11 UTC (rev 15923)
+++ gnucash/trunk/packaging/win32/install.sh 2007-04-18 22:05:36 UTC (rev 15924)
@@ -913,7 +913,9 @@
export BUILD_GUILE=yes
export name_build_guile=/usr/bin/guile-config
fi
- ./autogen.sh
+ if [ "$BUILD_FROM_TARBALL" != "yes" ]; then
+ ./autogen.sh
+ fi
# Windows DLLs don't need relinking
grep -v "need_relink=yes" ltmain.sh > ltmain.sh.new ; mv ltmain.sh.new ltmain.sh
qpopd
More information about the gnucash-changes
mailing list