#OMJs MOD Pack

theme("sense");


ini_set("rom_name",             "OMJs MOD Pack");
ini_set("rom_version",          "V1.5");
ini_set("rom_date",             "January 1st");
ini_set("rom_author",           "OMJ");
ini_set("rom_device",           "HTC Evo 4G LTE");

splash(4000, "omjbot");

calibrate("1.4072","31","1.3113","43","yes");

ini_set("customkeycode_up",     "115");
ini_set("customkeycode_down",   "114");
ini_set("customkeycode_select", "102");
  fontresload( "0", "ttf/Roboto-Regular.ttf", "12" ); #-- "0" = Small Font
  fontresload( "1", "ttf/Roboto-Regular.ttf", "18" ); #-- "1" = Big Font


viewbox(
  "Welcome",
    "\n\n\n\n\n"+
    "You're about to flash\n\n"+
	"\t: <b><#selectbg_g>"+ini_get("rom_name")+"</#></b>\n\n"+
    "\t: <b><#selectbg_g>"+ini_get("rom_version")+"</#></b>\n\n"+
    "\t: <b><#selectbg_g>"+ini_get("rom_date")+"</#></b>\n\n\n"+
    "Press Next to continue the installation...",
  "@info"
);

resexec("check_if_deodex.sh");

if prop("deodexed_status.prop","odex")=="1" then
	 alert(
	 "ROM Status",
	 "ROM is odexed, installer must exit!"
	 );
exit("");
endif;

if prop("deodexed_status.prop","odex")=="0" then
	 alert(
	 "ROM Status",
	 "ROM is deodexed! Press OK to continue."
	 );
endif;

textbox(
  "Terms Of Use",
  "Please read OMJs Terms of Use ...",
  "@agreement",
  readfile_aroma("agreement.txt")
);

checkbox(
  "Choose your MODs",
  "Please select the MODs ones you want",
  "@apps",
  "custom.prop",
  
		"Status Bar MODs","",2,
			"Battery Mods","Choose which battery mod you want in the next screen",0,
			"Semi-Trans Notification / AOSP Recent apps","This will install the semi-trans notification and/or AOSP Recent apps",0,
			"Clock Options","This will remove or center the clock in the statusbar",0,
			"Remove Power Saver","This will remove the Power Saver option",0,
			"Flat Black StatusBar","This will remove the Power Saver option",0,
			
		"App MODs","",2,
			"Rosie MODs","Choose which Rosie you want",0,
			"5x6 App Drawer","This will add the 5x6 app drawer",0,
			"Roam Only option","Do you want the Roam Only option?",0,
			"Advanced Power Menu Combo","This will install APM, AutoBrightness fix & remove Keyboard icon",0,
			"Add Keyboard icon & Stock AutoBrightness","This will add back the keyboard icon & stock AutoBrightness",0,
			"Disable Exchange Security","This will install Mail with exchange security disabled",0,
			"5meg MMS","This will install the 5m MMS settings, must be flashed post ROM flash",0,
			"HTC Notes","This will install the htc notes app",0,
			"Camcorder fix","This will install the camcorder fix",0,
			"HTCCamera JB Plus","This will install the HTCCamera JB Plus Extrim edition",0,
			"Stock Camera w/ Shutter","This will enable shutter on the stock camera",0,
			"Modified Google Wallet","This will install the Google Wallet w/unsupported device messages removed",0,
			
		"Misc MODs","",2,
			"Camera Button Remap","Do you want to remap the half press camera button to something?",0,
			"Stock JellyBean Boot Animation","This will install the Stock JellyBean Boot animation",0,			
			"Init.d scripts","This will install various init.d scripts/tweaks ",0,
			"Remove 2nd usb icon","This will remove the 2nd usb icon ",0,
			"Persistent adb","This will flash a boot.img with persistent adb enabled",0
);


if
	file_getprop("/tmp/aroma-data/custom.prop","item.1.1") == "1"
then
		menubox(
		"Which Battery Mod Do You Prefer?",
		"Please Select:",
		"@apps",
		"battery.prop",
  
		"Circle w/Percent","This will install the circle battery","@circle",
		"Another Circle w/Percent","This will install another circle battery","@circle2",
		"Stock Sense w/ no Percent","This will install the stock battery","@stock",
		"Stock Sense w/Percent","This will install the stock battery w/ percent","@stock2",
		"Blue Stock Sense w/Percent","This will install the stock battery w/ percent","@stock3"

		);
endif;

if
	file_getprop("/tmp/aroma-data/custom.prop","item.1.2") == "1"
then
		selectbox(
		"Semi-Trans Notification/AOSP Recent apps?",
		"Please Select:",
		"@apps",
		"aosp.prop",
  
		"Semi-Trans Notification w/ AOSP Recent apps","This will install the semi-trans notification w/ AOSP Recent apps",0,
		"Semi-Trans Notification w/ Stock Recent apps","This will install the semi-trans notification w/ Stock Recent apps",0,
		"AOSP Recent Apps w/ Stock Notification","This will install the AOSP Recent Apps w/ Stock Notification",0

		);
endif;

if
	file_getprop("/tmp/aroma-data/custom.prop","item.1.3") == "1"
then
		selectbox(
		"Do you want to center or remove the clock?",
		"Please Select:",
		"@apps",
		"clock.prop",
 
		"Remove the clock","This will remove the clock on the taskbar",o,
		"Center the clock","This will center the clock on the taskbar",o,
		"No","This will install the stock setting",1
		
		);
endif;

if
	file_getprop("/tmp/aroma-data/custom.prop","item.2.1") == "1"
then
		selectbox(
		"Which Rosie do you want?",
		"Please Select:",
		"@apps",
		"rosie.prop",
  
		"Stock Rosie","",1,
		"Rosie w/ Landscape","",0,
		"Rosie w/ Landscape & Transparent Nav Bar","",0,
		"Rosie w/ Transparent Nav Bar","",0
		
		);
endif;

if
	file_getprop("/tmp/aroma-data/custom.prop","item.3.1") == "1"
then
		selectbox(
		"Remap half press camera button?",
		"Please Select:",
		"@apps",
		"camera.prop",
  
		"Camera Button Wake","This will make a press of the camera button wake the phone",0,
		"Camera Button Search","This will make a half press of the camera button search",0,
		"Camera Button Both Wake And Search","This will make a half press of the camera both wake the phone(when sleeping), and search when the phone is awake!",0,
		"Stock Setting!","This will leave stock settings on the Camera Button",1

		);
endif;

viewbox(
  "Ready To Install",
  "All required information has been gathered for this installation.\n\n"+
  "Click next to begin...",
  "@info"
);

install(
  "Installing",
  "Now flashing <b>"+ini_get("rom_name")+"</b>...\n"+
  "Please Wait...",
  "@install",
  "@install"
);

ini_set("text_next", "Finish");

checkviewbox(
    "Installation Completed",
    "<#selectbg_g><b>Congratulation...</b></#>\n\n"+
    "<b>"+ini_get("rom_name")+"</b> has been installed into your device.\n\n"+
    "Installer Status: "+getvar("retstatus")+"\n\n",
    "@welcome",
    "Reboot your device now.",
    "1",
    "reboot_it"
);

exec("/sbin/cp","/tmp/aroma/.install.log","/sdcard/OMJ/AROMA.log");
exec("/sbin/sync");

if
  getvar("reboot_it")=="1"
then
  reboot("onfinish");
endif;