PPCGeeks Forums HTC Arrive HTC HD2 HTC Thunderbolt HTC Touch Pro 2 HTC Evo 4G HTC Evo 3D Samsung Galaxy S II Motorola Droid X Apple iPhone Blackberry
Go Back   PPCGeeks > Windows Mobile > Windows Mobile Software
Register Community Search

Notices


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 06-01-2008, 07:30 AM
GoodThings2Life's Avatar
Bringer of Good Things
Offline
Pocket PC: HTC TITAN
Carrier: AT&T
Location: Youngstown, OH
 
Join Date: Oct 2007
Posts: 2,121
Reputation: 10602
GoodThings2Life can't get a higher reputation levelGoodThings2Life can't get a higher reputation levelGoodThings2Life can't get a higher reputation levelGoodThings2Life can't get a higher reputation levelGoodThings2Life can't get a higher reputation levelGoodThings2Life can't get a higher reputation levelGoodThings2Life can't get a higher reputation levelGoodThings2Life can't get a higher reputation levelGoodThings2Life can't get a higher reputation levelGoodThings2Life can't get a higher reputation levelGoodThings2Life can't get a higher reputation level
Mentioned: 23 Post(s)
Tagged: 0 Thread(s)
Tutorial: Making CABs without WinCE CAB Manager

This post is a compliment to Saumann's WinCE CAB Manager tutorial, however, it provides instructions for a "manual" CAB creation method. The limitation of this method is that it only works for Smartphones and PPC devices, not PDA's since it will lack the .000 inf file information.

First, download the Microsoft CAB command line tools and extract the zip to your Windows\System32 folder on your computer (not on the phone).

Next, you'll need a _setup.xml file. I recommend the attached sample file. I called it _setup.txt, but when you save it, call it _setup.xml instead of .txt.

Now, you can use this template for anything you want to do. Here's how:

Your _setup.xml file must have the following beginning and end:
<wap-provisioningdoc>
...stuff here...
</wap-provisioningdoc>

Where you see "...stuff here..." that's the following sections:
<characteristic type="Install">
<parm name="InstallPhase" value="install" />
<parm name="OSVersionMin" value="5.0" />
<parm name="OSVersionMax" value="7.0" />
<parm name="AppName" value="Application Name" />
<parm name="InstallDir" value="%CE2%" translation="install" />
</characteristic>
%CE2% is the equivalent of \Windows. %CE1% is the equivalent of Program Files. So if you want to use \Program Files\MyApp, you need to use %CE1%\MyApp. The rest of the parameters above are pretty obvious.
<characteristic type="FileOperation">
<characteristic type="%CE11%\Games" translation="install">
<characteristic type="MakeDir" />
<characteristic type="Shortcut.lnk" translation="install">
<characteristic type="Shortcut">
<parm name="Source" value="%InstallDir%\Program.exe" translation="install" />
</characteristic>
</characteristic>
</characteristic>
<characteristic type="%InstallDir%" translation="install">
<characteristic type="MakeDir" />
<characteristic type="Filename.ext" translation="install">
<characteristic type="Extract">
<parm name="Source" value="Filename.001" />
</characteristic>
</characteristic>
</characteristic>
</characteristic>
This section handles file extraction and shortcut creation. %CE17% is \Windows\Start Menu, %CE11% is \Windows\Start Menu\Programs (which is generally recommended). %InstallDir% means the directory specified in the first section above. Note: *.000 and *.999 are rarely needed. Sometimes the CeSetup.dll is the *.999 file that performs some post-install registrations, but I have to see one that is actually required. The *.000 is what is created by WinCE Cab Manager and other compilers to basically do the same thing as _setup.xml. It is generally not necessary (some exceptions that I won't get into here).
<characteristic type="Registry">
<characteristic type="REG_KEY_PATH">
<parm name="REG_NAME" value="REG_VALUE" datatype="string" />
<noparam name="Test"
</characteristic>
<nocharacteristic name="REG_KEY_PATH" />
</characteristic>
This section handles registry edits. Basically, you have the HKLM and HKCU paths where REG_KEY_PATH is, then you have REG_NAME and REG_VALUE appropriately, ie. ParameterName = 1, where datatype is either string or integer (string or dword). Incidentally, noparam name="Test" means that you delete the value. nocharacteristic name="REG_KEY_PATH" means that you delete the entire key. Be extremely careful using those!!

Now, to put your files in place, let's say I want to cab up a file called MyApp.exe. To cab it, it should be 8 characters.###, such as 000MyApp.001, 000MyDLL.002, etc. Put them in the same files as your _setup.xml. I recommend somewhere simple like C:\MyCAB.

When you're ready, open a command prompt and use "cd \MyCab" to quickly get to that directory. Here's the command you need to make your cab:
cabarc n myapp.cab *
There ya go, you have a nice CAB with your files and _setup.xml file.

I'll post some more tricks in a follow-up post.
Attached Files
File Type: txt _setup.txt (1.2 KB, 199 views) Click for barcode!
File Type: zip CAB Command Line Tool.zip (220.2 KB, 259 views) Click for barcode!
__________________
--Someday, bringing GoodThings2Life will become a Paradigm!--

Last edited by GoodThings2Life; 06-01-2008 at 07:38 AM.
Reply With Quote
This post has been thanked 9 times.
  #2 (permalink)  
Old 06-01-2008, 07:31 AM
GoodThings2Life's Avatar
Bringer of Good Things
Offline
Pocket PC: HTC TITAN
Carrier: AT&T
Threadstarter
Location: Youngstown, OH
 
Join Date: Oct 2007
Posts: 2,121
Reputation: 10602
GoodThings2Life can't get a higher reputation levelGoodThings2Life can't get a higher reputation levelGoodThings2Life can't get a higher reputation levelGoodThings2Life can't get a higher reputation levelGoodThings2Life can't get a higher reputation levelGoodThings2Life can't get a higher reputation levelGoodThings2Life can't get a higher reputation levelGoodThings2Life can't get a higher reputation levelGoodThings2Life can't get a higher reputation levelGoodThings2Life can't get a higher reputation levelGoodThings2Life can't get a higher reputation level
Mentioned: 23 Post(s)
Tagged: 0 Thread(s)
Re: Tutorial: Making CABs without WinCE CAB Manager

Some more FileOperations tricks:

Delete an Existing File:

<characteristic type="%CE17%\Office Mobile\icon.lnk" translation="install">
<characteristic type="Delete">
<parm name="ForceDelete" />
</characteristic>
</characteristic>


Delete an Existing Folder:

<characteristic type="%CE11%\Games" translation="install">
<characteristic type="RemoveDir" />
</characteristic>


Variables for Standard Directories:
%CE1% \Program Files
%CE2% \Windows
%CE3% \Windows\Desktop
%CE4% \Windows\StartUp
%CE5% \My Documents
%CE6% \Program Files\Accessories
%CE7% \Program Files\Communications
%CE8% \Program Files\Games
%CE9% \Program Files\Pocket Outlook
%CE10% \Program Files\Office
%CE11% \Windows\Programs
%CE12% \Windows\Programs\Accessories
%CE13% \Windows\Programs\Communications
%CE14% \Windows\Programs\Games
%CE15% \Windows\Fonts
%CE16% \Windows\Recent
%CE17% \Windows\Favorites


This space reserved for future tricks. Incidentally, if someone knows of a way within _setup.xml to force a reboot after install, I'd appreciate knowing it.

Last edited by GoodThings2Life; 06-01-2008 at 07:33 AM.
Reply With Quote
This post has been thanked 4 times.
  #3 (permalink)  
Old 06-01-2008, 07:33 AM
GoodThings2Life's Avatar
Bringer of Good Things
Offline
Pocket PC: HTC TITAN
Carrier: AT&T
Threadstarter
Location: Youngstown, OH
 
Join Date: Oct 2007
Posts: 2,121
Reputation: 10602
GoodThings2Life can't get a higher reputation levelGoodThings2Life can't get a higher reputation levelGoodThings2Life can't get a higher reputation levelGoodThings2Life can't get a higher reputation levelGoodThings2Life can't get a higher reputation levelGoodThings2Life can't get a higher reputation levelGoodThings2Life can't get a higher reputation levelGoodThings2Life can't get a higher reputation levelGoodThings2Life can't get a higher reputation levelGoodThings2Life can't get a higher reputation levelGoodThings2Life can't get a higher reputation level
Mentioned: 23 Post(s)
Tagged: 0 Thread(s)
Re: Tutorial: Making CABs without WinCE CAB Manager

This space reserved for future tricks. Incidentally, if someone knows of a way within _setup.xml to force a reboot after install, I'd appreciate knowing it.
Reply With Quote
  #4 (permalink)  
Old 06-01-2008, 09:58 AM
Knether's Avatar
Regular 'Geeker
Offline
Pocket PC: Mogul, Touch
Carrier: VZW for 8 years now SERO
Location: Detroit, MI
 
Join Date: Feb 2007
Posts: 425
Reputation: 150
Knether is keeping up the good workKnether is keeping up the good work
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Re: Tutorial: Making CABs without WinCE CAB Manager

Youngstown?

I got family there...
__________________


Challenge me into a game of COD4. If you dare.
Reply With Quote
  #5 (permalink)  
Old 06-01-2008, 10:32 AM
rstoyguy's Avatar
SuperNoob
Offline
Pocket PC: iPhone 5s
Carrier: TMobile
Location: Wichita, KS
 
Join Date: Jan 2008
Posts: 6,309
Reputation: 23264
rstoyguy can't get a higher reputation levelrstoyguy can't get a higher reputation levelrstoyguy can't get a higher reputation levelrstoyguy can't get a higher reputation levelrstoyguy can't get a higher reputation levelrstoyguy can't get a higher reputation levelrstoyguy can't get a higher reputation levelrstoyguy can't get a higher reputation levelrstoyguy can't get a higher reputation levelrstoyguy can't get a higher reputation levelrstoyguy can't get a higher reputation level
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Re: Tutorial: Making CABs without WinCE CAB Manager

Quote:
Originally Posted by GoodThings2Life View Post

Variables for Standard Directories:

%CE1% \Program Files
%CE2% \Windows
%CE3% \Windows\Desktop
%CE4% \Windows\StartUp
%CE5% \My Documents
%CE6% \Program Files\Accessories
%CE7% \Program Files\Communications
%CE8% \Program Files\Games
%CE9% \Program Files\Pocket Outlook
%CE10% \Program Files\Office
%CE11% \Windows\Programs
%CE12% \Windows\Programs\Accessories
%CE13% \Windows\Programs\Communications
%CE14% \Windows\Programs\Games
%CE15% \Windows\Fonts
%CE16% \Windows\Recent
%CE17% \Windows\Favorites
Great write up! Here is a link to the macro strings supported by windows mobile. And a link to the SDK documentation.
(no biggy, folks confuse themselves with these all the time!)

Quote:
SDK Documentation for Windows Mobile-Based Pocket PCs
Installation Macro Strings for Mobile Applications


The following table shows the installation macros that you can use for Windows Mobile-based applications. Use these macros in the DestinationDirs section of the CabWiz setup .inf file.
Note Windows CE supports other predefined installation macros, such as %CE3% for \Windows\Desktop. However, these are not supported on Windows Mobile-based Pocket PCs, and their usage in an .inf file on a Pocket PC may have unexpected results.
Macro string.....Pocket PC directory
- - - - - - - - - - - - - - - - - - - - -
%CE1%...........\Program Files
%CE2%...........\Windows
%CE4%...........\Windows\StartUp
%CE5%...........\My Documents
%CE8%...........\Program Files\Games
%CE11%..........\Windows\Start Menu\Programs
%CE14%..........\Windows\Start Menu\Programs\Games
%CE15%..........\Windows\Fonts
%CE17%..........\Windows\Start Menu
__________________
If this post was helpfull, let me know by clicking Thanks!

Reply With Quote
This post has been thanked 2 times.
Reply

  PPCGeeks > Windows Mobile > Windows Mobile Software


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


LinkBacks (?)
LinkBack to this Thread: http://forum.ppcgeeks.com/windows-mobile-software/28124-tutorial-making-cabs-without-wince-cab-manager.html
Posted By For Type Date
[RELEASE] Touch Pro 2 Cleanup This thread Refback 10-05-2010 12:13 AM

All times are GMT -4. The time now is 05:01 AM.


Powered by vBulletin® ©2000 - 2024, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.6.0
©2012 - PPCGeeks.com