From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KtPqv-0000LB-Dd for qemu-devel@nongnu.org; Fri, 24 Oct 2008 12:49:33 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KtPqt-0000I7-Ta for qemu-devel@nongnu.org; Fri, 24 Oct 2008 12:49:33 -0400 Received: from [199.232.76.173] (port=44003 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KtPqt-0000I0-Ml for qemu-devel@nongnu.org; Fri, 24 Oct 2008 12:49:31 -0400 Received: from yx-out-1718.google.com ([74.125.44.158]:37018) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KtPqt-0004Vw-6D for qemu-devel@nongnu.org; Fri, 24 Oct 2008 12:49:31 -0400 Received: by yx-out-1718.google.com with SMTP id 3so316440yxi.82 for ; Fri, 24 Oct 2008 09:49:28 -0700 (PDT) Message-ID: <4901FC95.8050000@codemonkey.ws> Date: Fri, 24 Oct 2008 11:49:25 -0500 From: Anthony Liguori MIME-Version: 1.0 Subject: Re: [Qemu-devel] [5524] Fix windows build after migration changes References: <4901E355.8070306@bttr-software.de> <4901E5AC.6010906@codemonkey.ws> <200810241638.00364.paul@codesourcery.com> In-Reply-To: <200810241638.00364.paul@codesourcery.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paul Brook Cc: qemu-devel@nongnu.org Paul Brook wrote: > On Friday 24 October 2008, Anthony Liguori wrote: > >> Robert Riebisch wrote: >> >>> Anthony Liguori wrote: >>> >>>> That would be great. I don't know that we want to go on the current >>>> directory though. There's a Windows API for finding Program Files. >>>> That's probably what we want to do. >>>> >>> Why do you want to look for "Program Files" instead? Just let QEMU >>> determine its own folder via GetModuleFileName() and look there for the >>> BIOS files. >>> >> That's not the same as CWD and is probably the right thing to do. >> > > We could also do the same thing for Linux et al. > On Linux, I guess we could readlink(/proc/self/exe), but I don't know what we could do on other OSes. In general, argv[0] isn't very useful. What I had suggested to someone a while back, was that first, we should refactor things so that we can try to read all of the bios/keymap files from a number of paths. That way, we could try the current path, the -L path, the path of the exe, etc. The only problem with that it can become confusing trying to figure out what bios you are using. Regards, Anthony Liguori > Paul >