| www.delorie.com/archives/browse.cgi | search |
| X-Authentication-Warning: | delorie.com: mail set sender to geda-user-bounces using -f |
| X-Recipient: | geda-user AT delorie DOT com |
| X-Mailer: | exmh version 2.7.2 01/07/2005 (debian 1:2.7.2-18) with nmh-1.3 |
| X-Exmh-Isig-CompType: | repl |
| X-Exmh-Isig-Folder: | inbox |
| To: | geda-user AT delorie DOT com |
| Subject: | Re: [geda-user] Bug #903129 Translations don't work on Windows |
| In-reply-to: | <CAOuGh8_tCu_CM=RCRPDAoJMObszqWpjG29-37rAUAHyBN18uSw@mail.gmail.com> |
| References: | <20121113211401 DOT 20747813A49B AT turkos DOT aspodata DOT se> <CAOuGh89nhtaPkKZ+0CJGn9V_XnZyi6YD-NndT53FHoAyYD0LFw AT mail DOT gmail DOT com> <20121115210903 DOT 90A4881345E3 AT turkos DOT aspodata DOT se> <CAPYb0EE-xqA681-iq9AwnL7Wq1j9NL7AP383X5qe5QeCZZW0Ug AT mail DOT gmail DOT com> <20121116135510 DOT 6D56B81345EB AT turkos DOT aspodata DOT se> <CAOuGh8_tCu_CM=RCRPDAoJMObszqWpjG29-37rAUAHyBN18uSw AT mail DOT gmail DOT com> |
| Comments: | In-reply-to Bob Paddock <graceindustries AT gmail DOT com> |
| message dated "Fri, 16 Nov 2012 11:40:34 -0500." | |
| Mime-Version: | 1.0 |
| Message-Id: | <20121116204345.9377B81345F9@turkos.aspodata.se> |
| Date: | Fri, 16 Nov 2012 21:43:45 +0100 (CET) |
| From: | karl AT aspodata DOT se (Karl Hammar) |
| X-Virus-Scanned: | ClamAV using ClamSMTP |
| Reply-To: | geda-user AT delorie DOT com |
| Errors-To: | nobody AT delorie DOT com |
| X-Mailing-List: | geda-user AT delorie DOT com |
| X-Unsubscribes-To: | listserv AT delorie DOT com |
Bob Paddock:
> Karl Hammar:
> > It should be better if the lib could have a get_localedir() routine and
> > provide it to the caller.
...
> http://developer.gnome.org/glib/2.28/glib-Windows-Compatibility-Functions.html#g-win32-get-package-installation-directory-of-module
>
> That just moves the dependency from one library to the other,
Yes, but libgeda already depend on glib. Do you propose that we
shall minimize that dependancy ?
> did a bit of digging any came up with this:
>
> This code will tell where the running .exe is located, it will return a
> string such
> as "C:\gEDA\geda.exe". Find the last '\' and use everything before that as
> the path.
> May have to change '\' to '\\' or '/' depending on the usage.
>
> /*
> * Simple example of how to find the location of running .exe (us).
> *
> * Example does not account for issues of Internalization of file
> names/file systems.
> */
>
> #include <stdio.h>
> #include <windows.h>
>
> int main( void )
> {
> char FileName_ca[MAX_PATH];
>
> HINSTANCE instance_h = GetModuleHandle(NULL);
>
> if( GetModuleFileName(instance_h, FileName_ca, MAX_PATH) )
> {
> printf( "We are located at: %s\n", FileName_ca );
> }
> else
> {
> /* ASSERT or something, as this should never happen */
> }
> }
>
If you have tested this, I'm fine with that also.
///
I had a look at
ftp://ftp.delorie.com/pub/geda-windows/snapshots/build-20121116.zip
and it's directory structure looks like:
...
bin/gschem.exe
...
share/locale/...
...
Can we trust that each and every geda installation in MS-Windows
will have this directory structure?
Regards,
/Karl Hammar
-----------------------------------------------------------------------
Aspö Data
Lilla Aspö 148
S-742 94 Östhammar
Sweden
+46 173 140 57
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |