Jump to content


Photo

Tutorial: Creating Cab Files

- - - - -

  • Please log in to reply
14 replies to this topic

#1
w411y

w411y

    Hardcore

  • Members
  • PipPipPipPipPipPip
  • 1,516 posts
  • Location:Pontypridd, Wales
  • Devices:SPV M1500 & SPV C550
Before I begin... all credit must go to GPCarreon[MVP] who passed his knowledge of cab creating on to lucky old me :D


Unpack the attatched file and put the folder "Cab Creating Tools" somewhere.
Now you got to create an inf file which tells the cab what to do. So lets look at the one for my Homer Screen....

[Version]
Signature="$Windows NT$"
CESignature="$Windows CE$"
Provider="w411y"

[CEStrings]
Appname="w411y-HomerSimpsonWM5"

[CEDevice]
ProcessorType=0

- Everything under [Version] is simple enough. Just change the 'Provider'

-[CE Strings] is what will be said when asked to install. So when running it will say "Do you want to install w411y - HomerSimpson?" and ovcourse you click YES :D

[SourceDisksNames]
1=,Source1,,"Homer"
2=,Source2,,"Sounds"
3=,Source3,,"WMP Skin"

-[Source Disk Names] ... these are the names of folders in the Cab Creating Tools folder. So in the folder you just downloaded (including cabwizSP etc" there are also folders named 'Homer' which includes the images and XML. A folder for 'Sounds' and for files to do with the 'WMP Skin'

[SourceDisksFiles]
"w411y-HomerSimpson.home.xml"=1
"HomerSimpson-Background.jpg"=1
"HomerSimpson-Message.jpg"=1
"HomerSimpson-Profile.jpg"=1
"HomerSimpson-Error.gif"=1
"HomerSimpson-Warning.gif"=1
"HomerSimpson-Info.gif"=1
"HomerSimpson-Question.gif"=1
"HomerSimpson-Volume.gif"=1
"HomerSimpson-Menu.gif"=1
"HomerSimpson-Startup1.gif"=1
"HomerSimpson-Startup2.gif"=1
"HomerSimpson-Shutdown1.gif"=1
"HomerSimpson-Shutdown2.gif"=1
"HomerSimpson-Multimedia.gif"=1
"HomerSimpson-Background(Non Orange).jpg"=1
"w411y-HomerSimpson(Non Orange Phones).home.xml"=1
"HomerSimpson-Banner.gif"=1
"HomerSimpson-CanIGoNow.wav"=2
"HomerSimpson-Fail.wav"=2
"HomerSimpson-MailIsHere.wav"=2
"HomerSimpson-Squeel.wav"=2
"The Simpsons Theme Tune.wav"=2
"HomerBackground.jpg"=3
"HomerDisabled.jpg"=3
"HomerPushed.jpg"=3
"HomerWMP.skn"=3

-[Source Disc Files] ... here you list all the files involved in the cab and then give them a number. (as later on in the inf you will say Copy all files = 1 to the following folder...")

[CopyFiles1]
"w411y-HomerSimpson.home.xml"
"HomerSimpson-Background.jpg"
"HomerSimpson-Message.jpg"
"HomerSimpson-Profile.jpg"
"HomerSimpson-Error.gif"
"HomerSimpson-Warning.gif"
"HomerSimpson-Info.gif"
"HomerSimpson-Question.gif"
"HomerSimpson-Volume.gif"
"HomerSimpson-Menu.gif"
"HomerSimpson-Startup1.gif"
"HomerSimpson-Startup2.gif"
"HomerSimpson-Shutdown1.gif"
"HomerSimpson-Shutdown2.gif"
"HomerSimpson-Multimedia.gif"
"HomerSimpson-Background(Non Orange).jpg"
"w411y-HomerSimpson(Non Orange Phones).home.xml"
"HomerSimpson-Banner.gif"

[CopyFiles2]
"HomerSimpson-CanIGoNow.wav"
"HomerSimpson-Fail.wav"
"HomerSimpson-MailIsHere.wav"
"HomerSimpson-Squeel.wav"
"The Simpsons Theme Tune.wav"

[CopyFiles3]
"HomerBackground.jpg"
"HomerDisabled.jpg"
"HomerPushed.jpg"
"HomerWMP.skn"

-[CopyFiles1] ... these are all the files that are =1 (Same applies for [CopyFiles2] and [CopyFiles3])

[DestinationDirs]
CopyFiles1=0,"\Application Data\Home"
CopyFiles2=0,"\Application Data\Sounds"
CopyFiles3=0,"\Application Data\Microsoft\Media Player"

-[DestinationDirs] ... these are where your files are copied. So [CopyFiles1] will end up in "Application Data\Home"

[RegData]
HKLM,Software\Microsoft\Splash Screen, CarrierBitmap,, \Application Data\Home\HomerSimpson-Startup1.gif
HKLM,Software\Microsoft\Splash Screen, CarrierShutdownBitmap,, \Application Data\Home\HomerSimpson-Shutdown2.gif
HKLM,Software\Microsoft\Splash Screen, MSBitmap,, \Application Data\Home\HomerSimpson-Startup2.gif
HKLM,Software\Microsoft\Splash Screen, MSShutdownBitmap,, \Application Data\Home\HomerSimpson-Shutdown1.gif
HKLM,Software\Microsoft\Shell\Rai\:ErrorBox, BKBitmapFile,, \Application Data\Home\HomerSimpson-Error.gif
HKLM,Software\Microsoft\Shell\Rai\:ExclamationBox, BKBitmapFile,, \Application Data\Home\HomerSimpson-Warning.gif
HKLM,Software\Microsoft\Shell\Rai\:InformationBox, BKBitmapFile,, \Application Data\Home\HomerSimpson-Info.gif
HKLM,Software\Microsoft\Shell\Rai\:QuestionBox, BKBitmapFile,, \Application Data\Home\HomerSimpson-Question.gif
HKLM,Software\Microsoft\Shell\Rai\:VolDlg, BKBitmapFile,, \Application Data\Home\HomerSimpson-Volume.gif
HKCU,ControlPanel\Sounds\Shutdown, Sound,, \Application Data\Sounds\HomerSimpson-CanIGoNow.wav
HKCU,ControlPanel\Sounds\SystemStart, Script,, ap
HKLM,Software\HTC\Album, AudioBK,, \Application Data\Home\HomerSimpson-Multimedia.gif

-[RegData] ... these are the Reg tweaks I am including (for system screens)

[DefaultInstall]
CopyFiles=CopyFiles1, CopyFiles2, CopyFiles3
AddReg=RegData

-[Default Install] .. this is what the cab does. So it will put the files from 'CopyFiles1/2/3' into their chosen 'DestinationDirs' and will apply the 'RegData'

Now save the file (from Notepad or your chosen text editor) as *.inf and make sure file type is set to 'all files'

Now drag your .inf file onto CabWizSP in the Cab Creating Tools folder and your Cab should appearin the folder. And thats it. One word of warning.... the paths on WM5 are different to WM2003... ie there is no Storage part to the WM5 OS

Fingers crossed this will get pinned so that everyone can see and none of you have an excuse as to why you havn't included extra screens in your homescreens :)
More info here...http://www.gpcarreon.com/?p=93
Hope this helps :) Good luck

Note: Dont forget to post any outcomes which have been helped by this tutorial :D

Attached Files


Edited by w411y, 01 February 2006 - 07:02 PM.

  • 0

#2
pbrown

pbrown

    Newbie

  • Members
  • Pip
  • 9 posts
  • Devices:Cingular SMT 5600
Darn you, man! Now I will be up past my bedtime for a week again adding more stuff to my theme. I'm going to have to blame you when I can't stay awake in meetings!

  • 0

#3
w411y

w411y

    Hardcore

  • Members
  • PipPipPipPipPipPip
  • 1,516 posts
  • Location:Pontypridd, Wales
  • Devices:SPV M1500 & SPV C550

Darn you, man! Now I will be up past my bedtime for a week again adding more stuff to my theme. I'm going to have to blame you when I can't stay awake in meetings!

<{POST_SNAPBACK}>


:) Can you stay awake in them anyway?
Looking forward to seeing your outcome :D

  • 0

#4
pbrown

pbrown

    Newbie

  • Members
  • Pip
  • 9 posts
  • Devices:Cingular SMT 5600
Hey W-

You say "Unpack the attatched file and put the folder "Cab Creating Tools" somewhere." in your post, but I don't see an attachment... am I missing something?

  • 0

#5
w411y

w411y

    Hardcore

  • Members
  • PipPipPipPipPipPip
  • 1,516 posts
  • Location:Pontypridd, Wales
  • Devices:SPV M1500 & SPV C550
D'oh ! I'm sure I put it there. Unless its been removed?
Thanks for pointing out Ill upload now.

  • 0

#6
laia

laia

    Newbie

  • Members
  • Pip
  • 2 posts
Thank you for this useful post.
I would like to know if it's possible to install different files with the same name. That is, I have a subdirectory with files that have the same name as other files in another subdirectory. Then I want to add them in a CAB file and then extract them in different subdirectories, so it should be possible to have repeated names because the files will never share the same directory. But I suppose that the CAB application is copying all the files at once in some temporary directory because when I extract the CAB file, though the subdirectories and files are created correctly, all the files with the same name have the same content. I mean, the files with the same name are overwritten in some phase of the CAB creation or extraction, so all of them are the same file at the end.

  • 0

#7
gpcarreon (MVP)

gpcarreon (MVP)

    RN, MS MVP-MD

  • Members
  • PipPipPipPipPipPip
  • 4,528 posts
  • Location:Legazpi, Philippines
  • Devices:Cherry Mobile Eclipse
Hi there. :rolleyes:

The sample INF codes below will install 'Sample File.txt' on 2 different sub-directories: '\Storage\1' and '\Storage\2'

[Version]
Signature="$Windows NT$"
CESignature="$Windows CE$"
Provider="Your Name Here"

[CEStrings]
AppName="Your App Name Here"

[CEDevice]
ProcessorType=0

[SourceDisksNames]
2=,Folder2,,"2"
1=,Folder1,,"1"

[SourceDisksFiles]
"Sample File.txt"=2
"Sample File.txt"=1

[2]
"Sample File.txt"

[1]
"Sample File.txt"

[DestinationDirs]
2=0,"\Storage\2"
1=0,"\Storage\1"

[DefaultInstall]
CopyFiles=1, 2

  • 0
2425a96d204b681be05922b8a6b210c80f03f237

#8
gpcarreon (MVP)

gpcarreon (MVP)

    RN, MS MVP-MD

  • Members
  • PipPipPipPipPipPip
  • 4,528 posts
  • Location:Legazpi, Philippines
  • Devices:Cherry Mobile Eclipse
Here is another sample. :rolleyes:

;;			Generated using
;;   Y.A.I.C. Maker for Windows XP
;;	   Build 022407. Freeware!
;;		 www.gpcarreon.com

[Version]
Signature="$Windows NT$"
CESignature="$Windows CE$"
Provider="laia"

[CEStrings]
AppName="laia's App"

[CEDevice]
ProcessorType=0

[SourceDisksNames]
5=,Folder5,,"SubB"
4=,Folder4,,"SubA"
3=,Folder3,,"Sub3"
2=,Folder2,,"Sub2"
1=,Folder1,,"Sub1"

[SourceDisksFiles]
"Sample File.txt"=5
"Sample File.txt"=4
"Sample File.txt"=3
"Sample File.txt"=2
"Sample File.txt"=1

[SubB]
"Sample File.txt"

[SubA]
"Sample File.txt"

[Sub3]
"Sample File.txt"

[Sub2]
"Sample File.txt"

[Sub1]
"Sample File.txt"

[DestinationDirs]
SubB=0,"\Storage\Folder2\SubB"
SubA=0,"\Storage\Folder2\SubA"
Sub3=0,"\Storage\Folder1\Sub3"
Sub2=0,"\Storage\Folder1\Sub2"
Sub1=0,"\Storage\Folder1\Sub1"

[DefaultInstall]
CopyFiles=Sub1, Sub2, Sub3, SubA, SubB

;;;  Yet Another Inf and Cab Maker
;;;		 Chamba lang po;-)

  • 0
2425a96d204b681be05922b8a6b210c80f03f237

#9
laia

laia

    Newbie

  • Members
  • Pip
  • 2 posts
Thank you for your fast answer! You're right, all the folders and files are created correctly, but if you open the txt files you'll see that all of them have the same content. What I wanted to do is to work with different files with the same name. I am quite sure that when the files are taken from its subdirectories to be added, they are copied to a temp file without any information about their source, so the last file to be copied overwrites all other files. But this seems a very strange behaviour because it forces you to have all your files with different names! :rolleyes:

  • 0

#10
gpcarreon (MVP)

gpcarreon (MVP)

    RN, MS MVP-MD

  • Members
  • PipPipPipPipPipPip
  • 4,528 posts
  • Location:Legazpi, Philippines
  • Devices:Cherry Mobile Eclipse

but if you open the txt files you'll see that all of them have the same content.

Noticed that one too. I'll try to find a work around for such a strange problem.

  • 0
2425a96d204b681be05922b8a6b210c80f03f237

#11
gpcarreon (MVP)

gpcarreon (MVP)

    RN, MS MVP-MD

  • Members
  • PipPipPipPipPipPip
  • 4,528 posts
  • Location:Legazpi, Philippines
  • Devices:Cherry Mobile Eclipse
Hi laia :rolleyes:

I hope you'll find this guide helpful. I think you can also use the 'makecab.exe' from here.

  • 0
2425a96d204b681be05922b8a6b210c80f03f237

#12
chucky.egg

chucky.egg

    Did I say that out loud?

  • MoDaCo Silver
  • PipPipPipPipPipPip
  • 4,724 posts
  • Location:Kent, England
  • Interests:Sleeping
  • Devices:Desire S
  • Twitter:@chucky_egg
@GP
I was thinking about this topic last night whilst trying to work something out.
You'll probably know the answer...

How do I set a Registry string value to null/blank?
What would I put in the INF file to do that?

This is what I want to CAB:
http://www.modaco.co...o...st&p=820126

Edited by chucky.egg, 20 June 2007 - 07:49 AM.

  • 0

#13
gpcarreon (MVP)

gpcarreon (MVP)

    RN, MS MVP-MD

  • Members
  • PipPipPipPipPipPip
  • 4,528 posts
  • Location:Legazpi, Philippines
  • Devices:Cherry Mobile Eclipse
@chucky

1) I'm assuming the 'DLL' on that thread is a string so kindly try this XML code
<wap-provisioningdoc>
	<characteristic type="Registry">
		<characteristic type="HKLM\System\Startup\1">
			<parm name="Dll" value="" datatype="string" />
		</characteristic>
		<characteristic type="HKLM\System\Shutdown\1">
			<parm name="Dll" value="" datatype="string" />
		</characteristic>		
	</characteristic>
</wap-provisioningdoc>

2) Save code as _setup.xml , open makecab.exe, type makecab _setup.xml chucky.cab (You can use this utility for command prompt concerns)

3) Test install the CAB file. Copy over to your Temp folder then run it from there. Note that the CAB file will only tweak your target reg keys. No file will be installed.

I tried it on my C500 and the keys were created just fine. Unit is app and registry unlocked (full) :rolleyes:

  • 0
2425a96d204b681be05922b8a6b210c80f03f237

#14
aj76

aj76

    Newbie

  • Members
  • Pip
  • 4 posts
  • Devices:SPV M3100
This was great. I have just used it to help me create a cab for a project at work and scored major brownie points. It provided an excellent starting point Thank you.

AJ

  • 0

#15
Jay Robb

Jay Robb

    Newbie

  • Members
  • Pip
  • 6 posts
  • Devices:Moto Q 9h
I did it! I made a theme and and a cab.
Thank you w411y.. I did have 3 errors show up when creating the cab

Windows CE CAB Wizard
Warning: Section [DestinationDirs] key "CopyFiles1" is not using the string "%InstallDir%"
Warning: Section [RegData] has no data
Warning: Section [DefaultInstall] key "AddReg" - there are no section entries to process

of course I am using linux and a windows emulator to run the cab wizard
it is true my regdata has no data because I am not making any reg changes, as for the copyfile1 dont know.

[Version]
 Signature="$Windows NT$"
 CESignature="$Windows CE$"
 Provider="Jay"
 
 [CEStrings]
 Appname="LCARS-theme"
 
 [CEDevice]
 ProcessorType=0
 
 [SourceDisksNames]
 1=,Source1,,"LCARS"
 
 [SourceDisksFiles]
 "LCARS.home.xml"=1
 "LCARS_background.jpg"=1
 "LCARS_alert.jpg"=1
 
 [CopyFiles1]
 "LCARS.home.xml"
 "LCARS_background.jpg"
 "LCARS_alert.jpg"
 
 [DestinationDirs]
 CopyFiles1=0,"\Application Data\Home"
 
 [RegData]
 
 [DefaultInstall]
 CopyFiles=CopyFiles1
 AddReg=RegData

then when installing to phone it warned that it may not look right because it is for WM5 and my phone is MW6

but it works and look good

Attached File  ScreenShot018.jpg   20.93KB   45 downloads
Attached File  LCARS.CAB   24.88KB   173 downloads

let me know what you think.

Jay

p.s. the status will show your profile, I did a manual edit of them..

  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users