octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: dirty but most simple method by which pkg install will be successful


From: John W. Eaton
Subject: Re: dirty but most simple method by which pkg install will be successful in mingw octave
Date: Wed, 07 Nov 2007 15:28:55 -0500

On  7-Nov-2007, David Bateman wrote:

| Tatsuro MATSUOKA wrote:
| > Hi
| >
| > This is Tatsuro.
| >
| > Perhaps Benjamin's binary appear in the near future.
| >
| > I fount that dirty but most simple method by which pkg install will be 
successful in mingw octave.
| >
| > That is modify  DEFUN filesep in dirfns.cc
| >
| > DEFUN (filesep, args, ,
| >   "-*- texinfo -*-\n\
| > @deftypefn {Built-in Function} {} filesep ()\n\
| > Return the system-dependent character used to separate directory names.\n\
| > @seealso{pathsep, dir, ls}\n\
| > @end deftypefn")
| > {
| >   octave_value retval;
| >
| >   if (args.length () == 0)
| >     retval = "/"; /*retval = file_ops::dir_sep_str; */ /* Dirtty hack for 
msys */
| >   else
| >     print_usage ();
| >
| >   return retval;
| > }
| >
| >
| >     retval = "/"; /*retval = file_ops::dir_sep_str; */ /* Dirtty hack for 
msys */
| >
| > This is the most dirty but simple solution.
| >
| >
| > octave.exe:12> pkg prefix 
C:/Programs/msys/1.0/local/octave-2.9.16/octave-forge/main
| > C:/Programs/msys/1.0/local/octave-2.9.16/octave-forge/main
| > ans = C:\Programs\msys\1.0\local\octave-2.9.16\octave-forge\main
| > octave.exe:13>
| > octave.exe:13>
| > octave.exe:13>
| > octave.exe:13> cd 
C:/progra~1/cygwin/opt/octave/octave-forge-bundle-20071014/main
| > octave.exe:14>
| > octave.exe:14> pkg install -local io-1.0.3.tar.gz
| > octave.exe:15> pkg list
| > Package Name  | Version | Installation directory
| > --------------+---------+-----------------------
| >           io *|   1.0.3 | .../io-1.0.3
| >
| >
| > However, in this patch the Octave should be exectuted on the msys shell.
| >
| > Tatsuro
| >
| >
| > --------------------------------------
| > Easy + Joy + Powerful = Yahoo! Bookmarks x Toolbar
| > http://pr.mail.yahoo.co.jp/toolbar/
| >
| >
| >   
| If this is the case then mingw should by default have a filesep
| character of "/" and not "\". This is a bit strange, but in that case
| the solution is to modify the section
| 
| #if defined (__WIN32__) && ! defined (__CYGWIN__)
| #define OCTAVE_HAVE_WINDOWS_FILESYSTEM 1
| #elif defined (__CYGWIN__)
| #define OCTAVE_HAVE_WINDOWS_FILESYSTEM 1
| #define OCTAVE_HAVE_POSIX_FILESYSTEM 1
| #else
| #define OCTAVE_HAVE_POSIX_FILESYSTEM 1
| #endif
| 
| of configure.in to read
| 
| #if defined (__WIN32__) && ! defined (__CYGWIN__) && ! defined (__MINGW32__)
| #define OCTAVE_HAVE_WINDOWS_FILESYSTEM 1
| #elif defined (__CYGWIN__) || defined (__MINGW32__)
| #define OCTAVE_HAVE_WINDOWS_FILESYSTEM 1
| #define OCTAVE_HAVE_POSIX_FILESYSTEM 1
| #else
| #define OCTAVE_HAVE_POSIX_FILESYSTEM 1
| #endif
| 
| and then the filesep character on mingw will be treated in the same
| manner as for cygwin. Patch attached. Can you try this and see if it helps..

I don't understand why this is needed.  As far as I know, Windows
should not care whether the directory separator is \ or /.  So what is
rejecting \ on a Windows system?  If it is Octave, then we should fix
it so that either \ or / will work.  I don't think the correct
solution can be to change the default file separator to /.

jwe


reply via email to

[Prev in Thread] Current Thread [Next in Thread]