Skip to content

Commit

Permalink
GUI: Remove wxWidgets dependency and GUI code
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelpm54 authored and DrMcCoy committed May 22, 2018
1 parent 2dc7e82 commit e455d6f
Show file tree
Hide file tree
Showing 29 changed files with 8 additions and 3,309 deletions.
2 changes: 0 additions & 2 deletions BUILDDEP.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ Build-time library dependencies
- Boost.Locale
- Boost.Thread

- wxWidgets (>= 3.0.0)

- OpenAL Soft (>= 1.12)
- MAD (>= 0.15.1b)
- libogg (>= 1.2.0)
Expand Down
9 changes: 0 additions & 9 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -266,15 +266,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(Iconv REQUIRED)
include_directories(${ICONV_INCLUDE_DIRS})
list(APPEND PHAETHON_LIBRARIES ${ICONV_LIBRARIES})
Expand Down
6 changes: 2 additions & 4 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -49,18 +49,16 @@ dist_doc_DATA =

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

LIBSF = $(LIBSF_PHAETHON) $(LIBSF_GENERAL) $(LIBSF_GRAPHIC) \
LIBSF = $(LIBSF_PHAETHON) $(LIBSF_GENERAL) \
$(LIBSF_SOUND) $(LIBSF_BOOST)

# Library linking flags

LIBSL_PHAETHON = $(PHAETHON_LIBS)
LIBSL_GENERAL = $(LTLIBICONV) $(ZLIB_LIBS) $(LZMA_LIBS)
LIBSL_GRAPHIC = $(WX_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 All @@ -70,7 +68,7 @@ LIBSL_BOOST = $(BOOST_SYSTEM_LDFLAGS) $(BOOST_SYSTEM_LIBS) \
$(BOOST_ATOMIC_LDFLAGS) $(BOOST_ATOMIC_LIBS) \
$(BOOST_LOCALE_LDFLAGS) $(BOOST_LOCALE_LIBS) \
$(BOOST_THREAD_LDFLAGS) $(BOOST_THREAD_LIBS)
LIBSL = $(LIBSL_XOREOS) $(LIBSL_GENERAL) $(LIBSL_GRAPHIC) \
LIBSL = $(LIBSL_XOREOS) $(LIBSL_GENERAL) \
$(LIBSL_SOUND) $(LIBSL_BOOST)

# Other compiler flags
Expand Down
3 changes: 0 additions & 3 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -181,9 +181,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 Sound libraries
AX_CHECK_AL( , AC_MSG_ERROR([OpenAL or OpenAL Soft (>= 1.12) is required and could not be found!]))
AX_CHECK_MAD(0, 15, 1, , AC_MSG_ERROR([libMAD (>= 0.15.1) is required and could not be found!]))
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')
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)
Standards-Version: 3.9.6
Homepage: https://xoreos.org/

Expand Down
5 changes: 0 additions & 5 deletions dists/debian/copyright
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,6 @@ Files: m4/ax_check_iconv.m4
Copyright: 2013 Sven Hesse <drmccoy@drmccoy.de>
License: CC0-1.0

Files: m4/ax_check_wx.m4
Copyright: 2013, 2016 Sven Hesse <drmccoy@drmccoy.de>
Sven Hesse <drmccoy@drmccoy.de>
License: CC0-1.0

Files: m4/ax_check_lzma.m4
Copyright: 2014 Sven Hesse <drmccoy@drmccoy.de>
License: CC0-1.0
Expand Down
6 changes: 2 additions & 4 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, libtool, gettext-devel

# Boost dependencies.
BuildRequires: boost-devel, boost-system, boost-filesystem, boost-atomic
Expand All @@ -44,11 +44,9 @@ please see the xoreos website and its GitHub repositories for details.
%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
%configure

# 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.

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

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

UString::UString(const std::string &str) {
*this = str;
}
Expand All @@ -68,25 +64,13 @@ UString::UString(iterator sBegin, iterator sEnd) : _size(0) {
UString::~UString() {
}

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

UString &UString::operator=(const UString &str) {
_string = str._string;
_size = str._size;

return *this;
}

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

recalculateSize();

return *this;
}

UString &UString::operator=(const std::string &str) {
_string = str;

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

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

tmp += str;

return tmp;
}

UString UString::operator+(const std::string &str) const {
UString tmp(*this);

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

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

return *this += ustr;
}

UString &UString::operator+=(const std::string &str) {
UString ustr(str);

Expand Down
9 changes: 0 additions & 9 deletions src/common/ustring.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@

#include <boost/functional/hash.hpp>

#include <wx/string.h>

#include "src/common/types.h"
#include "src/common/system.h"

Expand Down Expand Up @@ -69,8 +67,6 @@ class UString {
UString();
/** Copy constructor. */
UString(const UString &str);
/** Construct UString from a wxString. */
UString(const wxString &str);
/** Construct UString from an UTF-8 string. */
UString(const std::string &str);
/** Construct UString from an UTF-8 string. */
Expand All @@ -83,10 +79,7 @@ class UString {
UString(iterator sBegin, iterator sEnd);
~UString();

operator wxString() const;

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

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

UString operator+(const UString &str) const;
UString operator+(const wxString &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 std::string &str);
UString &operator+=(const char *str);
UString &operator+=(uint32 c);
Expand Down
73 changes: 0 additions & 73 deletions src/gui/about.cpp

This file was deleted.

0 comments on commit e455d6f

Please sign in to comment.