gnucash-on-windows master: Multiple changes pushed
John Ralls
jralls at code.gnucash.org
Tue Sep 5 14:58:20 EDT 2017
Updated via https://github.com/Gnucash/gnucash-on-windows/commit/bd1eaef3 (commit)
via https://github.com/Gnucash/gnucash-on-windows/commit/00f68689 (commit)
from https://github.com/Gnucash/gnucash-on-windows/commit/b28c08b3 (commit)
commit bd1eaef37abdcb773e8f6e88a570a9a6596e47f3
Author: John Ralls <jralls at ceridwen.us>
Date: Tue Sep 5 11:57:46 2017 -0700
Replace hard-coded 'c:/gcdev64/msys2' with .
diff --git a/gnucash.modules b/gnucash.modules
index e6f2906..d070b7d 100644
--- a/gnucash.modules
+++ b/gnucash.modules
@@ -275,7 +275,7 @@
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_PREFIX_PATH=c:/gcdev64/msys2 -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"
+ 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"/>
diff --git a/jhbuildrc.in b/jhbuildrc.in
index 2135ac3..83796f7 100644
--- a/jhbuildrc.in
+++ b/jhbuildrc.in
@@ -51,6 +51,7 @@ add_to_path_var('PATH', os.path.join(_basedir, 'msys2', 'mingw32', '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"
commit 00f68689bad5972ec2e24502309997fbdec4e026
Author: John Ralls <jralls at ceridwen.us>
Date: Tue Sep 5 11:51:48 2017 -0700
Patch CMake's FindSWIG.cmake to allow us to set a search prefix.
diff --git a/patches/FindSWIG.patch b/patches/FindSWIG.patch
new file mode 100644
index 0000000..81043ae
--- /dev/null
+++ b/patches/FindSWIG.patch
@@ -0,0 +1,12 @@
+ diff -u /mingw32/share/cmake-3.9/Modules/FindSWIG.cmake~ /mingw32/share/cmake-3.9/Modules/FindSWIG.cmake
+--- /mingw32/share/cmake-3.9/Modules/FindSWIG.cmake~ 2017-08-10 06:36:32.000000000 -0700
++++ /mingw32/share/cmake-3.9/Modules/FindSWIG.cmake 2017-09-05 10:34:59.692229400 -0700
+@@ -41,7 +41,7 @@
+ endif()
+ else()
+ string(REGEX REPLACE "[\n\r]+" ";" SWIG_swiglib_output ${SWIG_swiglib_output})
+- find_path(SWIG_DIR swig.swg PATHS ${SWIG_swiglib_output} NO_CMAKE_FIND_ROOT_PATH)
++ find_path(SWIG_DIR swig.swg PATHS ${SWIG_swiglib_output})
+ if(SWIG_DIR)
+ set(SWIG_USE_FILE ${CMAKE_CURRENT_LIST_DIR}/UseSWIG.cmake)
+ execute_process(COMMAND ${SWIG_EXECUTABLE} -version
diff --git a/setup-mingw64.ps1 b/setup-mingw64.ps1
index bc9ae5e..908d5aa 100644
--- a/setup-mingw64.ps1
+++ b/setup-mingw64.ps1
@@ -104,12 +104,12 @@ function bash-command() {
write-host "Shell program not found, aborting."
return
}
-# write-host "Running bash command ""$command"""
+ 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
}
function make-unixpath([string]$path) {
- $path -replace "^([A-Z]):", '/$1' -replace "\\", '/'
+ $path -replace "^([A-Z]):", '/$1' -replace "\\", '/' -replace "//", '/' -replace "\(", '\(' -replace "\)", '\)' -replace " ", '\ '
}
# Install MSYS2 for the current machine's architechture.
@@ -223,15 +223,21 @@ Write-Host @"
Next we'll install the HTML Help Workshop includes and libraries into our MinGW directory.
"@
-if (!$installed_hh) {
- $installed_hh = get-item -path "hkcu:\SOFTWARE\Microsoft\HTML Help Workshop" | foreach-object{$_.GetValue("InstallDir")}
+if (!(test-path -path "$target_dir/msys2/$mingw_path/include/htmlhelp.h")) {
+ if (!$installed_hh) {
+ $installed_hh = get-item -path "hkcu:\SOFTWARE\Microsoft\HTML Help Workshop" | foreach-object{$_.GetValue("InstallDir")}
+ }
+ $target_unix = make-unixpath -path $target_dir
+ $installed_hh = make-unixpath -path $installed_hh
+ bash-command -command "cp $installed_hh/include/htmlhelp.h $mingw_path/include"
+
+ bash-command -command "$mingw_bin/gendef $hhctrl_ocx - > $mingw_path/lib/htmlhelp.def"
+ bash-command -command "$mingw_bin/dlltool -k -d $mingw_path/lib/htmlhelp.def -l $mingw_path/lib/libhtmlhelp.a"
+ if (!(test-path -path "$target_dir/msys2/$mingw_path/include/htmlhelp.h")) {
+ Write-Host "HTML Help Workshop isn't correctly installed."
+ exit
+ }
}
-$installed_hh = make-unixpath -path $installed_hh
-bash-command -command "cp '$installed_hh/include/htmlhelp.h' '$mingw_path/include'"
-
-bash-command -command "$mingw_bin/gendef $hhctrl_ocx - > $mingw_path/lib/htmlhelp.def 2>> /errors"
-bash-command -command "$mingw_bin/dlltool -k -d $mingw_path/lib/htmlhelp.def -l $mingw_path/lib/libhtmlhelp.a >> /errors 2>&1"
-
Write-Host @"
Clone the gnucash-on-windows repository into the target source directory, patch jhbuild to disable its DESTDIR dance and set up jhbuildrc with our prefixes.
@@ -248,7 +254,8 @@ if (!(test-path -path "$target_dir\\src\\gnucash-on-windows.git")) {
exit
}
-bash-command -command "$mingw_bin/patch < $target_dir/src/gnucash-on-windows.git/patches/jhbuild.patch"
+bash-command -command "$mingw_bin/patch -i $target_dir/src/gnucash-on-windows.git/patches/jhbuild.patch"
+bash-command -command "$mingw_bin/patch -i $target_dir/src/gnucash-on-windows.git/patches/FindSWIG.patch"
$target_unix = make-unixpath $target_dir
$download_unix = make-unixpath $download_dir
Summary of changes:
gnucash.modules | 2 +-
jhbuildrc.in | 1 +
patches/FindSWIG.patch | 12 ++++++++++++
setup-mingw64.ps1 | 29 ++++++++++++++++++-----------
4 files changed, 32 insertions(+), 12 deletions(-)
create mode 100644 patches/FindSWIG.patch
More information about the gnucash-changes
mailing list