Add TSMUXER_COVERAGE which will result in building binaries with coverage information when set to true.
Move MSVC flag utf-8 from tsMuxerGUI to the general CMakeLists.txt as there is no reason not to enable it globally.
Replace NOT MSVC with checking if the build is for Linux : the effect is the same, but the intent is clearer.
Restructure the platform-specific conditions for building tsMuxerGUI.
Bind the XP build to windows-2019 hosts as windows-2022 includes Visual Studio 2022 which dropped XP support.
Don't install zlib via homebrew in macos in order to avoid conflicts with the system-provided one.
directory.cpp was essentially two implementations in one, separated with ifdefs. It's cleaner to just have two separate files, seeing how CMakeLists.txt for libmediation needs to check the platform it's running on and add the appropriate file implementation anyway.
This commit splits this file into two and extracts common code parts to directory_priv.h.
It looks like MacOS 11 removes the *64 functions, which have really been useless since 10.5 as off_t has been defined as 64-bit wide since that version.
_FILE_OFFSET_BITS is added and defined to 64 in case somebody wanted to compile tsMuxer as i386 and still have support for >2GB files.
Long overdue fixes to the warnings in file_unix.cpp. Also, move the POSIX-exclusive fcntl.h include from file.h to file_unix.cpp and remove MSVC warning suppression related to exception specifications, which were also removed as they have been deprecated since C++11.
This commit erases all usages of std::wstring from the face of the project and reduces wchar_t usages to the necessary minimum, mostly for interoperability with WinAPI functions. UTF-8 encoded std::strings are used in place of std::wstring objects, and code which must operate on actual characters instead of the bytes which might represent a character has been modified in order to work properly - mostly the subtitle renderer and reader classes.
The POSIX compatibility layer provided by the Microsoft C Runtime Library
treats its string arguments as if they were passed to the A-family of WinAPI
functions, which means that they undergo conversion to the ACP before being
passed to the actual WinAPI call. Passing UTF-8 encoded strings could have
never really worked.
This commit uses "wide" (i.e. UTF-16) commandline arguments when launching the
program on Windows, and uses the "wide" Windows APIs when dealing with strings.
This makes it independent from the currently selected active code page on the
system, and hopefully fixes issues with "nonstandard" characters appearing in
file and directory paths.
Fixes#172.
The repository now contains a clang-format file which should be used when committing new code. Additionally, a new workflow job is added which checks the conformance of source files to the specified formatting rules.
Fixes#47.
TerminatableThread is now implemented by using std::thread. The terminate()
function provided by the base class was actually not used anywhere, and was
removed along with the base class itself.
As a bonus, the completely unused files common_win32.{cpp,h} are also removed.
Precompiled headers aren't actually used by any of the compilers, so leaving
this header in the repo doesn't make much sense.
However, removing it revealed some places in the code which rely on windows.h
being included on WIN32, which was probably included via the tchar.h include.
These places have been fixed to explicitly include windows.h.
Currently can build tsmuxer CLI and libmediation in native 64-bit
on Linux. Windows, Mac, and 32-bit untested (32-bit is mostly
a function of the user's CXX_FLAGS settings anyway).
As a consequence of trying to get it to build the correct files,
the textSubtitleRender{FT|Win32}.* files had to be moved to an
osdep/ subdirectory. Some #include cases were also fixed to
point to the correct headers and directories in the source
tree or elsewhere.
Install rules need to be fleshed out for static/shared libs and
headers for libmediation, uninstall rules need to be added.
tsMuxerGUI needs to be hooked in as well.