Wasabi SDK FAQ & Getting Started Guide
This FAQ is about using the SDK. It is not about using Wasabi itself.
getting started guide
download it and install
First, download the SDK. Then start the installer. The installer will suggest
that you install the SDK to "c:\Wasabi SDK" but you can put it where-ever
you like. Remember where you put it!
You should probably also install wasabi.player at this time.
set up the paths
First, add "C:\Wasabi SDK" (or whereever the SDK was installed) to the
directory include list in MSVC.
Then, add "C:\Wasabi SDK\studio\wa3cfg" to each project's include directories that should be compiled in wa3/wasabi.player mode, or "C:\Wasabi SDK\studio\wa5cfg" if you're going for a wa5 wac.
create your project
If you are building a wac:
In MSVC, choose File->New->Projects->Win32 Dynamic-Link Library.
Give
your project some name.
Then, choose Project->Insert Project Into Workspace.
Navigate to the SDK
directory and choose the "bfc.dsp" project.
Then, repeat the process to
add "waclient.dsp", from the SDK/waclient directory.
Then, choose Project->Dependencies and make your project depend on both bfc
and waclient.
Finally, right click on your project and choose "Settings...". Switch the Settings For: dropdown to "All configurations". Then, go to where it
says "Debug" and put "C:\Program Files\wasabi.player\wasabi.exe". Then go
to the Link tab and enter "C:\Program Files\wasabi.player\wacs\mywac\mywac.wac"
where "mywac" is your wac's name. (Usually you want to put your wac and its
associated xml into its own directory.)
Now, when you hit Control-F5 to build and run your project, it will compile
a wac for you and launch wasabi.player to load it.
One more thing: Go into your projects settings under C++ -> Code Generation.
Switch the "Settings for" to "Win32 Debug" then select "Debug Multithreaded DLL" under "Use run-time library".
Switch the "Settings for" to "Win32 Release" then select "Multithreaded DLL" under "Use run-time library".
Questions
Where is everything? How do I get started reading the code?
Take a look at the file contents.txt. That will give you a description of each
top-level directory in the sdk.
For some discussion on the actual C++ classes, see the Wasabi FAQ, first question.
Do I need to #include <windows.h>?
No. Please don't! In general, all .cpp files should include <bfc/std.h>,
which will take care of the standard includes for the platform. (std.h #includes
<bfc/platform/platform.h>) Remember, the
less you refer directly to Windows, the more magically portable your code will be.
I'm getting all kinds of include errors, like "bfc/std.h" not found.
You have to add "C:\Wasabi SDK" (or whereever the SDK is installed) to the
directory include list in MSVC.
Look in Tools->Options...->Directories