It seems that you're using an outdated browser. Some things may not work as they should (or don't work at all).
We suggest you upgrade newer and better browser like: Chrome, Firefox, Internet Explorer or Opera

×
I am trying to get Yamagi Quake 2 to work with OS X as the net claims this is the best way.... Allegedly... Of course, I run into problems at this "compile" step.

I have tried following the readme file, re-read it many times and once I get to the compile section, I am completely lost. I have no idea what to do to get this to work on OSX. The readme seems to leave a massive ton of important details out for a newbie like me. For example, it never says what to do with the downloaded 5.33 file from the Yamagi site. I guess I was supposed to extract it, but it doesn't say where. It talks about some sort of zip file, but doesn't say where it is. So, I found the file (I think) and extracted it (Still doesn't say where to extract it to) and found the Quake II executable. I show contents on it and copy the base2 files over (which doesn't make sense to me, but that is what the readme says). I try to then run the app and it comes up with the window to run the game. When I try to run the game at that point, the window disappears and nothing happens.

Would someone please help me with this? The directions really don't make sense to me and they aren't very clear. Thanks for any and all help from anyone who may know how to get Yamagi Quake 2 to work!
This question / problem has been solved by Johnny_Lawimage
OK you got me curious about this. Below is what I did step by step, on my Mac that is running El Capitan.

Having prebuilt binaries would be a lot nicer! If you want, I can later try to package up something and put it in my dropbox for a while. But the compiling did seem to turn out OK after a few hiccups.

Starting with part 3.2 of the readme, since I own retail Quake 2:

1) I downloaded [url=ftp://ftp.idsoftware.com/idstuff/quake2/q2-3.20-x86-full-ctf.exe]ftp://ftp.idsoftware.com/idstuff/quake2/q2-3.20-x86-full-ctf.exe[/url] as indicated by the readme. The id software FTP site is pretty slow and I'm sure you could get this more quickly from somewhere else, but I went ahead and used the official site.

2) I moved the file into a working directory named "quake2-temp" and cd'd into that directory.

3) This file is actually a self-extracting executable so I just did "unzip q2-3.20-x86-full-ctf.exe".

4) Next I removed "q2-3.20-x86-full-ctf.exe" and also removed all of the other files that step 3.2 of the readme says to remove.

5) I put the "pak0.pak" from my retail Quake 2 inside the new "quake2-temp/baseq2" folder. Same for my Quake 2 "video" directory, it also should be moved or copied into "quake2-temp/baseq2".

Now we have all the game data files that we'll need. For now we're only going to care about the "quake2-temp/baseq2" folder's contents, in a later step down below.

Skipping part 3.3 of the readme since I'm not working with the demo files...

Skipping part 3.4 for now, not going to worry about ctf or mission packs yet...

On to part 3.5:

1) I already have Xcode installed w/ tools.

2) I don't have brew installed yet on this Mac, so I opened an OS X terminal and did the installation command shown at the http://brew.sh/ site.

3) Next I ran the four brew invocations shown in the Yamagi readme, to install various libraries and headers.

4) I downloaded the latest Yamagi source from https://github.com/yquake2/yquake2/archive/QUAKE2_5_33.zip and unzipped it. This creates a "yquake2-QUAKE2_5_33" directory and lots of stuff inside that. It doesn't really matter where you put this directory.

5) cd into the "yquake2-QUAKE2_5_33" directory and enter the "make" command.

6) This doesn't work. I'm not sure what the best/correct fix is, but I had to change the Makefile. I modified the "Base include path" section (to add a Darwin branch) and the "Base LDFLAGS" section (to change the Darwin branch) like so, bolded parts are new or changed:

# Base include path.
ifeq ($(OSTYPE),Linux)
INCLUDE := -I/usr/include
else ifeq ($(OSTYPE),FreeBSD)
INCLUDE := -I/usr/local/include
else ifeq ($(OSTYPE),OpenBSD)
INCLUDE := -I/usr/local/include
else ifeq ($(OSTYPE),Windows)
INCLUDE := -I/custom/include
else ifeq ($(OSTYPE),Darwin)
INCLUDE := -I/usr/local/opt/openal-soft/include -I/usr/local/include

endif

# ----------

# Base LDFLAGS.
ifeq ($(OSTYPE),Linux)
LDFLAGS := -L/usr/lib -lm -ldl -rdynamic
else ifeq ($(OSTYPE),FreeBSD)
LDFLAGS := -L/usr/local/lib -lm
else ifeq ($(OSTYPE),OpenBSD)
LDFLAGS := -L/usr/local/lib -lm
else ifeq ($(OSTYPE),Windows)
LDFLAGS := -L/custom/lib -lws2_32 -lwinmm
else ifeq ($(OSTYPE), Darwin)
LDFLAGS := $(OSX_ARCH) -lm -L/usr/local/opt/openal-soft/lib -L/usr/local/lib
endif

7) Now the "make" works. Yay. That generates the "release/baseq2/game.dylib" library file and the "release/quake2" program file. We'll make use of those files below. Also this has generated the dedicated server ("release/q2ded") but I don't care about that right now.

The final step is to make an app out of it.

1) cd into stuff/osx and "unzip quake2-appbundle.zip". This generates the "Quake 2.app" directory and a bunch of stuff inside that. This directory structure is still missing some things before it can be a working app, so we'll need to move/copy the final things into place.

2) First, remember the "quake2-temp/baseq2" directory that we extracted from the official patch and then moved a few more files into way up at the top of this sequence? Move or copy everything out of that "quake2-temp/baseq2" directory and into the "Quake 2.app/Contents/Resources/baseq2" directory. (The files you're moving should be: "pak0.pak", "pak1.pak", "pak2.pak", the "players" directory, and the "video" directory.)

3) As the readme recommends, move the "yq2.cfg" file into the "Quake 2.app/Contents/Resources/baseq2" directory to have a nicer default configuration.

4) Move the "game.dylib" library file that we built into the "Quake 2.app/Contents/Resources/baseq2" directory.

5) And finally move the "quake2" program file that we built into the "Quake 2.app/Contents/Resources" directory.

The "Quake 2.app" directory is now an app ready to run. If you look at it in the Finder you'll see it as a file named "Quake 2" with a nice icon.

Double-clicking on this will just give you a warning about how it is from an unidentified developer and can't be opened. So instead, right-click and select Open. (You'll only have to do this once, then double-clicking will be OK afterward.)

I started a game and goofed around a bit, seems to be working.

You can move the Quake 2 app anywhere you like, e.g. you could stick it in your Applications folder. If you care about ctf or the mission packs there is more work to do with the various downloaded files; otherwise you can delete that "quake2-temp" working directory and its contents as well as the "yquake2-QUAKE2_5_33" directory and its contents.
Post edited May 21, 2016 by Johnny_Law
avatar
Johnny_Law: OK you got me curious about this. Below is what I did step by step, on my Mac that is running El Capitan.

Having prebuilt binaries would be a lot nicer! If you want, I can later try to package up something and put it in my dropbox for a while. But the compiling did seem to turn out OK after a few hiccups.

Starting with part 3.2 of the readme, since I own retail Quake 2:

1) I downloaded [url=ftp://ftp.idsoftware.com/idstuff/quake2/q2-3.20-x86-full-ctf.exe]ftp://ftp.idsoftware.com/idstuff/quake2/q2-3.20-x86-full-ctf.exe[/url] as indicated by the readme. The id software FTP site is pretty slow and I'm sure you could get this more quickly from somewhere else, but I went ahead and used the official site.

2) I moved the file into a working directory named "quake2-temp" and cd'd into that directory.

3) This file is actually a self-extracting executable so I just did "unzip q2-3.20-x86-full-ctf.exe".

4) Next I removed "q2-3.20-x86-full-ctf.exe" and also removed all of the other files that step 3.2 of the readme says to remove.

5) I put the "pak0.pak" from my retail Quake 2 inside the new "quake2-temp/baseq2" folder. Same for my Quake 2 "video" directory, it also should be moved or copied into "quake2-temp/baseq2".

Now we have all the game data files that we'll need. For now we're only going to care about the "quake2-temp/baseq2" folder's contents, in a later step down below.

Skipping part 3.3 of the readme since I'm not working with the demo files...

Skipping part 3.4 for now, not going to worry about ctf or mission packs yet...

On to part 3.5:

1) I already have Xcode installed w/ tools.

2) I don't have brew installed yet on this Mac, so I opened an OS X terminal and did the installation command shown at the http://brew.sh/ site.

3) Next I ran the four brew invocations shown in the Yamagi readme, to install various libraries and headers.

4) I downloaded the latest Yamagi source from https://github.com/yquake2/yquake2/archive/QUAKE2_5_33.zip and unzipped it. This creates a "yquake2-QUAKE2_5_33" directory and lots of stuff inside that. It doesn't really matter where you put this directory.

5) cd into the "yquake2-QUAKE2_5_33" directory and enter the "make" command.

6) This doesn't work. I'm not sure what the best/correct fix is, but I had to change the Makefile. I modified the "Base include path" section (to add a Darwin branch) and the "Base LDFLAGS" section (to change the Darwin branch) like so, bolded parts are new or changed:

# Base include path.
ifeq ($(OSTYPE),Linux)
INCLUDE := -I/usr/include
else ifeq ($(OSTYPE),FreeBSD)
INCLUDE := -I/usr/local/include
else ifeq ($(OSTYPE),OpenBSD)
INCLUDE := -I/usr/local/include
else ifeq ($(OSTYPE),Windows)
INCLUDE := -I/custom/include
else ifeq ($(OSTYPE),Darwin)
INCLUDE := -I/usr/local/opt/openal-soft/include -I/usr/local/include

endif

# ----------

# Base LDFLAGS.
ifeq ($(OSTYPE),Linux)
LDFLAGS := -L/usr/lib -lm -ldl -rdynamic
else ifeq ($(OSTYPE),FreeBSD)
LDFLAGS := -L/usr/local/lib -lm
else ifeq ($(OSTYPE),OpenBSD)
LDFLAGS := -L/usr/local/lib -lm
else ifeq ($(OSTYPE),Windows)
LDFLAGS := -L/custom/lib -lws2_32 -lwinmm
else ifeq ($(OSTYPE), Darwin)
LDFLAGS := $(OSX_ARCH) -lm -L/usr/local/opt/openal-soft/lib -L/usr/local/lib
endif

7) Now the "make" works. Yay. That generates the "release/baseq2/game.dylib" library file and the "release/quake2" program file. We'll make use of those files below. Also this has generated the dedicated server ("release/q2ded") but I don't care about that right now.

The final step is to make an app out of it.

1) cd into stuff/osx and "unzip quake2-appbundle.zip". This generates the "Quake 2.app" directory and a bunch of stuff inside that. This directory structure is still missing some things before it can be a working app, so we'll need to move/copy the final things into place.

2) First, remember the "quake2-temp/baseq2" directory that we extracted from the official patch and then moved a few more files into way up at the top of this sequence? Move or copy everything out of that "quake2-temp/baseq2" directory and into the "Quake 2.app/Contents/Resources/baseq2" directory. (The files you're moving should be: "pak0.pak", "pak1.pak", "pak2.pak", the "players" directory, and the "video" directory.)

3) As the readme recommends, move the "yq2.cfg" file into the "Quake 2.app/Contents/Resources/baseq2" directory to have a nicer default configuration.

4) Move the "game.dylib" library file that we built into the "Quake 2.app/Contents/Resources/baseq2" directory.

5) And finally move the "quake2" program file that we built into the "Quake 2.app/Contents/Resources" directory.

The "Quake 2.app" directory is now an app ready to run. If you look at it in the Finder you'll see it as a file named "Quake 2" with a nice icon.

Double-clicking on this will just give you a warning about how it is from an unidentified developer and can't be opened. So instead, right-click and select Open. (You'll only have to do this once, then double-clicking will be OK afterward.)

I started a game and goofed around a bit, seems to be working.

You can move the Quake 2 app anywhere you like, e.g. you could stick it in your Applications folder. If you care about ctf or the mission packs there is more work to do with the various downloaded files; otherwise you can delete that "quake2-temp" working directory and its contents as well as the "yquake2-QUAKE2_5_33" directory and its contents.
Man, this seems extremely helpful, but this brew install is really scary. Should I be worried installing this? Can I mess anything up? Just installed X-code and that was a big install. Brew runs some code and then wants me to enter my password. Kinda worried on that since I have never used terminal and it warns me that I can mess things up...
Post edited May 22, 2016 by Yeagersmash
It's good to be cautious, but FWIW brew is a standard way of installing open-source software packages on OS X.

It's possible to mess up your computer if you start doing a lot of manual fiddling with system files, but IMO installing these libraries won't hurt anything, especially if you just literally do only those four brew commands.

If you ever want to completely get rid of brew, there's instructions here (haven't tried it myself tho): https://github.com/Homebrew/brew/blob/master/share/doc/homebrew/FAQ.md#how-do-i-uninstall-homebrew
avatar
Johnny_Law: It's good to be cautious, but FWIW brew is a standard way of installing open-source software packages on OS X.

It's possible to mess up your computer if you start doing a lot of manual fiddling with system files, but IMO installing these libraries won't hurt anything, especially if you just literally do only those four brew commands.

If you ever want to completely get rid of brew, there's instructions here (haven't tried it myself tho): https://github.com/Homebrew/brew/blob/master/share/doc/homebrew/FAQ.md#how-do-i-uninstall-homebrew
Thanks very much. I am getting hung up on some of these terminal commands though... Not sure what cd means or how to edit the MakeFile in terminal or how to point to a directory. Would you mind adding in those specifics? Sorry to be such a newb. :(
avatar
Yeagersmash: Thanks very much. I am getting hung up on some of these terminal commands though... Not sure what cd means or how to edit the MakeFile in terminal or how to point to a directory. Would you mind adding in those specifics? Sorry to be such a newb. :(
Hmm! OK. You're jumping in at the deep end I see. :-)

You don't have to edit the Makefile using the terminal; you can use TextEdit or anything similar.

You can also generally use the Finder for moving files around. The only "gotcha" there is when you want to get inside the "Quake 2.app" folder, you'll need to right-click on it and select "Show Package Contents".

You will have to use the terminal a bit to do the "make" though, and in general it can be handy to use. Some relevant info here:

http://www.macworld.co.uk/feature/mac-software/get-more-out-of-os-x-terminal-3608274/
http://blog.teamtreehouse.com/introduction-to-the-mac-os-x-command-line
https://developer.apple.com/library/mac/documentation/OpenSource/Conceptual/ShellScripting/CommandLInePrimer/CommandLine.html
http://www.dummies.com/how-to/content/how-to-use-basic-unix-commands-to-work-in-terminal.html
avatar
Yeagersmash: Thanks very much. I am getting hung up on some of these terminal commands though... Not sure what cd means or how to edit the MakeFile in terminal or how to point to a directory. Would you mind adding in those specifics? Sorry to be such a newb. :(
avatar
Johnny_Law: Hmm! OK. You're jumping in at the deep end I see. :-)

You don't have to edit the Makefile using the terminal; you can use TextEdit or anything similar.

You can also generally use the Finder for moving files around. The only "gotcha" there is when you want to get inside the "Quake 2.app" folder, you'll need to right-click on it and select "Show Package Contents".

You will have to use the terminal a bit to do the "make" though, and in general it can be handy to use. Some relevant info here:

http://www.macworld.co.uk/feature/mac-software/get-more-out-of-os-x-terminal-3608274/
http://blog.teamtreehouse.com/introduction-to-the-mac-os-x-command-line
https://developer.apple.com/library/mac/documentation/OpenSource/Conceptual/ShellScripting/CommandLInePrimer/CommandLine.html
http://www.dummies.com/how-to/content/how-to-use-basic-unix-commands-to-work-in-terminal.html
Ok, I was able to modify the Make File as per your instructions, but when I run it, it just lists some syntax errors and does not appear to work. I can just double-click it to run it, right? Where does the Make File dump those two files, by the way? The ReadMe doesn't even really clearly state to run the MakeFile, so it is a bit confusing for me. Thanks again for your help.
Post edited May 22, 2016 by Yeagersmash
Sorry man, when you started out by talking about compiling I made some assumptions about the level of detail I needed to go into. It can be difficult to walk this back to the right level using forum message back-and-forth. If you're willing to keep trying stuff though, it sounds like you'll get there.

So to your questions:

Once you've modified the Makefile, you don't want to try to run it like an app. It's not an app, it's just a file that is consulted by the build process. The build is done by running the "make" program.

To actually do the build, you need to use the terminal, so open up a terminal window. You'll need to use the "cd" command to change directory to the directory that contains the Makefile, to make that the current "working directory" for the terminal. The directory you want is the folder that was created when you unzipped the Yamagi source stuff.

There's a neat way to see how this works. Once you have a terminal open, type "cd" followed by a space character, but don't press the enter key yet. Now find that "yquake2-QUAKE2_5_33" folder using the Finder, and drag the "yquake2-QUAKE2_5_33" folder onto the terminal. This will cause the complete directory path for that folder to be pasted into the terminal. Now press enter. That completes the "cd" command, and your terminal is now working in the build directory.

You don't have to use that drag trick; you can just type out the path to your desired cd destination (and use tab-completion to help). But the drag trick is a nice way to see what the correct path looks like. There's more about that (and some other stuff) in this article: http://www.howtogeek.com/210147/how-to-open-terminal-in-the-current-os-x-finder-location/

Anyway, once you have your terminal open, and its working directory is set to the necessary folder, just enter the "make" command in the terminal.

As an example, let's say your OS X username is yeager and you put the Yamagi source on your Desktop. In that case, the two commands you enter in the terminal would be something like:

cd /Users/yeager/Desktop/yquake2-QUAKE2_5_33
make
The "make" process will spit out a lot of stuff, but it should finally end with this line:

===> LD release/baseq2/game.dylib
If it ends before getting to that point, and prints out some errors, then something is wrong.

The two result files that I mentioned in step 7 of my earlier post can be found be drilling down further under the "build" folder. Open the "release" folder (under "build") and you'll see the generated "quake2" program. Then open the "baseq2" folder under that, and you'll see the "game.dylib" library file.
avatar
Johnny_Law: Sorry man, when you started out by talking about compiling I made some assumptions about the level of detail I needed to go into. It can be difficult to walk this back to the right level using forum message back-and-forth. If you're willing to keep trying stuff though, it sounds like you'll get there.

So to your questions:

Once you've modified the Makefile, you don't want to try to run it like an app. It's not an app, it's just a file that is consulted by the build process. The build is done by running the "make" program.

To actually do the build, you need to use the terminal, so open up a terminal window. You'll need to use the "cd" command to change directory to the directory that contains the Makefile, to make that the current "working directory" for the terminal. The directory you want is the folder that was created when you unzipped the Yamagi source stuff.

There's a neat way to see how this works. Once you have a terminal open, type "cd" followed by a space character, but don't press the enter key yet. Now find that "yquake2-QUAKE2_5_33" folder using the Finder, and drag the "yquake2-QUAKE2_5_33" folder onto the terminal. This will cause the complete directory path for that folder to be pasted into the terminal. Now press enter. That completes the "cd" command, and your terminal is now working in the build directory.

You don't have to use that drag trick; you can just type out the path to your desired cd destination (and use tab-completion to help). But the drag trick is a nice way to see what the correct path looks like. There's more about that (and some other stuff) in this article: http://www.howtogeek.com/210147/how-to-open-terminal-in-the-current-os-x-finder-location/

Anyway, once you have your terminal open, and its working directory is set to the necessary folder, just enter the "make" command in the terminal.

As an example, let's say your OS X username is yeager and you put the Yamagi source on your Desktop. In that case, the two commands you enter in the terminal would be something like:

cd /Users/yeager/Desktop/yquake2-QUAKE2_5_33
make
avatar
Johnny_Law: The "make" process will spit out a lot of stuff, but it should finally end with this line:

===> LD release/baseq2/game.dylib
avatar
Johnny_Law: If it ends before getting to that point, and prints out some errors, then something is wrong.

The two result files that I mentioned in step 7 of my earlier post can be found be drilling down further under the "build" folder. Open the "release" folder (under "build") and you'll see the generated "quake2" program. Then open the "baseq2" folder under that, and you'll see the "game.dylib" library file.
Man, I can't thank you enough! This actually worked! It has been a pain setting up the video though (resolutions and such glitching), but it is working so far. And, I learned a lot along the way! Thanks again.

Still not sure why the Xcode thingy was needed though; none of the steps seem to use that. Weird stuff...
Glad it's working for you! Or at least working-ish. :-)

FYI Xcode was the source of the various tools used to do the build. There's also another way to install those tools without the full Xcode app, but it didn't occur to me to mention that before.
avatar
Johnny_Law: Glad it's working for you! Or at least working-ish. :-)

FYI Xcode was the source of the various tools used to do the build. There's also another way to install those tools without the full Xcode app, but it didn't occur to me to mention that before.
Thanks man! The only real problem I am having now is that the brightness resets to default every time I load the game, basically as soon as the Id Software logo comes up. Does yours do that too? Been trying to fix it, but it is not working...
avatar
Yeagersmash: I am trying to get Yamagi Quake 2 to work with OS X as the net claims this is the best way.... Allegedly... Of course, I run into problems at this "compile" step.
FYI: a community build Mac binary can be found on the Yamagi Quake II homepage now. It is tested to work on OS X 10.7 and up. Doesn't need any additional libraries to be installed.