Commit Graph

336 Commits

Author SHA1 Message Date
Steve Lhomme
64d46c2ba0 win32: assume PROCESS_MITIGATION_IMAGE_LOAD_POLICY is defined
It was added in mingw-w64 in [1] which is in v6, our minimum version.
We don't need to have it defined in UWP builds as we don't use winvlc.c.

[1] 36d7b92bbc
2024-11-24 13:51:46 +00:00
Steve Lhomme
9d866d5680 bin: don't build vlc.exe for Winstore builds
winvlc.c uses API's not available in UWP:
- SetProcessMitigationPolicy
- SetProcessDEPPolicy
- SetDllDirectory
- SetDefaultDllDirectories
- MessageBox

GetCommandLine is allowed but not in mingw-w64 yet.
2024-11-20 08:48:33 +00:00
Marvin Scholz
76cd807c24 darwinvlc: do not call libvlc_release on NULL
When initialising libVLC fails, this can be NULL and calling
libvlc_release would cause a null-pointer dereference.
2024-11-16 15:32:44 +00:00
Steve Lhomme
2450f52237 meson: don't build plugins.dat when cross compiling
Just as with autotools.
2024-10-19 08:02:09 +00:00
Alexandre Janniaux
3a6bd45b9e darwinvlc: start interfaces in separate thread
Interfaces from libvlc were started from the main thread directly. But
UI inserting their own event loop inside the main runloop like Qt were
taking over the interface insertion. It was preventing other interfaces
to load correctly, required dedicated code to handle the startup in the
Qt interface and it was not possible to exit the interface correctly.

By moving the creation of the interfaces in a dedicated thread, we can
ensure all UI are created and destroyed correctly, but the macosx
interface must now dispatch its own creation into the main thread to
match Cocoa requirement on main thread usage for UI components.

Note that libvlc_new itself must be moved to the intf_queue given that
it starts additional extraintf.

The macosx interface must now start its own NSApp inside the main loop,
via a dispatch call, which simplify the main loop into running the
default main loop.
2024-09-27 04:37:13 +00:00
Alexandre Janniaux
ca7cb8d44e darwinvlc: remove VLA for argv
VLA are not compatible with blocks, and error handling is pretty simple
here, so there's no reason not to use dynamic allocation instead.
2024-09-27 04:37:13 +00:00
Ankit Meel
b53cc653ea meson: create vlc-cache-gen & plugins.dat 2024-04-21 08:11:05 +00:00
Fatih Uzunoglu
4baa098d90 raise minimum required mingw64 version from 5.0 to 6.0
DirectX 12 sdk provided by MinGW 8.0.1 is required for Qt 6,
and patching MinGW 5.0 to include d3d12 sdk requires sheer
amount of effort.
2024-02-15 12:15:23 +00:00
Thomas Guillem
70dc1f9480 bin: use libvlc_Internal API directly 2024-02-02 10:31:30 +00:00
Steve Lhomme
82f3c43340 winvlc: remove libvlc_add_intf for globalhotkeys
It will be added automatically with the default interface autorun.
2024-02-01 22:07:18 +00:00
Steve Lhomme
6e87bfd484 winvlc: use the enum policy when it's known
At some point HAVE_PROCESS_MITIGATION_IMAGE_LOAD_POLICY will go away
since we will only support mingw-w64 versions that have it.

36d7b92bbc
2023-12-07 09:51:33 +00:00
Steve Lhomme
b10437cbc2 winvlc: don't define locally HeapEnableTerminationOnCorruption
It's supported in all the mingw-w64 version we support:
92a31baf45
2023-12-07 09:51:33 +00:00
Steve Lhomme
8c250b6fdc winvlc: avoid FromWide conversion for the language
We can keep the original wide char and use %ls to generate the LANG environment.
2023-12-07 09:51:33 +00:00
Steve Lhomme
53d8a81b30 winvlc: avoid FromWide conversion on static strings 2023-12-07 09:51:33 +00:00
Steve Lhomme
1040e9a7ff breakpad: fix potential char used with _snwprintf()
The whole Breakpad API on Windows uses wstring.
2023-12-05 08:46:09 +00:00
Steve Lhomme
3e3292a58d winvlc: don't keep the crash path forever in memory
It's copied internally by breakpad.
2023-12-05 08:46:09 +00:00
Steve Lhomme
520c9e9291 winvlc: don't attempt to send crash dumps if the path can't be found 2023-12-05 08:46:09 +00:00
Steve Lhomme
787eba6fa3 winvlc: fix potential buffer overflow in crashdump path 2023-12-05 08:46:09 +00:00
Steve Lhomme
af5e87f41c build: ignore macOS build files 2023-11-02 07:40:10 +00:00
Khalid Masum
a40c987a54 buildsystem: -sMAIN_MODULE for compiling executables 2023-09-24 20:31:18 +00:00
Alexandre Janniaux
84dab2a431 bin: Makefile.am: use EXTRA_%_DEPENDENCIES
Setting the target DEPENDENCIES might lead to confusing behaviour where
dependencies added to LDADD are not propagated correctly. The automake
manual suggest using `EXTRA_%_DEPENDENCIES` when the goal is to augment
the automake-generated `%_DEPENDENCIES` instead.
2023-08-13 18:13:46 +00:00
Alexandre Janniaux
dde449ee98 bin: Makefile.am: use abs_top_* variables directly
There's no need for an ad-hoc realpath call since autotools already
provides the absolute path for those variables.
2023-08-03 08:01:09 +00:00
Steve Lhomme
0767bc491c winvlc: call SetProcessDEPPolicy directly
We build for Win7+, the function is always there.

And no need to define PROCESS_DEP_ENABLE. It's available in mingw-w64 since 4.0.
2023-07-05 14:11:23 +00:00
Steve Lhomme
603e9f1a61 vlc-cache-gen: get the absolute path of modules in a portable way
realpath doesn't exist on macOS.
2023-05-20 12:04:02 +00:00
Alexandre Janniaux
748f6e6a11 bin: meson.build: conditionnally build binaries
Neither vlc.c nor darwinvlc.m can be compiled against iOS SDK currently
so only build them on other platforms than iOS and tvOS.
2023-02-06 21:14:23 +00:00
Johannes Kauffmann
f81f7cc5e9 meson: disable binaries if vlc isn't build
Plugin cache gen still needs to be done here.
2023-01-14 14:03:40 +00:00
Steve Lhomme
f05aa36d9d meson: fix the Windows type of the vlc executable
The entry point is WinMain(), not main().
2023-01-10 14:32:06 +00:00
Steve Lhomme
780cfad471 winvlc: clean function pointer definition 2023-01-06 14:46:46 +00:00
Steve Lhomme
b321e59e01 winvlc: remove useless _WIN32_IE value
It's restricting available code to Windows XP that we don't support.
The value should be the minimum OS we support. It's automatically
picked based on _WIN32_WINNT.
2023-01-05 10:22:50 +00:00
Marvin Scholz
d5f07af209 meson: add initial meson build system
Co-authored-by: Tanguy Dubroca <tanguy.dubroca@lse.epita.fr>
Co-authored-by: Hugo Beauzée-Luyssen <hugo@beauzee.fr>
Co-authored-by: Alexandre Janniaux <ajanni@videolabs.io>
2023-01-04 14:48:39 +00:00
Rémi Denis-Courmont
d2ef799a6f override: use X_DISPLAY_MISSING 2022-04-17 02:55:02 +00:00
Marvin Scholz
ffaadb57c6 macosx: add rpath for Frameworks
The Frameworks folder was missing in the rpath, leading to Frameworks
like Sparkle requiring change of the install_name after it was built
instead of just using rpath properly.
2022-01-04 19:40:24 +00:00
KO Myung-Hun
e3f60a38d4 bin: fix linkage on OS/2
Signed-off-by: Steve Lhomme <robux4@ycbcr.xyz>
2021-01-29 15:53:43 +01:00
Tristan Matthews
53b73bede0 rootwrap: make setsockopt 1 usage consistent 2020-11-22 15:13:29 -05:00
Rémi Denis-Courmont
c96462163e xcb/global: use autorun to start 2020-11-21 16:51:38 +02:00
Rémi Denis-Courmont
0c2d3c673d hotkeys: use autorun to start 2020-11-21 16:51:38 +02:00
Marvin Scholz
8aadaf3db1 macosx: move breakpad initialization and allow opt-out
Move the breakpad initialization right to the start of the program
and do not initialize breakpad if the VLC_DISABLE_BREAKPAD env variable
is set.
2020-05-26 14:41:52 +02:00
Alexandre Janniaux
81c60915f7 winvlc: silence unused warnings
If breakpad is not used, the crash_handling variable is not used too,
but as it's used otherwise this should be silenced.
2020-03-30 09:10:13 +02:00
Marvin Scholz
b39f2f1c52 macosx: check type of preference entry before using 2020-03-25 13:46:54 +01:00
Marvin Scholz
565e21f4d0 macosx: remove support for the language argument 2020-03-25 13:46:54 +01:00
David Fuhrmann
358a3be3b0 macOS packaging: Use DESTDIR install for packaging
This gets rid of a prefix inside our build dir, and uses DESTDIR
when installing the content. This way, the install directory
can be reused for further packaging introduced in the next commits.
2019-12-10 23:17:41 +01:00
Steve Lhomme
260ee399c5 winvlc: fix warnings 2019-06-03 09:25:37 +02:00
Steve Lhomme
cd61b872fc winvlc: use WCHAR instead of TCHAR
We were already using FromWide on this variable. It cannot work if TCHAR is
not wide.
2019-04-03 09:55:32 +02:00
David Fuhrmann
5b8554d5ea darwinvlc: Set rpath appliciable for POSIX installation
This enables us to just run the vlc executable from an installed
directory like on any other POSIX installation. All modules should
work, apart the macOS interface module which requires the bundle
structure.
2019-03-27 19:28:09 +01:00
David Fuhrmann
e7120799cc src: darwin/dirs: Implement fallbacks for posix style installations
For posix-style installations, use the defined directories
for libraries and data.

With that, running vlc from the install dirs works fine in principle.
What is left to do currently is to adapt the RPATH to find the
libvlc libraries.
2019-03-27 18:16:50 +01:00
David Fuhrmann
965c4a0294 src: darwin/dirs: Package libraries and modules into Frameworks directory
This is the correct place for bundling shared libraries (even if
they are not in the Framework structure).
2019-03-20 18:51:20 +01:00
Steve Lhomme
5363279805 remove the $Id$ in the source code 2019-01-17 12:21:18 +01:00
Marvin Scholz
d75d12bee2 darwinvlc: Use FromCFString 2018-10-20 19:42:10 +02:00
Martin Storsjö
9edf62844f bin: win32: Link vlc.exe and vlc-cache-gen.exe with -static
This prevents these executables from linking to a shared
libssp-0.dll if both a static and shared version is available
of this library.

Since these refer to the dynamically linked libvlc via libvlc.la,
it will still pick up the correct shared version of those, instead
of refusing to link to a dynamic library (as it does for any
library specified via -l<name>).

The same use of -Wc,-static is present in a few other Makefile.am
already.
2018-09-13 13:27:51 +03:00
Steve Lhomme
769f745315 bin:override: fix unsigned format modifier 2018-07-11 15:35:04 +02:00