Step1:
Open MS VC 6.0.
Step2: Setup your project
-
Assume your MAGIC101
SDK is installed to D:\MAGIC101
-
File>>New>>Projects
-
Choose MAGIC101 AppWizard
Beta 1 as your project's type.
-
Make
D:\MAGIC101\CodeTest\HelloWolrd
as project's loacation dir.
-
Make
HelloWorld as your project's name. Press
OK button.
-
MAGIC101
AppWizard's option dialogs will appear. In step 1, choose Nokia 9210
640x200 as your target device. Click Next button.
-
Input
a string (such as HLW) as your project's
symbol. Input a UID(such as 0x12345678.
) for your application. This is useful for make the device install
SIS file. Click Fininsh button.
-
Click
OK in the poped-up dialog.
-
Now
your first MAGIC101 application's project(HelloWorld)
are created.
Step3: Build and run your
project
-
Build HelloWorld.
It should be no errors or warnings.
-
Open project settings
dialog
-
At Debug sheet, input
D:\MAGIC101\Bin\DRDConsole.exe
as your "Executable for debug session" and input D:\MAGIC101\Bin
as "Working directory"
-
Run project. DRDConsole.exe
will appear.
-
Choose HelloWorld in
the listbox. Then press "Start" button (or press F1) to
run your application.
-
You'll find two UI frame(
MainUI / PlayUI ) are build automaticly for you.
Step4: Do something in your
application
-
Quit your application,
back to VC.
-
Open HWLPlayUI.cpp.
-
In HWLPlayUI::RenderScene
function: after "lpCanvas->Clear();" add tow line:
lpCanvas->SetFont(lpFonts[0]);//Choose a font for canvas.
lpCanvas->TextOut(120,20,MAGSTR("Hello World!!")) ;//Draw
a label.
-
Build your project and
run again to see different.
Step5: Make your application
run under SymbainOS emulator
-
Open a MS-DOS command
window. Goto D:\MAGIC101\CodeTest\HelloWorld\Epoc
directory.
-
Type "makmake HelloWorld
vc6".
-
Back to VC. Open D:\MAGIC101\CodeTest\HelloWorld\Epoc\HelloWorld.dsp
-
Make sure your "Build
target" is "Win32 Uni Debug"
-
Build your project.
-
Assume your SymbainOS
SDK is installed at D:\Symbian\6.0\NokiaCPP
and your emulator's "D:" driver is maped to folder D:\Symbian\6.0\NokiaCPP\Epoc32\Wins\d
Copy D:\Symbian\6.0\NokiaCPP\Epoc32\Release\wins\udeb\HellowWorld.dll
to D:\Symbian\6.0\NokiaCPP\Epoc32\Wins\d\101\Bin.
-
Run the emulator's debug
version.
-
If this is your first
time runing emulator after install MAGIC101 SDK. Install MGS.SIS located
at your emulator's "C:\".
-
Run "MGS"
in "Extra" group.
-
Same UI with DRDConsole
will appear. You can check if your application runs ok.
|