2 Copyright © 2003-2011, The AROS Development Team. All rights reserved.
6 #define MUIMASTER_YES_INLINE_STDARG
8 #include <aros/debug.h>
10 #include <proto/alib.h>
11 #include <proto/intuition.h>
12 #include <proto/muimaster.h>
13 #include <proto/workbench.h>
14 #include <proto/dos.h>
17 #include <libraries/mui.h>
18 #include <workbench/startup.h>
22 #include "executecommand.h"
26 void cleanup(CONST_STRPTR message
)
28 ExecuteCommand_Deinitialize();
32 ShowError(NULL
, NULL
, message
, TRUE
);
41 int main(int argc
, char **argv
)
45 STRPTR initial
= NULL
;
47 if (!ExecuteCommand_Initialize()) cleanup(_(MSG_ERROR_CLASSES
));
51 struct WBStartup
*startup
= (struct WBStartup
*) argv
;
53 if (startup
->sm_NumArgs
> 1)
55 parent
= startup
->sm_ArgList
[1].wa_Lock
;
56 initial
= startup
->sm_ArgList
[1].wa_Name
;
60 application
= (Object
*)ExecuteCommandObject
,
61 MUIA_ExecuteCommand_Parent
, (IPTR
) parent
,
62 MUIA_ExecuteCommand_Initial
, (IPTR
) initial
,
65 if (application
!= NULL
)
67 DoMethod(application
, MUIM_Application_Execute
);
68 MUI_DisposeObject(application
);
73 return 0; /* make compiler happy */