gnucash-on-windows master: Multiple changes pushed

John Ralls jralls at code.gnucash.org
Sun Sep 10 14:15:09 EDT 2017


Updated	 via  https://github.com/Gnucash/gnucash-on-windows/commit/9002a890 (commit)
	 via  https://github.com/Gnucash/gnucash-on-windows/commit/22433a06 (commit)
	 via  https://github.com/Gnucash/gnucash-on-windows/commit/5b3d1683 (commit)
	 via  https://github.com/Gnucash/gnucash-on-windows/commit/767d7539 (commit)
	 via  https://github.com/Gnucash/gnucash-on-windows/commit/8c88c9ff (commit)
	from  https://github.com/Gnucash/gnucash-on-windows/commit/e8090408 (commit)



commit 9002a89051f72daa0b777498579526e35f8d61b9
Author: John Ralls <jralls at ceridwen.us>
Date:   Sun Sep 10 11:01:03 2017 -0700

    Make and transmit the setup file only if there's a new gnucash.exe present.

diff --git a/buildserver/build_package.ps1 b/buildserver/build_package.ps1
index 2d7a86d..196b30e 100644
--- a/buildserver/build_package.ps1
+++ b/buildserver/build_package.ps1
@@ -103,14 +103,20 @@ bash-command -command "pacman -Su --noconfirm > >(tee -a $log_unix) 2>&1"
 #bash-command -command "cd $script_unix && git reset --hard && git pull --rebase"
 # Build the latest GnuCash and all dependencies not installed via mingw64
 bash-command -command "jhbuild --no-interact -f $script_unix/jhbuildrc build > >(tee -a $log_unix) 2> >(tee -a $log_unix)"
+$new_file = test-path -path $target_dir\$package\$branch\inst\bin\gnucash.exe -NewerThan $time_stamp
+if ($new_file) {
 #Build the installer
-$is_git = ($branch.CompareTo("master") -or $branch.CompareTo("unstable"))
-bash-command -command "echo 'Creating GnuCash installer.' > >(tee -a $log_unix)"
-& $script_dir\bundle-mingw64.ps1 -target_dir $target_dir\$package\$branch -git_build $is_git 2>&1 | Tee-Object -FilePath $log_file -Append
+    $is_git = ($branch.CompareTo("master") -or $branch.CompareTo("unstable"))
+    bash-command -command "echo 'Creating GnuCash installer.' > >(tee -a $log_unix)"
+    & $script_dir\bundle-mingw64.ps1 -target_dir $target_dir\$package\$branch -git_build $is_git 2>&1 | Tee-Object -FilePath $log_file -Append
+}
 $time_stamp = get-date -format "yyyy-MM-dd HH:mm:ss"
 bash-command -command "echo Build Ended $time_stamp >> $log_unix"
+
 # Copy the transcript and installer to the download server and delete them.
 if ($hostname) {
-    bash-command -command "scp -p $log_unix $hostname/$log_dir/"
-    bash-command -command "scp -p $target_unix/gnucash*setup.exe $hostname/master"
+	bash-command -command "scp -p $log_unix $hostname/$log_dir/"
+    if ($new_file) {
+	bash-command -command "scp -p $target_unix/gnucash*setup.exe $hostname/master"
+    }
 }

commit 22433a06ae4295555cd1b313666754ba2840e4d8
Author: John Ralls <jralls at ceridwen.us>
Date:   Sun Sep 10 10:44:19 2017 -0700

    Setup builds for master, unstable, and release packages.
    
    The first two being git branches, the last builds GnuCash from a tarball.

diff --git a/buildserver/build_package.ps1 b/buildserver/build_package.ps1
index 108f157..2d7a86d 100644
--- a/buildserver/build_package.ps1
+++ b/buildserver/build_package.ps1
@@ -48,6 +48,8 @@ Optional. A ssh compatible server specification (which means [user@]hostname:bas
 
 [CmdletBinding()]
 Param(
+    [Parameter(Mandatory=$true)]
+    [validatePattern("(master|unstable|release)")][string]$branch,
     [Parameter()] [string]$target_dir,
     [Parameter()] [string]$hostname
 )
@@ -62,6 +64,8 @@ if (!$target_dir) {
 $progressPreference = 'silentlyContinue'
 $env:MSYSTEM = 'MINGW32'
 $env:TERM = 'dumb' #Prevent escape codes in the log.
+$env:TARGET = "$package-$branch"
+
 function bash-command() {
     param ([string]$command = "")
     if (!(test-path -path $target_dir\msys2\usr\bin\bash.exe)) {
@@ -98,9 +102,11 @@ bash-command -command "pacman -Su --noconfirm > >(tee -a $log_unix) 2>&1"
 # Update the gnucash-on-windows repository
 #bash-command -command "cd $script_unix && git reset --hard && git pull --rebase"
 # Build the latest GnuCash and all dependencies not installed via mingw64
-bash-command -command "jhbuild --no-interact -f $script_unix/jhbuildrc build gnucash > >(tee -a $log_unix) 2>&1"
+bash-command -command "jhbuild --no-interact -f $script_unix/jhbuildrc build > >(tee -a $log_unix) 2> >(tee -a $log_unix)"
 #Build the installer
-& $script_dir\bundle-mingw64.ps1 -target_dir $target_dir 2>&1 | Out-File -FilePath $log_file -Append -Encoding UTF8
+$is_git = ($branch.CompareTo("master") -or $branch.CompareTo("unstable"))
+bash-command -command "echo 'Creating GnuCash installer.' > >(tee -a $log_unix)"
+& $script_dir\bundle-mingw64.ps1 -target_dir $target_dir\$package\$branch -git_build $is_git 2>&1 | Tee-Object -FilePath $log_file -Append
 $time_stamp = get-date -format "yyyy-MM-dd HH:mm:ss"
 bash-command -command "echo Build Ended $time_stamp >> $log_unix"
 # Copy the transcript and installer to the download server and delete them.
diff --git a/bundle-mingw64.ps1 b/bundle-mingw64.ps1
index 2cb3830..169916a 100644
--- a/bundle-mingw64.ps1
+++ b/bundle-mingw64.ps1
@@ -39,7 +39,10 @@ Optional. The root path to the build environment. Defaults to the root of the sc
 #>
 
 [CmdletBinding()]
-Param([Parameter()] [string]$target_dir)
+Param(
+  [Parameter()] [string]$target_dir,
+  [Parameter()] [bool]$git_build
+)
 
 $script_dir = Split-Path $script:MyInvocation.MyCommand.Path
 $root_dir = Split-Path $script_dir | Split-Path
@@ -123,7 +126,16 @@ $vcs_rev = version_item -tag "GNUCASH_SCM_REV" -path $gnc_vcsinfo_h | %{$_ -repl
 
 $date = get-date -format "yyyy-MM-dd"
 $setup_result =  "$target_dir\gnucash-$package_version-setup.exe"
-$final_file = "$target_dir\gnucash-$package_version-$date-git-$vcs_rev-setup.exe"
+$final_file = ""
+if ($git_build) {
+  $final_file = "$target_dir\gnucash-$package_version-$date-git-$vcs_rev-setup.exe"
+  }
+else {
+  $final_file = "$target_dir\gnucash-$package_version-setup.exe"
+}
+
+write-host "Running Inno Setup to create $final_file."
+
 if (test-path -path $setup_result) {
     remove-item -path $setup_result
 }
diff --git a/gnucash.modules b/gnucash.modules
index 2708be2..eb87441 100644
--- a/gnucash.modules
+++ b/gnucash.modules
@@ -278,12 +278,27 @@
     <branch module="google/googletest" repo="github" tag="release-1.8.0"/>
   </cmake>
 
-   <!--autotools id="gnucash"
-	      autogen-template="%(srcdir)s/%(autogen-sh)s && %(srcdir)s/configure -\-prefix %(prefix)s %(autogenargs)s"
-	      autogenargs="-\-enable-ofx -\-enable-aqbanking -\-enable-binreloc -\-enable-dbi -\-with-dbi-dbd-dir=$PREFIX/lib/dbd"-->
  <cmake id="gnucash"
         cmakeargs="-G 'MSYS Makefiles' -DCMAKE_FIND_ROOT_PATH=$MSYS2ROOT -DCMAKE_PREFIX_PATH=$MSYS2ROOT -DPERL_EXECUTABLE=/usr/bin/perl -DGNC_DBD_DIR=$PREFIX/lib/dbd -DHTMLHELP_DIR=$PREFIX/hh -DGTEST_ROOT=$SRCROOT/googletest/googletest -DGMOCK_ROOT=$SRCROOT/googletest/googlemock"
 	use-ninja="False">
+   <branch repo="sourceforge" module="gnucash/unstable/gnucash-2.7.0.tar.bz2"
+	   version="2.7.0"/>
+    <dependencies>
+      <dep package="libofx"/>
+      <dep package="aqbanking"/>
+      <dep package="libdbi-drivers"/>
+      <!--dep package="shared-mime-info"/-->
+      <!--dep package="iso-codes"/-->
+      <dep package="guile2"/>
+      <!--dep package="swig"/-->
+      <dep package="boost"/>
+      <dep package="googletest"/>
+    </dependencies>
+ </cmake>
+
+ <cmake id="gnucash-git"
+        cmakeargs="-G 'MSYS Makefiles' -DCMAKE_FIND_ROOT_PATH=$MSYS2ROOT -DCMAKE_PREFIX_PATH=$MSYS2ROOT -DPERL_EXECUTABLE=/usr/bin/perl -DGNC_DBD_DIR=$PREFIX/lib/dbd -DHTMLHELP_DIR=$PREFIX/hh -DGTEST_ROOT=$SRCROOT/googletest/googletest -DGMOCK_ROOT=$SRCROOT/googletest/googlemock"
+	use-ninja="False">
    <branch repo="github" module="Gnucash/gnucash.git" revision="master"
 	   checkoutdir="gnucash-git"/>
     <dependencies>
@@ -297,7 +312,6 @@
       <dep package="boost"/>
       <dep package="googletest"/>
     </dependencies>
-   <!--/autotools-->
  </cmake>
 
   <autotools id="gnucash-docs-git" autogenargs="--disable-scrollkeeper"
@@ -313,10 +327,17 @@
   <autotools id="gnucash-docs" autogenargs="--disable-scrollkeeper"
 	    autogen-template="%(srcdir)s/%(autogen-sh)s && %(srcdir)s/configure --prefix %(prefix)s %(autogenargs)s"
 	    makeargs=" html" makeinstallargs="install-html" >
-    <branch  module="gnucash/gnucash-docs/gnucash-docs-2.6.16.tar.gz"
-	     version="2.6.16" repo="sourceforge"/>
+    <branch  module="gnucash/gnucash-docs/gnucash-docs-2.7.0.tar.gz"
+	     version="2.7.0" repo="sourceforge"/>
   </autotools>
 
+  <metamodule id="meta-gnucash-git">
+    <dependencies>
+      <dep package="gnucash-git"/>
+      <dep package="gnucash-docs-git"/>
+    </dependencies>
+  </metamodule>
+
   <metamodule id="meta-gnucash">
     <dependencies>
       <dep package="gnucash"/>
diff --git a/jhbuildrc.in b/jhbuildrc.in
index bde6c6b..384a2eb 100644
--- a/jhbuildrc.in
+++ b/jhbuildrc.in
@@ -33,6 +33,11 @@ def add_to_path_var(var, path):
 _basedir = "@-BASE_DIR-@"
 _download_dir = "@-DOWNLOAD_DIR-@"
 _arch = "@-ARCH-@"
+if os.environ.has_key('TARGET'):
+    (project, branch) = os.environ['TARGET'].split('-')
+    _basedir = os.path.join(_basedir, project)
+else:
+    branch = 'master'
 
 _config_dir = os.path.dirname(os.path.realpath(__file__))
 prefix = os.path.join(_basedir, 'inst')
@@ -40,7 +45,6 @@ checkoutroot = os.path.join(_basedir, 'src')
 buildroot = os.path.join(_basedir, 'build')
 tarballdir = os.path.join(_download_dir)
 moduleset = os.path.join(_config_dir, 'gnucash.modules')
-modules = ["meta-gnucash"]
 
 _mingw_includes = os.path.join(_basedir, 'msys2', $_arch, 'include')
 _mingw_libs = os.path.join(_basedir, 'msys2', $_arch, 'lib')
@@ -63,6 +67,11 @@ else:
 
 #autogenargs = 'CPPFLAGS="-I%s"' % _sys_includes
 
+if $branch in ('master', 'unstable'):
+    modules = ["meta-gnucash"]
+    branches['gnucash'] = (None, $branch)
+else:
+    modules = ["meta-gnucash"]
 append_autogenargs("libofx", "--with-opensp-includes=" + prefix + "/include/OpenSP --with-opensp-libs=" + prefix + "/lib")
 append_autogenargs("libdbi-drivers","--with-dbi-incdir=" + prefix + "/include --with-dbi-libdir=" + prefix + "/lib")
 module_makeargs["aqbanking"]="-j1"

commit 5b3d16839a1c8bbf6b541a838bea9f73a4a2a3c1
Author: John Ralls <jralls at ceridwen.us>
Date:   Sat Sep 9 13:01:15 2017 -0700

    Fix single architecture bits of jhbuildrc.

diff --git a/jhbuildrc.in b/jhbuildrc.in
index 422c999..bde6c6b 100644
--- a/jhbuildrc.in
+++ b/jhbuildrc.in
@@ -32,6 +32,8 @@ def add_to_path_var(var, path):
 
 _basedir = "@-BASE_DIR-@"
 _download_dir = "@-DOWNLOAD_DIR-@"
+_arch = "@-ARCH-@"
+
 _config_dir = os.path.dirname(os.path.realpath(__file__))
 prefix = os.path.join(_basedir, 'inst')
 checkoutroot = os.path.join(_basedir, 'src')
@@ -40,21 +42,25 @@ tarballdir = os.path.join(_download_dir)
 moduleset = os.path.join(_config_dir, 'gnucash.modules')
 modules = ["meta-gnucash"]
 
-_mingw_includes = os.path.join(_basedir, 'msys2', 'mingw32', 'include')
-_mingw_libs = os.path.join(_basedir, 'msys2', 'mingw32', 'lib')
+_mingw_includes = os.path.join(_basedir, 'msys2', $_arch, 'include')
+_mingw_libs = os.path.join(_basedir, 'msys2', $_arch, 'lib')
 _usr_include = os.path.join('/usr', 'include')
 _usr_lib = os.path.join('/usr', 'lib')
 environ_append('CPPFLAGS', '-I%s -I%s' % (_mingw_includes, _usr_include))
 environ_append('LDFLAGS', '-L%s -L%s' % (_mingw_libs, _usr_lib))
 add_to_path_var('PKG_CONFIG_PATH', os.path.join(_mingw_libs, 'pkgconfig'))
-add_to_path_var('PATH', os.path.join(_basedir, 'msys2', 'mingw32', 'bin'))
+add_to_path_var('PATH', os.path.join(_basedir, 'msys2', $_arch, 'bin'))
 
 os.environ['SRCROOT'] = checkoutroot
 os.environ['PREFIX'] = prefix
 os.environ['MSYS2ROOT'] = os.path.join(_basedir, 'msys2')
 #os.environ['GUILE_LOAD_PATH'] = os.path.join(prefix, 'share', 'guile', '2.0')
 #os.environ['GUILE_LOAD_BINARY_PATH'] = os.path.join(prefix, 'lib', 'guile', '2.0', 'ccache')
-autogenargs = "--build=i686-w64-mingw32"
+if ($_arch == 'mingw32':
+    autogenargs = "--build=i686-w64-mingw32"
+else:
+    autogenargs = "--build=x86_64-w64-mingw64"
+
 #autogenargs = 'CPPFLAGS="-I%s"' % _sys_includes
 
 append_autogenargs("libofx", "--with-opensp-includes=" + prefix + "/include/OpenSP --with-opensp-libs=" + prefix + "/lib")
diff --git a/setup-mingw64.ps1 b/setup-mingw64.ps1
index ce0ab10..e00764a 100644
--- a/setup-mingw64.ps1
+++ b/setup-mingw64.ps1
@@ -63,12 +63,14 @@ if ($x86_64) {
     $mingw_path = "/mingw64"
     $mingw_bin = "/mingw64/bin"
     $env:MSYSTEM = "MINGW64"
+    $arch = "mingw64"
 }
 else {
     $mingw_prefix = "mingw32/mingw-w64-i686-"
     $mingw_path = "/mingw32"
     $mingw_bin = "/mingw32/bin"
     $env:MSYSTEM = "MINGW32"
+    $arch = "mingw32"
 }
 
 if (!(test-path -path $target_dir)) {
@@ -264,6 +266,7 @@ bash-command -command "/usr/bin/patch -d/ -p0 -i $target_unix/src/gnucash-on-win
 $jhbuildrc = get-content "$target_dir\\src\\gnucash-on-windows.git\\jhbuildrc.in" |
  %{$_ -replace "@-BASE_DIR-@", "$target_unix"} |
  %{$_ -replace "@-DOWNLOAD_DIR-@", "$download_unix"}
+ %{$_ -replace "@-ARCH-@", "$arch"}
  [IO.File]::WriteAllLines("$target_dir\\src\\gnucash-on-windows.git\\jhbuildrc", $jhbuildrc)
 
 Write-Host @"

commit 767d75395e11878f84f1a96d89ce03e2e4f6aea6
Author: John Ralls <jralls at ceridwen.us>
Date:   Fri Sep 8 16:32:41 2017 -0700

    Set xterm to dumb.
    
    So that jhbuild and make don't insert ansi escapes into the build log.

diff --git a/buildserver/build_package.ps1 b/buildserver/build_package.ps1
index be764a7..108f157 100644
--- a/buildserver/build_package.ps1
+++ b/buildserver/build_package.ps1
@@ -61,7 +61,7 @@ if (!$target_dir) {
 
 $progressPreference = 'silentlyContinue'
 $env:MSYSTEM = 'MINGW32'
-
+$env:TERM = 'dumb' #Prevent escape codes in the log.
 function bash-command() {
     param ([string]$command = "")
     if (!(test-path -path $target_dir\msys2\usr\bin\bash.exe)) {

commit 8c88c9ffe1e884dfa4e4e460714cd3f260fb73dc
Author: John Ralls <jralls at ceridwen.us>
Date:   Fri Sep 8 12:27:06 2017 -0700

    Preserve permissions on uploads to code.
    
    Should permit overwrites.

diff --git a/buildserver/build_package.ps1 b/buildserver/build_package.ps1
index 5613d34..be764a7 100644
--- a/buildserver/build_package.ps1
+++ b/buildserver/build_package.ps1
@@ -89,7 +89,7 @@ $time_stamp = get-date -format "yyyy-MM-dd HH:mm:ss"
 bash-command -command "echo Build Started $time_stamp > $log_unix"
 #copy the file to the download server so that everyone can see we've started
 if ($hostname) {
-    bash-command -command "scp $log_unix $hostname/$log_dir/"
+    bash-command -command "scp -p $log_unix $hostname/$log_dir/"
 }
 
 # Update MinGW-w64
@@ -105,6 +105,6 @@ $time_stamp = get-date -format "yyyy-MM-dd HH:mm:ss"
 bash-command -command "echo Build Ended $time_stamp >> $log_unix"
 # Copy the transcript and installer to the download server and delete them.
 if ($hostname) {
-    bash-command -command "scp $log_unix $hostname/$log_dir/"
-    bash-command -command "scp $target_unix/gnucash*setup.exe $hostname/master"
+    bash-command -command "scp -p $log_unix $hostname/$log_dir/"
+    bash-command -command "scp -p $target_unix/gnucash*setup.exe $hostname/master"
 }



Summary of changes:
 buildserver/build_package.ps1 | 22 +++++++++++++++++-----
 bundle-mingw64.ps1            | 16 ++++++++++++++--
 gnucash.modules               | 33 +++++++++++++++++++++++++++------
 jhbuildrc.in                  | 25 ++++++++++++++++++++-----
 setup-mingw64.ps1             |  3 +++
 5 files changed, 81 insertions(+), 18 deletions(-)



More information about the gnucash-changes mailing list