summaryrefslogtreecommitdiffstats
path: root/waftools/generators/sources.py
Commit message (Collapse)AuthorAgeFilesLines
* waf: remove waf as a build systemLaserEyess2023-07-231-95/+0
| | | | | | Remove waf entirely in favor of meson as the only supported build system. Waf was officially deprecated in 0.36.0, and has not been preferred over meson since 0.35.0.
* file2string: remove question mark from safe charssfan52020-11-221-1/+1
| | | | | | | | | | Trigraphs such as "??=" (which are enabled by default with -std=c11) can mess up strings, so avoid them entirely by escaping question marks. This also drops Python 2 compatibility from file2string, making the change to the waf rule necessary. The input file is now opened in binary mode which is also more correct versus the old text mode which just happened to work even on binary files.
* zsh completion: move generation to runtime and improvePhilip Sequeira2019-09-271-13/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The completion function itself now parses --list-options on the first tab press and caches the results. This does mean a slight delay on that first tab press, but it will only do this if the argument being completed looks like an option (i.e. starts with "-"), so there is never a delay when just completing a file name. I've also put some effort into making it reasonably fast; on my machine it's consistently under 100 ms, more than half of which is mpv itself. Installation of zsh completion is now done unconditionally because it's nothing more than copying a file. If you really don't want it installed, set zshdir to empty: `./waf configure --zshdir= ...` Improvements in functionality compared to the old script: * Produces the right results for mpv binaries other than the one it was installed with (like a dev build for testing changes). * Does not require running mpv at build time, so it won't cause problems with cross compilation. * Handles aliases. * Slightly nicer handling of options that take comma-separated values and/or sub-options: A space is now inserted at the end instead of a comma, allowing you to immediately start typing the next argument, but typing a comma will still remove the automatically added space, and = and : will now do that too, so you can immediately add a sub-option. * More general/flexible handling of values for options that print their possible values with --option=help. The code as is could handle quite a few more options (*scale, demuxers, decoders, ...), but nobody wants to maintain that list here so we'll just stick with what the old completion script already did.
* build: optimise adding additional objects for linkingder richter2019-09-221-2/+2
| | | | | splitting the string by spaces isn't the best idea, so we use a proper list instead now.
* waf: fix wayland-scanner deprecation warningdudemanguy2019-09-211-1/+1
| | | | | | Use `private-code` instead of `code` here. Also this bumps up the required wayland-client/wayland-cursor version to 1.15 which is still pretty old anyway.
* build: fix adding of object files to linking with cplugins disabledAkemi2019-03-131-1/+1
| | | | | | | | | | | | this was meant to be fixed by 546f038, but with --disable-cplugins the do_the_symbol_stuff function was never called and the handle_add_object function was again always called before the actual linking task was created. to fix this we explicitly call handle_add_object only after all the tasks the do_the_symbol_stuff function is called after too. Fixes #6028
* build: explicitly delay adding of object files to linkingAkemi2018-07-121-0/+1
| | | | | | | | | | Before, `do_the_symbol_stuff` would implicitly come before `handle_add_object`, which adds object files to the linking task. With newer (2.0.x) versions of waf, the ordering seems to get more optimized, and thus we have to declare that the function that creates the linking task should come before the task that adds object files to the task.
* build: fixup vendored wayland protocols with variantsJan Ekström2018-04-151-4/+23
| | | | | | Utilize the SRC variable for this to get a built-in relative path. Can be tested by adding `--variant="random_string"` to configure and build.
* build: fix linking libmpv when swift features are builtAkemi2018-02-131-0/+2
| | | | | | | | the swift object file wasn't linked when libmpv was linked, which resulted in a missing symbol error. add the swift object to the linking list for libmpv too. Fixes #5522
* cocoa-cb: initial implementation via opengl-cb APIAkemi2018-02-121-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | this is meant to replace the old and not properly working vo_gpu/opengl cocoa backend in the future. the problems are various shortcomings of Apple's opengl implementation and buggy behaviour in certain circumstances that couldn't be properly worked around. there are also certain regressions on newer macOS versions from 10.11 onwards. - awful opengl performance with a none layer backed context - huge amount of dropped frames with an early context flush - flickering of system elements like the dock or volume indicator - double buffering not properly working with a none layer backed context - bad performance in fullscreen because of system optimisations all the problems were caused by using a normal opengl context, that seems somewhat abandoned by apple, and are fixed by using a layer backed opengl context instead. problems that couldn't be fixed could be properly worked around. this has all features our old backend has sans the wid embedding, the possibility to disable the automatic GPU switching and taking screenshots of the window content. the first was deemed unnecessary by me for now, since i just use the libmpv API that others can use anyway. second is technically not possible atm because we have to pre-allocate our opengl context at a time the config isn't read yet, so we can't get the needed property. third one is a bit tricky because of deadlocking and it needed to be in sync, hopefully i can work around that in the future. this also has at least one additional feature or eye-candy. a properly working fullscreen animation with the native fs. also since this is a direct port of the old backend of the parts that could be used, though with adaptions and improvements, this looks a lot cleaner and easier to understand. some credit goes to @pigoz for the initial swift build support which i could improve upon. Fixes: #5478, #5393, #5152, #5151, #4615, #4476, #3978, #3746, #3739, #2392, #2217
* wayland_common: rewrite from scratchRostislav Pehlivanov2017-10-031-2/+24
| | | | | | | | | | | | The wayland code was written more than 4 years ago when wayland wasn't even at version 1.0. This commit rewrites everything in a more modern way, switches to using the new xdg v6 shell interface which solves a lot of bugs and makes mpv tiling-friedly, adds support for drag and drop, adds support for touchscreens, adds support for KDE's server decorations protocol, and finally adds support for the new idle-inhibitor protocol. It does not yet use the frame callback as a main rendering loop driver, this will happen with a later commit.
* build: always run code generators before compilingStefano Pigozzi2017-01-071-0/+1
|
* waf: don't discard line endings when using file2string.pywm42017-01-051-1/+1
|
* build: use matroska.py & file2string.py as python modulesStefano Pigozzi2017-01-051-26/+30
|
* Revert "Port several python scripts to Perl"wm42016-12-171-2/+2
| | | | | | | | | | | | | | | | | | This reverts commit fae73079310eef9dce9737f2e37ff4b80c8830ee. Before the waf build system was used, we had a configure script written in shell. To drop the build dependency on Python, someone rewrote the Python scripts we had to Perl. Now the shell configure script is gone, and it makes no sense to have a build dependency on both Perl and Python. This isn't just a straight revert. It adds the new Matroska EBML elements to the old Python scripts, adjusts the waf build system, and of course doesn't add anything back needed by the old build system. It would be better if this used matroska.py/file2string.py directly by importing them as modules, instead of calling them via "python". But for now this is simpler.
* build: fix building with spaces in pathPhilip Sequeira2015-03-311-3/+3
|
* build: fix generation of zsh completionAlessandro Ghedini2014-06-131-2/+2
| | | | | The Perl script must be run *after* the mpv executable is generated. Also use an absolute path to it.
* build: generate and install zsh completion scriptAlessandro Ghedini2014-06-081-0/+13
|
* switch the build system to wafStefano Pigozzi2013-11-211-0/+37
This commit adds a new build system based on waf. configure and Makefile are deprecated effective immediately and someday in the future they will be removed (they are still available by running ./old-configure). You can find how the choice for waf came to be in `DOCS/waf-buildsystem.rst`. TL;DR: we couldn't get the same level of abstraction and customization with other build systems we tried (CMake and autotools). For guidance on how to build the software now, take a look at README.md and the cross compilation guide. CREDITS: This is a squash of ~250 commits. Some of them are not by me, so here is the deserved attribution: - @wm4 contributed some Windows fixes, renamed configure to old-configure and contributed to the bootstrap script. Also, GNU/Linux testing. - @lachs0r contributed some Windows fixes and the bootstrap script. - @Nikoli contributed a lot of testing and discovered many bugs. - @CrimsonVoid contributed changes to the bootstrap script.