Forums | Forums |



This information describes how to use the SCK, including software requirements and environment setup, building the BREWSim.dll1, and testing the SCK.

SCK Setup:
" The following should be installed prior to the Platform Pro Kit installation:
o Brew MP Multiplatform 1.x Master Installer (the latest version)
o Perl 5.10 - ActiveState Perl 5.10 binaries and documentation can be found at:
" Brew MP Multiplatform Platform Pro Kit
" Cygwin 1.5.25 or newer and make version 3.80 or newer.
To check the Cygwin version, open a command prompt and navigate to . To find the Cygwin version, enter: uname -a
To find the Cygwin make version, enter: make -v
o Ensure that C:\cygwin\bin is in your System PATH environment variable.
o Install Cygwin, which includes make from:
" Microsoft Visual Studio .Net 2003 version 7.1
" From a command prompt, enter the following (include the quotation marks): "%VS71COMNTOOLS%vsvars32.bat"

Building BREWSim.dll1

To build BREWSim.dll1, do the following in a command prompt:
1. Enter: cd %BREWMP_PLATFORM%\..\sck\platform\system\brewcore\src\BREWSim
2. Enter: make V_TOOLCHAIN=VC7 V=Win32_Release install
To make a debug version of the SCK, enther the following in a command prompt: make V_TOOLCHAIN=VC7 install

Testing the SCK

This section describes how to test the SCK, including adding a print statement and linking to a static extension.

The following steps add a print statement to :
1. Add the following includes:
#include AEEdbg.h
#include AEEstd.h
2. Locate the function OEM_GetSimConfig, and add the following debug statement to it:
char msg[50];
std_strlprintf(msg, sizeof(msg), "$$$$$$$$$$$$$HELLO %s:%d", "world", 20);
dbg_Message(msg , DBG_MSG_LEVEL_MEDIUM, __FILE__ , __LINE__);
4. Run the following command: make V_TOOLCHAIN=VC7 install
5. Create a target from Target Manager using 1.0.2 Platform Pro (see the Brew MP Tools Reference on the Brew MP website for more information on creating a target)
6. Copy the following files from %BREWMP_PLATFORM%\..\sck\bin\Win32_Debug\ to your target s directory (to find your target s directory start Target Manager, and within Target Manager select Edit >Preferences >Targets Directory):
mod\BREWSim\BREWSim.dll1 to fs\mod\BREWSim\
mod\BREWSim\BREWSim.implib to fs\mod\BREWSim\
mod\BREWSim\BREWSim.pdb to fs\mod\BREWSim\
mif\BREWSim.mif to fs\mif\
7. Run your target in the Simulator, where you shoul see the debug statement in the Simulator output window.

To link in the static extension, follow these steps:
1. Create a new extension using the Brew MP Visual Studio Plugin (see the Tools Reference and/or the Brew MP Visual Studio C Primer on the Brew MP website for more information on using the Visual Studio Plugin).
2. Change the MyExt_New function signature to the following (NOTE: Ensure that it is not static):
int MyExt_New(IShell * piShell, AEECLSID classID, void ** ppo)
3. Edit c_basicextapp to use MyExt instead of c_basicext.
4. Compile MyExt and c_basicextapp to ensure functionality.
5. Add the MIF and MOD files corresponding to MyExt and c_basicextapp to the directory.
6. Run your application and extension in your target to ensure functionality.
7. Copy the .c, .h, and BID files for MyExt and c_basicextapp to a directory under .
8. Add the path to the MyExt and c_basicextapp code to VPATH.
9. Add MyExt to BREWSim_OBJS in .
10. Add and MyExt.h as includes to .
11. Add the following to the OEMModTable.c: extern int MyExt_New(IShell * pIShell, AEECLSID clsID, void ** ppobj);
12. Add an AEEStaticClassList for your class:
extern const
ASCF_PRIV), 0, NULL, MyExt_New}, NULL};
13. Add your class list name to aascBREW[ ] .
14. Compile using the following: make V_TOOLCHAIN=VC7 V=Win32_Release install
15. Copy your BREWSim MIF and MOD files to your target s directory.
16. Run your target in the Simulator and try your application with the extension.