Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

An assortment of GCC and CMake fixes and enhancements #27

Merged
merged 20 commits into from
Mar 16, 2019

Conversation

qyot27
Copy link

@qyot27 qyot27 commented Mar 16, 2019

  • The patch from pull request DirectShowSource: Sensible defaults for CMake baseclasses lib, removed dx include path #9 has been updated to work with the current HEAD
  • The convolution and histogram fixes are included.
  • A good chunk are mostly intended to make it easier for MinGW-w64 cross-compiling, from case sensitivity to tidying up parts of the relevant CMakeLists.txt to facilitating better use of Ninja.
  • Some warnings are now silenced.
  • capi.h protected against the MSVC/GCC problem; defaults to MSVC-style mainstream use (resulting in 32-bit GCC builds not working with external programs like FFmpeg), but provides AVSC_WIN32_GCC32 define so projects like FFmpeg can switch to the alternate behavior.
  • PluginDir+GCC registry entry added, so that GCC builds can be if-deffed to ignore plugins for MSVC builds, as well as have their own plugin directories. This way, GCC and MSVC builds can co-exist without hassling each other.

ignus2 and others added 20 commits March 14, 2019 19:31
'Imagehlp.h' exists in MinGW, as 'imagehlp.h'. Windows is case
insensitive, so it doesn't care about the case of the filename,
but 'Imagehlp.h' will cause a failure when crosscompiling from a
case sensitive system like Linux or OSX.
If a program that talks to the C-interface uses the GCC compliant
header, it becomes unable to use MSVC builds of AviSynth+. But
to build with GCC, those changes are necessary.

Guard against this by wrapping the change in a BUILDING_AVSCORE
ifdef block so that client programs will use the old calling
conventions.

Unfortunately, this comes with the caveat that 32-bit GCC builds
of AviSynth+ will not work with the client program. 64-bit GCC
builds are unaffected.
Fixes building when using Ninja as the generator. Since Ninja
relies on the regular install rules, the copy operations for regular
VS usage remain MSVC_IDE.
This is a quick-and-dirty way of working around this issue. A
better solution would be a header/source combination that defines
our own secure functions if Windows doesn't provide them.

The problem with MinGW-w64, though, is that the presence of the
Secure API causes other compatibility issues to be pervasive.
Still defaults to SSE2, but can now be set higher or lower when
configuring, instead of hand-editing CMakeLists.txt.
The better way to accomplish this would be to detect it at runtime
and simply not autoload those plugins if the compiler for AviSynth
itself doesn't match it, but this is the next best option.

This commit simply tells GCC builds of AviSynth to use the value
of the PluginDir+GCC registry entry to find plugins, and ignore
PluginDir and PluginDir+.  Vice-versa for MSVC builds.

C plugins are an exception to this, since those can be loaded with
either MSVC- or GCC-built AviSynth+.  I'd suggest either having
duplicate copies, or using symbolic links for those.
Fixes a build error due to the use of uint16_t
@pinterf pinterf merged commit f7c453f into pinterf:MT Mar 16, 2019
@qyot27 qyot27 deleted the dss_deps branch March 17, 2019 17:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants