Results 1 to 3 of 3

Thread: TexturePacker port to Linux, fix gtk file chooser.

  1. #1
    Join Date
    Jan 2013

    Default TexturePacker port to Linux, fix gtk file chooser.

    I port TexturePacker for Linux.
    Fixed the "filechooser_impl.h" file, but it's a proposal.

    Note: I do not know to use "TexturePacker" then I did not try either yet.

    Name:  texturepacker2.png
Views: 36
Size:  45.7 KB
    Name:  texturepacker.png
Views: 30
Size:  15.6 KB

    EDIT: fixed "folderbrowserdialog.cpp"
    Last edited by daltomi; 12-12-2013 at 09:39 PM. Reason: folderbrowserdialog patch

  2. #2
    ClanLib Developer
    Join Date
    May 2007


    Ah the GTK problem of clanGUI. We had "forgotten / chose to ignore" that problem.

    I initially added support for GTK file dialogs in clanGUI a couple of years ago, during the early development of the ClanLib 3.0 branch.

    The reason was that other developers created the "GUIEditor" and the "TexturePacker" utilities that worked very nicely on Microsoft Windows, but had a problem on Linux, the lack of a standard file requester in XLib

    There were only 2 options.
    1) Create a native ClanLib file requester for Linux.
    2) Use an external library

    Because creating a native file requestor would be a huge task, I opted for option 2.

    I picked GTK, because it seems to be the most widely supported library.

    I quickly hacked ClanLib to support it, but did not make it configurable.
    This was added to CLANLIB_CHECK_LIB(gtk, [`cat $srcdir/Setup/Tests/gtk.cpp`]
    If gtk was not found, the configure script aborted.

    Some developers did not have GTK headers installed and did not want to use GTK, so ClanLib failed to compile.

    The line was commented out, and the source code commented out with the message "I_LOVE_AUTOHELL_AND_FIXED_THE_GTK_CHECK" (not by me!)

    An additional problem with using GTK is the ClanLib clanGUI apps need to link with GTK libraries, even if the application doesn't use it.

    Ideally clanGUI should not link with GTK. Instead it uses dlopen() calls to load the library, only when required.
    In the same way as Sources\GL\GLX\opengl_window_provider_glx.cpp loads ""

    So ClanLib clanGUI compiled applications will work on configurations without GTK installed.

    I hope that makes sense

    - - - Updated - - -

    Also I personally don't mind what method we use. If it's easier to make clanGUI have a GTK prerequisite, so be it

    Just as long as detects it's not installed, and just disables clanGUI, and not abort the configure script

  3. #3
    Join Date
    Jan 2013


    Yes, I noticed that something was not right (24 hours without sleep), but I thought it was not so bad
    Thanks for the clarification.

Similar Threads

  1. Port Test/CSSLayout/WebBrowser to Linux
    By daltomi in forum Official ClanLib SDK Forums
    Replies: 1
    Last Post: 12-11-2013, 08:48 AM
  2. ClanLib 2.4 SVN experimental Linux GTK file requester support
    By rombust in forum Official ClanLib SDK Forums
    Replies: 0
    Last Post: 11-29-2011, 01:35 PM
  3. Clanlib + TexturePacker?
    By Andreas Loew in forum Official ClanLib SDK Forums
    Replies: 9
    Last Post: 11-16-2010, 12:53 AM
  4. Funeral Quest Server port to Linux?
    By in forum Funeral Quest
    Replies: 0
    Last Post: 09-24-2002, 08:51 PM
  5. Linux port
    By in forum Dink Smallwood HD
    Replies: 2
    Last Post: 09-12-2002, 05:03 AM



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts