Windows Dependencies

jgmdev
Created by: jgmdev
Date: 05/25/2012 @ 9:23:42 pm
Views: 1302

Today some one contacted me on IRC because it was having crashes with the php executables distributed with the wxphp-2.9.4.0.exe installer. So I decided to give the installer a try on a clean installation of Windows. To my surprise I forgot that PHP has visual c++ libraries dependency.

So if someone is having problems running the installer or wxphp executables distributed with it, uninstall wxphp, install Visual C++ 2008 SP1 Redistributable and reinstall wxphp.

After installing the redistributable everything should work normally, maybe we should include that redistributable as part of the installer. In any case I added a note on the downloads section.

Other News

While I was testing wxWebView I discovered that most of the methods are declared as pure virtual, so the wxphp code generator didn't bind them. This is do to the nature of wxWebView not instantiated as a normal object but by using the static method NewObject() in PHP and New on C++, I guess it is done this way to handle the different back ends to render websites an operating system may have installed.

So I added some changes to the code generator in order to change those method declarations from pure virtual to virtual and now they are working as they should.

Testing the wxStyledTextCtrl/scintilla I noticed that many of the constants used by the class aren't defined on the wxWidgets documentation so I took a look on the header file of the control and added the almost 1000 constants on it to a separate file of the code generator to have them available on wxPHP and I have to say that regular expressions rock (saved me the time)! After adding the constants updated the styledtextctrl.php example to colorize php code and it works :)

I also fixed some small memory leaks and removed some unneeded elements from the generated code.

Theres also a crash occurring on windows and the cause seems to be the need of including wx/msw/wx.rc resource file on to the library. Thanks to aurora from php-gtk now I have an idea of how to add this file to the end wxphp library.

Finally, there seems to be a new bug on wxWidgets Mac version where the make install command doesn't copies wx/osx/private to the includes path. This results on errors when including webview.h like 'wxObjCID' does not name a type. Already submitted a ticket on the wxWidgets trac page. In any case if you are trying to compile with latest wxWidgets svn revision and have the mentioned problem just copy the mentioned directory to the includes directory where wxWidgets was installed and that should solve the problem.



Comments