PPCGeeks

PPCGeeks (http://forum.ppcgeeks.com/index.php)
-   HTC Apache (http://forum.ppcgeeks.com/forumdisplay.php?f=14)
-   -   Is this possible in ROM Kitchen? (http://forum.ppcgeeks.com/showthread.php?t=2184)

vboyz103 01-30-2007 07:39 PM

Is this possible in ROM Kitchen?
 
Let just say I wanted to add PocketBreeze to the ROM, and the cab file contains files that are located in Program Files and as well as Windows directories, now can I somehow write the files to Program Files?

As far as I understand, anything in OEM will be dump to \Windows directory right?

Also, are regular sub folders allowed in the main OEM\Your_Package folder?

Thanks.

schettj 01-30-2007 07:44 PM

You can copy stuff from \Windows to \Program Files\whatever as part of your Rom Kitcen OEM package (there are plenty of examples of this out there), but you'll end up with 2 copies in the final rom. Funky, but works. Only issue there is total rom space used, if its a massive app.

You may be able to tweak your registry entries instead, so any registry references to \Program Files\Foo\bar.exe point to \Windows\bar.exe instead - that's worth a shot to try first.

Subfolders in your OEM package would be ignored, as far as I can tell.

luv2chill 01-30-2007 07:48 PM

Edit: I'm replying to the OP, not schettj (who beat me to it)

No. That's what initflashfiles.txt is for. The structure of that file allows you to create directories and copy files to them.

Keep in mind I said copy, not move. All files remain in \Windows, even if they are copied to another directory (say \Program Files or \My Documents). What I've been told (yet will have a hard time believing until I prove it to myself) is that these are actual duplicates of the files, meaning they will take up twice as much space in your rom. What I'm still hoping is actually the case is that the rom uses symbolic linking to "copy" the files to their new location (similar to a shortcut but more seamless). That would make much more sense to me... the file appears to be in \Program Files but is actually still in \Windows... The file system thinks it's in both places but it's really not.

However, I may very well be wrong. If I am, and these are actual copies, then what a horrible design and shame on MS/HTC/whoever designed it. But that will mean we should try to only put apps in rom that are ok with running from within \Windows. Otherwise when things get moved around they will end up taking up twice as much space in the rom as they should.

Ugh, the \Windows folder is like a rats nest already. I hate having to go in there because it takes so long to display the directory listing.

vboyz103 01-30-2007 07:52 PM

OK, so can you post some example for me and maybe others to see how you can achieve create directories, and copy files using initflashfiles.txt?

I know how to do registry and all using initflashfiles.txt but not to create folder and copy.

Thanks.

vboyz103 01-30-2007 07:56 PM

NVM think I found it...tell me if I'm wrong though

to create do:

Directory("My Documents"):-Directory("Personal")
Directory("My Documents"):-Directory("Business")
Directory("My Documents"):-Directory("My Music")


to Copy file do:

Directory("\My Documents\Templates"):-File("To Do.dot","\Windows\todo.dot")

Edit: Also if I copy to Program Files, does it count against me as far as Main memory usage goes?

luv2chill 01-30-2007 07:58 PM

All the answers you seek can be found by looking at the initflashfiles.dat (in the LOC folder) and the other ones in the OEM subfolders. But here's an example from initflashfiles.dat:

Directory("\My Documents\Templates"):-File("To Do.dot","\Windows\todo.dot")

So that copies the file \Windows\todo.dot to \My Documents\Templates and in the process renames the copy to "To Do.dot".

If you look on your device, sure enough you will see a file called todo.dot in your \Windows folder and To Do.dot in your \My Documents\Templates folder.

luv2chill 01-30-2007 08:00 PM

Quote:

Originally Posted by vboyz103
NVM think I found it...tell me if I'm wrong though

to create do:

Directory("My Documents"):-Directory("Personal")
Directory("My Documents"):-Directory("Business")
Directory("My Documents"):-Directory("My Music")


to Copy file do:

Directory("\My Documents\Templates"):-File("To Do.dot","\Windows\todo.dot")

Edit: Also if I copy to Program Files, does it count against me as far as Main memory usage goes?

Yeah you've got it. And no, it doesn't matter what directory you copy to, it all is going towards the size of the ROM... your main memory should not be affected at all.

vboyz103 01-30-2007 08:08 PM

Sweet if that's the case...man I'm cooking ROMs yo!! :)

I'll mess around tonite and see how far do I get.

Thanks luv2chill.

Bushrod 01-30-2007 08:13 PM

Sorry, but you are totally wrong. Files copied by initflashfikes.txt are not copied into rom. The copy is placed in memory, taking up space.

luv2chill 01-30-2007 08:19 PM

Have you proven that, Bushrod? Like you have made an OEM package with an initflashfiles.txt file that copies a file to another directory, and once flashed your program memory is decreased by the size of that file?

If so that is a revolting development. Sadly, none of this info is documented anywhere so everything I "know" is from bits and pieces I have read and intuited. I had planned an experiment with an OEM package with an extensive initflashfiles.txt file but hadn't gotten around to it yet.

If that is true then it becomes even more important to leave everything you incorporate in the \Windows folder and just adjust registry entries (and hope the program was written well enough to accomodate a different location).

vboyz103 01-30-2007 08:19 PM

Heh? man Bushrod you shattered my dream!! ehhehe

If it does take up space then I'll limit apps to copy then.

luv2chill 01-30-2007 08:22 PM

Well what really sucks about that then is that even subfolders of \Windows will cause files to take up your storage memory. So like for our devices they are set to look for ringtones in the \Windows\Rings folder. So if you try to incorporate ring tones and move them into the \Windows\Rings folder via initflashfiles.txt, they will end up using your storage memory anyway--completely negating the purpose of including them in ROM in the first place.

Ridiculous!

saridnour 01-30-2007 08:46 PM

Ok so you can copy the files and merge the reg entries, now what about the setup.dll that is packed in some cabs. From what it looks like (vc16 and pie+) the setup.dll is doing some reg work or other tasks to get the data installed. How can we see what the dll is doing and get the bits in the ROM image rather than having to install them after the fact? I know of a few hacks to get it to go but want to do this correctly. I was going to post this in a new thread but this topic was along the right line so though to try it here first.

-saridnour

luv2chill 01-30-2007 09:23 PM

Well the only way we know of now is to take a reg export on a clean device (try to have as little running as possible--apps, today applets, etc.). Then install the cab and immediately take another reg export. Then do a diff (using windiff other such app) on your PC. That will include some superfluous stuff (like the uninstaller reg entries) but at least that will have all reg entries in it (including those from self-registering dlls). Colonel and I were working on this earlier with the markallasread cab (which is just one self-registering dll). He used this method and got all the needed reg entries.

I have tried using Windows NT-based tools (one is called RegSpy) to examine the registry section of some Windows CE dlls but it doesn't work. There must be enough difference between the two that specialized tools are needed.

That is the biggest obstacle to making these OEM packages.

reese719 01-30-2007 09:30 PM

Before I go installing the best user made ROM's left and right...which I will probably do... theorectically speaking, IF I had the threaded SMS,will it work with 3.3?

schettj 01-30-2007 09:34 PM

Setup.dll is part of the cab installer, not the app - you can extract all the app files (dlls and exes) and the install script, and the registry entries the CAB would make. Once you have those you are good to go.

And to the poster above, when you "copy" a file in initflashfiles.txt, it makes multiple copies IN ROM, not in internal storage memory. Wastes ROM space (which is icky) but not any internal storage space - so no worries unless you run out of ROM space.

Bushrod 01-30-2007 10:01 PM

If that's true, then please explain to me how we are able to delete file that are copied with initflashfiles.dat? Do we have magic roms? Read Only Memory, but only sometime?

saridnour 01-30-2007 10:24 PM

schettj: that is not always true. For instance with PIE+ there are no reg entries and no exe. There are a few dll's as part of the install, but the setup.dll in the cab is used to register the installed bits and or make other reg entries. It can also do EULA and prior install detection logic (which we would not care about in this instance but if that is all it does for a cab your method would work).

luv2chill: I did try a reg export earlier but VC1.6 is insane as to the entries it makes and "beyond comare" went nuts with the dif. I did find a few other entires and I can get vc1.6 to link and activate, but it seems to not recognize speach. For now I just have the bits in the rom and made a copy of the cab that had the bits stripped and the install path pointing to the windows dir. That way it does the reg and what not but does not copy any files so the space is still spared. But I hate that it is a hack! BTW the cab file stripped havk would not work with PIE+ so I am back to comparing entries.

-saridnour

luv2chill 01-30-2007 11:54 PM

Quote:

Originally Posted by Bushrod
If that's true, then please explain to me how we are able to delete file that are copied with initflashfiles.dat? Do we have magic roms? Read Only Memory, but only sometime?

Yep, Bushrod is correct. I just deleted mfc80u.dll from the \Windows\oem folder and gained about 700k in storage memory. So the files copied by initflashrom take up storage memory.

Thank you for bringing that to light, Bushrod... it is good to know because people need to be aware of that fact when building OEM packages. I hereby propose a rule (or guideline :)). Unless an app absolutely demands to be somewhere else, files are to be kept in
\Windows (their default location) and registry entries, shortcuts, etc must be altered to look for the app in \Windows. Initflashfiles.txt should only be used to place shortcuts or other very small files on other parts of the device. This will best preserve people's precious storage memory.

Unfortunately, this is quite a limitation of the rom cooking process, but it can be worked around fine. It's just not ideal. Symbolic links would have been so much better.

Ah well, onward and upward.

colonel 01-30-2007 11:59 PM

Yes it works.

Luv2Chill, check your PMs. I figured out the ringer issue. It is actually a registry edit to get ringers in the \Windows folder to show up in Sounds & Notifications.

finster869 01-31-2007 12:06 AM

Colonel- PLease share that registry edit! Thanks.

vboyz103 01-31-2007 12:07 AM

I second that!! Please share

schettj 01-31-2007 12:12 AM

Quote:

Originally Posted by luv2chill
Quote:

Originally Posted by Bushrod
If that's true, then please explain to me how we are able to delete file that are copied with initflashfiles.dat? Do we have magic roms? Read Only Memory, but only sometime?

Yep, Bushrod is correct. I just deleted mfc80u.dll from the \Windows\oem folder and gained about 700k in storage memory. So the files copied by initflashrom take up storage memory.

Wow - icky - that is really bad. Will have to really think about what to do about that :(

colonel 01-31-2007 12:23 AM

Quote:

Originally Posted by finster869
Colonel- PLease share that registry edit! Thanks.

[HKEY_CURRENT_USER\ControlPanel\Sounds]
"Ringtones"=multi_sz:"Windows Default .wav", "Mystic .wma"

:D :D :wink: :D

vboyz103 01-31-2007 03:00 AM

I'm planning to cook iLauncher as an OEM, my question is how do I register a dll as part of today plugin or as a module?

Thanks.

Edit: I noticed that modules have the imageinfo.txt and the S000->0003 or so don't know how to make those.

vboyz103 01-31-2007 03:18 PM

Bump ^^

for my question.

luv2chill 01-31-2007 04:34 PM

Quote:

Originally Posted by vboyz103
I'm planning to cook iLauncher as an OEM, my question is how do I register a dll as part of today plugin or as a module?

Thanks.

Edit: I noticed that modules have the imageinfo.txt and the S000->0003 or so don't know how to make those.

This is currently a tricky issue. What we've done so far is a diff on registry snapshots taken before and after the cab is installed. This will result in some superfluous entries (uninstall and possibly some other crap from other running programs) but it will get all of the dll registration entries.

Or you can try this app I found:

http://www.windowsmobiledn.com/articles/articles.php?&atb.set(c_id)=41&atb.set(a_id)=3931& atb.set(c_id)=41&atb.perform(details)=&

EDIT: Obviously this board software can't parse that weird URL correctly--just copy and paste it.

Judging from the screenshot it was designed for an older version of Windows Mobile but is worth a shot.

Good luck.

vboyz103 01-31-2007 07:23 PM

OK, I just found out how to register the DLL as part of Today. I'm gonna take my iLauncher as an example. So put all the DLL from the .cab install file and extract it to OEM like usual. Flash ROM and go to HKLM\Software\Microsoft\Today\Item and create a new key called "iLauncher" with the following sub keys:

type | Name | Value
----------------------------------------------
string DLL iLauncher.dll
DWORD Enabled 0 don't enable yet, enable yourself
DWORD Flags 0
DWORD Order 0
DWORD Options 0
DWORD Type 4 don't know what this means copied from other.

Close regedit, and go to settings - Today and you should see iLauncher and tick to check it and hit OK. iLauncher will now load. :)

So far my custom ROM contains

netcf2 from imkokeman
magic button imkokeman
wm5menu kokeman
iLauncher
Wisbar Advance with Crossbow theme
PHM Editor
SKTools
RegsvrCE
TotalCmder kokeman

More to be added...maybe pocketbreeze and such.

saridnour 01-31-2007 08:01 PM

vboyz103: does ilauncher not list the reg entries in the cab?
Did you get the info from a dif then? Still trying to find a way to do this as I have some large diffs with a few apps and finding all of the keys is problematic at best. :?

-saridnour

vboyz103 01-31-2007 08:06 PM

Nope the cab file doesn't contain any registry.

There's a Setup.dll that came with the cab, I think it is responsible for setting up all the registry entries and such, but the problem is that if you have setup.dll from other apps then CreateOS.exe will ignore and only get one of them. Also, I don't know how to invoke that DLL so that it can do its job as of now. So manually creating the registry seems to work. You can attach it in the .rgu file if you like. Right now I'm getting some errors with CreateOS.exe with the reg dump I got. CreateOS.exe is saying Can't create DEFAULT Hives or some'n.

luv2chill 01-31-2007 08:10 PM

So since you included Regsvrce in your ROM does that mean you tested it to work vboyz103? Please report your findings.

schettj 01-31-2007 08:10 PM

Quote:

Nope the cab file doesn't contain any registry.
See my post here... a lot of cabs are using CM_Entries.xml instead of reg entries, it could be there!

http://www.bradtipton.info/viewtopic...start=15#22983

saridnour 02-01-2007 05:10 PM

Schettj: your link is bad becasue of the server change. I think it should be http://www.ppcgeeks.com/viewtopic.ph...start=15#22983

vboyz103: I have been fighting the setup.dll issues as well and why I keep poking into threads on the issue :)

-saridnour

luv2chill 02-01-2007 06:21 PM

Quote:

Originally Posted by schettj
Quote:

Nope the cab file doesn't contain any registry.
See my post here... a lot of cabs are using CM_Entries.xml instead of reg entries, it could be there!

http://www.bradtipton.info/viewtopic...start=15#22983

I think that is mainly just the HTC ones... and they seem to go back and forth between using platformxxx.reg and CM_Entries.xml.

Why they don't just pick one and go with it, I dunno.

vboyz103 02-02-2007 01:16 AM

ok what i've learn so far is that forget about the Setup.dll, I did it the hard way which is installing the software, grab the registry and put it in the .rgu file.

Pain in the butt but it's working so far.

schettj 02-02-2007 09:51 AM

http://www.ppcgeeks.com/viewtopic.ph...start=15#22983

You really can just do this from the CAB - it works fine, I converted all the Sprint extended cabs to one OEM package in an hour or so.


All times are GMT -4. The time now is 12:25 PM.

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


Content Relevant URLs by vBSEO 3.6.0