PPCGeeks

PPCGeeks (http://forum.ppcgeeks.com/index.php)
-   HTC Titan (http://forum.ppcgeeks.com/forumdisplay.php?f=44)
-   -   Other Methods to make a cab file (http://forum.ppcgeeks.com/showthread.php?t=24458)

crwinger 04-19-2008 08:01 PM

Other Methods to make a cab file
 
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....

rstoyguy 04-19-2008 08:35 PM

Re: Other Methods to make a cab file
 
Quote:

Originally Posted by crwinger (Post 254521)
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....

Try this...
http://forum.ppcgeeks.com/showpost.p...9&postcount=23

InvincibleLiving 04-20-2008 02:22 PM

Re: Other Methods to make a cab file
 
Thx rstoy, i found that as an alternative, but dont really use it myself cause i could never find decent instructions on how to use it... win ce cab manager is still king in my book.

GoodThings2Life 04-20-2008 05:49 PM

Re: Other Methods to make a cab file
 
1 Attachment(s)
Quote:

Originally Posted by crwinger (Post 254521)
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.

GoodThings2Life 04-20-2008 05:49 PM

Re: Other Methods to make a cab file
 
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>

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.

InvincibleLiving 04-20-2008 06:11 PM

Re: Other Methods to make a cab file
 
that's a great, thorough explanation. the best and most concise i've seen on manual cab creation.

djlenoir 04-20-2008 09:35 PM

Re: Other Methods to make a cab file
 
Thanks for that great tutorial. To expand on some of the default Windows CE strings available, here is a list:

Value Standard directory
%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

InvincibleLiving 04-20-2008 09:36 PM

Re: Other Methods to make a cab file
 
Quote:

Originally Posted by djlenoir (Post 255189)
Thanks for that great tutorial. To expand on some of the default Windows CE strings available, here is a list:

Value Standard directory
%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

Thanks that's VERY helpful as well!

InvincibleLiving 04-27-2008 11:13 PM

Re: Other Methods to make a cab file
 
Ok i need to bump this... for the value standard directory, is there an entry for Storage Card? if i want to install something to the card vs. the device, how do i pull that off? thanks in advance this thread is a goldmine for people in the know.

GoodThings2Life 04-27-2008 11:44 PM

Re: Other Methods to make a cab file
 
Quote:

Originally Posted by nautica2450 (Post 263294)
Ok i need to bump this... for the value standard directory, is there an entry for Storage Card? if i want to install something to the card vs. the device, how do i pull that off? thanks in advance this thread is a goldmine for people in the know.

I'll check if there's a variable for it, but I usually just use "\Storage Card" (without quotes) as the path.

InvincibleLiving 04-28-2008 12:09 AM

Re: Other Methods to make a cab file
 
Thanks, i'll see how that works out

gmack 05-02-2008 09:26 PM

Re: Other Methods to make a cab file
 
Hi!

I'm a newbie that are trying to make a cab file. When i use "cabarc m myApp.cab *" i get "the file myApp.cab is not a valid Windows CE Setup File" if i use Win ce cab manager everything works OK, the differece i can see i that a .000 file i created.

Any one ??

(thanks in advance)

GoodThings2Life 05-02-2008 10:26 PM

Re: Other Methods to make a cab file
 
gmack,

Are you trying to install this via ActiveSync or direct from the phone?

I know the method works from the phone, not sure about ActiveSync since I hate it and try my best to avoid it. :)

gmack 05-03-2008 03:03 PM

Re: Other Methods to make a cab file
 
Hi

I'm using win xp to make the cab archive, and then i transfer the cab to my loox with activesync. to install the cab i use total commander and "dubbel click" on it. should i try to use the memory card to install it.

I have also tried to use the "-i" switch to set id to 0 (zero) cause wince cab manager keep saying that id is 2577

Edit:

Now i've done some more testing.

the only way i get the cab to install is to create the cab with wince cab manager and take the file "YOURAP~1.000" and add that to the directory so it will de include in the command line build of the cab

gmack 05-04-2008 03:49 PM

Re: Other Methods to make a cab file
 
Stupid me :)

the excellent tutorial that GoodThings2Life wrote is for smart phones, and i was trying it on a pda :)

now i done some more testing and found following:

It looks like the cab files differs depending on if you have a PDA (like me) and a smart phone.

To create the cab file you normaly write a .inf file and for a SP use cabwizsp.exe and for PDA's cabwiz.exe. The cabwizSP packs the files that should be included in the archive and creates and includes the install script in form of _setup.xml. the metod described by GoodThings2Life is only to skip inf and write the xml your self.

For PDA, you also create an .inf file ( you can use the same as used for SP i think) but use cabwiz.exe which also packs the files and makes an install script called "yourapplicationname".000 and includes it in the cab.

This .ooo file you cant write by hand i think, when it looks like it is complied/compressed. But i can be wrong here.

Last we have WinCE cab manager. It includes two setup files when you choose all types (id=0), bot the xml and .000 file. This makes it doesn't matter if you install it on PDA or SP.

I hope i got i right, if not....

(sorry if my english is bad)

GoodThings2Life 05-04-2008 04:50 PM

Re: Other Methods to make a cab file
 
I do all of my work on XP for the Mogul, Touch, Tilt, and i760 (since I have access to those for testing). If by PDA you mean Axim, iPaq, etc. then I can see how that might be a problem. I appreciate the follow-up on the matter. :)

gmack 05-04-2008 06:06 PM

Re: Other Methods to make a cab file
 
Yes i mean PPC like ipaq :)

I found this tool when looking for some freeware tool to make cab, it allows you to look at the structure of an existing cabs inf, and extract them.
http://www.codeppc.com/telechargemen...nf/msceinf.htm

I think if you find the answer to your problem/question and it works you leave a "feedback" to the thread and not just leave...

InvincibleLiving 05-04-2008 06:16 PM

Re: Other Methods to make a cab file
 
gmack is just racking up the thanks... keep the good finds coming!


All times are GMT -4. The time now is 02:13 AM.

Powered by vBulletin® ©2000 - 2025, Jelsoft Enterprises Ltd.
©2012 - PPCGeeks.com


Content Relevant URLs by vBSEO 3.6.0