This is an automated email from the git hooks/post-receive script. x2go pushed a change to branch master in repository buildscripts. from b45ad26 nsis-builder.bat: Improve logic for x2gohelper new 2ee0c00 Initial work on handlings multiple versions of MinGW + Qt. MinGW 4.4 and Qt 4.8.5 are still hardcoded. The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "adds" were already present in the repository and have only been added to this reference. Summary of changes: bin/build-nsis-package.sh | 80 +++++++++++++++---------------------- bin/generate-nsis-version.pl | 6 +-- bin/mingw32-4.4+qt-4.8.wrapper.sh | 5 +++ bin/nsis-builder.bat | 23 ++++++----- 4 files changed, 55 insertions(+), 59 deletions(-) create mode 100644 bin/mingw32-4.4+qt-4.8.wrapper.sh mode change 100644 => 100755 bin/nsis-builder.bat -- Alioth's /srv/git/_hooks_/post-receive-email on /srv/git/code.x2go.org/buildscripts.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository buildscripts. commit 2ee0c00a85cf68cf689b80e713874d14bef391fd Author: Mike DePaulo <mikedep333@gmail.com> Date: Fri Sep 12 07:33:39 2014 -0400 Initial work on handlings multiple versions of MinGW + Qt. MinGW 4.4 and Qt 4.8.5 are still hardcoded. --- bin/build-nsis-package.sh | 80 +++++++++++++++---------------------- bin/generate-nsis-version.pl | 6 +-- bin/mingw32-4.4+qt-4.8.wrapper.sh | 5 +++ bin/nsis-builder.bat | 23 ++++++----- 4 files changed, 55 insertions(+), 59 deletions(-) diff --git a/bin/build-nsis-package.sh b/bin/build-nsis-package.sh index 07ede9c..a978834 100755 --- a/bin/build-nsis-package.sh +++ b/bin/build-nsis-package.sh @@ -29,8 +29,8 @@ GIT_USER="x2go" GIT_HOSTNAME="code.x2go.org" GPG_KEY= -NSIS_DISTS_SUPPORTED="mingw" -MINGW_DISTROS="current" +NSIS_DISTS_SUPPORTED="mingw32-4.4,mingw32-4.8" +MINGW_DISTROS="qt-4.8" COMPONENT_MAIN="main" COMPONENT_NIGHTLY="heuler" @@ -44,6 +44,9 @@ test -z $1 && { echo "usage: $(basename $0) [<subpath>/]<git-project> {main,main FORCE_BUILD=${FORCE_BUILD:-"yes"} NSIS_BUILD_FOR=${NSIS_BUILD_FOR:-"mingw:$MINGW_DISTROS"} + # FIXME: these should be generated from the env var!!! + l_DIST=mingw32-4.4 + l_CODENAME=qt-4.8 set -ex @@ -53,7 +56,7 @@ set_vars() { TEMP_BASE="/cygdrive/d/Build/tmp" mkdir -p "$TEMP_BASE" chmod 2770 "$TEMP_BASE" - + # first argv is the name of the Git project PROJECT_PATH="$1" PROJECT_PATH=${PROJECT_PATH/%.git/} @@ -80,8 +83,8 @@ set_vars() { [ "x$DATE" = "xtoday" ] && DATE="$(date +%Y%m%d)" # setting paths - PROJECT_DIR="/cygdrive/d/Build/GIT/nightly/x2goclient" - PKGDIST="/cygdrive/d/Build/pkg-dist/nightly/x2goclient" + PROJECT_DIR="/cygdrive/d/Build/GIT/nightly/$l_DIST/$l_CODENAME/x2goclient" + PKGDIST="/cygdrive/d/Build/pkg-dist/nightly/$l_DIST/$l_CODENAME/x2goclient" # build for other architectures than amd64/i386 EXTRA_ARCHS="${EXTRA_ARCHS:-}" @@ -125,10 +128,8 @@ prepare_workspace() { # by default we build for all current debian versions if [ "x$ARGV2_CODENAME" != "x" ]; then - if echo "$DEBIAN_DISTROS" | grep $ARGV2_CODENAME >/dev/null; then - NSIS_BUILD_FOR="debian:$ARGV2_CODENAME" - elif echo "$UBUNTU_DISTROS" | grep $ARGV2_CODENAME >/dev/null; then - NSIS_BUILD_FOR="ubuntu:$ARGV2_CODENAME" + if echo "$MINGW_DISTROS" | grep $ARGV2_CODENAME >/dev/null; then + NSIS_BUILD_FOR="mingw32-4.4:$ARGV2_CODENAME" fi fi return 0 @@ -177,45 +178,36 @@ clear_pkgdist() { } build_packages() { - # use pbuilder for building all variants of this package - echo "$NSIS_BUILD_FOR" | sed -e 's/ /\n/g' | while read line; do - l_DIST="$(echo ${line/: /:} | cut -d":" -f1 | tr [:upper:] [:lower:])" - l_CODENAMES="${CODENAMES:-$(echo ${line/: /:} | cut -d":" -f2- | sed -e 's/,/ /g' | tr [:upper:] [:lower:])}" - echo "$NSIS_DISTS_SUPPORTED" | grep $l_DIST >/dev/null && { + echo "$NSIS_DISTS_SUPPORTED" | grep $l_DIST >/dev/null && { - TEMP_DIR="$(mktemp -d --tmpdir=$TEMP_BASE)" - mkdir -p "$TEMP_DIR/$PROJECT" - chmod 2770 "$TEMP_DIR" -Rf + TEMP_DIR="$(mktemp -d --tmpdir=$TEMP_BASE)" + mkdir -p "$TEMP_DIR/$PROJECT" + chmod 2770 "$TEMP_DIR" -Rf - cd "$PROJECT_DIR" - git clone --local "$PROJECT_DIR" "$TEMP_DIR/$PROJECT/" - cd "$TEMP_DIR/$PROJECT" - git checkout $CHECKOUT || git checkout master - find $PROJECT_DIR/../ -type f -maxdepth 0 -mindepth 0 | grep $PROJECT_*.orig.tar.gz &>/dev/null && cp $PROJECT_DIR/../$PROJECT_*.orig.tar.gz .. - GITREV=$(gitrevno) + cd "$PROJECT_DIR" + git clone --local "$PROJECT_DIR" "$TEMP_DIR/$PROJECT/" + cd "$TEMP_DIR/$PROJECT" + git checkout $CHECKOUT || git checkout master + find $PROJECT_DIR/../ -type f -maxdepth 0 -mindepth 0 | grep $PROJECT_*.orig.tar.gz &>/dev/null && cp $PROJECT_DIR/../$PROJECT_*.orig.tar.gz .. + GITREV=$(gitrevno) - # FIXME: this should be handled at the beginning of this script!!! - l_DIST=mingw32-4.4 - l_CODENAME=qt-4.8 + # TODO: Improve generate-nsis-version.pl so that it can be run from another dir + cd /cygdrive/d/Build/buildscripts/bin/ + ./generate-nsis-version.pl $PROJECT_DIR - # TODO: Improve generate-nsis-version.pl so that it can be run from another dir - cd /cygdrive/d/Build/buildscripts/bin/ - ./generate-nsis-version.pl + cd $PROJECT_DIR + cp -a debian/changelog txt/ - cd $PROJECT_DIR - cp -a debian/changelog txt/ + # create git changelog immediately prior to building the SRPM package + git --no-pager log --since "2 years ago" --format="%ai %aN (%h) %n%n%x09*%w(68,0,10) %s%d%n" > ChangeLog.gitlog + cp ChangeLog.gitlog txt/git-info - # create git changelog immediately prior to building the SRPM package - git --no-pager log --since "2 years ago" --format="%ai %aN (%h) %n%n%x09*%w(68,0,10) %s%d%n" > ChangeLog.gitlog - cp ChangeLog.gitlog txt/git-info - - cd /cygdrive/d/Build/buildscripts/bin/ - - nice /cygdrive/d/Build/buildscripts/bin/nsis-builder.bat --buildresult "D:\\Build\\Scripts\\test\\$l_DIST\\$l_CODENAME\\i386" + cd /cygdrive/d/Build/buildscripts/bin/ + + nice /cygdrive/d/Build/buildscripts/bin/nsis-builder.bat "${l_DIST}" "${l_CODENAME}" - rm -Rf "$TEMP_DIR" + rm -Rf "$TEMP_DIR" } - done return 0 } @@ -223,13 +215,7 @@ upload_packages() { # dupload the new packages to the reprepro repository echo "$NSIS_BUILD_FOR" | sed -e 's/ /\n/g' | while read line; do - # in case we build a special CODENAME (squeeze, wheezy, lucid, ...) do skip - # the wrong distribution here... - test -z $CODENAMES || echo $line | grep $CODENAMES || break - # FIXME: this should be handled at the beginning of this script!!! - l_DIST=mingw32-4.4 - l_CODENAME=qt-4.8 MINGW_REPOS_BASE=/srv/sites/x2go.org/code/releases/binary-win32/x2goclient/heuler/ # create remote directories in archive @@ -251,7 +237,7 @@ upload_packages() { # copy new installer to download location # FIXME: this should work scp /cygdrive/d/Build/pkg-dist/$l_DIST/$l_CODENAME/i386/$PROJECT-*-setup.exe" "$MINGW_REPOS_BASE/$l_DIST/$l_CODENAME/" - scp /cygdrive/d/Build/GIT/nightly/$PROJECT/nsis/$PROJECT-*-setup.exe $REPOS_SERVER:"$MINGW_REPOS_BASE/$l_DIST/$l_CODENAME/" + scp /cygdrive/d/Build/GIT/nightly/$l_DIST/$l_CODENAME/$PROJECT/nsis/$PROJECT-*-setup.exe $REPOS_SERVER:"$MINGW_REPOS_BASE/$l_DIST/$l_CODENAME/" done return 0 } diff --git a/bin/generate-nsis-version.pl b/bin/generate-nsis-version.pl index 5c5c3be..83a9a5c 100755 --- a/bin/generate-nsis-version.pl +++ b/bin/generate-nsis-version.pl @@ -6,7 +6,7 @@ use POSIX qw(strftime); my $date = strftime "%Y.%m.%d", localtime; -open(F,"<../../GIT/nightly/x2goclient/version.h") or die; +open(F,"<$ARGV[0]/version.h") or die; my @lines=<F>; close(F); @@ -14,7 +14,7 @@ my $text=join("",@lines); my $version=(split("VERSION \"",$text))[1]; my $version=(split("\"",$version))[0]; -open(F,"<../../GIT/nightly/x2goclient/nsis/x2goclient.nsi") or die; +open(F,"<$ARGV[0]/nsis/x2goclient.nsi") or die; @lines=<F>; close(F); @@ -23,6 +23,6 @@ $text=join("",@lines); $text=~s/X2GOCLIENT_VERSION/$version-$date/; #print $text; -open(F,">../../GIT/nightly/x2goclient/nsis/x2goclient.nsi") or die; +open(F,">$ARGV[0]/nsis/x2goclient.nsi") or die; print F $text; close(F); diff --git a/bin/mingw32-4.4+qt-4.8.wrapper.sh b/bin/mingw32-4.4+qt-4.8.wrapper.sh new file mode 100644 index 0000000..1793502 --- /dev/null +++ b/bin/mingw32-4.4+qt-4.8.wrapper.sh @@ -0,0 +1,5 @@ +#!/bin/bash +# This script exists because it appears that you cannot pass env vars +# to C:\cygwin\bin\bash.exe from the windows command prompt. +NSIS_BUILD_FOR=mingw32-4.4:qt-4.8 +$1 $2 $3 $4 diff --git a/bin/nsis-builder.bat b/bin/nsis-builder.bat old mode 100644 new mode 100755 index c61dc7b..32b3413 --- a/bin/nsis-builder.bat +++ b/bin/nsis-builder.bat @@ -1,28 +1,33 @@ -call "D:\Qt\4.8.5\bin\qtvars.bat" -set PATH=%PATH%;D:\MinGW\libexec\gcc\mingw32\4.4.0\ +D: +if "%1"=="mingw32-4.4" ( + cd D:\Build\GIT\nightly\mingw32-4.4\qt-4.8\x2goclient\ + rem this includes setting PATH=%PATH%;D:\MinGW\libexec\gcc\mingw32\4.4.0\ + call "D:\Qt\4.8.5\bin\qtvars.bat" +) +if "%1"=="mingw32-4.8" ( + cd D:\Build\GIT\nightly\mingw32-4.8\qt-4.8\x2goclient\ + rem this includes setting PATH=%PATH%;D:\i686-4.8.2-release-posix-dwarf-rt_v3-rev3\mingw32\libexec\gcc\i686-w64-mingw32\4.8.2\ + call "D:\Qt\4.8.6\bin\qtvars.bat" +) set PATH=%PATH%;C:\Program Files (x86)\Git\bin\ set PATH=%PATH%;D:\x2goclient-contrib\upx\3.91_bin\ set PATH=%PATH%;C:\Program Files (x86)\NSIS\Unicode\ -D: -cd D:\Build\GIT\nightly\x2goclient rem use msysgit's sed rem enable debug -if "%1"=="--console" sed -i 's/#CONFIG += console/CONFIG += console/' x2goclient.pro +if "%3"=="--console" sed -i 's/#CONFIG += console/CONFIG += console/' x2goclient.pro %COMSPEC% /c config_win.bat || exit /b %errorlevel% mingw32-make || exit /b %errorlevel% dir release\x2goclient.exe -cd x2gohelper +cd x2gohelper mingw32-make || exit /b %errorlevel% cd .. dir release\x2gohelper.exe rmdir /s /q nsis\x2goclient cd nsis mkdir x2goclient -xcopy /S D:\Build\scripts\current_files\x2goclient x2goclient +xcopy /S D:\Build\scripts\current_files\%1\%2\x2goclient x2goclient copy ..\release\x2goclient.exe x2goclient\ copy ..\release\x2gohelper.exe x2goclient\ upx x2goclient\x2goclient.exe upx x2goclient\x2gohelper.exe makensis x2goclient.nsi || exit /b %errorlevel% - - -- Alioth's /srv/git/_hooks_/post-receive-email on /srv/git/code.x2go.org/buildscripts.git