The variables have been (mostly) renamed to GTK2, though the user-facing
variable is still BUILD_XFCE, and it shows "XFCE" in the UI_FRONTENDS
status message.
I don't know if I'll be adding support for old GTK+ 2.x Nautilus
versions...
The variables are CMAKE_PROJECT_VERSION* for the top-level version
PROJECT_VERSION_* is set if a subproject sets a version number.
- CMP0048 is needed in order to use VERSION. This might be implied by
using CMAKE_MINIMUM_REQUIRED(), but we'll explicitly specify it anyway.
- Set policies before calling PROJECT().
- Update the Win32 DO_SPLIT_DEBUG() code to use PROJECT_VERSION_*
variables if set, or CMAKE_PROJECT_VERSION* if not.
This should fix the Win32 build.
This fixes a regression from commit a1a2e0895c.
(Set all projects to require CMake 3.0.)
- Added language specifications.
- Set the top-level project version in the PROJECT() call.
- Set CMP0063 to NEW if it's available. This enables the symbol
visibility presets on *all* target types, not just shared libraries,
module libraries, and executables with ENABLE_EXPORTS set.
The only differences are symbol names, which we can resolve at runtime.
Export all three plugin symbols. Depending on which initialization
function is called, we'll dlopen() the appropriate library and load
the symbols.
TODO:
- Create symlinks for the MATE and Cinnamon plugins.
- Update Debian packages to install symlinks.
- Other testing.
This should ensure better utilization of precompiled headers in gcc builds.
Note that ${CMAKE_BUILD_TYPE} is not necessarily all uppercase, so
convert it to uppercase before using it.
CMakeLists.txt: Make sure CMAKE_BUILD_TYPE gets cached as "Release" if it
isn't specified on the command line.
TODO: Do we need to ensure that ADD_COMPILED_HEADER() is added *after* all
flags/definitions are set, or does the ordering not matter?
Using GCR_Cmake macros from: https://github.com/Makman2/GCR_CMake
Currently loading the full 16x16 sprite sheet as the icon for each
dropdown entry. This is obviously wrong, but it works as a basic
test for now.
PIMGTYPE.cpp: New function PIMGTYPE_load_png_from_gresource(). This
function loads a PNG image from the glibresources and returns it as
PIMGTYPE. This does *not* use rp_image at all; it uses Cairo's
built-in PNG loading functionality.
TODO: GdkPixbuf version.
Nemo is yet another Nautilus fork. Nemo was initially forked from
Nautilus 3.x, so we don't have to worry about GTK+ 2.x versions.
Everything's basically the same as the Caja version, except the
files are named "nemo" instead of "caja".
When using thin libraries, this causes an error on Linux:
/usr/bin/objcopy:lib/libtinyxml2.a: sorry: copying thin archives is not currently supported: invalid operation
Also, changed the macro to a function.
TODO: Move the macro to SplitDebugInformation.cmake?
- Fixed the release date for v1.4.1. (2019/09/07, not 2019/09/02.)
- Removed corresponding notes from the v1.5 section.
- CMakeLists.txt: Bump to v1.4.1+.
S2TC was originally implemented because the S3TC patents were still in
effect. The patents expired in October 2017, which was *before* the
release of v1.2 (the first version with S3TC decoding), but I didn't want
to remove it so close to release.
Pretty much no one used the S2TC version, so it was just wasting space.
Code size reduction: (64-bit Gentoo Linux, gcc-9.1.0, release build)
text data bss dec hex filename
17058 9 0 17067 42ab ImageDecoder_S3TC.cpp.o [before]
13138 8 0 13146 335a ImageDecoder_S3TC.cpp.o [after]
-3920 -1 0 -3921 -f51 Difference
Caja is a fork of Nautilus 2.x, so everything's basically the same
as the GNOME extension, but with a different prefix.
Note that as of MATE 1.18.0, GTK+ 3.x is used, not 2.x. We're only
supporting GTK+ 3.x for MATE Desktop.
N.B.: Caja is a fork of Nautilus *2.x*, not *3.x*. The extension
interface doesn't seem to have changed, though.
Since the only real changes are names, the mate extension is handled
similarly to xfce3. The subdirectory has a CMakeLists file and defines
an RP_UI_GTK3_MATE macro, but it references the files in the gnome
directory.
gnome: Define RP_UI_GTK3_GNOME to distinguish between the two.
RomDataView: MATE uses the same settings as GNOME.
NOTE: We can't set up the MATE Debian configuration right now, since
Ubuntu 16.04 has a GTK+ 2.x version of MATE. I might set up a separate
"later-debian" directory with the updated files, though.
TODO:
- Both GNOME and MATE use /usr/share/thumbnailers, so the thumbnailer
file needs to be moved to a common package.
- Caja has an "About Extension" button. Implement this.
- Check Nautilus and other file browsers?
- Make sure all relevant MIME types are added to the XDG service files.
Caja *requires* the proper MIME types to be added, or else it won't
thumbnail the files.
* GameCube: Fixed a crash when downloading external images for Disc 2
from multi-disc games. Thanks to @Nomelas for reporting this bug.
Conflicts:
CMakeLists.txt
NEWS.md
* Linux: Fixed a crash on GNOME and XFCE when using Ubuntu 16.04.
IFUNC was not being disabled on gcc5 in the GTK+ directory.
* XFCE: The Specialized Thumbnailer file has a MimeTypes key, not MimeType.
Conflicts:
CMakeLists.txt
NEWS.md
* Windows: Fixed a bug that caused Explorer to crash if a supported file had
an internal image whose width was not a multiple of 8.
Conflicts:
CMakeLists.txt
NEWS.md
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.
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
If no UI frontends are being built, and CLI is disabled, the build
process will stop immediately, since there's nothing to do.
TODO: Allow test-only builds with no frontends?
For some reason, CMake in a new directory was complaining about a conflict
in the KDE5 directory, even though we tell KDE5 to skip uninstall targets.
It might be caused by the 5.41 frameworks update.
Moving the uninstall target before adding any subdirectories fixes this.
Tested on Linux. Not tested on Windows, but should work.
TODO: Still need to build gettext on Windows. Probably won't include
it as extlib, since it's a large package.
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)
The 32-bit version is moved to the root directory.
The 64-bit version is still kept in the amd64/ directory
for reference purposes.
Removed install.cmd and uninstall.cmd.
CMakeLists.txt: Use the top-level CMake directories.
cmake/platform/win32*.cmake: Define the Windows SDK version in
win32.cmake. Use the same version (Windows XP) regardless of
the target operating system in order to keep everything consistent.
[libpng] CMakeLists.txt: Fix MSVC debug paths for png_static.
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?
[extlib] CMakeLists.txt: Remove SET_MSVC_DEBUG_PATH() from the
SET_EXTLIB_PROPERTIES() macro.
[minizip] Removed EXCLUDE_FROM_ALL, since this is handled by the
extlib/CMakeLists.txt file.
NOTE: We can't move DO_SPLIT_DEBUG() out of the individual extlib
directories, since CMake complains if we attempt to use it on targets
created in a different directory.
I'll eventually make them delayload so they won't be loaded unless they're
actually needed.
Rearranged the build directory layout such that all binaries are located
in the top-level bin/ directory. This is needed in order for the test
suites to work, since they might depend on zlib and/or libpng.
NOTE: We have to use CACHE INTERNAL; otherwise, the KDE5 build ignores
the directory options. (Maybe this is why the KDE4 build always used
this directory layout in the first place?)
NOTE 2: On Windows, DLLs are copied to ${CMAKE_RUNTIME_OUTPUT_DIRECTORY},
whereas on Linux, SOs are copied to ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}.
Test images are now copied using a custom command, since the output
directory isn't easily determined at generate time. (It could be
the same as ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}, but msbuild uses
configuration-specific subdirectories.
TODO: Keep test images in a subdirectory. This will need adjustments in
the test suites to look in img/ first, then the current directory.
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: Run git_version.sh. This requires a POSIX shell and
git, and both must be present in PATH. If the script can't be run,
a dummy git.h will be generated in the top-level binary directory.
libromdata, win32: Added the top-level binary directory to the
private include directory list.
[win32] resource.rc: #include "libromdata/git.h"
Removed the version string from FileDescription, since it's redundant,
and it gets cut off on Windows 7.
TODO: The git version gets cut off on Windows 7, since it uses a
ListView instead of separate ListBox and Edit controls that were
used on Windows XP.
I thought I committed this before, but apparently I didn't.
This should have been committed in commit 2013307dab.
(Initial CPack setup for Windows (and some Linux changes).)
This fixes#7.
Five days of work, two encryption libraries, and a ton of custom formats,
all for a single field in the GameCube properties page. \o/
[libromdata/tests] CMakeLists.txt: Change ${GTEST_LIBRARY} to gtest.
This was done upstream, but AesCipherTest was still using the variable,
which no longer exists.
Conflicts:
src/libromdata/GameCube.cpp
src/libromdata/tests/CMakeLists.txt
libromdata/tests/CMakeLists.txt:
- Link to gtest directly instead of ${GTEST_LIBRARY}.
- Removed INCLUDE_DIRECTORIES() for googletest, since it's added to
TARGET_INCLUDE_DIRECTORIES() by googletest's CMakeLists.txt.
extlib/googletest/googletest/CMakeLists.txt:
- Uncommented gtest_hide_internal_symbols.
Removed cmake/gtest.cmake, since it doesn't have anything useful other
than INCLUDE(CTest), which is now present in the top-level CMakeLists.txt.
FIXME: Add support for the older nettle-2.x API, since Ubuntu 14.04
still has nettle-2.7.1.
cmake/modules/FindNettle.cmake: CMake module to find Nettle.
Reference: 9fe71b1d77/cmake/FindNettle.cmake
FIXME: If ENABLE_DECRYPTION is enabled, and Nettle can't be found,
the build will fail. Maybe show a message advising the user to
set -DENABLE_DECRYPTION=0?
This fixes issue #2.
In addition to reworking RpImage to use libpng and/or GDI+ directly,
this branch adds AppVeyor support for Windows CI. This required
fixing the build system to work with CMake's Visual Studio project
generator, which uses msbuild instead of nmake.
Conflicts:
.travis.yml
CMakeLists.txt
With nmake, CMake's default /SUBSYSTEM is added after our linker flags.
With msbuild, it's added before, which caused console programs like
RpImageLoaderTest to be linked as /SUBSYSTEM:WINDOWS, which failed
due to no WinMain() function.
AppVeyor, a Windows-based CI service, mostly (only?) works with
msbuild instead of nmake, so I need to get everything working.
TODO: /MANIFEST:NO is causing problems with programs that don't have
a manifest resource (RpImageLoaderTest), and RC isn't accepting the
-nologo option for some reason.
Notable changes:
- win32-msvc.cmake: Set RP_LINKER_FLAGS_${_subsystem}_EXE. This variable
is used by a new function to add to target-specific LINK_FLAGS.
- platform.cmake: New function SET_WINDOWS_SUBSYSTEM. This adds the
relevant linker flags. Note that it's only used for MSVC.
- Added SET_WINDOWS_SUBSYSTEM() to all EXE and DLL projects. Note that
the WIN32 flag is not available in ADD_LIBRARY(), so we're not setting
it for the Win32 rom-properties.dll.
- [win32] Append to the target LINK_FLAGS instead of resetting it.
Otherwise, we lose the /SUBSYSTEM flag.
Google Test will be used for implementing unit tests. The first set of
unit tests will be for testing RpPng with various PNG image formats.
The Google Test code is currently identical to the release archive,
except for the removal of .travis.yml and appveyor.xml.
CMakeLists.txt: Added CTest support. (see cmake/gtest.cmake)
extlibs/CMakeLists.txt: Only build googletest libraries if testing is
enabled and some project depends on them.
Removed the manual CFLAG testing from platform/gcc.cmake.
Other required changes:
- Removed CMAKE_MINIMUM_REQUIRED() from everything except the
top-level CMakeLists.txt. This interfered with setting the
CMake policy, since each invocation reset the policies to
match the specified minimum version.
- Added NO_POLICY_SCOPE to the cmake/platform.cmake include
in order to allow policy changes within platform.cmake to
propagate to the rest of the project.
On my ThinkPad T60p, it's defaulting to Release. On a Kubuntu 16.04 VM,
it was defaulting to "none", so it didn't add debug flags, and it didn't
add release flags, either.
TODO: Switch the default to Release later?
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.
Some stuff was stripped out, including support for ANSI Windows.
The minimum version I'm officially going to support once I add
Windows support is XP, though 2000 might "just work".
The initial version adds a blank "ROM Properties" tab to the
file properties dialog in KDE4.
NOTE: KDE4 on my system doesn't seem to look in /usr/local, so the
plugin must be installed in /usr in order to work.