Create a software installation package for Windows mobile

Source: Internet
Author: User

InWindowsMobiledevelopment embedded software is not a j2me, but also a program written in other languages. At last, you can use cabwiz.exe as the packaging tool to create a packaging and installation program. I recently developed a project to understand that it is not only small but also powerful. I just finished a j2-based project under hp 4700 pda, used the IBM J9 virtual machine, and used the db2 everyplace embedded database. Finally, cabwiz is used to package the entire software. Share your experience with you. I hope that this experience will help you with your convenience.

Keywords: cabwiz.exe, cab, j2s, windows mobile 2003, windows CE,

 

 

Ii. Basic Process:

In fact, the process is very simple:

I. First, prepare your own programs and make installation plans, including the target paths and registration operations of these files.

2. Make a list of installation files in the key part of the package Installer. This is a file suffixed with. inf.

3. Run cabwiz.exe to generate the installation package file with the suffix ". cab ".

The most important thing is how to write this. inf file. This is the topic of this article. Here is a complete example.

 

Iii. Fan Wen app. inf

[Version]
Signature = "$ Windows NT $"
Provider ="Xilin_am@163.com"
CESignature = "$ Windows CE $"

[CEStrings]
CompanyName = "XXX company"
AppName = Mobile Data Center
InstallDir = % CE2 % jtzst

[CEDevice]

[Defainstall install]
CopyFiles = Files. Application, database, picture, urllink
CEShortcuts = Shortcuts

[SourceDisksNames]
1 =, "txt ",,.
2 =, "ShortCut ",,.
3 =, "LIB ",,.
4 =, "db",. jtzdb
5 =, "url ",,.

[SourceDisksFiles]
Mobile Data Center (pda). url = 5
Tz. jar = 3
Stwater.gif = 1
Atz. lnk = 2
DB2e_LOCK = 4
DSY_DATEINFO = 4
DSY_DATE_TYPE = 4
......
......
DSY_UNIT = 4
Isyncprefs = 4
[DestinationDirs]
Files. Application = 0, % InstallDir %
Shortcuts = 0, % InstallDir %
Database = 0 ,.
Picture = 0, % CE5 % individuals
Urllink = 0, % CE2 % favorites

[Database]
DB2e_LOCK, 0x00000001
DSY_DATEINFO, 0x00000001
......
......
DSY_UNIT, 0x00000001
Isyncprefs, 0x00000001
[Files. Application]
"Tz. jar", 0x00000001
"Atz. lnk", 0x00000001

[Picture]
"Stwater.gif", 0x00000001

[Urllink]
"Mobile Data Center (pda). url", 0x00000001
[Shortcuts]
% AppName %, 0, atz. lnk, % CE17 %
Iv. Inf file Introduction

. The inf file is composed of a series of paragraph segments. The names of each segment are defined in square brackets ([]). The names are case insensitive, I believe you will not get a node name with more than 255 bytes, because it is not sufficient. Each segment describes the object's target address, shortcuts, registration settings, and other information, which will be written into the. cab file. It plays a role in installation. Although these segments can be randomly arranged, the installation process will only determine the order of the segments in the inf file according to the name of each segment, but it is best to follow the order of the example to improve readability.

1. built-in macro string


First, you need to know that the inf file contains several fixed macro strings which all pointWindowsMobile System. Here the two % and intermediate words are regarded as macros. The directories they direct to are very intuitive and commonly used, which makes the subsequent configuration easy.

% CE1 % Program Files
% CE2 % Windows
% CE4 % WindowsStartUp
% CE5 % My Documents ents
% CE8 % Program FilesGames
% CE11 % WindowsStart MenuPrograms
% CE14 % WindowsStart MenuProgramsGames
% CE15 % WindowsFonts
% CE17 % WindowsStart Menu

2. Introduction to typical sections

The following table lists the typical sections in the Windows CE information (. inf) file of the device.


Each section contains specific items. Some of these items start with predefined keywords (such as AppName) or instructions pointing to other sections. The following table lists the typical commands in the. inf file.

Add the. inf file section

For some sections (such as DefaultInstall), you can create additional sections to list the files used in the installation process. However, the specified syntax must be used for these sections. For example, the CopyFiles command in section DefaultInstall points to multiple Files. the writer naming section for Application, database, picture, and urllink lists the target file names, source file names, and logos used during default installation.

[Defainstall install]
CopyFiles = Files. Application, database, picture, urllink
[Files. Application]
"Tz. jar", 0x00000001
"Atz. lnk", 0x00000001
......
5. Detailed description of typical section instances

1. Version

[Version] is required. You can specify the application creator and Version.
[Version]
Signature = "$ Windows NT $"; required. Specifies the. inf file pairOperating SystemValid String
Provider ="Xilin_am@163.com"; Enter the author's name here
CESignature = "$ Windows CE $"

Note that CESignature = "$ Windows CE $" cannot be changed.

2. CEStrings

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.