discuss-gnustep
[Top][All Lists]
Advanced

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

RE: What function sets up the GNUstep environment?


From: Ivan Vučica
Subject: RE: What function sets up the GNUstep environment?
Date: Tue, 3 Nov 2020 03:20:03 +0000

Based on https://github.com/gnustep/libs-base/blob/3752016/Source/NSProcessInfo.m#L140-L154, this comes from https://github.com/gnustep/libs-base/blob/3752016/Source/NSProcessInfo.m#L919 or https://github.com/gnustep/libs-base/blob/3752016/Source/NSProcessInfo.m#L1021.

 

If these were GUI apps, I’d recommend calling NSApplicationMain which takes argc and argv and sorts this out for you – in fact, that’s ideally exactly what you should do if you’re using any GUI methods.  You’re saying you’re using certain GUI classes on the server; if you believe they will actually behave correctly in a server environment without gnustep-back (not a given; hypothetically, NSColor could heavily depend on Opal’s CGColorRef), you may be able to call NSProcessInfo +initializeWithArguments:..., too.

 

Otherwise study https://github.com/gnustep/libs-gui/blob/0ccdb278d4cc8ad60f033892a5105e0532261838/Source/Functions.m#L63 carefully, but don’t be surprised if lack of x11 breaks GUI classes. You break it (into pieces), you get to pick up those pieces and glue them together :)

 

(Yes, I noticed you said you went ahead and removed some backend-dependent code. This sounds like it’ll be a lot of fun…)

 

Ivan Vučica

 

From: Gustavo Tavares
Sent: Tuesday 3 November 2020 02:13
To: GNUstep Discuss
Subject: What function sets up the GNUstep environment?

 

Hi!

 

Was wondering what function sets up a GNUstep environemtnt?

 

Getting this error:

 

GNUSTEP Internal Error:

The private GNUstep function to establish the argv and environment

variables was not called.

 

Mismatched library versions between GNUstep Foundation (base) and AppKit

(gui) is most often the cause of this message. Please be sure you

are using known compatible versions and not a mismatched set. Generally,

we recommend you use versions of base and gui which were released together.

 

For more detailed assistance, please report the error to bug-gnustep@gnu.org.

 

---

 

For context—I built a seperate framework that extracts some "GUI" classes with the intention to use them semantically on a server. (Such as NSImage, NSColor, NSFont...)

I already went through the business of overriding / deleting some of the backend functions so that the classes would be "initalized" and wouldn't need to be rendered to screen.

 

Stuck here. 


Where should I look?

 

Thank you,

G

 


reply via email to

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