Hi Martin,

also, das erste Patch "On windows, lookup prefix instead of only bindir.", 
r1374 und nochmal unten, ist aus meiner Sicht notwendig wenn man eine "make 
install" Installation auf Windows von gwenhywfar-aq3 macht. Eine derartige 
Installation ist zum Beispiel auch das, was wir im gnucash-Binary mit 
gwenhywfar2 seit mittlerweile einem guten Jahr praktizieren. Da ist es 
insbesondere auch wünschenswert, das binary unterhalb von bin/ zu haben, weil 
natürlich im toplevel-gnucash-prefix möglichst wenig nicht-gnucash 
herumliegen sollte. Aber auch sonst hat sich da eigentlich gezeigt, 
dass "make install" genau das erreicht, was wir von einer library so 
brauchten. Und man bleibt halt konsistent zu dem, was auf Linux sich schon 
lange genug eingebürgert hat. 

Deswegen ist also mein Vorschlag, dass PathManager_AddRelPath sich auf Windows 
genauso verhalten möge wie auf Linux (dokumentiert war ein gewollter 
Unterschied zumindest nicht), und untenstehendes Patch erreicht genau das.

Gruß

Christian


git-svn-id: https://devel.aqbanking.de/svn/gwenhywfar/branches/[EMAIL 
PROTECTED] 
70169cfe-8b10-0410-8925-dcb4b91034d8
---
 src/base/pathmanager.c |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/src/base/pathmanager.c b/src/base/pathmanager.c
index 1b9bab5..9c6fc02 100644
--- a/src/base/pathmanager.c
+++ b/src/base/pathmanager.c
@@ -227,6 +227,7 @@ int GWEN_PathManager_AddRelPath(const char *callingLib,
     char *p;
     GWEN_BUFFER *buf;
 
+    /* Get the absolute path to the executable, including its name */
     rv=GetModuleFileName(NULL, cwd, sizeof(cwd)-1);
     if (rv==0) {
       DBG_ERROR(GWEN_LOGDOMAIN,
@@ -235,10 +236,21 @@ int GWEN_PathManager_AddRelPath(const char *callingLib,
       return GWEN_ERROR_IO;
     }
 
+    /* Find the last DIRSEP and set it to NULL so that we now have the
+       bindir. */
     p=strrchr(cwd, '\\');
     if (p) {
       *p=0;
     }
+
+    /* Find again the last DIRSEP; set it to NULL so that we now have
+       the prefix. */
+    p=strrchr(cwd, '\\');
+    if (p) {
+      *p=0;
+    }
+
+    /* And append the given subdirectory to that prefix. */
     buf=GWEN_Buffer_new(0, 256, 0, 1);
     GWEN_Buffer_AppendString(buf, cwd);
     if (*pathValue!=DIRSEP_C)
-- 
1.5.3.4.206.g58ba4


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Aqbanking-devel mailing list
Aqbanking-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/aqbanking-devel

Reply via email to