Skip to content

Commit

Permalink
Add patch for wxPython 2.9.4.0 that fixes an issue with recent clang …
Browse files Browse the repository at this point in the history
…versions.
  • Loading branch information
Kentzo committed May 31, 2015
1 parent 4e546e2 commit acf60d2
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
4 changes: 4 additions & 0 deletions README.md
Expand Up @@ -171,6 +171,10 @@ Assuming you have virtualenv at *~/.virtualenvs/Cura/* and [wxPython sources](ht
2. `make install`
Note to speedup the process I recommend you to enable multicore build by adding the -j*cores* flag:
`make -j4 install`

Chances are high that compilation will fail with type mismatch error in Obj-C code. If it's the case then apply a patch at *scripts/darwin/wxPython-src-2.9.4.0.patch*.
If it won't fix all the errors, just modify source files manually by casting types to those expected by clang.

3. `cd` into *~/Downloads/wxPython-src-2.9.4.0/wxPython/*
4. Build wxPython (Note `python` is the python of your virtualenv):

Expand Down
20 changes: 20 additions & 0 deletions scripts/darwin/wxPython-src-2.9.4.0.patch
@@ -0,0 +1,20 @@
--- /Users/kentzo/Downloads/wxPython-src-2.9.4.0 2/src/osx/webview_webkit.mm 2012-07-20 22:19:02.000000000 -0500
+++ /Users/kentzo/Downloads/wxPython-src-2.9.4.0/src/osx/webview_webkit.mm 2015-05-30 00:45:13.000000000 -0500
@@ -924,7 +924,7 @@
wxVector<wxSharedPtr<wxWebViewHistoryItem> > wxWebViewWebKit::GetBackwardHistory()
{
wxVector<wxSharedPtr<wxWebViewHistoryItem> > backhist;
- WebBackForwardList* history = [m_webView backForwardList];
+ WebBackForwardList* history = (WebBackForwardList *)[m_webView backForwardList];
int count = [history backListCount];
for(int i = -count; i < 0; i++)
{
@@ -942,7 +942,7 @@
wxVector<wxSharedPtr<wxWebViewHistoryItem> > wxWebViewWebKit::GetForwardHistory()
{
wxVector<wxSharedPtr<wxWebViewHistoryItem> > forwardhist;
- WebBackForwardList* history = [m_webView backForwardList];
+ WebBackForwardList* history = (WebBackForwardList *)[m_webView backForwardList];
int count = [history forwardListCount];
for(int i = 1; i <= count; i++)
{

0 comments on commit acf60d2

Please sign in to comment.