### LICENSE:
#
# Copyright (C) 2011 Ahmad Amarullah ( http://amarullz.com/ )
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
### FILE INFO:
#
# AROMA Installer 2.50 - AROMA Installer Test Script Configuration
#       (c) 2011-2012 by Ahmad Amarullah
#           amarullz - xda-developers
#           http://www.amarullz.com/
#
#       Binary Version  : 2.50
#       Binary Codename : Edelweis
#
     
#calibrate("0.8429","51","0.9658", "9", "yes");
ini_set("rom_name",             "T-Mobile Galaxy S3 Modem Installer");
ini_set("rom_version",          "v3.0.0");
ini_set("rom_author",           "Clark44");
ini_set("rom_device",           "d2tmo");
ini_set("rom_date",             "09/10/2012");

calibrate_matrix(
  "116130.00",  "280.00",     "-290885.00", "-2940.00",
  "117880.00", "-228410.00", "116413.50",  "12"
);

splash(
    5000,
    "Sonic"
);

selectbox(
    "<~Themes>",
  
    "<~Please choose the theme you would like to continue with for the Aroma Installer>",
  
    "@personalize",
  
    "theme.prop",

    "Generic",            "Unthemed AROMA Installer",                                    1,      #-- selected.0 = 1
    "MIUI Theme",         "MIUI Theme by mickey-r & amarullz",                           0,      #-- selected.0 = 2
    "ICS Theme",          "Ice Cream Sandwitch by DemonWav & amarullz",                  0,      #-- selected.0 = 3
    "MIUI 4 Theme",       "MIUI 4/ICS Theme by amarullz & Lennox",                       0,      #-- selected.0 = 4
    "Sense Theme",        "HTC Sense Theme by amarullz",                                 0       #-- selected.0 = 5

);

if prop("theme.prop","selected.0")=="2" then
  theme("miui");
endif;

if prop("theme.prop","selected.0")=="3" then
  theme("ics");
endif;

if prop("theme.prop","selected.0")=="4" then
  theme("miui4");
endif;

if prop("theme.prop","selected.0")=="5" then
  theme("sense");
endif;

viewbox(
    "Welcome",
    "You are about to use the <b>"+
	  ini_get("rom_name")+
	"</b> for <b>"+ini_get("rom_device")+"</b>.\n\n"+
    "Relevant information of the ROM:\n\n"+
      "  VERSION\t: <b><#selectbg_g>"+ini_get("rom_version")+"</#></b>\n"+
      "  UPDATED\t: <b><#selectbg_g>"+ini_get("rom_date")+"</#></b>\n\n\n"+
    "Press Next to Continue the Installation...",
    "@welcome"
);


###################################################################################################################
#                                                                                                                 #
#                                        GALAXY S3 MODEM INSTALLATION                                             #
#                                                                                                                 #
###################################################################################################################

  selectbox(
	      "-----Modems-----",
	      "Select the desired Modem you want to use",
	      "@addons",
	      "modem.prop",         
          
          
  		  "-----Modem Installation-----",	"",	                               		                2,             #-- Group 1. key = "selected.1"
      "UVALEM",			      				    "Offical Modem",						                    0,             #-- selected.1 = 1
      "UVLG1",			      					"Offical Modem",						                    0,             #-- selected.1 = 2
      "UVLH2",			      					"Offical Modem",						                    0,             #-- selected.1 = 3
      "UVDLH3",			      					"Offical Modem",						                    0,             #-- selected.1 = 4
      "UVLI1",			      					"Leaked Modem",						                    	0,             #-- selected.1 = 5
      "UVLI2",			      					"Leaked Modem",						                    	0,             #-- selected.1 = 6
      "UVLI3",			      					"Leaked Modem",						                    	0,             #-- selected.1 = 7
      "UVLI4",			      					"Leaked Modem",						                    	0,             #-- selected.1 = 8
      "UVLI5",			      					"Leaked Modem (Latest)",						            1              #-- selected.1 = 9
    );	
	
viewbox(
    "-----Ready to Install-----",
    "The wizard is ready to begin installation.\n\n"+
	"Press <b>Install Now</b> to begin the installation.\n\n"+
	"If you want to review or change any of your installation settings, press <b>Back</b>. Press Menu Key -> Quit Installation to exit the wizard.",
    "@install"
);

ini_set("text_next", "Next >");

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

ini_set("text_next", "Finish");

checkviewbox(
    "Installation Completed",
    "<#selectbg_g><b>Congratulations...</b></#>\n\n"+
    "Installer Status: "+getvar("retstatus")+"\n\n",
    "@welcome",
    "Reboot your device now.",
    "1",
    "reboot_it"
);

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