View Single Post
  #4 (permalink)  
Old 04-20-2008, 05:49 PM
GoodThings2Life's Avatar
GoodThings2Life
Bringer of Good Things
Offline
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)
Post Re: Other Methods to make a cab file

Quote:
Originally Posted by crwinger View Post
Is there any other method other than wince cab manager for making a cab file? Need to utilize reg edits and exe's preferably something free....
Sure... you can always use the tried and true "manual" method:

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, 39 views) Click for barcode!
__________________
--Someday, bringing GoodThings2Life will become a Paradigm!--
Reply With Quote
This post has been thanked 4 times.