Bringing AQ back to Windows!

53 views
Skip to first unread message

matatk

unread,
Oct 1, 2013, 5:52:18 PM10/1/13
to agrip-...@googlegroups.com
I have taken a couple of days off work and I have got most of the work done in order to bring AQ back to Windows.  Non developers can probably stop reading about now; just wanted you to know that this is being worked on and progress is finally being made.  The ultimate goal is to have AQ and LDL work as native Windows apps, with no dependency on Python and a simple setup routine.  Developers, read on for information of a technical nature on what's been going on and how to build it.  Please note that I know the documentation is lacking; I've been keeping notes on how to compile both the Mac OS X and Windows stuff from scratch, so I will update the docs when I've finally got the build process working.  It's long-winded at the moment, but we can work on streamlining it when we've got the thing working :-).

So far, I have done the following:

 1. Got it to compile on Windows, using Visual Studio Express.
 2. Tweaked the launcher script to work on both Windows and Mac OS X.
 3. Begun work on making .exe files from all the Python code, so that the user doesn't need to have Python installed in order to use AQ (this will make setup a lot simpler in future).

There's still some way to go on the python-to-executable front, as it's not quite working yet, but it's getting there and I hope to complete it soon.  When that's done, I will need to make a new Windows installer (iether an MSI file or a more classical setup.exe).

The repo on GitHub contains all the code that fulfils 1 and 2 above.  Please note, however, that the way to build a Windows release currently relies on the Mac OS X build process.  You need to make the .app bundle on a Mac, and then use that as the basis of a working install on Windows.  The build process on the Mac automatically downloads all required support files, such as demos, maps, skins and the mindgrid:audio hi-fi sounds.  It also compiles the vital AQ QuakeC gamecode using the zqcc QuakeC compiler, which currently doesn't build or run on Windows.  It's not possible to do this easily on Windows, as it lacks a decent shell scripting environment and I already had written the Mac build system to do all of the above.  When we've got a working Windows build process, we can work on making it depend less on the Mac side of things.

For now, once you have got the .app from the Mac side of things (by running the build script called 'build'), you need to go into the AudioQuake.app/Contents/MacOS folder and get that MacOS folder over into Windows.  This includes all the sounds, maps and compiled QuakeC gamecode required to make the game work.  You then use Visual Studio Express to compile the ZQuake engine for Windows, drop the executable into that MacOS folder, and the launcher, AudioQuake.py will pick it up and (mostly) work.  Currently the launcher is not engaging the tutorial mode properly, but the game runs and the console works with Text-To-Speech output, so it is usable.

In order to compile ZQuake with Visual Studio Express, you need to open the zquake.sln file in audioquake/zq-repo/zquake/source/ and then bulid the zquake project. You need to install 'Microsoft Foundation Classes for C++' by following CodeProject's instructions: <http://www.codeproject.com/Articles/30439/How-to-compile-MFC-code-in-Visual-C-Express> -- however the download link for the Windows 2003 DDK is actually now <http://download.microsoft.com/download/9/0/f/90f019ac-8243-48d3-91cf-81fc4093ecfd/1830_usa_ddk.iso>.

Right, it's getting late here and I'm back to work tomorrow.  Sorry if this is a bit stream-of-consciousness, but I wanted to get something maybe useful written down for you.

Take care,
Cheers,


Matthew

Christoff EILERS

unread,
Oct 2, 2013, 2:16:08 AM10/2/13
to agrip-...@googlegroups.com
Hi Matth,

Well done that is. I've been trying to convert the original sln files
in order to use them with Visual 2010, but I did not succeed. Don't
ask me why, I couldn't fix that. But yeah, if you got it working,
that's perfect!

Just curiositty, what do you use to compile the Python script into
.exe files? I've been using two different libraries for that, and can
tell you that I definitly got better results with CXFreeze than with
py2exe.

Have a good day,

Cheers,

Chris

2013/10/1, matatk <mat...@gmail.com>:
> --
> You received this message because you are subscribed to the Google Groups
> "AGRIP Project" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to agrip-projec...@googlegroups.com.
> To post to this group, send an email to agrip-...@googlegroups.com.
> To view this discussion on the web, visit
> https://groups.google.com/d/msgid/agrip-project/0336f1f8-d92e-46d4-950d-d295f2a89f6b%40googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>

matatk

unread,
Oct 2, 2013, 4:36:16 AM10/2/13
to agrip-...@googlegroups.com
On Wednesday, 2 October 2013 07:16:08 UTC+1, Christoff Eilers wrote:
Just curiositty, what do you use to compile the Python script into
.exe files? I've been using two different libraries for that, and can
tell you that I definitly got better results with CXFreeze than with
py2exe.

I've tried both cx_Freeze and py2exe (suggested by Jacob Kruger a while back <https://groups.google.com/d/msg/agrip-project/kXhk_J3X0wA/yfHEaHe_1DIJ>).  However I have run into problems with both.  This is because PyGUI uses some weird magic to work out which of its submodules to load, depending on the OS.  Each module is coded specifically for a given OS, and when you, say, ask to import GUI.Globals, it goes and finds the one for your current OS and imports that.  Neither cx_Freeze nor py2exe can cope with this.  However, there is a script that PyGUI includes to sort this out for py2exe.  Unfortunately I could not get it to work either.

I like the idea of cx_Freeze as I think it could simplify the build system across Mac and Windows tremendously.  Alas I have simply not been able to get it to work yet.  I can send you my setup.py if you have time to look at it, maybe you can work out how to help it find the right PyGUI modules.  Though it looks quite complicated!

best regards,


Matthew

Christoff EILERS

unread,
Oct 2, 2013, 4:37:55 AM10/2/13
to agrip-...@googlegroups.com
Yes, go on. I'll give it a shot.

2013/10/2, matatk <mat...@gmail.com>:
> --
> You received this message because you are subscribed to the Google Groups
> "AGRIP Project" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to agrip-projec...@googlegroups.com.
> To post to this group, send an email to agrip-...@googlegroups.com.
> To view this discussion on the web, visit
> https://groups.google.com/d/msgid/agrip-project/aa086987-8708-4bf5-b957-e5b2ca9f2679%40googlegroups.com.

matatk

unread,
Oct 2, 2013, 8:49:15 AM10/2/13
to agrip-...@googlegroups.com
On Wednesday, 2 October 2013 09:37:55 UTC+1, Christoff Eilers wrote:
Yes, go on. I'll give it a shot.

Thank you!  I have attached both the py2exe and cx_Freeze scripts I was using. Both have the problem I described where they cannot import the right PyGUI modules, so neither .exe file actually runs.  In order to try this out, you will need to do a build on a Mac, then copy the AudioQuake.app/Contents/MacOS directory to a Windows machine.  Then you can use the attached scripts.  If you are able to build the engine executables, then you can try the launcher on Windows, too, but this is not necessary for trying to make this executable-making process work.

Thanks again for investigating this.


Matthew
setup.cxfreeze.py
setup.py2exe.py

tony seth

unread,
Oct 2, 2013, 11:16:23 AM10/2/13
to agrip-...@googlegroups.com
Hey Matt, glad to hear you're back and that AQ is coming along. I read
all of the message, even though I'm not a developer, bummer I don't
have a Mac, but still happy to hear the progress update. Thanks much
for all the hard work you are still doing, and please know that isn't
being wasted...
Take care...
Cheereo!

Matthew Tylee Atkinson

unread,
Oct 2, 2013, 12:49:29 PM10/2/13
to agrip-...@googlegroups.com, agrip-...@googlegroups.com
Thanks (to Tony and all of you) for the support - it means a lot to Sebby and myself. Looking forward to getting this properly running and build able, with up-to-date developer documentation, so you can more freely modify and build upon it, and more easily make maps.

Thanks and best regards,


Matthew

Christoff EILERS

unread,
Oct 3, 2013, 5:37:45 AM10/3/13
to agrip-...@googlegroups.com
Hi,

Matth, could you please put a compiled version in Dropbox? I cannot
compile with a Mac. Simply because I dont have one.

Well I actually do, but I sold it. They should be coming tomorrow to
pick it up. I cannot open the box.

Cheers,

Chris

2013/10/2, Matthew Tylee Atkinson <mat...@gmail.com>:
> --
> You received this message because you are subscribed to the Google Groups
> "AGRIP Project" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to agrip-projec...@googlegroups.com.
> To post to this group, send an email to agrip-...@googlegroups.com.
> To view this discussion on the web, visit
> https://groups.google.com/d/msgid/agrip-project/955DC65B-5954-4155-9438-89D6E6991F65%40gmail.com.

matatk

unread,
Oct 13, 2013, 6:22:37 PM10/13/13
to agrip-...@googlegroups.com
Hi folks; just a quick update.  I mentioned that I have got the engine building in Windows.  I now also have the launcher working.  Plus, I have got a system going, using cx_Freeze, to turn all the Python code and supporting libraries into an .exe file for easy redistribution later on.  This means we're very close to having a new installer for Windows.  Also I will be moving to cx_Freeze on the Mac side too, so it will be much simpler to build AQ on either platform.  I have put the two engine executables in a folder on Dropbox as follows.  Also below you will find the instructions that follow the steps I used to get the engine and launcher working on Windows 8, including the 'freezing' process described above.


To get the Python side of things working, including the program that will turn the Python code and all the supporting libraries into an executable for easy redistribution, follow these steps.

* You will need 7zip or similar to extract some of the files for installing the required libraries.  You can get 7zip from <http://www.7-zip.org>.
* Need Python 2.x from: <http://www.python.org/download/>
* Install the Python Windows Extensions: <http://sourceforge.net/projects/pywin32/>
* Install setuptools (required for installing third-party libraries): <https://pypi.python.org/pypi/setuptools/1.1.6#windows>
* To install the text-to-speech library and ensure it can be compiled for redistribution later on, run in a command window: easy_install --always-unzip pyttsx
* Install PyGUI by downloading the .tar.gz file from <http://www.cosc.canterbury.ac.nz/greg.ewing/python_gui/> and extracting it.  Then, in a command window, run: setup.py install
* Finally install cx_Freeze, which compiles all of the above into an executable for easy redistribution, from: <http://cx-freeze.sourceforge.net>

For compiling the ZQuake engine binaries, follow these steps.

* We used Visual Studio Express 2013, though 2010 and 2012 should work fine.
* You need to install 'Microsoft Foundation Classes for C++' by following CodeProject's instructions: <http://www.codeproject.com/Articles/30439/How-to-compile-MFC-code-in-Visual-C-Express> -- however the download link for the Windows 2003 DDK is actually now <http://download.microsoft.com/download/9/0/f/90f019ac-8243-48d3-91cf-81fc4093ecfd/1830_usa_ddk.iso>.
* You should then be able to compile the engine executables on Windows.

matatk

unread,
Oct 14, 2013, 4:44:50 AM10/14/13
to agrip-...@googlegroups.com
A few things I forgot last night :-).

1. You still need the MacOS directory from AudioQuake.app/Contents/ within the Mac version of AudioQuake in order to build on Windows (as this comes with all the maps, sounds and other data files).  You can find the latest build, "AudioQuake.app.zip", of that in the Dropbox folder I linked to last night.

2. I will be working on some system to get those files in the right places for Windows -- maybe using the setup.py script and expanding it to also download those files.  The more we can get into setup.py the better, as it's cross-platform, meaning that we only need a single build system for Mac and Windows (and Linux again in future perchance).

3. You can't yet compile the QuakeC compiler, zqcc, on Windows but I'll be working on it soon.

4. I have been and will be keeping all these notes together so that when I actually have it working, I can update the documentation for you all, so that it's easy for you to all follow those steps.  It would be really good if, at that point, we could get some intrepid folk amongst you to try out the steps (which will, invariably, not work for everyone at the outset, but we'll get there).

5. I have not forgotten about LDL; I will be applying the same stuff to that ASAP as I think it's the main selling point of AudioQuake these days from an external interest point of view!

6. Thanks to Christoff Eilers for already going through some of the initial Windows stuff with me and highlighting a Launcher issue with paths and some problems that occur on XP.

I think that's it for now!

Cheers,


Matthew

Christoff EILERS

unread,
Oct 14, 2013, 5:42:54 AM10/14/13
to agrip-...@googlegroups.com
Hi Matth,

well done. Definitly.
What's that SetupTools thing? Does it not come along with CXFreeze?

As for the Windows installer, I could help you. I've already written a
Ino Setup script, which I use to use to compile installers for French
people. It works quite good, though it doesn't download anything for
now. Honestly it'd be ways easier for people to have a standalone
installer, but yeah. That's another point, and I assume there are
license issues. Just like about owning Quake's data files. ... Come
on, almost 20 years later, they still sell them for $45 or something.
Anyway.

Talk to ya later.

Cheers,

Chris

2013/10/14, matatk <mat...@gmail.com>:
> --
> You received this message because you are subscribed to the Google Groups
> "AGRIP Project" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to agrip-projec...@googlegroups.com.
> To post to this group, send an email to agrip-...@googlegroups.com.
> To view this discussion on the web, visit
> https://groups.google.com/d/msgid/agrip-project/960fc39d-efa3-4166-9863-9fe4cdc52d6f%40googlegroups.com.

matatk

unread,
Oct 14, 2013, 8:09:55 AM10/14/13
to agrip-...@googlegroups.com
On Monday, 14 October 2013 10:42:54 UTC+1, Christoff Eilers wrote:
well done. Definitly.
What's that SetupTools thing? Does it not come along with CXFreeze?

Thanks.  Setuptools is the library that handles installing third-party Python libraries, so it's used to manage the 'setup.py' scripts that come with most of them, to allow them to be built and installed system-wide.

As for the Windows installer, I could help you. I've already written a
Ino Setup script, which I use to use to compile installers for French
people. It works quite good, though it doesn't download anything for
now.

Thanks for the offer. I used to use Inno Setup but I have forgotten it all now!  I am going to first check out cx_Freeze as it says it can make an MSI file for us, which would be great.  I will let you all know how this goes and certainly ask for your help on Inno Setup if we need to go down that route.  Can't wait to get it to the stage where the build process is simple and the docs are there for you all to be able to build it without any problems!
 
Honestly it'd be ways easier for people to have a standalone
installer, but yeah. That's another point, and I assume there are
license issues. Just like about owning Quake's data files. ... Come
on, almost 20 years later, they still sell them for $45 or something.
Anyway.

 My position on this has changed slightly... I still would never be willing to distribute any registered data as part of AQ, of course that would be a breach of copyright.  However I am now thinking that we should distribute the shareware data within AQ.  The EULA for it says that it must be distributed 'as-is' which I took to mean as a separate component.  However, what I am proposing that we do now is to include an extracted version of the shareware data, with readme, original licence and executables, and have that as part of AQ.  I believe that is still compliant with the EULA, yet allows AQ to be installed more easily.

Cheers,


Matthew

Christoff EILERS

unread,
Oct 14, 2013, 8:14:49 AM10/14/13
to agrip-...@googlegroups.com
Thanks for your answers.

Oh and, is that command you mentionned installed along with SetupTools?
Easy_install or whatever.


2013/10/14, matatk <mat...@gmail.com>:
> --
> You received this message because you are subscribed to the Google Groups
> "AGRIP Project" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to agrip-projec...@googlegroups.com.
> To post to this group, send an email to agrip-...@googlegroups.com.
> To view this discussion on the web, visit
> https://groups.google.com/d/msgid/agrip-project/781ea706-bc78-47a1-a19b-90d1b97f8a63%40googlegroups.com.

matatk

unread,
Oct 14, 2013, 9:06:13 AM10/14/13
to agrip-...@googlegroups.com
On Monday, 14 October 2013 13:14:49 UTC+1, Christoff Eilers wrote:
Oh and, is that command you mentionned installed along with SetupTools?
Easy_install or whatever.

Yes,  easy_install comes with setuptools.  It's a little confusing because the recommended way to install setuptools (link given in my email from last night), is to grab that script called ez_setup.py which installs setuptoools (and, inherently, easy_install).  Shame these things are named so confusingly!

Cheers,


Matthew

Christoff EILERS

unread,
Oct 14, 2013, 9:09:46 AM10/14/13
to agrip-...@googlegroups.com
Thank you.

2013/10/14, matatk <mat...@gmail.com>:
> --
> You received this message because you are subscribed to the Google Groups
> "AGRIP Project" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to agrip-projec...@googlegroups.com.
> To post to this group, send an email to agrip-...@googlegroups.com.
> To view this discussion on the web, visit
> https://groups.google.com/d/msgid/agrip-project/f6f2832c-e70e-489e-865f-d5b5694523a4%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages