Announcement

Collapse
No announcement yet.

Linux Compile Help

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #16
    Originally posted by golden_boy View Post
    Uhhh. Why are you trying to build svgalib proquake? Nobody uses that anymore.

    winquake = quake.x11
    glquake = quake.glx (or similar)

    SVGAlib is like Dosquake!

    Try to compile proquake.x11 or whatever that is called. On $ubuntu, which is debian, you will probably need the X11 or xorg development packages installed. I have no problem compiling PQ 3.50 for X11, so try starting there?

    You have gcc installed right?

    which gcc
    gcc --version (or gcc -v)
    make

    should all give some reasonable output. You should do all this as root (root = administrator).

    Look at the Makefile and try to figure that out (there is one, right?)

    To compile, you should just need to make your code changes, adjust the Makefile targets if you added/removed any files, and then run "make".

    There is no configure script for any Quake engine that I'm aware of, just Makefiles. Configure scripts autoconfigure Makefiles, but in Quake's case you'll have to do that by hand (easier IMHO).

    If the Makefile provides for an "install" target, you can do "make install" and your stuff will get installed to /usr/local or whatever. You probably don't want that. You just want the executables, which you'll then drop into your Quake dir. To start over fresh, do "make clean" which will delete all .o files etc.

    Do NOT change CFLAGS or the like in the Makefile!

    Just "make" is usually enough.

    cd proquake-blah
    make

    -> read error messages, correct errors, then re-make.

    Hint: You should not use any Win-specific (nonstandard) C functions... Windows development software tends to insert those without further notice, which makes the resulting code non-crossplatform. Also look at #ifdef WIN32 and the like, or more exactly, missing #ifdefs... look at Joequake and Tyrquake if you have doubts.

    Once it compiles, grab the executable and dump it into the Quake folder. No installation necessary.

    You can e-mail me if you want, I'm rather busy so not checking here often. I'm myself hacking on an engine in Linux atm. I read my email often, unlike forums (apart from func_). I'd be glad to help and bugtest for you.
    Thanks. Yeah, I know next to nothing about desktop Linux so this has been a big help. I didn't know X11 was what I should be using, instead of svgalib.
    Quakeone.com - Being exactly one-half good and one-half evil has advantages. When a portal opens to the antimatter universe, my opposite is just me with a goatee.

    So while you guys all have to fight your anti-matter counterparts, me and my evil twin will be drinking a beer laughing at you guys ...

    Comment


    • #17
      Originally posted by Baker View Post
      Thanks. Yeah, I know next to nothing about desktop Linux so this has been a big help. I didn't know X11 was what I should be using, instead of svgalib.
      You never asked >.> I blame myself for not remembering that svgalib is crap.

      Comment


      • #18
        Originally posted by Canadian*Sniper View Post
        You never asked >.> I blame myself for not remembering that svgalib is crap.
        I'm such a noobster at desktop Linux that I don't know what to ask :d :d

        Seriously!

        But my commandline experience with it helps some, but I'm only familiar with things to the extent that one would be using SSH or telnet on Linux on a remote web site server.

        However, I have found the information in your various linux threads very helpful and I've read everything that GoldenBoy, Spirit and Mithril have posted.

        I'm getting close to getting on this. I have a short list of bugs in the Windows version I want to eliminate before I shift to this, but that list is getting very thin.
        Quakeone.com - Being exactly one-half good and one-half evil has advantages. When a portal opens to the antimatter universe, my opposite is just me with a goatee.

        So while you guys all have to fight your anti-matter counterparts, me and my evil twin will be drinking a beer laughing at you guys ...

        Comment


        • #19
          Off topic but.. Doesn't Baker have a job?!?! Where are you finding all this free time?

          Comment


          • #20
            Originally posted by Canadian*Sniper View Post
            Where are you finding all this free time?
            Sounds like you could use some time management expertise :d
            Quakeone.com - Being exactly one-half good and one-half evil has advantages. When a portal opens to the antimatter universe, my opposite is just me with a goatee.

            So while you guys all have to fight your anti-matter counterparts, me and my evil twin will be drinking a beer laughing at you guys ...

            Comment


            • #21
              If you want, you could give one of us a login on your linux machine and we could set up the makefiles to compile the right thing. Messing around with gcc/makefiles if you're new to linux can be very frustrating. I've configured the proquake makefile plenty of times now...I could even just send you the makefile I have for 3.50 and ideally you would just need to run "make" in that directory.

              But yeah sorry I should have mentioned not to use svgalib too....I assumed you knew what you were doing there
              "If we fight for money I'll stop hitting you when you ask me to. If we fight for honor, I'll stop hitting you when I feel like it." - Rickson Gracie

              Comment


              • #22
                I wasn't being very exact there, let me refine some of it.

                "make" is the command that runs the compiling process.

                You can either run it by hand, like "make -c -o blah.c" which will produce blah.o, or somewhat automate it.

                It's normally "automated" via a Makefile, which is located in the top level source directory, or there may be several Makefiles in bigger projects. The top-level one is normally the chief Makefile.

                Makefiles contain the exact commands that are fed to make, as well as targets (quake.x11, clean, etc) and lists of objects. The latter contain all the .c files that need to be compiled for the given target. Makefiles also contain info about build directories, compiler (gcc) and linker (ld) options and so forth.

                gcc is the C compiler, which is in turn being run by make when it goes through the Makefile and compiles all the stuff on the list. At the end, make calls the linker to put it all together into a newly created executable.

                make is run from the same directory that contains the top-level Makefile.

                You can directly pass it targets, like "make quake.x11". You make all targets by running "make all" (^^).

                Make (or more exactly, the compiler) will produce detailed error messages and warnings. These will contain the file, line number and function or variable where the error occurred.

                All those programs are well-documented; they have detailed manpages.

                man make
                man gcc

                The make program even autodetects code changes and only recompiles what's necessary, not the whole source.

                If make complains that some libraries or headers aren't found, you'll have to make sure the corresponding development packages are installed. Debian ($Ubuntu) doesn't come with this stuff by default. If you use that, Ubuntu/Debian forums will have some info on "how do I compile something".

                I use Gentoo, which is source-based, so for any package I install I automatically get the source code, no -dev packages necessary. :-) but *buntu is for a different target audience. Like Windows, it's not considered "normal" that users might compile programs... which if you look at it, is really the behaviour you would *expect* from Linux/BSD users :-D

                Hence you must install seperate packages if you want to do "development". IIRC they are called like xorg-dev (or x11-dev) and so forth. The package manager (aptitude ?) should list them.

                There are C IDEs, but if your resources are limited (and since the Proquake source is relatively tiny) I'd suggest just using text editors. $Ubuntuforum will have whole threads about which ones are good... For programming, you'll probably want something with tabs, cut/copy/paste and syntax highlighting.

                Scite, Nedit, and possibly Gedit (Gnome's own) are OK.

                Console editors are vim and emacs, which are a bit "old school" if you know what I mean. They have some learning curve... if you want to be productive instead of relearning text editors, try using a graphical editor with tabs like the above listed ones. You can have multiple files open and just copy and paste. Then you can run make from an xterm (terminal/console running in a window.)

                You'll figure it out quickly I guess.

                If you like, Gentoo forums have many knowledgeable users and there's heaps of info about this stuff. There are also some Ubuntu and FreeBSD people there and the community is always very helpful. Most of the discussion is more general Linux themed, not so much Gentoo specific. The subforum to look for is called "Portage and Programming."

                forums.gentoo.org

                There's a search function and mucho documentation elsewhere on the Gentoo page, which is largely distribution-independent. I'm not advertising the distro to you, just saying the community is superbly knowledgeable and helpful.

                Ubuntu forums are a bit more, shall we say, end-user oriented :-)

                One more info Baker, Linux is case-sensitive! Just so you know it, if you get "File not found" errors... look closely which file it wants, and check for upper/lowercase problems. "PAK0.PAK" and "pak0.pak" are not the same (well, of course not).

                There are bash scripts (bash is the typical shell aka terminal program) that can auto-lowercase files, even recursively, that can be useful. Forums and Google know more.

                I could even just send you the makefile I have for 3.50 and ideally you would just need to run "make" in that directory.
                Yes, (if he has the required stuff installed), except if he added or removed files, or added or removed #ifdefs that are called from the Makefile, or introduced new dependencies. He would have to adjust the Makefile then. But generally, yup.

                May I recommend looking at the Tyrquake Makefile, too.

                Baker, you can probably remove all svgalib code once you have it all up and running.

                Enough for the next four weeks, my fingers hurt. ;-)
                Scout's Journey
                Rune of Earth Magic

                Comment

                Working...
                X