laufweite, a helper tool for windowsize calculation in yad/gtkdialog bashscript

Forum Forums antiX-development Development laufweite, a helper tool for windowsize calculation in yad/gtkdialog bashscript

  • This topic has 1 reply, 1 voice, and was last updated Apr 29-9:36 am by Robin.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #105377
    Member
    Robin

      As a workaround for gtkdialog and yad not properly calculating window sizes when the default antiX font „ubuntu” in size 10.5 is changed to some other font with a different tracking (Laufweite) on user’s system, causing many of scripts used by antiX break their layout, I have created a tiny helper tool, allowing to pre-calculate the needed width for a specific string in pixel for any font present on system. From this the needed window size value can be derived and handed over to yad- and gtkdialog calls.

      Please see antiXscreenshot2 Version 1.08f, lines 2120, 2121 and 2124 within its executable script file as an example how to make use of it.

      And please be aware, I’m not a programmer. If somebody skilled in C programming could improve my amateur C code that would be great. I’m pretty sure I didn’t do it completely right, since it’s my very first attempt in C programming language.

      Here’s the download space:
      https://gitlab.com/Robin-antiX/laufweite

      Please use the installer packages provided, so you get the prepared English locale file installed as well (or make sure to download and place the respective .mo file in the /usr/share/locale/<your language>/LC_MESSAGES folder yourself) to run my laufweite program in English language.

      Best regards
      Robin.

      Windows is like a submarine. Open a window and serious problems will start.

      #105645
      Member
      Robin
        Helpful
        Up
        0
        ::

        Packages and binaries have been updated

        It turned out the binaries I had originally created won’t run on all antiX versions due to a libc6 version mismatch in all antiX before 23:

        e.g. running 64 bit laufweite on antiX 22 returns:

        laufweite: /lib/x86_64-linux-gnu/libc.so.6: version 'GLIBC_2.34' not found (required by laufweite)
        

        (many thanks, Marcelo, for testing!)

        The very issue probably was present for the 32 bit version on antiX 19 also, since 32bit binary was compiled on an antiX 21/22.

        After some researching, best solution seems to be compiling the helper tool on the oldest antiX available to make it work on all more recent antiX versions as well.

        So now both binaries, 32 bit and 64 bit have been compiled against antiX 17.5 instead of antiX 23 and should work fine on antiX 17.5, 19.5, 21, 22 and 23 all the same.

        Consequently both .deb packages have been updated at gitlab now.

        Please let me know if you encounter any issues when using it. Many thanks.

        Kind regards
        Robin

        Windows is like a submarine. Open a window and serious problems will start.

      Viewing 2 posts - 1 through 2 (of 2 total)
      • You must be logged in to reply to this topic.