Beginner series (II)-create brew from scratch™Applications

Source: Internet
Author: User
Tags install brew
1. Download the brew SDK
The Brew SDK is available in brew 1.0, 1.1, and 2.0. You can download sdks of any version or all three versions.

When installing the brew SDK, select brew, brew1_0, brew1_1, or brew2_0 as the brew directory name. The directory name should not contain spaces or periods (such as brew1.1 ).

Select the SDK version used to create the application based on the brew version of the target handheld device. For example, LG VX-10 has brew version 1.1. Brew SDK 1.1 or a later version should be used when building applications used by the target device LG VX-10. For more information about SDK version compatibility, see I have an application written using 1.0.1.18 brew SDK. However, the brew API on my phone is 1.0.2.4. Will my application run on the phone?

For more information about handheld devices (including supported brew S/W versions), see the device data table provided by brew developer's external network.

2. Learn the basic components involved in developing applications using brew.

Brew emulator-a program used to execute and test applications in an environment simulating the functionality of a single handheld device.

The Brew MIF Editor-a program used to create and modify an MIF (module information file) file. Each application (module) You create requires an MIF file. It contains information about your application.

3. Start Microsoft Visual C ++ 6.0
Select new from the File menu and click the projects tab. Start the brew Application Wizard and complete all the steps as instructed. We recommend that you create an MIF when performing the "brew Application Wizard" pilot step (by clicking "MIF Editor "). For more information, see step 4.
Note: Sometimes you may not be able to start "(by clicking" MIF Editor/MIF Editor ")". In this case, you need to go to the brew SDK program list to manually start the MIF editor.
If you have only installed brew SDK 1.0, the "brew Application Wizard" cannot be found ". You must install brew SDK 1.1 or 2.0 to use the brew Application Wizard ".

During the brew SDK installation process, the brewdir environment variable is set and its value is set to the brew directory path. If you have installed Multiple brew sdks, check the brewdir value.

Check Method: Start> Control Panel> system> advanced> environment variable. Set brewdir to the brew directory path of the brew version you want to use when developing applications. For example, you can set brewdir to C:/program files/brew1_0.

4. After completing all the guiding steps of the BREW application wizard, you have completed the construction of the basic structure of the application. If you do not create an MIF file while executing the brew Application Wizard step in step 3, you need to perform the following operations before building/compiling the application:
Open the MIF editor. Click Create applet ". In the subsequent dialog box, enter the name of the application. This name must be the same as the project directory name of the application.

You can select to generate the class ID of the application locally (the unique ID of the BREW application ). Before submitting an application for authentication, you must use the class ID generator provided by brew developers for external network to generate the class ID.
Then you will be prompted to save the class ID in the bid file. You should save the bid file in the project directory.
Save the MIF file in the examples directory (for example, C:/program files/brew2_0/examples.
5. in Visual C ++, select the File View tab to open. c file. edit the file so that it contains the file you saved in the MIF editor. bid file: # include "MyApp. bid"

6. Check the following items before continuing and compiling the application:

Have you set the environment variable brewdir to the brew directory path of the brew version you want to use when compiling the application?
You can right-click aeeappgen. C or aeemodgen. C and click Properties. Check the file paths in the project to determine where they are from. Are they from the correct brew version directory? If not, make sure that the brewdir environment variable is set to the brew directory path of the brew version you want to use when developing the application. This ensures that you can easily use the new brew version to compile the application or link the application to the new brew version by changing the brewdir environment variable.

Last: delete aeeappgen. C and aeemodgen. C from the workspace, and then add again. To use this method, click Project> Add to project> files )..., then select aeeappgen from the/src directory of the brew SDK version used for application development. C and aeemodgen. c file.
Go to project> Settings)
The output file name in the Link tab must be shown in the example "MyApp. dll", but cannot be "/debug/MyApp. dll" or any other prefix directory.
7. Now, you can continue and compile the application as a DLL (compile-> compile MyApp. dll)

8. If no error occurs during application compilation, run the application using brew emulator. In emulator:
Set the MIF directory to a directory that contains the MIF file. For example, C:/program files/brew/applications/MIF /.
Set the applet directory to the parent directory of the project directory. For example, if the project directory is C:/program files/brew/applications/MyApp/, you must set the applet directory to C:/program files/brew/applications/
9. At this time, your application will be displayed in the emulator, but it does not have any features. To run the application, you must add more code to "MyApp. c", because the application is only a framework created by the wizard. When inserting specific code of an application, make sure that your application contains the applet structure (including aeeapplet); Make sure that aeeapplet_new is called using the applet structure size, instead of calling it using the aeeapplet size.

To continue developing applications, see brew SDK User Guide, brew developer online FAQ and knowledge base website, brew api reference, MIF editor guide, resource editor guide, and brew SDK.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.