mirror of
https://github.com/mpv-player/mpv
synced 2025-03-11 04:44:32 +01:00
/etc/mplayer.conf created on install-time based on user responses.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@854 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
27f5dd83be
commit
868a7cad8d
2
debian/control
vendored
2
debian/control
vendored
@ -6,6 +6,6 @@ Standards-Version: 3.2.1
|
||||
|
||||
Package: mplayer
|
||||
Architecture: any
|
||||
Depends: ${shlibs:Depends}
|
||||
Depends: ${shlibs:Depends},debconf
|
||||
Description: The Ultimate Movie Player For Linux
|
||||
PoS Eso x"D
|
||||
|
86
debian/mplayer.conf → debian/postinst
vendored
Normal file → Executable file
86
debian/mplayer.conf → debian/postinst
vendored
Normal file → Executable file
@ -1,3 +1,53 @@
|
||||
#!/bin/sh -e
|
||||
# postinst script for mplayer
|
||||
#
|
||||
# see: dh_installdeb(1)
|
||||
|
||||
set -e
|
||||
|
||||
# summary of how this script can be called:
|
||||
# * <postinst> `configure' <most-recently-configured-version>
|
||||
# * <old-postinst> `abort-upgrade' <new version>
|
||||
# * <conflictor's-postinst> `abort-remove' `in-favour' <package>
|
||||
# <new-version>
|
||||
# * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
|
||||
# <failed-install-package> <version> `removing'
|
||||
# <conflicting-package> <version>
|
||||
# for details, see /usr/share/doc/packaging-manual/
|
||||
#
|
||||
# quoting from the policy:
|
||||
# Any necessary prompting should almost always be confined to the
|
||||
# post-installation script, and should be protected with a conditional
|
||||
# so that unnecessary prompting doesn't happen if a package's
|
||||
# installation fails and the `postinst' is called with `abort-upgrade',
|
||||
# `abort-remove' or `abort-deconfigure'.
|
||||
|
||||
case "$1" in
|
||||
configure)
|
||||
#TODO: creating /etc/mplayer.conf,
|
||||
|
||||
|
||||
# Source debconf library.
|
||||
. /usr/share/debconf/confmodule
|
||||
|
||||
db_subst mplayer/output vo xv, xmga, mga, x11, gl, sdl
|
||||
|
||||
db_input high mplayer/output || true
|
||||
db_go
|
||||
|
||||
if [ -f /etc/mplayer.conf ]; then
|
||||
|
||||
db_input high mplayer/overwrite || true
|
||||
db_go
|
||||
db_get mplayer/overwrite
|
||||
else
|
||||
$RET="true"
|
||||
fi
|
||||
|
||||
if [ "$RET" = "true" ]; then
|
||||
db_get mplayer/output
|
||||
|
||||
cat <<EOCFG > /etc/mplayer.conf
|
||||
##
|
||||
## MPlayer config file
|
||||
##
|
||||
@ -8,7 +58,7 @@
|
||||
## more flexibly here. See below.
|
||||
##
|
||||
|
||||
vo=xv # To specify your default video output see -vo help for
|
||||
vo=$RET # To specify your default video output see -vo help for
|
||||
# valid settings
|
||||
|
||||
fs=yes # Enlarges movie window to your desktop's size.
|
||||
@ -90,3 +140,37 @@ ffactor = 1
|
||||
##
|
||||
|
||||
#include = /home/gabucino/.mplayer/savage4.conf
|
||||
|
||||
|
||||
EOCFG
|
||||
|
||||
fi
|
||||
|
||||
|
||||
#db_purge
|
||||
db_input medium mplayer/cfgnote || true
|
||||
db_go
|
||||
|
||||
|
||||
|
||||
# store info in debconf database
|
||||
;;
|
||||
|
||||
abort-upgrade|abort-remove|abort-deconfigure)
|
||||
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "postinst called with unknown argument \`$1'" >&2
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
|
||||
# dh_installdeb will replace this with shell code automatically
|
||||
# generated by other debhelper scripts.
|
||||
|
||||
#DEBHELPER#
|
||||
|
||||
exit 0
|
||||
|
||||
|
33
debian/postinst.templates
vendored
Normal file
33
debian/postinst.templates
vendored
Normal file
@ -0,0 +1,33 @@
|
||||
Template: mplayer/output
|
||||
Type: select
|
||||
Choices: ${vo}
|
||||
Default: xv
|
||||
Description: Which Video Output driver would you like?
|
||||
Mplayer can use very wide range of video output drivers:
|
||||
( order aproximately by speed: )
|
||||
* mga, xmga - direct hardware access on MGA cards (G200/400/450), needs /dev/mga_vid
|
||||
this driver can work without X and display video on secondary head of matrox cards
|
||||
* xv - XVideo extensions of X 4.x ( hardware scaling, bilinear filtering )
|
||||
* sdl - SDL library, it can also use hardware scaling, filtering etc
|
||||
* dga, fsdga - DGA extension.
|
||||
* fsbdev - framebuffer device ( watching movies on text console )
|
||||
* x11 - simple x11 output.
|
||||
Please choose carefully because it has tramendous effect on speed.
|
||||
|
||||
Template: mplayer/overwrite
|
||||
Type: boolean
|
||||
Default: false
|
||||
Description: Overwrite /etc/mplayer.conf ?
|
||||
Should I overwrite your current /etc/mplayer.conf with the one created on the fly based on your answers?
|
||||
|
||||
Template: mplayer/cfgnote
|
||||
Type: note
|
||||
Description: Create your ~/.mplayer/conf file.
|
||||
Remember to read documentation and edit your ~/.mplayer/conf
|
||||
(or /etc/mplayer.conf) file. This binary depends heavily on
|
||||
your hardware - which means that it needs tweaking for every single
|
||||
machine it's installed to. And it also it means that it will use
|
||||
your setup very effectively. Look at /usr/share/doc/mplayer
|
||||
end
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user