Commit Graph

31 Commits

Author SHA1 Message Date
David Korth
15fd12663c [doc/abi] Add romdata-6 ABI listings. 2025-04-19 22:03:47 -04:00
David Korth
2fde4ca142 [doc/abi] Add romdata-5 ABI listings. 2024-11-10 21:25:00 -05:00
David Korth
027211d11b [doc/abi] romdata-4.exports.amd64.Windows.msvc17.txt: Remove extraneous ')' characters from vftable entries. 2024-11-10 21:09:35 -05:00
David Korth
b1ab58640c [doc/abi] romdata-4.exports.i386.Windows.msvc17.txt: Remove trailing spaces.
UNDNAME sometimes adds trailing spaces for some reason.
2024-03-25 00:30:04 -04:00
David Korth
0fec7c65d6 [doc/abi] Add romdata-4 ABI listings.
I forgot to do this for the v2.3 release. Oh well.

Notable changes:

- Some "fake" symbols in the MinGW-w64 files are no longer added.
  I'm leaving them in the listings for romdata-3 and earlier, though.

- Lots of shared_ptr<> usage.

- More wchar_t* usage on Windows.
2024-03-03 17:24:57 -05:00
David Korth
6ac14168fa [doc/abi] Add romdata-3 ABI listings.
NOTE: vtable for RefBase is optimized out in Release builds, but not
Debug builds. As of romdata-3, I'm making sure that I use Release builds
to generate the ABI listings. Older ones may be re-generated later.
2023-07-01 13:30:22 -04:00
David Korth
a8ec607ddc [doc/abi] Use versioned subdirectories to reduce clutter. 2023-06-26 02:42:52 -04:00
David Korth
efbfb97b56 [doc/abi] romdata-2 ABI updates.
- Linux: Remove protected functions that are no longer exported.

- MSVC: Fix return types of imgBandwidth(Metered|Unmetered)().
2022-12-24 12:02:39 -05:00
David Korth
06657eff0e [doc/abi] romdata-2: Update ABI listing.
downloadHighResScans() -> imgBandwidth(Metered|Unmetered)()
2022-12-23 14:49:16 -05:00
David Korth
398fbe74b1 [doc/abi] Update the romdata-2 ABI files. 2022-10-24 23:08:03 -04:00
David Korth
f55617c5da Move RegKey from libwin32common to libwin32ui.
RegKey is only used by win32/ (Win32 UI frontend), so it doesn't need to
be in libwin32common, which results in it getting exported by
romdata-2.dll.

NOTE: In theory, we can remove the HINSTANCE parameter from
RegisterComObject() now, since RegKey is always statically-linked into
rom-properties.dll, but we're better off keeping it there.

[doc/abi] RegKey has been removed from the Windows version.
2022-09-28 19:06:39 -04:00
David Korth
ec74256b93 [doc/abi] Revert romdata-1 to v2.0; add romdata-2 for v2.1. 2022-09-28 19:03:12 -04:00
David Korth
66cabef45a [librpfile] MemFile: Export the entire class, not just the constructor.
Launchpad's Ubuntu 18.04 build (gcc-7) failed:

/tmp/cclqxa26.ltrans0.ltrans.o: In function `LibRpFile::MemFile::~MemFile()':
./build/src/librpbase/tests/./src/librpbase/tests/../../librpfile/MemFile.hpp:45: undefined reference to `vtable for LibRpFile::MemFile'
/tmp/cclqxa26.ltrans0.ltrans.o: In function `RefBase::unref()':
./build/src/librpbase/tests/./src/librpbase/tests/../../librpfile/MemFile.hpp:45: undefined reference to `vtable for LibRpFile::MemFile'
/tmp/cclqxa26.ltrans0.ltrans.o: In function `LibRpBase::Tests::RpPngFormatTest::TearDown()':
./build/src/librpbase/tests/./src/librpbase/tests/../../librpfile/MemFile.hpp:45: undefined reference to `vtable for LibRpFile::MemFile'
/tmp/cclqxa26.ltrans0.ltrans.o: In function `LibRpFile::MemFile::~MemFile()':
./build/src/librpbase/tests/./src/librpbase/tests/../../librpfile/MemFile.hpp:45: undefined reference to `vtable for LibRpFile::MemFile'
collect2: error: ld returned 1 exit status
src/librpbase/tests/CMakeFiles/RpPngFormatTest.dir/build.make:107: recipe for target 'bin/RpPngFormatTest' failed
make[3]: *** [bin/RpPngFormatTest] Error 1

Also export IRpFile and RefBase because MSVC complained:

src\librpfile/MemFile.hpp(23,1): warning C4275: non dll-interface class 'LibRpFile::IRpFile' used as base for dll-interface class 'LibRpFile::MemFile'
src\librpfile\IRpFile.hpp(33,1): warning C4275: non dll-interface class 'RefBase' used as base for dll-interface class 'LibRpFile::IRpFile'
src\librpfile/MemFile.hpp(150,15): warning C4251: 'LibRpFile::MemFile::m_filename': class 'std::basic_string<char,std::char_traits<char>,std::allocator<char>>' needs to have dll-interface to be used by clients of class 'LibRpFile::MemFile'

I'm not sure about the std::string issue, though...

This shouldn't affect the ABI significantly, so I'm not going to bump
the SOVERSION.

(cherry picked from commit 7be8249624)
2022-09-24 22:48:47 -04:00
David Korth
94d6848e74 My laptop now has glibc-2.36.
No changes other than the library version number, though.
2022-09-17 13:32:48 -04:00
David Korth
8d1ed25b59 [libromdata] VectorFile: Export the entire class.
AppVeyor Ubuntu 18.04 was failing to build the XFCE (GTK2) UI frontend
because it couldn't find the VectorFile vtable:

src/gtk/xfce/CMakeFiles/rom-properties-xfce.dir/__/DragImage.cpp.o:
	In function `drag_image_drag_data_get(_DragImage*, _GdkDragContext*, _GtkSelectionData*, unsigned int, unsigned int, void*)':
src/librpfile/VectorFile.hpp:29: undefined reference to `vtable for LibRpFile::VectorFile'

I wouldn't have noticed this without adding --no-undefined because there
aren't any automated UI tests right now. (Well, maybe I would have noticed
it on my Xubuntu 16.04 VM, but maybe not...)

Interestingly, the MSVC builds export *all* of VectorFile's functions,
whereas the gcc builds (even on Windows) don't export the inlined ones.
This probably isn't an issue, since VectorFile function access usually
goes through the vtable, and for cases where it doesn't, the inlined
functions will be inlined.
2022-09-17 13:32:48 -04:00
David Korth
cd29f1c993 [rpcli] New command line option '-d' to skip RFT_LISTDATA with more than 10 items in text output.
This will make it easier to test e.g. Windows executables without having
to scroll through pages of DLL imports/exports.

[librpbase] TextOut: Use a flags parameter instead of bool so we can have
multiple flags.

[doc/abi] Updated ABIs to reflect the use of `unsigned int` for flags.
Interestingly, the Windows gcc ABIs already used this instead of `bool`...
2022-09-10 16:10:57 -04:00
David Korth
134c180f62 [doc/abi] Linux: get_file_d_type() goes after getConfigDirectory().
I probably added it in manually before, which didn't match the
`sort` order.

Gentoo Linux: Also add the AesNettle version functions. These were listed
in the Ubuntu ABIs, but not the Gentoo one.
2022-09-10 16:07:04 -04:00
David Korth
214af1601c [librpfile] FileSystem: New function get_file_d_type().
Split from the GTK and KDE CacheCleaner objects.

The new function also supports using statx() if available.

A basic version is now implemented on Windows. It only supports
distinguishing between files and directories.

This function is exported, since it's used by the UI frontends.
2022-08-01 18:15:14 -04:00
David Korth
0775e4312f [doc/abi] Updated the symbol listings.
The IAesCipher subclasses no longer export their constructors.

AesCipherFactory::create(Implementation) is exported.

AesNettle exports various functions so the UI frontends don't have to
link to nettle directly.

RpPng exports various functions so the UI frontends don't have to link
to zlib or libpng directly.

FileSystem::access() is now exported.
- Also FileSystem::waccess() on Windows.

Windows-specific changes:
- InitPropVariantFromString_noShlwapi() is now exported because it's
  no longer an inline function.
- InitPropVariant* functions are now WINAPI for compatibility with the
  original Windows functions.
2022-07-30 14:35:12 -04:00
David Korth
03b80ee459 [doc/abi] Updated the Windows symbol listings.
Main changes:

- `nm` prints consolidated versions of certain templates, e.g.
  std::ostream& instead of std::basic_ostream<blah>, so I'll be using
  `nm` on the import libraries instead of `dumpbin` on the DLLs for
  the MinGW-w64 versions.

- Added rp_vswprintf() and rp_vswprintf_p().

- Functions that previously took `const SIZE&` now take `SIZE`.

- Functions moved to LibWin32UI are no longer exported from libromdata.

- RegisterComObject() now takes an HINSTANCE parameter so it can get the
  correct DLL filename, since libromdata doesn't export any COM objects
  itself.
2022-07-17 16:20:58 -04:00
David Korth
fd0691c8d4 [doc/abi] Updated the Windows ABI files.
It seems I incorrectly had pfnIsThemeActive and RP_ulTotalRefCount
marked as T (text) when they should have been marked as B (bss).

Also, the difference with the MSVC files is how I obtained the
undecorated names. Initially, I took the `dumpbin /EXPORTS` output and
only kept the undecorated names from there, which was a bit error-prone
due to formatting. For the new one, I took the decorated names, which
was easier to get, then ran those through `undname`.
2022-07-04 05:13:58 -04:00
David Korth
c706601498 [doc/abi] Rebuild the MSVC 2019 (msvc16) ABI files.
The amd64 file was missing __ptr64 in most of the functions for some
reason. (Did I get the versions confused before?)

The i386 file was missing const qualifiers for some of the functions.
I guess the method I used before wasn't very reliable.

Also, I accidentally duplicated imageTypeCount() in both of them due to
manual editing instead of regenerating the files.
2022-07-04 01:10:37 -04:00
David Korth
5430e705ad [libromdata] RomDataFactory: Add a create() overload that takes a filename.
In order to thumbnail Wii U Packages, and probably some other packages
I'd like to add later on, we have to thumbnail a directory. This isn't
doable with IRpFile, so as a workaround, use a filename.

This overload will create an RpFile and pass it to the usual create()
function if it's a file. For directories, it currently does nothing,
but it will eventually do something.

doc/abi/: Add this function to the ABI lists.
2022-07-04 01:00:39 -04:00
David Korth
5bc1ef1903 [librpbase] AboutTabText: Use a dispatch function to get strings.
The program version, git version, and git description are now accessed
using the getProgramInfoString() function. This function also provides
some other strings, including the copyright string, which is now used
by the UI frontend "About" tabs.

getProgramInfoStringCount() returns the number of strings available in
the library, which corresponds to ProgramInfoStringID::Max, currently 6.
2022-06-30 18:24:59 -04:00
David Korth
9aae78eede [librpbase] AboutTabText: Export functions instead of exporting variables.
Variable exports can be fragile, especially on Windows.

TODO: Use a single function that takes a string ID.
2022-06-30 18:05:07 -04:00
David Korth
2c30502b72 [doc/abi] msvc16: Fix missing LibRpBase::RomFields::getFromStringMulti().
Instead, there were two LibRpBase::RomFields::getFromListDataMulti().
Not sure how that happened.

Removed stray ')' from AboutTabText variable entries.
2022-06-30 01:57:13 -04:00
David Korth
31cdc4e38c [doc/abi] MSVC 2019 is version 16, not version 17.
These exports were taken with MSVC 2019, not MSVC 2017, though they
should be the same as 2017 and 2015 due to MSVC's new commitment to
C++ binary compatibility starting with 2015.
2022-06-30 01:31:31 -04:00
David Korth
bef046fc38 [doc/abi] dump-exports.sh: Add symbol types R (read-only) and V (weak).
nm's manual page says 'V' indicates a weak symbol with a value defined.
In practice, it appears to be used for C++ typeinfo and vtables.
2022-06-30 00:57:04 -04:00
David Korth
82ed072bd9 [doc/abi] Add exports from MinGW-w64 (gcc12).
Exports were dumped using DUMPBIN /EXPORTS and demangled using c++filt,
then prefixed with the symbol types from the Linux build.

TODO: The Linux exports files are missing some symbols.
2022-06-30 00:19:40 -04:00
David Korth
d0d77a926f [doc/abi] MSVC: Convert text files to Unix line endings. 2022-06-30 00:05:01 -04:00
David Korth
8d2905ef6a [doc/abi] Added libromdata.so.1 (romdata-1) exports.
Five systems are included:
- Gentoo (amd64) with gcc12 and glibc-2.35 (my main development system)
- Ubuntu 16.04 (i386) with gcc5 and glibc-2.23
- Ubuntu 16.04 (amd64) with gcc5 and glibc-2.23
- Windows (i386) with MSVC 2017
- Windows (amd64) with MSVC 2017

For the Linux builds with gcc, symbols are demangled and sorted using
`sort -u`. (See the dump-exports.sh script.)

For the Windows builds, symbols are demangled using `DUMBPIN /EXPORTS`.
Windows DLLs always have a sorted symbol table, though they're sorted
according to the mangled symbol, which starts with the function or
variable name, and is followed by classes/namespaces. Hence, the sorting
order may seem a bit unusual.

C symbols on Windows are also demangled to make comparisons easier.
Windows usually prefixes C symbols with '_' on 32-bit, and no prefix
on 64-bit.

NOTE: The gcc5 builds have five extra exported symbols that are hidden
by later versions of glibc: __bss_start, _end, _edata, _fini, _init.
_init and _fini were hidden in glibc-2.28; not sure about the others.
2022-06-29 23:56:38 -04:00