Lazarus 1.9 trunk Qt4 and Qt5 interface (screenshots)

Good day @zittergie ,

This links to your question here CudaText 64bit: Text/Code Editor: RC. Please report issues - #42 by zittergie

Apologies for taking so long in replying. Glad you found the way. To sum up, there are a series of steps that need to be done [real devs, correct me if I got this wrong]:
[never touched pascal code, all this is done outside of the executable]

1- Create the RDEF file and [using the one I created for CudaText]:

resource app_flags B_SINGLE_LAUNCH;
resource("QT:QPA_FLAGS") "Q_REF_TO_ARGV|Q_REF_TO_FORK";

This is where the QT flags are set in the RDEF according to explanations by @phw and @3dEyes. [I used NotepadQQ recipe from Haikuports as a reference]

then I set inside the RDEF file:

resource file_types message {
"types" = "text/plain",
"types" = "text/x-source-code",
"types" = "text",
"types" = "text/x-makefile",
"types" = "text/x-rez",
"types" = "text/x-jamfile",
"types" = "application/xhtml+xml"
};

AFAIK, this is important as tells the app the kind of files that it’s going to deal with.

2- compile the RDEF into RSRC and add it to the executable with XRES [xres -o appname appname.rsrc]

3- Then need to register the app in the MIME database [mimeset -f appname] as pointed out by @Lrrr

With these, if I understood it correctly, the Qt app will work fine on Haiku, even with the Open With. If not, devs please correct me so I can improve the process.

I should have added some comments to the RDEF file, in fact I was going to. The plan was to complete the CudaText port before August 1st. Wasn’t possible, and now my Haiku time has dropped dramatically from few to barely none. So I didn’t update the RDEF and hadn’t have much time to improve the CudaText port.

I wrote down these notes, and others, so when I can get back on track I don’t need to start all over again.

Nonetheless, if you have any question [not on Pascal, haven’t touched it since 1990 :joy:] and I can help, I’ll be glad to. You may have to wait some time for a reply though :wink:

Regards,
RR

2 Likes