Retalk about cab Packaging

Source: Internet
Author: User

Many developers use wince_cab_manager for cab packaging on M8 to display Chinese characters on the M8 desktop.

(The built-in cab packaging tool for Windows Mobile SDK: cabwiz.exe; cabwiz. DDF, which does not parse the Chinese characters contained in the. inf file correctly)

At the beginning, I thought the same way, but later I found that the mini-oneshell of M8 displays the applications and icons on the desktop by reading the registry,

So we only need to modify our own registry information.

# Define kxyz1_topdisplayname (text ("software name") # define kxyzsoftwareabb (text ("mysw") hkey; lptstr szsubkey = new tchar [max_path]; memset (szsubkey, 0, sizeof (tchar) * max_path); wcscpy_s (szsubkey, max_path, _ T ("Software \ meizu \ minioneshell \ main \"); wcscat_s (szsubkey, max_path, kxyzsoftwareabb); long nresult = regopenkeyex (HKEY_LOCAL_MACHINE, szsubkey, 0,0, & hkey); Delete [] szsubkey; szsubkey = NULL; If (error_success = nresult) {regsetvalueex (hkey, _ T ("displayname"), 0, REG_SZ, (lpbyte) kxyz1_topdisplayname, wcslen (bytes) * sizeof (tchar); regclosekey (hkey );}

 

In addition to the above modification, you also need to modify a place. Otherwise, when you use the optimization genie on M8 to view the application or uninstall the application, the software name is still an English character:

// The content of the following two fields comes from. INF file // You must modify the following content in the INF file at the same time/** [version] * Signature = "$ Windows NT $" * cesignature = "$ Windows CE $ "* provider =" your corporation "*/# define kxyzprovidername (text (" your corporation ")) /// ** [cestrings] * appname = "ruanjianmingzi" */# define kxyzappname (text ("plain") lptstr szappsubkey = new tchar [max_path]; memset (szappsubkey, 0, sizeof (tchar) * max_path); wcscpy_s (szappsubkey, max_path, _ T ("Software \ apps \"); wcscat_s (szappsubkey, max_path, kxyzprovidername ); digest (szappsubkey, max_path, _ T (""); // space wcscat_s (szappsubkey, max_path, kxyzappname); hkey happkey; nresult = regopenkeyex (Digest, szappsubkey, 0, 0, & happkey); Delete [] szappkey; szappkey = NULL; If (error_success = nresult) {regsetvalueex (happkey, _ T ("displayname"), 0, REG_SZ, (lpbyte) kxyz1_topdisplayname, wcslen (kxyz1_topdisplayname) * sizeof (tchar); regclosekey (happkey );}

Put the above Code at the end of the install_exit function in setupdll.

Of course, if you are worried that the installer does not automatically refresh the desktop, you can use the following APIs on M8: (I think the following APIs are mainly used to install programs through rapis)

 1 /**
2 * @ brief notifies shell to refresh the icon on the desktop, which is used to install the icon after the program.
3 * update
4 * @ return true, success; false, Failure
5 */
6 bool reloaddesktopicons ();

 

By extension, you can modify shortcuts on Windows Mobile.

Of course, you need to write a setupdll.

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.