From: Keith M. <kei...@us...> - 2010-02-23 19:35:18
|
Hi David, On Monday 22 February 2010 23:13:20 you wrote: > So basically the GUI should > use mingw-get.exe to do all the hard-work (to list available > updates, to download, to change configuration, etc.). No, not exactly; mingw-get.exe itself is little more than a stub. All the hard work is done in mingw-get-0.dll, (a private DLL). mingw-get.exe starts out by calling GetModuleFileNameW(), to get its own path name, and uses that as a basis to set the APPROOT environment variable. It then checks its 'argc', and if this indicates that arguments are present, it uses LoadLibraryW() to load mingw-get-0.dll, and delegates all further activity to it, via a call to the climain() function (within the DLL). If mingw-get.exe is invoked without arguments, having set up the APPROOT environment variable, it immediately calls execv(), to invoke the GUI, ($APPROOT/libexec/mingw-get/gui.exe); this would then set up the GUI main window and message loop. The event handlers driven from the message loop would then use the same methods as the CLI, provided by mingw-get-0.dll, to perform the operations which are common to both. The error message, which appears currently when mingw-get.exe is invoked without arguments, comes from mingw-get.exe itself, when the execv() call fails, (as it must, because gui.exe has not been delivered yet). -- Regards, Keith. |