This is the mail archive of the xconq7@sources.redhat.com mailing list for the Xconq project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Compiling win32 under Cygwin


Juergen - Thanks for the info!!  I had no idea I was using the wrong
headers.  I'm not at home right now, but I will be later today and will
try compiling using the correct includes et al.  I also built the
tcl/tk 8.4.1 sources (I think that's the version number... ) and
manually uninstalled the older sources (went through the tarball and
deleted everything, then recompiled and installed using the latest
sources)  I found different errors when I tried compiling against the
latest sources, but didn't have time to sort out what was going on.  I
suspect I was using the wrong headers again - I pointed them to the
xfree86 .h's, I believe.  I'll try compiling against this version of
tcl/tk and see if it works.

btw - what version of the cygwin api are you using?

Re: your install_win file, you should give yourself more credit when it
comes to your English :)  The text reads fine (to me) and is
straightforward and clear.  When I try doing a build later today I'll
follow these instructions, just to confirm the steps and see if there's
any newbie traps out there that haven't been addressed ;)

Thanks very much for the help.  I'll let you know how it goes later
today.


-best wishes,
-joe


--- Juergen Ruehle <j.ruehle@bmiag.de> wrote:
> Joe R writes:
> 
>  > So, I've been trying (as you know) to get XConq running in my env
> for -
>  > oh, three weeks now.  I've yet to actually start the game and have
> it
>  > run.  Honestly, all I want to do is play a game when I get home
> and not
>  > struggle with yet another make process and debugging (I have
> enough
>  > trouble at work).  Is there any way you could wrap everything -
> xconq,
>  > the tcl/tk libs & tclinit, images & game files, etc. - into one
> zip
>  > file?
> 
> Sorry that I didn't get to this earlier (being on an extended
> holiday), since I think I'm knowing what the problem is.
> 
> Attached is the half finished INSTALL-WIN document which should
> explain what went wrong with your built. In short the fact that you
> had to link in the X11 libraries indicates that the compilation
> picked
> up the wrong includes. You need the X11 includes used to compile the
> Tcl/Tk librarries itself (and are not included in the binary
> packages). While these have the same file and definition names (and
> therefore the built succeeds) these are incompatible to the current
> cygwin's X11R6 includes (therefore you get the crash in a macro
> expansion trying to access an X11 screen structure while you actually
> have a Tcl/Tk screen structure).
> 
> The cygwin part is basically finished, but will probably better if
> you
> can give it a cleanup (especially since you seem to be a native
> english speaker:-). It also contains the start of a VC guide, but
> that should be replaced by the materil provided by Stanley Sutton
> (since - other than myself - he actually seems to know something
> about
> VC:-).
> 
> I hope it helps. At least it works for me with the two Tcl/Tk
> versions
> mentioned in the guide. (The whole trick actually is the --x-includes
> switch on the configure command line which unfortunately configure
> can't deduce on its own; if it needs X11 libs than something went
> wrong.)
> 
> > BUILDING XCONQ ON WINDOWS FROM SOURCE
> 
> The xconq Tcl/Tk interface should run on most win32 based Systems
> (95, NT4.0 and
> up). Currently (as of 02/08/16) it doesn't build right out of the box
> but needs
> some minor tweaking. The following assumes you have downloaded and
> extracted the
> source on your system and are familiar with building software. Since
> the windows
> port isn't fully maintained, you might have to fix some problems
> yourself.
> 
> If you need further help, please contact the xconq mailing list on
> 'sources.redhat.com'.
> 
> NOTE: This document contains forward slashes as directory separators.
> 
> 1. Building with cygwin (Net Release)
> 
> 1.1 Install Cygwin
> 
> Install cygwin from http://sources.redhat.com/cygwin/ if you haven't
> done so
> already. You will at least need the 'cygwin', 'ash', 'gcc',
> 'binutils', and
> 'make' packages. You also need a Tcl/Tk package as explained in the
> next
> section.
> 
> 1.2 Install Tcl/Tk Headers and Libraries
> 
> IMPORTANT: read this carefully to improve the chance the xconq will
> actually
> build and run.
> 
> There are currently three cygwin packages containing Tcl/Tk
> libraries:
> 
>  - 'tcltk' (Version 20001125-1) contains Tcl/Tk Version 8.0
>  - 'gdb' (Version 20010428-3) also contains Tcl/Tk Version 8.0
>  - 'gdb' (Version 20020718-1) contains Tcl/Tk Version 8.3
> 
> If you don't want gdb grab the 'tcltk' package, otherwise install one
> of the
> 'gdb' packages.
> 
> NOTE: 'gdb' (20010428-3) contains exactly the same Tcl/Tk files as
> the 'tcltk'
> package. So - due to a quirk in the cygwin setup - if you install
> both and later
> deinstall one, it will delete the files, therefore you have to
> reinstall the
> remaining package.
> 
> Unfortunately the binary packages do not contain all required header
> files,
> namely Xlib.h and friends. These are only contained in the
> corresponding source
> packages. So download and install (or simply extract it somewhere)
> the
> appropriate source package.
> 
> It is important to use the header files that have been used to build
> the
> libraries since crucial functions are implemented as macros.
> Especially DO NOT
> use X11 headers (e.g. from one of the X11 packages). While the
> compile may
> succeed the resulting executable will most probably crash (within
> expanded macro
> code).
> 
> That said, it seems that the headers included in the 'tcltk' source
> package
> actually work with all three binary packages (even so the Tcl/Tk
> versions
> differ). This can significantly reduce download time, but YMMV.
> 
> 1.3 Configure
> 
> Make sure that there are no directories named 'tcl' or 'tk' in the
> xconq source
> directory. These are for the old cygwin beta releases. If they exist
> remove or
> rename them. You just need the directory named 'tcltk'.
> 
> Start a cygwin shell (e.g. /bin/sh.exe), cd to the directory where
> you extracted
> the source, and type
> 
>     ./configure --x-includes=<directory of the modified Tcl/Tk X
> includes>
> 
> This will try to guess the correct settings for your systems, select
> the Tcl/Tk
> X headers, and create Makefiles in the appropriate directories.
> 
> The correct X include directory is the one from the Tcl/Tk source
> containing an
> X11 sub directory that contains Xlib.h.
> 
> 1.4 Make
> 
> Run 'make' (in the xconq source directory). Fix any errors that might
> occur.
> This should produce 'win/xconq.exe'.
> 
> 2. Building xconq using MS Visual C++
> 
> 2.1 Get and install Tcl/Tk
> 
> ...
> 
> 2.2 Setup the project
> 
> Create a new project containing the following files:
> 
> ...
> 
> Change the settings as follows:
> 
> ...
> 
> 2.3 Compile
> 
> Start the compile. Fix any errors that occur.
> 
> 3. Running xconq
> 
> 'xconq.exe' should be runnable when copied to the top level xconq
> source
> directory. If it complains that it cannot find 'init.tcl' you have to
> set the
> 'TCL_LIBRARY' environment variable to the directory of the 'init.tcl'
> file (i.e.
> '/usr/share/tcl8.0'). If it cannot find other tcl scripts you should
> try to add
> them to the 'TCLLIBPATH' environment variable.
> 
> 4. Installing xconq
> 
> Currently not supported by the build system, but you can copy the
> executable and
> library directories to any directory you like and create a shortcut.
> You then
> probably have to provide the directory of the game library using
> command line
> parameter '-L <game library directory>'and possibly set TCLLIBPATH to
> the
> directory of the 'tkconq.tcl' script.
> 


__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com


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