grub2: bring back build of aros-side grub2 tools
[AROS.git] / workbench / prefs / boot / main.c
blobf0ec12b451bc5cc6cfd85532246cbd2dbb2d3e7c
1 /*
2 Copyright © 2009-2015, The AROS Development Team. All rights reserved.
3 $Id$
4 */
6 #define MUIMASTER_YES_INLINE_STDARG
8 #include <libraries/mui.h>
9 #include <zune/systemprefswindow.h>
11 #include <proto/intuition.h>
12 #include <proto/muimaster.h>
13 #include <clib/alib_protos.h>
15 #include "locale.h"
16 #include "args.h"
17 #include "booteditor.h"
19 #define VERSION "$VER: Boot 1.3 (8.3.2015)"
21 int main(int argc, char **argv)
23 Object *application, *window;
25 Locale_Initialize();
27 ReadArguments(argc, argv);
29 /* Show application unless SAVE parameter was used */
30 if (!((BOOL)ARG(SAVE)))
32 application = (Object *)ApplicationObject,
33 MUIA_Application_Title, __(MSG_NAME),
34 MUIA_Application_Version, (IPTR)VERSION,
35 MUIA_Application_Description, __(MSG_DESCRIPTION),
36 MUIA_Application_Base, (IPTR)"BOOTPREF",
37 SubWindow, (IPTR)(window = (Object *)SystemPrefsWindowObject,
38 MUIA_Window_ID, MAKE_ID('B', 'O', 'O', 'T'),
39 WindowContents, (IPTR)BootEditorObject,
40 End,
41 End),
42 End;
44 if (application != NULL)
46 SET(window, MUIA_Window_Open, TRUE);
47 DoMethod(application, MUIM_Application_Execute);
48 SET(window, MUIA_Window_Open, FALSE);
50 MUI_DisposeObject(application);
54 FreeArguments();
56 Locale_Deinitialize();
58 return 0;