WM terminal installation package Creation

Source: Internet
Author: User

1. INF file Introduction

1. The inf file is composed of a series of segments. The segments are defined in square brackets. The segment names cannot exceed 255 bytes and are case insensitive. Each segment describes the object's target address, shortcuts, registration settings, and other information, which will be written into the. cab file. Each segment can be freely discharged.

2. Description

A. [Version] is required. You can specify the creator and Version of the application.

Signature = "$ Windows NT $"; required. Specifies the operating system to which the. inf file is valid.
Provider = "Test"; author's name
CESignature = "$ Windows CE $"; wince Platform

B. [CEStrings] required. Specify the application name and the default installation directory string replacement or string keyword

CompanyName = "XXXCompany"; note that if the string contains spaces and quotation marks, "" must be added. If not, the string can be left empty.
AppName = "TestApp"
InstallDir = % CE1 % \ % AppName %

The inf file contains several fixed macro strings that point to the fixed directory in the windows mobile System. The word between the following two % is a macro.

% CE1 % Program Files
% CE2 % Windows
% CE4 % Windows \ StartUp
% CE5 % My Documents ents
% CE8 % Program Files \ Games
% CE11 % Windows \ Start Menu \ Programs
% CE14 % Windows \ Start Menu \ Programs \ Games
% CE15 % Windows \ Fonts
% CE17 % Windows \ Start Menu

C. [Strings] is optional. It is used to define one or more string keywords, that is, to define your own macro Strings. If the project is used, you can add
Manufacturer = "Demo"

D. [CEDevice] is optional. Specify information such as the platform supported or not supported by the application, the Windows CE version number, the processor type value, and the name of the unsupported platform. If native components are used, a subset of each processor that is jointly supported by those components should be included so that only the CAB files generated for each processor can be installed on the device using the corresponding processor.
E. [SourceDisksNames]
Is the disk path where the source file program is located.
1 =, "cab", "D: \ oasourcedir \ programe \"

F. [SourceDisksFiles]
Is the list of source files to be packaged. The value = 1 next to it indicates the file path, that is, 1 in [SourceDisksNames.
Demo.exe = 1
You can add the name of any source file to be packaged in the format of file name. file type = 1
G. [defainstall install]
CEShortcuts = CEShortcuts1
CopyFiles = Files. Application

The CopyFiles parameter indicates how to decompress and copy files during installation, and the AddReg parameter indicates how to modify the Registry during installation. The CEShortcuts parameter indicates how to create a shortcut on the Wince desktop.

CopyFiles = followed by the field name, that is, what exactly do you want to copy. AddReg = works the same way. For example, in the tutorial, copyfiles‑files.common=*cabwiz.exe needs to copy a file,
You need to copy some Files to the specified directory for installation. The Files to be copied are in the [Files. Common] field. AddReg = RegData indicates that the installation program also needs to modify the registry. The modified content is in the [RegData] field.

H. [Files. Common]
Install and copy files to your mobile phone. Which files need to be copied during the target installation should be the same as the file name in [SourceDisksFiles. Demo.exe,demo.exe, 0
I. [Shortcuts]
About Application desktop shortcut settings:
Demo app,0, demo.exe, % InstallDir %
Field syntax description: the four fields are separated by commas. The content of the first three fields must be filled in.
The first field is the shortcut key name, that is, the name of the desktop shortcut in Wince.
0 indicates a file in the second domain, and any other non-zero number indicates a directory,
The third field is the target program (directory) of the shortcut key ),
The fourth field is the optional field, which is the directory for storing the shortcut key. The default directory is Shortcuts = "" in [DestinationDirs]. You can specify other directories.
J. [RegData]
Modify the Registry when installing the program on your mobile phone.

HKLM, SOFTWARE \ Microsoft \ Shell \ Rai \: CallAlert, BKBitmapFile, "\ Storage \ Application Data \ Home \ iMac \ call1.jpg"
The first "," indicates the names of the four major blocks in the Registry, which can be abbreviated directly. For example, HKLM in the template represents HKEY_LOCAL_MACHINE, and the other three are HKCR, HKCU, and HKU respectively.

The second "," indicates the specific path of the key you want to modify (if not, it will be automatically created), that is, the complete item (key) Name,

The third "," indicates the key you want to modify (that is, the Value Name we often see in the article modifying the registry). If it does not exist, the program will be automatically created,

The fourth "," indicates the value type. Currently, I only know that the integer is 0x00010001 (See Supplement 2). leave it blank for the dense data. ",. Finally, it is the Value you want to fill in.

3. Complete example:

1 [Version]
2 Signature = "$ Windows NT $"
3 Provider = solution
4 CESignature = "$ Windows CE $"
5
6 [CEStrings]
7. CompanyName = "company name"
8 AppName = "Application name"
9 InstallDir = % CE1 % \ Demo installation directory
10
11 [CEDevice]
12 VersionMin = 5.00
13 VersionMax = 5.00
14
15 [defainstall install]
16 CEShortcuts = Shortcuts
17 CopyFiles = Files. Application
18
19 [SourceDisksNames]
201 =, "cab", "D: \ Terminal \ Program \ project deployment \ production CAB \ Resources \"
21
22 [SourceDisksFiles]
23demo.exe = 1
24
25 [DestinationDirs]
26Files. Application = 0, % InstallDir %
27 Shortcuts = 0, % CE2 % \ Start Menu
28
29 [Files. Application]
30demo.exe, demo.exe, 0
31
32
33 [Shortcuts]
34test demo,0, demo.exe, % CE11 %

 

Ii. CAB Packaging

After writing the "inf' file, you can use cabwiz.exe to create the CAB installation package. You can write a batch: @ echo on
"D: \ Terminal Program \ project deployment \ production CAB \ cabwiz.exe" "D: \ Terminal \ Program \ project deployment \ production CAB \ miap. inf "/dest" D: \ Terminal \ Program \ project deployment \ production CAB \ Cabs "/err CabWiz. PPC. log/cpu ARMV5

Cabwiz.ddfw.makecab.exeneeds to be in the same directory as cabwiz.exe

Iii. Tool download

1. cabwiz.exe

2. CABManager 3.0 green free registration edition. In case of garbled Chinese shortcuts, you can use this tool to open the created CAB package and save it.

 

Related Article

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.