أعجوبة

البرمجيات الحُرة والمفتوحة المصدر

أدوات المستخدم

أدوات الموقع


thawab-pri:win-exe

تطوير ثواب لنظام ويندوز

بناء webkitgtk

الجاهزة غير الرسمية

هناك إصدارة جاهزة من pywebkitgtk (دون دعم svg) موجودة على http://opensourcepack.blogspot.com/

كذلك هناك التي من gnucash لكنها دون إصدار بايثون وهي أقدم من التي قبلها

بناء واحدة عبر cross compiler

yum install gperf \
  mingw32-atk mingw32-binutils mingw32-cairo \
  mingw32-cpp mingw32-crossreport mingw32-enchant mingw32-expat mingw32-filesystem \
  mingw32-fontconfig mingw32-freetype mingw32-gcc mingw32-gcc-c++ mingw32-gettext \
  mingw32-glib2 mingw32-gnutls mingw32-gtk2 mingw32-hunspell mingw32-iconv mingw32-jasper \
  mingw32-libgcrypt mingw32-libgpg-error mingw32-libjpeg mingw32-libpng \
  mingw32-libsoup mingw32-libxml2 mingw32-libxslt mingw32-nsis mingw32-nsiswrapper mingw32-pango \
  mingw32-pixman mingw32-pthreads mingw32-readline mingw32-runtime mingw32-sqlite \
  mingw32-termcap mingw32-w32api mingw32-zlib 
 
mkdir result
CFLAGS="-DLIBSOUP_I_HAVE_READ_BUG_594377_AND_KNOW_SOUP_PASSWORD_MANAGER_MIGHT_GO_AWAY" mingw32-configure --with-target=win32 \
    --prefix=$PWD/result/ --disable-jit --enable-3D-transforms \
    --enable-web-sockets --enable-filters \
    --with-font-backend=pango --enable-shared-workers

بما أنه لا يوجد gst في فيدورا من أجل mingw32 نحتاج إضافة –disable-video للأمر السابق وقد نجح بعد ترقية حزمة mingw32-libsoup إلى نفس إصدار حزمة libsoup وكان الناتج هكذا:

WebKit was configured with the following options:

Build configuration:
 Enable debugging (slow)                                  : no
 Enable GCC build optimization                            : yes
 Code coverage support                                    : no
 Unicode backend                                          : icu
 Font backend                                             : pango
 Optimized memory allocator                               : yes
Features:
 3D Transforms                                            : yes
 Blob.slice support                                       : no
 Fast Mobile Scrolling                                    : no
 JIT compilation                                          : no
 Filters support                                          : yes
 Geolocation support                                      : no
 JavaScript debugger/profiler support                     : yes
 MathML support                                           : no
 HTML5 offline web applications support                   : yes
 HTML5 channel messaging support                          : yes
 HTML5 client-side session and persistent storage support : yes
 HTML5 client-side database storage support               : yes
 HTML5 ruby support                                       : yes
 HTML5 sandboxed iframe support                           : 
 HTML5 server-sent events support                         : yes
 HTML5 video element support                              : no
 Icon database support                                    : yes
 SharedWorkers support                                    : yes
 SVG support                                              : yes
 SVG animation support                                    : yes
 SVG fonts support                                        : yes
 SVG foreign object support                               : yes
 SVG as image support                                     : yes
 SVG use element support                                  : yes
 WML support                                              : no
 Web Sockets support                                      : yes
 Web Workers support                                      : yes
 XHTML-MP support                                         : no
 XPATH support                                            : yes
 XSLT support                                             : yes
GTK+ configuration:
 GDK target                                               : win32
 Hildon UI extensions                                     : no
 Introspection support                                    : no

بعدها نعمل make بالأمر

mingw32-make -j 5

وقد فشل الأمر السابق لأنه لا يوجد نسخة من مكتبة libicu خاصة ب mingw32 لذا استعملت glib وذلك بإعادة عمل configure لكن هذه المرة بإضافة –with-unicode-backend=glib

بعدها فشلت العملية

make  all-am
make[1]: Entering directory `/opt/downloads/exe/webkit-devel/webkit-1.2.0'
/bin/mkdir -p ./.deps/DerivedSources
  CXX    WebCore/bindings/js/libwebkit_1_0_la-JavaScriptProfileNode.lo
WebCore/bindings/js/JavaScriptProfileNode.cpp: In function 'const OpaqueJSValue* WebCore::getFunctionName(const OpaqueJSContext*, OpaqueJSValue*, OpaqueJSString*, const OpaqueJSValue**)':
WebCore/bindings/js/JavaScriptProfileNode.cpp:62: error: invalid conversion from 'const UChar*' to 'const JSChar*'
WebCore/bindings/js/JavaScriptProfileNode.cpp:62: error:   initializing argument 1 of 'OpaqueJSString* JSStringCreateWithCharacters(const JSChar*, size_t)'
WebCore/bindings/js/JavaScriptProfileNode.cpp: In function 'const OpaqueJSValue* WebCore::getURL(const OpaqueJSContext*, OpaqueJSValue*, OpaqueJSString*, const OpaqueJSValue**)':
WebCore/bindings/js/JavaScriptProfileNode.cpp:72: error: invalid conversion from 'const UChar*' to 'const JSChar*'
WebCore/bindings/js/JavaScriptProfileNode.cpp:72: error:   initializing argument 1 of 'OpaqueJSString* JSStringCreateWithCharacters(const JSChar*, size_t)'
make[1]: *** [WebCore/bindings/js/libwebkit_1_0_la-JavaScriptProfileNode.lo] Error 1
make[1]: Leaving directory `/opt/downloads/exe/webkit-devel/webkit-1.2.0'
make: *** [all] Error 2

عملية casting للنوع المطلوب حلت تلك المشكلة. فظهرت المشكلة

make  all-am
make[1]: Entering directory `/opt/downloads/exe/webkit-devel/webkit-1.2.0'
/bin/mkdir -p ./.deps/DerivedSources
  CXX    WebCore/dom/libwebkit_1_0_la-XMLTokenizerLibxml2.lo
WebCore/dom/XMLTokenizerLibxml2.cpp: In member function 'void WebCore::XMLTokenizer::error(WebCore::XMLTokenizer::ErrorType, const char*, char*)':
WebCore/dom/XMLTokenizerLibxml2.cpp:918: error: 'vasprintf' was not declared in this scope
make[1]: *** [WebCore/dom/libwebkit_1_0_la-XMLTokenizerLibxml2.lo] Error 1
make[1]: Leaving directory `/opt/downloads/exe/webkit-devel/webkit-1.2.0'
make: *** [all] Error 2

وعند تحرير الملف وأخذ الكود الموجود بعد

#if COMPILER(MSVC) || COMPILER(RVCT)

وحذف الذي في #else

عندها حصلنا على الخطأ التالي

make  all-am
make[1]: Entering directory `/opt/downloads/exe/webkit-devel/webkit-1.2.0'
/bin/mkdir -p ./.deps/DerivedSources
  CXX    WebCore/plugins/libwebkit_1_0_la-PluginView.lo
WebCore/plugins/PluginView.cpp:71:39: error: PluginMessageThrottlerWin.h: No such file or directory
WebCore/plugins/PluginView.cpp: In member function 'void WebCore::PluginView::stop()':
WebCore/plugins/PluginView.cpp:345: error: cannot convert 'GtkWidget*' to 'HWND__*' for argument '1' to 'LONG GetWindowLongA(HWND__*, int)'
WebCore/plugins/PluginView.cpp:348: error: cannot convert 'GtkWidget*' to 'HWND__*' for argument '1' to 'LONG SetWindowLongA(HWND__*, int, LONG)'
In file included from ./JavaScriptCore/wtf/OwnPtr.h:26,
                 from ./JavaScriptCore/wtf/VectorTraits.h:24,
                 from ./JavaScriptCore/wtf/Vector.h:28,
                 from ./WebCore/platform/text/CString.h:31,
                 from WebCore/plugins/PluginView.h:31,
                 from WebCore/plugins/PluginView.cpp:28:
./JavaScriptCore/wtf/OwnPtrCommon.h: In function 'void WTF::deleteOwnedPtr(T*) [with T = WebCore::PluginMessageThrottlerWin]':
./JavaScriptCore/wtf/OwnPtr.h:52:   instantiated from 'WTF::OwnPtr<T>::~OwnPtr() [with T = WebCore::PluginMessageThrottlerWin]'
WebCore/plugins/PluginView.cpp:276:   instantiated from here
./JavaScriptCore/wtf/OwnPtrCommon.h:53: error: invalid application of 'sizeof' to incomplete type 'WebCore::PluginMessageThrottlerWin' 
./JavaScriptCore/wtf/OwnPtrCommon.h:53: error: creating array with negative size ('-0x00000000000000001')
./JavaScriptCore/wtf/OwnPtrCommon.h:55: warning: possible problem detected in invocation of delete operator:
./JavaScriptCore/wtf/OwnPtrCommon.h:51: warning: 'ptr' has incomplete type
WebCore/plugins/PluginView.h:72: warning: forward declaration of 'struct WebCore::PluginMessageThrottlerWin'
./JavaScriptCore/wtf/OwnPtrCommon.h:55: note: neither the destructor nor the class-specific operator delete will be called, even if they are declared when the class is defined.
make[1]: *** [WebCore/plugins/libwebkit_1_0_la-PluginView.lo] Error 1
make[1]: Leaving directory `/opt/downloads/exe/webkit-devel/webkit-1.2.0'
make: *** [all] Error 2

مراجع

بناء المكتبات على ويندوز مباشرة

أولا: قمنا بتثبيت mingw32 ثم msys عبر برامج تثبيت ذاتية installer ثم قمت بتحديث gcc إلى الإصدار 4 ثم أننا بحاجة أيضا لما يلي

  • libgmp-5.0.1-1-mingw32-dll-10
  • libmpc-0.8.1-1-mingw32-dll-2
  • libmpfr-2.4.1-1-mingw32-dll-1

وبهذا أصبح لدينا bash و make و gcc …إلخ

ثانيا: بناء الحزم: فضل بناء حزمة glib بسبب عدم وجود ال headers الخاصة ب zlib يعني علينا حصل ال dependencies الخاصة بالتطوير وتثبيتها

بناء pygtk 2.17

  • نقل محتويات مجلد C:\python26\include إلى C:\python26\include\python2.6
  • نقل ملفات pc من مجلد python26 إلى C:\gtk\lib\pkg-config
  • نسخ c:/Python26/Lib/site-packages/gtk-2.0/codegen إلى c:/gtk/share/pygobject/2.0/codegen
  • البناء
make CFLAGS="-I/c/Python26/include/python2.6/pycairo -I/c/Python26/include/python2.6/ -I/c/Python26/include/python2.6/pygtk-2.0" LIBS="-L/c/Python26/libs -lpython26 -lutil -lm"
  • الخطأ PyGMountOperation_Type undeclared
gtk.c:125315:129: error: 'PyGMountOperation_Type' undeclared (first use in this function)

حل1

sed -e 's/PyGMountOperation_Type for GMountOperation/PyGMountOperation_Type/g' gtk/gtk.override > gtk/gtk.override2 && mv gtk/gtk.override2 gtk/gtk.override
 sed -e 's/PyGAppLaunchContext_Type for GAppLaunchContext/PyGAppLaunchContext_
Type/g' gtk/gdk.override > gtk/gdk.override2 && mv gtk/gdk.override2 gtk/gdk.ov
erride

نجح البناء لكن make install لم تنجح بسبب أسماء المجلدات حيث هناك \ و / في أسماء الملفات

thawab-pri/win-exe.txt · آخر تعديل: 2015/04/23 03:21 بواسطة 127.0.0.1

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki