Browsing Posts in Programming

Parser Status

No comments

I haven’t written in awhile so I thought I would give a general update on the status of the ReplayParser. I recently accepted an offer to work at Microsoft for a summer internship as a software developer. I will be programming in C#, so I have been taking the time to really delve into the language and get a good foundation. I originally wrote the ReplayParser in C++, so I’m in the process of migrating the whole project to C#. This will be a lengthy process, but hopefully it will drastically improve the performance (I hope to add multi-threading parsing capabilities and other advanced features that C# makes easier to do). It will also allow me to completely rework the architecture of the project, because I just kind of wrote it piece by piece originally without an end goal in mind and it has become quite a mess.

I know there are many of you that have been requesting features and improvements to the Parser, and during the process of migration I hope to incorporate as many of the requests as feasible. I have also had several emails about replays not parsing correctly, so I hope to address those concerns as well by making the engine behind the Parser more robust. If you have an interest as a developer in having the original C++ code, please let me know – this project has grown in size and it is difficult to maintain alongside a semester of work and other various projects.

In other news – Starcraft 2 Closed Beta has recently started. I don’t have an invite, but I do plan on continuing development of this parser and hopefully branch off another version for Starcraft 2. If you have any insight on how the replay format for that game is going to look – shoot me an email as it would be much appreciated.

Thanks again for all of the support, it is the users that keep me motivated in my work to create tools for the community.

I have been using the Qt framework for awhile now and I started learning it from scratch to build my ReplayParser. Despite the great documentation that Nokia provides, getting everything installed and working isn’t as easy as it should be for someone completely new to the software. I put together this quick installation guide to help those interested in learning Qt on a Windows machine.

Because this guide is intended for Windows users I compile everything using Visual Studio 2008, but MinGW builds are also possible (although not shown in this guide). The steps outlining the installation and building process are shown below. I try and cover every step from downloading the software, to building your first project in Visual Studio – please let me know if I have left anything out.

1. Download the latest framework (http://qt.nokia.com/downloads/windows-cpp-vs2008) from the Qt website. You will need to check back here every couple of months for the latest version. I opt to use a combination of the framework and the Visual Studio Add-In because I found the provided compiler (Qt Creator) to be rather clunky and slow. If you decide to download the whole SDK, the path will look something like this C:\Qt\2009.05.
2. Run the .exe and choose an install folder. I chose C:\Qt\4.6.0 (this was the latest version at the time – it may be different now).
3. After running the .exe, add qmake to your PATH. To do this, go to Control Panel -> System and Security -> System -> Advanced System Settings -> Environment Variables -> System Variables (it’s a table). To add qmake, all you have to do is copy and paste the path of your Qt bin folder. Mine looks like this: C:\Qt\4.6.0\qt\bin. Be sure to use a semicolon to separate any other path variables.

4. Now we need to configure Qt before building it. To do this, open up the Visual Studio 2008 command prompt (this isn’t necessary right now, but you’ll see why we need it in a minute). Navigate to your Qt folder using a command that should look something like this: cd C:\Qt\4.6.0. When you are here, you can run configure.exe provided by Nokia. It has several options, but here is the configure command that I use generally:

configure -static -qt-sql-sqlite -no-qt3support -no-opengl -platform win32-msvc2008 -no-libtiff -no-dbus -no-phonon -no-phonon-backend -no-webkit

Most of these options are to disable features that I don’t use currently. However, there are a few I would like to point out: The -static statically links the library so when releasing your project, you only have to release a single .exe file rather than various .dll files, the -qt-sql-sqlite option is to build the QtSQL module which I use in some of my programming, and finally, the -platform win32-msvc2008 is important because this tells the configure we would like to use this compiler to build the code. After entering that command, choose the open source license and accept the agreement.

5. The configure utility may several minutes, after its done we need to build the framework. There are two options here: for beginners, I would recommend building everything (examples, tools, tutorials, etc) by simply executing this command:

nmake

However, building everything generally takes a long time (on my computer its upwards of 4 hours). To avoid having to build the examples, enter this command:

nmake sub-src

This will build all the necessary tools needed to start writing your own software. If you are reinstalling, be sure to enter this command before reconfiguring and recompiling:

nmake distclean

6. Now Qt is officially installed. There are still a few things that need to be done before finishing up though. I usually start by adding the Qt installation folder to the Visual Studio directories so we will have access to them in the development environment. To do this, open up Visual Studio 2008 and click on Tools -> Options -> VC++ Directories.

There will be several different paths to add, so starting with the Include Files, add your path equivalent to: C:\Qt\4.6.0\include (if you are using the SDK download, it will look like C:\Qt\2009.05\qt\include). Next add the path for the Library Files, C:\Qt\4.6.0\lib. Finally, add the path for the Source Files C:\Qt\4.6.0\src.

After doing all those, close Visual Studio. The next step could have been done before adding the paths, but I prefer to do the paths immediately after the installation so it is fresh in my mind.

7. Download and install the latest version of the Qt4 Visual Studio Add-in (http://qt.nokia.com/downloads/visual-studio-add-in), which is version 1.1.2 as of now. Visual Studio needs to be closed during the installation, otherwise close it then re-open it for the changes to take place.

8. Re-open Visual Studio and you should see a new Qt menu item along the top tool bar. My installation detected 4.6.0′s path automatically, but if not – simply go to Qt Options, click Add, and navigate to the folder you installed Qt in (eg, C:\Qt\4.6.0).

9. That’s all there is to it! Now when creating new projects, there will be a new tab called Qt4 projects that lets you choose the various project types to create.

I hope this guide helps, happy programming.

Parser Update

2 comments

Download ReplayParser 1.06b, last updated Jan. 4, 2010.
Go to the project page for more information.

I’m pushing a small update to the parser today. I apologize for it being long overdue – I have been having some issues with the software I use to build the parser with lately but everything is back on track now and development will continue as long as there is interest in the parser.

Starcraft 2 Beta should be out some time this year so it will be interesting to see how it impacts the Warcraft 3 community. Hopefully the replay system isn’t too different than Warcraft’s, but there are always people out there making tools for games, so keep an eye out.

The latest changes that I’ve added in this update are here:

  • Fixed a path update bug in the replay table
  • Table columns are movable and removable (Go to View->Preferences) in the toolbar along the top)
  • There are also more columns in the replay table with more information
  • Fixed the state saving of the software on close/open (it now remains maximized properly)
  • Added hot-key selection/assignment to the action breakdown
  • Tweaked the ‘Refresh’ button to run smoother
  • Altered the layout in anticipation of future changes (NOTE: searching is disabled in this version because of this, I plan to re-enable it in the future with more robust features)
  • Added browse buttons on the Settings tab to make easier folder finding
  • Changed the type of dialog box that greets you when interacting when a few of the buttons (it should use the native windows button now)

I believe those are all of the features that I have added – there actually seems to be quite a few. Because of all the new features in this update, its possible that a few bugs have made it through, but I figured it would be better to release this version for use because it has been long overdue. Before I release 1.7 I plan on filling in features for the disabled buttons in the UI and making the whole parsing process more accurate.

As always, the project page is available for an overview of the project – please feel free to contact me here or there for any information or suggestions that you may have. Enjoy!

Due to the restructuring of the website, I have migrated the main page for Warcraft 3 Replay Parser to this location: http://johnhforrest.com/projects/warcraft-3-replay-parser/. I will not be deleting this page due to the comments from users.

Download ReplayParser 1.06, last updated Nov. 29, 2009.

Due to the restructuring of the website, I have migrated the main page for Warcraft 3 Replay Parser to this location: http://johnhforrest.com/projects/warcraft-3-replay-parser/. I will not be deleting this page due to the comments from users.

Download ReplayParser 1.06, last updated Nov. 29, 2009.