SourceForge has been redesigned. Learn more.
Close

Kevora on OSX

Developers
leetpi
2009-03-12
2013-02-25
  • leetpi

    leetpi - 2009-03-12

    Ok, first things first.  I have minimal Qt experience outside of screwing around with the form editor.  I do have [some] experience with C++, but I tend to avoid it most of the time.

    I only spent a few minutes on this, I figure someone will be able to guide me through the issues.

    Notes:

    - Kevora cleanly compiles in Qt Creator following a qmake then clean.  I am betting this is not proper.  The original makefile blows up rather spectacularly due to all the absolute paths.

    - An error box pops up as soon as the program is launched.  After messing around with the program it seems to save its preferences and this doesn't happen any more.

    - Kevora seems to carry the colors from winblows, when opening the .ui with form preview it shows up with the proper scheme.  This is probably something simple, but I have no clue what is causing it.

    - The preferences pane is inescapable.  In fact I have to force quit the program if I open it.  I suspect that some of the issue relates to having to run qmake again?  I have no clue here.

    - I fed it some SQLite files I had lying around and it didn't seem to do anything with them.  I don't feel like hooking up my production database to it so I will probably set up a server sometime to see what it does.

    Pictures:
    http://dl.getdropbox.com/u/155051/kevora/error.png
    http://dl.getdropbox.com/u/155051/kevora/just%20open.png
    http://dl.getdropbox.com/u/155051/kevora/pref%20pane.png

     
    • leetpi

      leetpi - 2009-03-12

      Ok, I figured out the style part.  I threw in a precompiler selection based on the __APPLE__ flag.  Someone might want to clean this up a little bit before you throw it in the tree.

      diff of main.cpp:

      19a20,25
      >
      > #ifdef __APPLE__
      > #define STYLE QMacStyle
      > #include <QMacStyle>
      > #else
      > #define STYLE QPlastiqueStyle
      20a27,28
      > #endif
      >
      30c38,40
      <     QApplication::setStyle(new QPlastiqueStyle);
      ---
      >
      >
      >         QApplication::setStyle(new STYLE);

      And finally some screenies.
      http://dl.getdropbox.com/u/155051/kevora/set2/open.png
      http://dl.getdropbox.com/u/155051/kevora/set2/editor.png
      http://dl.getdropbox.com/u/155051/kevora/set2/about.png

      And for those too lazy to use patch:
      http://dl.getdropbox.com/u/155051/kevora/set2/main.cpp

       
    • leetpi

      leetpi - 2009-03-12

      o0, just commenting out QApplication::setStyle() allows Qt to decide on it's own.  I suspect that it will decide on a more Aero looking theme on vista and the appropriate theme under linux (When I last looked at KDE there were several rendering engines for Qt).

      I almost feel special all alone in here. 

      /me thumps the microphone a few times to see if it is still on.

       
    • Antonio Menezes

      Antonio Menezes - 2009-03-12

      Hello, Sakkaku!

      Thank you for your comments! Let me talk about your first notes...

      >>- An error box pops up as soon as the program is launched.  After messing around
      >>with the program it seems to save its preferences and this doesn't happen any
      >>more.

      This error was corrected, but I didn't publish the code, yet. This happens when the application looks for a kevora.xml file (the saved connections file). I had just to write a check condition before trying to read the file.

      >>- Kevora seems to carry the colors from winblows, when opening the .ui with
      >>form preview it shows up with the proper scheme.  This is probably something
      >>simple, but I have no clue what is causing it.

      I guess you had already noticed the style definition... Actually, it would be better to have the option to change the QStyle to use (maybe another option in preferences window).

      >>- The preferences pane is inescapable.  In fact I have to force quit the program
      >>if I open it.  I suspect that some of the issue relates to having to run qmake
      >>again?  I have no clue here.

      I didn't understand well, but if you're talking about how to close this dialog, I already corrected this behaviour, just making the OK and Cancel button to work.

      >>- I fed it some SQLite files I had lying around and it didn't seem to do anything
      >>with them.  I don't feel like hooking up my production database to it so I will
      >>probably set up a server sometime to see what it does.

      The hard part before working with kevora is to compile the appropriated sqldrivers' plugins. That's an important task for a Mac porting. We have to provide sqldrivers binaries to easy the deployment of the application. After, I collect all compiled plugins and Qt libs (Qt Core, Qt GUI, Qt Xml and Qt Svg), I use InstallJammer to create the installer, but we have to choose another installer tool, because there's no support for mac in InstallJammer.

      BTW: Can I include you as a member in Kevora project?

      Best regards,
      Antonio.

      --
      www.antoniomenezes.net

       
    • leetpi

      leetpi - 2009-03-12

      BTW: Can I include you as a member in Kevora project?
      > Sure thing.

      The hard part before working with kevora is to compile the appropriated sqldrivers' plugins. That's an important task for a Mac porting. We have to provide sqldrivers binaries to easy the deployment of the application. After, I collect all compiled plugins and Qt libs (Qt Core, Qt GUI, Qt Xml and Qt Svg), I use InstallJammer to create the installer, but we have to choose another installer tool, because there's no support for mac in InstallJammer.

      > Can you give me a list of the additional libraries I will need?  As for packaging that is pretty easy as OSX uses a .app, which contains any resources, shared libraries and the executable. Most programs you just drag out of the archive and you can run them.  Unless you need to add something like a service or other items to the filesystem an installer generally isn't needed.

      I guess you had already noticed the style definition... Actually, it would be better to have the option to change the QStyle to use (maybe another option in preferences window).

      > From my understanding most projects just let Qt choose for them.  Have you tried firing up kevora within KDE to see what happens if you change the theme engine?  The default should probably be for that function to never fire at all (it really isn't needed unless you want to force the theme).

       
      • Antonio Menezes

        Antonio Menezes - 2009-03-12

        > Can you give me a list of the additional libraries I will need? As for packaging that is pretty easy as OSX uses a .app, which contains any resources, shared libraries and the executable. Most programs you just drag out of the archive and you can run them. Unless you need to add something like a service or other items to the filesystem an installer generally isn't needed.

        OK. To prepare your kevora executable's directory you will need:
        libQtCore
        libQtGui
        libQtSql
        libQtSvg
        libQtXml
        (all these libs you can find at QT_DIR/lib or QT_DIR/bin - I don't know each of those directories for Qt Mac version).

        You'll also need a subdirectory (named sqldrivers) where you have to put the Sqldrivers plugins:
        libqsqlibase (for Firebird/interbase)
        libqsqlite (for Sqlite)
        libqsqlmysql (for MySql)
        libqsqlodbc (for ODBC)
        libqsqloci (for Oracle)
        libqsqlpsql (for Postgresql)

        Qt installations usually provides some compiled drivers at QT_DIR/plugins/sqldrivers

        And at last, you will have to put these files below also into kevora directory:
        kevora.png
        kevora_*.qm (translation files)
        kevora.xml (connections file) ... and ...
        kevora executable

        > From my understanding most projects just let Qt choose for them. Have you tried firing up kevora within KDE to see what happens if you change the theme engine? The default should probably be for that function to never fire at all (it really isn't needed unless you want to force the theme).

        Yes, I supposed forcing the theme would give a default GUI for developers/dba in differents plataforms. But, I guess you are right, maybe the default behaviour is to use the standard style in developer's plataform. On the other side, for Windows 2000/NT users, I guess the Plastic style would be more beautiful and meaningful than original Windows style... In this case, it would be nice to have an option in preferences dialog to change their Kevora's style...

         

Log in to post a comment.