This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Ayuda para instalar qtscript-qt ó QT Bindings ó qtscriptgenerator

Tags: None
(comma "," separated)
karlitroz
Registered Member
Posts
3
Karma
0
Como iba compilando cada versión de amarok 2.1 SVN, no he podido ya compilar por el incumplimiento de la dependencia:

-- Configuring incomplete, errors occurred!
-- Taglib found: -L/usr/lib -ltag         
-- Found Qt-Version 4.5.0 (using /usr/bin/qmake)
-- Found X11: /usr/lib/libX11.so               
-- Phonon Version: 4.3.50                     
-- Found KDE 4.2 include dir: /opt/kde/include 
-- Found KDE 4.2 library dir: /opt/kde/lib     
-- Found the KDE4 kconfig_compiler preprocessor: /opt/kde/bin/kconfig_compiler
-- Found automoc4: /usr/bin/automoc4                                         
-- Checking if the QtScript Qt Bindings are installed.                       
-- includes /usr/include/QtCore;/usr/include/QtScript;/opt/kde/include;/opt/kde/include/KDE;/opt/kde/include/KDE;/opt/kde/include;/usr/include/QtXmlPatterns;/usr/include/QtWebKit;/usr/include/QtHelp;/usr/include/QtAssistant;/usr/include/QtDBus;/usr/include/QtTest;/usr/include/QtUiTools;/usr/include/QtScript;/usr/include/QtSvg;/usr/include/QtXml;/usr/include/QtSql;/usr/include/QtOpenGL;/usr/include/QtNetwork;/usr/include/QtDesigner;/usr/include/QtDesigner;/usr/include/QtAssistant;/usr/include/Qt3Support;/usr/include/QtGui;/usr/include/QtCore;/usr/include/Qt;/usr/share/qt4/mkspecs/default;/usr/include;/usr/include;/usr/include;/usr/include;/usr/include;/usr/include;/usr/include;/usr/include;/usr/include;/usr/include;/usr/include;/usr/include;/usr/include;/usr/include;/usr/include;/usr/include;/usr/include;/usr/include;/usr/include;/usr/include;/usr/include;/usr/include;/usr/include;/usr/include;/usr/include;/usr/include;/usr/include libraries /usr/lib/libQtScript.so;/usr/lib/libQtCore.so;-lpthread;-L/opt/kde/lib;-lkdecore;-lkdeui
-- QtBindings not found
-- Found MySQL: /usr/include/mysql, /usr/lib/libmysqlclient.so
-- Found MySQL Embedded: /usr/include/mysql, /usr/lib/mysql/libmysqld.a
-- Strigi API needs 'signed char'
-- WARNING: you are using the obsolete 'PKGCONFIG' macro use FindPkgConfig
-- Found MTP: /usr/lib/libmtp.so
-- Libgcrypt found: /usr/lib/libgcrypt.so
-- Found GObject libraries: /usr/lib/libgobject-2.0.so;/usr/lib/libgmodule-2.0.so;/usr/lib/libgthread-2.0.so;/usr/lib/libglib-2.0.so
-- Found GObject includes : /usr/include/glib-2.0/gobject
-- WARNING: you are using the obsolete 'PKGCONFIG' macro use FindPkgConfig
-- WARNING: you are using the obsolete 'PKGCONFIG' macro use FindPkgConfig
-- Found MTP: /usr/lib/libmtp.so
--
-----------------------------------------------------------------------------
-- The following REQUIRED packages could NOT be located on your system.
-- Please install them before continuing this software installation.
-----------------------------------------------------------------------------
+ qtscript-qt: QtScript Qt Bindings
-----------------------------------------------------------------------------
CMake Error at /opt/kde/share/apps/cmake/modules/MacroLogFeature.cmake:93 (MESSAGE):
  Exiting: Missing Requirements
Call Stack (most recent call first):
  CMakeLists.txt:114 (macro_display_feature_log)


-- Configuring incomplete, errors occurred!
make: *** [cmake_check_build_system] Error 1


me marca la dirección http://code.google.com/p/qtscriptgenerator/

http://code.google.com/p/qtscriptgenera ... loads/list

Descargue y compilé (no sin sobresaltos, se descargan unos pocos kilobytes, pero la compilación ocupa 490.7 mb) la dependencia que pedía, pero no sé como enlazarla para que el script de amarok detecte como ya instalada la dependencia, el readme dice textualmente lo siguiente:

Qt Script Generator labs package, version 0.1


The Qt Script Generator is a tool that generates Qt bindings for Qt Script.

---

Instructions:

1) Build the generator: cd path/to/this/project/generator, qmake && make

2) Run the generator (without arguments)
  This will generate C++ files in path/to/this/project/generated_cpp
  and documentation in path/to/this/project/doc

3) Build the bindings plugins: cd path/to/this/project/qtbindings, qmake && make
  The plugins will be put under path/to/this/project/plugins

4) To use the plugins in your application, add the plugins path to the library paths
  (QCoreApplication::setLibraryPaths()), then call QScriptEngine::importExtension()
  (plugin keys are "qt.core", "qt.gui", etc).

There is a simple script interpreter / launcher in path/to/this/project/qtbindings/qs_eval
that imports all the bindings. You can use it to run the examples found in
path/to/this/project/examples. E.g., with the examples directory being the working directory:

../qtbindings/qs_eval/qs_eval CollidingMice.qs


See the generated doc/index.html for more information.

Have fun!

Voy en el paso 4, pero no sé que hacer, además ví que el script que verifica que qtscriptgenerator esté en el sistema, también se refiere a las funciones qt.core qt.gui etc. pero no sé como añadirlas o si se añaden a un PATH a que nombre

El directorio donde construí el qtscriptgenerator fue en /opt/kde/src/qtscriptgenerator para darle coherencia

El index al que se refiere, sólo es una larga lista de funciones de QT que tampoco sé como se utilizan, les adjunto el script en c++ de amarok:

el cual está en:

/opt/kde/src/amarok/cmake/modules

se llama: QScriptBindingsTest.cpp

/*
* Copyright (C) 2009 Ian Monroe
* released under public domain or:
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
*/

#include
#include
#include
#include
#include

#define FAIL 0xA

int main(int argc, char **argv)
{
    KAboutData about( "findgeneratorplugins", "", ki18n("Generator Exists?"), "1.0", ki18n("Find if the QtScript Plugins Are Installed"), KAboutData::License_LGPL_V2 );
    KCmdLineArgs::init( argc, argv, &about );
    KApplication app( false ); //no gui pls
   
    QStringList allowedBindings;
    allowedBindings << "qt.core" << "qt.gui" << "qt.sql" << "qt.xml" << "qt.uitools" << "qt.network";
    QScriptEngine engine;
    foreach( QString binding, allowedBindings )
    {
        if( !engine.importExtension( binding ).isUndefined() )
        { // undefined indiciates success
            qDebug( binding.toLatin1() +  " not found" );
            return FAIL;
        }
    }
    return 0;
}


Es lo que pasa por no saber c++ aún, pensé que estrellaría contra ese muro pero mucho después, cualquier ayuda, gracias

Last edited by karlitroz on Wed Apr 01, 2009 5:20 am, edited 1 time in total.


Bookmarks



Who is online

Registered users: Bing [Bot], Evergrowing, Google [Bot]