summaryrefslogtreecommitdiffstats
path: root/TOOLS/osxbundle
Commit message (Collapse)AuthorAgeFilesLines
* osxbundle: activate Game Mode with App bundleder richter2024-03-071-0/+2
| | | | | | | | | | | | | | | mpv isn't really a game and categorising our App bundle as game seems counterintuitive. though as a video player it does have some similarities, possibly needing considerably CPU and GPU resources and low presentation latencies. the macOS Game Mode promises exactly that, it gives App the highest priority access to CPU and GPU resources and lowers usage for background tasks. sadly the Game Mode can only be activated by categorising the App as a game and that is only possible with an App bundle and not as a command line tool.
* osxbundle: remove mpv-bundle symlink to allow code signingDaniel Brookman2023-11-151-1/+3
| | | | | | | | | | | | | | | | | | | Apps on Apple silicon have to be codesigned to run, but you can't codesign bundles that have a symlink for the main executable. The "mpv-bundle" symlink was used as the bundle's main executable because it makes the execution name of the binary different. Launch Services runs the CFBundleExecutable key from Info.plist when launching a bundle, so by comparing the execution name to the name of the symlink, you can check if that's how the binary was launched. This replaces that detection method by moving the MPVBUNDLE environmental variable into Info.plist. Launch Services will set anything in LSEnvironment as environmental variables before launching the bundle, so we're able to check for it instead of needing to differentiate the execution name of the binary. Fixes #12116
* build: remove outdated generated directoryDudemanguy2023-07-311-0/+8
| | | | | | | | | | | | | | | | This only existed as essentially a workaround for meson's behavior and to maintain compatibility with the waf build. Since waf put everything in a generated subdirectory, we had to put make a subdirectory called "generated" in the source for meson so stuff could go to the right place. Well now we don't need to do that anymore. Move the meson.build files around so they go in the appropriate place in the subdirectory of the source tree and change the paths of the headers accordingly. A couple of important things to note. 1. mpv.com now gets made in build/player/mpv.com (necessary because of a meson limitation) 2. The macos icon generation path is shortened to TOOLS/osxbundle/icon.icns.inc.
* osxbundle: add RIST protocol support to app metadataThe-head-obamid2022-08-181-0/+1
|
* osxbundle: fix slow and wasteful memory allocationder richter2021-05-161-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | when using the bundle with activated big enough cache, very slow and wasteful memory allocations lead to jittery playback and lot of dropped frames. the cache had to have a certain size so it would constantly allocate new memory to reproduce this. this never happens when started from the terminal. the source of the problem is a different malloc allocation policy, MALLOC_NANO, that allocated a huge amount of virtual memory without actually using it. the usage was between 0% to 25% of that virtual memory. the binaries allocation policy on the other hand used >80% of that allocated virtual memory and was a lot more efficient, it would use MALLOC_TINY instead. this is fixed by setting the MallocNanoZone environment variable to 0 to use the V1 of the allocation policy. when started from the bundle via launchd this is forced to 1 and V2 policy which causes this problem. some more info can be found in following file and its comments on the Apple open source site: https://opensource.apple.com/source/libmalloc/libmalloc-317.40.8/src/nano_malloc_common.c.auto.html Fixes #7405
* stream_lavf: enable SRT protocol support through FFmpegAlexandre Iooss2020-10-151-0/+1
| | | | | Additionally, announce support for the protocol in Mac and Linux application metadata.
* mac: activate logging when started from the bundleder richter2020-02-081-0/+1
| | | | | | | | | | this creates a default log for the last mpv run when started from the bundle. that way one can get a log of what happened even after an issue occurred. also add a menu entry under Help to show the current log, but only when the bundle is used. Fixes #7396 Fixes #2547
* osx: fix bundle on macOS High Sierra (10.13)Akemi2017-10-033-14/+2
| | | | | | | | | | | | | | | | | | | | | | Apple slightly changed the App bundle mechanism which broke wrapper scripts that invoke the actual binary. it caused the bundle to always open a new instance of mpv instead of reusing the currently running one. just removing the wrapper script would lead to several regressions, so it was replaced with a symlink to the bundle binary. detection if mpv was started from the bundle was replaced by comparing the execution name of the binary, eg the name of the symlink "mpv-bundle". additionally, because we load a standard config from the Resources folder of the bundle again, we prevent that config from being loaded if mpv wasn't started via the bundle. the psn argument has to be removed manually again. the ability of loading your standard shell environment has been removed with the wrapper. a substitution will be added with another commit. as a side effect this fixes an issues when zsh was used with common NodeJS configuration scripts. Fixes #4926 #4866
* osx: load the proper profiles and configs in the bundleAkemi2017-07-311-2/+11
| | | | | | | different shells need different args to load the expected profiles and configs, so we added a small heuristic to decide those args. also don't always load the profiles for a bash login shell and instead only use the standard shell without any args.
* osx: fix bundle for paths that need escapingAkemi2017-07-311-1/+2
| | | | | | this fixes the mpv binary call in our bundle wrapper script, in the case that the path to the binary needs escaping. examples are white spaces or special chars.
* osx: fix mpv-wrapper.sh when used with csh or tcsh shelldownthomas2017-05-021-2/+2
| | | | | | | | If the default shell of the user is set to csh or tcsh, the use of "$SHELL -l -c" will fail to launch mpv because -l and -c cannot be used together with csh or tcsh. Signed-off-by: Akemi <der.richter@gmx.de>
* osx: improve bundle handlingAkemi2017-02-163-2/+4
| | | | | | | | | | | | | | | | | we have two problems here. first when mpv is started from the bundle it uses its own environment variables and possibly can't find for example the youtube-dl binary for our youtube-dl hook. second we couldn't reliable determine when mpv was started from the bundle, which led to the pseudo-gui usage even when the binary was invoked from a shell. to prevent this we will wrap the bundle binary with a shell script, which will only be called when we start mpv from the bundle. this way we can get the same environment variables, like $PATH, for our bundle and additional we can set the pseudo-gui only when started through this script. it is also possible to detect the bundle usage properly and accurately through the usage of another environment var. Fixes #2061
* player: do not let pseudo-gui override user config settingswm42016-09-231-1/+1
| | | | | | | | Seems like this confused users quite often. Instead of --profile=pseudo-gui, --player-operation-mode=pseudo-gui now has to be used to invoke pseudo GUI mode. The old way still works, and still behaves in the old way.
* osxbundle: remove unnecessary config file entrywm42015-05-011-1/+0
| | | | This is done via pseudo-gui now.
* OSX/mpv.app/mpv.conf: Use pseudo-guirobin007bond2015-04-131-2/+1
| | | | | | | | The player is now forced to use the pseudo-gui profile. Fixes #1808 and #1754. Signed-off-by: wm4 <wm4@nowhere>
* osxbundle: config file special case isn't needed anymorewm42015-02-151-0/+0
| | | | | | The previous commit effectively fixes the mess caused by 'config' vs. 'mpv.conf', and the hack introduced by commit e01a6dac and extended by commit db167cd4 isn't needed anymore.
* player: deprecate 'config' files (use mpv.conf), warn against clasheswm42015-02-131-0/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | Apparently there's at least one distro which ships a /etc/mpv/mpv.conf file (mpv doesn't install such a file). This breaks config files named 'config' located in the user's mpv config directory, because mpv first loads files named 'config' and then 'mpv.conf'. There is no mechanism for putting files with different names into the same config path order. (Even worse, that mpv.conf file only set an option to the default value. Why do distros always do very stupid things?) Print a warning on collisions. Although using 'config' was well-supported, supporting both names is starting to become messy, so deprecate 'config' and print a warning if one is found. At least we will be able to remove the whole mess once 'config' files are ignored... This also affects the osx-bundle, which intentionally used these not-so- optimal semantics. Solve it in a different way. (Unfortunately with an ifdef - it's not required, but having to explain everyone why mpv tries to load a osx-bundle.mpv file on Linux and Windows would consume energy.) Closes #1569.
* osxbundle: fix cascading config loadingStefano Pigozzi2014-12-261-0/+0
| | | | | | | | | | | | | | | | | mpv does 'cascading' configs by overriding options as the config become more important (bundle -> system level -> user level). Unfortunately mpv also loads two sets of configs files one after the other [1]. First it looks for 'config', then for 'mpv.conf'. For this reason a mpv.conf in ANY location will override ANY config files named config (even if the mpv.conf is in a system path and config in a user path). [1]: Relevant code in player/configfiles.c load_all_cfgfiles(mpctx, section, "config"); load_all_cfgfiles(mpctx, section, "mpv.conf"); Fixes: #1361
* cocoa: bundle: use idle=onceStefano Pigozzi2014-12-071-1/+1
|
* cocoa: use --idle when running inside bundleStefano Pigozzi2014-12-061-0/+2
| | | | | Previously when using the bundle we used a custom bizarro thing to wait for events. Just use `--idle` and greatly simplify the code.
* cocoa: save screenshots to desktop when using app bundleStefano Pigozzi2014-12-051-0/+1
| | | Fixes #947
* cocoa: add https:// url scheme to bundle's plistStefano Pigozzi2014-12-021-0/+1
|
* cocoa: add mk3d UTI to bundle's plistNyx0uf2014-12-021-0/+23
| | | | | | This should allow lauching a mk3d file directly from the Finder. Fixes #1311
* cocoa: split mkv/webm for imported UTI in plistNyx0uf2014-12-011-0/+20
|
* OS X bundle: Add more imported UTINyx0uf2014-07-041-0/+84
| | | Not that there are widely used formats, but it will allow to play them directly from the Finder.
* OS X bundle: add UTImportedTypeDeclarationsNyx0uf2014-04-251-1/+504
| | | | | | | | | | | | | | | | Allows to declare UTIs [1] for types of file that OS X doesn't know, like mkv, mka, etc. For example: instead of having a dynamically generated UTI for .mkv like 'dyn.somerandomstring', 'io.mpv.mkv' is registered and conforms to public.movie and is known system wide. Note: The list is far from being complete but it should cover the most used type of files. [1]: https://developer.apple.com/library/ios/documentation/FileManagement/Conceptual/understanding_utis/understand_utis_conc/understand_utis_conc.html#//apple_ref/doc/uid/TP40001319-CH202-CHDHIJDE Fixes: #734
* osxbundle: use mpv's version.sh instead of osxbundle'sChrisK22013-12-091-15/+0
|
* switch the build system to wafStefano Pigozzi2013-11-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | 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.
* osx bundle: remove embedded fonts.confStefano Pigozzi2013-11-141-120/+0
| | | | | | This could cause the bundle to recache stuff because of differences with configuration of other software using fonconfig. The defaults OS X directories should be added to fontconfig at build time (through configure).
* Revert "osxbundle: fonts.conf: only look for fonts in ~/.mpv/fonts"Stefano Pigozzi2013-09-191-2/+5
| | | | | | | Commit broke text subtitles without embedded fonts. Will look for a better solution later. Revert it for now, since I'm starting to get bug reports. This reverts commit 4a9f618d9f3b2d964bcc819426cc3042b8e447f7.
* osxbundle: fonts.conf: only look for fonts in ~/.mpv/fontsStefano Pigozzi2013-09-181-5/+2
| | | | | | | | This is to avoid the 30s hang while mpv caches fonts. In practice all the fonts an average user is going to use are embedded in mkv files so there is no reason to build fontconfig's cache on all of OS X system directories. I might add something similar for terminal usage, but I am highly undecided.
* macosx: add webm the filetypes handled by the bundleBilal Syed Hussain2013-09-141-0/+2
|
* macosx_application: handle mpv:// linksStefano Pigozzi2013-09-071-0/+10
| | | | | | | Pretty useful for people writing userscripts for web browsers. Links starting with 'mpv://' are forwarded to the mpv OSX bundle. The leading 'mpv://' is stripped from the recived url and the rest of the string is inserted as is in the playlist.
* macosx_application: handle URL events as fileopen eventsStefano Pigozzi2013-09-071-36/+10
| | | | | This allows to open URLs directly with mpv. This is useful for streaming and libquvi supported sites.
* change application iconStefano Pigozzi2013-09-016-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | I would like to thank Chris Ward (@tenzerothree, http://tenzerothree.com/) for working on the art for these icons and bringing some eye candy to the project. The PSDs made by Chris are available on our Dropbox [1], along with the exports I made to create OSX and Windows icons. The PSDs are almost completly vector and all the resolutions look really similar, except the 16px favicon which was handcrafted to look better and more recognizeable on the smaller pixel budget. For Mac OS X the icons were created using iconutils on the PNGs iconsets exported from the PSDs. These even support retina resolutions (except 512@2x). For Windows the .ico file was created with imagemagick. The included images are 16px, 24px, 32px, 48px 64px, 256px. These are the resolutions listed on MSDN for supporting Windows XP [2] and Windows versions based on Aero [3]. Only 32bit PNGs were used since it is 2013. For Linux nothing changed yet, even though @wm4 talked about using the PNGs directly there. This will probably be dealt with in a later commit. [1]: https://www.dropbox.com/sh/yelfoj9tbft7o06/A8vOT6JKaG [2]: http://msdn.microsoft.com/en-us/library/ms997636.aspx [3]: http://msdn.microsoft.com/en-us/library/aa511280.aspx
* change reverse DNS strings to io.mpv.*Stefano Pigozzi2013-04-161-1/+1
| | | | fixes #60
* osxbundle: fix unicode support in fonts.confkax42013-01-071-5/+116
| | | | | | | | | Looks like unicode support was broken with this simple `fonts.conf`. Copy more (all) of fontconfig's default `fonts.conf`. Fixes #13 Signed-off-by: Stefano Pigozzi <stefano.pigozzi@gmail.com>
* osxbundle: add fonts.conf to distributed bundleStefano Pigozzi2012-12-151-0/+9
| | | | | | | | | | | | | | | The osxbundle target creates a bundle that is supposed to be distributable to third parties. As they may not have fontconfig installed they miss a fonts.conf pointing to the usual fonts directories in OSX. For people installing from source and using from the terminal this commit changes nothing. You just have to make sure that your fontconfig is installed with a sane configuration (XQuartz does). If you are installing fontconfig from source you can force a sane OSX default using `--with-add-fonts`. For example: `./configure --with-add-fonts=/Library/Fonts,~/Library/Fonts` Homebrew already addressed this with mxcl/homebrew@b242883
* TOOLS: add script for osx bundle generationStefano Pigozzi2012-10-169-0/+264
Add a make task and python script to create a Mac OS X Application Bundle to be used when compiling with the --enable-macosx-finder and --enable-macosx-bundle configure flags. The main svg icon was created by me and heavily inspired by Apple's iTunes and AppStore icon designs. We are still looking for something better. For the audio, movie and subtitles icons I added the main logo to MPlayer OSX Extended icons. Use with `make osxbundle` after running configure and make.