Download MiniGUI Programming Guide
Transcript
MiniGUI Programming Guide V2.0-4 and finally exits the server. You can compile the program by using the following command: $ gcc –o mginit mginit.c –lminigui As this mginit program need startup helloworld program when starting up, so, we have to make sure that there is helloworld program in the current directory. Certainly, we can also add this program into the sample program package in this guide. As mginit program can only be compiled under MiniGUI-Processes environment, we need to modify the file configure.in and the file Makefile.am of the project mg-samples in order to add mginit into mg-samples project. First, we delete the notation of following line in file configure.in: AM_CONDITIONAL(MGRM_THREADS, test "x$threads_version" = "xyes") AM_CONDITIONAL(MGRM_PROCESSES, test "x$procs_version" = "xyes") AM_CONDITIONAL(MGRM_STANDALONE, test "x$standalone_version" = "xyes") The lines mean that if the MiniGUI is configured as MiniGUI-Processes, MiniGUI-Threads, or MiniGUI-Standalone, and then defines the macro MGRM_PROCESSES, MGRM_THREADS, or MGRM_STANDALONE respectively. These macros will be used in Makefile.am. Then, we modify the file Makefile.am that is in directory src/: if MGRM_PROCESSES noinst_PROGRAMS=helloworld mycontrol dialogbox input bmpbkgnd simplekey \ scrollbar painter capture bitblt stretchblt loadbmp drawicon \ createicon caretdemo cursordemo \ scrnsaver mginit else noinst_PROGRAMS=helloworld mycontrol dialogbox input bmpbkgnd simplekey \ scrollbar painter capture bitblt stretchblt loadbmp drawicon \ createicon caretdemo cursordemo endif ... mginit_SOURCES=mginit.c scrnsaver_SOURCES=scrnsaver.c 310