Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for build with wxWidgets 3.1.0 #1294

Closed
sl1pkn07 opened this issue Apr 14, 2016 · 11 comments
Closed

Add support for build with wxWidgets 3.1.0 #1294

sl1pkn07 opened this issue Apr 14, 2016 · 11 comments

Comments

@sl1pkn07
Copy link

Hi

wxWidgets 3.1.0 released in February

any plans to make pscx2 compatible with this version?

i make a little change :

diff --git a/cmake/SearchForStuff.cmake b/cmake/SearchForStuff.cmake
index 89b7f98..a291026 100644
--- a/cmake/SearchForStuff.cmake
+++ b/cmake/SearchForStuff.cmake
@@ -25,7 +25,7 @@ else()
     set(wxWidgets_CONFIG_OPTIONS --unicode=yes)
 endif()

-list(APPEND wxWidgets_CONFIG_OPTIONS --version=3.0)
+list(APPEND wxWidgets_CONFIG_OPTIONS --version=3.1)

 if(GTK3_API AND NOT APPLE)
     list(APPEND wxWidgets_CONFIG_OPTIONS --toolkit=gtk3)
@@ -35,18 +35,18 @@ endif()

 # wx2.8 => /usr/bin/wx-config-2.8
 # lib32-wx2.8 => /usr/bin/wx-config32-2.8
-# wx3.0 => /usr/bin/wx-config-3.0
+# wx3.1 => /usr/bin/wx-config-3.1
 # I'm going to take a wild guess and predict this:
-# lib32-wx3.0 => /usr/bin/wx-config32-3.0
+# lib32-wx3.1 => /usr/bin/wx-config32-3.1
 # FindwxWidgets only searches for wx-config.
 if(CMAKE_CROSSCOMPILING)
-    # May need to fix the filenames for lib32-wx3.0.
-    if(${PCSX2_TARGET_ARCHITECTURES} MATCHES "i386" AND EXISTS "/usr/bin/wx-config32-3.0")
-        set(wxWidgets_CONFIG_EXECUTABLE "/usr/bin/wx-config32-3.0")
+    # May need to fix the filenames for lib32-wx3.1.
+    if(${PCSX2_TARGET_ARCHITECTURES} MATCHES "i386" AND EXISTS "/usr/bin/wx-config32-3.1")
+        set(wxWidgets_CONFIG_EXECUTABLE "/usr/bin/wx-config32-3.1")
     endif()
 else()
-    if(EXISTS "/usr/bin/wx-config-3.0")
-        set(wxWidgets_CONFIG_EXECUTABLE "/usr/bin/wx-config-3.0")
+    if(EXISTS "/usr/bin/wx-config-3.1")
+        set(wxWidgets_CONFIG_EXECUTABLE "/usr/bin/wx-config-3.1")
     endif()
 endif()

@@ -90,7 +90,7 @@ if(UNIX)
         if(CMAKE_CROSSCOMPILING)
             find_package(GTK3 REQUIRED gtk)
         else()
-            check_lib(GTK3 gtk+-3.0 gtk/gtk.h)
+            check_lib(GTK3 gtk+-3.1 gtk/gtk.h)
         endif()
     else()
         find_package(GTK2 REQUIRED gtk)

but fail in build:

[  8%] Building CXX object common/src/Utilities/CMakeFiles/Utilities.dir/VirtualMemory.cpp.o
In file included from /tmp/makepkg/pcsx2-git/src/pcsx2/common/include/Utilities/Dependencies.h:182:0,
                 from /tmp/makepkg/pcsx2-git/src/pcsx2/common/src/Utilities/PrecompiledHeader.h:21,
                 from /tmp/makepkg/pcsx2-git/src/pcsx2/common/src/Utilities/VirtualMemory.cpp:16:
/usr/include/wx-3.1/wx/string.h:193:15: error: 'wxUniChar wxCStrData::operator[](unsigned int) const' cannot be overloaded
     wxUniChar operator[](unsigned int n) const { return operator[](size_t(n)); }
               ^
/usr/include/wx-3.1/wx/string.h:189:22: error: with 'wxUniChar wxCStrData::operator[](size_t) const'
     inline wxUniChar operator[](size_t n) const;
                      ^
/usr/include/wx-3.1/wx/string.h:1435:15: error: 'wxUniChar wxString::operator[](unsigned int) const' cannot be overloaded
     wxUniChar operator[](unsigned int n) const
               ^
/usr/include/wx-3.1/wx/string.h:1432:15: error: with 'wxUniChar wxString::operator[](size_t) const'
     wxUniChar operator[](size_t n) const
               ^
/usr/include/wx-3.1/wx/string.h:1447:18: error: 'wxUniCharRef wxString::operator[](unsigned int)' cannot be overloaded
     wxUniCharRef operator[](unsigned int n)
                  ^
/usr/include/wx-3.1/wx/string.h:1444:18: error: with 'wxUniCharRef wxString::operator[](size_t)'
     wxUniCharRef operator[](size_t n)
                  ^
common/src/Utilities/CMakeFiles/Utilities.dir/build.make:62: recipe for target 'common/src/Utilities/CMakeFiles/Utilities.dir/VirtualMemory.cpp.o' failed
make[2]: *** [common/src/Utilities/CMakeFiles/Utilities.dir/VirtualMemory.cpp.o] Error 1
CMakeFiles/Makefile2:181: recipe for target 'common/src/Utilities/CMakeFiles/Utilities.dir/all' failed
make[1]: *** [common/src/Utilities/CMakeFiles/Utilities.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2

greetings

@gregory38
Copy link
Contributor

So why do you want to use wx 3.1 (dev version) ?

IMHO we could wait the stable release 3.2.

@MrCK1
Copy link
Member

MrCK1 commented Apr 19, 2016

@gregory38

I had noticed too that we were using an old version of WX. Anyways, here's a roadmap for WX.

Here's the main changes:

The main goal for this 3.2 release will be wxAUI refactoring/rewrite with full support for dockable notebook pages.

3.2 will also finally drop support for very old legacy systems (such as Win9x platform) and compilers (MSVC6, maybe MSVC7 as well).

If possible, we'd also like to have the following relatively important features for 3.2:

Finish and merge wxMaskedEdit implementation. This will require providing support for filtering native controls input on all platforms which would be useful in its own right.
Support for context-sensitive translations in wxLocale.
Implementation of "frozen" columns and rows in wxGrid.
Improve support for window-modal and application-modal dialogs. 

but if we can't implement them in time we'll release 3.2 without them.

@gregory38
Copy link
Contributor

I had noticed too that we were using an old version of WX

Erratum, PCSX2 uses latest stable WX version. Quoting from the website

Please notice that while 3.1.0 is officially a "development" version because it is not
 fully compatible with 3.0.x, the list of backwards incompatible changes is very short,
 so you shouldn't have any problems updating to this version from 3.0.x in practice,
 and you're encouraged to try this version out and use it in production in spite of its 
odd version number.

It was a lots of work to go from wx2.8 to wx3.0. It creates various regressions. 2.8 => 3.0 was a major wx upgrade, yet GUI improvements were very small. Last but not least, it will be difficult to support a dev version on various Linux distribution.

For me, so far, it doesn't worth it.

@turtleli
Copy link
Member

The errors above are misconfiguration errors, and changing the check_lib(GTK3 gtk+-3.0 gtk/gtk.h) line is wrong since that refers to gtk3, not wx3.0.

PCSX2 does works with wx3.1 on Linux with minimal changes on my system (cmake changes + moving #include <wx/crt.h> line in common/include/Utilities/Dependencies.h so it's not Windows only). Supporting it however, would probably only increase dev workload IMO.

@gregory38
Copy link
Contributor

We will plan a 3.2 switch based on popular distribution. But 3.1 will only introduce regression and additional workload.

@cesarizu
Copy link

cesarizu commented Oct 8, 2016

I'm having this error for wx 3.0:

/usr/include/wx-3.0/wx/string.h:211:15: error: ‘wxUniChar wxCStrData::operator[](unsigned int) const’ cannot be overloaded
     wxUniChar operator[](unsigned int n) const { return operator[](size_t(n)); }
               ^~~~~~~~

Is there something I should do?

@gregory38
Copy link
Contributor

Configure wx to select 32 the bits library version. Most of the time you just need to install them.

@cesarizu
Copy link

cesarizu commented Oct 9, 2016

I'm not really sure how to do that. This error is during the build and not the linking. I have the 32 bits libraries installed:

$ file /usr/lib/libwx_baseu-3.0.so                                                              
/usr/lib/libwx_baseu-3.0.so: symbolic link to libwx_baseu-suse.so.1
$ file /usr/lib/libwx_baseu-suse.so.1                                                           
/usr/lib/libwx_baseu-suse.so.1: ELF 32-bit LSB shared object, Intel 80386, version 1 (GNU/Linux), dynamically linked, BuildID[sha1]=de2c59f4f38972ee0841d821975f86a4fee72b83, stripped

@gregory38
Copy link
Contributor

Yes it is a compilation issue because you use 64 bits struc in the middle of 32 bits code. Wx include aren't the same. Might be better to open a post on PCSX2 forum, search on it. Or google the mess for suse distribution. Issue is related to the wrong wx-config file. Either it got a special name or a bad symlink.

1 similar comment
@gregory38
Copy link
Contributor

Yes it is a compilation issue because you use 64 bits struc in the middle of 32 bits code. Wx include aren't the same. Might be better to open a post on PCSX2 forum, search on it. Or google the mess for suse distribution. Issue is related to the wrong wx-config file. Either it got a special name or a bad symlink.

@cesarizu
Copy link

cesarizu commented Oct 9, 2016

Thank you. I'll look into it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants