|
|
|
This guide explains how to use the command-based build tool for UIQ 3 based projects and how to import and build for several of the IDEs that are supported.
The build command generates binaries in the project platform that is selected. Each platform has two targets, UREL and UDEB.
UREL is used for release binaries.
UDEB is used for debug binaries.
The project platform is per default WINSCW, but it is not difficult to add
other platforms. The platforms that are possible to use are listed in the bld.inf
file which is usually located in the \group folder of the project.
In this file, the section PRJ_PLATFORMS is used to list the enabled platforms. If the section is missing or does not have a list, it defaults to WINSCW. To add a platform just add the corresponding platform name to the list.
Platforms supported by the UIQ 3.0 SDK are WINSCW, ARMV5 and GCCE.
Example:
PRJ_PLATFORMS
// specify the platforms your component needs to be built for here
WINSCW
GCCE
To perform a build of your project you need to prepare the environment by issuing the following command in your project's group folder:
bldmake bldfiles
This command produces the necessary build information.
bldmake then carries out the following three-stage process:
| 1 | Creates the directory: |
|
| 2 | Generates makefiles for the component in this directory, |
|
| 3 | Produces a batch file called |
|
To start the build use the following syntax:
abld build [platform] [target] [project]
The batch file that calls the build script.
One of several possible commands. Tells the build script to build a project. See abld command syntax for more commands.
The platform you want to build, WINSCW or GCCE.
The target, UREL or UDEB, you want to build for a project.
If you have several project files in the same folder you can specify which project to build. When left blank, all projects will be built.
Some warnings are compiler specific they can be ignored. E.g. the code warrior compiler generates following warnings when building some of the examples:
Multiply defined section: _atexit in files abort_exit_win32.c.obj (MSL_All_MSE_Symbian_D.lib), uc_exe.obj (EEXE.LIB), keeping definition in uc_exe.obj
Multiply defined section: _memmove in files mem.c.obj (MSL_All_MSE_Symbian_D.lib), euser.dll (euser.lib), keeping definition in euser.dll
Multiply defined section: _memcpy in files mem.c.obj (MSL_All_MSE_Symbian_D.lib), euser.dll (euser.lib), keeping definition in euser.dll
Multiply defined section: _memset in files mem.c.obj (MSL_All_MSE_Symbian_D.lib), euser.dll (euser.lib), keeping definition in euser.dll
The GCC-E installer is included in the SDK and is located under epoc32\tools\distrib if the computer already has GCC-E installed.
As mentioned earlier, you will need to update the PRJ_PLATFORMS section in the bld.inf file to be able to build for GCC-E.
When importing projects into the Codewarrior IDE, Carbide or the Visual Studio 2003 IDE the following is important to keep in mind.
To import a project into Codewarrior , start your Codewarrior IDE. Choose Import project from .mmp file. The following dialog appears:
Choose your SDK version and click on Next.
Use the Browse button to locate the .mmp file you want to import. Specify which platform you want to build for and click Finish.
Now your project file is imported into Codewarrior.
Follow the steps below to enable uiq3 help in CodeWarrior:
| 1 | Locate the help folder. In the CodeWarrior installation location there is a folder named Help. |
|
| 2 | Rename the file |
|
| 3 | Copy the files |
|
| 4 | In the CodeWarrior Help folder, rename the |
|
| 5 | Restart CodeWarrior. |
|
To generate a project file for Visual Studio 2003, change your working directory to the directory where your project.mmp file is located. Then issue the following command:
Makmake project.mpp VS2003
The project file for Visual Studio 2003 will be located in the same directory as the command was issued in, if nothing else is specified.
Once this is done you can open the project file in Visual Studio 2003 via File->Open->Project.
Select the project file you want to open.
When opening projects in Carbide VS, just select the .mmp project file needed.
This is done from File->Import Symbian Project in Visual Studio .Net 2003.
If multiple .mmp files are used, the bld.inf file can be used instead.
Remember that you must have the SDK descriptors for the UIQ SDK enabled to be able to import an MMP-file. The SDK descriptors are available from the UIQ Developer Community website and need to be downloaded and installed separately.
When developing for Symbian based phones using Visual Studio it is recommended to enable Carbide.VS. This simplifies the work by making it possible to directly import the Symbian project files (*.MMP) without needing to prepare a *.vsproj as described in 5.2. The direct import makes the structure more viewable as it does not import all of the header files, which the makmake solution does.
Good to know is that if you make any changes in your project after importing the MMP file, they will be written back to the MMP file.
To install UIQ Help in Visual Studio:
| 1 | Open Explorer |
|
| 2 | Go to the folder where the SDK was installed |
|
| 3 | Open the folder |
|
| 4 | Doubble click on the file |
|
| 5 | Restart Visual Studio |
|
To uninstall UIQ Help in Visual Studio:
| 1 | Open Explorer |
|
| 2 | Go to the folder where the SDK was installed |
|
| 3 | Open the folder |
|
| 4 | Double click on the file |
|
| 5 | Restart Visual Studio |
|
The PATH needs to include the Visual Studio binaries, for example
C:\Program Files\Microsoft Visual Studio .NET 2003\Common7\Tools. The target for Visual
Studio .NET 2003 is named VS2003. To create project and solution files for VS, run
bldmake bldfiles, then for example abld makefile VS2003. The VS files will by default end up
in the /epoc32/build/<your project path>/winscw directory. When building with Visual
Studio .NET 2003, not using Carbide.vs, set the EPOCROOT variable to (use uppercase): EPOCROOT=\
When building from within VS .NET 2003, if you might get the error:
Performing Makefile project actions \Symbian\UIQ3SDK\epoc32\tools\make.exe: *** Recursive variable ‘PATH’ references itself (eventually). Stop. Project: error PRJ0019: A tool returned an error code from "Performing Makefile project actions"
This is most likely due to a bug that if the last item in your PATH environment variable ends with a backslash '\' without a following semicolon ';' the tool will fail. A workaround is to change the PATH statement to end without a backslash or add a semicolon, then rebuild the makefiles.
To import a Symbian project file (*.MMP) to your workspace use File->Import->Symbian MMP File.
Press Next to come to the next dialog. Click Browse to locate the MMP file you want to open. Mark the applicable SDKs and press Finish.
Your project is now imported into Carbide.c++.
This description applies to NetBeans 5.0, but similar actions should be performed also for other Java IDEs.
1 Add the J2ME compatible platform UIQ 3 SDK to the IDE.
2 Launch NetBeans 5.0 and select Tools -> Java Platform Manager:
3 Choose Add Platform and Add Java Platform dialog appears.
4 Select option Java Micro Edition Platform Emulator and then Next.
5 The IDE scans for compatible platforms and when done select Find More Java Platform Folders...
6 Find the following folder in the SDK installation: \epoc32\tools\java\sei\winscw\udeb\hmidp91 and then Search.
7 The search path should be listed in the Add Java Platform dialog. Ensure it is checked and then Next and Finish.
8 The UIQ 3 SDK platform should now be listed in the Java Platform Manager dialog.
1 Select Tools -> Java Platform Manager.
2 Select the UIQ 3 SDK platform and then Tools & Extensions -> Open Utilities:
3 In the field Agent Host type the emulator IP address which was set using the SDK Configurator.
4 Select Launch now.
5 The emulator is launched and is kept running (keep emulator running checked in the UIQ 3 SDK Utilities dialog).
6 Ready to debug projects!