|
From: | Gregory Casamento |
Subject: | Re: What function sets up the GNUstep environment? |
Date: | Tue, 3 Nov 2020 15:19:02 -0500 |
Your problem got me thinking. Would it help you if we offered a „no-op“ backend for GNUstep? That is a backend where both the window and the drawing system would be implemented as no-operations.
We could try to get this done as a special GNUstep back configuration. Most likely we could cheat here by reusing the gsc classes as a real drawing backend, which of course would not draw but raise subclassResponsibility:. That means we only need code for the window/event part and a lot of configuration to switch all the extra libraries off.
Cheers,
Fred
> Am 03.11.2020 um 16:02 schrieb Gustavo Tavares <mucholove@fastmail.com>:
>
> 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
[Prev in Thread] | Current Thread | [Next in Thread] |