##
#
# AROMA Installer - Configuration Script
#       (c) 2011 by Ahmad Amarullah
#        amarullz - xda-developers
#
#     NativeSD method by securecrt
#
#     Dual Installer by Xylograph 
#
##

##
# Calibrate Touchscreen
#-------- Uncomment This to insert calibrating data:
calibrate("1.1229","17","1.1410","23","yes");
##

##
# Initializing Rom Information
##

ini_set("rom_name",             "MIUI");
ini_set("rom_version",          "V5");
ini_set("rom_author",           "GTBLUESKY");
ini_set("rom_device",           "HTC HD2");
ini_set("rom_date",             "TODAY");

##
# Show Simple Splash
#
splash(
  #-- Duration 2000ms / 2 seconds
    5000,
  
  #-- <AROMA Resource Dir>/sample.png
    "sample"
);

###################################################################################################################
#
# STEP 1 - SELECT THEME
#
theme("miui4");

###################################################################################################################
#
# STEP 2 - SHOW ROM INFORMATION
#
viewbox(
  #-- Title
    "Welcome!",

  #-- Text
    "You are about to Install <b>"+
	  #-- Get Config Value
	  ini_get("rom_name")+
	"</b> for <b>"+ini_get("rom_device")+"</b>.\n\n"+
	
      "  VERSION\t: <b><#selectbg_g>"+ini_get("rom_version")+"</#></b>\n"+
      "  CODENAME\t: <b><#selectbg_g>Dual Installer v2</#></b>\n"+
      "  UPDATED\t: <b><#selectbg_g>"+ini_get("rom_date")+"</#></b>\n\n\n"+

    "Press Next to Continue the Installation...",

  #-- Icon
    "@welcome"
);

selectbox(
  "Make a Selection",
  "Please Select Option Below:",
  "icons/apps",
  "mods.prop",
 
# Install Location Selection
 
  "Choose Install Location","",2,
  "Install to NAND",
    "Select to choose", 0,
  "Install to SD-EXT",
    "Select to choose", 1
);

viewbox(
  "Ready To Install",
  "All information has been collected for installation.\n\n"+
  "Click Next To Start Installation...",
  "icons/info"
);

install(
  "Installing",
  "Installing ROM...\nPlease wait...",
  "icons/install"
);

# Set Next Text to 'Finish'
ini_set("text_next", "Finish");

			checkviewbox("Installation Completed","	<#selectbg_g><b>Congratulations...</b></#>\n\n"+
													"Install complete..\n\n"+
													"Don't forget to set your \nSD bootfolder to NativeSD\n"+
													"if you have choosen SD-EXT installation "+getvar("retstatus")+"\n\n\n\n",
													"@welcome","Reboot device.","1","reboot_it");


		#-- Check if reboot checkbox was checked
		if getvar("reboot_it")=="1" then reboot("onfinish");
			# reboot("onfinish");   - Reboot if anything finished
			# reboot("now");        - Reboot Directly
			# reboot("disable");    - If you set reboot("now") before, use this command to revert it.
		endif;
