Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build failure on (32bit) Haiku #291

Closed
Begasus opened this issue Dec 20, 2021 · 23 comments
Closed

Build failure on (32bit) Haiku #291

Begasus opened this issue Dec 20, 2021 · 23 comments

Comments

@Begasus
Copy link

Begasus commented Dec 20, 2021

Trying to get CudaText to build there results in an error for ATSynEdit:

/Opslag/CudaText_up/src/ATSynEdit/atsynedit/atsynedit.pas(8312,9) Error: (5000) Identifier not found "IM_Context_Set_Cursor_Pos"

Running with: ./cudaup.sh -g -m -l /boot/system/non-packaged/bin/fpcupdeluxe/lazarus

fpc and lazarus build with fpcupdeluxe (trunk from a few weeks ago)

@Alexey-T
Copy link
Owner

That identifier is from the newer Lazarus:

C:\fpcupdeluxe\fpcupdeluxe\lazarus\components\synedit\lazsyngtk2imm.pas
components\synedit\lazsyngtk2imm.pas (45,7) IM_Context_Set_Cursor_Pos(FriendEdit.CaretXPix,FriendEdit.CaretYPix+FriendEdit.L...
C:\fpcupdeluxe\fpcupdeluxe\lazarus\lcl\interfaces\gtk2\gtk2globals.pp
lcl\interfaces\gtk2\gtk2globals.pp (74,11) procedure IM_Context_Set_Cursor_Pos(X, Y: gint);
lcl\interfaces\gtk2\gtk2globals.pp (438,11) procedure IM_Context_Set_Cursor_Pos(X, Y: gint);

@Alexey-T
Copy link
Owner

You can update Lazarus, or just comment this IFDEF


{$ifdef LCLGTK2}
  {$if (LCL_FULLVERSION >= 2030000)}
    {$define GTK2_IME_CODE} ////comment this
  {$endif}
{$endif}

in atsynedit.pas.

@Alexey-T
Copy link
Owner

Alexey-T commented Dec 20, 2021

But you make the CudaText on HAIKU, so you must activate widgetset QT5!! then that line

{$ifdef LCLGTK2}
  {$if (LCL_FULLVERSION >= 2030000)}
    {$define GTK2_IME_CODE} ////comment this
  {$endif}
{$endif}

will be deactivated!

cudaUp script has the param to activate qt5!

@Begasus
Copy link
Author

Begasus commented Dec 20, 2021

cudaUp script has the param to activate qt5!

Looked into the script but can't seem to find it?

@Alexey-T
Copy link
Owner

Usage: $(basename $0) [option...]
Options:
  -g  --get                  download packages
  -p  --packs                install packages to Lazarus
  -m  --make                 compile CudaText
  -l  --lazdir <directiory>  set Lazarus directory
  -o  --os <system>          set target OS (win32/win64/linux/freebsd/darwin/solaris)
  -c  --cpu <arch>           set target CPU (i386/x86_64/arm)
  -w  --ws <widgetset>       override WidgetSet (gtk2/gtk3/qt/qt5/cocoa)
      --clean                delete temp Free Pascal folders (src/*/*/lib/*-*)
  -h  --help                 show this message
"

so you must set param "--ws".

@Begasus
Copy link
Author

Begasus commented Dec 20, 2021

Bumps head ;) running atm with -w qt

@Begasus
Copy link
Author

Begasus commented Dec 20, 2021

Error while linking: cannot find -lQt4Pas (we've got system -lQt5Pas)?

@Alexey-T
Copy link
Owner

-w qt5 - Qt 5.

@Begasus
Copy link
Author

Begasus commented Dec 20, 2021

Thanks! Running:

./cudaup.sh -g -m -w qt5 - Qt 5 -l /boot/system/non-packaged/bin/fpcupdeluxe/lazarus

Resulted in success! 👍

CudaText

@Alexey-T
Copy link
Owner

- Qt 5 was not needed, it was my text comment

so
./cudaup.sh -g -m -w qt5 -l /boot/system/non-packaged/bin/fpcupdeluxe/lazarus

@Alexey-T
Copy link
Owner

Alexey-T commented Dec 20, 2021

@Begasus Can you tell me what is the default MONOspace font on Haiku? i will hard code it as default.

@Alexey-T
Copy link
Owner

I have the hardcoded font names for Haiku -

proc_globdata.pas

const
  AppDefaultEdFont: string = '';
  AppDefaultEdFonts: array[0..2] of string =
    {$ifdef windows}
    ('Consolas', 'Courier New', 'Courier');
    {$else}
      {$ifdef darwin}
      ('Monaco', 'Liberation Mono', 'DejaVu Sans Mono');
      {$else}
        {$ifdef haiku}
        ('Noto', 'Monoid Nerd', '');
        {$else}
        ('DejaVu Sans Mono', 'Liberation Mono', 'Courier New');
        {$endif}
      {$endif}
    {$endif}
               

Do you miss fonts

  • Noto
  • Monoid Nerd ?

@Begasus
Copy link
Author

Begasus commented Dec 20, 2021

Noto is installed, default it's using Noto Sans Display, changed that to Noto Sans Mono

Monoid isn't installed (by default) here.

Alexey-T added a commit to Alexey-T/CudaText that referenced this issue Dec 20, 2021
@Alexey-T
Copy link
Owner

made the patch linked above this comment. it must fix the default font?

@Begasus
Copy link
Author

Begasus commented Dec 20, 2021

I'm guessing default font is set to Noto Sans Display (thought is was Mono), changed back to Noto Sans Display (only enlarged the font), cp'd 2 directories into ~/config/settings/cudatext to get the toolbar icons and a missing py folder on CudaText launch, also played a bit with the themes ;)

Cuda-Text-font

@Begasus
Copy link
Author

Begasus commented Dec 20, 2021

Works fine with it, thanks!

@Alexey-T
Copy link
Owner

Looks good.
On the next compliation of Cud, the default font must be detected as 'Noto Sans Mono'.

@Begasus
Copy link
Author

Begasus commented Dec 20, 2021

On the next compliation of Cud, the default font must be detected as 'Noto Sans Mono'.

It did, (renamed the user.json file to check) 👍

@Begasus
Copy link
Author

Begasus commented Dec 20, 2021

@Alexey-T is it possible to set the font size to 12 in the source too?

EDIT I think it's set here: Alexey-T/CudaText@ac994f4#diff-22f3b8461d16a1132106a2d19153debfa55bcaa790e8663bc1d3731c879aef4fR1439
So can stay as it is, no need to add clutter there, user can adjust to it's liking ;)

Alexey-T added a commit to Alexey-T/CudaText that referenced this issue Dec 20, 2021
@Alexey-T
Copy link
Owner

Added patch to set font size to 12
(link above this comment)

@Begasus
Copy link
Author

Begasus commented Dec 20, 2021

Thanks, checking ...
EDIT worked fine! 👍

@Begasus
Copy link
Author

Begasus commented Dec 31, 2022

Hi @Alexey-T I'm trying to bring CudaText for Haiku uptodate, but running the mentioned command above not gives me a: lazbuild: Could not resolve symbol 'libiconv_open
I'm unsure if this is an issue with lazarus (bumped libqt5pas and fpcupdeluxe earlier today), but I've seen it before in other attemps. Searching the web doesn't really helped so far. :/

@Alexey-T
Copy link
Owner

Pls move this issue to CudaText repo. but I dont know the reason! sorry

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants