- Partition size limits for SFS and FFS are now enforced.
[cake.git] / workbench / tools / InstallAROS / install.h
blob712c577c349f5edda24306f43ea40f81d3ab34e0
1 #include <exec/lists.h>
2 #include <exec/nodes.h>
4 static const char KMsgWelcome[] =
5 MUIX_B"\nWelcome to the AROS Research OS installer.\n\n" MUIX_N
6 "This program allows you to install AROS\n"
7 "on your computer's hard drive.\n\n"
8 "Please be aware that the stability of this software\n"
9 "cannot be guaranteed.\n"
10 "It is possible that " MUIX_B "loss of data" MUIX_N " may occur\n"
11 "on any drive in your system, including those\n"
12 "used by other operating systems.\n";
14 static const char KMsgInstallOptions[] =
15 "\nPlease choose your installation options.\n\n";
17 static const char KMsgDestOptions[] =
18 "\nPlease choose where to install AROS.\n\n"
19 "If you are unsure, then use the defaults";
21 static const char KMsgDestVolume[] =
22 "Destination Partition";
24 static const char KMsgWorkVolume[] =
25 "Work Partition";
27 static const char KMsgBeginWithPartition[] =
28 "OK, we are ready to begin.\n\n"
29 "Since you've chosen to format at least one partition,\n"
30 "you will no longer be able to undo changes\n"
31 "after this point.\n\n"
32 "Select Proceed to begin installation.";
34 static const char KMsgBeginWithoutPartition[] =
35 "OK, we are ready to begin...\n\n"
36 "We have collected enough information\n"
37 "to begin installation on this computer.\n\n"
38 "\nSelect Proceed to begin installation.";
40 static const char KMsgPartitionOptions[] =
41 "We will now create AROS partitions on your hard drive\n\n"
42 "Please select how you would like to proceed...\n";
44 static const char KMsgDestPartition[] =
45 "System Partition (DH0)";
47 static const char KMsgWorkPartition[] =
48 "Work Partition (DH1)";
50 static const char KMsgPartitionTooBig[] =
51 "The partition sizes you have requested are too large.\n"
52 "The maximum size of an SFS partition is %ld GB (%ld MB),\n"
53 "while the maximum size of an FFS partition is %ld GB (%ld MB).\n"
54 "Please reduce the size of the affected partitions.\n";
56 static const char KMsgGrubOptions[] =
57 "AROS uses the GRUB bootloader.\n\n"
58 "In most cases, GRUB's bootblock should\n"
59 "be installed on the first drive in your system.\n"
60 "If the Installer detects a Microsoft Windows installation,\n"
61 "it will be included as a choice in GRUB's boot menu.\n";
63 static const char KMsgGrubDrive[] =
64 "Drive to install GRUB's bootblock on:";
66 static const char KMsgGrubGOptions[] =
67 MUIX_B "GRUB Settings" MUIX_N;
69 static const char KMsgGrubGrub[] =
70 "Path to GRUB files:";
72 static const char KMsgNoGrubDevice[] =
73 "Please enter the device name and unit number for\n"
74 "the drive GRUB's bootblock should be installed on.\n";
76 static const char KMsgPartitioning[] =
77 "Partitioning your drives...\n\n";
79 static const char KMsgInstall[] =
80 "Copying files to the hard disk.\n\n"
81 "This may take some time...\n";
83 static const char KMsgBootLoader[] =
84 "Copying the GRUB bootloader to your\n"
85 "hard drive, and installing...\n";
87 static const char KMsgPostInstall[] =
88 "Running the external post-install\n"
89 "script. Please wait.\n";
91 static const char KMsgDoneReboot[] =
92 "AROS partitions have now been created!\n"
93 "To continue installation, you must\n"
94 "reboot AROS, and re-run\n"
95 "this installer application\n\n"
96 "Select Proceed to finish\n";
98 static const char KMsgDone[] =
99 "Congratulations, you now have AROS installed!\n\n"
100 "To boot AROS from the hard drive,\n"
101 "remove the installation media and\n"
102 "restart your computer using the\n"
103 "power switch or reset button.\n\n"
104 "Select Proceed to finish\n";
106 static const char KMsgCancelOK[] =
107 "Are you sure you wish to cancel\n"
108 "this installation?\n";
110 static const char KMsgCancelDanger[] =
111 "Irreversible changes have been made\n"
112 "to your system.\n\n"
113 "Cancelling now may leave your PC in an\n"
114 "unbootable state\n\n"
115 "Are you sure you wish to cancel\n"
116 "this installation?\n";
118 static const char KMsgProceed[] =
119 "_Proceed";
121 static const char KMsgNotAllFilesCopied[] =
122 "Not all files in '%s'\n"
123 "were copied.\n"
124 "Should the instalation continue?\n";
126 static const char KMsgPartitioningFailed[] =
127 "Partitioning of disk failed. InstallAROS\n"
128 "will now quit.";
130 #if GRUB == 1
131 static const char KMsgGRUBNonFFSWarning[] =
132 "You have selected a filesystem different\n"
133 "than FFS-Intl for the DH0 partition. Since\n"
134 "this distribution of AROS is compiled with\n"
135 "GRUB bootloader, you will not be able to\n"
136 "boot the system after installation\n\n"
137 "Should the partitioning continue?\n";
138 #endif
140 /* Unused strings. Kept for reference */
144 static const char KMsgLanguage[] =
145 "The system prefs for your language settings\n"
146 "will now launch\n\n"
147 "Choose the settings that are relevant to you\n";
149 static const char KMsgNoDrives[] =
150 "It appears you do not have a hard\n"
151 "drive installed in your PC.\n\n"
152 "Installation of AROS can only be performed on to\n"
153 "a hard drive just now. Sorry.\n\nPress Proceed To Exit\n";
157 #define MUIM_IC_NextStep (0x00335551)
158 #define MUIM_IC_PrevStep (0x00335552)
159 #define MUIM_IC_UndoSteps (0x00335553)
161 #define MUIM_IC_Install (0x00335554)
163 #define MUIM_FindDrives (0x00335555)
164 #define MUIM_PartitionFree (0x00335556)
165 #define MUIM_Partition (0x00335557)
166 #define MUIM_Format (0x00335558)
168 #define MUIM_IC_CopyFiles (0x0033555a)
169 #define MUIM_IC_CopyFile (0x0033555b)
171 #define MUIM_IC_CancelInstall (0x0033556a)
172 #define MUIM_IC_ContinueInstall (0x0033556b)
173 #define MUIM_IC_QuitInstall (0x0033556c)
175 #define MUIM_Reboot (0x0033556d)
176 #define MUIM_RefreshWindow (0x00335570)
178 /* to be made obsolete */
180 #define MUIA_Page (0x00335580)
182 #define MUIA_PartitionButton (0x00335581)
183 #define MUIA_Gauge1 (0x00335582)
184 #define MUIA_Gauge2 (0x00335583)
185 #define MUIA_Install (0x00335584)
186 /**/
187 #define MUIA_WelcomeMsg (0x0033558a)
188 #define MUIA_FinishedMsg (0x0033558b)
190 /* new - some/most will "vanish(tm)" */
192 #define MUIA_OBJ_Installer (0x0033558d)
193 #define MUIA_Grub_Options (0x0033558e)
194 #define MUIA_List_Options (0x0033558f)
196 #define MUIA_OBJ_Window (0x00335590)
197 #define MUIA_OBJ_WindowContent (0x00335591)
199 #define MUIA_OBJ_PageTitle (0x00335592)
200 #define MUIA_OBJ_PageHeader (0x00335593)
201 #define MUIA_OBJ_CActionStrng (0x00335594)
203 #define MUIA_OBJ_Back (0x00335595)
204 #define MUIA_OBJ_Proceed (0x00335596)
205 #define MUIA_OBJ_Cancel (0x00335597)
207 #define MUIA_IC_License_File (0x00335598)
208 #define MUIA_IC_License_Mandatory (0x00335599)
210 #define MUIA_IC_EnableUndo (0x00335599)
212 /* Install Results */
214 #define MUIA_InstallComplete (0x003355ff)
215 #define MUIA_InstallFailed (0x003355fe)
217 #define MUIV_Inst_Completed (0xff)
218 #define MUIV_Inst_InProgress (0x00)
219 #define MUIV_Inst_Cancelled (0x01)
220 #define MUIV_Inst_Failed (0x10)
222 struct MUIP_CopyFiles
224 STACKED ULONG MethodID;
225 STACKED CONST_STRPTR srcDir;
226 STACKED CONST_STRPTR dstDir;
227 STACKED CONST_STRPTR fileMask;
228 STACKED BOOL recursive;
231 struct MUIP_CopyFile
233 STACKED ULONG MethodID;
234 STACKED CONST_STRPTR srcFile;
235 STACKED CONST_STRPTR dstFile;
238 enum EStage
240 EMessageStage,
241 ELicenseStage,
242 EPartitionOptionsStage,
243 EInstallOptionsStage,
244 EDestOptionsStage,
245 EGrubOptionsStage,
246 EInstallMessageStage,
247 EPartitioningStage,
248 EInstallStage,
249 EDoneStage
252 struct Install_Options
254 Object *opt_license;
255 Object *opt_lic_box;
256 Object *opt_lic_mgrp;
257 Object *opt_partmethod;
258 Object *opt_format;
259 Object *opt_locale;
260 Object *opt_copycore;
261 Object *opt_copyextra;
262 Object *opt_development;
263 Object *opt_bootloader;
265 Object *opt_reboot;
267 BOOL partitioned;
268 BOOL bootloaded;
271 struct Grub_Options
273 Object *gopt_drive;
274 Object *gopt_grub;
275 Object *gopt_grub2mode;
276 BOOL bootinfo;
279 struct InstallC_UndoRecord
281 struct Node undo_Node; /* Inherits from struct Node */
282 ULONG undo_method;
283 char *undo_src;
284 char *undo_dst;
287 struct optionstmp
289 IPTR opt_format;
290 IPTR opt_locale;
291 IPTR opt_copycore;
292 IPTR opt_copyextra;
293 IPTR opt_development;
294 IPTR opt_bootloader;
295 IPTR opt_reboot;
298 enum IO_OVERWRITE_FLAGS
300 IIO_Overwrite_Ask,
301 IIO_Overwrite_Always,
302 IIO_Overwrite_Never
305 struct Install_DATA
307 Object *partition;
308 Object *page;
309 Object *gauge1;
310 Object *gauge2;
311 Object *label;
312 /**/
313 Object *installer;
315 Object *welcomeMsg;
316 Object *doneMsg;
318 /**/
319 Object *window;
320 Object *contents;
322 Object *pagetitle;
323 Object *pageheader;
324 Object *actioncurrent;
326 Object *back;
327 Object *proceed;
328 Object *cancel;
330 /**/
331 ULONG inst_success;
333 ULONG disable_back,
334 status_back,
335 status_proceed,
336 status_cancel;
338 ULONG cur_width,
339 cur_height;
341 char *instc_lic_file;
342 APTR instc_lic_buffer;
344 struct List instc_undorecord;
346 /** Option Related **/
348 struct Install_Options *instc_options_main;
349 struct Grub_Options *instc_options_grub;
350 struct optionstmp *instc_options_backup;
351 enum EStage instc_stage_prev;
352 enum EStage instc_stage_next;
354 enum IO_OVERWRITE_FLAGS IO_Always_overwrite;
356 BOOL instc_cflag_driveset;
357 BOOL instc_copt_undoenabled;
358 BOOL instc_copt_licensemandatory;