#............................................
#:                                          :
#:              ____  __  ___  ______       :
#:             / __ \/  |/  /     /         :
#:            / / / / /|_/ /     /          : 
#:           / /_/ / /  / /     /           :
#:           \____/_/  /_/ /___/            :
#:           ____  ____  __  ___            :
#:          / __ \/ __ \/  |/  /            :
#:         / /_/ / / / / /|_/ /             : 
#:        / _  _/ /_/ / /  / /              :
#:       /_/ |_|\____/_/  /_/               :
#:                                          :
#............................................

theme("sense");


ini_set("rom_name",             "OMJs ELTE ROM");
ini_set("rom_version",          "V3.4");
ini_set("rom_date",             "March 4th");
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"
);

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

textbox(
  "Requirements",
  "OMJ Requirements",
  "@info",
  readfile_aroma("requirements.txt")
);

appendvar("installmsg","\n\nPlease Select Installation Type Below:");

selectbox(
  "Do you wish to perform a full wipe?",
  "Please Select:",
  "@apps",
  "wipe.prop",
  
  "Flash w/out wiping","Not recommended unless currently on OMJs previous release",0,
  "Perform a full wipe","All user data will be lost, your SD will remain in tact",1

  ); 

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,
			"Hide AM/PM, Transparent Notification","Remove AM/PM, add semi-trans notification",0,
			"Clock Options","Add JB colored clock, remove or center the clock in the statusbar",0,
			"Remove Power Saver","This will remove the Power Saver option",0,
			"Flat Black StatusBar","Choose Flat Black Statusbar or revert to stock",0,
			
		"Rosie MODs","",2,
			"Rosie options","Choose which Rosie you want",0,
			"5x6 App Drawer","This will add the 5x6 app drawer",0,
			
		"App MODs","",2,
			"Roam Only option","Do you want the Roam Only option?",0,
			"Disable Exchange Security","This will install Mail with exchange security disabled",0,
			"HTC Notes","This will install the htc notes app",0,
			"HTCCamera JB Plus","Choose either HTCCamera JB Plus Extrim edition or stock w/ shutter added",0,
			"MMS Awake","This mod will turn the screen on when a new text comes in",0,
			
		"Misc MODs","",2,
			"Remove Keyboard icon & Lower AutoBrightness","This will remove the keyboard icon & lower AutoBrightness",0,
			"Increase haptic feedback","This will increase haptic feedback for APM users or stock",0,		
			"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,		
			"Sense 5 Icon Pack","This will install numerous Sense 5 icons",0,			
			"JB Blue Icon Pack","This will install numerous JB blue colored icons",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","","@circle",
		"Another Circle w/Percent","","@circle2",
		"Stock Sense w/ no Percent","","@stock",
		"Stock Sense w/Percent","","@stock2",
		"Blue Stock Sense w/Percent","","@stock3",
		"Honeycomb w/Percent","","@honeycomb",
		"Sense 5 w/Percent","","@sense5"

		);
endif;

if
	file_getprop("/tmp/aroma-data/custom.prop","item.1.2") == "1"
then
		selectbox(
		"Hide AM/PM, Semi-Trans, AOSP Recent apps",
		"Please Select:",
		"@apps",
		"aosp.prop",
  
		"Semi-Trans Notification","",0,
		"Hide AM/PM","",0,
		"Hide AM/PM & Semi-Trans Notification","",0,
		"revert to stock","",0

		);
endif;

if
	file_getprop("/tmp/aroma-data/custom.prop","item.1.3") == "1"
then
		selectbox(
		"StatusBar clock options",
		"Please Select:",
		"@apps",
		"clock.prop",
 
		"Remove the clock","",0,
		"Center the clock","",0,
		"Add JB colored clock","",0,
		"Add JB colored clock + Centered","",0,
		"revert to stock","",0
		
		);
endif;

if
	file_getprop("/tmp/aroma-data/custom.prop","item.1.5") == "1"
then
		selectbox(
		"Stock or Flat Black StatusBar",
		"Please Select:",
		"@apps",
		"black.prop",
 
		"Flat Black","",0,
		"Stock Sense","",0
		
		);
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","",0,		
		"Stock Rosie w/ Transparent Nav bar","",0,
		"Stock Rosie w/ Transparent folders","",0,
		"Stock Rosie w/ No text icons","",0,
		"Stock Rosie w/ Transparent nav bar, folders, no text","",0
		
		);
endif;

if
	file_getprop("/tmp/aroma-data/custom.prop","item.2.2") == "1"
then
		selectbox(
		"Which App Drawer would you like?",
		"Please Select:",
		"@apps",
		"appdrawer.prop",

		"5x6 App Drawer","",0,
		"Revert to stock","",0
		
		);
endif;

if
	file_getprop("/tmp/aroma-data/custom.prop","item.3.1") == "1"
then
		selectbox(
		"Roam Only MOD?",
		"Please Select:",
		"@apps",
		"phone.prop",
  
		"Roam Only MOD","",0,
		"revert to stock","",0

		);
endif;

if
	file_getprop("/tmp/aroma-data/custom.prop","item.3.2") == "1"
then
		selectbox(
		"Do you want to disable exchange security?",
		"Please Select:",
		"@apps",
		"mail.prop",
  
		"Exchange Security disabled","",0,
		"revert to stock","",0

		);
endif;

if
	file_getprop("/tmp/aroma-data/custom.prop","item.3.5") == "1"
then
		selectbox(
		"Install MMS Awake MOD?",
		"Please Select:",
		"@apps",
		"awake.prop",
  
		"Yes!","",0,
		"Revert to stock","",0

		);
endif;

if
	file_getprop("/tmp/aroma-data/custom.prop","item.4.3") == "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,
		"Revert to stock","",0

		);
endif;

if
	file_getprop("/tmp/aroma-data/custom.prop","item.4.6") == "1"
then
		selectbox(
		"Install JB Blue icon pack?",
		"Please Select:",
		"@apps",
		"icons.prop",
  
		"Yes!","",0,
		"Revert to stock","",0

		);
endif;

checkbox(
  "Remove Stuff",
  "What would you like to remove?:",
  "@personalize",
  "remove.prop",

  "HTC SENSE/BLOAT",	"This gets rid of most all HTC Sense and HTC Bloat, you will be left with a stock launcher and lockscreen.",0,
  "Sprint Bloat",	"This will get rid of most of the Sprint bloat with the exception of Visual Voicemail/Wireless Tether.",0,
  "HTC Stocks",    "HTC Stocks app?",0,
  "HTC Watch",     "HTCs PPV service",0,
  "Flickr",        "Flickr support",0,
  "Facebook",     "Removes Facebook",0,
  "Gmail",     "Removes Gmail",0,
  "Movies",     "Removes Play Movies",0,
  "Shopper",     "Removes Shopper",0,
  "Jetcet Print",     "Removes printer services",0,
  "Tune In",	"Removes the Tune In Radio App",0,
  "Swype",		"Removes the Swype Keyboard",0,
  "Es File Explorer",	"Removes the included file explorer",0,
  "Flashlight",     "Removes Flashlight",0,
  "Dropbox",     "Removes dropbox",0,
  "Soundhound",     "Removes Soundhound",0
);

if
	file_getprop("/tmp/aroma-data/remove.prop","item.0.1") == "1"
then
		selectbox(
		"Which Lockscreen Do You Prefer?",
		"Please Select:",
		"@apps",
		"lock.prop",
  
		"AOSP Lockscreen","This will give you the stock android lockscreen.",1,
		"Sense Lockscreen","This will give you the stock sense lockscreen.",0,
		"Holo Locker","This will give you the stock lockscreen with Holo Locker over top of it.",0

		);
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;