[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
MSVC compiler support [patch 27]: OCTAVE_HOME
From: |
Michael Goffioul |
Subject: |
MSVC compiler support [patch 27]: OCTAVE_HOME |
Date: |
Tue, 17 Oct 2006 21:58:10 +0200 |
User-agent: |
Thunderbird 1.5.0.7 (Windows/20060909) |
Defines OCTAVE_HOME automatically, allowing the full installed package to be
relocated in another directory
Index: src/octave.cc
===================================================================
RCS file: /cvs/octave/src/octave.cc,v
retrieving revision 1.226
diff -p -c -r1.226 octave.cc
*** src/octave.cc 15 Sep 2006 14:34:57 -0000 1.226
--- src/octave.cc 17 Oct 2006 11:07:42 -0000
*************** octave_main (int argc, char **argv, int
*** 505,510 ****
--- 505,521 ----
{
octave_env::set_program_name (argv[0]);
+ #ifdef _MSC_VER
+ char buffer[1024];
+ if (GetModuleFileName(NULL, buffer, 1024) > 0)
+ {
+ std::string exec_dir = buffer;
+ int pos = exec_dir.rfind("\\bin\\");
+ if (pos != NPOS)
+ octave_env::putenv(std::string("OCTAVE_HOME"), exec_dir.substr(0, pos));
+ }
+ #endif
+
octave_program_invocation_name = octave_env::get_program_invocation_name ();
octave_program_name = octave_env::get_program_name ();
- MSVC compiler support [patch 22]: mx-op-defs additional macros, (continued)
- MSVC compiler support [patch 25]: INFINITE, Michael Goffioul, 2006/10/17
- MSVC compiler support [patch 25]: INFINITE, John W. Eaton, 2006/10/25
- MSVC compiler support [patch 24]: strftime crash, Michael Goffioul, 2006/10/17
- MSVC compiler support [patch 24]: strftime crash, John W. Eaton, 2006/10/25
- MSVC compiler support [patch 24]: strftime crash, John W. Eaton, 2006/10/25
- MSVC compiler support [patch 26]: MinGW code share, Michael Goffioul, 2006/10/17
- MSVC compiler support [patch 26]: MinGW code share, John W. Eaton, 2006/10/25
- MSVC compiler support [patch 27]: OCTAVE_HOME,
Michael Goffioul <=
- Re: MSVC compiler support [patch 27]: OCTAVE_HOME, David Bateman, 2006/10/17
- Re: MSVC compiler support [patch 27]: OCTAVE_HOME, Michael Goffioul, 2006/10/17
- Re: MSVC compiler support [patch 27]: OCTAVE_HOME, Michael Goffioul, 2006/10/18
- Re: MSVC compiler support [patch 27]: OCTAVE_HOME, John W. Eaton, 2006/10/24
- MSVC compiler support [patch 28]: setvbuf crash, Michael Goffioul, 2006/10/17
- MSVC compiler support [patch 28]: setvbuf crash, John W. Eaton, 2006/10/25
- MSVC compiler support [patch 29]: Backslash in path, Michael Goffioul, 2006/10/17
- MSVC compiler support [patch 29]: Backslash in path, John W. Eaton, 2006/10/27
- MSVC compiler support [patch 30]: Help MSVC with templates, Michael Goffioul, 2006/10/17
- MSVC compiler support [patch 30]: Help MSVC with templates, John W. Eaton, 2006/10/26