Annotation of /tags/installer-simple-0_4_91_20160613_1/functions/installer-dialogs.sh
Parent Directory | Revision Log
Revision 2887 -
(hide annotations)
(download)
(as text)
Fri Jul 31 10:48:17 2015 UTC (9 years, 1 month ago) by niro
Original Path: trunk/installer-simple/functions/installer-dialogs.sh
File MIME type: application/x-sh
File size: 3138 byte(s)
Fri Jul 31 10:48:17 2015 UTC (9 years, 1 month ago) by niro
Original Path: trunk/installer-simple/functions/installer-dialogs.sh
File MIME type: application/x-sh
File size: 3138 byte(s)
-added rudimentary f2fs support
1 | niro | 2420 | welcome() |
2 | { | ||
3 | messagebox -y 10 -x 70 -h $"Welcome" $"Welcome to the ${DEFAULT_TITLE}.\n\n\nPress [Enter] to continue." | ||
4 | } | ||
5 | |||
6 | finish() | ||
7 | { | ||
8 | OK_LABEL=$"Exit" messagebox -y 10 -x 70 -h $"Finish" $"Installation was successfully finished." | ||
9 | } | ||
10 | niro | 2421 | |
11 | niro | 2426 | dialog_setup_hdd_create_partitions() |
12 | { | ||
13 | infobox $"Creating partitions ..." | ||
14 | } | ||
15 | |||
16 | dialog_setup_hdd_format() | ||
17 | { | ||
18 | infobox $"Creating filesystems ..." | ||
19 | } | ||
20 | |||
21 | dialog_install_settings() | ||
22 | { | ||
23 | infobox $"Saving system settings ..." | ||
24 | } | ||
25 | |||
26 | dialog_install_system_image() | ||
27 | { | ||
28 | gaugebox $"Copying system image ..." | ||
29 | } | ||
30 | |||
31 | niro | 2427 | dialog_install_initrd() |
32 | { | ||
33 | infobox $"Writing initrd ..." | ||
34 | } | ||
35 | |||
36 | niro | 2426 | dialog_install_bootsector() |
37 | { | ||
38 | infobox $"Writing bootsector ..." | ||
39 | } | ||
40 | |||
41 | dialog_install_successful() | ||
42 | { | ||
43 | niro | 2516 | OK_LABEL=$"Finish" messagebox $"The installation was \Z2successful\Zn." |
44 | niro | 2426 | } |
45 | |||
46 | dialog_install_failure() | ||
47 | { | ||
48 | messagebox $"The installation \Z1failed\Zn.\n\nError at ${ERROR}, RetVal: ${RETVAL}" | ||
49 | } | ||
50 | |||
51 | niro | 2421 | dialog_no_harddrive_found() |
52 | { | ||
53 | niro | 2460 | OK_LABEL=$"Abort" messagebox $"No appropriate harddrive found.\nInstallation failed." |
54 | niro | 2421 | } |
55 | niro | 2422 | |
56 | dialog_select_target_harddrive() | ||
57 | { | ||
58 | menubox $"Select installation target drive:" $(for i in ${ALL_DISKS}; do echo "${i}:";done) | ||
59 | } | ||
60 | niro | 2474 | |
61 | dialog_setup_hdd_info() | ||
62 | { | ||
63 | niro | 2882 | case "${INSTALL_METHOD}" in |
64 | auto) | ||
65 | dialog_setup_hdd_info_auto | ||
66 | dialog_setup_hdd_create_partitions | ||
67 | ;; | ||
68 | normal) dialog_setup_hdd_info_normal ;; | ||
69 | niro | 2885 | single) dialog_setup_hdd_info_single ;; |
70 | niro | 2887 | flash) dialog_setup_hdd_info_flash ;; |
71 | niro | 2882 | esac |
72 | } | ||
73 | |||
74 | dialog_setup_hdd_info_normal() | ||
75 | { | ||
76 | niro | 2885 | local drivenode="${HDD//\/dev\/}" |
77 | niro | 2474 | |
78 | messagebox -h $"[ Harddrive partitioning ]" \ | ||
79 | niro | 2885 | $"Please create 3 partitions.\n\n |
80 | [ \Z3${drivenode}1\Zn ] type: \Z3linux\Zn with ca. 50MB diskspace\n[ \Z3${drivenode}2\Zn ] type: \Z3linux Swap\Zn with ca. 256MB diskspace\n[ \Z3${drivenode}3\Zn ] type: \Z3linux\Zn with the remaining diskspace (min. 512MB)\n.\nPlease mark ${drivenode}1 \Z3bootable\Zn." | ||
81 | niro | 2474 | } |
82 | |||
83 | dialog_setup_hdd_info_auto() | ||
84 | { | ||
85 | local drivenode="${HDD//\/dev\/}" | ||
86 | |||
87 | messagebox -h $"[ Harddrive partitioning ]" \ | ||
88 | $"\Z1Warning!\Zn\n\nAll data on disk [ \Z3${drivenode}\Zn ] will be erased!" | ||
89 | } | ||
90 | niro | 2475 | |
91 | niro | 2885 | dialog_setup_hdd_info_single() |
92 | { | ||
93 | local drivenode="${HDD//\/dev\/}" | ||
94 | |||
95 | messagebox -h $"[ Harddrive partitioning ]" \ | ||
96 | $"Please create 1 partition.\n\n[ \Z3${drivenode}1\Zn ] type: \Z3linux\Zn with the whole diskspace.\nPlease mark ${drivenode}1 \Z3bootable\Zn." | ||
97 | } | ||
98 | |||
99 | niro | 2887 | dialog_setup_hdd_info_flash() |
100 | { | ||
101 | local drivenode="${HDD//\/dev\/}" | ||
102 | |||
103 | messagebox -h $"[ Harddrive partitioning ]" \ | ||
104 | $"Please create 3 partitions.\n\n | ||
105 | [ \Z3${drivenode}1\Zn ] type: \Z3linux\Zn with ca. 50MB diskspace\n[ \Z3${drivenode}2\Zn ] type: \Z3linux\Zn with the remaining diskspace (min. 512MB)\n.\nPlease mark ${drivenode}1 \Z3bootable\Zn." | ||
106 | } | ||
107 | |||
108 | niro | 2475 | dialog_setup_system_menu() |
109 | { | ||
110 | menubox -h $"[ Harddrive partitioning ]" $"\nSelect an installation mode" \ | ||
111 | $"1:Automatic setup (recommended)" \ | ||
112 | ":" \ | ||
113 | $":\Z1Expert modes:\Zn" \ | ||
114 | niro | 2885 | $"2:Common IDE-disk (manual setup)" \ |
115 | niro | 2887 | $"3:Common IDE-disk (single partition)" \ |
116 | $"4:Flash SDHC/NAND or USBStick (manual setup)" | ||
117 | niro | 2475 | } |
118 | niro | 2477 | |
119 | dialog_main() | ||
120 | { | ||
121 | CANCEL_LABEL=$"Exit" menubox $"Configuration:" \ | ||
122 | $"1:Install system" \ | ||
123 | $"2:Show detected harddrives" \ | ||
124 | $"3:Exit and reboot" \ | ||
125 | $"4:Exit and drop into a shell" | ||
126 | } |