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: Gustavo Tavares
Subject: Re: What function sets up the GNUstep environment?
Date: Tue, 03 Nov 2020 11:02:18 -0400
User-agent: Cyrus-JMAP/3.3.0-530-g8da6958-fm-20201021.003-g69105b13-v35

Thank you! This is great.

I think I'm going to make some sort of subclass—NSCommandLineApplication.

I did implement some of the backend classes in a -doNothingMethod { ; } style: GSFontInfo / GSFontEnumerator.

Previously I just tried running X11 and calling it a day—but that didn't work. So goes the rabbit hole...

Looks like it will be fun though. Just gotta love Objective-C :)

Gustabo


On Mon, Nov 2, 2020, at 11:20 PM, Ivan Vučica wrote:

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]