diff --git a/packaging/win32/build_tags_git.sh b/packaging/win32/build_tags_git.sh index d56ff6b636..f09bfa59bb 100644 --- a/packaging/win32/build_tags_git.sh +++ b/packaging/win32/build_tags_git.sh @@ -84,9 +84,6 @@ for tag_rev in $tags ; do echo -n 'GLOBAL_DIR=c:\\soft\\gnucash-' >> ${w32pkg}/custom.sh echo "${tag}" >> ${w32pkg}/custom.sh - # No need to update the sources we just checked out - echo "UPDATE_SOURCES=no" >> ${w32pkg}/custom.sh - # BUILD_FROM_TARBALL is special: # in install.sh place we check !=yes, in defaults.sh =yes, in dist.sh =no # We want it to look like 'no' in install and defaults, but yes in dist diff --git a/packaging/win32/daily_build.sh b/packaging/win32/daily_build.sh index be7fb39112..c1f92b49c1 100755 --- a/packaging/win32/daily_build.sh +++ b/packaging/win32/daily_build.sh @@ -1,12 +1,24 @@ #!/bin/sh # -# Note: for this script to work, you need to make sure bash can -# find svn on your system. If it's not in the default -# Windows path, you will have to add it yourself, for -# example like this: -# - create a file /etc/profile.d/svn.sh -# - add this line: export PATH=/c/soft/svn/bin:$PATH -# (Use the real path to your svn installation, obviously) +# Notes: +# 1. for this script to work, you need to make sure bash can +# find svn on your system. If it's not in the default +# Windows path, you will have to add it yourself, for +# example like this: +# - create a file /etc/profile.d/svn.sh +# - add this line: export PATH=/c/soft/svn/bin:$PATH +# (Use the real path to your svn installation, obviously) +# +# 2. The recommended setup is to call this script from within the +# source code repository (packaging/win32 directory). This is +# different from before, where it was assumed to be called +# from outside the source code repository. To remain some +# compatibility with the old way, svn update is called twice +# - once for the repository (to update all) +# - once for the build scripts (to also update the build scripts +# using the old way) +# The second invocation is superfluous if this script was called +# from within the source code repository. set -e @@ -15,6 +27,14 @@ function qpopd() { popd >/dev/null; } function unix_path() { echo "$*" | sed 's,^\([A-Za-z]\):,/\1,;s,\\,/,g'; } qpushd "$(dirname $(unix_path "$0"))" +. functions.sh +. defaults.sh + +qpushd "$REPOS_DIR" +svn update +qpopd + svn update + ./build_package.sh qpopd diff --git a/packaging/win32/defaults.sh b/packaging/win32/defaults.sh index 14f85429f1..7d8ee2a4ef 100644 --- a/packaging/win32/defaults.sh +++ b/packaging/win32/defaults.sh @@ -29,10 +29,7 @@ if [ -z "$BUILD_FROM_TARBALL" ]; then fi fi -# only change this to "yes" if you are using install.sh from the outside the repository checkout -set_default UPDATE_SOURCES noyes 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 @@ -43,7 +40,7 @@ else # keep this pointing from BUILD_DIR to REPOS_DIR set_default REL_REPOS_DIR ..\\repos - set_default REPOS_TYPE svn + set_default REPOS_TYPE "git" if [ "$REPOS_TYPE" = "git" ]; then set_default GIT_REV "trunk" set_default REPOS_URL "git://github.com/Gnucash/gnucash.git" diff --git a/packaging/win32/install-impl.sh b/packaging/win32/install-impl.sh index d69c682023..b574ccf517 100644 --- a/packaging/win32/install-impl.sh +++ b/packaging/win32/install-impl.sh @@ -1453,46 +1453,6 @@ function inst_hh() { fi } -function git_up() { - mkdir -p $_REPOS_UDIR - qpushd $_REPOS_UDIR - if [ -x .git ]; then - setup "git update in ${REPOS_DIR}" -# IMPORTANT: the update mechanism from git -# has been kept deliberately simple. -# -# It assumes you are working as a non-committer -# (see http://wiki.gnucash.org/wiki/Git for what that means) -# and will simply try to pull the current branch from -# the upstream repository. -# If you are a committer (and intend to commit from your Windows -# git clone) you should disable updates from the build scripts -# and manually update using the git-update script. -# FIXME the last part needs perl 5.8 and some config tweaks for -# perl to find git's Git.pm -# msys-dtk installed by default only has perl 5.6. - $GIT_CMD pull origin - else - setup git clone - $GIT_CMD clone $REPOS_URL . - $GIT_CMD checkout $GIT_REV . - fi - qpopd -} - -function svn_up() { - mkdir -p $_REPOS_UDIR - qpushd $_REPOS_UDIR - if [ -x .svn ]; then - setup "svn update in ${REPOS_DIR}" - svn up -r ${SVN_REV} - else - setup svn co - svn co -r ${SVN_REV} $REPOS_URL . - fi - qpopd -} - function inst_cutecash() { setup Cutecash _BUILD_UDIR=`unix_path $CUTECASH_BUILD_DIR` diff --git a/packaging/win32/install.sh b/packaging/win32/install.sh index 2033dfd353..f7ac729cc1 100644 --- a/packaging/win32/install.sh +++ b/packaging/win32/install.sh @@ -111,15 +111,6 @@ add_step inst_enchant add_step inst_webkit ## -if [ "$UPDATE_SOURCES" = "yes" ]; then - if [ "$REPOS_TYPE" = "git" ]; then - add_step git_up - elif [ "$REPOS_TYPE" = "svn" ]; then - add_step svn_up - else - die "Unkown repos type $REPOS_TYPE. Sources can only be updated for git or svn type repos" - fi -fi if [ "$WITH_CUTECASH" = "yes" ]; then add_step inst_cmake add_step inst_cutecash