[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
MSVC patch: define OCTAVE_HOME according to octinterp.dll location
From: |
Michael Goffioul |
Subject: |
MSVC patch: define OCTAVE_HOME according to octinterp.dll location |
Date: |
Thu, 4 Oct 2007 17:11:33 +0200 |
Hi,
The following patch defines OCTAVE_HOME according to octinterp.dll
location instead of executable. This allows for instance to load octinterp.dll
dynamically and execute octave_main, with still the octave path set
correctly.
Michael.
Index: src/sysdep.cc
===================================================================
RCS file: /cvs/octave/src/sysdep.cc,v
retrieving revision 1.131
diff -c -p -r1.131 sysdep.cc
*** src/sysdep.cc 30 Aug 2007 17:54:48 -0000 1.131
--- src/sysdep.cc 4 Oct 2007 15:02:15 -0000
*************** w32_set_octave_home (void)
*** 119,125 ****
while (true)
{
! int status = GetModuleFileName (0, &bin_dir[0], n);
if (status < n)
{
--- 119,126 ----
while (true)
{
! HMODULE hMod = GetModuleHandle("octinterp");
! int status = GetModuleFileName (hMod, &bin_dir[0], n);
if (status < n)
{
- MSVC patch: define OCTAVE_HOME according to octinterp.dll location,
Michael Goffioul <=