RP_ExtractImage::Load() needs to return E_FAIL, not S_OK, if the directory
is unsupported. Otherwise, Windows will show a regular directory icon,
without thumbnailing the directory's contents.
Fixes#427: No Thumbnails after install
Reported by @Conan179.
- Set QT_NO_CREATE_VERSIONLESS_TARGETS to disable Qt::Core. Otherwise,
CMake ends up trying to create Qt::Core twice, even when building for
KF6 only and not KF5+KF6:
CMake Error at /usr/lib/x86_64-linux-gnu/cmake/Qt6Core/Qt6CoreVersionlessTargets.cmake:42 (message):
Some (but not all) targets in this export set were already defined.
Targets Defined: Qt::Core
Targets not yet defined: Qt::CorePrivate
Call Stack (most recent call first):
/usr/lib/x86_64-linux-gnu/cmake/Qt6Core/Qt6CoreConfig.cmake:68 (include)
/usr/lib/x86_64-linux-gnu/cmake/Qt6/Qt6Config.cmake:174 (find_package)
cmake/libs/RP_FindQt6andKF6.cmake:34 (FIND_PACKAGE)
src/kde/kf6/CMakeLists.txt:6 (FIND_QT6_AND_KF6)
- Don't specify the minimum KF6 version, because that's breaking for
some reason.
-- Could NOT find KF65.248.0 (missing: KF65.248.0_DIR)
-- Could NOT find KF65.248.0: found neither KF65.248.0Config.cmake nor kf65.248.0-config.cmake
CMake Error at /usr/share/cmake-3.30/Modules/FindPackageHandleStandardArgs.cmake:233 (message):
Could NOT find KF6 (missing: 5.248.0) (found version "6.6.0")
Call Stack (most recent call first):
/usr/share/cmake-3.30/Modules/FindPackageHandleStandardArgs.cmake:603 (_FPHSA_FAILURE_MESSAGE)
/usr/share/ECM/find-modules/FindKF6.cmake:93 (find_package_handle_standard_args)
cmake/libs/RP_FindQt6andKF6.cmake:78 (FIND_PACKAGE)
src/kde/kf6/CMakeLists.txt:6 (FIND_QT6_AND_KF6)
(cherry picked from commit cb507652cb)
Conflicts:
debian/changelog
On armhf (glibc-2.39), amiiboc ends up calling statx() indirectly through
the fgets() function:
Program received signal SIGSYS, Bad system call.
__libc_do_syscall () at ../sysdeps/unix/sysv/linux/arm/libc-do-syscall.S:47
warning: 47 ../sysdeps/unix/sysv/linux/arm/libc-do-syscall.S: No such file or directory
(gdb) bt
=0 __libc_do_syscall () at ../sysdeps/unix/sysv/linux/arm/libc-do-syscall.S:47
=1 0xb6d2ea0a in fstatat64_time64_statx (flag=4096, buf=0xbefff690,
file=0xb6d91c18 "", fd=3) at ../sysdeps/unix/sysv/linux/fstatat64.c:50
=2 __GI___fstatat64_time64 (fd=3, file=0xb6d91c18 "", buf=0xbefff690,
flag=4096) at ../sysdeps/unix/sysv/linux/fstatat64.c:150
=3 0xb6cdaae4 in __GI__IO_file_doallocate (fp=0x414f60) at libioP.h:1030
=4 0xb6ce5518 in __GI__IO_doallocbuf (fp=0x414f60) at libioP.h:1030
=5 __GI__IO_doallocbuf (fp=fp@entry=0x414f60) at genops.c:342
=6 0xb6ce3e86 in _IO_new_file_underflow (fp=0x414f60) at fileops.c:486
=7 0xb6ce557a in __GI__IO_default_uflow (fp=0x414f60) at libioP.h:1030
=8 0xb6cdc03e in __GI__IO_getline_info (fp=fp@entry=0x414f60,
buf=buf@entry=0xbefff804 "ƀ㶫7\357Z\234\370\377\276\004\323\375\266\330\354\377\266\001", n=n@entry=255, delim=delim@entry=10,
extract_delim=extract_delim@entry=1, eof=eof@entry=0x0) at iogetline.c:60
=9 0xb6cdc0c8 in __GI__IO_getline (fp=fp@entry=0x414f60,
buf=buf@entry=0xbefff804 "ƀ㶫7\357Z\234\370\377\276\004\323\375\266\330\354\377\266\001", n=n@entry=255, delim=delim@entry=10,
extract_delim=extract_delim@entry=1) at iogetline.c:34
=10 0xb6cdb288 in _IO_fgets (
buf=buf@entry=0xbefff804 "ƀ㶫7\357Z\234\370\377\276\004\323\375\266\330\354\377\266\001", n=n@entry=256, fp=fp@entry=0x414f60) at iofgets.c:53
=11 0x004019e8 in fgets (__stream=0x414f60, __n=256,
__s=0xbefff804 "ƀ㶫7\357Z\234\370\377\276\004\323\375\266\330\354\377\266\001") at /usr/include/arm-linux-gnueabihf/bits/stdio2.h:200
=12 main (argc=<optimized out>, argv=0xbefffaa4)
at rom-properties/src/amiibo-data/amiiboc.cpp:204
(cherry picked from commit b18306df1c)
Conflicts:
debian/changelog
Tests failing:
- ImageDecoderTest
- RomHeaderTest
- RomDataFormatTest_kf5
On armhf, RomDataFormatTest doesn't even compile due to a
truncation error:
/<<PKGBUILDDIR>>/src/kde/tests/RomDataFormatTest.cpp: In member function ‘virtual void LibRomData::Tests::RomDataFormatTest_formatDateTime_0_invalid_Test::TestBody()’:
/<<PKGBUILDDIR>>/src/kde/tests/RomDataFormatTest.cpp:72:3: error: narrowing conversion of ‘2147483648u’ from ‘unsigned int’ to ‘time_t {aka long int}’ inside { } [-Wnarrowing]
}};
^
/<<PKGBUILDDIR>>/src/kde/tests/RomDataFormatTest.cpp: In member function ‘virtual void LibRomData::Tests::RomDataFormatTest_formatDateTime_1_dateOnly_Test::TestBody()’:
/<<PKGBUILDDIR>>/src/kde/tests/RomDataFormatTest.cpp:101:3: error: narrowing conversion of ‘2147483648u’ from ‘unsigned int’ to ‘time_t {aka long int}’ inside { } [-Wnarrowing]
}};
^
/<<PKGBUILDDIR>>/src/kde/tests/RomDataFormatTest.cpp: In member function ‘virtual void LibRomData::Tests::RomDataFormatTest_formatDateTime_2_timeOnly_Test::TestBody()’:
/<<PKGBUILDDIR>>/src/kde/tests/RomDataFormatTest.cpp:125:3: error: narrowing conversion of ‘2147483648u’ from ‘unsigned int’ to ‘time_t {aka long int}’ inside { } [-Wnarrowing]
}};
^
/<<PKGBUILDDIR>>/src/kde/tests/RomDataFormatTest.cpp: In member function ‘virtual void LibRomData::Tests::RomDataFormatTest_formatDateTime_3_dateAndTime_Test::TestBody()’:
/<<PKGBUILDDIR>>/src/kde/tests/RomDataFormatTest.cpp:150:3: error: narrowing conversion of ‘2147483648u’ from ‘unsigned int’ to ‘time_t {aka long int}’ inside { } [-Wnarrowing]
}};
^
/<<PKGBUILDDIR>>/src/kde/tests/RomDataFormatTest.cpp: In member function ‘virtual void LibRomData::Tests::RomDataFormatTest_formatDateTime_4_invalid_Test::TestBody()’:
/<<PKGBUILDDIR>>/src/kde/tests/RomDataFormatTest.cpp:177:3: error: narrowing conversion of ‘2147483648u’ from ‘unsigned int’ to ‘time_t {aka long int}’ inside { } [-Wnarrowing]
}};
^
/<<PKGBUILDDIR>>/src/kde/tests/RomDataFormatTest.cpp: In member function ‘virtual void LibRomData::Tests::RomDataFormatTest_formatDateTime_5_dateOnly_Test::TestBody()’:
/<<PKGBUILDDIR>>/src/kde/tests/RomDataFormatTest.cpp:207:3: error: narrowing conversion of ‘2147483648u’ from ‘unsigned int’ to ‘time_t {aka long int}’ inside { } [-Wnarrowing]
}};
^
/<<PKGBUILDDIR>>/src/kde/tests/RomDataFormatTest.cpp: In member function ‘virtual void LibRomData::Tests::RomDataFormatTest_formatDateTime_6_timeOnly_noYear_Test::TestBody()’:
/<<PKGBUILDDIR>>/src/kde/tests/RomDataFormatTest.cpp:232:3: error: narrowing conversion of ‘2147483648u’ from ‘unsigned int’ to ‘time_t {aka long int}’ inside { } [-Wnarrowing]
}};
^
/<<PKGBUILDDIR>>/src/kde/tests/RomDataFormatTest.cpp: In member function ‘virtual void LibRomData::Tests::RomDataFormatTest_formatDateTime_7_dateAndTime_noYear_Test::TestBody()’:
/<<PKGBUILDDIR>>/src/kde/tests/RomDataFormatTest.cpp:258:3: error: narrowing conversion of ‘2147483648u’ from ‘unsigned int’ to ‘time_t {aka long int}’ inside { } [-Wnarrowing]
}};
^
ATTR_TPRINTF() was added in commit 0096157cf8
([rp-download] rp-download.cpp: Simplify the printf attribute handling.)
but functions were still using ATTR_PRINTF.
Also, define ATTR_TPRINTF() as nothing if compiling for Win32 with
Unicode, so those builds don't fail with weird errors.
OpenNcThemeData is WINAPI, and gcc doesn't support using non-cdecl
calling conventions on lambda functions.
Note that this only affects the 32-bit i386 Windows build.
src/libwin32darkmode/DarkMode.cpp: In function ‘void FixDarkScrollBar()’:
src/libwin32darkmode/DarkMode.cpp:112:57: error: invalid ‘static_cast’ from type ‘void*(HWND, LPCWSTR)’ {aka ‘void*(HWND__*, const wchar_t*)’} to type ‘fnOpenNcThemeData’ {aka ‘void* (__attribute__((stdcall)) *)(HWND__*, const wchar_t*)’}
112 | addr->u1.Function = reinterpret_cast<ULONG_PTR>(static_cast<fnOpenNcThemeData>(MyOpenThemeData));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Italian translation updates provided by MaRod92.
German translation updates provided by @xxmichibxx.
[win32] rp-it_IT.rc: Copy some translations from it.po.
Enable it for both debug and release if using 10.0 or later.
This fixes an issue when running package.cmd that caused
InitPropVariantFromUInt16() to not be detected correctly when using
the Windows 7 SDK. (/permissive- was only enabled for debug builds,
but MSVC builds are technically debug and release, so it got enabled
in the InitPropVariantFromUInt16() check.)
These errors occurred without this fix:
c:\program files (x86)\microsoft sdks\windows\v7.1a\include\objbase.h(239): error C2760: syntax error: unexpected token 'identifier', expected 'type specifier'
c:\program files (x86)\microsoft sdks\windows\v7.1a\include\gdiplusheaders.h(891): error C4596: 'EmfToWmfBits': illegal qualified name in member declaration
c:\program files (x86)\microsoft sdks\windows\v7.1a\include\gdiplusstringformat.h(220): error C4596: 'GetTrimming': illegal qualified name in member declaration
[librpbase] RomData: Add an "isPAL" flag.
UI frontends: Set the Language Combo Box's forcePAL flag to match the
RomData's isPAL flag.
Updated a number of RomData subclasses to set isPAL if it's known.
TODO: Set isPAL in:
- WiiUPackage
- WiiWAD
- Nintendo3DS
Other changes:
[libromdata] GameCubeBNR: Set d->isValid to false if comments could not
be read.
Without this renaming, these binaries are built automatically, even
though we don't need them most of the time.
With this renaming, they'll only be built if the user explicitly
specifies that they should be built.
This regressed when updating from minizip-ng v4.0.6 to v4.0.7 in
commit 3c90ea3d26.
DDS_Blender/tex_cmp_bc1.dds is 368 bytes. One of the magic numbers is
located at 0x304 (772), so attempting to read this ended up reading
unintialized memory in the header buffer.
Fix this by checking that the magic number address is in range of the
header data that was read.
Found using valgrind-3.24.0:
[ RUN ] DDS_Blender/ImageDecoderTest.decodeTest/DDS_Blender_tex_cmp_bc1_dds_gz_Image
==2140873== Conditional jump or move depends on uninitialised value(s)
==2140873== at 0x49A2A2B: LibRomData::RomDataFactory::create(std::shared_ptr<LibRpFile::IRpFile> const&, unsigned int) (RomDataFactory.cpp:770)
==2140873== by 0x174D0F: LibRomData::Tests::ImageDecoderTest::decodeTest_internal() (ImageDecoderTest.cpp:419)
==2140873== by 0x175B4E: LibRomData::Tests::ImageDecoderTest_decodeTest_Test::TestBody() (ImageDecoderTest.cpp:482)
==2140873== by 0x1CA0B2: void testing::internal::HandleSehExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) (gtest.cc:2599)
==2140873== by 0x1D39A0: void testing::internal::HandleExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) (gtest.cc:2635)
==2140873== by 0x1C2065: testing::Test::Run() (gtest.cc:2674)
==2140873== by 0x1C2296: testing::TestInfo::Run() (gtest.cc:2853)
==2140873== by 0x1C2492: testing::TestSuite::Run() (gtest.cc:3012)
==2140873== by 0x1C6DD4: testing::internal::UnitTestImpl::RunAllTests() (gtest.cc:5870)
==2140873== by 0x1CB44A: bool testing::internal::HandleSehExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*) (gtest.cc:2599)
==2140873== by 0x1D3F51: bool testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*) (gtest.cc:2635)
==2140873== by 0x1C20C3: testing::UnitTest::Run() (gtest.cc:5444)
==2140873==
[ OK ] DDS_Blender/ImageDecoderTest.decodeTest/DDS_Blender_tex_cmp_bc1_dds_gz_Image (108 ms)
Otherwise, the non-libromdata.so build fails:
FAILED: lib/libextract-rom-properties.so
rpfile.dir/FileSystem_common.cpp.o: in function `LibRpFile::FileSystem::initConfigDirectories()':
librpfile/FileSystem_common.cpp:47:(.text+0x2d6): undefined reference to `LibUnixCommon::getConfigDirectory[abi:cxx11]()'
cachecommon.dir/CacheDir.cpp.o: in function `LibCacheCommon::initCacheDirectory()':
libcachecommon/CacheDir.cpp:43:(.text+0x240): undefined reference to `LibUnixCommon::getCacheDirectory[abi:cxx11]()'
There's currently only 79 properties defined, so `int` wastes space.
This reduces the size of RomMetaDataPrivate from 344 bytes to 104 bytes
(on amd64).
TODO: Don't use an std::array<> for map_metaData?
Most RomData subclasses support metadata now, so keeping it as a pointer
to reduce memory usage doesn't make sense anymore.
Code size difference: (64-bit Gentoo Linux, gcc-14.2.0_p4, release build, no LTO)
text data bss dec hex filename
2288237 84088 696 2373021 24359d libromdata.so.5 [before]
2283405 84088 696 2368189 2422bd libromdata.so.5 [after]
-4832 0 0 -4832 -12e0 Difference
Related changes:
Atari7800, CBMCart, ColecoVision, Intellivision, Sega8Bit:
- Now returns 0 instead of -ENOENT if no metadata was available.
GameBoyAdvance: 2 properties are returned, so increase the reservation.
PSP: Up to 4 properties are returned, so increase the reservation.
The extURLs() functions now check for d->isValid and then call
extURLs_int() to get the URLs using the id4.
For WiiU, the id4 is taken from d->discHeader.
For WiiUPackage, the id4 is taken from meta.xml.
Fixes a clang-tidy warning:
src/libromdata/Console/WiiUPackage.cpp:171:3: warning: do not declare C-style arrays, use std::array<> instead [modernize-avoid-c-arrays]
171 | uint8_t iv[16];
| ^
Also, use array::fill() instead of memset(), since array::fill() will
generate 128-bit SIMD code with most modern compilers. (memset() probably
would as well, if clearing the full 16 bytes instead of just 14...)
In theory, this should be the same as Wii U, but there are some eShop
titles that weren't released on disc, and some disc titles that weren't
released on eShop.
TODO: Maybe combine the two? Would require adding "icon" to the regular
Wii U class. At some point, I'll add ATFS disc image reading...
TODO: Adjust the Win32 config dialogs.
Was temporarily disabled for debugging purposes in
commit 4de3e72d6a.
([libromdata] WiiUPackagePrivate::addFields_System_XMLs(): Allow processing even if one or two XMLs are missing.)
The rearrangement was done to allow us to obtain caja/nemo-specific
function pointers. It also allows us to get rid of REGISTER_ACHDBUS().
Fixes a clang-tidy warning:
src/gtk/gtk4/NautilusPlugin.cpp:57:11: warning: function-like macro 'REGISTER_ACHDBUS' used; consider a 'constexpr' template function [cppcoreguidelines-macro-usage]
57 | # define REGISTER_ACHDBUS() AchGDBus::instance()
| ^
It's not needed now that a regular function is used for plugin
initialization. Instead, use the same pattern as ThunarPlugin.cpp.
Fixes a clang-tidy warning:
src/gtk/gtk3/NautilusPlugin.cpp:55:11: warning: function-like macro 'REGISTER_ACHDBUS' used; consider a 'constexpr' template function [cppcoreguidelines-macro-usage]
55 | # define REGISTER_ACHDBUS() AchGDBus::instance()
| ^
Need to add pFields_cend to where it's reverted, since the first loop
was *not* reverted.
This fixes a regression from commit 2d51365fc5.
([librpbase] RomFields, RomMetaData: Add begin()/end() aliases that return const_iterator.)
It has the same issue as the GTK version, requiring an iterator to
determine if it's at the end of the tab or not.
There's also iter_desc, which could have worked, but I accidentally
deleted the iter_desc definition.
TODO: Fix this.
This fixes a regression from commit 2d51365fc5.
([librpbase] RomFields, RomMetaData: Add begin()/end() aliases that return const_iterator.)
It works fine on gcc/clang, but MSVC is failing:
src\librpbase\tests\CBCReaderTest.cpp(379): error C2121: '#': invalid character: possibly the result of a macro expansion
src\librpbase\tests\CBCReaderTest.cpp(379): error C2146: syntax error: missing ')' before identifier 'ifdef'
src\librpbase\tests\CBCReaderTest.cpp(379): error C2838: 'ECB': illegal qualified name in member declaration
src\librpbase\tests\CBCReaderTest.cpp(379): error C2838: 'CBC': illegal qualified name in member declaration
src\librpbase\tests\CBCReaderTest.cpp(379): error C3536: 't': cannot be used before it is initialized
src\librpbase\tests\CBCReaderTest.cpp(379): error C3539: a template-argument cannot be a type that contains 'auto'
src\librpbase\tests\CBCReaderTest.cpp(379): error C2027: use of undefined type 'std::tuple_size<int>'
src\librpbase\tests\CBCReaderTest.cpp(371): note: see declaration of 'std::tuple_size<int>'
src\librpbase\tests\CBCReaderTest.cpp(379): error C2065: 'value': undeclared identifier