PPCGeeks

PPCGeeks (http://forum.ppcgeeks.com/index.php)
-   HTC Vogue Development (http://forum.ppcgeeks.com/forumdisplay.php?f=59)
-   -   Customize your StartMenu for PPCKitchen.org's - BuildOS - Tutorial (http://forum.ppcgeeks.com/showthread.php?t=27867)

rstoyguy 05-28-2008 11:38 PM

Customize your StartMenu for PPCKitchen.org's - BuildOS - Tutorial
 
1 Attachment(s)
About this tutorial:
-=-=-=- -=-=-=- -=-=-=- =-=-=- -=-=-=-
This tutorial will show you how to customize the Start Menu for the PPCKitchen.org's Kitchen. It will also work on other kitchens, you will just have to find the target Link files.
This tutorial ASSUMES you have working knowledge of cooking your own rom with BuildOS. And general Windows knowledge. I AM NOT RESPONSIBLE FOR ANYTHING THAT HAPPENS TO YOU OR YOUR DEVICE by reading this tutorial! This tutorial should work with most windows-mobile based kitchens, Apache, Titan, Vogue and others. I will not teach you how to use any of the programs in this tutorial, but you are free to post your questions/comments.

Credits:
-=-=-=- -=-=-=- -=-=-=- =-=-=- -=-=-=-
1. I would like to thank PPCGeeks.com and all the members.
2. All those involved with PPCKitchen.org: no2chem - GGuruUSA - naigaman - Colonel - Tiermann - ImCoKeMan - helmi - dcd - luv2chill - NexVision

3. Old_Man_Jenkins for forcing my curiousity and speeding up the thought process creating/testing these methods!
4. All those that have made contributed to making all the kitchens possible! You all know who they (you) are!

Terminology used in this tutorial:
-=-=-=- -=-=-=- -=-=-=- =-=-=- -=-=-=-
OEM - Similar to a .CAB file, this is the method used to add files/programs to a cooked Rom. This is copied to USER_OEM if using the ppckitchen, or into your OEM folder if you are using another kitchen.
INITFLASHFILES.TXT - This is the text file you will edit to copy your files on your device from \windows to \whereever.
GUID - GUID (or UUID) is an acronym for 'Globally Unique Identifier'. It is a 128-bit integer number used to identify resources.
LNK File - Shortcut that windows mobile uses to launch a file. They are usually placed in \Windows\Start Menu to make up your StartMenu.

The Tools/Files you will need:
-=-=-=- -=-=-=- =-=-=- -=-=-=- -=-=-=-
- PPCKitchen.org BuildOS.msi fully installed and ready to go.
- WinRar or WinZip
- Notepad.exe (Text editor that comes with windows, or any other text editor)
- Old fashioned pen and paper.
- The zzz_Start_Menu_OEM.zip
- QuickMenu - This windowsmobile app will make all this worth while!

The steps involved:
-=-=-=- -=-=-=- =-=-=- -=-=-=- -=-=-=-
This tutorial will allow you to customize your Start Menu on your device using a PPCKitchen rom. I will show you how to add files to the attached "empty OEM", and then edit the initflashfiles.txt file that will copy your files to where you want 'em.
1. Install the necessary files.
2. Plan your approach.
3. Plan your Start Menu.
4. Locate and Rename target LNK files in your OEM's *CAUTION!
5. Locate and Rename target LNK files in your Donor Kitchen *CAUTION!
6. Edit your initfiles.txt from zzz_Start_Menu_OEM
7. Flash!
8. Test placement, Goto step 3 if necessary

1. Install the necessary files.
-=-=-=- -=-=-=- =-=-=- -=-=-=- -=-=-=-
Here are the files you will need.
a. PPCKitchen.org BuildOS.msi fully installed and ready to go. The OEM archives out of the PPCKitchen are PPCGeeks_OEM.rar, and 000_Shareware.rar.
b. WinRar or WinZip
c. Notepad.exe (Text editor that comes with windows, or any other text editor)
d. Unzip the attached zzz_Start_Menu_OEM.zip and place the folder zzz_Start_Menu_OEM into your USER_OEM directory. This contains the unique GUID needed by the kitchen and the initflashfiles.txt you will edit later on.

2. Plan your approach.
-=-=-=- -=-=-=- =-=-=- -=-=-=- -=-=-=-
There are several way to approach this task. Let's start with the kitchen.

WARNING!
************************************************** *********************************
DO NOT DO ANYTHING INSIDE THE KITCHEN EXCEPT RENAME THE TARGET LNK FILE! ONLY ADD A "zz-"
TO THE BEGINNING OF THE LNK FILE! DO NOT DELETE FILES, ADD FILES, ONLY RENAME LNK FILES.
************************************************** *********************************
DO NOT, I REPEAT DO NOT ATTEMPT TO TAKE A SHORTCUT AND EDIT THE INITFLASHFILES.DAT!
************************************************** *********************************

Wow, that was Loud! You will learn the locations and how-to later in this tutorial.
Now let's talk about the preparing your OEM's and to edit the LNK files. There are three ways to do this.
a. You could rename the LNK file inside the packaged OEM file archive. This would be erased when you update one on the archives.
b. You could extract the OEM archives, but the uncompressed PPCGeeks_OEM.rar is 170MB, compressed it is only 77MB (currently).
c. My prefered method is to extract the OEM's you want with a StartMenu LNK file, and place them in your USER_OEM folder. Then delete the OEM from it's original archive. This takes up space, and some say it slows down the 'Build', but you will stay organized. You might even want to add a "_ZZ to the end of the OEM directory name so you know it has been edited for your custom StartMenu.
d. Do it your way. If it works, then go for it!

3. Plan your Start Menu.
-=-=-=- -=-=-=- =-=-=- -=-=-=- -=-=-=-
Windows Mobile 6.1 and prior only creates the following directories on the Start Menu: Programs, Settings, and Games. These we will not change. So on a piece of paper or text editor, plan out your StartMenu. You know which files you will be adding, jot them down. Now using your "creative juices", create your directory structure and annotate where you will be placing your shortcuts for your OEM's in your new StartMenu. Leave room to write down the zz*.lnk name. It will be helpfull later when editing your initflashfiles.txt file!

rstoyguy 05-28-2008 11:38 PM

Re: Customize your StartMenu for PPCKitchen.org's - BuildOS - Tutorial
 
4. Locate and Rename target LNK files in your OEM's
-=-=-=- -=-=-=- =-=-=- -=-=-=- -=-=-=-
Depending on the method you decided on in step #2, do it. If you went with my method, go ahead and extract your OEM's and place them in the USER_OEM folder of the kitchen.
Now let's rename the LNK files. For the sake of uniformity, and functionality, rename your link files by adding a "zz-" using the method that I explained in the initflashfiles.txt section. Why this way? Well, it puts the file at the end of the list on your device, in windows explorer, most won't be able to edit the extension on a .lnk file. It just made sense to me.
Starting at the top of your StartMenu planner, look inside each OEM and find
the *.lnk file. Rename the lnk file to "zz-*.lnk" by adding "zz-" to the name. Check it off your list and write down the name of the file so you will have it when we edit the initflashfiles.txt later. Now do the same steps for all your OEM's that have a LNK placed in the start menu.

5. Locate and Rename target LNK files in your Donor Kitchen
-=-=-=- -=-=-=- =-=-=- -=-=-=- -=-=-=-

WARNING!
************************************************** *********************************
DO NOT DO ANYTHING INSIDE THE KITCHEN EXCEPT RENAME THE TARGET LNK FILE! ONLY ADD A "zz-"
TO THE BEGINNING OF THE LNK FILE! DO NOT DELETE FILES, ADD FILES, ONLY RENAME LNK FILES.
************************************************** *********************************
DO NOT, I REPEAT DO NOT ATTEMPT TO TAKE A SHORTCUT AND EDIT THE INITFLASHFILES.DAT!
************************************************** *********************************

First you need to know where your link files are. Here is a guide for the PPCKitchen:

StartMenu .LNK Name.........Location in the Kitchen (Directory and optional original name)
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Calculator.lnk.................\SYS\BaseApps\calc. lnk
calendar.lnk.................\SYS\BasaeApps
Contacts.lnk................\SYS\BasaeApps\addrboo k.lnk
Messaging.lnk...............\SYS\BaseApps\tmail.ln k
Notes.lnk.....................\SYS\BaseApps\noteta ke.lnk
tasks.lnk......................\SYS\BaseApps
Record.lnk...................\SYS\BaseApps\voice.l nk
Messaging.lnk...............\SYS\BaseApps\tmail.ln k
Notes.lnk.....................\SYS\BaseApps\noteta ke.lnk
tasks.lnk......................\SYS\BaseApps

Internet Explorer.lnk......\SYS\Browsing\pie.lnk
icon.lnk........................\SYS\Entertainment \gamesico.lnk
Bubble Breaker.lnk..........\SYS\Entertainment\BubbleBrea ker.lnk
Solitaire.lnk...................\SYS\Entertainment \solitaire.lnk

Internet Sharing.lnk........\SYS\INTERNETSHARING\IntShrUI.l nk
Phone.lnk......................\SYS\PhoneRedist\cp rog.lnk

ActiveSync.lnk...............\SYS\Shell\sync.lnk
File Explorer.lnk..............\SYS\Shell\fexplore.lnk
help.lnk.........................\SYS\Shell
search.lnk......................\SYS\Shell

This is pretty standard for WindowsMobile. Using WinRar, open up your kitchen. For the above example I used the kitchen Vogue_WM6.1_GPS_3.02.rar. ONLY RENAME THE LINK FILES YOU WISH TO MANIPULATE! Stick with our standard renaming scheme of adding "zz-" to the LNK filenames. Now close and save Vogue_WM6.1_GPS_3.02.rar. Remember, if you rename help.lnk to zz-help.lnk and omit it from the initflashfiles.txt, it will not get copied to your StartMenu, thus it won't show up!

6. Edit your initfiles.txt from zzz_Start_Menu_OEM
-=-=-=- -=-=-=- =-=-=- -=-=-=- -=-=-=-
First let's take a look at the base INITFLASHFILES.TXT file we will be starting with:

Code:


;My initflashfiles.txt
 
;make my dir
Directory("\Windows\start menu\programs"):-Directory("don")
 
;..\sys\baseapps
Directory("\Windows\Start Menu\programs\don"):-File("Calendar.lnk","\Windows\zz-calendar.lnk")
Directory("\Windows\Start Menu\programs\don"):-File("Contacts.lnk","\Windows\zz-addrbook.lnk")
 
;..sys\browsing
Directory("\Windows\Start Menu\programs\don"):-File("Internet Explorer.lnk","\Windows\zz-pie.lnk")
 
;..sys\shell
Directory("\Windows\Start Menu\programs\don"):-File("Help.lnk","\Windows\zz-help.lnk")
 
;End of File

As you see above, there are basically two commands we are interested in:
Directory("\existing_directory\"):- Directory("new_di rectory")
Directory("destination_directory"):-File("destination_filename","source_path+filename" )
In the above example where it says ";Make your directories here:", well ya, it makes your directories. If it already exists, nothing bad will
happen. Always create them unless you are positive they exist in the typical windows directory structure! In the example above the directory "\Windows\Start Menu\Programs\Don" is created. Using your template you created in step #3, using the cut&paste method, copy the existing line to create your StartMenu's directory structure.

Where it says ";Copy your files here:", this copies your files from their cooked location in \windows to your StartMenu. In the example above I have moved four files that usually crowd up your 'root' directory of the Start Menu. Use the cut&paste method to "copy" your files into the StartMenu. You will need a line for each lnk file you wish to relocaate. You can use the comment line to either make notes to yourself, or to comment out or omit file copy operations.

To create "nested" directories in your StartMenu, create them one at a time.

The following will create \Windows\Start Menu\Programs\Utilities\Rarely Used :
Code:

;make my dir
Directory("\Windows\start menu\programs"):-Directory("Utilities")
Directory("\Windows\start menu\programs\utilities"):-Directory("Rarely Used")

Note1: in the above code sample, the comment ";" directory locations are from the kitchen I use. I inserted those comments so if I de-complile a new rom, or on a new build, I can easily find the base LNK files that I need to rename.
Note2: Notice how in the first portion of the above command case doesn't matter. In the second part, when creating the actual directory, uppercase/lowercase do matter!

Tip1: Any line beginning with a ";" is ignored as a comment.
Tip2: If you rename for example Help.lnk to zz-Help.lnk and do not copy it, it will not show up in the Start Menu!
Tip3: The above example is the actual initflashfiles.txt from the zz_StartMenu_OEM you downloaded (when first published).
Tip4: This method also works on a de-constructed rom!

7. Flash!
-=-=-=- -=-=-=- =-=-=- -=-=-=- -=-=-=-
Press Play and FLASH!

8. Test placement, Goto step 3 if necessary
-=-=-=- -=-=-=- =-=-=- -=-=-=- -=-=-=-
Browse your StartMenu and look for any needed changes you would like to make. If there are changes, back to step #3. Repeat until DONE!

rstoyguy 05-28-2008 11:39 PM

Re: Customize your StartMenu for PPCKitchen.org's - BuildOS - Tutorial
 
My Thoughts on this....
-=-=-=- -=-=-=- =-=-=- -=-=-=- -=-=-=-
This site is about sharing the knowledge. I personally think the Borg are an evil race, But I do like their "collective Brain" theory. So I started writing the Customizing a Custom Rom tutorials. I have tested this and it works fine. The folks at the PPCKitchen may not want you messing with it this way, but this will further enhance the kitchen until they add more customizations like this. Heck, I hope I inspire another DLL for BuildOS...(hint...hint) They have the OEMizer, why not the MENUizer? So I feel that I am only enhancing the kitchens usability by showing you how to customize the start menu. If something bad happens, just reinstall the kitchen. No big deal...

A word on my methods of renaming and hooking onto the initflashfiles.dat using an empty OEM and it's initflashfiles.txt. When the kitchen builds a rom, BuildOS uses a SYS specific initflashfiles.dat. It then looks into each OEM 'checked and appends the contents of initflashfiles.txt to the initflashfiles.dat. In this tutorial, you will rename LNK files. This will make it so the SYS rom's initflashfiles.dat and each OEM's initflashfiles.txt won't be able to copy the original file. DON'T WORRY. I've been using this method for a while now and if winmobile can't file a file to copy...it moves to the next entry. If it can't find a directory to create, or you tell it to create a duplicate,...it moves to the next entry. Keeping this in mind, Nothing Bad will happen! If you get the name of a file wrong, it won't copy it. It will do what you tell it to, with error safety nets! By editing something other that what I describe in this tutorial, that is when bad things will happen. Use caution with this tutorial. Print it, and highlight the good stuff in yellow!

I hope you have enjoyed this tutorial and you use it to customize your PPCGeek'd Device!

Edit: This method also works with the command line kitchen many Chefs are using. You just have to search for the links in your kitchen directory.

tmz 05-29-2008 12:24 PM

Re: Customize your StartMenu for PPCKitchen.org's - BuildOS - Tutorial
 
This looks like some great work, Thanks T M Z

fredcatsmommy 05-29-2008 06:14 PM

Re: Customize your StartMenu for PPCKitchen.org's - BuildOS - Tutorial
 
very nice. something to play with in anticipation of cooking anew. Thanks.

rstoyguy 05-31-2008 12:15 AM

Re: Customize your StartMenu for PPCKitchen.org's - BuildOS - Tutorial
 
I had a good question that came up in a pm and want to share it.

You can move the *.lnk files from your SYS folders and OEM's and place them all in the zzz_Start_Menu_OEM folder if you wish. You still need to rename them and also remember to delete them from their original locations again if you update the donor rom.
The method above is preffered, but this will work too. You want to be extremely carefull what you delete from your SYS folder!

OMJ 05-31-2008 08:19 AM

Re: Customize your StartMenu for PPCKitchen.org's - BuildOS - Tutorial
 
nice write-up rstoyguy, and a very good idea on customizing the start menu.....thx for sharing!

colonel 06-03-2008 03:36 PM

Re: Customize your StartMenu for PPCKitchen.org's - BuildOS - Tutorial
 
One suggestion....

Instead of having to edit .lnk files within rars or anywhere else, it would be easier to just create new .lnk files and have them in the OEM in User_OEM. These will overwrite any shortcut files that are in OEM or SYS. This is also a good idea since it reduces the risk of unintentional errors when messing with core files. I will definitely look at this though. Looks like a helpful tool. Perhaps we can streamline it further.

Also, jump in the chat room if you need to rstoyguy.


Also, after rereading, are you talking about the start menu or Start Menu\Programs? I am thinking it looks more like \Programs. If this is the case, I can show you an even easier way to do everything you want to do here. While BuildOS may be "limited" this is done to keep it simple. However, you can do just about anything you can think of with it while leaving the core files in the .rars.

Anyway, I will try to get to it and create a provxml to show you how to do what you want.

One other thing, you don't technically need to create the directory as long as there is a shortcut going into it. However, if it is going to be empty for now, you have to create it seperately.

Good work though and I think this will help a lot of people.

mrgeoff 06-03-2008 03:44 PM

Re: Customize your StartMenu for PPCKitchen.org's - BuildOS - Tutorial
 
colonel ftw!

Would you care to show off that easier way? :)

I tried a while back to move the default start menu items back to programs. I haven't tried this method yet, but would I be able to just set up a provxml to move the file back to the programs folder without having to create new lnk files?

colonel 06-03-2008 03:48 PM

Re: Customize your StartMenu for PPCKitchen.org's - BuildOS - Tutorial
 
You can have a provxml do just about anything you want.

Also, this could be added to OEMizer, but there will be some obstacles to overcome. Mostly, the problem will be that OEMizer would not know which apps you are selecting in buildOS and would not know how to set the shortcuts up as options. I guess people could add them by hand, but that is no fun ;)


All times are GMT -4. The time now is 05:42 PM.

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


Content Relevant URLs by vBSEO 3.6.0