How to Get Started with wxFRED

By Goober5000

Editor's note: At the time of this writing, wxFRED has not been actively developed for quite awhile, so this guide may be out of date.

  1. Download and install the wxWidgets package. I used the latest official stable release, version 2.6.0. Install it in a location without spaces, such as C:/wxWindows-2.6.0. You should be able to use version 2.4.2, but you'll need to fiddle with the project file a bit. I recommend 2.6.0.

  2. Create the environment variable WXWIN and set it to the install location. The slashes in the path must be forward slashes. In Win9x and ME, edit autoexec.bat, add the variable to the current variable list, and reboot (but do step 3 before rebooting). In WinNT, 2000, and XP, open the System applet in the Control Panel, click the Advanced tab, click Environment Variables, and add it with the dialog - no reboot is required.

  3. Create the environment variable WXRC and set it to the wxRC executable directory. WxRC won't exist yet, but it will be found at $(WXWIN)/contrib/utils/wxrc/Release for 2.4.2 and $(WXWIN)/utils/wxrc/vc_msw for 2.6.0. This assumes you're compiling with Visual Studio, but other compilers will put wxrc.exe in similar locations.

  4. Open MSVC, find the wxWidgets workspace in /src, and use Batch Build to build all (and only) the Win32 Debug and Win32 Release configurations.

    1. For wxWidgets 2.4.2
    2. Go to contrib/src/xrc and build the XRC library. This is not part of the core codebase as of 2.4.2 - it wasn't integrated until 2.5.3. It's needed for XRC resource support.

    3. Go to contrib/utils/wxrc and build wxRC.

      For wxWidgets 2.6.0
    1. Open MSVC, find the wx workspace in /build/msw, and use Batch Build to build all (and only) the Win32 Debug and Win32 Release configurations.

    2. Go to utils/wxrc and build wxRC.

  5. Verify that you can run wxRC by going to the command prompt, typing "cd\" followed by "cd %WXRC%", and executing wxrc.exe. It won't do anything, but it should run properly. If you get "file not found", there's something wrong with your WXRC path.

  6. Run a CVS update to get the latest stuff in the fs2_open directory. Make sure you select the "Create new directories" option.

  7. If you're using 2.4.2, you'll have to edit the library list. First remove the wxbase*.lib and wxmsw*.lib files. Remove the wx prefix from the remaining wx*.lib files. Remove [wx]expat.lib. Then add wxmsw.lib and wxxrc.lib.

  8. Build and run!

After configuring everything, I recommend you read up on wxWidgets. The site documentation and Google are good places to start.

For more information, see the original thread on HLP (SCP Members only).