Windows Phone @ MoDaCo: Tutorial: Creating Cab Files - Windows Phone @ MoDaCo

Jump to content

Galaxy Nexus Review
We put the Galaxy Nexus and Ice Cream Sandwich through their paces.

Google Music Launch
Google bring Music out of beta and launch their music store.

MoDaCo Plus / Ad Free
Hate ads? Want cool stuff? Sign up for a MoDaCo Plus / MoDaCo Ad Free account with Online Kitchen access!

Close
Open
Close
Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Tutorial: Creating Cab Files To Install Homescreens/Reg Tweaks etc.
-----


#1 User is offline   w411y 

  • Hardcore
  • PipPipPipPipPipPip
  • Group: Members
  • Posts: 1,516
  • Joined: 06-August 05
  • Location:Pontypridd, Wales
  • Devices:SPV M1500 & SPV C550

Posted 31 January 2006 - 06:41 PM

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 File(s)


This post has been edited by w411y: 01 February 2006 - 07:02 PM

0

Sponsored Links


#2 User is offline   pbrown 

  • Newbie
  • Pip
  • Group: Members
  • Posts: 9
  • Joined: 09-January 06
  • Devices:Cingular SMT 5600

Posted 31 January 2006 - 07:01 PM

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 User is offline   w411y 

  • Hardcore
  • PipPipPipPipPipPip
  • Group: Members
  • Posts: 1,516
  • Joined: 06-August 05
  • Location:Pontypridd, Wales
  • Devices:SPV M1500 & SPV C550

Posted 31 January 2006 - 07:07 PM

pbrown, on Jan 31 2006, 19:01, said:

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 User is offline   pbrown 

  • Newbie
  • Pip
  • Group: Members
  • Posts: 9
  • Joined: 09-January 06
  • Devices:Cingular SMT 5600

Posted 01 February 2006 - 06:57 PM

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 User is offline   w411y 

  • Hardcore
  • PipPipPipPipPipPip
  • Group: Members
  • Posts: 1,516
  • Joined: 06-August 05
  • Location:Pontypridd, Wales
  • Devices:SPV M1500 & SPV C550

Posted 01 February 2006 - 07:01 PM

D'oh ! I'm sure I put it there. Unless its been removed?
Thanks for pointing out Ill upload now.

0


#6 User is offline   laia 

  • Newbie
  • Pip
  • Group: Members
  • Posts: 2
  • Joined: 19-June 07

Posted 19 June 2007 - 09:45 AM

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 User is offline   gpcarreon (MVP) 

  • RN, MS MVP-MD
  • PipPipPipPipPipPip
  • Group: Members
  • Posts: 4,528
  • Joined: 07-August 03
  • Location:Legazpi, Philippines
  • Devices:Cherry Mobile Eclipse

Posted 19 June 2007 - 10:41 AM

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

2425a96d204b681be05922b8a6b210c80f03f237
0


#8 User is offline   gpcarreon (MVP) 

  • RN, MS MVP-MD
  • PipPipPipPipPipPip
  • Group: Members
  • Posts: 4,528
  • Joined: 07-August 03
  • Location:Legazpi, Philippines
  • Devices:Cherry Mobile Eclipse

Posted 19 June 2007 - 11:01 AM

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;-)

2425a96d204b681be05922b8a6b210c80f03f237
0


#9 User is offline   laia 

  • Newbie
  • Pip
  • Group: Members
  • Posts: 2
  • Joined: 19-June 07

Posted 19 June 2007 - 11:32 AM

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 User is offline   gpcarreon (MVP) 

  • RN, MS MVP-MD
  • PipPipPipPipPipPip
  • Group: Members
  • Posts: 4,528
  • Joined: 07-August 03
  • Location:Legazpi, Philippines
  • Devices:Cherry Mobile Eclipse

Posted 19 June 2007 - 02:18 PM

View Postlaia, on Jun 19 2007, 19:32, said:

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.

2425a96d204b681be05922b8a6b210c80f03f237
0


#11 User is offline   gpcarreon (MVP) 

  • RN, MS MVP-MD
  • PipPipPipPipPipPip
  • Group: Members
  • Posts: 4,528
  • Joined: 07-August 03
  • Location:Legazpi, Philippines
  • Devices:Cherry Mobile Eclipse

Posted 20 June 2007 - 04:23 AM

Hi laia :rolleyes:

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

2425a96d204b681be05922b8a6b210c80f03f237
0


#12 User is offline   chucky.egg 

  • Did I say that out loud?
  • PipPipPipPipPipPip
  • Group: MoDaCo Ad Free
  • Posts: 4,724
  • Joined: 20-August 03
  • Location:Kent, England
  • Interests:Sleeping
  • Devices:Desire S
  • Twitter:@chucky_egg

Posted 20 June 2007 - 07:45 AM

@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.com/index.php?s=&sho...st&p=820126

This post has been edited by chucky.egg: 20 June 2007 - 07:49 AM

0


#13 User is offline   gpcarreon (MVP) 

  • RN, MS MVP-MD
  • PipPipPipPipPipPip
  • Group: Members
  • Posts: 4,528
  • Joined: 07-August 03
  • Location:Legazpi, Philippines
  • Devices:Cherry Mobile Eclipse

Posted 20 June 2007 - 09:15 AM

@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:

2425a96d204b681be05922b8a6b210c80f03f237
0


#14 User is offline   aj76 

  • Newbie
  • Pip
  • Group: Members
  • Posts: 4
  • Joined: 19-July 07
  • Devices:SPV M3100

Posted 31 July 2007 - 08:17 PM

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 User is offline   Jay Robb 

  • Newbie
  • Pip
  • Group: Members
  • Posts: 6
  • Joined: 24-October 08
  • Devices:Moto Q 9h

Posted 28 October 2008 - 05:04 AM

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

Quote

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.93K)
Number of downloads: 45
Attached File  LCARS.CAB (24.88K)
Number of downloads: 171

let me know what you think.

Jay

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

0


Sponsored Links

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users

MoDaCo is part of the MoDaCo.network, © Paul O'Brien 2002-2012. MoDaCo uses IntelliTxt technology. Privacy Policy / Contact Details.

Skin and Language

Sign in here


Sign in options
Log in with Facebook Log in with Twitter   Go to advanced login Register Now!