[Epic 4G Android Development] RandomKing:
This is an idea spawned by nubecoder.

The Goal: To collapse full and lite rom versions into a single version, and utilize a configuration file on the sd card to tell the rom how to install itself, creating a standard and simplicity for end-users.

RDU

ROM DEVELOPERS UNITED

AS ONE

CWM ROM Lite/Full Toggle Utility​

Supported ROMs:

- RandomROM ThunderHawk 3.3

- Legendary ROM RC 2.2

To Developers: Join me as the RDU, and together we can make rom flashing a more enjoyable experience.

To Users: If you support this idea, contact your favorite devs on their rom threads and let them know! This utility functions around a file created on your SD Card under the clockworkmod folder called 'options.cfg'. This same file is also now utilized in ThunderHawk 3.3 and II to choose whether to install standard or scroll-able toggles, as well as an advanced or a simple power menu.

So here's how it works:

I personally split my rom into a regular version and a slimmed down lite version. Unfortunately, I then have to make sure I regularly update both versions, and then test them both while keeping both on my phone. Since I'm currently maintaining 3 different roms, and 2 different versions of each, this gets to be a handful. So I've coded a mock version of the setup. I've now designed it, with thanks to hoffman, so that the rom or switcher will default to a Full configuration if no config file exists. The config file is safely tucked away under /sdcard/clockworkmod.

Using a single separate flash-able, I can toggle the config file between lite and full simply by flashing it whenever I want to change it. I can set it to lite, and install as many of my roms in a row in lite version without having to do a thing extra.

The Latest Version Here.

The Previous Version Here.

After setting the config file, simply run the rom, and after copying the config_check file into your tools folder and utilizing coding such as the following, it can determine how to install itself:

#MOVING TOOLS TO PHONE
package_extract_file("tools/config_check", "/tmp/config_check");
set_perm(0, 0, 0755, "/tmp/config_check");

#DETERMINE FULL OR LITE VERSION
run_program("/tmp/config_check","check");
ifelse(
# read the "lite.version" value from the file
file_getprop("/sdcard/clockworkmod/options.cfg", "lite.version") == "yes",
(
# if the value reads yes, enable lite version
ui_print("Lite Version Enabled...");
),
(
# if the value reads no, enable full version
ui_print("Full Version Enabled...");
package_extract_dir("fullpack/system", "/system");
package_extract_dir("fullpack/data", "/data");
package_extract_dir("fullpack/sdcard", "/sdcard");
)
);

UPDATE: (1/06) I have yet further redeveloped the scripting to enhance the capabilities. Previously, this script would read the options file and, assuming that the first line is the "lite.version" property, backup the rest of the file. After which, it would rewrite the file accordingly, and then restore the backed up file info. Should the lite property not be in the first line, the scripting will likely fail. As such, I have rewritten the code in a more elegant way to now properly adjust the options.cfg file without the need to rewrite it. Thus, enabling the file to more safely contain any number of more installation settings, such as Clean Install/Full Wipe.

UPDATE: (12/21) I just rewrote the script further so that it can preserve any additional settings one might want to add (i.e. scrollable/nonscrollable toggles, advanced power menu/simple power menu, etc.) as long as the full/lite setting remains listed first.

UPDATE: (12/15) Okay, so I've tucked the file under Clockworkmod where it should be safe, yet easily accessible. I've also recoded the .zip to us shell scripting to write the file rather than blunt force copying file back and forth over top of each other.

So the idea is that we might be able to standardize something like this across various roms.

I'm currently in talks with earthbound[iap] over a possible app kitchen configuration of sorts to bring this together. Using another cwm script, or android app, or windows app, or manual editing, etc. any number of customizations could be applied this way through this single file.

Further ideas or customizations from fellow rom developers welcome.