#
# Copyright (C) 2017 FAUmachine Team <info@faumachine.org>.
# This program is free software. You can redistribute it and/or modify it
# under the terms of the GNU General Public License, either version 2 of
# the License, or (at your option) any later version. See COPYING.
#

#
# Insert ubuntu cd
#
cdrom_insert	ubuntu-7.10-x86-CD
#
# Power-on node.
#
power_on
#
# Wait for boot prompt.
#
wait_ppm	01-start_or_install_ubuntu.png			5min
type		"\0d"
#
# wait for usplash loading screen (check if usplash works)
#
#wait_ppm	02-usplash.png					3min
#
# wait for install icon, move to it (to prevent screensaver)
#
wait_ppm	03-install_icon.png				40min
mouse_move	03-install_icon.png
#
# wait for gnome-panel to come up, (move mouse towards it, see above)
#
wait_ppm	02b-gnome_panel_applications.png		60min
mouse_move	02b-gnome_panel_applications.png
#
# click on the install icon
#
mouse_click	03-install_icon.png
#
# type enter (double clicking is much tougher due to timing)
#
type		"\0d"
#
# wait for step 1 screen
#
wait_ppm	04-step_1.png					40min
#
# wait for forward icon and click on it.
#
wait_ppm	05-forward_button.png				20min
mouse_click	05-forward_button.png
#
# wait for step 2 screen
#
wait_ppm	06-step_2.png					40min
mouse_move	06-step_2.png
#
# wait for forward icon and click on it.
#
wait_ppm	05-forward_button.png				20min
mouse_click	05-forward_button.png
#
# wait for step 3 screen.
#
wait_ppm	07-step_3.png					40min
mouse_move	07-step_3.png
#
# wait for forward icon and click on it.
#
wait_ppm	05-forward_button.png				20min
mouse_click	05-forward_button.png
#
# wait for step 4 screen 
#
wait_ppm	08-step_4.png					40min
mouse_move	08-step_4.png
#
# wait for forward icon and click on it.
#
wait_ppm	05-forward_button.png				20min
mouse_click	05-forward_button.png
#
# Wait for name text box, click on it and enter "FAUmachine User"
#
wait_ppm	10-textbox_name.png				40min
mouse_click	10-textbox_name.png
type		"FAUmachine User\0d"
#
# click on left password box, enter "geheim"
#
mouse_click	11-textbox_pw_left.png
type		"geheim\0d"
#
# click on right password box, enter "geheim" again. Step 8 should be loading.
#
mouse_click	12-textbox_pw_right.png
type		"geheim\0d"
#
# wait for "install" button
#
wait_ppm	14-install_button.png				20min
mouse_click	14-install_button.png
#
# wait for "installing system" to give some progress indication.
#
wait_ppm	15-installing_system.png			20min
#
# wait for "configuring target system..."
#
wait_ppm	16-configuring_target_system.png		120min
#
# wait for "cannot access security updates"
#
wait_ppm	17-cannot_access_security_updates.png		120min
#
# wait for "ok button"
#
wait_ppm	button_ok.png					5min
#
# click on ok button
#
mouse_click	button_ok.png
#
# wait for configuring hardware as progress indication
#
wait_ppm	18-configuring_hardware.png			120min
#
# wait for "installation complete" message
#
wait_ppm	19-installation_complete.png			120min
#
# there should be a "restart now" button. click it.
#
wait_ppm	20-restart_now.png				5min
mouse_click	20-restart_now.png
#
# shutdown will ask to remove the disk, wait for it
#
wait_ppm	21-remove_disc.png				20min
#
# remove the cd
#
cdrom_remove
#
# press enter
#
type	"\0d"
#
# wait for username (that's when gdm is up)
#
wait_ppm	23-username_gdm.png				30min
#
# type faumachine + enter
#
type	"faumachine\0d"
#
# type geheim + enter as password 
#
type	"geheim\0d"
#
# nm should be the last thingy to come up, wait for it's icon.
#
wait_ppm	24-nm.png					20min
#
# wait for the shutdown icon (which should be already there), click on it
#
wait_ppm	25-shutdown_icon.png				10min
mouse_click	25-shutdown_icon.png
#
# wait for big version of the shutdown icon, click on it.
#
wait_ppm	26-shutdown_icon_big.png			10min
mouse_click	26-shutdown_icon_big.png
#
# wait for usplash completed progress bar (faumachine mb has problems with
# powering off)
#
wait_ppm	27-usplash_down.png				15min
#
# to be safe, wait for another 2 minutes
#
delay								2min
#
# power off faumachine.
#
power_off
delay								1sec
