All of the code is basically the same as xfce2, but the library
dependencies have changed.
- FindThunarX3.cmake: Find the GTK+ 3.x version of ThunarX.
- xfce3/CMakeLists.txt is a clone of xfce/CMakeLists.txt. It references
all of the sources from the xfce/ directory.
- Thunar 1.8.0 doesn't change the formatting in the properties dialog,
so RP_DFT_XFCE is kept as-is.
- #undef GTK_DISABLE_DEPRECATED in a few places because thunar-renamer.h
uses GtkVBox, which is deprecated in GTK+ 3.x.
- doc/COMPILING.md: Added rom-properties-xfce3.
TODO: Add a Debian package once it's added to the repository.
cmake/options.cmake: Unset QT_SELECT initially.
Set QT_SELECT in each individual directory based on the required version.
For libunixcommon, set it, call the required program, then unset it.
This should fix all of the issues:
- Qt4: If set to 5, qmake would fail to detect Qt/X11.
- Qt5: If set to 4, the plugin path was wrong.
The gettext libraries and executables were built on Ubuntu 18.04 using
MinGW-w64 with gcc-7.3.0.
iconv support has been disabled for the runtime, but it's still needed
for some of the build executables. For that, we're using win-iconv, which
is an iconv wrapper that uses the Windows API. [1]
In addition, several patches from the official MinGW package repository
were applied to gettext-0.19.8.1 in order to get it to build correctly
for Windows. [2]
TODO:
- Test packaging to ensure the correct DLL is packaged.
- Test bindtextdomain() to determine if it supports Unicode. If it
doesn't, then another patch will be needed.
[1] https://github.com/win-iconv/win-iconv
[2] https://github.com/Alexpux/MINGW-packages/tree/master/mingw-w64-gettext
The default value is AUTO. If set to ON, CMake will fail if the
required packages are missing.
NOTE: OPTION() only supports BOOL. Use SET() and SET_PROPERTY() for
tristate support.
- Reference: https://cmake.org/pipermail/cmake/2016-October/064342.html
NOTE 2: libunixcommon still searches for the packages unconditionally
because it's used for rp-stub's search path.
TODO: Initialize in the DLL and/or EXE entry point.
TODO: Search the DLL directories on Windows.
Added ENABLE_NLS. (defaults to OFF on Windows for now)
This allows the images to be decoded, but with lower quality.
Removed ENABLE_S3TC checks from all files except ImageDecoder_S3TC.cpp.
Unconditionally compile ImageDecoder_S3TC.cpp.
Ubuntu 17.04's gcc doesn't seem to handle LTO properly for some reason.
It crashes when compiling Qt5 automoc files.
- gcc: 6.3.0-12ubuntu2
- qtbase5-dev-tools: 5.7.1+dfsg-2ubuntu4~1
FIXME: Running CMake with -DENABLE_LTO=ON, then -DENABLE_LTO=OFF
doesn't seem to work right... (The flags aren't removed properly.)
[Kubuntu 17.04, cmake-3.7.2]
TinyXML2 will be used to parse Windows manifests.
The Ubuntu 17.04 64-bit dynamic library build is around 83 KB, so
this won't add too much to the executable size.
TODO:
- Use the system TinyXML2 if available.
- Compile as a DLL? (with delay loading on Windows, maybe)
Currently supports RGB, YCbCr, and grayscale images. (YCbCr is handled
using libjpeg's built-in colorspace conversion.)
NOTE: libjpeg's RGB support outputs 24-bit RGB, so we have to manually
expand it to 32-bit ARGB with an opaque alpha channel.
Tested with Nintendo DS cover art and it works:
- ASME (Super Mario 64 DS) (RGB)
- BXSE (Sonic Colors) (YCbCr)
I manually converted the images to grayscale and those worked as well.
TODO: CMYK/YCCK. (libjpeg has automatic YCCK->CMYK colorspace conversion,
but not CMYK->RGB.)
[cmake] Added libjpeg detection and options.
TODO:
- Add an internal copy of libjpeg-turbo.
- Make libjpeg support optional?
The Nautilus frontend is very similar to the Thunar (XFCE) frontend,
though some things have changed due to the different ways Nautilus
handles things. In particular, RomPropertiesPage is not a subclass
of NautilusPropertyPage; instead, RomPropertiesPage is added to a
generic NautilusPropertyPage as a widget.
Added Find*.cmake files for glib2, GTK+ 3, GdkPixbuf2, and
libnautilus-extension.
RomDataView: Set the GtkBox orientation to vertical when compiling with
GTK+ 3.x.
No ROM data parsing is implemented yet. All of this boilerplate is merely
to get a basic properties page plugin built and registered.
[cmake] FindThunarX2.cmake: CMake FIND_PACKAGE() file to find the GTK+2
ThunarX libraries.
[cmake] options.cmake: Added BUILD_XFCE.
I've decided to get rid of the GDI+ PNG handling. It doesn't improve
anything performance-wise, adds coding overhead, and probably isn't
any faster than libpng.
GDI+ also doesn't support APNG. This version does.
NOTE: If I add APNG export, I'll need to use the included libpng
in Ubuntu builds, since Ubuntu still has libpng-1.2, and it's a
version that doesn't support APNG.
Reworked the bundled library system to be similar to the one in
mcrecover, but improved.
Added "-fpic -fPIC" to all extlib static libraries when building
for Linux systems. This is needed for libpng, but might not be
needed for other libraries; nevertheless, it should be set.
TODO: Use libpng in the Windows build. It's being linked in,
but it isn't actually being used for anything yet.
Set ENABLE_COVERAGE=ON to enable code coverage testing.
After the build is finished, run 'make coverage' to run the unit tests
and generate a code coverage page in the ${CMAKE_BINARY_DIR}/coverage
directory.
Reference: https://github.com/bilke/cmake-modules/blob/master/CodeCoverage.cmake
(commit 59f8ab8dded56b490dec388ac6ad449318de8779)
CMakeLists.txt:
- Moved the CMAKE_BUILD_TYPE check to before INCLUDE(CTest),
and capitalized the 'D' in "Debug", since CodeCoverage.cmake
checks for that.
gcc.cmake:
- Set the required CFLAGS. (These aren't checked for explicitly, since
they're basically present on all gcc since forever.)
- Link all targets to -lgcov.
- Create a 'coverage' target for automatically running tests and
generating HTML output using lcov/genhtml.
options.cmake:
- Added ENABLE_COVERAGE.
scripts/lcov.sh:
- Shell script used by the 'coverage' target to generate the lcov/genhtml
output from the gcov profiling data.
CMakeLists.txt:
- Set the version to 0.7.99+.
- Added more CPack fields.
- Added an architecture-specific suffix for Windows packages.
(TODO: Package both 32-bit and 64-bit DLLs in the Win64 package.)
DirInstallPaths.cmake: Copied from GCN MemCard Recover, with some
changes to accomodate the different setup for rom-properties.
options.cmake: s/debug file/debug files/g
doc/, scripts/: Install the relevant files. Note that the files aren't
converted to Windows line endings when compiling for Windows.
[win32] CMakeLists.txt: Added INSTALL() commands.
This class will be used to load encryption keys from the keys.conf file
in the user's configuration directory.
options.cmake: Added an option ENABLE_DECRYPTION. This is enabled by
default; if disabled, KeyManager won't be built, and decryption won't
be available for newer ROM and disc images that are either fully
encrypted or have encrypted sections.
- options.cmake, src/CMakeLists.txt: Only attempt to build the
KDE4 and KDE5 plugins on Unix/Linux systems.
- TextFuncs:
- Fixed various wchar_t/char16_t issues.
- Implemented cp1252 fallback for Windows in cp1252_sjis_to_rp_string().
The W32U_mbs_to_UTF16() function now has a dwFlags parameter, which
is used by cp1252_sjis_to_rp_string() to ensure it fails if the string
contains invalid Shift-JIS sequences. (MB_ERR_INVALID_CHARS)
- Renamed 'n' variables to 'len'.
Split RomPropertiesDialogPluginFactory into separate files. Note that
separate files are needed for KDE4 and KDE5 due to changes in automoc.
automoc4 complains if it has an #include for .moc, whereas automoc5
doesn't recognize that K_PLUGIN_FACTORY() has a Q_OBJECT macro, so it
fails to link due to undefined references to a vtable.
cmake/options.cmake: Added BUILD_KDE4 and BUILD_KDE5 options.
Both default to ON, but if the dependencies are missing, then their
respective plugins won't be built.
Minor change in SplitDebugInformation to handle CMake linking the
shared library in build/lib/ instead of build/src/kde/.
Added options for SPLIT_DEBUG and INSTALL_DEBUG, though INSTALL_DEBUG
isn't currently used.