gnucash-on-windows master: Multiple changes pushed
John Ralls
jralls at code.gnucash.org
Sun Apr 15 15:40:13 EDT 2018
Updated via https://github.com/Gnucash/gnucash-on-windows/commit/8c36cd56 (commit)
via https://github.com/Gnucash/gnucash-on-windows/commit/a95d39fd (commit)
from https://github.com/Gnucash/gnucash-on-windows/commit/be60b1bf (commit)
commit 8c36cd56868ace10b2cc002de20a6b269b7c921d
Author: John Ralls <jralls at ceridwen.us>
Date: Sun Apr 15 11:52:14 2018 -0700
Bug 793461 - Transaction matcher window blank when importing QFX
Bob Fewell's patch for Mingw-w64's misbehaving mkstemp.
diff --git a/gnucash.modules b/gnucash.modules
index d81c8b5..859157b 100644
--- a/gnucash.modules
+++ b/gnucash.modules
@@ -223,7 +223,9 @@
<autotools id="libofx" autogen-sh='autoreconf'>
<branch repo="sourceforge" module="libofx/libofx-0.9.10.tar.gz"
- version="0.9.10"/>
+ version="0.9.10">
+ <patch file="https://raw.githubusercontent.com/Gnucash/gnucash-on-windows/master/patches/libofx-tempfile.patch" strip='1'/>
+ </branch>
<dependencies>
<dep package="OpenSP"/>
</dependencies>
diff --git a/patches/libofx-tempfile.patch b/patches/libofx-tempfile.patch
new file mode 100644
index 0000000..c67198b
--- /dev/null
+++ b/patches/libofx-tempfile.patch
@@ -0,0 +1,60 @@
+--- a/lib/ofx_preproc.cpp 2013-04-17 20:09:11 +0000
++++ b/lib/ofx_preproc.cpp 2013-10-14 09:00:31 +0000
+@@ -109,11 +109,15 @@ int ofx_proc_file(LibofxContextPtr ctx, const char * p_filename)
+ }
+
+ mkTempFileName("libofxtmpXXXXXX", tmp_filename, sizeof(tmp_filename));
+
+ message_out(DEBUG, "ofx_proc_file(): Creating temp file: " + string(tmp_filename));
++#ifdef OS_WIN32
++ tmp_file_fd = mkstemp_win32(tmp_filename);
++#else
+ tmp_file_fd = mkstemp(tmp_filename);
++#endif
+ if (tmp_file_fd)
+ {
+ tmp_file.open(tmp_filename);
+ if (!tmp_file)
+ {
+@@ -308,11 +312,11 @@ int ofx_proc_file(LibofxContextPtr ctx, const char * p_filename)
+ #ifdef HAVE_ICONV
+ size_t inbytesleft = strlen(s_buffer.c_str());
+ size_t outbytesleft = inbytesleft * 2 - 1;
+ iconv_buffer = (char*) malloc (inbytesleft * 2);
+ memset(iconv_buffer, 0, inbytesleft * 2);
+-#if defined(OS_WIN32) || defined(__sun)
++#if defined(__sun)
+ const char * inchar = (const char *)s_buffer.c_str();
+ #else
+ char * inchar = (char *)s_buffer.c_str();
+ #endif
+ char * outchar = iconv_buffer;
+--- a/lib/win32.cpp Wed Mar 30 15:30:50 2011
++++ b/lib/win32.cpp Sun Mar 29 15:07:27 2015
+@@ -25,11 +25,11 @@
+
+
+
+ #ifdef OS_WIN32
+
+-int mkstemp(char *tmpl)
++int mkstemp_win32(char *tmpl)
+ {
+ int fd = -1;
+ int len;
+ char *nf;
+ int i;
+--- a/lib/win32.hh Wed Mar 30 15:30:50 2011
++++ b/lib/win32.hh Sun Mar 29 16:26:58 2015
+@@ -21,11 +21,11 @@
+ #endif
+
+
+ #ifdef OS_WIN32
+
+-int mkstemp(char *tmpl);
++int mkstemp_win32(char *tmpl);
+
+
+ #endif
+
commit a95d39fd8766453d9a7e163cd8a2468cd894b09f
Author: John Ralls <jralls at ceridwen.us>
Date: Sun Apr 15 11:28:51 2018 -0700
Only bundle the gtk30 and iso_4217 message catalogs from mingw32.
The others aren't needed.
diff --git a/bundle-mingw64.ps1 b/bundle-mingw64.ps1
index bac7a5f..bc9616e 100644
--- a/bundle-mingw64.ps1
+++ b/bundle-mingw64.ps1
@@ -147,6 +147,21 @@ $target_schema_unix = make-unixpath -path $target_schema_dir
$schema_compiler = make-unixpath -path "$mingw_dir\bin\glib-compile-schemas"
bash-command("$schema_compiler $target_schema_unix")
+
+# Inno-setup isn't able to easily pick out particular message catalogs from $mingw_dir/share/locale, so copy the ones we want to $inst_dir\share\locale.
+
+$source_locale_dir = "$mingw_dir\share\locale\"
+$inst_locale_dir = "$inst_dir\share\locale"
+foreach ($msgcat in "gtk30.mo","iso_4217.mo") {
+ foreach ($dir in get-childitem -Directory $source_locale_dir) {
+ $source_path = "$source_locale_dir\$dir\LC_MESSAGES"
+ $inst_path = "$inst_locale_dir\$dir\LC_MESSAGES"
+ if ((test-path $source_path) -and (test-path "$source_path\$msgcat") -and (test-path $inst_path)) {
+ copy-item "$source_path\$msgcat" -Destination $inst_path -recurse
+ }
+ }
+}
+
write-host "Running Inno Setup to create $final_file."
if (test-path -path $setup_result) {
diff --git a/inno_setup/gnucash-mingw64.iss b/inno_setup/gnucash-mingw64.iss
index 0c137ce..e4f8d0c 100644
--- a/inno_setup/gnucash-mingw64.iss
+++ b/inno_setup/gnucash-mingw64.iss
@@ -209,7 +209,6 @@ Source: "@MINGW_DIR@\lib\postgresql\*.dll"; DestDir: "{app}\lib\postgreql"; Comp
Source: "@MINGW_DIR@\lib\sqlite3.21.0\sqlite3210.dll"; DestDir: "{app}\lib\sqlite3.21.0"; Components: main
Source: "@MINGW_DIR@\share\icons\*"; DestDir: "{app}\share\icons"; Flags: recursesubdirs; Components: main
-Source: "@MINGW_DIR@\share\locale\*"; Destdir: "{app}\share\locale"; Flags: recursesubdirs; Components: main
Source: "@MINGW_DIR@\share\themes\*"; DestDir: "{app}\share\themes"; Flags: recursesubdirs; Components: main
Source: "@MINGW_DIR@\share\xml\iso-codes\*"; DestDir: "{app}\share\xml\iso-codes"; Flags: recursesubdirs; Components: main
Source: "@MINGW_DIR@\share\xml\fontconfig\*"; DestDir: "{app}\share\xml\fontconfig"; Flags: recursesubdirs; Components: main
Summary of changes:
bundle-mingw64.ps1 | 15 +++++++++++
gnucash.modules | 4 ++-
inno_setup/gnucash-mingw64.iss | 1 -
patches/libofx-tempfile.patch | 60 ++++++++++++++++++++++++++++++++++++++++++
4 files changed, 78 insertions(+), 2 deletions(-)
create mode 100644 patches/libofx-tempfile.patch
More information about the gnucash-changes
mailing list