gnucash-on-windows master: Multiple changes pushed

John Ralls jralls at code.gnucash.org
Sun Sep 10 18:14:47 EDT 2017


Updated	 via  https://github.com/Gnucash/gnucash-on-windows/commit/69df1e6b (commit)
	 via  https://github.com/Gnucash/gnucash-on-windows/commit/928d26e9 (commit)
	from  https://github.com/Gnucash/gnucash-on-windows/commit/9002a890 (commit)



commit 69df1e6b91b19b3de283d6ee80e42c0ed609ae76
Author: John Ralls <jralls at ceridwen.us>
Date:   Sun Sep 10 15:14:28 2017 -0700

    Separate the root and target directories passed to bundle-mingw64.ps1

diff --git a/buildserver/build_package.ps1 b/buildserver/build_package.ps1
index c120c81..f3f5522 100644
--- a/buildserver/build_package.ps1
+++ b/buildserver/build_package.ps1
@@ -108,7 +108,7 @@ 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
+    & $script_dir\bundle-mingw64.ps1 -root_dir $target_dir -target_dir $target_dir\$package\$branch -package $package -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"
diff --git a/bundle-mingw64.ps1 b/bundle-mingw64.ps1
index 169916a..b4d77e1 100644
--- a/bundle-mingw64.ps1
+++ b/bundle-mingw64.ps1
@@ -40,16 +40,13 @@ Optional. The root path to the build environment. Defaults to the root of the sc
 
 [CmdletBinding()]
 Param(
-  [Parameter()] [string]$target_dir,
-  [Parameter()] [bool]$git_build
+    [Parameter(Mandatory=$true)] [string]$root_dir,
+    [Parameter(Mandatory=$true)] [string]$target_dir,
+    [Parameter(Mandatory=$true)] [string]$package,
+    [Parameter(Mandatory=$true)] [bool]$git_build
 )
 
 $script_dir = Split-Path $script:MyInvocation.MyCommand.Path
-$root_dir = Split-Path $script_dir | Split-Path
-$package = "gnucash"
-if (!$target_dir) {
-    $target_dir = $root_dir
-}
 
 $progressPreference = 'silentlyContinue'
 
@@ -75,12 +72,12 @@ function version_item([string]$tag, [string]$path) {
 
 function bash-command() {
     param ([string]$command = "")
-    if (!(test-path -path $target_dir\msys2\usr\bin\bash.exe)) {
+    if (!(test-path -path $root_dir\msys2\usr\bin\bash.exe)) {
 	write-host "Shell program not found, aborting."
-	return
+	exit
     }
     #write-host "Running bash command ""$command"""
-    Start-Process -FilePath "$target_dir\msys2\usr\bin\bash.exe" -ArgumentList "-c ""export PATH=/usr/bin; $command""" -NoNewWindow -Wait
+    Start-Process -FilePath "$root_dir\msys2\usr\bin\bash.exe" -ArgumentList "-c ""export PATH=/usr/bin; $command""" -NoNewWindow -Wait
 }
 
 function make-unixpath([string]$path) {
@@ -105,13 +102,13 @@ $gwen_dir = version_item -tag "SO_EFFECTIVE " -path "$inst_dir\include\gwenhywfa
 # of backslashes is due to bash and sed eating them. It results in a
 # single backslash in the output file. Inno Setup doesn't understand
 # forward slashes as path delimiters.
-
+$root = %{$root_dir -replace "\\", "\\\\\\\\"}
 $target = %{$target_dir -replace "\\", "\\\\\\\\"}
 $script = %{$script_dir -replace "\\", "\\\\\\\\"}
 $issue_in = make-unixpath -path  $script_dir\inno_setup\gnucash-mingw64.iss
 $issue_out = make-unixpath -path $target_dir\gnucash.iss
 $proc = bash-command("sed  < $issue_in > $issue_out \
-  -e ""s#@MINGW_DIR@#$target\\\\\\\\msys2\\\\\\\\mingw$mingw_ver#g"" \
+  -e ""s#@MINGW_DIR@#$root\\\\\\\\msys2\\\\\\\\mingw$mingw_ver#g"" \
   -e ""s#@INST_DIR@#$target\\\\\\\\inst#g"" \
   -e ""s#@-gwenhywfar_so_effective-@#$gwen_ver#g"" \
   -e ""s#@-aqbanking_so_effective-@#$aqb_Dir#g"" \

commit 928d26e966b5c99e0aaaef4b5d9c3f496d397fea
Author: John Ralls <jralls at ceridwen.us>
Date:   Sun Sep 10 12:39:42 2017 -0700

    Rename the log files to indicate branch, matching the old scheme.

diff --git a/buildserver/build_package.ps1 b/buildserver/build_package.ps1
index 196b30e..c120c81 100644
--- a/buildserver/build_package.ps1
+++ b/buildserver/build_package.ps1
@@ -87,7 +87,7 @@ $log_dir = "build-logs"
 
 #Make sure that there's no running transcript, then start one:
 $time_stamp = get-date -format "yyyy-MM-dd-HH-mm-ss"
-$log_file = "$target_dir\gnucash-build-log-$time_stamp.log"
+$log_file = "$target_dir\build-$branch-$time_stamp.log"
 $log_unix = make-unixpath -path $log_file
 $time_stamp = get-date -format "yyyy-MM-dd HH:mm:ss"
 bash-command -command "echo Build Started $time_stamp > $log_unix"



Summary of changes:
 buildserver/build_package.ps1 |  4 ++--
 bundle-mingw64.ps1            | 21 +++++++++------------
 2 files changed, 11 insertions(+), 14 deletions(-)



More information about the gnucash-changes mailing list