##
#
# AROMA Installer - Team Venom
#       (c) 2011 by Ahmad Amarullah
#           amarullz - xda-developers
#           http://www.amarullz.com/
#                Version 2.51
#
##

ini_set("dp","4");

ini_set("rom_name",             "Team Venom");
ini_set("rom_version",          "1.26.707.5 Radio");
ini_set("rom_author",           "Team Venom");
ini_set("rom_device",           "HTC One");
ini_set("rom_date",             "April 21, 2012");

setvar("app_path","/sdcard/Venom");
setvar("settings_path",getvar("app_path") + "/Settings");

setvar("customize_path",getvar("settings_path") + "/customize_1.prop");
setvar("gps_path",getvar("settings_path") + "/gps_1.prop");
setvar("carrier_path",getvar("settings_path") + "/carrier_1.prop");
setvar("remove_path",getvar("settings_path") + "/remove_1.prop");
setvar("launcher_path",getvar("settings_path") + "/launcher_1.prop");
setvar("signal_path",getvar("settings_path") + "/signal_1.prop");

run_program("/sbin/busybox","mkdir",getvar("app_path"));
run_program("/sbin/busybox","mkdir",getvar("settings_path"));

splash(2000, "venom_banner");

fontresload( "0", "ttf/Roboto-Regular.ttf", "12" );
fontresload( "1", "ttf/Roboto-Regular.ttf", "12" );

theme("venom");

setvar("retstatus",
   install("Installing",
   "Please wait while installation wizard installs <b>"+ini_get("rom_name") + " " + ini_get("rom_version") + "</b>. This may take several minutes.",
   "@install",
   "The installation wizard has successfully installed <b>"+ini_get("rom_name") + " " + ini_get("rom_version")+"</b>. Press Next to continue.");
   );

ini_set("text_next", "Finish");
if getvar("retstatus")=="0" then
   checkviewbox("Installation Completed","<#selectbg_g><b>"+ini_get("rom_name") + " " + ini_get("rom_version")+"</b> was successfully installed on your device.","@welcome","Reboot your device now.","1","reboot_it");
else
   viewbox("Installation Failed","<#selectbg_g>Error</#>\n\n<b>"+ini_get("rom_name") + " " + ini_get("rom_version")+"</b> install failed.\n\nInstaller Status: "+ getvar("retstatus"),"@alert");
endif;

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