Projekat

Općenito

Profil

Prijedlozi #19596 » patch-qtruby.diff

Ernad Husremović, 05.02.2010 18:58

Pregled razlika:

CMakeLists.txt.qtruby (working copy)
include (MacroOptionalFindPackage)
FIND_PACKAGE(Perl REQUIRED)
FIND_PACKAGE (Qt4 REQUIRED)
add_definitions (${QT_DEFINITIONS} -DHAVE_CONFIG_H=1)
......
FIND_PACKAGE (RUBY REQUIRED)
FIND_PACKAGE (OpenGL REQUIRED)
add_subdirectory(generator)
add_subdirectory(smoke)
if(RUBY_EXECUTABLE)
generator/parser/CMakeLists.txt (working copy)
add_library(cppparser SHARED ${cppparser_LIB_SRCS})
target_link_libraries(cppparser ${QT_QTCORE_LIBRARY})
install(TARGETS cppparser LIBRARY DESTINATION ${LIB_INSTALL_DIR})
install(TARGETS cppparser DESTINATION ${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX} )
ruby/qtruby/src/CMakeLists.txt (working copy)
add_library(qtruby4shared SHARED ${qtrubyshared_LIB_SRCS})
add_library(qtruby4 MODULE ${qtruby_LIB_SRCS})
target_link_libraries( qtruby4shared
${QT_QTCORE_LIBRARY}
${QT_QTGUI_LIBRARY}
${RUBY_LIBRARY}
${QT_QTNETWORK_LIBRARY}
smokeqtcore
smokeqtgui
smokeqtxml
smokeqtopengl
smokeqtsql
smokeqtnetwork
smokeqtdbus
smokeqtsvg )
if(QT_QTDBUS_FOUND)
target_link_libraries( qtruby4shared
${QT_QTCORE_LIBRARY}
${QT_QTGUI_LIBRARY}
${RUBY_LIBRARY}
${QT_QTNETWORK_LIBRARY}
smokeqtcore
smokeqtgui
smokeqtxml
smokeqtopengl
smokeqtsql
smokeqtnetwork
smokeqtdbus
smokeqtsvg )
target_link_libraries( qtruby4
${QT_QTCORE_LIBRARY}
${QT_QTGUI_LIBRARY}
${QT_QTDBUS_LIBRARY}
${RUBY_LIBRARY}
${QT_QTNETWORK_LIBRARY}
smokeqtcore
smokeqtgui
smokeqtxml
smokeqtopengl
smokeqtsql
smokeqtnetwork
smokeqtdbus
smokeqtsvg
qtruby4shared )
else(QT_QTDBUS_FOUND)
target_link_libraries( qtruby4shared
${QT_QTCORE_LIBRARY}
${QT_QTGUI_LIBRARY}
${RUBY_LIBRARY}
${QT_QTNETWORK_LIBRARY}
smokeqtcore
smokeqtgui
smokeqtxml
smokeqtopengl
smokeqtsql
smokeqtnetwork
smokeqtsvg )
target_link_libraries( qtruby4
${QT_QTCORE_LIBRARY}
${QT_QTGUI_LIBRARY}
${QT_QTDBUS_LIBRARY}
${QT_QTGUI_LIBRARY}
${RUBY_LIBRARY}
${QT_QTNETWORK_LIBRARY}
smokeqtcore
......
smokeqtxml
smokeqtopengl
smokeqtsql
smokeqtnetwork
smokeqtdbus
smokeqtnetwork
smokeqtsvg
qtruby4shared )
qtruby4shared )
endif(QT_QTDBUS_FOUND)
# target_link_libraries(qtrubyinternal ${QT_QTCORE_LIBRARY} ${RUBY_LIBRARY} \
ruby/qtruby/src/marshall_primitives.h (working copy)
#if defined(Q_OS_WIN32)
template <>
static WId ruby_to_primitive<WId>(VALUE v)
WId ruby_to_primitive<WId>(VALUE v)
{
if(v == Qnil)
return 0;
......
}
template <>
static VALUE primitive_to_ruby<WId>(WId sv)
VALUE primitive_to_ruby<WId>(WId sv)
{
#ifdef Q_WS_MAC32
return INT2NUM((unsigned long) sv);
......
}
template <>
static Q_PID ruby_to_primitive<Q_PID>(VALUE v)
Q_PID ruby_to_primitive<Q_PID>(VALUE v)
{
if(v == Qnil)
return 0;
......
}
template <>
static VALUE primitive_to_ruby<Q_PID>(Q_PID sv)
VALUE primitive_to_ruby<Q_PID>(Q_PID sv)
{
return ULONG2NUM((unsigned long) sv);
}
ruby/qtruby/src/qtruby.cpp (working copy)
#include <smoke/qtopengl_smoke.h>
#include <smoke/qtnetwork_smoke.h>
#include <smoke/qtsvg_smoke.h>
#ifdef QT_QTDBUS
#include <smoke/qtdbus_smoke.h>
#endif
#include <ruby.h>
#undef read
#undef write
#undef connect
#undef accept
#include "marshall_types.h"
#include "qtruby.h"
......
rb_ary_push(class_list, rb_str_new2(qtsvg_Smoke->classes[i].className));
}
#ifdef QT_QTDBUS
for (int i = 1; i <= qtsvg_Smoke->numClasses; i++) {
if (qtdbus_Smoke->classes[i].className && \
!qtdbus_Smoke->classes[i].external)
rb_ary_push(class_list, \
init_qtopengl_Smoke();
init_qtnetwork_Smoke();
init_qtsvg_Smoke();
#ifdef QT_QTDBUS
init_qtdbus_Smoke();
#endif
install_handlers(Qt_handlers);
INIT_BINDING(qtcore)
......
INIT_BINDING(qtopengl)
INIT_BINDING(qtnetwork)
INIT_BINDING(qtsvg)
#ifdef QT_QTDBUS
INIT_BINDING(qtdbus)
#endif
if (qt_module == Qnil) {
qt_module = rb_define_module("Qt");
ruby/qtruby/tools/rbuic/ui4.h (working copy)
class QDomDocument;
class QDomElement;
#define QDESIGNER_UILIB_EXTERN Q_DECL_EXPORT
#define QDESIGNER_UILIB_IMPORT Q_DECL_IMPORT
#ifdef Q_OS_WIN
#define QDESIGNER_UILIB_EXTERN
#define QDESIGNER_UILIB_IMPORT
#else
#define QDESIGNER_UILIB_EXTERN Q_DECL_EXPORT
#define QDESIGNER_UILIB_IMPORT Q_DECL_IMPORT
#endif
#if defined(QT_DESIGNER_STATIC) || defined(QT_UIC) || defined(QT_UIC3)
# define QDESIGNER_UILIB_EXPORT
ruby/qtscript/qtscript.cpp (working copy)
***************************************************************************/
#include <ruby.h>
#undef read
#undef write
#undef connect
#undef accept
#include <QHash>
#include <QList>
ruby/qtscript/qtscripthandlers.cpp (working copy)
***************************************************************************/
#include <ruby.h>
#undef read
#undef write
#undef connect
#undef accept
#include <qtruby.h>
#include <smokeruby.h>
ruby/qttest/qttest.cpp (working copy)
***************************************************************************/
#include <ruby.h>
#undef read
#undef write
#undef connect
#undef accept
#include <QHash>
#include <QList>
ruby/qttest/qttesthandlers.cpp (working copy)
***************************************************************************/
#include <ruby.h>
#undef read
#undef write
#undef connect
#undef accept
#include <qtruby.h>
#include <smokeruby.h>
ruby/qtuitools/qtuitools.cpp (working copy)
***************************************************************************/
#include <ruby.h>
#undef read
#undef write
#undef connect
#undef accept
#include <QHash>
#include <QList>
ruby/qtuitools/qtuitoolshandlers.cpp (working copy)
***************************************************************************/
#include <ruby.h>
#undef read
#undef write
#undef connect
#undef accept
#include <qtruby.h>
#include <smokeruby.h>
ruby/qtwebkit/qtwebkit.cpp (working copy)
#include <ruby.h>
#undef read
#undef write
#undef connect
#undef accept
#include <QHash>
#include <QList>
ruby/qtwebkit/qtwebkithandlers.cpp (working copy)
***************************************************************************/
#include <ruby.h>
#undef read
#undef write
#undef connect
#undef accept
#include <qtruby.h>
#include <smokeruby.h>
smoke/qt/CMakeLists.txt (working copy)
# kde4_add_library(smokeqt SHARED ${smokeqt_LIB_SRCS})
add_library(smokeqt SHARED ${smokeqt_LIB_SRCS})
target_link_libraries(smokeqt ${QT_QTCORE_LIBRARY}
${QT_QTGUI_LIBRARY}
${QT_QTNETWORK_LIBRARY}
${QT_QTOPENGL_LIBRARY}
${QT_QTDBUS_LIBRARY}
${QT_QTSQL_LIBRARY}
${QT_QTSVG_LIBRARY}
${QT_QTXML_LIBRARY} )
if(QT_QTDBUS_FOUND)
target_link_libraries(smokeqt ${QT_QTCORE_LIBRARY}
${QT_QTGUI_LIBRARY}
${QT_QTNETWORK_LIBRARY}
${QT_QTOPENGL_LIBRARY}
${QT_QTDBUS_LIBRARY}
${QT_QTSQL_LIBRARY}
${QT_QTSVG_LIBRARY}
${QT_QTXML_LIBRARY} ) \
+else(QT_QTDBUS_FOUND)
target_link_libraries(smokeqt ${QT_QTCORE_LIBRARY}
${QT_QTGUI_LIBRARY}
${QT_QTNETWORK_LIBRARY}
${QT_QTOPENGL_LIBRARY}
${QT_QTSQL_LIBRARY}
${QT_QTSVG_LIBRARY}
${QT_QTXML_LIBRARY} )
endif(QT_QTDBUS_FOUND)
set_target_properties(smokeqt PROPERTIES VERSION 3.0.0 SOVERSION 3 )
smoke/qt/qt_includes.h (working copy)
// some MS headers do
// #define interface struct
// un-define it here so QtDBus will build correctly
#ifdef QT_QTDBUS
#undef interface
#include <QtDBus/QtDBus>
#endif
smoke/qt/QtGuess.txt (working copy)
endif(${${test_entry}} GREATER ${qt_test_threshold})
endforeach(test_entry ${define_tests})
file(STRINGS "${QT_QTCORE_INCLUDE_DIR}/qglobal.h" qglobal_h NEWLINE_CONSUME)
file(STRINGS "${QT_QTCORE_INCLUDE_DIR}/qconfig.h" qconfig_h NEWLINE_CONSUME)
file(STRINGS "${QT_QTCORE_INCLUDE_DIR}/qfeatures.h" qfeatures_h NEWLINE_CONSUME)
set(qtheaders "${qglobal_h}\n${qconfig_h}\n${qfeatures}")
if(WIN32)
file(STRINGS "${QT_QTCORE_INCLUDE_DIR}/../../src/corelib/global/qglobal.h" \
smoke/qtcore/QtGuess.txt (working copy)
endif(${${test_entry}} GREATER ${qt_test_threshold})
endforeach(test_entry ${define_tests})
file(STRINGS "${QT_QTCORE_INCLUDE_DIR}/qglobal.h" qglobal_h NEWLINE_CONSUME)
file(STRINGS "${QT_QTCORE_INCLUDE_DIR}/qconfig.h" qconfig_h NEWLINE_CONSUME)
file(STRINGS "${QT_QTCORE_INCLUDE_DIR}/qfeatures.h" qfeatures_h NEWLINE_CONSUME)
set(qtheaders "${qglobal_h}\n${qconfig_h}\n${qfeatures}")
if(WIN32)
file(STRINGS "${QT_QTCORE_INCLUDE_DIR}/../../src/corelib/global/qglobal.h" \
(12-12/15)