Contents:
=========
1. Install Brew SDK
2. Generate MIF
3. Create a skeleton project
4. Important Notes
1. Install Brew SDK
===================
a. Download an Install the Brew SDK, preferably 2.1.0. For Documentation reference 3.x SDK could be used.
b. To keep all the project file, mfx files machine independent, create an Environment Variable BREWSDK210EN pointing to the BREW SDK Directory. Please use DOS File formats in Environment variable. ( For 3.1.2 SDK use BREWSDK312EN, for a 2.0.1 Japanese SDK use BREWSDK201JP)
eg: Assuming the BREW SDK is installed in "F:\Program Files\BREW SDK v2.1.0" to get the DOS format use DIR /X /AD command.
************************************
F:\>dir /x /ad
Volume in drive C has no label.
Volume Serial Number is 8CC3-3122
04/14/2008 04:11 PM <DIR> PROGRA~1 Program Files
04/17/2008 10:57 AM <DIR> WINDOWS
************************************
The DOS file format of Program Files is PROGRA~1
************************************
F:\Program Files>dir /x /ad
Volume in drive C has no label.
04/17/2007 08:22 PM <DIR> BREW31~1.2 BREW 3.1.2
04/19/2007 05:57 PM <DIR> BREW31~1.3 BREW 3.1.3
04/19/2007 06:28 PM <DIR> BREW31~1.4 BREW 3.1.4
10/29/2007 04:43 PM <DIR> BREW31~1.5 BREW 3.1.5
07/24/2007 04:13 PM <DIR> BREWBR~1.0 BREW Browser v2.0.0
04/17/2007 08:43 PM <DIR> BREWSD~1.1 BREW SDK Tools 1.0.1
08/09/2007 03:25 PM <DIR> BREWSD~3.1 BREW SDK Tools 1.1.1
10/04/2007 01:04 AM <DIR> BREWSD~1.1SP BREW SDK Tools 1.1.1 SP01
01/21/2008 01:22 PM <DIR> BREWSD~2.1 BREW SDK v2.0.1
04/27/2007 02:48 PM <DIR> BREWSD~1.0 BREW SDK v2.1.0
04/19/2007 05:40 PM <DIR> BREWSD~1.3 BREW SDK v2.1.3
07/26/2007 12:33 AM <DIR> BREWUI~1 BREW UI Widgets
*******************************
The DOS file format for BREW SDK v2.1.0 is BREWSD~1.0 (**Note: This is system dependent**)
So the path to the BREW SDK is F:\PROGRA~1\BREWSD~1.0\
To add Environment Variable
1. Right-Click "My Computer"
2. Properties->Advanced->Environment Variable
3. Click "New" under the "System Variable" Section
4. Add Variable Name as BREWSDK210EN
5. Add Variable Value as F:\PROGRA~1\BREWSD~1.0\
2. Generate MIF
===============
a. Open MIF Editor, listed under BREW SDK Tools
b. In the BREW MIF Editor window, click the Applets tab.
c. Create a new applet, by clicking the New Button in the List of Applets defined in this Module. The "Specify BREW Class ID" Windows pops.
d. Select the Locally Radio Button.
e. Add a unique Class ID (say "0x12345678", ( you should create new class id's every time you create a new project ).
f. Also put the put the Class Name (say "FIRSTHELLOWORLD")
g. Click Ok, you will be prompted to generate file. Save the BID file in the Project Directory. ( FIRSTHELLOWORLD.bid )
h. For 2.1.0, add the Images from the "images" Directory
* Large -> BrewImage-1.bmp
* Medium -> BrewIcon-1.bmp
* Small -> Games16x16-1.bmp
i. Now Save the file in the project directory. ( firsthelloworld.mfx )
j. To make the MFX machine independent use relative path.
* I have created a copy of firsthelloworld.mfx created in Step 2.i as
firsthelloworld.mfx.start
* Now edit the firsthelloworld.mfx in Notepad (any Text
Editor), find the below
**************
<Object Id="21" Name="IDI_OBJECT_21">
<File>F:\temp\firsthelloworld\images\BrewIcon-1.bmp</File>
</Object>
<Object Id="22" Name="IDI_OBJECT_22">
<File>F:\temp\CVS_Work\firsthelloworld\images\BrewImage-1.bmp</File>
</Object>
<Object Id="23" Name="IDI_OBJECT_23">
<File>F:\temp\CVS_Work\firsthelloworld\images\Games16x16-1.bmp</File>
</Object>
*************
When MFX is compiled in another system, the project directory could be anything but E:\Work\CVS_Work\firsthelloworld, so use relative path ".". Dot (.) stands for Current Directory.
**************
<Object Id="21" Name="IDI_OBJECT_21">
<File>.\images\BrewIcon-1.bmp</File>
</Object>
<Object Id="22" Name="IDI_OBJECT_22">
<File>.\images\BrewImage-1.bmp</File>
</Object>
<Object Id="23" Name="IDI_OBJECT_23">
<File>.\images\Games16x16-1.bmp</File>
</Object>
*************
Now open this edited MFX file and Compile. ( Output firsthelloworld.mif ).
One inconveneice with MIF Editor is any time you edit the MFX file, it will replace the Relative Path with Actual Path, so everytime you "save" the file, edit with with a notepad after saving.
3. Creating a Skeleton Project
==============================
3.1 New Project
---------------
a. Open Visual Studio 2005 Express Edition
b. Create a New Project
c. Choose Project Type as Win32
d. Choose Template as Windows Console Application
e. Name: firsthelloworld
f. Location: As your preference
g. Unselect "Create directory for solution"
h. OK -> Next
i. Select "Empty Project"
j. Unselect "Precompiled header"
k. Finished
Now the Solution Explorer Pane Contains:
firsthelloworld
* Header Files
* Resource Files
* Source Files
3.2 Adding Files
----------------
a. Right-Click on firsthelloworld project, Add -> Existing Items
b. Add AeeAppGen.c and AeeModGen.c in the src folder of BREWSDK directory.
3.3 Setting Up a Brew Application
a. Right-Click on firsthelloworld project, Properties
b. Make sure the Configuration Name is Active(Debug)
c. On the Left Pane, Configuration Properties -> General
* Set Configuration Type = Dynamic Library (.dll)
d. Configuration Properties -> Linker -> General
* Set OutputFile = $(OutDir)\$(ProjectName).dll
e. Configuration Properties -> C/C++ -> Preprocessor
* Preprocessor = WIN32;_DEBUG;_WINDOWS;_USRDLL;AEE_SIMULATOR
f. Configuration Properties -> C/C++ -> General
Additional Include Directories ->"E:\Program Files\BREW SDK v2.1.0\inc"
(Note: Please quotes around the directory name, the the directory name contains space ).
g. Now Apply, and Build the project.
You should get the following Errors:
**********************************
------ Build started: Project: firsthelloworld, Configuration: Debug Win32 ------
Compiling...
AEEModGen.c
AEEAppGen.c
Generating Code...
Compiling manifest to resources...
Linking...
Creating library f:\temp\firsthelloworld\Debug\firsthelloworld.lib and object f:\temp\firsthelloworld\Debug\firsthelloworld.exp
AEEModGen.obj : error LNK2019: unresolved external symbol _AEEClsCreateInstance referenced in function _AEEMod_CreateInstance
f:\temp\firsthelloworld\Debug\firsthelloworld.dll : fatal error LNK1120: 1 unresolved externals
Build log was saved at "file://f:\temp\firsthelloworld\Debug\BuildLog.htm"
firsthelloworld - 2 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
*********************************
3.4 Building the DLL
--------------------
a. Now copy helloworld.c from the BREWSDK Examples to the project directory
b. Add the File to the Project.
* Right Click on firsthelloworld
* Add -> Existing Items -> Select the helloworld.c
c. Change #include "helloworld.bid" to #include "firsthelloworld.bid"
d. Compile the project. (This should build successfully)
There should be a dll file in Debug Directory
With this you won't be able to run the dll.
3.5 Running the Application
---------------------------
Let us start from scratch. Delete the BREW_Emu.dat in the bin directory of the BREW SDK. This file contains the basic settings.
a. Create a Directory known a BrewAppRepository or something similar
b. Create an Environment variable named BREWAPP pointing to the BrewAppRepository. (Refer above document on how to create Envirnment Variables).
c. Make a directory inside BrewAppRepository as firsthelloworld.
d. Copy the firsthelloworld.dll from the Debug Directory into the newly created folder.
e. Copy the firsthelloworld.mif into BrewAppRepository
f. Now Start->Program Files->BREW SDK xxx->Brew Simulator/Emulator
g. A Settings Dialog is displayed
h. Choose the Device as the Initial Device from the Devices Directory of the BREW SDK
i. Choose BrewAppRepository as the Applet Directory.
j. Click OK
You should see the able to see the FIRSTHELLOWORLD Application icon. On clicking it, "Hello World" will be displayed.
Now, this requires you manual copy the dll every time you build the dll. And you need to run the emulator from Start->Program files. There many ways to avoid this problem.
1. Post Build Script
2. Setting Output Directory
With the above solution, you need to set as to how you want to run the dll.
* Go to Project properties ( Right Click on firsthelloworld -> Properties )
* Configuration Properties -> Debugging
Command = <Select the BREW_Emulator.exe in the bin directory on the Brew SDK> ( In 3.x and greater it is known as BREW_Simulator.exe )
This is a User Based Setting, that means on every time you copy the project into a different User Space or System, you need to do this setting.
* Now Press F5 or Debug -> Start Debugging
3.5.1 Post Build Script
Simple Shell Scripts which will copy the dll to the Brew Applet directory.
a. Go to Project properties ( Right Click on firsthelloworld -> Properties )
b. Configuration Properties -> Build Events -> Post-Build Events
Command Line = copy Debug\firsthelloworld.dll $(BREWAPP)\firsthelloworld\
(Note: I am using Environment Variable)
********************** After every build
Performing Post-Build Event...
1 file(s) copied.
**********************
3.5.2 Setting Output Directory
a. Go to Project properties
b. Configuration Properties -> Linker
Output Directory = $(BREWAPP)\$(ProjectName)\$(ProjectName).dll
3.6 Adding Debug Information
----------------------------
I have made a copy of the Project File before I started adding Debug Information. ( firsthelloworld.vcproj.withoutDebug )
a. Go to Project Properties
b. Configuration Properties -> C/C++ -> General
* Debug Information Format = Program Database for Edit & Continue
* Warning Level = Level 4
* Detect 64-bit Portability Issues = No
c. Configuration Properties -> C/C++ -> Browse Information
* Enable Browse Information = Include All Browse Information
d. Configuration Properties -> Linker -> Debugging
* Generate Debug Info = YES
3.7 Making it System Independent
--------------------------------
I have made a copy of the Project File before I make it system Independent
( firsthelloworld.vcproj.systemDependent )
a. Close VS 2005 Express
b. Edit the firsthelloworld.vcproj wit a Text Edit ( Notepad, Vi )
c. Replace all instance of the BREW SDK Directory (say E:\Program Files\BREW SDK v2.1.0) with $(BREWSDK210EN).
d. Save and exit
4. Important Notes
==================
a. Always restart the VS 2005 Express after adding a new Environment.
b. Always close all instance of VS 2005 Express, when you edit the vcproj file using Text Editor
This document is licensed under the Creative Commons Attribution 3.0 Unported License ( http://creativecommons.org/licenses/by/3.0/ )
Subscribe to:
Post Comments (Atom)
53 comments:
Hello, excellent tutorial, really :-). I followed it with Visual Studio 2008, BREW SDK 3.1.5 and BREW SDK TOOLS 1.1.1 and all worked perfectly. Good job!!!
[u][b]Xrumer[/b][/u]
[b]Xrumer SEO Professionals
As Xrumer experts, we secure been using [url=http://www.xrumer-seo.com]Xrumer[/url] quest of a wish leisure for the time being and grasp how to harness the colossal power of Xrumer and adapt it into a Spondulix machine.
We also purvey the cheapest prices on the market. Assorted competitors devise charge 2x or even 3x and a end of the opportunity 5x what we charge you. But we feel in providing gigantic help at a tearful affordable rate. The entire something of purchasing Xrumer blasts is because it is a cheaper surrogate to buying Xrumer. So we plan to stifle that mental activity in rebuke and outfit you with the cheapest grade possible.
Not just do we have the unexcelled prices but our turnaround occasion for the treatment of your Xrumer posting is super fast. We drive secure your posting done in the forefront you distinguish it.
We also outfit you with a sated log of loaded posts on different forums. So that you can see for yourself the power of Xrumer and how we have harnessed it to help your site.[/b]
[b]Search Engine Optimization
Using Xrumer you can expect to see thousands upon thousands of backlinks in behalf of your site. Myriad of the forums that your Location you settle upon be posted on get great PageRank. Having your link on these sites can categorically expropriate strengthen up some crown quality endorse links and uncommonly as well your Alexa Rating and Google PageRank rating through the roof.
This is making your put more and more popular. And with this increase in reputation as superbly as PageRank you can expect to witness your site really filthy high in those Search Motor Results.
Above
The amount of transportation that can be obtained before harnessing the power of Xrumer is enormous. You are publishing your site to tens of thousands of forums. With our higher packages you may still be publishing your locality to HUNDREDS of THOUSANDS of forums. Imagine 1 post on a all the rage forum drive inveterately cotton on to a leave 1000 or so views, with say 100 of those people visiting your site. These days create tens of thousands of posts on in demand forums all getting 1000 views each. Your traffic liking withdraw because of the roof.
These are all targeted visitors that are interested or curious nearly your site. Assume how many sales or leads you can fulfil with this colossal loads of targeted visitors. You are in fact stumbling upon a goldmine primed to be picked and profited from.
Keep in mind, Traffic is Money.
[/b]
GET YOUR CHEAPLY BLAST TODAY:
http://www.xrumer-seo.com
[B]NZBsRus.com[/B]
No More Laggin Downloads Using NZB Downloads You Can Rapidly Search Movies, Console Games, MP3 Albums, Software and Download Them @ Electric Speeds
[URL=http://www.nzbsrus.com][B]Newsgroup Search[/B][/URL]
Yes if the truth be known, in some moments I can reveal that I agree with you, but you may be considering other options.
to the article there is quiet a suspect as you did in the downgrade publication of this demand www.google.com/ie?as_q=hard disk sentinel pro 2.10 ?
I noticed the utter you procure not used. Or you profit by the dreary methods of helping of the resource. I take a week and do necheg
Own up to pass the unmerciful with two backs casinos? bond this grassy [url=http://www.realcazinoz.com]casino[/url] captain and wing it denigrate online casino games like slots, blackjack, roulette, baccarat and more at www.realcazinoz.com .
you can also disappoint our blooming [url=http://freecasinogames2010.webs.com]casino[/url] disdain at http://freecasinogames2010.webs.com and be beneficiary to in faithful to memoirs compressed currency !
another voguish [url=http://www.ttittancasino.com]casino spiele[/url] allure is www.ttittancasino.com , because german gamblers, sprig in manumitted online casino bonus.
older women dating young guys [url=http://loveepicentre.com/]internet dating sites[/url] virginia dating laws http://loveepicentre.com/ dating uk
Hi,
This is an excellent tutorial. I am trying it on VS 2008. Unfortunately, during compile time I get this error: Compiling manifest to resources...
Project : error PRJ0003 : Error spawning 'rc.exe'.
Build log was saved at "file://c:\Documents and Settings\Owner.HOME\My Documents\Visual Studio 2008\Projects\firsthelloworld\Debug\BuildLog.htm"
firsthelloworld - 1 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped
Can you guide me on this?
Thanks
Genial post and this post helped me alot in my college assignement. Say thank you you for your information.
[url=http://www.23planet.com]casino[/url], also known as accepted casinos or Internet casinos, are online versions of inimitable ("buddy and mortar") casinos. Online casinos let someone admit of gamblers to tone down and wager on casino games barrel the Internet.
Online casinos typically invite odds and payback percentages that are comparable to land-based casinos. Some online casinos make a case on higher payback percentages as a nostrum looking all the way through awaiting orders within earshot to account automobile games, and some herald payout structuring audits on their websites. Assuming that the online casino is using an aptly programmed indefinitely spaciousness a recapitulate up generator, enumerate games like blackjack solicitation foreordained for an established restrain edge. The payout bulk business of these games are established be means of the rules of the game.
Multitudinous online casinos lease visible or capture their software from companies like Microgaming, Realtime Gaming, Playtech, Cosmopolitan Chicane Technology and CryptoLogic Inc.
viagra online without prescription buy viagra germany - generic viagra online from us
order soma description of soma medication - soma usa
buy soma long does 350 mg soma last - tickets for soma san diego
buy soma soma bras coupons - buy generic soma no prescription
buy soma aura soma buy online - soma muscle relaxer abuse
soma buy soma urban dictionary - buy generic somatropin
discount soma soma muscle relaxer recreational - soma quad gate
buy tramadol 100mg where to buy tramadol online - tramadol 50 mg over counter
buy tramadol can order tramadol online - 250mg tramadol high
buy tramadol tramadol hcl good pain - buy tramadol online in florida
xanax online cheap xanax buy - xanax 66 256
how to buy cialis buy cialis england - low dose cialis online
buy cialis in usa buy cialis online new zealand - cialis online overnight shipping
cialis online buy viagra or cialis online - buy generic cialis online
klonopin pharmacy klonopin under tongue - klonopin long term side effects
http://buytramadolonlinecool.com/#28875 buy tramadol paypal - buy tramadol in missouri
klonopin mg how long does klonopin 2mg last - can you get high klonopin 0.5 mg
buy tramadol hcl 100mg tramadol every 4 hours - does tramadol hcl 50 mg have acetaminophen
klonopin buy possible die klonopin overdose - klonopin drug overdose
http://landvoicelearning.com/#30896 tramadol constipation - tramadol 50 mg para que es
order tramadol no prescription buy tramadol online cash on delivery - purchase tramadol online cheap
http://landvoicelearning.com/#21906 is tramadol for dogs an nsaid - tramadol high cholesterol
http://buytramadolonlinecool.com/#96430 withdrawal of tramadol - tramadol 50mg dosage humans
tramadol buy tramadol buy 100 mg - tramadol generic for ultram
http://www.integrativeonc.org/adminsio/buyklonopinonline/#buy overdose with klonopin - klonopin withdrawal palpitations
buy klonopin online klonopin high vs xanax - klonopin jaw clenching
Post a Comment