Newer compilers usually add more warnings, so having -Werror by default
will most likely result in a compile error when new compiler versions
are released.
MSVC: Remove "-D_SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING". This is no
longer relevant, since we don't support anything older than MSVC 2015.
Currently used as a header-only build. Will eventually be changed to
build a DLL for Windows and Mac OS X.
Other changes needed to get the Windows version to build with libfmt:
Add #include <fmt/xchar.h> to some files for full wchar_t support
in libfmt. Otherwise, errors like this appear:
src\amiibo-data\amiiboc.cpp(175,8): error C2665: 'fmt::v11::print': no overloaded function could convert all the argument types
extlib\libfmt\include\fmt\base.h(2925,17): message : could be 'void fmt::v11::print<TCHAR*&>(FILE *,fmt::v11::fstring<TCHAR *&>,TCHAR *&)'
src\amiibo-data\amiiboc.cpp(175,8): message : 'void fmt::v11::print<TCHAR*&>(FILE *,fmt::v11::fstring<TCHAR *&>,TCHAR *&)': cannot convert argument 2 from 'wmain::<lambda_1>::()::FMT_COMPILE_STRING' to 'fmt::v11::fstring<TCHAR *&>'
src\amiibo-data\amiiboc.cpp(175,22): message : No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
extlib\libfmt\include\fmt\base.h(2908,17): message : or 'void fmt::v11::print<wmain::<lambda_1>::()::FMT_COMPILE_STRING,TCHAR*&>(fmt::v11::fstring<wmain::<lambda_1>::()::FMT_COMPILE_STRING,TCHAR *&>,wmain::<lambda_1>::()::FMT_COMPILE_STRING &&,TCHAR *&)'
src\amiibo-data\amiiboc.cpp(175,8): message : 'void fmt::v11::print<wmain::<lambda_1>::()::FMT_COMPILE_STRING,TCHAR*&>(fmt::v11::fstring<wmain::<lambda_1>::()::FMT_COMPILE_STRING,TCHAR *&>,wmain::<lambda_1>::()::FMT_COMPILE_STRING &&,TCHAR *&)': cannot convert argument 1 from 'FILE *' to 'fmt::v11::fstring<wmain::<lambda_1>::()::FMT_COMPILE_STRING,TCHAR *&>'
src\amiibo-data\amiiboc.cpp(175,14): message : No constructor could take the source type, or constructor overload resolution was ambiguous
src\amiibo-data\amiiboc.cpp(175,8): message : while trying to match the argument list '(FILE *, wmain::<lambda_1>::()::FMT_COMPILE_STRING, TCHAR *)' [build.vc17_64\src\amiibo-data\amiiboc.vcxproj]
Files modified for xchar.h:
- amiibo-data/amiiboc.cpp
- libromdata/stdafx.h (needed by WiiUPackage)
- libromdata/tests/RomHeaderTest.cpp
NOTE: Only included on Windows. xchar.h was added in libfmt-8.0.0,
which was first added (in Ubuntu LTS releases) in Ubuntu 20.04.
It's not needed on Linux, anyway.
New option USE_INTERNAL_FMT to force the use of the internal copy of
libfmt on Linux, for testing purposes. (...and also for Ubuntu 16.04)
- TODO: Maybe use it on 18.04, etc. for improved performance?
If OFF, this disables rp-download and all associated downloading code
in the GTK and KDE UI frontends (e.g. Update Checker and ProxyForUrl),
and disables ExecRpDownload in libcachemanager.
NOTE: The KF5 and KF6 ThumbnailCreator plugins definitely needed the
NetworkManaer D-Bus interface for isMetered(), but it wasn't linked
in before. This didn't seem to cause a problem, but with the adjustments
for ENABLE_NETWORKING, it's now causing a linker error. Add the
generated D-Bus interface source to the ThumbnailCreator plugins
to fix this.
TODO:
- Don't generate or use the NetworkManager D-Bus interface in
no-network builds.
- Windows UI frontend changes.
- Disable the relevant configuration boxes in rp-config (but don't
remove them entirely).
- Remove functions from the seccomp() whitelists that are no longer
needed because we're not executing rp-download.
They haven't been experimental for quite a while.
Note that the GTK 4.x property model has far less functionality than
the property page, but that's a Nautilus limitation, so there's not
much that I can do about it.
Specify -DENABLE_NIXOS=ON to enable the workarounds.
- Using CMAKE_INSTALL_PREFIX in paths causes a double-path issue.
This only seems to happen on NixOS.
- std::locale's constructor ends up calling getdents64(), so this
syscall needs to be whitelisted. Only on NixOS though, since other
Linux distros don't need it...
Fixes#406: Building on NixOS returns "invalid system call"
Reported by @Whovian9369.
It doesn't link yet, but it compiles and it's almost there.
Changes:
- Use CPU architecture "wasm32".
- Disable split debug information.
- Disable libromdata.so.
- Don't build rp-download right now instead of failing with a fatal error.
FIXME: rpcli.js is failing to link:
[parse exception: attempted pop from empty stack / beyond block start boundary at 1177738 (at 0:1177738)]
Fatal: error in parsing input
This broke the GitHub CodeQL and CodeCov.io builds because we're not
installing GTK+ 2.x in those builds, and BUILD_GTK2 isn't a cached
variable; it's a "regular" variable.
The newly-added GTK tests expected BUILD_GTK2 to be unset if GTK2 wasn't
actually found, but this wasn't the case, so it failed to find the
GTK2::gtk target.
[res] Also check for BUILD_GTK4 in addition to BUILD_XFCE and BUILD_GTK3.
Not likely to have caused any problems yet, since no one has a "pure"
GTK4 system yet.
BUILD_XFCE is an option; BUILD_GTK2 is not.
We should probably get rid of BUILD_GTK2 entirely, since I'm not planning
on adding support for GNOME 2 Nautilus anytime soon.
Also, don't attempt to build rom-properties-glib if none of the GTK UI
frontends are being built.
Fixes CMake issues when building on KDE Neon. (KF6 testing)
Windows 2000 support only partially worked in rp-config. The actual
shell extension component didn't work.
Support for ANSI Windows was mostly just compile-tested, and it was
becoming a burden to support something almost no one will use.
Removed most `#ifdef UNICODE` and `#ifdef _UNICODE` branches in
favor of using the Unicode path exclusively.
Removed oldwincompat, which was an attempt to get things working
properly on Windows 9x and 2000 with the MSVC 2010 runtime.
rom-properties doesn't compile with MSVC 2010 anymore, so this
probably wasn't very useful anyways.
Consolidated tstring macros in tcharx.h.
Removed GUID_fns.c since it was only useful in ANSI builds.
gcov uses getpid() in gcov_open() if GCOV_LOCKED is defined when
compiling gcc.
I'm not sure why this didn't cause any problems before...
[cmake] options.cmake: Define -DGCOV if building with coverage enabled.
This is used to determine if getpid() should be added to syscall
whitelists, assuming it hasn't been added already for other reasons.
Some distributions install documentation using distro-specific build
scripts, so add an option to allow our documentation install to be
disabled.
Specify -DINSTALL_DOC=OFF on the CMake command line.
- Split debug symbols doesn't work properly due to an issue with `strip`:
error: symbols referenced by indirect symbol table entries that can't be stripped in: [library]
- Add "arm64" for M1/M2 Macs.
- zstd: "-fdeclspec" is needed for Clang due to use of __declspec() even
on non-MS compilers or OSes. Note that we have to check for both
"Clang" and "AppleClang", since Apple uses its own customized version
of LLVM/clang.
- msvc.cmake: Make sure "Clang" is quoted when STREQUAL is used.
KF6 isn't out yet, so this is mostly just a compile test against
Qt 6.
Main changes:
- KeyStoreModel.hpp: #include "KeyStoreQt.hpp" instead of simply
forward-defining the class.
src/kde/kf6/rom-properties-kf6_autogen/A2AGDIRYKS/moc_KeyStoreModel.cpp:151:1: required from here
/usr/include/qt6/QtCore/qmetatype.h:858:23: error: invalid application of ‘sizeof’ to incomplete type ‘KeyStoreQt’
858 | static_assert(sizeof(T), "Type argument of Q_PROPERTY or Q_DECLARE_METATYPE(T*) must be fully defined");
| ^~~~~~~~~
- stub-export.cpp: Don't set Qt::AA_EnableHighDpiScaling on Qt 6. It's
always enabled on Qt 6 and this constant is now deprecated.
- AchievementsItemDelegate: QVariant::canConvert(int) is deprecated.
The recommended replacement is QVariant::canConvert(QMetaType), which
is Qt 6 only, or alternatively, QVariant::canConvert<T>, which is
available in Qt 4 and Qt 5.
The only actual compile error I've hit so far is with KFileMetaData
because it uses QMap::insertMulti(), which was removed from Qt 6.
Among other things, it supports handling multiple targets in a single
subdirectory, which will be needed for the "-dll" targets when converting
libromdata to a DLL on Windows.
NOTE: Requires CMake 3.16. PCH will be disabled if using an earlier
version.
Other changes:
- TARGET_PRECOMPILED_HEADER() ignores force-include flags, so add
config.libc.h and c++11-compat.h to the header list to ensure that
stdafx.h has access to them.
- Removed all stdafx.c and stdafx.cpp files. CMake generates its own.
I don't have any GTK4 file browsers to test this, but it compiles.
GTK4 is disabled by default due to this.
GTK4 doesn't support Cairo, so we're falling back to GdkPixbuf for
now. There *is* a new GdkTexture class, which implements most of
GdkPixbuf's functionality without the overhead as Cairo.
Missing functionality:
- Drag & drop needs to be completely rewritten.
- gtk_dialog_run() doesn't exist anymore, so file dialogs need to be
reworked to use a signal handler. This will work in older versions
of GTK, too.
- Also: Handle URIs properly?
- GtkHeaderBar: GTK4 no longer has GtkButtonBox. Figure out "secondary"
there.
- GTK4 equivalent of gtk_container_set_border_width().
The Nautilus frontend is enabled, but Thunar is not, since that requires
more changes that can't easily be verified at the moment.
I chose MiniLZO instead of regular LZO because we only need to be able to
decompress LZO1X blocks.
[libromdata] CisoPspReader: Don't call lzo_init() if this JISO isn't
actually using LZO. Otherwise, if the DLL is missing on Windows, the
program will crash.
It has a unique header, but the index entries table is similar to the
other formats. It does *not* set the high bit to indicate NC; instead,
it uses the same method as CISOv2, where the compressed block size
matches the uncompressed block size.
Compression algorithm is lzo1x.
TODO:
- JISO supports NC areas. Figure this part out.
- Add LZO to extlib.
ZISO is basically CISO v0/v1 but with LZ4 instead of zlib.
CISO v2 can use either zlib or LZ4 on a per-block basis.
[cmake] Added LZ4 checks.
- TODO: Add an internal copy of LZ4.
MiniZip 2.10.0 added support for zstd as a compression method, so we
should support it.
Note that a system version of zstd is preferred on Linux systems.
Enabled the MiniZip test tools for manual builds only. Info-ZIP hasn't
been updated in a while, so I'm going to use the MiniZip test tools to
compress ZIP archives using zstd.
Enabled MiniZip compression in order to compress stuff using the minizip
test program.
mz_strm_zstd.c: FIXME: Compression level doesn't work. Hard-coded the
maximum compression level for now.
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...
Same sort of dynamic loading as the Nautilus version, but with separate
plugin initialization code.
thunarx-mini.h: Definitions of various ThunarX structs, since we no longer
use the system-wide version.
Use G_DEFINE_DYNAMIC_TYPE_EXTENDED() instead of the ThunarX version.
Note that for RpThunarProvider, we need to use G_IMPLEMENT_INTERFACE_DYNAMIC().
G_IMPLEMENT_INTERFACE() crashes at runtime, even though the ThunarX
version worked fine. (Presumably, the ThunarX version was actually the
same as the glib DYNAMIC version...)
Added dummy class_finalize() functions, which are needed by the
G_DEFINE_DYNAMIC_TYPE_EXTENDED() macro.
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.
The os-secure files from rpcli and rp-download have been consolidated
into a single library. seccomp-debug.h has also been moved here and
converted into a .c file with a public interface in the .h file.
rpcli and rp-download can now call rp_secure_enable() with an OS-specific
parameter. A struct is provided that makes the parameter type-safe.
NOTE: syscall_wl (seccomp syscall whitelist) can't be NULL-terminated,
since syscall 0 is valid on most architectures. On x86, it's read().
Hence, we're specifying an explicit array size.
Also moved the Win32 security options and integrity level files here.
Updated Win32 code for this change.
integrity_level.c: Removed the pthread_once() usage for the Windows Vista
check, since we're not linking to librpthreads. The worst that could happen
is both threads set isVista to the same value.
[cmake] Adjusted security options:
- USE_SECCOMP: Moved from cmake/options.cmake to librpsecure/CMakeLists.txt.
- ENABLE_SECCOMP_DEBUG: Added to librpsecure/CMakeLists.txt. Replaces
the hard-coded SECCOMP_DEBUG in seccomp-debug.h.
[svrplus] Removed the libwin32common dependency. It was only used for the
Windows security options, and that's now handled by librpsecure.
[tests] Updated gtest_init.cpp to use librpsecure. Link all test suites to
librpsecure instead of libwin32common.
- TODO: seccomp() on Linux, pledge() on OpenBSD.
Related bug report for LibreOffice:
https://bugs.documentfoundation.org/show_bug.cgi?id=125922
NOTE: dll-search.c still checks for "KDE5" for compatibility.
NOTE 2 We did NOT include "KDE5" in the forwarding plugins for
compatibility because they shouldn't be mixed-and-matched with
rom-properties versions.
Enabled by default on MSVC only.
travis-ci still uses Ubuntu 14.04, and PrecompiledHeader.cmake doesn't
seem to pass the `-std=gnu++11` option properly, so gcc-4.8 ends up
failing.
TODO: Use cmake-3.16.0's built-in PCH support if available.
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".
It seems that the R and B channels are backwards, so we'll need to fix
that next. Other than that, both 2bpp and 4bpp decoding seems to work.
(A lot better than my terrible attempt, at least.)
[cmake] options.cmake: Added an option for PVRTC. The code is licensed
under the MIT license, but we might as well provide an option for it
because it's third-party code instead of my own code.
TODO:
- Fix R/B channel ordering.
- PVRTC-II decoding?
- Add PVRTC decoding to KTX and DDS.
This allows us to eliminate the OpenGL dependency, which lets us get rid
of the CMake option ENABLE_GL.
Removed all ENABLE_GL checks.
Removed #include "config.librptexture.h" where it's no longer needed.
JPEG decoding isn't as strictly checked as PNG decoding, and we don't
need specific JPEG writing functionality e.g. for APNGs and tEXt chunks,
so we can drop the libjpeg-turbo requirement on Windows.
This reduces the Windows distribution by around 1 MB uncompressed.
(521 KB for the 32-bit jpeg62.dll; 535 KB for the 64-bit jpeg32.dll.)
Related: Commit f548b5372d
(Removed the GDI+ PNG loader; renamed RpPng_libpng.cpp to RpPng.cpp.)
[librptexture] rp_image_backend: Allow width and height to be 0 if the
specified format is rp_image::FORMAT_NONE. This is done by
RpGdiplusBackend when constructing a backend using an existing
Gdiplus::Bitmap.
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
This fixes a ton of instances of the following warning, introduced in
cmake-3.14.0:
CMake Warning (dev) at cmake/libs/CheckGettext.cmake:30 (SET):
implicitly converting 'msgfmt executable.' to 'STRING' type.
Call Stack (most recent call first):
src/libi18n/CMakeLists.txt:9 (CHECK_GETTEXT)
This warning is for project developers. Use -Wno-dev to suppress it.
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.
This is a stripped-down version of libmspack containing only the necessary
functionality for Xbox 360 executables.
Xenia commit: e706cf0d5413c31b7e80a50411cc88cc7c71af30
License: LGPLv2.1
config.h.in: Modified for cmake; removed unnecessary checks.
debian/copyright: Added copyright information.
cmake/options.cmake: Added an ENABLE_LIBMSPACK option. (default is ON)
This will be used to decompress Atari ST SNDH files.
Note that unice68 is GPLv3, so there's a compile-time option to
disable it.
TODO: Make it a DLL/SO instead and use dlopen().