This is the mail archive of the cygwin-xfree@sources.redhat.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

[NEdit Win32] locale C error now fixed !!!!



Hi to all Win32 Nedit fans (and others too ;-)!!!

After some hours alone front of my Windows machine I've finally fixed
the problem of the now infamous "NEdit: Xlib: locale C not supported"
error.

I checked some test cases and found the reason.
I don't know if I can fix it in all cases but what I know is that I
understand it and can reproduce it too.
On my 2 boxes (office and home) I installed all the xfree libs. So This
fixed indvertantly the problem and make me crazy during the debug.
If you didn't install the X developer package,	you got
the error.
If you install the local lib everywhere without taking into account the
mounted file system, you got the error.

So ...
The problem had nothing to do with the nedit/cygwin/X binaries (so it's
not a bug ;-)  but it's due to an incomplete installation.

It's a problem of file system mount combined with a problem to locate
the locale directory.... !!!
yes !!! you need to have the locale directories in the right place for
Xlibs,
ie /usr/X11r6/lib/X11/locale.
If you try to point this local directory by setting the C_LOCALE or
X_LOCALE without mounting a file system, it doesn't work.
And if you install all the cygwin+Xfree distribution you fix the
problem.


Now, here's how to fix	this problem and make I think a correct
installation

Please read the whole document before doing some installation.

***** X server

First of all, do not forget to install the X server ;-))

* If you use Exceed as Xserver, may be a copy of the locale directory in
the right place
  must fix the problem. If not , check the mount (see below) to see if
it suits the right place.
 Please let me know.

***** Download locations :

- NEdit :
 sources or distribution from ftp.nedit.org/pub/v5_1_1/executables
- Cygwin :
 select a mirror at sources.redhat.com/cygwin/mirrors.html
 then connect and go to the cygwin directories.

 To download the minimal (dll+basic commands) :
 ==> latest/cygwin/cygwin-1.1.4.tar.gz

 To install it :
 create a directory in c:\nedit
 gunzip|tar the file in this directory.

 You can download the latest/bzip2/bzip2.tar.gz file (compress utiliy)

 To download the complete distribution
 ==> latest/*
 ==> contrib/*
 To install it :
 Run the latest/setup.exe.


- Xfree :
 On the same mirror (;-) go into the xfree/xc-4-binaries directory.

 You can download all the tar files if you want to install and run Xfree

 (only on NT, not on Windows9x)

 For the minimal installation of NEdit/cygwin, you need to download :
  xfree86-4.0-DLLs.tar.bz2   (1Mb)
  xfree86-4.0-devel.tar.bz2  (5.7Mb)

 If you downloaded the complete cygwin distrib. and if you don't want to
run the
  Xfree server but want to have a correct X installation , I recommend
to download
  the 2 previous files listed above plus these ones:
  xfree86-4.0-Prog.tar.bz2
  xfree86-4.0-Xterm.tar.bz2

 The ftp site contains a contrib dir  (xfree/contrib) where you can find

 interesting tools.

 All these package are zipped with the bz2 tools.
 See below to download it. If you want to install all, you can install
first the
 cygwin distribution. The bz2 tools are included into it.

- LessTif

 Download the latest source from www.lesstif.org.

*** The Full Distribution :

I recommend this installation because you can use or compile nedit and
many other tools on
 your win box (cvs, htdig, perl ...).

- Install all the cygwin tools
- Install the xfree binaries.
- Configure and compile lesstif (really long.... on a PIII/500 ;-)))
- Want to compile Nedit ? :
 Download the nedit sources.
 At these step, you need to check the cygwin makefile.
 Edit it (with vim ;-) (makefiles/Makefile.cygwin)
 Check that the makefile doesn't contain the -lm parameters into the
LIBS settings
 (it causes a coredump) and add -I and -L parameters in order to help
gcc to find
 the include and libraries files for lesstif if you installed it
 elsewhere than in /usr/X11R6 (The default install dir of lesstif is
/usr/local/LessTiff/)
 Compile it. From the top directorie of your nedit install. run the
command :
  make cygwin
   It should compile without any problem.
- Don't want ?
 Download the nedit<version>-win32 into your home directory.

- Install the nedit and nc binaries somewhere in your $path.

- Check that the FS mount is correct with the "mount" command (it should
be).
	If you see a line that contains something like that :
	  c:\cygnus  /	user binmode
	it's ok. If not, you need to mount the file system.
 To proceed, type this command :
 mount -f c:/cygnus /	  (the c:/...... is the correct form for mount)
 then verify the mount

And have fun with your favorite editor

*** The minimal Distribution :

- Create a c:\nedit directory.
- Untar the cygwin dll, the xfree dlls and  developer packages into
nedit.
- Untar the nedit<version>-win32  distribution into the nedit directory.

- Move the nedit.exe and nc.exe to c:\nedit\usr\bin\X11R6\bin
- Mount the / file system. To proceed, open a dos window then type :

 cd c:\nedit\usr\bin\
 mount c:/nedit /

It should be ok now !!
Try it using nedit.bat.
You can use the shortcuts for a quick acces to nedit.

**** Disabling the locale settings

The problem with the 2 previous solutions is that you need to download a
lot of
files and some of these are really huge for a low band internet
connexion?
And the best crazy  is that you need to download the whole developer
package (30 Mb)
to use only, in the minimal distribution, few kbytes...

The third solution is to disable the Xlocale settings in NEdit.
I don't know what problem this could cause (a Xlocale guru here ?)

So I compiled NEdit with the NO_XMIM parameter (as somebody suggested
on the list few weeks ago). I tested it and it works fine, without the
need
of a any mount neither the Xfree dev package.

To install it :

- Create a c:\nedit directory
- Install the nedit<version>-win32-noxmim distribution into this
directory.
- Install the cygwin dll and X binaries in the same directory (keep the
directory structure).
- Move the nedit.exe and nc.exe to c:\nedit\usr\bin\X11R6\bin

**** Accessing the discs

To access to all your drives, mount them with the command
	 mount <drive letter>: /<drive letter>	ex mount -f a: /a

You have to do this only once for each drive.

In the example above, you can now access on the floppy from your
 editor with /a/<file name>.

**** Testing

I hope that the "locale" error is no more a problem.
I test this only at home on Windows98.
But I think that the win32 doesn't matter and it should work on win NT
too (hope so)

I need some feed back from testers. Please feel free to test one of
these
installation and let us know as quickly as possible if you have some
problems or if it works fine.
If this is ok, I'll modify the win32 page @ nedit.org.

**** Remarks

For the future, I don't know if we must provide 2 versions, the minimal
with the NO_XMIM flag on, the other without it. Any opinion ?
Another question : I don't know the exact policy but is it possible to
distribute only the locale lib instead of the entire develop Package ?.

And now, the challenge .... who will be the 1st to develop and publish
the DOS and C# patterns ? ;-))))

Have fun !!

Christian.
Webmaster of Nedit.org



---------------------------------------------------------
This message sent using EMUmail -- http://www.emumail.com
---------------------------------------------------------

Jumping through hoops to get E-mail on the road? 
You've got two choices: Join the circus, or use MollyMail.

Molly Mail -- http://www.mollymail.com



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]