Skip to content

Commit

Permalink
GUI: Remove wx
Browse files Browse the repository at this point in the history
  • Loading branch information
fdde authored and DrMcCoy committed Dec 29, 2017
1 parent ab967b3 commit c7ffaec
Show file tree
Hide file tree
Showing 12 changed files with 22 additions and 111 deletions.
2 changes: 1 addition & 1 deletion BUILDDEP.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Build-time library dependencies
- Boost.Locale
- Boost.Thread

- wxWidgets (>= 3.0.0)
- Qt (>= 5.7.1)

- OpenAL Soft (>= 1.12)
- MAD (>= 0.15.1b)
Expand Down
9 changes: 0 additions & 9 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -262,15 +262,6 @@ find_package(LibLZMA REQUIRED)
include_directories(${LIBLZMA_INCLUDE_DIRS})
list(APPEND PHAETHON_LIBRARIES ${LIBLZMA_LIBRARIES})

find_package(wxWidgets COMPONENTS core base REQUIRED)
include_directories(${wxWidgets_INCLUDE_DIRS})
add_compile_options(${wxWidgets_CXX_FLAGS})
list(APPEND PHAETHON_LIBRARIES ${wxWidgets_LIBRARIES})

find_package(wxWidgets REQUIRED core base)
include(${wxWidgets_USE_FILE})
list(APPEND PHAETHON_LIBRARIES ${wxWidgets_LIBRARIES})

find_package(Qt5Core REQUIRED)
find_package(Qt5MultimediaWidgets REQUIRED)
find_package(Qt5Widgets REQUIRED)
Expand Down
4 changes: 2 additions & 2 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ BUILT_SOURCES =

LIBSF_PHAETHON = $(PHAETHON_CFLAGS)
LIBSF_GENERAL = $(ZLIB_CFLAGS) $(LZMA_FLAGS)
LIBSF_GRAPHIC = $(WX_CXXFLAGS) $(QT5_CFLAGS)
LIBSF_GRAPHIC = $(QT5_CFLAGS)
LIBSF_SOUND = $(AL_CFLAGS) $(MAD_CFLAGS) $(OGG_CFLAGS) $(VORBIS_CFLAGS)
LIBSF_BOOST = $(BOOST_CPPFLAGS)

Expand All @@ -62,7 +62,7 @@ LIBSF = $(LIBSF_PHAETHON) $(LIBSF_GENERAL) $(LIBSF_GRAPHIC) \

LIBSL_PHAETHON = $(PHAETHON_LIBS)
LIBSL_GENERAL = $(LTLIBICONV) $(ZLIB_LIBS) $(LZMA_LIBS)
LIBSL_GRAPHIC = $(WX_LIBS) $(QT5_LIBS)
LIBSL_GRAPHIC = $(QT5_LIBS)
LIBSL_SOUND = $(AL_LIBS) $(MAD_LIBS) $(OGG_LIBS) $(VORBIS_LIBS)
LIBSL_BOOST = $(BOOST_SYSTEM_LDFLAGS) $(BOOST_SYSTEM_LIBS) \
$(BOOST_FILESYSTEM_LDFLAGS) $(BOOST_FILESYSTEM_LIBS) \
Expand Down
3 changes: 0 additions & 3 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -177,9 +177,6 @@ AX_CHECK_ICONV( , AC_MSG_ERROR([No useable iconv() function found!]))
AX_CHECK_ZLIB(1, 2, 3, 0, , AC_MSG_ERROR([zlib(>= 1.2.3.4) is required and could not be found!]))
AX_CHECK_LZMA(5, 0, 3, 2, , AC_MSG_ERROR([liblzma(>= 5.0.5) is required and could not be found!]))

dnl Graphic libraries
AX_CHECK_WX(3, 0, 0, , AC_MSG_ERROR([wxWidgets (>= 3.0.0) is required and could not be found!]))

dnl Graphic libraries
AX_CHECK_QT5(5.7.1, , AC_MSG_ERROR([Qt5 (>= 5.7.1, modules Core, Gui, Multimedia, Widgets) is required and could not be found!]))
AC_CHECK_PROGS(UIC, [uic])
Expand Down
2 changes: 1 addition & 1 deletion dists/arch/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ pkgdesc="A resource explorer for BioWare's Aurora engine games"
arch=('i686' 'x86_64')
url="https://xoreos.org/"
license=('GPL3')
depends=('zlib' 'xz' 'boost' 'boost-libs' 'openal' 'libmad' 'libogg' 'libvorbis' 'faad2' 'xvidcore' 'wxgtk')
depends=('zlib' 'xz' 'boost' 'boost-libs' 'openal' 'libmad' 'libogg' 'libvorbis' 'faad2' 'xvidcore' 'qt5-base' 'qt5-multimedia')
makedepends=()
source=('git://github.com/xoreos/phaethon.git')
md5sums=('SKIP')
Expand Down
2 changes: 1 addition & 1 deletion dists/debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Source: phaethon
Section: misc
Priority: optional
Maintainer: Sven Hesse <drmccoy@drmccoy.de>
Build-Depends: debhelper (>= 9), dh-autoreconf, autotools-dev, autoconf (>= 2.65), gettext, zlib1g-dev (>= 1:1.2.3.4), liblzma-dev (>= 5.0.5), libboost-dev (>= 1.53), libboost-atomic-dev (>= 1.53), libboost-date-time-dev (>= 1.53), libboost-filesystem-dev (>= 1.53), libboost-locale-dev (>= 1.53), libboost-regex-dev (>= 1.53), libboost-system-dev (>= 1.53), libboost-chrono-dev (>= 1.53), libboost-thread-dev (>= 1.53), libopenal-dev (>= 1:1.12), libmad0-dev (>= 0.15.1b), libogg-dev (>= 1.2.0), libvorbis-dev (>= 1.3.1), libfaad-dev (>= 2.7), libxvidcore-dev (>= 2:1.2.2), libwxgtk3.0-dev
Build-Depends: debhelper (>= 9), dh-autoreconf, autotools-dev, autoconf (>= 2.65), gettext, zlib1g-dev (>= 1:1.2.3.4), liblzma-dev (>= 5.0.5), libboost-dev (>= 1.53), libboost-atomic-dev (>= 1.53), libboost-date-time-dev (>= 1.53), libboost-filesystem-dev (>= 1.53), libboost-locale-dev (>= 1.53), libboost-regex-dev (>= 1.53), libboost-system-dev (>= 1.53), libboost-chrono-dev (>= 1.53), libboost-thread-dev (>= 1.53), libopenal-dev (>= 1:1.12), libmad0-dev (>= 0.15.1b), libogg-dev (>= 1.2.0), libvorbis-dev (>= 1.3.1), libfaad-dev (>= 2.7), libxvidcore-dev (>= 2:1.2.2), qt5-default (>= 5.7.1), qtmultimedia5-dev (>= 5.7.1)
Standards-Version: 3.9.6
Homepage: https://xoreos.org/

Expand Down
2 changes: 1 addition & 1 deletion dists/debian/copyright
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ Files: m4/ax_check_iconv.m4
Copyright: 2013 Sven Hesse <drmccoy@drmccoy.de>
License: CC0-1.0

Files: m4/ax_check_wx.m4
Files: m4/ax_check_qt5.m4
Copyright: 2013, 2016 Sven Hesse <drmccoy@drmccoy.de>
Sven Hesse <drmccoy@drmccoy.de>
License: CC0-1.0
Expand Down
9 changes: 1 addition & 8 deletions dists/fedora/phaethon.spec
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ URL: https://xoreos.org/
Source0: https://github.com/xoreos/phaethon/archive/v%{version}.tar.gz

BuildRequires: zlib-devel, libogg-devel, openal-soft-devel, libvorbis-devel
BuildRequires: libxml2-devel, lzma-devel, wxGTK3-devel, libtool, gettext-devel
BuildRequires: libxml2-devel, lzma-devel, qt5-qtbase-devel, qt5-qtmultimedia, libtool, gettext-devel

# Boost dependencies.
BuildRequires: boost-devel, boost-system, boost-filesystem, boost-atomic
Expand All @@ -43,13 +43,6 @@ please see the xoreos website and its GitHub repositories for details.
%prep
%setup -q

%build
# We need to check against wx-config-3.0 for Fedora because of
# https://bugzilla.redhat.com/show_bug.cgi?id=1077718, I think. :(

./autogen.sh
%configure WX_CONFIG=wx-config-3.0

# When building in place we want to do a make clean.
make clean

Expand Down
70 changes: 0 additions & 70 deletions m4/ax_check_wx.m4

This file was deleted.

14 changes: 7 additions & 7 deletions src/common/ustring.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ UString::UString(const UString &str) {
*this = str;
}

UString::UString(const wxString &str) {
UString::UString(const QString &str) {
*this = str;
}

Expand Down Expand Up @@ -68,8 +68,8 @@ UString::UString(iterator sBegin, iterator sEnd) : _size(0) {
UString::~UString() {
}

UString::operator wxString() const {
return wxString::FromUTF8(c_str());
UString::operator QString() const {
return QString(c_str());
}

UString &UString::operator=(const UString &str) {
Expand All @@ -79,8 +79,8 @@ UString &UString::operator=(const UString &str) {
return *this;
}

UString &UString::operator=(const wxString &str) {
_string = str.mb_str(wxConvUTF8);
UString &UString::operator=(const QString &str) {
_string = str.toStdString();

recalculateSize();

Expand Down Expand Up @@ -125,7 +125,7 @@ UString UString::operator+(const UString &str) const {
return tmp;
}

UString UString::operator+(const wxString &str) const {
UString UString::operator+(const QString &str) const {
UString tmp(*this);

tmp += str;
Expand Down Expand Up @@ -164,7 +164,7 @@ UString &UString::operator+=(const UString &str) {
return *this;
}

UString &UString::operator+=(const wxString &str) {
UString &UString::operator+=(const QString &str) {
UString ustr(str);

return *this += ustr;
Expand Down
14 changes: 7 additions & 7 deletions src/common/ustring.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@

#include <boost/functional/hash.hpp>

#include <wx/string.h>
#include <QString>

#include "src/common/types.h"
#include "src/common/system.h"
Expand Down Expand Up @@ -71,8 +71,8 @@ class UString {
UString();
/** Copy constructor. */
UString(const UString &str);
/** Construct UString from a wxString. */
UString(const wxString &str);
/** Construct UString from a QString. */
UString(const QString &str);
/** Construct UString from an UTF-8 string. */
UString(const std::string &str);
/** Construct UString from an UTF-8 string. */
Expand All @@ -85,10 +85,10 @@ class UString {
UString(iterator sBegin, iterator sEnd);
~UString();

operator wxString() const;
operator QString() const;

UString &operator=(const UString &str);
UString &operator=(const wxString &str);
UString &operator=(const QString &str);
UString &operator=(const std::string &str);
UString &operator=(const char *str);

Expand All @@ -98,13 +98,13 @@ class UString {
bool operator>(const UString &str) const;

UString operator+(const UString &str) const;
UString operator+(const wxString &str) const;
UString operator+(const QString &str) const;
UString operator+(const std::string &str) const;
UString operator+(const char *str) const;
UString operator+(uint32 c) const;

UString &operator+=(const UString &str);
UString &operator+=(const wxString &str);
UString &operator+=(const QString &str);
UString &operator+=(const std::string &str);
UString &operator+=(const char *str);
UString &operator+=(uint32 c);
Expand Down
2 changes: 1 addition & 1 deletion src/gui/rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
# You should have received a copy of the GNU General Public License
# along with Phaethon. If not, see <http://www.gnu.org/licenses/>.

# GUI code, using wxWidgets.
# GUI code, using Qt.

noinst_LTLIBRARIES += src/gui/libgui.la

Expand Down

0 comments on commit c7ffaec

Please sign in to comment.