﻿### 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.
#
###

ini_set("rom_name","Eclipse Kernel");
ini_set("rom_version","1.4");
ini_set("rom_author","Daekin");
ini_set("rom_device","HTC HD2");
ini_set("rom_date","January 19, 2014");

anisplash(
    1,
    "splash/a",500,
    "splash/a1",30,
    "splash/a2",30,
    "splash/a3",30,
    "splash/a4",30,
    "splash/a5",30,
    "splash/a",1000
);

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

theme("ics");

viewbox(
	"Welcome!",
	"\nYou are about to install:\n\n"+
	"<b><#selectbg_g>"+ini_get("rom_name")+" "+ini_get("rom_version")+
	"</#></b>\nby <b>"+ini_get("rom_author")+"</b>\n\n"+
	"Device:\t<b><#selectbg_g>"+ini_get("rom_device")+"</#></b>\n"+
	"Update:\t<b><#selectbg_g>"+ini_get("rom_date")+"</#></b>\n\n"+
	"Press <b>Next</b> to continue installation.",
	"@welcome"
);

agreebox(
	"Important Notice",
	"Please carefully read the Terms of Use!",
	"@agreement",
	resread("readme.txt"),
	"I agree with these Terms of Use",
	"You must agree with the Terms of Use to continue."
);

checkbox(
	"Custom Applications",
	"Select applications you want to install:",
	"@apps",
	"apps.prop",
	"WiFi Tether for Root Users","Modified version designed for HTC HD2",1
);

if file_getprop("/tmp/aroma/apps.prop","item.0.1") == "1" then
	selectbox(
		"Storage Mode",
		"Please select currently used storage mode:",
		"@personalize",
		"mode.prop",
		"SD-EXT Compatible","Use <b>/sd-ext/app</b> directory",1,
		"NAND Compatible","Use <b>/data/app</b> directory",0
	);
endif;

ini_set("text_next","Install now");

viewbox(
	"Ready to install",
	"\nYou are now ready to begin installation.\n\n"+
	"Press <b>Install now</b> to start.\n\n"+
	"If you want to review or change any\nof your installation settings, press <b>Back</b>.",
	"@install"
);

ini_set("text_next", "Next");

install(
	"Installation",
	"Installing <b>"+ini_get("rom_name")+"</b>.\n"+
	"Please wait...",
	"@update",
	"Done!\nPress <b>Next</b> button."
);

ini_set("text_next","Finish");

viewbox(
	"Installation Successful",
	"\nYou are now running <b><#selectbg_g>"+ini_get("rom_name")+" "+ini_get("rom_version")+"</#></b>.\n\n"+
	"<#selectbg_g><b>Every donation to support author\nof this kernel is greatly appreciated!</b></#>\n\n",
	"@welcome"
);

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