styluslabs / Write

GNU Affero General Public License v3.0
24 stars 4 forks source link

Flatpak #4

Open Doomsdayrs opened 2 days ago

Doomsdayrs commented 2 days ago

Greetings,

Today I learned Stylus Labs Write was now available on Linux, so I went to my software store to install it, and found out there is no application with that name.

Are you okay with a flatpak being produce, and being published to https://flathub.org/ so that users can easily install the app on Linux?

Requirements

Doomsdayrs commented 2 days ago

I tried doing a quick test, and discovered some path shenanigans.

Currently references to SDL2 imply that SDL2 is located in /usr/include, but on Linux it is under /usr/include/SDL2, thus there are seds to correct include statements.

The second issue I ran into is that Write uses a statically built libSDL2.a, which I do not believe is present on most Linux systems nor the FreeDesktop SDK, which although includes a libSDL2main.a.

Thus, the furthest I got was to the following error code:

/usr/lib/gcc/x86_64-unknown-linux-gnu/14.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld: cannot find ../SDL/Release/libSDL2.a: No such file or directory
pbsurf commented 2 days ago

A make flag to use the system SDL was just added in https://github.com/styluslabs/Write/pull/3

Doomsdayrs commented 2 days ago

A make flag to use the system SDL was just added in #3

Just discovered that a few minutes ago, in progress-

Doomsdayrs commented 2 days ago

A make flag to use the system SDL was just added in #3

Thank you for your effort!

Doomsdayrs commented 2 days ago

Another thing I noticed is that currently Linux is shipped with a 144x144 icon, which does not make sense as FreeDesktop supports and prefers SVG files for icons.

Doomsdayrs commented 2 days ago

Alright, got an interesting runtime error.

../ugui/textedit.cpp:546: doUpdate: Assertion failed: 0 && "Number of glyphs does not equal number of characters - bad unicode?"

Not quite sure what caused this.

pbsurf commented 1 day ago

If in addition to this error, all the text is missing from the UI, the problem is that the font files are missing - on Linux, Write expects Roboto-Regular.ttf and DroidSansFallback.ttf in the same folder as the executable (see the $(TGZ) target in Makefile.unix).