discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Q] Can you let me know on windows app using GNUstep?


From: Lloyd Dupont
Subject: Re: [Q] Can you let me know on windows app using GNUstep?
Date: Thu, 1 Dec 2005 09:38:03 +1000

Well I did it, but that doesn't seems to work anymore with latest release.
Apparently latest CVS release have new dependencies on a rigid filesystem and configuration files. I have yet to sort it out. In fact I'm not sure about anything latest release, it doesn't seems to work at all to be exact.

Anyway at the time I did it there was basically 3 things to do:
1. copy every DLL in GNUstep/System/Tool in you binary directory
2. copy the directories GNUstep/System/Library & GNUstep/System/share in some app specific directory (like your binary directory), let's call it gsroot 3. at the startup of your app setup 3 environment variable to point to gsroot (as an absolute path, it's safer) with a call like that (mix of ObjectiveC & ManagedC++ pseudo code).

String^ gsroot = AppDomain::CurrentDomain->BaseDirectory;
String^ sysroot = String::Format("GNUSTEP_SYSTEM_ROOT={0}", gsroot);
String^ netroot = String::Format("GNUSTEP_NETWORK_ROOT={0}", gsroot);
String^ locroot = String::Format("GNUSTEP_LOCAL_ROOT={0}", gsroot);
STRING_TO_POINTER_ANSI(sysroot, p_sysroot)
STRING_TO_POINTER_ANSI(netroot, p_netroot)
STRING_TO_POINTER_ANSI(locroot, p_locroot)
STRING_TO_POINTER_ANSI(appname, p_name)
char *env[] = {(char*)p_sysroot, (char*)p_netroot, (char*)p_locroot, NULL};
[NSProcessInfo initializeWithArguments:__argv count:__argc environment:env];

NSProcessInfo cache the environment variable's value when initialized.
So if any ObjectiveC method is called before setenv(), that won't work, so it's why you should "initialize" environment variable with NSProcessInfo.


Now it might works for you.
But I just did a clean rebuild of GNUstep and it's not working at all.... so I'm lost right now....

----- Original Message ----- From: "Sungjin Chun" <address@hidden>
To: "Lloyd Dupont" <address@hidden>
Cc: "Discuss GNUstep" <address@hidden>
Sent: Wednesday, November 30, 2005 7:01 PM
Subject: [Q] Can you let me know on windows app using GNUstep?


Hi,

From mailling list archive I found that you did create normal windows application using gnustep-base in C or other languages than ObjC. What I want to ask to you is that what should you do for this during loading of gnustep-base.dll. Can you let me know one this? Or simple code snippet?

Thanks in advance.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]