[Q] automatically generate .dat file from a folder structure - Windows Mobile

Hi, I have a folder with a couple of folders in it that each contain a whole lot of files. I want to cook this folder (with its subfolders) in a rom and place it in the device root folder.
I wonder if there is a utility that can automatically generate a app.dat file from this folder?

Why not Zip it up with an unkown extension, then unzip with Mort (can handle unkown zip extensions).
Using initflashfiles file operations slows up filesystem.
(using unkown filetypes and folders does not)
Sorry if i sound like a broken record to some.

appelflap said:
Hi, I have a folder with a couple of folders in it that each contain a whole lot of files. I want to cook this folder (with its subfolders) in a rom and place it in the device root folder.
I wonder if there is a utility that can automatically generate a app.dat file from this folder?
Click to expand...
Click to collapse
you could make a cab with wince cab mgr(it supports drag n drop of folders) then convert the cab to ext pkg or run it in customization.

twopumpchump said:
you could make a cab with wince cab mgr(it supports drag n drop of folders) then convert the cab to ext pkg or run it in customization.
Click to expand...
Click to collapse
Brilliant! Thanks

twopumpchump said:
you could make a cab with wince cab mgr(it supports drag n drop of folders) then convert the cab to ext pkg or run it in customization.
Click to expand...
Click to collapse
For a more Freeware solution (but without the easier Drag and Drop support)
http://forum.xda-developers.com/showthread.php?t=530710
Extenddir Cab Maker.

Noonski said:
For a more Freeware solution (but without the easier Drag and Drop support)
http://forum.xda-developers.com/showthread.php?t=530710
Extenddir Cab Maker.
Click to expand...
Click to collapse
Thanks, fortunately wince cab maker has a generous trial period. For that one time I have to put all copilot map files in a cab, it is the best option. Thanks anyway

Cabs suck, they're a pain in the butt to make and take forever to install. Just do what Noonski said and make a zip file. They install in seconds, whereas big cabs can take minutes. Here's the basic format I use; this zip file goes to the device root, which is what you want (you need the right # of \'s to get it to work). First, I have a zip file named 'root.zip'. Then, I name the mortscript Unziproot.mscr. Here's the script:
Code:
UnZipALL("\Windows\root.zip","\\")
To get it to execute, I add this to an add2config.txt file:
Code:
EXEC:\WINDOWS\Unziproot.mscr
Zip files are a helluva lot easier to make than cabs; I do it all the time with total commander on the device, and it takes just a few seconds. They're trivial to edit, too. I've attached a zip file that has the add2config.txt, the mortscript, and also a simple mortscript package that works well. Seriously, just listen to Noonski.
Edit: Make sure the mortscript doesn't have any spaces in it. If you name it "Unzip root.mscr", it won't run during customization (been there, done that, lol).

Hey Noonski.. how about we make a script, or an executable that we can plug in a kitchen batch file right before IMGFS gets created, that can look at at an initflashfiles.dat, analyze it, line by line, then create a zip with all the files its supposed to move then copy an almost blank initflashfiles.dat back in the "dump" directory. We could even do this in mort for windows!

NRGZ28 said:
Hey Noonski.. how about we make a script, or an executable that we can plug in a kitchen batch file right before IMGFS gets created, that can look at at an initflashfiles.dat, analyze it, line by line, then create a zip with all the files its supposed to move then copy an almost blank initflashfiles.dat back in the "dump" directory. We could even do this in mort for windows!
Click to expand...
Click to collapse
TPC mentioned doing something like that in the extendir thread. I will say this, I've tried to install my entire start menu with a zip file, and the bugger wouldn't work. The script worked fine after bootup, but it wouldn't run during customization. I don't know what the deal was. I only tried it a couple of times, though, but I don't think that I just did something really dumb.

Farmer Ted said:
TPC mentioned doing something like that in the extendir thread. I will say this, I've tried to install my entire start menu with a zip file, and the bugger wouldn't work. The script worked fine after bootup, but it wouldn't run during customization. I don't know what the deal was. I only tried it a couple of times, though, but I don't think that I just did something really dumb.
Click to expand...
Click to collapse
That should be an easy thing to fix...

yeah i have actually made zips for every file that goes somewhere besides windows, you wont believe the amount of space this saves and how much faster your rom is it is alot of work, one way that makes it a lil easier is to make a list of all the files that are in your zips then have your .bat delete them from dump before imgfsfromdump.exe runs in kitchen....but we could do it better and easier im sure if we just all put our heads together

Wow good idea, that's taking it into a whole new level, automating it.
It's about time this method creeped it's way from the method of a few to something that everyone can take advantage of.
It's one of the most underused methods for a bit more speed, instead of improving filesystem cache settings, reducing the stress on the file system.
(totally made the above up, I just threw a few interesting words i have been reading here and there, before people start thinking I actually understand the file system at a low level) I just know from experience and just doing it that there's advantages.
It's batching beyond my expertise (low level but creative ).
But i'm pretty sure there's a few good men for the job.
HowdyKeith and RoryB come to mind when it comes to Mort Syntax and reading values from files.
Their Batching knowledge should also be good.
But if this is do-able, then why not also not try to get rid of .provxml files to, and speed up the first boot time. Provxml is the second killer of speedy first boots.

Noonski said:
Wow good idea, that's taking it into a whole new level, automating it.
It's about time this method creeped it's way from the method of a few to something that everyone can take advantage of.
It's one of the most underused methods for a bit more speed, instead of improving filesystem cache settings, reducing the stress on the file system.
(totally made the above up, I just threw a few interesting words i have been reading here and there, before people start thinking I actually understand the file system at a low level) I just know from experience and just doing it that there's advantages.
It's batching beyond my expertise (low level but creative ).
But i'm pretty sure there's a few good men for the job.
HowdyKeith and RoryB come to mind when it comes to Mort Syntax and reading values from files.
Their Batching knowledge should also be good.
But if this is do-able, then why not also not try to get rid of .provxml files to, and speed up the first boot time. Provxml is the second killer of speedy first boots.
Click to expand...
Click to collapse
it would be awesome to have a tool that reads initflashfiles.dat from dump, puts all the files that go in other folders besides windows in a zip file also would be nice to be able to select a list of files to go into extendir\windir as well.

Noonski said:
Why not Zip it up with an unkown extension, then unzip with Mort (can handle unkown zip extensions).
Using initflashfiles file operations slows up filesystem.
(using unkown filetypes and folders does not)
Sorry if i sound like a broken record to some.
Click to expand...
Click to collapse
Hi Noonski, I think these are really great ideas. One question about your comment on iniflashfiles slowing down the system, are you referring to the startup time on first boot? Because I fail to see where the speed would be effected in general terms as the only function of the iniflashfiles is to specify where files get placed other than windows. Once they are moved in to the correct places the files is useless. So I don't see how the speed could be any different than with a zip other than the customization time being reduced. Of course I could be wrong. lol

Meant it more in the way that you then do not actually need that file to be in Rom, and therefore in the Windows folder. That's where i meant the most gain was.
Not sure if there's any other extra difference between a file that has been copied from Windows to a sub-folder or an extracted one, other then that it won't be read only and not present in Windows.

Well if you have a zip file with folders and files inside that folders
and you make a script that copies these folders to the corresponding dirs on the device you accomplish what you are asking here isn't?
twopumpchump said:
it would be awesome to have a tool that reads initflashfiles.dat from dump, puts all the files that go in other folders besides windows in a zip file also would be nice to be able to select a list of files to go into extendir\windir as well.
Click to expand...
Click to collapse

Hmmm if every file in a rom was moved without leaving a copy on the windows root I wonder how many files would be eliminated. Im guessing quite a few. Im thinking the only way this would work would be for a mod to be made for EVK allowing all the initflashfiles.dat info and app.dat info to be compiled and a zip created from them.( Not sure a simple zip could properly place that many files?) Then the files placed inside the zip would need to be deleted before the rom is compiled. Theoretically I think its possible.
@L26
Yeah your right. However I think the biggest thing to look at is there a easier way than doing it all by hand It would take forever to take every file moved by the .dat files and make a zip. Not to mention updating the files for new versions would be a PITA

aruppenthal said:
Hmmm if every file in a rom was moved without leaving a copy on the windows root I wonder how many files would be eliminated. Im guessing quite a few. Im thinking the only way this would work would be for a mod to be made for EVK allowing all the initflashfiles.dat info and app.dat info to be compiled and a zip created from them.( Not sure a simple zip could properly place that many files?) Then the files placed inside the zip would need to be deleted before the rom is compiled. Theoretically I think its possible.
Click to expand...
Click to collapse
amazing, check my post and scripts in this same forum ... I was trying to do the same (only with shortcuts for now): cook shortcuts without leaving double files in windows folder, so I remove all shortcuts from the kitchen and once cooked I create the provxml with mortscript reading an ini file and inject the provxml files to the kitchen and the cook again. Of course I only include files present in the ROM. How can I avoid cooking twice?. the script also zips and copies all the files that will be needed for the scripts that run at first boot, including the files only if the modules are in the kitchen.
May be a mod in EVK to runwait scripts before creating the nbh could open a lot of new ways of cooking without using windows directory.
@noonski, do you care taking a look at my script building the provxml file? I am pretty sure you will have lots of suggestions on how to progress further.

cruiserrr said:
amazing, check my post and scripts in this same forum ... I was trying to do the same (only with shortcuts for now): cook shortcuts without leaving double files in windows folder, so I remove all shortcuts from the kitchen and once cooked I create the provxml with mortscript reading an ini file and inject the provxml files to the kitchen and the cook again. Of course I only include files present in the ROM. How can I avoid cooking twice?. the script also zips and copies all the files that will be needed for the scripts that run at first boot, including the files only if the modules are in the kitchen.
May be a mod in EVK to runwait scripts before creating the nbh could open a lot of new ways of cooking without using windows directory.
@noonski, do you care taking a look at my script building the provxml file? I am pretty sure you will have lots of suggestions on how to progress further.
Click to expand...
Click to collapse
isnt the simplest way just to go to your windows folder on your phone and copy Start Menu folder to your pc, create a list of the files that are in that folder and use .bat to delete them while cooking, zip that folder up and put it in kitchen or sdcard and use .mscr to unzip to windows directory at first boot? you only have to cook once this way

twopumpchump said:
isnt the simplest way just to go to your windows folder on your phone and copy Start Menu folder to your pc, create a list of the files that are in that folder and use .bat to delete them while cooking, zip that folder up and put it in kitchen or sdcard and use .mscr to unzip to windows directory at first boot? you only have to cook once this way
Click to expand...
Click to collapse
well, do not want to go offtopic of this post. The idea is to cook automatically with no errors. My method cooks only what is needed without putting files to windows folder. Basically I only have to run twice when changing modules included. If it is only about changing icons, order, etc I simply run the script and cook. If it is about customization I would certainly do like you say (I have done it many times in the past). If it is about cooking should be more automated. Is complex to build but now I only define the INI files parameters: icon, parameter, folder, order... (I have not touched the mortscript since I completed it). Anyway, my building method as its own post. I just found similar ideas behind in this thread and tought they could converge.

Related

n00b question about adding my own programs

Okay I understand you have to use mkrom and Linux (or cygwin on Windows) to roll your own ROM my question is regarding how one could say remove one program from the SE ROM and include something else, for instance take off the byte counter and put another different counter on or such, would you just copy the necessary files (.exe and dll's) to the files1 or files2 folder and that's it ? What more is involved? Thanks in advance!
for simple programs, that is all there is to it.
some might need more research, as to which registry settings need to be tweaked to get te program to run from the windows directory. and what settings it needs to run at all.
You copy the files to either files1 or files2. Both sets of files end up in the \Windows subdir. So if you do not want to copy the files to RAM (see below), you should make sure the program is set to run from \Windows. Then you add any necessary registry keys to "default.reg", and any file-copy or directory creation commands to initobj.txt. Then run "mkrom <ROMfile>" and hey-presto.
Thanks so much for all your guys awesome work!!
entropy1980 said:
ok sounds good, what would one need to do to mod the registry for the programs (By that I mean prior to booting) I don't want to be mucking around with a reg editor after the device boots just to get the progs to work...
Click to expand...
Click to collapse
Not sure I understand the question. Default.reg just holds the entire registry as present after a cold restart. So if you put something in there, this will be in the registry when the device wakes up.
I think we wrote at the same time , so you answered my question before I posted it !!! What you said made complete sense! Thanks!
entropy1980 said:
[...]so you answered my question before I posted it !!! [...]
Click to expand...
Click to collapse
I installed the phpBB telepathy mod a couple of days ago, so I guess it's working.
Hey I knew you were going to say that.... :lol: :lol:
hi,
i want to add the skelmir java virtual machine (thats default installed in windows\ceej) and copy the swingall.jar in the windows\ceej map.
I have the cab file of the virtual machine but i can't find out which files are in it (when i open it with cabextract is shows .001 files and not the files that i find back in the device)
please help me
Using Special Edition ROM, Tthe CabInst tool will run CAB files on the device if you move it there manually and double-tap it. It allows to set a new directory to install in.
Also the System Snapshot tool will write a file in the root of the device which holds a list of the entire filesystem and registry contents, so you can compare and see what changed. UltraEdit for the desktop has a compare function.
Good luck...
hi,
i installed it to a seperate directory and zipped the files. i also took a snapshot when the xda was fresh and after install. i only can't find where the xda's gets is files from in:
43 <! [\Windows\AppMgr]
8544 <! 31/12/2002 12:31 1632 FC0E9EE1 Skelmir CEEJ Virtual Machine.DAT
8576 <! 16/02/2003 23:10 27 AEBB1DF3 CEEJ.lnk
8587 <! 16/02/2003 23:10 40 1EAF4EB3 CEEJ Examples.lnk
8588 <! 16/02/2003 23:10 27 AEBB1DF3 CEEJ.lnk
because these are not in the map where i extracted the cab file too. maybe you can take a look for me and tell me what i have to change in mkrom to have ceej by default installed
the extraced cab map:
http://www.devosjansen.nl/xda/java installed.rar
the snapfiles:
http://www.devosjansen.nl/xda/xda snapshots files.rar
thanks in advance
laurens0619 said:
hi,
i installed it to a seperate directory and zipped the files. i also took a snapshot when the xda was fresh and after install. i only can't find where the xda's gets is files from in:
43 <! [\Windows\AppMgr]
Click to expand...
Click to collapse
These files are generated during the install process, and contain uninstall information. You do not need to write them if you install in ROM, since you don't need/want your programs to show up the in the 'Add/Remove Programs' dialogue.
ah i understand,
so i just put the files in the files1 or files2 directory and add this reg files to the default.reg? i dony really understand the readme file
ah little kick,
isn't also good for the next SE rom? because you have finally a java virtual machine on the xda and the app is freeware (got it from www.skelmir.com)
laurens0619 said:
isn't also good for the next SE rom?
Click to expand...
Click to collapse
Noted...
nice but can you please help me out for the moment? i dont know which part i must add to the default.reg file
laurens0619 said:
I dont know which part i must add to the default.reg file
Click to expand...
Click to collapse
default.reg holds the registry that is present when the system wakes up from cold-boot. So any registry entries your installer (or first run of the app) has made that you would like to have present should go in there. Clear enough?
almost
so i just copy paste the **** at the end of the reg file? and the files in the files 2 map
but how will the rom know where to put the files??
sorry if i'm stupid but i don't want to f*ck my rom so i can use me xda's as a frisbee
Yes, the registry entries can be pasted at the end of default.reg. It doesn't matter if there's earlier entries with the same values, since the latter ones override.
All files in files1 and files2 will end up in \Windows, and if you want them somewhere else, (where they'll take up RAM), you must manually copy them (or pre-made links pointing to them) by issueing commands in initobj.txt.
Take a real close look at initobj.txt, and you'll get the picture.

Determining package install location--can it be done?

WM 6.5: Is it possible to predetermine an EXT/OEM package's install location to a place other than the Windows folder (e.g., Program Files), in the interests of organization and browsing speed?
Thank you.
yes it can be done... but not cooking them a friend do this:
he makes a EXT pkg with a Mortscript file that runs at startup... that file runs a exe file in the storage card that uncompress a TGZ file in the directory you want then the same exe deletes the start up file
hard isnt it? its just imagination
Everything in the \files folder of an EXT goes into windows. If you want things copied to another location, you can do it with the app.dat file. Or, you can put all the files in either a .cab or a .zip file, and just install the cab during customization or use a mortscript to unzip the zip file to whereever you want (zips are a lot faster than cabs and are easier to create/edit, but you need mortscript cooked in). But, you're better off having things run out of \windows most of the time. If you have two copies of a program, you're just wasting memory. You can create an EXT for something like TCPMP that puts it into \program files\tcpmp, but what's the point if the version that's sitting in \windows works just as well? Also, if you just work out of \windows, you can convert the dll's, exe's and mui's that might be present in the package to modules, which usually gives you an app that boots up faster. Some things don't work out of \windows, so it takes experimentation, and not all files work so well as modules, which requires more experimentation. But, I would say that putting things in different directories just to be (or seem) organized isn't always a great idea. If you're dead-set on doing it, then install the apps with a cab or a zip file, because it will save rom memory and limit the number of rom files, which is always a good thing.
Thank you both--your post was especially informative Farmer Ted.

[Q] about cooking gameloft games to hd2

Default Trouble Cooking
I am trying to add Gameloft games that I have bought to my os kitchen. I am having trouble getting NBA 2010, Midnight bowling 2, and Avalanche Snowboarding to launch. I have all of the file in the correct places and they all show in in the rom after it has finished cooking but they dont launch either from the start menu or the programs files folder. I am hoping that if some could help me figure this out, and in the process help others who could have the same problem.
i used CABTOEXT And Package to ext the edited the appdata with xml maker. then i tried with out editing the appdata and nothing. i will be willing to compansate for the fix
I think it's better to make EXT's from scratch instead of using a cab-2-package creator. There may be registry keys added by a setup.dll that you miss, or that are added after launching the app or a soft reset. Here's how I do it (you need sk tracker):
Do a scan with sk tracker.
Install the cab.
Scan again.
Launch the program, enter any codes or settings.
Scan again.
Now, do comparisons of the scans, and find all the new files and registry keys. Export the reg keys to an app.reg file. You can generally ignore the HKLM\Software\Apps and appinstall keys-these are just keys that allow the device to uninstall the cab. Occasionally, the install directory key is needed, but usually not. Definitely leave out the files in \windows\appmgr, that's just un-install info.
Next, don't bother with getting the program loaded into its own folder in \program files. That's usually a waste, because most apps work straight out of \windows. Exe's search for resources first in their own folder and then in \windows most of the time, so if you put the .exe and everything else in windows, you're good to go. If there are sub-folders, then the sub-folders need to be loaded into \windows\ as a sub-folder (I personally use zip files/mortscripts to do it, but a cab will work as will initflashfiles.dat). You have to be careful about settings files, particularly .ini's. They do not like being read-only, and this may be why your game doesn't launch. So, if you have an .ini file, or a settings.txt file, or a game.dat file (or similar), you need to load it into \windows or wherever so it's not read-only. Personally, if I have sub-folders going into windows, I'll create a zip file that sends the .ini, .dat or .txt file into \windows as an archive file, but you can also use initflashfiles.dat to create a copy wherever you want that isn't read-only.
If you change the install directory from program files to windows, then you may need to look into the .reg keys and change some paths. Also, you'll need to change any shortcut paths to \windows\game.exe. Putting things directly in windows saves memory, and you can also convert files to modules to take advantage of the increase VM slots with native 6.5 kernels. It all comes down to experimentation, though.
Thanks for the info, but all of the reg entrys were either in the hklm\security\appsinstall or the hklm\software\apps, andi i entered them and still nothing. I have never worked with mortscript, I did look for a tutorial but couldn't understand all of what they were saying is there a video tutorial, or another soultion?
Did you check to see if any settings-type files are read-only? That will kill a game for sure, and they usually save user data in files (not the registry).
I appericeate your willingness to help a noob, and thank you. how do I check to see if they are read only, how do I make shure that they are what they need to be during the cooking process?
all of the files for one of the games are as follows
Avalanche Snowboarding.exe
data.bar------------------this one Program Files\Gameloft\Game name
GetRealDPI.exe------------------this one Program Files\Gameloft\Game name
icon_45x45.png------------------this one Program Files\Gameloft\Game name
icon_60x60.png------------------this one Program Files\Gameloft\Game name
icon_90x90.png------------------this one Program Files\Gameloft\Game name
Installer.dll------------------this one Program Files\Gameloft\Game name
STPA001.DLL---------------------------this one is in windows\ appmgr
60DE.tmp---------------------------this one is in windows\ appmgr
Avalanche Snowboarding.lnk------------------this one Windows\start menu\ programs\Games
the structure of each game is very simalier, except for midnight bowling 2 which has no icon.png in the gameloft file after install.
Which one look s like the suspect for tha data file\needs not to be read only?
do the games work when you install them as a cab? after you cook your rom and you say they wont launch, have you tried installing them as cabs and see if that fixes it? if so you know its a problem with your pkg and not something else in your rom. basically what farmer ted is saying is that you can make your own package by installing the cab and then exporting all the installed files/reg and putting them in your kitchen with app.dat to put them in the right places i think this is your best bet.
Data.bar is probably the game store; just check the file properties with total commander. If it's read-only, then uncheck it.
Get rid of the two appmgr files; those are just uninstall junk, and you don't need to cook them in. You only need one of the 3 icons in all likelihood. They're start menu icons, right? Just use the one that is in the startinfo/icon reg key, and leave out the other two. I kind of doubt you need installer.dll or the getrealdpi.exe as well. It seems like those just run the install. Speaking of which, this is probably where you're screwing up. Did you just dump this stuff from the .cab with a package creator? It seems like you have files for a partially installed app. Probably, the cab installs the 'getrealdpi.exe', and that process runs and figures out your device resolution, then the installer.dll decides what files to install or maybe sets reg keys for the proper resolution. I'm not sure that you have everything you need in your package. I suspect this is the source of your problem, more so than having a settings file marked as 'read-only.'
Edit: cough, cough, I know a little more about the game now (not saying how). Data.bar is a resource file (a big one). You need it, obviously. The settings files are .sav files (2 of them, as far as I can see). They're created after you launch the game. The only two files you really need are the avalanche snowboarding.exe and the data.bar file. Do this: stick them in an EXT, and don't use an app.reg file. Just send them to \windows. Send the shortcut to the games folder, but you'll need one with the proper path. You can make the shortcut by putting the following in a .txt file and changing the extension to .lnk.
Code:
1#"\Windows\Avalanche Snowboarding.exe"
Name it whatever you want.
Long story short: put the two files in a package. Screw the icon.png, they're a huge frickin waste, imo. Then use an app.reg to send the shortcut (also in the package) to the games folder. If you want to back up user data, save the .sav files and copy them into \windows after flashing. It should work.
Farmer Ted said:
Data.bar is probably the game store; just check the file properties with total commander. If it's read-only, then uncheck it.
Get rid of the two appmgr files; those are just uninstall junk, and you don't need to cook them in. You only need one of the 3 icons in all likelihood. They're start menu icons, right? Just use the one that is in the startinfo/icon reg key, and leave out the other two. I kind of doubt you need installer.dll or the getrealdpi.exe as well. It seems like those just run the install. Speaking of which, this is probably where you're screwing up. Did you just dump this stuff from the .cab with a package creator? It seems like you have files for a partially installed app. Probably, the cab installs the 'getrealdpi.exe', and that process runs and figures out your device resolution, then the installer.dll decides what files to install or maybe sets reg keys for the proper resolution. I'm not sure that you have everything you need in your package. I suspect this is the source of your problem, more so than having a settings file marked as 'read-only.'
Edit: cough, cough, I know a little more about the game now (not saying how). Data.bar is a resource file (a big one). You need it, obviously. The settings files are .sav files (2 of them, as far as I can see). They're created after you launch the game. The only two files you really need are the avalanche snowboarding.exe and the data.bar file. Do this: stick them in an EXT, and don't use an app.reg file. Just send them to \windows. Send the shortcut to the games folder, but you'll need one with the proper path. You can make the shortcut by putting the following in a .txt file and changing the extension to .lnk.
Code:
1#"\Windows\Avalanche Snowboarding.exe"
Name it whatever you want.
Long story short: put the two files in a package. Screw the icon.png, they're a huge frickin waste, imo. Then use an app.reg to send the shortcut (also in the package) to the games folder. If you want to back up user data, save the .sav files and copy them into \windows after flashing. It should work.
Click to expand...
Click to collapse
I am Trying now.
twopumpchump said:
do the games work when you install them as a cab? after you cook your rom and you say they wont launch, have you tried installing them as cabs and see if that fixes it? if so you know its a problem with your pkg and not something else in your rom. basically what farmer ted is saying is that you can make your own package by installing the cab and then exporting all the installed files/reg and putting them in your kitchen with app.dat to put them in the right places i think this is your best bet.
Click to expand...
Click to collapse
yes the cabs work after i cook, the problem seems to be in the package.
JMM2009 said:
I am Trying now.
Click to expand...
Click to collapse
No Dice, any other suggestions?
Have you tried just clicking on the .exe instead of the shortcut? This should be working.
Edit: ok, I was getting tricked. This game only works when the .bar file is in \program files\Gameloft\Avalanche Snowboarding. Make sure you have the folders named correctly-when I changed it to game loft, the game wouldn't launch. The .exe can be in \windows. I guess the search path for the .bar file is hard-coded to the one folder.
I put them in the Program Files\Gameloft\Game Name and I got one working, Brain Challenge 3. But of the four games I am trying to install I have only been able to get one working at best during any time I have been cooking, could it be possible that the app.dat file that I have for the file path is overwriting the data.bar. This is what I have in each app.dat file
Directory("\Program Files\"):-Directory("Gameloft")
Directory("\Program Files\Gameloft\"):-Directory("Avalanche Snowboarding")
Directory("\Program Files\Gameloft\Avalanche Snowboarding"):-File("Avalanche Snowboarding.exe","\Windows\Avalanche Snowboarding.exe")
Directory("\Program Files\Gameloft\Avalanche Snowboarding"):-File("data.bar","\Windows\data.bar")
Directory("\Windows\Start Menu\Programs\Games"):-File("Avalanche Snowboarding.lnk","\Windows\Avalanche Snowboarding.lnk")
could the fact that I am creating a new gameloft folder with each game be screwing me up?
D'oh, that's definitely it! You need to work around that. Name them data1.bar, data2.bar..., then have the app.dat files rename them to data.bar when it copies them. Lol, glad it's figured out.
Edit: here's a dummy package that I would try out if I were you. It has mortscript included and all the necessary reg keys. What you need to do is to add your .exe's to the \Files folder, then add the data.bar files to the game folders inside the zip file. Basically, create a zip file with this structure: \Program Files\Gameloft\individual game folders\ and put the data.bar files in each corresponding game folder. Make sure the names are correct on the folders. Zip it up, and make sure the paths are correct, just like the way I have it, although I don't know the game names.
Then, look in the UnzipGameloft.mscr file with a text editor. Edit the .exe names in each of the 'createshortcut' commands to the name of the exe (exactly). You can call the .lnks whatever you want. The mortscript will create the shortcuts, so don't bother with putting shortcuts in the folder. Also, the package has a script to back up user data for all of the games. This is only going to work if the .sav files are created in \windows, and not in the stupid program folders (you can write a script to back up the games in that case, but it's more of a pain). During customization, the zip file is unzipped, the shortcuts are created, and the user data is restored.
what do you use to make your pkgs???
OMG i would like to get rid of the windows files with the one in program files...
Does this MSCR pkg can do that you know this is a case of double files in windows and in progranfiles
Edited
Farmer Ted said:
D'oh, that's definitely it! You need to work around that. Name them data1.bar, data2.bar..., then have the app.dat files rename them to data.bar when it copies them. Lol, glad it's figured out.
Edit: here's a dummy package that I would try out if I were you. It has mortscript included and all the necessary reg keys. What you need to do is to add your .exe's to the \Files folder, then add the data.bar files to the game folders inside the zip file. Basically, create a zip file with this structure: \Program Files\Gameloft\individual game folders\ and put the data.bar files in each corresponding game folder. Make sure the names are correct on the folders. Zip it up, and make sure the paths are correct, just like the way I have it, although I don't know the game names.
Then, look in the UnzipGameloft.mscr file with a text editor. Edit the .exe names in each of the 'createshortcut' commands to the name of the exe (exactly). You can call the .lnks whatever you want. The mortscript will create the shortcuts, so don't bother with putting shortcuts in the folder. Also, the package has a script to back up user data for all of the games. This is only going to work if the .sav files are created in \windows, and not in the stupid program folders (you can write a script to back up the games in that case, but it's more of a pain). During customization, the zip file is unzipped, the shortcuts are created, and the user data is restored.
Click to expand...
Click to collapse
Ok Renaming didn't do the trick, so I am trying the mortscript method, have the exe in the first gameloft.zip then I have put the data.bar file in the folders that contain there name, I edited the unzipgameloft file with the creat shortcutlinks. now my question is this the gameloft zip withen the bundled files you sent, does this need to be renamed or can I drop it in my kitchen?
as of right now I am using OS kitchen, I tried cooking them in, which didn't work. then I tried pausing then adding the file, but I thought i remembered reading somewhrer that you need to pause before it reads the dump file however I dont have that ability I can onlt pause before the platform builder runs do I need to use a different kitchen, or should cooking them in or add them before the platform builder work?
Now this is funny
I tried to cook the games in with renaming data1 data2 ect... then I cooked, when the rom loaded I went to program files\gameloft folder and renamed each data.bar back to what it was, and they WORK thats good, now all i need to figure out is how to get each of those files to be renamed during the cooking processes or during the start up customazation. am I correct in thinking this, is it possiable?
JMM2009 said:
I tried to cook the games in with renaming data1 data2 ect... then I cooked, when the rom loaded I went to program files\gameloft folder and renamed each data.bar back to what it was, and they WORK thats good, now all i need to figure out is how to get each of those files to be renamed during the cooking processes or during the start up customazation. am I correct in thinking this, is it possiable?
Click to expand...
Click to collapse
You can edit app.dat and change the destination file name to do that.
Directory("DESTINATIONFOLDER"):-File("DESTINATIONFILENAME","\Windows\SOURCEFILENAME")
airxtreme said:
You can edit app.dat and change the destination file name to do that.
Directory("DESTINATIONFOLDER"):-File("DESTINATIONFILENAME","\Windows\SOURCEFILENAME")
Click to expand...
Click to collapse
It didn't rename it, it did however allow windows to overwrite the other data.bar files so it looks like it will have to be done during the customization
JMM2009 said:
It didn't rename it, it did however allow windows to overwrite the other data.bar files so it looks like it will have to be done during the customization
Click to expand...
Click to collapse
I suggest you to leave the cab as it is and add it in the config.txt file for Autorun (with an add2config.txt file): using cab2ext when the application has to stay in program files can make the first boot a little quicker but it's going to waste more imgfs space because the files are not compressed (also with CABs you can uninstall the game in case you need). If you still want to cook it in as an expanded package you just have to use the kitchen package converter, rename all the package files adding an identifier in front of it like "gamename_" different for each game and edit the initflashfile changing the source file name with the one with the prefix. That should do it.
airxtreme said:
I suggest you to leave the cab as it is and add it in the config.txt file for Autorun (with an add2config.txt file): using cab2ext when the application has to stay in program files can make the first boot a little quicker but it's going to waste more imgfs space because the files are not compressed (also with CABs you can uninstall the game in case you need). If you still want to cook it in as an expanded package you just have to use the kitchen package converter, rename all the package files adding an identifier in front of it like "gamename_" different for each game and edit the initflashfile changing the source file name with the one with the prefix. That should do it.
Click to expand...
Click to collapse
What kitchen package convertor do you reccomned?

[Solved][Q] EXT packages + app.dat = duplicates of files in \windows\

I tried to keep the title as descriptive and short as possible, I hope it makes sense
I picked up the kitchen of nhathoa (a retired Topaz cook) hoping to get it customized to make it exactly the way I want but I'm running into some issues.
Long story short, I'm using Ervius Visual Kitchen (1.8.2) and I noticed that the EXT packages I added end up leaving two copies of the files, a copy under \windows\ and another one in the places I specified using app.dat using:
Code:
Directory("\Program Files\bla\"):-File("bla.exe","\Windows\bla.exe")
Is there some way to get rid of the copy under \Windows\ ??
I know that I could simply leave everything there and discard the app.dat files but I would really prefer having everything organized properly (I have a bit of an OCD when it comes to organizing everything neatly ).
I'm pretty sure that this is a rather simple and noobish issue but I couldn't find anything relevant by searching and I took a look at some ext packages by various cooks and noticed the same behaviour.
MusikMonk said:
I tried to keep the title as descriptive and short as possible, I hope it makes sense
I picked up the kitchen of nhathoa (a retired Topaz cook) hoping to get it customized to make it exactly the way I want but I'm running into some issues.
Long story short, I'm using Ervius Visual Kitchen (1.8.2) and I noticed that the EXT packages I added end up leaving two copies of the files, a copy under \windows\ and another one in the places I specified using app.dat using:
Code:
Directory("\Program Files\bla\"):-File("bla.exe","\Windows\bla.exe")
Is there some way to get rid of the copy under \Windows\ ??
I know that I could simply leave everything there and discard the app.dat files but I would really prefer having everything organized properly (I have a bit of an OCD when it comes to organizing everything neatly ).
I'm pretty sure that this is a rather simple and noobish issue but I couldn't find anything relevant by searching and I took a look at some ext packages by various cooks and noticed the same behaviour.
Click to expand...
Click to collapse
No, it's call Read-Only-Memory (ROM) and is the reason you can hard-reset your phone. Every file you cook into the ROM is in \windows. Two ways I know of to reduce the amount of files would be to zip them and have a mortscript unzip them to the proper location during customization or cook in a cab containing all of the files and have it run during customization.
That makes a lot of sense, I really feel ashamed that I didn't figure it out earlier
EXT packages seemed easier than bothering to read about customization but I guess it's time to start reading about this kind of stuff.
Thread marked as solved.
Thanks for the quick reply!
Yup, files in rom are in rom forever, or until you flash again, lol. The trick is to just run bla.exe from \windows. I would say that 90% of the time, bla.exe runs just fine out of the windows directory (especially if it's the only file in the package). When people create cabs, they naturally install the app in \program files, but in general apps don't need to be in a specific folder. If there are other files present, usually an .exe will search within its own folder for those files. So, if you just cook everything straight into windows, you'll be good to go. It's easy enough to test: just move all the files from program files to windows after installing a cab, fix the shortcut in the start menu, and then try to run the app. It's always a good idea to do a soft reset and try again (found this out the hard way many times). The one thing you have to watch out for is settings files, like .dat files. These files frequently have to be archived (not read-only). Particularly with apps that use net 3.5, if there's a setting file that is read-only, the app won't boot and you'll get an error message. The fix is to name the file settings-1.txt (or whatever) and have an app.dat rename it to settings.txt (and keep it in \windows).
Also, remember to fix the shortcut path in the start menu, and examine the registry entries to see if there are any paths for files present-you may need to change them to point to \windows (this could also be true in settings files).
mwalt2 said:
No, it's call Read-Only-Memory (ROM) and is the reason you can hard-reset your phone. Every file you cook into the ROM is in \windows. Two ways I know of to reduce the amount of files would be to zip them and have a mortscript unzip them to the proper location during customization or cook in a cab containing all of the files and have it run during customization.
Click to expand...
Click to collapse
This actually made me think a little bit. When you think about read only, I always thing can't delete or overwrite. Obviously I can run a cab and replace a file that is located in the \Windows directory, that leads me to believe there is a way to delete a file or maybe even replaced with an empty file of the same name.
You can over-write a rom file, but the rom file is still there. The file system just flags it somehow or another and tells the device to ignore it and instead use the new file.
TMartin03 said:
This actually made me think a little bit. When you think about read only, I always thing can't delete or overwrite. Obviously I can run a cab and replace a file that is located in the \Windows directory, that leads me to believe there is a way to delete a file or maybe even replaced with an empty file of the same name.
Click to expand...
Click to collapse
The new file you copy over goes into the "user" partition of the file system and windows knows to use that file instead. Once you delete this newly copied file from \windows, the old one from the ROM will take its place back in the filesystem.
Farmer Ted said:
Yup, files in rom are in rom forever, or until you flash again, lol. The trick is to just run bla.exe from \windows. I would say that 90% of the time, bla.exe runs just fine out of the windows directory (especially if it's the only file in the package). When people create cabs, they naturally install the app in \program files, but in general apps don't need to be in a specific folder. If there are other files present, usually an .exe will search within its own folder for those files. So, if you just cook everything straight into windows, you'll be good to go. It's easy enough to test: just move all the files from program files to windows after installing a cab, fix the shortcut in the start menu, and then try to run the app. It's always a good idea to do a soft reset and try again (found this out the hard way many times). The one thing you have to watch out for is settings files, like .dat files. These files frequently have to be archived (not read-only). Particularly with apps that use net 3.5, if there's a setting file that is read-only, the app won't boot and you'll get an error message. The fix is to name the file settings-1.txt (or whatever) and have an app.dat rename it to settings.txt (and keep it in \windows).
Also, remember to fix the shortcut path in the start menu, and examine the registry entries to see if there are any paths for files present-you may need to change them to point to \windows (this could also be true in settings files).
Click to expand...
Click to collapse
First of all, a small question about the underlined part, just to make sure that I got it right: it won't be exactly a rename just a copy with a different name, correct?
Some of the apps I use need a specific directory structure for the resources and files they use, so just dumping them in one big folder won't work.
Another possible issue that I think I'll run into is having two files sharing a generic name (let's say settings.xml) while each belongs to a different app. I didn't personally encounter such a situation just yet but my packages are still a work in progress and I did see a post or two about this while searching.
I was still hoping there would be a simple way to arrange the files in folders while keeping them under \windows\ but I can't find such a method either. Doesn't seem like I have other options than to decided on a firstboot customization method: Runcc, autorun, xda_uc or something that I haven't read about yet...
"Runcc" is currently used in the base kitchen so that gives it an edge right now.
Edit:
Remembered that I had another question, and it's probably not worth a new thread.
I was looking at how to manually create .lnk files and I noticed something that I didn't understand and couldn't find info about.
For example:
Code:
21#"\Windows\MSDict.htm"
What exactly does the "21" refer to?? I tried changing it randomly to other values a couple of times and it didn't effect anything.
NRGZ28 said:
The new file you copy over goes into the "user" partition of the file system and windows knows to use that file instead. Once you delete this newly copied file from \windows, the old one from the ROM will take its place back in the filesystem.
Click to expand...
Click to collapse
Ok now that makes a lot of sense. I guess I'm just use to Android and being able to see that separate partition. Thanks for the explanation.
That sort of leaves me to another question. Can't someone develop a way to overwrite directly to the "system" partition? It would almost be like a root/superuser for WinMo.
Sent from my HTC Evo 4G!
MusikMonk said:
First of all, a small question about the underlined part, just to make sure that I got it right: it won't be exactly a rename just a copy with a different name, correct?
Click to expand...
Click to collapse
Yup, that's correct. Another approach is to take all similar files that go into windows and stick them in a zip file that unzips to the windows directory. I do that in a few cases (power radio comes to mind; it has an ini file). What I do in most cases though is use a backup/restore mortscript. The backup copies all settings files (and similar things) on my device to my sd card. During customization, the restore copies them back. It's convenient for apps where I change the settings a lot and I don't want to have to constantly fuss with the packages.
Some of the apps I use need a specific directory structure for the resources and files they use, so just dumping them in one big folder won't work.
Click to expand...
Click to collapse
What you do in that case is move the sub-folders into windows. In this case, I'll use a zip file to unzip those folders into windows. Using app.dat files to copy large numbers of files blows. It increases the rom file count as well as the storage used. A zip file is a single file, and usually it saves space.
Another possible issue that I think I'll run into is having two files sharing a generic name (let's say settings.xml) while each belongs to a different app. I didn't personally encounter such a situation just yet but my packages are still a work in progress and I did see a post or two about this while searching.
Click to expand...
Click to collapse
In that case, you're screwed unless there's a registry key that lets you change the name. I've run into a few complications; tcpmp and OMarket both use a common.dll. My solution was to buy Core Player, lol.
I was still hoping there would be a simple way to arrange the files in folders while keeping them under \windows\ but I can't find such a method either. Doesn't seem like I have other options than to decided on a firstboot customization method: Runcc, autorun, xda_uc or something that I haven't read about yet...
"Runcc" is currently used in the base kitchen so that gives it an edge right now.
Click to expand...
Click to collapse
Using cabs or zip files is the way to go if you want to copy large folders in one shot (with a mortscript; you can also un-rar rar files, but I don't know how. Yet, lol). Zips are easier to make and edit than cabs, but you need to have mortscript cooked in and know how to write the simple script (aka cut-and-paste).
Edit:
Remembered that I had another question, and it's probably not worth a new thread.
I was looking at how to manually create .lnk files and I noticed something that I didn't understand and couldn't find info about.
For example:
Code:
21#"\Windows\MSDict.htm"
What exactly does the "21" refer to?? I tried changing it randomly to other values a couple of times and it didn't effect anything.
Click to expand...
Click to collapse
The 21 is the number of bytes after the #. It doesn't matter. I usually just change the first number to 1. It works fine. Counting bytes blows.
That was extremely helpful. Too bad these boards don't use a rep system
Farmer Ted said:
Yup, that's correct. Another approach is to take all similar files that go into windows and stick them in a zip file that unzips to the windows directory.
Click to expand...
Click to collapse
Well, if I'm going to follow this method, and it seems like I am, I don't see why I would still have to limit myself to the \windows folder. I can just put everything the way I originally wanted to do. I only looked at arranging files under \windows when I found out that there's no way to get rid of the duplicates.
Farmer Ted said:
Using cabs or zip files is the way to go if you want to copy large folders in one shot (with a mortscript; you can also un-rar rar files, but I don't know how. Yet, lol). Zips are easier to make and edit than cabs, but you need to have mortscript cooked in and know how to write the simple script (aka cut-and-paste).
Click to expand...
Click to collapse
I haven't tried writing mortscripts yet but I've seen enough to figure out the basic and notice how easy it is. I'm gonna check how usable is the WM version of 7zip, as long as it accepts arguments combining it with mortscript will be easy and perfect for me.
7z archives can get smaller in size than half of the zip archives for the same files. And cabs are too annoying to work with and keep updated later on.
Only issue remaining now is checking whether I should put the archived files under \windows or use the sdcard for customization. I'm leaning toward the first but I'll have to wait and see how much memory I would be sacrificing that way.
Farmer Ted said:
The 21 is the number of bytes after the #. It doesn't matter. I usually just change the first number to 1. It works fine. Counting bytes blows.
Click to expand...
Click to collapse
Ah! I thought about counting bytes/characters and noticed that it works sometimes. But I thought it was a coincidence after I experimented in changing the value and noticed that it wasn't always the right count in the .lnk files that I found.
[rant]
Nice, I was messing around with some packages to free up ram and storage and I seem to have ended up with a rather b0rked up xTask. And then there's still convincing Resco Explorer that the registry add-in IS in fact there.
Figuring out the causes should keep me happily busy for a while (and probably heavily pissed for another while afterwards).
[/rant]
Edit:
Just for the record, I ended up using xda_uc it's a lot easier than doing things manually. Although it would help if there was some kind of documentation available, took me a while to understand what .xda, xdai, xdas & .xdaz files are supposed to be.
hi by the way is it possible to convert ext packages of QVGA phones to one another?

[q] xml / pxml

Sorry for being dumb once again.
I know how to create an XML and convert reg files to PROVXML etc but :
I flashed my cooked rom and did snapshot with kheb made all my changes and got a difference .reg file.
I converted that to PROVXML cause i believe its the best way of doing it.
What I dont know is what to do with it and where to put it in order to flash it.
Ive put it under custom settings\files but iot needs to be named something specifically according to 0Kitchen . Also i have an xml file that has my exchange settings in that which i want to cook in as well but dont know how.
I do use XDA uc but id prefer to let it be done with runcc or something?
Please advise whats better and whats the difference between the differentx PROVXML file naming.
Thanx
I would preffer using reg instead Provxml because they take a lot of time for 1st boot....anyway you need to name them mxip_xxxx.provxml if im not wrong.
af974 said:
I would preffer using reg instead Provxml because they take a lot of time for 1st boot....anyway you need to name them mxip_xxxx.provxml if im not wrong.
Click to expand...
Click to collapse
Can i renam the exchange.xml to mxip_exchange.provxml as well. does a xml and provxml contain the same information/layout?
Uhmm...it seems that should work, give a look here http://ip208-100-42-21.static.xda-developers.com/showthread.php?p=6995989.
Grumps said:
Can i renam the exchange.xml to mxip_exchange.provxml as well. does a xml and provxml contain the same information/layout?
Click to expand...
Click to collapse
af974 said:
Uhmm...it seems that should work, give a look here http://ip208-100-42-21.static.xda-developers.com/showthread.php?p=6995989.
Click to expand...
Click to collapse
Leme just try quickly we do flash like 30 times a day in any case hey. Will revdert just now
Thanx for your help
There's various file names, mxip, mxipinit and mxipupdate. In my experience I've never needed to add anything to a .dsm file, as long as the extension is .provxml they execute ok.
What I do though, is put my post-boot provxml's into the very last folder that my kitchen picks up so it's named ZZZ_postboot_provxml or something similar and I also name the file to mxipupdate_zzzPostBoot.provxml but I'm not sure if this helps. I do this because:
If you use total commander and search for *.provxml files in your windows folder you might find that none of them have the original name you gave in your packages, but if you step through the files you find there, you can see the execution order.
Hope this helps a bit.
arealityfarbetween said:
There's various file names, mxip, mxipinit and mxipupdate. In my experience I've never needed to add anything to a .dsm file, as long as the extension is .provxml they execute ok.
What I do though, is put my post-boot provxml's into the very last folder that my kitchen picks up so it's named ZZZ_postboot_provxml or something similar and I also name the file to mxipupdate_zzzPostBoot.provxml but I'm not sure if this helps. I do this because:
If you use total commander and search for *.provxml files in your windows folder you might find that none of them have the original name you gave in your packages, but if you step through the files you find there, you can see the execution order.
Hope this helps a bit.
Click to expand...
Click to collapse
ok so postboot is also one of the names like mxipinit and mxipupdate. Why are there so many different ones and which ones are executed in what order?
Grumps said:
ok so postboot is also one of the names like mxipinit and mxipupdate. Why are there so many different ones and which ones are executed in what order?
Click to expand...
Click to collapse
I think the order is all to do with the way the kitchen picks them up. e.g. I use OSKitchen and it seems SYS, then OEM, then EXT packages are picked up, alphabetically-so my provxml's get the same order, which is why I put them in a package of their own with the ZZZ_postboot name. It just makes it the last one to be picked up of the EXT packages-ensuring everything is in place when the script runs
arealityfarbetween said:
I think the order is all to do with the way the kitchen picks them up. e.g. I use OSKitchen and it seems SYS, then OEM, then EXT packages are picked up, alphabetically-so my provxml's get the same order, which is why I put them in a package of their own with the ZZZ_postboot name. It just makes it the last one to be picked up of the EXT packages-ensuring everything is in place when the script runs
Click to expand...
Click to collapse
Ok lemme try
Im trying to change my timezone from dublin -8 to gmt +2. n start kheb take snapshot make the change get i difference .reg file. convert it to xml and the paste it in files folder of lastflash folder?? ill try and see what happens

Categories

Resources